From f996681493c9c538ad4af5fd873ad2978168c324 Mon Sep 17 00:00:00 2001 From: lgtm <1gtm@users.noreply.github.com> Date: Sat, 14 Sep 2024 07:21:39 -0700 Subject: [PATCH 1/2] Use KIND v0.24.0 (#1580) /cherry-pick Signed-off-by: 1gtm <1gtm@appscode.com> --- .github/workflows/e2e.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index d2cec45ff..2c4cefb5e 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -101,7 +101,7 @@ jobs: id: kind uses: engineerd/setup-kind@v0.5.0 with: - version: v0.17.0 + version: v0.24.0 config: hack/kubernetes/kind.yaml image: kindest/node:${{ matrix.k8s }} From ef7a17bb44c0ba2ceb4a2c1901ba5b55912c7ebc Mon Sep 17 00:00:00 2001 From: lgtm <1gtm@users.noreply.github.com> Date: Thu, 26 Sep 2024 18:22:58 -0700 Subject: [PATCH 2/2] Prepare for release v0.36.0 (#1581) ProductLine: Stash Release: v2024.9.30 Release-tracker: https://github.com/stashed/CHANGELOG/pull/76 Signed-off-by: 1gtm <1gtm@appscode.com> --- go.mod | 33 +- go.sum | 65 +- .../go/compute/internal/version.go | 18 - .../go/compute/metadata/CHANGES.md | 7 + .../go/compute/metadata/metadata.go | 104 +- .../go/compute/metadata/retry.go | 2 +- .../go/compute/metadata/tidyfix.go | 23 - vendor/github.com/cespare/xxhash/v2/README.md | 2 + vendor/github.com/cespare/xxhash/v2/xxhash.go | 29 +- .../cespare/xxhash/v2/xxhash_asm.go | 2 +- .../cespare/xxhash/v2/xxhash_other.go | 2 +- .../cespare/xxhash/v2/xxhash_safe.go | 2 +- .../cespare/xxhash/v2/xxhash_unsafe.go | 2 +- vendor/github.com/ghodss/yaml/.gitignore | 20 + vendor/github.com/ghodss/yaml/.travis.yml | 7 + vendor/github.com/ghodss/yaml/LICENSE | 50 + vendor/github.com/ghodss/yaml/README.md | 121 + vendor/github.com/ghodss/yaml/fields.go | 501 + vendor/github.com/ghodss/yaml/yaml.go | 277 + .../gorilla/websocket/.editorconfig | 20 + .../github.com/gorilla/websocket/.gitignore | 26 +- .../gorilla/websocket/.golangci.yml | 3 + vendor/github.com/gorilla/websocket/AUTHORS | 9 - vendor/github.com/gorilla/websocket/LICENSE | 39 +- vendor/github.com/gorilla/websocket/Makefile | 34 + vendor/github.com/gorilla/websocket/README.md | 19 +- vendor/github.com/gorilla/websocket/client.go | 44 +- .../gorilla/websocket/compression.go | 9 +- vendor/github.com/gorilla/websocket/conn.go | 83 +- vendor/github.com/gorilla/websocket/mask.go | 4 + vendor/github.com/gorilla/websocket/proxy.go | 17 +- vendor/github.com/gorilla/websocket/server.go | 42 +- .../gorilla/websocket/tls_handshake.go | 3 - .../gorilla/websocket/tls_handshake_116.go | 21 - vendor/github.com/gorilla/websocket/util.go | 19 +- .../gorilla/websocket/x_net_proxy.go | 473 - vendor/github.com/rancher/norman/LICENSE | 177 + .../rancher/norman/clientbase/common.go | 407 + .../rancher/norman/clientbase/ops.go | 377 + .../rancher/norman/httperror/error.go | 129 + .../rancher/norman/types/condition.go | 121 + .../rancher/norman/types/convert/convert.go | 280 + .../rancher/norman/types/convert/ref.go | 11 + .../rancher/norman/types/convert/transform.go | 45 + .../norman/types/convert/value_set_string.go | 18 + .../norman/types/definition/definition.go | 45 + .../rancher/norman/types/encoder.go | 32 + vendor/github.com/rancher/norman/types/id.go | 24 + .../github.com/rancher/norman/types/mapper.go | 178 + .../rancher/norman/types/reflection.go | 510 + .../rancher/norman/types/schema_funcs.go | 73 + .../rancher/norman/types/schemas.go | 407 + .../rancher/norman/types/server_types.go | 238 + .../rancher/norman/types/slice/contains.go | 22 + .../github.com/rancher/norman/types/types.go | 171 + .../rancher/norman/types/values/values.go | 111 + .../rancher/rancher/pkg/client}/LICENSE | 24 - .../v3/zz_generated_aci_network_provider.go | 238 + .../management/v3/zz_generated_action.go | 12 + .../zz_generated_active_directory_config.go | 86 + ...d_active_directory_test_and_apply_input.go | 16 + .../management/v3/zz_generated_adfs_config.go | 52 + .../v3/zz_generated_aes_configuration.go | 10 + .../management/v3/zz_generated_affinity.go | 14 + ...enerated_agent_deployment_customization.go | 14 + .../zz_generated_aks_cluster_config_spec.go | 76 + .../v3/zz_generated_aks_node_pool.go | 42 + .../management/v3/zz_generated_aks_status.go | 14 + .../v3/zz_generated_alidns_provider_config.go | 14 + .../management/v3/zz_generated_answer.go | 16 + .../v3/zz_generated_app_condition.go | 20 + .../v3/zz_generated_attached_volume.go | 10 + .../management/v3/zz_generated_audit_log.go | 12 + .../v3/zz_generated_audit_log_config.go | 20 + .../management/v3/zz_generated_auth_config.go | 128 + .../v3/zz_generated_auth_config_conditions.go | 20 + .../v3/zz_generated_auth_config_status.go | 10 + .../v3/zz_generated_auth_webhook_config.go | 12 + .../v3/zz_generated_authn_config.go | 14 + .../v3/zz_generated_authz_config.go | 12 + .../v3/zz_generated_aws_cloud_provider.go | 12 + ...d_aws_elastic_block_store_volume_source.go | 16 + .../v3/zz_generated_azure_adconfig.go | 54 + ...zz_generated_azure_adconfig_apply_input.go | 12 + ...zz_generated_azure_adconfig_test_output.go | 10 + .../v3/zz_generated_azure_cloud_provider.go | 74 + .../zz_generated_azure_disk_volume_source.go | 20 + .../zz_generated_azure_file_volume_source.go | 14 + .../v3/zz_generated_backup_config.go | 20 + .../v3/zz_generated_bastion_host.go | 26 + ..._generated_block_storage_openstack_opts.go | 14 + .../zz_generated_calico_network_provider.go | 10 + .../v3/zz_generated_canal_network_provider.go | 10 + .../v3/zz_generated_capabilities.go | 18 + .../management/v3/zz_generated_catalog.go | 164 + .../v3/zz_generated_catalog_condition.go | 20 + .../v3/zz_generated_catalog_refresh.go | 10 + .../v3/zz_generated_catalog_secrets.go | 10 + .../v3/zz_generated_catalog_spec.go | 24 + .../v3/zz_generated_catalog_status.go | 18 + .../v3/zz_generated_catalog_template.go | 166 + .../zz_generated_catalog_template_version.go | 158 + .../v3/zz_generated_ceph_fsvolume_source.go | 20 + .../v3/zz_generated_cert_expiration.go | 10 + .../v3/zz_generated_change_password_input.go | 12 + .../v3/zz_generated_cinder_volume_source.go | 16 + .../management/v3/zz_generated_client.go | 124 + .../v3/zz_generated_cloud_credential.go | 122 + .../v3/zz_generated_cloud_credential_spec.go | 14 + .../v3/zz_generated_cloud_provider.go | 24 + ...zz_generated_cloudflare_provider_config.go | 16 + .../management/v3/zz_generated_cluster.go | 318 + .../v3/zz_generated_cluster_catalog.go | 168 + .../zz_generated_cluster_component_status.go | 12 + .../v3/zz_generated_cluster_condition.go | 20 + ...zz_generated_cluster_registration_token.go | 144 + ...nerated_cluster_registration_token_spec.go | 10 + ...rated_cluster_registration_token_status.go | 24 + ...generated_cluster_role_template_binding.go | 132 + .../v3/zz_generated_cluster_secrets.go | 40 + .../v3/zz_generated_cluster_spec.go | 72 + .../v3/zz_generated_cluster_spec_base.go | 36 + .../v3/zz_generated_cluster_status.go | 86 + .../v3/zz_generated_cluster_template.go | 124 + ...rated_cluster_template_questions_output.go | 10 + .../zz_generated_cluster_template_revision.go | 186 + ...ted_cluster_template_revision_condition.go | 20 + ...enerated_cluster_template_revision_spec.go | 18 + ...erated_cluster_template_revision_status.go | 40 + .../v3/zz_generated_cluster_template_spec.go | 16 + ...nerated_cluster_trust_bundle_projection.go | 18 + .../zz_generated_cluster_upgrade_strategy.go | 16 + .../management/v3/zz_generated_cmek_config.go | 12 + .../v3/zz_generated_component_condition.go | 16 + .../v3/zz_generated_compose_condition.go | 20 + .../v3/zz_generated_compose_config.go | 128 + .../v3/zz_generated_compose_spec.go | 10 + .../v3/zz_generated_compose_status.go | 10 + .../management/v3/zz_generated_condition.go | 20 + .../zz_generated_config_map_key_selector.go | 14 + ...generated_config_map_node_config_source.go | 18 + .../v3/zz_generated_config_map_projection.go | 14 + .../zz_generated_config_map_volume_source.go | 16 + .../v3/zz_generated_container_image.go | 12 + .../zz_generated_container_resource_limit.go | 16 + .../management/v3/zz_generated_cpu_info.go | 10 + .../v3/zz_generated_csi_volume_source.go | 18 + .../v3/zz_generated_custom_config.go | 24 + .../v3/zz_generated_daemon_endpoint.go | 10 + ...zz_generated_daemon_set_update_strategy.go | 12 + .../v3/zz_generated_deployment_strategy.go | 12 + .../v3/zz_generated_disk_vsphere_opts.go | 10 + .../management/v3/zz_generated_dns_config.go | 28 + .../management/v3/zz_generated_docker_info.go | 48 + .../v3/zz_generated_downward_apiprojection.go | 10 + .../zz_generated_downward_apivolume_file.go | 16 + .../zz_generated_downward_apivolume_source.go | 12 + .../management/v3/zz_generated_duration.go | 8 + .../v3/zz_generated_dynamic_schema.go | 152 + .../v3/zz_generated_dynamic_schema_spec.go | 34 + .../v3/zz_generated_dynamic_schema_status.go | 10 + .../v3/zz_generated_ecr_credential_plugin.go | 14 + .../zz_generated_eks_cluster_config_spec.go | 42 + .../management/v3/zz_generated_eks_status.go | 24 + .../zz_generated_empty_dir_volume_source.go | 12 + .../zz_generated_encryption_configuration.go | 14 + .../management/v3/zz_generated_env_var.go | 14 + .../v3/zz_generated_env_var_source.go | 16 + .../zz_generated_ephemeral_volume_source.go | 10 + .../management/v3/zz_generated_etcd_backup.go | 136 + .../v3/zz_generated_etcd_backup_condition.go | 20 + .../v3/zz_generated_etcd_backup_spec.go | 16 + .../v3/zz_generated_etcd_backup_status.go | 14 + .../v3/zz_generated_etcd_service.go | 48 + .../v3/zz_generated_event_rate_limit.go | 12 + .../v3/zz_generated_export_output.go | 10 + .../management/v3/zz_generated_extra_env.go | 14 + .../v3/zz_generated_extra_volume.go | 68 + .../v3/zz_generated_extra_volume_mount.go | 22 + .../v3/zz_generated_fc_volume_source.go | 18 + .../management/v3/zz_generated_feature.go | 128 + .../v3/zz_generated_feature_spec.go | 10 + .../v3/zz_generated_feature_status.go | 16 + .../management/v3/zz_generated_field.go | 40 + .../management/v3/zz_generated_file.go | 12 + .../management/v3/zz_generated_filter.go | 10 + .../zz_generated_flannel_network_provider.go | 10 + .../v3/zz_generated_fleet_workspace.go | 120 + ...zz_generated_fleet_workspace_permission.go | 12 + .../v3/zz_generated_fleet_workspace_status.go | 8 + .../v3/zz_generated_flex_volume_source.go | 18 + .../v3/zz_generated_flocker_volume_source.go | 12 + .../v3/zz_generated_free_ipa_config.go | 84 + ...generated_free_ipa_test_and_apply_input.go | 14 + ...rated_gce_persistent_disk_volume_source.go | 16 + ...z_generated_generate_kube_config_output.go | 10 + .../zz_generated_generic_oidcapply_input.go | 14 + .../v3/zz_generated_generic_oidcconfig.go | 62 + .../zz_generated_generic_oidctest_output.go | 10 + .../v3/zz_generated_git_repo_volume_source.go | 14 + .../v3/zz_generated_github_config.go | 46 + .../zz_generated_github_config_apply_input.go | 14 + .../zz_generated_github_config_test_output.go | 10 + .../v3/zz_generated_gke_autopilot_config.go | 10 + .../v3/zz_generated_gke_cidr_block.go | 12 + .../v3/zz_generated_gke_cluster_addons.go | 14 + .../zz_generated_gke_cluster_config_spec.go | 58 + ...d_gke_master_authorized_networks_config.go | 12 + .../v3/zz_generated_gke_node_config.go | 32 + .../zz_generated_gke_node_pool_autoscaling.go | 14 + .../v3/zz_generated_gke_node_pool_config.go | 22 + .../zz_generated_gke_node_pool_management.go | 12 + .../v3/zz_generated_gke_node_taint_config.go | 14 + ...zz_generated_gke_private_cluster_config.go | 14 + .../management/v3/zz_generated_gke_status.go | 12 + .../zz_generated_gkeip_allocation_policy.go | 24 + .../v3/zz_generated_global_aws_opts.go | 28 + .../management/v3/zz_generated_global_dns.go | 152 + .../v3/zz_generated_global_dns_provider.go | 128 + .../zz_generated_global_dns_provider_spec.go | 18 + .../v3/zz_generated_global_dns_spec.go | 20 + .../v3/zz_generated_global_dns_status.go | 12 + .../v3/zz_generated_global_openstack_opts.go | 30 + .../management/v3/zz_generated_global_role.go | 134 + .../v3/zz_generated_global_role_binding.go | 124 + .../v3/zz_generated_global_role_status.go | 16 + .../v3/zz_generated_global_vsphere_opts.go | 32 + .../zz_generated_glusterfs_volume_source.go | 14 + .../v3/zz_generated_google_oauth_config.go | 46 + ...nerated_google_oauth_config_apply_input.go | 14 + ...nerated_google_oauth_config_test_output.go | 10 + .../management/v3/zz_generated_group.go | 118 + .../v3/zz_generated_group_member.go | 122 + .../zz_generated_harvester_cloud_provider.go | 10 + .../v3/zz_generated_health_check.go | 10 + .../zz_generated_host_path_volume_source.go | 12 + .../v3/zz_generated_identity_configuration.go | 8 + .../zz_generated_import_cluster_yaml_input.go | 16 + .../v3/zz_generated_import_yaml_output.go | 10 + .../v3/zz_generated_imported_config.go | 10 + .../management/v3/zz_generated_info.go | 26 + .../v3/zz_generated_ingress_capabilities.go | 12 + .../v3/zz_generated_ingress_config.go | 42 + .../v3/zz_generated_internal_node_spec.go | 18 + .../v3/zz_generated_internal_node_status.go | 30 + .../v3/zz_generated_iscsi_volume_source.go | 30 + .../management/v3/zz_generated_k3s_config.go | 12 + .../management/v3/zz_generated_key.go | 12 + .../v3/zz_generated_key_cloak_config.go | 52 + .../v3/zz_generated_key_cloak_oidcconfig.go | 62 + .../management/v3/zz_generated_key_to_path.go | 14 + .../v3/zz_generated_kms_configuration.go | 18 + .../v3/zz_generated_kontainer_driver.go | 163 + .../v3/zz_generated_kontainer_driver_spec.go | 20 + .../zz_generated_kontainer_driver_status.go | 16 + .../v3/zz_generated_kube_apiservice.go | 42 + .../zz_generated_kube_controller_service.go | 30 + .../v3/zz_generated_kubelet_service.go | 36 + .../v3/zz_generated_kubeproxy_service.go | 26 + .../v3/zz_generated_kubernetes_info.go | 12 + ...z_generated_kubernetes_services_options.go | 20 + .../v3/zz_generated_label_selector.go | 12 + ...zz_generated_label_selector_requirement.go | 14 + .../v3/zz_generated_launch_template.go | 14 + .../management/v3/zz_generated_ldap_config.go | 180 + .../management/v3/zz_generated_ldap_fields.go | 60 + .../zz_generated_linear_autoscaler_params.go | 18 + ...zz_generated_load_balancer_capabilities.go | 16 + ..._generated_load_balancer_openstack_opts.go | 30 + ...z_generated_local_cluster_auth_endpoint.go | 14 + .../v3/zz_generated_local_config.go | 34 + .../v3/zz_generated_local_object_reference.go | 10 + .../v3/zz_generated_management_secret.go | 126 + .../management/v3/zz_generated_map_delta.go | 12 + .../management/v3/zz_generated_member.go | 14 + .../management/v3/zz_generated_memory_info.go | 10 + .../zz_generated_metadata_openstack_opts.go | 12 + .../v3/zz_generated_metadata_update.go | 12 + .../v3/zz_generated_monitoring_config.go | 22 + .../v3/zz_generated_multi_cluster_app.go | 165 + ...zz_generated_multi_cluster_app_revision.go | 122 + ...erated_multi_cluster_app_rollback_input.go | 10 + .../v3/zz_generated_multi_cluster_app_spec.go | 26 + .../zz_generated_multi_cluster_app_status.go | 14 + .../zz_generated_namespace_resource_quota.go | 10 + .../v3/zz_generated_network_config.go | 30 + .../v3/zz_generated_network_vshpere_opts.go | 10 + .../v3/zz_generated_nfs_volume_source.go | 14 + .../management/v3/zz_generated_node.go | 231 + .../v3/zz_generated_node_address.go | 12 + .../v3/zz_generated_node_affinity.go | 12 + .../v3/zz_generated_node_condition.go | 20 + .../v3/zz_generated_node_config_source.go | 10 + .../v3/zz_generated_node_config_status.go | 16 + .../v3/zz_generated_node_daemon_endpoints.go | 10 + .../v3/zz_generated_node_drain_input.go | 18 + .../management/v3/zz_generated_node_driver.go | 160 + .../v3/zz_generated_node_driver_spec.go | 28 + .../v3/zz_generated_node_driver_status.go | 16 + .../management/v3/zz_generated_node_group.go | 48 + .../management/v3/zz_generated_node_info.go | 16 + .../management/v3/zz_generated_node_plan.go | 14 + .../management/v3/zz_generated_node_pool.go | 156 + .../v3/zz_generated_node_pool_spec.go | 34 + .../v3/zz_generated_node_pool_status.go | 10 + .../v3/zz_generated_node_runtime_handler.go | 12 + ...generated_node_runtime_handler_features.go | 10 + .../v3/zz_generated_node_selector.go | 10 + .../zz_generated_node_selector_requirement.go | 14 + .../v3/zz_generated_node_selector_term.go | 12 + .../management/v3/zz_generated_node_spec.go | 50 + .../management/v3/zz_generated_node_status.go | 48 + .../v3/zz_generated_node_system_info.go | 28 + .../v3/zz_generated_node_template.go | 160 + .../zz_generated_node_template_condition.go | 18 + .../v3/zz_generated_node_template_spec.go | 44 + .../v3/zz_generated_node_template_status.go | 10 + .../v3/zz_generated_node_upgrade_strategy.go | 16 + .../management/v3/zz_generated_nodelocal.go | 16 + .../v3/zz_generated_object_field_selector.go | 12 + .../management/v3/zz_generated_object_meta.go | 28 + .../v3/zz_generated_oidc_apply_input.go | 14 + .../management/v3/zz_generated_oidc_config.go | 62 + .../v3/zz_generated_oidc_test_output.go | 10 + .../management/v3/zz_generated_okta_config.go | 54 + .../v3/zz_generated_open_ldap_config.go | 86 + ...enerated_open_ldap_test_and_apply_input.go | 14 + .../zz_generated_openstack_cloud_provider.go | 18 + .../management/v3/zz_generated_os_info.go | 14 + .../v3/zz_generated_owner_reference.go | 20 + ..._generated_persistent_volume_claim_spec.go | 26 + ...erated_persistent_volume_claim_template.go | 12 + ...d_persistent_volume_claim_volume_source.go | 12 + ...ed_photon_persistent_disk_volume_source.go | 12 + .../management/v3/zz_generated_ping_config.go | 52 + .../v3/zz_generated_pod_affinity.go | 12 + .../v3/zz_generated_pod_affinity_term.go | 20 + .../v3/zz_generated_pod_anti_affinity.go | 12 + ...curity_admission_configuration_template.go | 122 + ...mission_configuration_template_defaults.go | 20 + ...ssion_configuration_template_exemptions.go | 14 + ...y_admission_configuration_template_spec.go | 12 + .../management/v3/zz_generated_policy_rule.go | 18 + .../management/v3/zz_generated_port_check.go | 14 + .../v3/zz_generated_portworx_volume_source.go | 14 + .../management/v3/zz_generated_preference.go | 122 + .../zz_generated_preferred_scheduling_term.go | 12 + .../management/v3/zz_generated_principal.go | 142 + .../v3/zz_generated_private_registry.go | 18 + .../management/v3/zz_generated_process.go | 40 + .../management/v3/zz_generated_project.go | 145 + .../v3/zz_generated_project_catalog.go | 168 + .../v3/zz_generated_project_condition.go | 20 + .../v3/zz_generated_project_network_policy.go | 132 + ...z_generated_project_network_policy_spec.go | 12 + ...generated_project_network_policy_status.go | 8 + .../v3/zz_generated_project_resource_quota.go | 12 + ...generated_project_role_template_binding.go | 134 + .../v3/zz_generated_project_spec.go | 20 + .../v3/zz_generated_project_status.go | 10 + .../zz_generated_projected_volume_source.go | 12 + .../v3/zz_generated_provider_configuration.go | 18 + .../v3/zz_generated_public_endpoint.go | 28 + .../management/v3/zz_generated_question.go | 44 + .../v3/zz_generated_quobyte_volume_source.go | 20 + ...erated_rancher_kubernetes_engine_config.go | 62 + .../zz_generated_rancher_user_notification.go | 122 + .../v3/zz_generated_rbd_volume_source.go | 24 + .../v3/zz_generated_resource_claim.go | 10 + .../v3/zz_generated_resource_configuration.go | 12 + .../zz_generated_resource_field_selector.go | 14 + .../v3/zz_generated_resource_quota_limit.go | 34 + .../v3/zz_generated_resource_requirements.go | 14 + .../v3/zz_generated_restore_config.go | 12 + ...enerated_restore_from_etcd_backup_input.go | 12 + .../management/v3/zz_generated_rke2config.go | 12 + .../management/v3/zz_generated_rke_addon.go | 120 + .../v3/zz_generated_rke_config_node.go | 38 + .../v3/zz_generated_rke_config_node_plan.go | 22 + .../v3/zz_generated_rke_config_services.go | 20 + .../v3/zz_generated_rke_k8s_service_option.go | 120 + .../v3/zz_generated_rke_k8s_system_image.go | 120 + .../v3/zz_generated_rke_system_images.go | 90 + .../management/v3/zz_generated_rke_taint.go | 16 + .../v3/zz_generated_role_template.go | 142 + .../v3/zz_generated_rolling_update.go | 12 + .../zz_generated_rolling_update_daemon_set.go | 16 + .../zz_generated_rolling_update_deployment.go | 16 + .../zz_generated_rotate_certificate_input.go | 12 + .../zz_generated_rotate_certificate_output.go | 10 + .../v3/zz_generated_rotate_certificates.go | 12 + ..._generated_rotate_encryption_key_output.go | 10 + .../v3/zz_generated_route53provider_config.go | 22 + .../v3/zz_generated_route_openstack_opts.go | 10 + .../v3/zz_generated_s3backup_config.go | 22 + .../v3/zz_generated_s3credential_config.go | 24 + .../v3/zz_generated_saml_config_test_input.go | 10 + .../zz_generated_saml_config_test_output.go | 10 + .../management/v3/zz_generated_saml_token.go | 124 + .../v3/zz_generated_save_as_template_input.go | 12 + .../zz_generated_save_as_template_output.go | 12 + .../v3/zz_generated_scale_iovolume_source.go | 28 + .../v3/zz_generated_scheduler_service.go | 26 + .../zz_generated_search_principals_input.go | 12 + .../v3/zz_generated_secret_key_selector.go | 14 + .../v3/zz_generated_secret_projection.go | 14 + .../v3/zz_generated_secret_volume_source.go | 16 + .../zz_generated_secretbox_configuration.go | 10 + .../zz_generated_secrets_encryption_config.go | 12 + ...erated_service_account_token_projection.go | 14 + .../v3/zz_generated_service_override.go | 20 + .../v3/zz_generated_set_password_input.go | 10 + .../management/v3/zz_generated_setting.go | 126 + .../v3/zz_generated_shibboleth_config.go | 54 + .../zz_generated_storage_osvolume_source.go | 18 + .../v3/zz_generated_sub_question.go | 40 + .../management/v3/zz_generated_taint.go | 16 + .../management/v3/zz_generated_target.go | 16 + .../management/v3/zz_generated_template.go | 166 + .../v3/zz_generated_template_content.go | 120 + .../v3/zz_generated_template_spec.go | 48 + .../v3/zz_generated_template_status.go | 10 + .../v3/zz_generated_template_version.go | 158 + .../v3/zz_generated_template_version_spec.go | 40 + .../zz_generated_template_version_status.go | 10 + .../management/v3/zz_generated_token.go | 155 + .../management/v3/zz_generated_toleration.go | 18 + ..._generated_typed_local_object_reference.go | 14 + .../v3/zz_generated_typed_object_reference.go | 16 + ...enerated_update_global_dnstargets_input.go | 10 + ..._update_multi_cluster_app_targets_input.go | 12 + .../v3/zz_generated_upgrade_strategy.go | 10 + .../management/v3/zz_generated_user.go | 169 + .../v3/zz_generated_user_attribute.go | 40 + .../v3/zz_generated_user_condition.go | 20 + .../management/v3/zz_generated_user_spec.go | 8 + .../management/v3/zz_generated_user_status.go | 10 + .../management/v3/zz_generated_values.go | 16 + .../v3/zz_generated_version_commits.go | 10 + .../v3/zz_generated_virtual_center_config.go | 18 + .../v3/zz_generated_volume_projection.go | 18 + ..._generated_volume_resource_requirements.go | 12 + .../v3/zz_generated_vsphere_cloud_provider.go | 18 + ...ated_vsphere_virtual_disk_volume_source.go | 16 + .../v3/zz_generated_weave_network_provider.go | 10 + ...zz_generated_weighted_pod_affinity_term.go | 12 + .../v3/zz_generated_workspace_vsphere_opts.go | 18 + vendor/github.com/rancher/wrangler/v3/LICENSE | 178 + .../rancher/wrangler/v3/pkg/name/name.go | 75 + vendor/golang.org/x/crypto/LICENSE | 4 +- vendor/golang.org/x/crypto/bcrypt/bcrypt.go | 2 +- .../x/crypto/blake2b/blake2bAVX2_amd64.s | 5167 ++++++- .../x/crypto/blake2b/blake2b_amd64.s | 1681 ++- vendor/golang.org/x/crypto/blowfish/cipher.go | 2 +- .../chacha20poly1305/chacha20poly1305.go | 2 +- .../chacha20poly1305/chacha20poly1305_amd64.s | 11503 +++++++++++++--- .../x/crypto/cryptobyte/asn1/asn1.go | 2 +- .../golang.org/x/crypto/cryptobyte/string.go | 2 +- .../x/crypto/curve25519/curve25519.go | 39 +- .../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 - vendor/golang.org/x/crypto/ed25519/ed25519.go | 4 +- vendor/golang.org/x/crypto/hkdf/hkdf.go | 2 +- .../x/crypto/internal/poly1305/sum_amd64.s | 133 +- vendor/golang.org/x/crypto/nacl/box/box.go | 2 +- .../x/crypto/nacl/secretbox/secretbox.go | 2 +- vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go | 2 +- .../x/crypto/salsa20/salsa/hsalsa20.go | 2 +- .../x/crypto/salsa20/salsa/salsa20_amd64.s | 1742 +-- vendor/golang.org/x/crypto/scrypt/scrypt.go | 2 +- vendor/golang.org/x/net/LICENSE | 4 +- vendor/golang.org/x/net/http2/transport.go | 4 - vendor/golang.org/x/oauth2/LICENSE | 4 +- .../golang.org/x/oauth2/google/appengine.go | 20 +- .../x/oauth2/google/appengine_gen1.go | 77 - .../x/oauth2/google/appengine_gen2_flex.go | 27 - vendor/golang.org/x/oauth2/google/default.go | 96 +- vendor/golang.org/x/oauth2/google/doc.go | 86 +- .../{internal => }/externalaccount/aws.go | 113 +- .../google/externalaccount/basecredentials.go | 485 + .../externalaccount/executablecredsource.go | 28 +- .../externalaccount/filecredsource.go | 14 +- .../{internal => }/externalaccount/header.go | 0 .../programmaticrefreshcredsource.go | 21 + .../externalaccount/urlcredsource.go | 18 +- vendor/golang.org/x/oauth2/google/google.go | 14 +- .../externalaccount/basecredentials.go | 254 - .../google/internal/externalaccount/err.go | 18 - .../impersonate.go | 2 +- .../x/oauth2/internal/client_appengine.go | 13 - .../golang.org/x/oauth2/internal/transport.go | 5 - vendor/golang.org/x/oauth2/oauth2.go | 2 +- vendor/golang.org/x/sync/LICENSE | 4 +- vendor/golang.org/x/sys/LICENSE | 4 +- vendor/golang.org/x/sys/cpu/cpu.go | 21 + vendor/golang.org/x/sys/cpu/cpu_arm64.go | 12 + .../golang.org/x/sys/cpu/cpu_linux_arm64.go | 5 + .../golang.org/x/sys/cpu/cpu_linux_noinit.go | 2 +- .../golang.org/x/sys/cpu/cpu_linux_riscv64.go | 137 + vendor/golang.org/x/sys/cpu/cpu_riscv64.go | 11 +- vendor/golang.org/x/sys/unix/mkerrors.sh | 2 + vendor/golang.org/x/sys/unix/mremap.go | 5 + .../golang.org/x/sys/unix/syscall_darwin.go | 61 + vendor/golang.org/x/sys/unix/syscall_hurd.go | 1 + vendor/golang.org/x/sys/unix/syscall_linux.go | 1 + .../golang.org/x/sys/unix/syscall_openbsd.go | 1 + vendor/golang.org/x/sys/unix/syscall_unix.go | 9 + .../x/sys/unix/zerrors_darwin_amd64.go | 12 + .../x/sys/unix/zerrors_darwin_arm64.go | 12 + vendor/golang.org/x/sys/unix/zerrors_linux.go | 38 +- .../x/sys/unix/zerrors_linux_386.go | 2 + .../x/sys/unix/zerrors_linux_amd64.go | 2 + .../x/sys/unix/zerrors_linux_arm.go | 2 + .../x/sys/unix/zerrors_linux_arm64.go | 2 + .../x/sys/unix/zerrors_linux_loong64.go | 2 + .../x/sys/unix/zerrors_linux_mips.go | 2 + .../x/sys/unix/zerrors_linux_mips64.go | 2 + .../x/sys/unix/zerrors_linux_mips64le.go | 2 + .../x/sys/unix/zerrors_linux_mipsle.go | 2 + .../x/sys/unix/zerrors_linux_ppc.go | 2 + .../x/sys/unix/zerrors_linux_ppc64.go | 2 + .../x/sys/unix/zerrors_linux_ppc64le.go | 2 + .../x/sys/unix/zerrors_linux_riscv64.go | 2 + .../x/sys/unix/zerrors_linux_s390x.go | 2 + .../x/sys/unix/zerrors_linux_sparc64.go | 2 + .../x/sys/unix/zerrors_zos_s390x.go | 2 + .../x/sys/unix/zsyscall_darwin_amd64.go | 101 + .../x/sys/unix/zsyscall_darwin_amd64.s | 25 + .../x/sys/unix/zsyscall_darwin_arm64.go | 101 + .../x/sys/unix/zsyscall_darwin_arm64.s | 25 + .../golang.org/x/sys/unix/zsyscall_linux.go | 16 + .../x/sys/unix/zsyscall_openbsd_386.go | 24 + .../x/sys/unix/zsyscall_openbsd_386.s | 5 + .../x/sys/unix/zsyscall_openbsd_amd64.go | 24 + .../x/sys/unix/zsyscall_openbsd_amd64.s | 5 + .../x/sys/unix/zsyscall_openbsd_arm.go | 24 + .../x/sys/unix/zsyscall_openbsd_arm.s | 5 + .../x/sys/unix/zsyscall_openbsd_arm64.go | 24 + .../x/sys/unix/zsyscall_openbsd_arm64.s | 5 + .../x/sys/unix/zsyscall_openbsd_mips64.go | 24 + .../x/sys/unix/zsyscall_openbsd_mips64.s | 5 + .../x/sys/unix/zsyscall_openbsd_ppc64.go | 24 + .../x/sys/unix/zsyscall_openbsd_ppc64.s | 6 + .../x/sys/unix/zsyscall_openbsd_riscv64.go | 24 + .../x/sys/unix/zsyscall_openbsd_riscv64.s | 5 + .../x/sys/unix/zsysnum_linux_386.go | 1 + .../x/sys/unix/zsysnum_linux_amd64.go | 1 + .../x/sys/unix/zsysnum_linux_arm.go | 1 + .../x/sys/unix/zsysnum_linux_arm64.go | 1 + .../x/sys/unix/zsysnum_linux_loong64.go | 1 + .../x/sys/unix/zsysnum_linux_mips.go | 1 + .../x/sys/unix/zsysnum_linux_mips64.go | 1 + .../x/sys/unix/zsysnum_linux_mips64le.go | 1 + .../x/sys/unix/zsysnum_linux_mipsle.go | 1 + .../x/sys/unix/zsysnum_linux_ppc.go | 1 + .../x/sys/unix/zsysnum_linux_ppc64.go | 1 + .../x/sys/unix/zsysnum_linux_ppc64le.go | 1 + .../x/sys/unix/zsysnum_linux_riscv64.go | 1 + .../x/sys/unix/zsysnum_linux_s390x.go | 1 + .../x/sys/unix/zsysnum_linux_sparc64.go | 1 + .../x/sys/unix/ztypes_darwin_amd64.go | 13 + .../x/sys/unix/ztypes_darwin_arm64.go | 13 + .../x/sys/unix/ztypes_freebsd_386.go | 1 + .../x/sys/unix/ztypes_freebsd_amd64.go | 1 + .../x/sys/unix/ztypes_freebsd_arm.go | 1 + .../x/sys/unix/ztypes_freebsd_arm64.go | 1 + .../x/sys/unix/ztypes_freebsd_riscv64.go | 1 + vendor/golang.org/x/sys/unix/ztypes_linux.go | 12 +- .../x/sys/unix/ztypes_linux_riscv64.go | 33 + .../x/sys/windows/security_windows.go | 24 +- .../x/sys/windows/syscall_windows.go | 16 +- .../golang.org/x/sys/windows/types_windows.go | 72 +- .../x/sys/windows/zsyscall_windows.go | 80 + vendor/golang.org/x/term/LICENSE | 4 +- vendor/golang.org/x/term/term_windows.go | 1 + vendor/golang.org/x/text/LICENSE | 4 +- .../appengine/CONTRIBUTING.md | 88 - vendor/google.golang.org/appengine/README.md | 100 - .../google.golang.org/appengine/appengine.go | 138 - .../appengine/appengine_vm.go | 20 - vendor/google.golang.org/appengine/errors.go | 46 - .../google.golang.org/appengine/identity.go | 141 - .../app_identity/app_identity_service.pb.go | 611 - .../app_identity/app_identity_service.proto | 64 - .../internal/modules/modules_service.pb.go | 786 -- .../internal/modules/modules_service.proto | 80 - .../google.golang.org/appengine/namespace.go | 24 - vendor/google.golang.org/appengine/timeout.go | 20 - .../kmodules.xyz/client-go/api/v1/cluster.go | 26 +- .../client-go/api/v1/zz_generated.deepcopy.go | 22 + vendor/kmodules.xyz/client-go/cluster/lib.go | 8 +- .../kmodules.xyz/client-go/cluster/rancher.go | 45 +- .../offshoot-api/api/v1/gateway_types.go | 78 + .../offshoot-api/api/v1/openapi_generated.go | 151 + .../kmodules.xyz/offshoot-api/api/v1/types.go | 19 - .../api/v1/zz_generated.deepcopy.go | 73 + .../offshoot-api/util/runtime_settings.go | 2 +- vendor/modules.txt | 60 +- .../v1alpha1/openapi_generated.go | 268 +- .../apis/stash/v1alpha1/openapi_generated.go | 268 +- .../apis/stash/v1beta1/openapi_generated.go | 268 +- .../apis/ui/v1alpha1/openapi_generated.go | 268 +- 613 files changed, 39136 insertions(+), 9037 deletions(-) delete mode 100644 vendor/cloud.google.com/go/compute/internal/version.go delete mode 100644 vendor/cloud.google.com/go/compute/metadata/tidyfix.go create mode 100644 vendor/github.com/ghodss/yaml/.gitignore create mode 100644 vendor/github.com/ghodss/yaml/.travis.yml create mode 100644 vendor/github.com/ghodss/yaml/LICENSE create mode 100644 vendor/github.com/ghodss/yaml/README.md create mode 100644 vendor/github.com/ghodss/yaml/fields.go create mode 100644 vendor/github.com/ghodss/yaml/yaml.go create mode 100644 vendor/github.com/gorilla/websocket/.editorconfig create mode 100644 vendor/github.com/gorilla/websocket/.golangci.yml delete mode 100644 vendor/github.com/gorilla/websocket/AUTHORS create mode 100644 vendor/github.com/gorilla/websocket/Makefile delete mode 100644 vendor/github.com/gorilla/websocket/tls_handshake_116.go delete mode 100644 vendor/github.com/gorilla/websocket/x_net_proxy.go create mode 100644 vendor/github.com/rancher/norman/LICENSE create mode 100644 vendor/github.com/rancher/norman/clientbase/common.go create mode 100644 vendor/github.com/rancher/norman/clientbase/ops.go create mode 100644 vendor/github.com/rancher/norman/httperror/error.go create mode 100644 vendor/github.com/rancher/norman/types/condition.go create mode 100644 vendor/github.com/rancher/norman/types/convert/convert.go create mode 100644 vendor/github.com/rancher/norman/types/convert/ref.go create mode 100644 vendor/github.com/rancher/norman/types/convert/transform.go create mode 100644 vendor/github.com/rancher/norman/types/convert/value_set_string.go create mode 100644 vendor/github.com/rancher/norman/types/definition/definition.go create mode 100644 vendor/github.com/rancher/norman/types/encoder.go create mode 100644 vendor/github.com/rancher/norman/types/id.go create mode 100644 vendor/github.com/rancher/norman/types/mapper.go create mode 100644 vendor/github.com/rancher/norman/types/reflection.go create mode 100644 vendor/github.com/rancher/norman/types/schema_funcs.go create mode 100644 vendor/github.com/rancher/norman/types/schemas.go create mode 100644 vendor/github.com/rancher/norman/types/server_types.go create mode 100644 vendor/github.com/rancher/norman/types/slice/contains.go create mode 100644 vendor/github.com/rancher/norman/types/types.go create mode 100644 vendor/github.com/rancher/norman/types/values/values.go rename vendor/{cloud.google.com/go/compute => github.com/rancher/rancher/pkg/client}/LICENSE (89%) create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aci_network_provider.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_action.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_active_directory_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_active_directory_test_and_apply_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_adfs_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aes_configuration.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_affinity.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_agent_deployment_customization.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aks_cluster_config_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aks_node_pool.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aks_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_alidns_provider_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_answer.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_app_condition.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_attached_volume.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_audit_log.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_audit_log_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_config_conditions.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_config_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_webhook_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_authn_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_authz_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aws_cloud_provider.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aws_elastic_block_store_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_adconfig.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_adconfig_apply_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_adconfig_test_output.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_cloud_provider.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_disk_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_file_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_backup_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_bastion_host.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_block_storage_openstack_opts.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_calico_network_provider.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_canal_network_provider.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_capabilities.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_condition.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_refresh.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_secrets.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_template.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_template_version.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ceph_fsvolume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cert_expiration.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_change_password_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cinder_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_client.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloud_credential.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloud_credential_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloud_provider.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloudflare_provider_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_catalog.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_component_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_condition.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_registration_token.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_registration_token_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_registration_token_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_role_template_binding.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_secrets.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_spec_base.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_questions_output.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision_condition.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_trust_bundle_projection.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_upgrade_strategy.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cmek_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_component_condition.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_condition.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_condition.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_key_selector.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_node_config_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_projection.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_container_image.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_container_resource_limit.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cpu_info.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_csi_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_custom_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_daemon_endpoint.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_daemon_set_update_strategy.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_deployment_strategy.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_disk_vsphere_opts.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dns_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_docker_info.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_downward_apiprojection.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_downward_apivolume_file.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_downward_apivolume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_duration.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dynamic_schema.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dynamic_schema_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dynamic_schema_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ecr_credential_plugin.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_eks_cluster_config_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_eks_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_empty_dir_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_encryption_configuration.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_env_var.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_env_var_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ephemeral_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup_condition.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_service.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_event_rate_limit.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_export_output.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_extra_env.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_extra_volume.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_extra_volume_mount.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fc_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_feature.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_feature_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_feature_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_field.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_file.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_filter.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_flannel_network_provider.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fleet_workspace.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fleet_workspace_permission.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fleet_workspace_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_flex_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_flocker_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_free_ipa_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_free_ipa_test_and_apply_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gce_persistent_disk_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generate_kube_config_output.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generic_oidcapply_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generic_oidcconfig.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generic_oidctest_output.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_git_repo_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_github_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_github_config_apply_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_github_config_test_output.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_autopilot_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_cidr_block.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_cluster_addons.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_cluster_config_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_master_authorized_networks_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_pool_autoscaling.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_pool_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_pool_management.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_taint_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_private_cluster_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gkeip_allocation_policy.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_aws_opts.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_provider.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_provider_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_openstack_opts.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_role.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_role_binding.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_role_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_vsphere_opts.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_glusterfs_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_google_oauth_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_google_oauth_config_apply_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_google_oauth_config_test_output.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_group.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_group_member.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_harvester_cloud_provider.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_health_check.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_host_path_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_identity_configuration.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_import_cluster_yaml_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_import_yaml_output.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_imported_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_info.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ingress_capabilities.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ingress_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_internal_node_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_internal_node_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_iscsi_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_k3s_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key_cloak_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key_cloak_oidcconfig.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key_to_path.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kms_configuration.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kontainer_driver.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kontainer_driver_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kontainer_driver_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kube_apiservice.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kube_controller_service.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubelet_service.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubeproxy_service.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubernetes_info.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubernetes_services_options.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_label_selector.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_label_selector_requirement.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_launch_template.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ldap_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ldap_fields.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_linear_autoscaler_params.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_load_balancer_capabilities.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_load_balancer_openstack_opts.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_local_cluster_auth_endpoint.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_local_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_local_object_reference.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_management_secret.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_map_delta.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_member.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_memory_info.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_metadata_openstack_opts.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_metadata_update.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_monitoring_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_revision.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_rollback_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_namespace_resource_quota.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_network_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_network_vshpere_opts.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_nfs_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_address.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_affinity.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_condition.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_config_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_config_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_daemon_endpoints.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_drain_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_driver.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_driver_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_driver_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_group.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_info.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_plan.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_pool.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_pool_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_pool_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_runtime_handler.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_runtime_handler_features.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_selector.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_selector_requirement.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_selector_term.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_system_info.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template_condition.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_upgrade_strategy.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_nodelocal.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_object_field_selector.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_object_meta.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_oidc_apply_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_oidc_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_oidc_test_output.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_okta_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_open_ldap_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_open_ldap_test_and_apply_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_openstack_cloud_provider.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_os_info.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_owner_reference.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_persistent_volume_claim_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_persistent_volume_claim_template.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_persistent_volume_claim_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_photon_persistent_disk_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ping_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_affinity.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_affinity_term.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_anti_affinity.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template_defaults.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template_exemptions.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_policy_rule.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_port_check.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_portworx_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_preference.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_preferred_scheduling_term.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_principal.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_private_registry.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_process.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_catalog.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_condition.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_network_policy.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_network_policy_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_network_policy_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_resource_quota.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_role_template_binding.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_projected_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_provider_configuration.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_public_endpoint.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_question.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_quobyte_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rancher_kubernetes_engine_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rancher_user_notification.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rbd_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_claim.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_configuration.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_field_selector.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_quota_limit.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_requirements.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_restore_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_restore_from_etcd_backup_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke2config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_addon.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_config_node.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_config_node_plan.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_config_services.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_k8s_service_option.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_k8s_system_image.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_system_images.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_taint.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_role_template.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rolling_update.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rolling_update_daemon_set.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rolling_update_deployment.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_certificate_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_certificate_output.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_certificates.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_encryption_key_output.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_route53provider_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_route_openstack_opts.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_s3backup_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_s3credential_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_saml_config_test_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_saml_config_test_output.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_saml_token.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_save_as_template_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_save_as_template_output.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_scale_iovolume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_scheduler_service.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_search_principals_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secret_key_selector.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secret_projection.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secret_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secretbox_configuration.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secrets_encryption_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_service_account_token_projection.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_service_override.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_set_password_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_setting.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_shibboleth_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_storage_osvolume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_sub_question.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_taint.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_target.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_content.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_version.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_version_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_version_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_token.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_toleration.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_typed_local_object_reference.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_typed_object_reference.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_update_global_dnstargets_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_update_multi_cluster_app_targets_input.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_upgrade_strategy.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_attribute.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_condition.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_spec.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_status.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_values.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_version_commits.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_virtual_center_config.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_volume_projection.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_volume_resource_requirements.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_vsphere_cloud_provider.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_vsphere_virtual_disk_volume_source.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_weave_network_provider.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_weighted_pod_affinity_term.go create mode 100644 vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_workspace_vsphere_opts.go create mode 100644 vendor/github.com/rancher/wrangler/v3/LICENSE create mode 100644 vendor/github.com/rancher/wrangler/v3/pkg/name/name.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/oauth2/google/appengine_gen1.go delete mode 100644 vendor/golang.org/x/oauth2/google/appengine_gen2_flex.go rename vendor/golang.org/x/oauth2/google/{internal => }/externalaccount/aws.go (77%) create mode 100644 vendor/golang.org/x/oauth2/google/externalaccount/basecredentials.go rename vendor/golang.org/x/oauth2/google/{internal => }/externalaccount/executablecredsource.go (84%) rename vendor/golang.org/x/oauth2/google/{internal => }/externalaccount/filecredsource.go (62%) rename vendor/golang.org/x/oauth2/google/{internal => }/externalaccount/header.go (100%) create mode 100644 vendor/golang.org/x/oauth2/google/externalaccount/programmaticrefreshcredsource.go rename vendor/golang.org/x/oauth2/google/{internal => }/externalaccount/urlcredsource.go (61%) delete mode 100644 vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go delete mode 100644 vendor/golang.org/x/oauth2/google/internal/externalaccount/err.go rename vendor/golang.org/x/oauth2/google/internal/{externalaccount => impersonate}/impersonate.go (99%) delete mode 100644 vendor/golang.org/x/oauth2/internal/client_appengine.go create mode 100644 vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go delete mode 100644 vendor/google.golang.org/appengine/CONTRIBUTING.md delete mode 100644 vendor/google.golang.org/appengine/README.md delete mode 100644 vendor/google.golang.org/appengine/appengine.go delete mode 100644 vendor/google.golang.org/appengine/appengine_vm.go delete mode 100644 vendor/google.golang.org/appengine/errors.go delete mode 100644 vendor/google.golang.org/appengine/identity.go delete mode 100644 vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.proto delete mode 100644 vendor/google.golang.org/appengine/internal/modules/modules_service.pb.go delete mode 100644 vendor/google.golang.org/appengine/internal/modules/modules_service.proto delete mode 100644 vendor/google.golang.org/appengine/namespace.go delete mode 100644 vendor/google.golang.org/appengine/timeout.go create mode 100644 vendor/kmodules.xyz/offshoot-api/api/v1/gateway_types.go diff --git a/go.mod b/go.mod index 3b8de0db5..f49feaeb5 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( go.bytebuilders.dev/license-proxyserver v0.0.11 go.bytebuilders.dev/license-verifier v0.14.1 go.bytebuilders.dev/license-verifier/kubernetes v0.14.1 - golang.org/x/text v0.16.0 + golang.org/x/text v0.18.0 gomodules.xyz/blobfs v0.1.14 gomodules.xyz/cert v1.6.0 gomodules.xyz/encoding v0.0.8 @@ -37,22 +37,21 @@ require ( k8s.io/klog/v2 v2.130.1 k8s.io/kube-aggregator v0.30.2 k8s.io/kubernetes v1.30.2 - kmodules.xyz/client-go v0.30.13 + kmodules.xyz/client-go v0.30.17 kmodules.xyz/constants v0.0.0-20230304030334-d2d1f28732a5 kmodules.xyz/csi-utils v0.29.1 kmodules.xyz/custom-resources v0.30.0 kmodules.xyz/objectstore-api v0.29.1 - kmodules.xyz/offshoot-api v0.30.0 + kmodules.xyz/offshoot-api v0.30.1 kmodules.xyz/openshift v0.29.0 kmodules.xyz/prober v0.29.0 kmodules.xyz/webhook-runtime v0.29.1 sigs.k8s.io/controller-runtime v0.18.4 - stash.appscode.dev/apimachinery v0.35.0 + stash.appscode.dev/apimachinery v0.36.0 ) require ( - cloud.google.com/go/compute v1.23.0 // indirect - cloud.google.com/go/compute/metadata v0.2.3 // indirect + cloud.google.com/go/compute/metadata v0.3.0 // indirect cloud.google.com/go/storage v1.30.1 // indirect filippo.io/edwards25519 v1.1.0 // indirect github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect @@ -75,7 +74,7 @@ require ( github.com/beorn7/perks v1.0.1 // indirect github.com/blang/semver/v4 v4.0.0 // indirect github.com/cenkalti/backoff/v4 v4.2.1 // indirect - github.com/cespare/xxhash/v2 v2.2.0 // indirect + github.com/cespare/xxhash/v2 v2.3.0 // indirect github.com/cloudevents/sdk-go/v2 v2.15.2 // indirect github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0 // indirect github.com/containerd/stargz-snapshotter/estargz v0.14.3 // indirect @@ -96,6 +95,7 @@ require ( github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect github.com/gabriel-vasile/mimetype v1.4.3 // indirect + github.com/ghodss/yaml v1.0.0 // indirect github.com/go-errors/errors v1.4.2 // indirect github.com/go-logr/logr v1.4.2 // indirect github.com/go-logr/stdr v1.2.2 // indirect @@ -119,7 +119,7 @@ require ( github.com/google/uuid v1.6.0 // indirect github.com/googleapis/enterprise-certificate-proxy v0.2.5 // indirect github.com/googleapis/gax-go/v2 v2.12.0 // indirect - github.com/gorilla/websocket v1.5.0 // indirect + github.com/gorilla/websocket v1.5.1 // indirect github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 // indirect @@ -157,6 +157,9 @@ require ( github.com/prometheus/client_model v0.5.0 // indirect github.com/prometheus/common v0.45.0 // indirect github.com/prometheus/procfs v0.12.0 // indirect + github.com/rancher/norman v0.0.0-20240708202514-a0127673d1b9 // indirect + github.com/rancher/rancher/pkg/client v0.0.0-20240710123941-93e332156bbe // indirect + github.com/rancher/wrangler/v3 v3.0.0 // indirect github.com/russross/blackfriday/v2 v2.1.0 // indirect github.com/sergi/go-diff v1.2.0 // indirect github.com/shopspring/decimal v1.3.1 // indirect @@ -185,13 +188,13 @@ require ( go.uber.org/multierr v1.11.0 // indirect go.uber.org/zap v1.26.0 // indirect gocloud.dev v0.26.0 // indirect - golang.org/x/crypto v0.24.0 // indirect + golang.org/x/crypto v0.27.0 // indirect golang.org/x/exp v0.0.0-20230905200255-921286631fa9 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/oauth2 v0.15.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect + golang.org/x/net v0.29.0 // indirect + golang.org/x/oauth2 v0.22.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect golang.org/x/time v0.5.0 // indirect golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect @@ -226,7 +229,7 @@ require ( kmodules.xyz/resource-metadata v0.18.12 // indirect kmodules.xyz/resource-metrics v0.30.2 // indirect sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0 // indirect - sigs.k8s.io/cli-utils v0.34.0 // indirect + sigs.k8s.io/cli-utils v0.35.0 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect diff --git a/go.sum b/go.sum index 9610b6472..b4122c3b0 100644 --- a/go.sum +++ b/go.sum @@ -41,10 +41,8 @@ cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTB cloud.google.com/go/compute v1.2.0/go.mod h1:xlogom/6gr8RJGBe7nT2eGsQYAFUbbv8dbC29qE3Xmw= cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM= cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M= -cloud.google.com/go/compute v1.23.0 h1:tP41Zoavr8ptEqaW6j+LQOnyBBhO7OkOMAGrgLopTwY= -cloud.google.com/go/compute v1.23.0/go.mod h1:4tCnrn48xsqlwSAiLf1HXMQk8CONslYbdiEZc9FEIbM= -cloud.google.com/go/compute/metadata v0.2.3 h1:mg4jlk7mCAj6xXp9UJ4fjI9VUI5rubuGBW5aJ7UnBMY= -cloud.google.com/go/compute/metadata v0.2.3/go.mod h1:VAV5nSsACxMJvgaAuX6Pk2AawlZn8kiOGuCv6gTkwuA= +cloud.google.com/go/compute/metadata v0.3.0 h1:Tz+eQXMEqDIKRsmY3cHTL6FVaynIjX2QxYC4trgAKZc= +cloud.google.com/go/compute/metadata v0.3.0/go.mod h1:zFmK7XCadkQkj6TtorcaGlCW1hT1fIilQDwofLpJ20k= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= @@ -234,8 +232,8 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= -github.com/cespare/xxhash/v2 v2.2.0 h1:DC2CZ1Ep5Y4k3ZQ899DldepgrayRUGE6BBZ/cd9Cj44= -github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs= +github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927 h1:SKI1/fuSdodxmNNyVBR8d7X/HuLnRpvvFO0AgyQk764= github.com/cheekybits/is v0.0.0-20150225183255-68e9c0620927/go.mod h1:h/aW8ynjgkuj+NQRlZcDbAbM1ORAbXjXX77sX7T289U= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -335,6 +333,7 @@ github.com/fsnotify/fsnotify v1.7.0 h1:8JEhPFa5W2WU7YfeZzPNqzMP6Lwt7L2715Ggo0nos github.com/fsnotify/fsnotify v1.7.0/go.mod h1:40Bi/Hjc2AVfZrqy+aj+yEI+/bRxZnMJyTJwOpGvigM= github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= +github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI= github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M= @@ -516,8 +515,8 @@ github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qK github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY= github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= -github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= -github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/gorilla/websocket v1.5.1 h1:gmztn0JnHVt9JZquRuzLw3g4wouNVzKL15iLr/zn/QY= +github.com/gorilla/websocket v1.5.1/go.mod h1:x3kM2JMyaluk02fnUJpQuwD2dCS5NDG2ZHL0uE0tcaY= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 h1:+ngKgrYPPJrOjhax5N+uePQ0Fh1Z7PheYoUI/0nzkPA= github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA= github.com/grpc-ecosystem/go-grpc-middleware v1.0.0/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs= @@ -766,6 +765,12 @@ github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7z github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= github.com/prometheus/tsdb v0.7.1/go.mod h1:qhTCs0VvXwvX/y3TZrWD7rabWM+ijKTux40TwIPHuXU= +github.com/rancher/norman v0.0.0-20240708202514-a0127673d1b9 h1:AlRMRs5mHJcdiK83KKJyFVeybPMZ7dOUzC0l3k9aUa8= +github.com/rancher/norman v0.0.0-20240708202514-a0127673d1b9/go.mod h1:dyjfXBsNiroPWOdUZe7diUOUSLf6HQ/r2kEpwH/8zas= +github.com/rancher/rancher/pkg/client v0.0.0-20240710123941-93e332156bbe h1:ZD+h5ylTFvzjMDb/DS0R+q3FuoGSB6IFgd8bqRIrnZY= +github.com/rancher/rancher/pkg/client v0.0.0-20240710123941-93e332156bbe/go.mod h1:A+DTKG05BZs1mOoCIB6UpiKo7j0dC6kSz3mgYju9Q20= +github.com/rancher/wrangler/v3 v3.0.0 h1:IHHCA+vrghJDPxjtLk4fmeSCFhNe9fFzLFj3m2B0YpA= +github.com/rancher/wrangler/v3 v3.0.0/go.mod h1:Dfckuuq7MJk2JWVBDywRlZXMxEyPxHy4XqGrPEzu5Eg= github.com/rogpeppe/fastuuid v0.0.0-20150106093220-6724a57986af/go.mod h1:XWv6SoW27p1b0cqNHllgS5HIMJraePCO15w5zCzIWYg= github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ= github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4= @@ -964,8 +969,8 @@ golang.org/x/crypto v0.0.0-20211115234514-b4de73f9ece8/go.mod h1:GvvjBRRGRdwPK5y golang.org/x/crypto v0.0.0-20220331220935-ae2d96664a29/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= @@ -1056,8 +1061,8 @@ golang.org/x/net v0.0.0-20220401154927-543a649e0bdd/go.mod h1:CfG3xpIq0wQ8r1q4Su golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= golang.org/x/net v0.1.0/go.mod h1:Cx3nUiGt4eDBEyega/BKRp+/AlGL8hYe7U9odMt2Cco= golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= @@ -1078,8 +1083,8 @@ golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc= -golang.org/x/oauth2 v0.15.0 h1:s8pnnxNVzjWyrvYdFUQq5llS1PX2zhPXmccZv99h7uQ= -golang.org/x/oauth2 v0.15.0/go.mod h1:q48ptWNTY5XWf+JNten23lcvHpLJ0ZSxF5ttTHKVCAM= +golang.org/x/oauth2 v0.22.0 h1:BzDx2FehcG7jJwgWLELCdmLuxk2i+x9UDpSiss2u0ZA= +golang.org/x/oauth2 v0.22.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -1092,8 +1097,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -1173,16 +1178,16 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220906165534-d0df966e6959/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.0.0-20220526004731-065cf7ba2467/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= @@ -1195,8 +1200,8 @@ 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.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/text v0.18.0 h1:XvMDiNzPAl0jr17s6W9lcaIhGUfUORdGCNsuLmPG224= +golang.org/x/text v0.18.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= 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= @@ -1573,8 +1578,8 @@ k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0 h1:jgGTlFYnhF1PM1Ax/lAlxUPE+KfCI k8s.io/utils v0.0.0-20240502163921-fe8a2dddb1d0/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0= kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk= kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80= -kmodules.xyz/client-go v0.30.13 h1:Tpvg7ZlSNlzjB0NZT9hUe9JrO7FN4PjUUF1hNUXSku0= -kmodules.xyz/client-go v0.30.13/go.mod h1:XL3PDQIXG4s3xNRL2SSxIvi8b2WyMGpn26dFnOBz0j4= +kmodules.xyz/client-go v0.30.17 h1:Ec22XIkAsN8Fwd001P0EzRTsfeibIFkzkZ6oYjLe5LQ= +kmodules.xyz/client-go v0.30.17/go.mod h1:CAu+JlA8RVGtj6LQHu0Q1w2mnFUajuti49c7T1AvGdM= kmodules.xyz/constants v0.0.0-20230304030334-d2d1f28732a5 h1:wybpLbdInCO2QripCkVXFce37ESUWKHdWXHHFLXJchg= kmodules.xyz/constants v0.0.0-20230304030334-d2d1f28732a5/go.mod h1:3C5i73Z7fcMVyu5TXtPuizGD8vWAbesXFVp1ESbIa1k= kmodules.xyz/csi-utils v0.29.1 h1:O0WDb/rsqj+FwT3C/KshB9hhBTh84YCP3fVb1UGMuHw= @@ -1585,8 +1590,8 @@ kmodules.xyz/go-containerregistry v0.0.12 h1:Tl32QGmSqRVm9PUEb/f3dgDeu9zW5fVzt3q kmodules.xyz/go-containerregistry v0.0.12/go.mod h1:KgeNg0hDsgeda+qc0NzWk0iVRdF0+ZIg/oRzGoYh78I= kmodules.xyz/objectstore-api v0.29.1 h1:uUsjf8KU0w4LYowSEOnl0AbHT3hsHIu1wNLHqGe1o6s= kmodules.xyz/objectstore-api v0.29.1/go.mod h1:xG+5awH1SXYKxwN/+k1FEQvzixd5tgNqEN/1LEiB2FE= -kmodules.xyz/offshoot-api v0.30.0 h1:dq9F93pu4Q8rL9oTcCk+vGGy8vpS7RNt0GSwx7Bvhec= -kmodules.xyz/offshoot-api v0.30.0/go.mod h1:o9VoA3ImZMDBp3lpLb8+kc2d/KBxioRwCpaKDfLIyDw= +kmodules.xyz/offshoot-api v0.30.1 h1:TrulAYO+oBsXe9sZZGTmNWIuI8qD2izMpgcTSPvgAmI= +kmodules.xyz/offshoot-api v0.30.1/go.mod h1:T3mpjR6fui0QzOcmQvIuANytW48fe9ytmy/1cgx6D4g= kmodules.xyz/openshift v0.29.0 h1:8PXjeQ+usUGkLnYUMSbZrMg+i1OIYBe9UWOeBf2FRzU= kmodules.xyz/openshift v0.29.0/go.mod h1:neEinR+BcvP4vKKCkh9HpRK9e3c+upSst9E7rskZVuQ= kmodules.xyz/prober v0.29.0 h1:Ex7m4F9rH7uWNNJlLgP63ROOM+nUATJkC2L5OQ7nwMg= @@ -1603,8 +1608,8 @@ 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/apiserver-network-proxy/konnectivity-client v0.29.0 h1:/U5vjBbQn3RChhv7P11uhYvCSm5G2GaIi5AIGBS6r4c= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.29.0/go.mod h1:z7+wmGM2dfIiLRfrC6jb5kV2Mq/sK1ZP303cxzkV5Y4= -sigs.k8s.io/cli-utils v0.34.0 h1:zCUitt54f0/MYj/ajVFnG6XSXMhpZ72O/3RewIchW8w= -sigs.k8s.io/cli-utils v0.34.0/go.mod h1:EXyMwPMu9OL+LRnj0JEMsGG/fRvbgFadcVlSnE8RhFs= +sigs.k8s.io/cli-utils v0.35.0 h1:dfSJaF1W0frW74PtjwiyoB4cwdRygbHnC7qe7HF0g/Y= +sigs.k8s.io/cli-utils v0.35.0/go.mod h1:ITitykCJxP1vaj1Cew/FZEaVJ2YsTN9Q71m02jebkoE= 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/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 h1:XX3Ajgzov2RKUdc5jW3t5jwY7Bo7dcRm+tFxT+NfgY0= @@ -1615,7 +1620,7 @@ sigs.k8s.io/structured-merge-diff/v4 v4.4.1 h1:150L+0vs/8DA78h1u02ooW1/fFq/Lwr+s 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= -stash.appscode.dev/apimachinery v0.35.0 h1:Z+2v4vqEUi7yJeg5yCg4Kh2YDq8HtgQf/9jYYst6uW0= -stash.appscode.dev/apimachinery v0.35.0/go.mod h1:YigRBV5veSSAzN23ibQcpkChvq8HPdiU0kq8uvw/5Fo= +stash.appscode.dev/apimachinery v0.36.0 h1:rGSrLKXv6/TvtyRS8+CjHVhza6O+na5OJ0OhauUvsLg= +stash.appscode.dev/apimachinery v0.36.0/go.mod h1:2iRF0Gd9r6spFyny6eA98I8SRV7SfsXeyIgzh7Clwo4= x-helm.dev/apimachinery v0.0.16 h1:Eb160xcdH9fMVHak5QSWYWxoaReytch+A7kk25QWjx0= x-helm.dev/apimachinery v0.0.16/go.mod h1:05brgFw5oWOX7OTXT090SQojqXjbttqWfqoJo+ejBU4= diff --git a/vendor/cloud.google.com/go/compute/internal/version.go b/vendor/cloud.google.com/go/compute/internal/version.go deleted file mode 100644 index 639553700..000000000 --- a/vendor/cloud.google.com/go/compute/internal/version.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package internal - -// Version is the current tagged release of the library. -const Version = "1.23.0" diff --git a/vendor/cloud.google.com/go/compute/metadata/CHANGES.md b/vendor/cloud.google.com/go/compute/metadata/CHANGES.md index 06b957349..967e06074 100644 --- a/vendor/cloud.google.com/go/compute/metadata/CHANGES.md +++ b/vendor/cloud.google.com/go/compute/metadata/CHANGES.md @@ -1,5 +1,12 @@ # Changes +## [0.3.0](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.2.3...compute/metadata/v0.3.0) (2024-04-15) + + +### Features + +* **compute/metadata:** Add context aware functions ([#9733](https://github.com/googleapis/google-cloud-go/issues/9733)) ([e4eb5b4](https://github.com/googleapis/google-cloud-go/commit/e4eb5b46ee2aec9d2fc18300bfd66015e25a0510)) + ## [0.2.3](https://github.com/googleapis/google-cloud-go/compare/compute/metadata/v0.2.2...compute/metadata/v0.2.3) (2022-12-15) diff --git a/vendor/cloud.google.com/go/compute/metadata/metadata.go b/vendor/cloud.google.com/go/compute/metadata/metadata.go index c17faa142..f67e3c7ee 100644 --- a/vendor/cloud.google.com/go/compute/metadata/metadata.go +++ b/vendor/cloud.google.com/go/compute/metadata/metadata.go @@ -23,7 +23,7 @@ import ( "context" "encoding/json" "fmt" - "io/ioutil" + "io" "net" "net/http" "net/url" @@ -95,9 +95,9 @@ func (c *cachedValue) get(cl *Client) (v string, err error) { return c.v, nil } if c.trim { - v, err = cl.getTrimmed(c.k) + v, err = cl.getTrimmed(context.Background(), c.k) } else { - v, err = cl.Get(c.k) + v, err = cl.GetWithContext(context.Background(), c.k) } if err == nil { c.v = v @@ -197,18 +197,32 @@ func systemInfoSuggestsGCE() bool { // We don't have any non-Linux clues available, at least yet. return false } - slurp, _ := ioutil.ReadFile("/sys/class/dmi/id/product_name") + slurp, _ := os.ReadFile("/sys/class/dmi/id/product_name") name := strings.TrimSpace(string(slurp)) return name == "Google" || name == "Google Compute Engine" } -// Subscribe calls Client.Subscribe on the default client. +// Subscribe calls Client.SubscribeWithContext on the default client. func Subscribe(suffix string, fn func(v string, ok bool) error) error { - return defaultClient.Subscribe(suffix, fn) + return defaultClient.SubscribeWithContext(context.Background(), suffix, func(ctx context.Context, v string, ok bool) error { return fn(v, ok) }) } -// Get calls Client.Get on the default client. -func Get(suffix string) (string, error) { return defaultClient.Get(suffix) } +// SubscribeWithContext calls Client.SubscribeWithContext on the default client. +func SubscribeWithContext(ctx context.Context, suffix string, fn func(ctx context.Context, v string, ok bool) error) error { + return defaultClient.SubscribeWithContext(ctx, suffix, fn) +} + +// Get calls Client.GetWithContext on the default client. +// +// Deprecated: Please use the context aware variant [GetWithContext]. +func Get(suffix string) (string, error) { + return defaultClient.GetWithContext(context.Background(), suffix) +} + +// GetWithContext calls Client.GetWithContext on the default client. +func GetWithContext(ctx context.Context, suffix string) (string, error) { + return defaultClient.GetWithContext(ctx, suffix) +} // ProjectID returns the current instance's project ID string. func ProjectID() (string, error) { return defaultClient.ProjectID() } @@ -288,8 +302,7 @@ func NewClient(c *http.Client) *Client { // getETag returns a value from the metadata service as well as the associated ETag. // This func is otherwise equivalent to Get. -func (c *Client) getETag(suffix string) (value, etag string, err error) { - ctx := context.TODO() +func (c *Client) getETag(ctx context.Context, suffix string) (value, etag string, err error) { // Using a fixed IP makes it very difficult to spoof the metadata service in // a container, which is an important use-case for local testing of cloud // deployments. To enable spoofing of the metadata service, the environment @@ -306,7 +319,7 @@ func (c *Client) getETag(suffix string) (value, etag string, err error) { } suffix = strings.TrimLeft(suffix, "/") u := "http://" + host + "/computeMetadata/v1/" + suffix - req, err := http.NewRequest("GET", u, nil) + req, err := http.NewRequestWithContext(ctx, "GET", u, nil) if err != nil { return "", "", err } @@ -336,7 +349,7 @@ func (c *Client) getETag(suffix string) (value, etag string, err error) { if res.StatusCode == http.StatusNotFound { return "", "", NotDefinedError(suffix) } - all, err := ioutil.ReadAll(res.Body) + all, err := io.ReadAll(res.Body) if err != nil { return "", "", err } @@ -354,19 +367,33 @@ func (c *Client) getETag(suffix string) (value, etag string, err error) { // // If the requested metadata is not defined, the returned error will // be of type NotDefinedError. +// +// Deprecated: Please use the context aware variant [Client.GetWithContext]. func (c *Client) Get(suffix string) (string, error) { - val, _, err := c.getETag(suffix) + return c.GetWithContext(context.Background(), suffix) +} + +// GetWithContext returns a value from the metadata service. +// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/". +// +// If the GCE_METADATA_HOST environment variable is not defined, a default of +// 169.254.169.254 will be used instead. +// +// If the requested metadata is not defined, the returned error will +// be of type NotDefinedError. +func (c *Client) GetWithContext(ctx context.Context, suffix string) (string, error) { + val, _, err := c.getETag(ctx, suffix) return val, err } -func (c *Client) getTrimmed(suffix string) (s string, err error) { - s, err = c.Get(suffix) +func (c *Client) getTrimmed(ctx context.Context, suffix string) (s string, err error) { + s, err = c.GetWithContext(ctx, suffix) s = strings.TrimSpace(s) return } func (c *Client) lines(suffix string) ([]string, error) { - j, err := c.Get(suffix) + j, err := c.GetWithContext(context.Background(), suffix) if err != nil { return nil, err } @@ -388,7 +415,7 @@ func (c *Client) InstanceID() (string, error) { return instID.get(c) } // InternalIP returns the instance's primary internal IP address. func (c *Client) InternalIP() (string, error) { - return c.getTrimmed("instance/network-interfaces/0/ip") + return c.getTrimmed(context.Background(), "instance/network-interfaces/0/ip") } // Email returns the email address associated with the service account. @@ -398,25 +425,25 @@ func (c *Client) Email(serviceAccount string) (string, error) { if serviceAccount == "" { serviceAccount = "default" } - return c.getTrimmed("instance/service-accounts/" + serviceAccount + "/email") + return c.getTrimmed(context.Background(), "instance/service-accounts/"+serviceAccount+"/email") } // ExternalIP returns the instance's primary external (public) IP address. func (c *Client) ExternalIP() (string, error) { - return c.getTrimmed("instance/network-interfaces/0/access-configs/0/external-ip") + return c.getTrimmed(context.Background(), "instance/network-interfaces/0/access-configs/0/external-ip") } // Hostname returns the instance's hostname. This will be of the form // ".c..internal". func (c *Client) Hostname() (string, error) { - return c.getTrimmed("instance/hostname") + return c.getTrimmed(context.Background(), "instance/hostname") } // InstanceTags returns the list of user-defined instance tags, // assigned when initially creating a GCE instance. func (c *Client) InstanceTags() ([]string, error) { var s []string - j, err := c.Get("instance/tags") + j, err := c.GetWithContext(context.Background(), "instance/tags") if err != nil { return nil, err } @@ -428,12 +455,12 @@ func (c *Client) InstanceTags() ([]string, error) { // InstanceName returns the current VM's instance ID string. func (c *Client) InstanceName() (string, error) { - return c.getTrimmed("instance/name") + return c.getTrimmed(context.Background(), "instance/name") } // Zone returns the current VM's zone, such as "us-central1-b". func (c *Client) Zone() (string, error) { - zone, err := c.getTrimmed("instance/zone") + zone, err := c.getTrimmed(context.Background(), "instance/zone") // zone is of the form "projects//zones/". if err != nil { return "", err @@ -460,7 +487,7 @@ func (c *Client) ProjectAttributes() ([]string, error) { return c.lines("project // InstanceAttributeValue may return ("", nil) if the attribute was // defined to be the empty string. func (c *Client) InstanceAttributeValue(attr string) (string, error) { - return c.Get("instance/attributes/" + attr) + return c.GetWithContext(context.Background(), "instance/attributes/"+attr) } // ProjectAttributeValue returns the value of the provided @@ -472,7 +499,7 @@ func (c *Client) InstanceAttributeValue(attr string) (string, error) { // ProjectAttributeValue may return ("", nil) if the attribute was // defined to be the empty string. func (c *Client) ProjectAttributeValue(attr string) (string, error) { - return c.Get("project/attributes/" + attr) + return c.GetWithContext(context.Background(), "project/attributes/"+attr) } // Scopes returns the service account scopes for the given account. @@ -489,21 +516,30 @@ func (c *Client) Scopes(serviceAccount string) ([]string, error) { // The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/". // The suffix may contain query parameters. // -// Subscribe calls fn with the latest metadata value indicated by the provided -// suffix. If the metadata value is deleted, fn is called with the empty string -// and ok false. Subscribe blocks until fn returns a non-nil error or the value -// is deleted. Subscribe returns the error value returned from the last call to -// fn, which may be nil when ok == false. +// Deprecated: Please use the context aware variant [Client.SubscribeWithContext]. func (c *Client) Subscribe(suffix string, fn func(v string, ok bool) error) error { + return c.SubscribeWithContext(context.Background(), suffix, func(ctx context.Context, v string, ok bool) error { return fn(v, ok) }) +} + +// SubscribeWithContext subscribes to a value from the metadata service. +// The suffix is appended to "http://${GCE_METADATA_HOST}/computeMetadata/v1/". +// The suffix may contain query parameters. +// +// SubscribeWithContext calls fn with the latest metadata value indicated by the +// provided suffix. If the metadata value is deleted, fn is called with the +// empty string and ok false. Subscribe blocks until fn returns a non-nil error +// or the value is deleted. Subscribe returns the error value returned from the +// last call to fn, which may be nil when ok == false. +func (c *Client) SubscribeWithContext(ctx context.Context, suffix string, fn func(ctx context.Context, v string, ok bool) error) error { const failedSubscribeSleep = time.Second * 5 // First check to see if the metadata value exists at all. - val, lastETag, err := c.getETag(suffix) + val, lastETag, err := c.getETag(ctx, suffix) if err != nil { return err } - if err := fn(val, true); err != nil { + if err := fn(ctx, val, true); err != nil { return err } @@ -514,7 +550,7 @@ func (c *Client) Subscribe(suffix string, fn func(v string, ok bool) error) erro suffix += "?wait_for_change=true&last_etag=" } for { - val, etag, err := c.getETag(suffix + url.QueryEscape(lastETag)) + val, etag, err := c.getETag(ctx, suffix+url.QueryEscape(lastETag)) if err != nil { if _, deleted := err.(NotDefinedError); !deleted { time.Sleep(failedSubscribeSleep) @@ -524,7 +560,7 @@ func (c *Client) Subscribe(suffix string, fn func(v string, ok bool) error) erro } lastETag = etag - if err := fn(val, ok); err != nil || !ok { + if err := fn(ctx, val, ok); err != nil || !ok { return err } } diff --git a/vendor/cloud.google.com/go/compute/metadata/retry.go b/vendor/cloud.google.com/go/compute/metadata/retry.go index 0f18f3cda..3d4bc75dd 100644 --- a/vendor/cloud.google.com/go/compute/metadata/retry.go +++ b/vendor/cloud.google.com/go/compute/metadata/retry.go @@ -27,7 +27,7 @@ const ( ) var ( - syscallRetryable = func(err error) bool { return false } + syscallRetryable = func(error) bool { return false } ) // defaultBackoff is basically equivalent to gax.Backoff without the need for diff --git a/vendor/cloud.google.com/go/compute/metadata/tidyfix.go b/vendor/cloud.google.com/go/compute/metadata/tidyfix.go deleted file mode 100644 index 4cef48500..000000000 --- a/vendor/cloud.google.com/go/compute/metadata/tidyfix.go +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright 2022 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -// This file, and the {{.RootMod}} import, won't actually become part of -// the resultant binary. -//go:build modhack -// +build modhack - -package metadata - -// Necessary for safely adding multi-module repo. See: https://github.com/golang/go/wiki/Modules#is-it-possible-to-add-a-module-to-a-multi-module-repository -import _ "cloud.google.com/go/compute/internal" diff --git a/vendor/github.com/cespare/xxhash/v2/README.md b/vendor/github.com/cespare/xxhash/v2/README.md index 8bf0e5b78..33c88305c 100644 --- a/vendor/github.com/cespare/xxhash/v2/README.md +++ b/vendor/github.com/cespare/xxhash/v2/README.md @@ -70,3 +70,5 @@ benchstat <(go test -benchtime 500ms -count 15 -bench 'Sum64$') - [VictoriaMetrics](https://github.com/VictoriaMetrics/VictoriaMetrics) - [FreeCache](https://github.com/coocood/freecache) - [FastCache](https://github.com/VictoriaMetrics/fastcache) +- [Ristretto](https://github.com/dgraph-io/ristretto) +- [Badger](https://github.com/dgraph-io/badger) diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash.go b/vendor/github.com/cespare/xxhash/v2/xxhash.go index a9e0d45c9..78bddf1ce 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash.go @@ -19,10 +19,13 @@ const ( // Store the primes in an array as well. // // The consts are used when possible in Go code to avoid MOVs but we need a -// contiguous array of the assembly code. +// contiguous array for the assembly code. var primes = [...]uint64{prime1, prime2, prime3, prime4, prime5} // Digest implements hash.Hash64. +// +// Note that a zero-valued Digest is not ready to receive writes. +// Call Reset or create a Digest using New before calling other methods. type Digest struct { v1 uint64 v2 uint64 @@ -33,19 +36,31 @@ type Digest struct { n int // how much of mem is used } -// New creates a new Digest that computes the 64-bit xxHash algorithm. +// New creates a new Digest with a zero seed. func New() *Digest { + return NewWithSeed(0) +} + +// NewWithSeed creates a new Digest with the given seed. +func NewWithSeed(seed uint64) *Digest { var d Digest - d.Reset() + d.ResetWithSeed(seed) return &d } // Reset clears the Digest's state so that it can be reused. +// It uses a seed value of zero. func (d *Digest) Reset() { - d.v1 = primes[0] + prime2 - d.v2 = prime2 - d.v3 = 0 - d.v4 = -primes[0] + d.ResetWithSeed(0) +} + +// ResetWithSeed clears the Digest's state so that it can be reused. +// It uses the given seed to initialize the state. +func (d *Digest) ResetWithSeed(seed uint64) { + d.v1 = seed + prime1 + prime2 + d.v2 = seed + prime2 + d.v3 = seed + d.v4 = seed - prime1 d.total = 0 d.n = 0 } diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_asm.go b/vendor/github.com/cespare/xxhash/v2/xxhash_asm.go index 9216e0a40..78f95f256 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_asm.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_asm.go @@ -6,7 +6,7 @@ package xxhash -// Sum64 computes the 64-bit xxHash digest of b. +// Sum64 computes the 64-bit xxHash digest of b with a zero seed. // //go:noescape func Sum64(b []byte) uint64 diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_other.go b/vendor/github.com/cespare/xxhash/v2/xxhash_other.go index 26df13bba..118e49e81 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_other.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_other.go @@ -3,7 +3,7 @@ package xxhash -// Sum64 computes the 64-bit xxHash digest of b. +// Sum64 computes the 64-bit xxHash digest of b with a zero seed. func Sum64(b []byte) uint64 { // A simpler version would be // d := New() diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go b/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go index e86f1b5fd..05f5e7dfe 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_safe.go @@ -5,7 +5,7 @@ package xxhash -// Sum64String computes the 64-bit xxHash digest of s. +// Sum64String computes the 64-bit xxHash digest of s with a zero seed. func Sum64String(s string) uint64 { return Sum64([]byte(s)) } diff --git a/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go b/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go index 1c1638fd8..cf9d42aed 100644 --- a/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go +++ b/vendor/github.com/cespare/xxhash/v2/xxhash_unsafe.go @@ -33,7 +33,7 @@ import ( // // See https://github.com/golang/go/issues/42739 for discussion. -// Sum64String computes the 64-bit xxHash digest of s. +// Sum64String computes the 64-bit xxHash digest of s with a zero seed. // It may be faster than Sum64([]byte(s)) by avoiding a copy. func Sum64String(s string) uint64 { b := *(*[]byte)(unsafe.Pointer(&sliceHeader{s, len(s)})) diff --git a/vendor/github.com/ghodss/yaml/.gitignore b/vendor/github.com/ghodss/yaml/.gitignore new file mode 100644 index 000000000..e256a31e0 --- /dev/null +++ b/vendor/github.com/ghodss/yaml/.gitignore @@ -0,0 +1,20 @@ +# OSX leaves these everywhere on SMB shares +._* + +# Eclipse files +.classpath +.project +.settings/** + +# Emacs save files +*~ + +# Vim-related files +[._]*.s[a-w][a-z] +[._]s[a-w][a-z] +*.un~ +Session.vim +.netrwhist + +# Go test binaries +*.test diff --git a/vendor/github.com/ghodss/yaml/.travis.yml b/vendor/github.com/ghodss/yaml/.travis.yml new file mode 100644 index 000000000..0e9d6edc0 --- /dev/null +++ b/vendor/github.com/ghodss/yaml/.travis.yml @@ -0,0 +1,7 @@ +language: go +go: + - 1.3 + - 1.4 +script: + - go test + - go build diff --git a/vendor/github.com/ghodss/yaml/LICENSE b/vendor/github.com/ghodss/yaml/LICENSE new file mode 100644 index 000000000..7805d36de --- /dev/null +++ b/vendor/github.com/ghodss/yaml/LICENSE @@ -0,0 +1,50 @@ +The MIT License (MIT) + +Copyright (c) 2014 Sam Ghods + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. + + +Copyright (c) 2012 The Go Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/ghodss/yaml/README.md b/vendor/github.com/ghodss/yaml/README.md new file mode 100644 index 000000000..0200f75b4 --- /dev/null +++ b/vendor/github.com/ghodss/yaml/README.md @@ -0,0 +1,121 @@ +# YAML marshaling and unmarshaling support for Go + +[![Build Status](https://travis-ci.org/ghodss/yaml.svg)](https://travis-ci.org/ghodss/yaml) + +## Introduction + +A wrapper around [go-yaml](https://github.com/go-yaml/yaml) designed to enable a better way of handling YAML when marshaling to and from structs. + +In short, this library first converts YAML to JSON using go-yaml and then uses `json.Marshal` and `json.Unmarshal` to convert to or from the struct. This means that it effectively reuses the JSON struct tags as well as the custom JSON methods `MarshalJSON` and `UnmarshalJSON` unlike go-yaml. For a detailed overview of the rationale behind this method, [see this blog post](http://ghodss.com/2014/the-right-way-to-handle-yaml-in-golang/). + +## Compatibility + +This package uses [go-yaml](https://github.com/go-yaml/yaml) and therefore supports [everything go-yaml supports](https://github.com/go-yaml/yaml#compatibility). + +## Caveats + +**Caveat #1:** When using `yaml.Marshal` and `yaml.Unmarshal`, binary data should NOT be preceded with the `!!binary` YAML tag. If you do, go-yaml will convert the binary data from base64 to native binary data, which is not compatible with JSON. You can still use binary in your YAML files though - just store them without the `!!binary` tag and decode the base64 in your code (e.g. in the custom JSON methods `MarshalJSON` and `UnmarshalJSON`). This also has the benefit that your YAML and your JSON binary data will be decoded exactly the same way. As an example: + +``` +BAD: + exampleKey: !!binary gIGC + +GOOD: + exampleKey: gIGC +... and decode the base64 data in your code. +``` + +**Caveat #2:** When using `YAMLToJSON` directly, maps with keys that are maps will result in an error since this is not supported by JSON. This error will occur in `Unmarshal` as well since you can't unmarshal map keys anyways since struct fields can't be keys. + +## Installation and usage + +To install, run: + +``` +$ go get github.com/ghodss/yaml +``` + +And import using: + +``` +import "github.com/ghodss/yaml" +``` + +Usage is very similar to the JSON library: + +```go +package main + +import ( + "fmt" + + "github.com/ghodss/yaml" +) + +type Person struct { + Name string `json:"name"` // Affects YAML field names too. + Age int `json:"age"` +} + +func main() { + // Marshal a Person struct to YAML. + p := Person{"John", 30} + y, err := yaml.Marshal(p) + if err != nil { + fmt.Printf("err: %v\n", err) + return + } + fmt.Println(string(y)) + /* Output: + age: 30 + name: John + */ + + // Unmarshal the YAML back into a Person struct. + var p2 Person + err = yaml.Unmarshal(y, &p2) + if err != nil { + fmt.Printf("err: %v\n", err) + return + } + fmt.Println(p2) + /* Output: + {John 30} + */ +} +``` + +`yaml.YAMLToJSON` and `yaml.JSONToYAML` methods are also available: + +```go +package main + +import ( + "fmt" + + "github.com/ghodss/yaml" +) + +func main() { + j := []byte(`{"name": "John", "age": 30}`) + y, err := yaml.JSONToYAML(j) + if err != nil { + fmt.Printf("err: %v\n", err) + return + } + fmt.Println(string(y)) + /* Output: + name: John + age: 30 + */ + j2, err := yaml.YAMLToJSON(y) + if err != nil { + fmt.Printf("err: %v\n", err) + return + } + fmt.Println(string(j2)) + /* Output: + {"age":30,"name":"John"} + */ +} +``` diff --git a/vendor/github.com/ghodss/yaml/fields.go b/vendor/github.com/ghodss/yaml/fields.go new file mode 100644 index 000000000..586007402 --- /dev/null +++ b/vendor/github.com/ghodss/yaml/fields.go @@ -0,0 +1,501 @@ +// Copyright 2013 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. +package yaml + +import ( + "bytes" + "encoding" + "encoding/json" + "reflect" + "sort" + "strings" + "sync" + "unicode" + "unicode/utf8" +) + +// indirect walks down v allocating pointers as needed, +// until it gets to a non-pointer. +// if it encounters an Unmarshaler, indirect stops and returns that. +// if decodingNull is true, indirect stops at the last pointer so it can be set to nil. +func indirect(v reflect.Value, decodingNull bool) (json.Unmarshaler, encoding.TextUnmarshaler, reflect.Value) { + // If v is a named type and is addressable, + // start with its address, so that if the type has pointer methods, + // we find them. + if v.Kind() != reflect.Ptr && v.Type().Name() != "" && v.CanAddr() { + v = v.Addr() + } + for { + // Load value from interface, but only if the result will be + // usefully addressable. + if v.Kind() == reflect.Interface && !v.IsNil() { + e := v.Elem() + if e.Kind() == reflect.Ptr && !e.IsNil() && (!decodingNull || e.Elem().Kind() == reflect.Ptr) { + v = e + continue + } + } + + if v.Kind() != reflect.Ptr { + break + } + + if v.Elem().Kind() != reflect.Ptr && decodingNull && v.CanSet() { + break + } + if v.IsNil() { + if v.CanSet() { + v.Set(reflect.New(v.Type().Elem())) + } else { + v = reflect.New(v.Type().Elem()) + } + } + if v.Type().NumMethod() > 0 { + if u, ok := v.Interface().(json.Unmarshaler); ok { + return u, nil, reflect.Value{} + } + if u, ok := v.Interface().(encoding.TextUnmarshaler); ok { + return nil, u, reflect.Value{} + } + } + v = v.Elem() + } + return nil, nil, v +} + +// A field represents a single field found in a struct. +type field struct { + name string + nameBytes []byte // []byte(name) + equalFold func(s, t []byte) bool // bytes.EqualFold or equivalent + + tag bool + index []int + typ reflect.Type + omitEmpty bool + quoted bool +} + +func fillField(f field) field { + f.nameBytes = []byte(f.name) + f.equalFold = foldFunc(f.nameBytes) + return f +} + +// byName sorts field by name, breaking ties with depth, +// then breaking ties with "name came from json tag", then +// breaking ties with index sequence. +type byName []field + +func (x byName) Len() int { return len(x) } + +func (x byName) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byName) Less(i, j int) bool { + if x[i].name != x[j].name { + return x[i].name < x[j].name + } + if len(x[i].index) != len(x[j].index) { + return len(x[i].index) < len(x[j].index) + } + if x[i].tag != x[j].tag { + return x[i].tag + } + return byIndex(x).Less(i, j) +} + +// byIndex sorts field by index sequence. +type byIndex []field + +func (x byIndex) Len() int { return len(x) } + +func (x byIndex) Swap(i, j int) { x[i], x[j] = x[j], x[i] } + +func (x byIndex) Less(i, j int) bool { + for k, xik := range x[i].index { + if k >= len(x[j].index) { + return false + } + if xik != x[j].index[k] { + return xik < x[j].index[k] + } + } + return len(x[i].index) < len(x[j].index) +} + +// typeFields returns a list of fields that JSON should recognize for the given type. +// The algorithm is breadth-first search over the set of structs to include - the top struct +// and then any reachable anonymous structs. +func typeFields(t reflect.Type) []field { + // Anonymous fields to explore at the current level and the next. + current := []field{} + next := []field{{typ: t}} + + // Count of queued names for current level and the next. + count := map[reflect.Type]int{} + nextCount := map[reflect.Type]int{} + + // Types already visited at an earlier level. + visited := map[reflect.Type]bool{} + + // Fields found. + var fields []field + + for len(next) > 0 { + current, next = next, current[:0] + count, nextCount = nextCount, map[reflect.Type]int{} + + for _, f := range current { + if visited[f.typ] { + continue + } + visited[f.typ] = true + + // Scan f.typ for fields to include. + for i := 0; i < f.typ.NumField(); i++ { + sf := f.typ.Field(i) + if sf.PkgPath != "" { // unexported + continue + } + tag := sf.Tag.Get("json") + if tag == "-" { + continue + } + name, opts := parseTag(tag) + if !isValidTag(name) { + name = "" + } + index := make([]int, len(f.index)+1) + copy(index, f.index) + index[len(f.index)] = i + + ft := sf.Type + if ft.Name() == "" && ft.Kind() == reflect.Ptr { + // Follow pointer. + ft = ft.Elem() + } + + // Record found field and index sequence. + if name != "" || !sf.Anonymous || ft.Kind() != reflect.Struct { + tagged := name != "" + if name == "" { + name = sf.Name + } + fields = append(fields, fillField(field{ + name: name, + tag: tagged, + index: index, + typ: ft, + omitEmpty: opts.Contains("omitempty"), + quoted: opts.Contains("string"), + })) + if count[f.typ] > 1 { + // If there were multiple instances, add a second, + // so that the annihilation code will see a duplicate. + // It only cares about the distinction between 1 or 2, + // so don't bother generating any more copies. + fields = append(fields, fields[len(fields)-1]) + } + continue + } + + // Record new anonymous struct to explore in next round. + nextCount[ft]++ + if nextCount[ft] == 1 { + next = append(next, fillField(field{name: ft.Name(), index: index, typ: ft})) + } + } + } + } + + sort.Sort(byName(fields)) + + // Delete all fields that are hidden by the Go rules for embedded fields, + // except that fields with JSON tags are promoted. + + // The fields are sorted in primary order of name, secondary order + // of field index length. Loop over names; for each name, delete + // hidden fields by choosing the one dominant field that survives. + out := fields[:0] + for advance, i := 0, 0; i < len(fields); i += advance { + // One iteration per name. + // Find the sequence of fields with the name of this first field. + fi := fields[i] + name := fi.name + for advance = 1; i+advance < len(fields); advance++ { + fj := fields[i+advance] + if fj.name != name { + break + } + } + if advance == 1 { // Only one field with this name + out = append(out, fi) + continue + } + dominant, ok := dominantField(fields[i : i+advance]) + if ok { + out = append(out, dominant) + } + } + + fields = out + sort.Sort(byIndex(fields)) + + return fields +} + +// dominantField looks through the fields, all of which are known to +// have the same name, to find the single field that dominates the +// others using Go's embedding rules, modified by the presence of +// JSON tags. If there are multiple top-level fields, the boolean +// will be false: This condition is an error in Go and we skip all +// the fields. +func dominantField(fields []field) (field, bool) { + // The fields are sorted in increasing index-length order. The winner + // must therefore be one with the shortest index length. Drop all + // longer entries, which is easy: just truncate the slice. + length := len(fields[0].index) + tagged := -1 // Index of first tagged field. + for i, f := range fields { + if len(f.index) > length { + fields = fields[:i] + break + } + if f.tag { + if tagged >= 0 { + // Multiple tagged fields at the same level: conflict. + // Return no field. + return field{}, false + } + tagged = i + } + } + if tagged >= 0 { + return fields[tagged], true + } + // All remaining fields have the same length. If there's more than one, + // we have a conflict (two fields named "X" at the same level) and we + // return no field. + if len(fields) > 1 { + return field{}, false + } + return fields[0], true +} + +var fieldCache struct { + sync.RWMutex + m map[reflect.Type][]field +} + +// cachedTypeFields is like typeFields but uses a cache to avoid repeated work. +func cachedTypeFields(t reflect.Type) []field { + fieldCache.RLock() + f := fieldCache.m[t] + fieldCache.RUnlock() + if f != nil { + return f + } + + // Compute fields without lock. + // Might duplicate effort but won't hold other computations back. + f = typeFields(t) + if f == nil { + f = []field{} + } + + fieldCache.Lock() + if fieldCache.m == nil { + fieldCache.m = map[reflect.Type][]field{} + } + fieldCache.m[t] = f + fieldCache.Unlock() + return f +} + +func isValidTag(s string) bool { + if s == "" { + return false + } + for _, c := range s { + switch { + case strings.ContainsRune("!#$%&()*+-./:<=>?@[]^_{|}~ ", c): + // Backslash and quote chars are reserved, but + // otherwise any punctuation chars are allowed + // in a tag name. + default: + if !unicode.IsLetter(c) && !unicode.IsDigit(c) { + return false + } + } + } + return true +} + +const ( + caseMask = ^byte(0x20) // Mask to ignore case in ASCII. + kelvin = '\u212a' + smallLongEss = '\u017f' +) + +// foldFunc returns one of four different case folding equivalence +// functions, from most general (and slow) to fastest: +// +// 1) bytes.EqualFold, if the key s contains any non-ASCII UTF-8 +// 2) equalFoldRight, if s contains special folding ASCII ('k', 'K', 's', 'S') +// 3) asciiEqualFold, no special, but includes non-letters (including _) +// 4) simpleLetterEqualFold, no specials, no non-letters. +// +// The letters S and K are special because they map to 3 runes, not just 2: +// * S maps to s and to U+017F 'ſ' Latin small letter long s +// * k maps to K and to U+212A 'K' Kelvin sign +// See http://play.golang.org/p/tTxjOc0OGo +// +// The returned function is specialized for matching against s and +// should only be given s. It's not curried for performance reasons. +func foldFunc(s []byte) func(s, t []byte) bool { + nonLetter := false + special := false // special letter + for _, b := range s { + if b >= utf8.RuneSelf { + return bytes.EqualFold + } + upper := b & caseMask + if upper < 'A' || upper > 'Z' { + nonLetter = true + } else if upper == 'K' || upper == 'S' { + // See above for why these letters are special. + special = true + } + } + if special { + return equalFoldRight + } + if nonLetter { + return asciiEqualFold + } + return simpleLetterEqualFold +} + +// equalFoldRight is a specialization of bytes.EqualFold when s is +// known to be all ASCII (including punctuation), but contains an 's', +// 'S', 'k', or 'K', requiring a Unicode fold on the bytes in t. +// See comments on foldFunc. +func equalFoldRight(s, t []byte) bool { + for _, sb := range s { + if len(t) == 0 { + return false + } + tb := t[0] + if tb < utf8.RuneSelf { + if sb != tb { + sbUpper := sb & caseMask + if 'A' <= sbUpper && sbUpper <= 'Z' { + if sbUpper != tb&caseMask { + return false + } + } else { + return false + } + } + t = t[1:] + continue + } + // sb is ASCII and t is not. t must be either kelvin + // sign or long s; sb must be s, S, k, or K. + tr, size := utf8.DecodeRune(t) + switch sb { + case 's', 'S': + if tr != smallLongEss { + return false + } + case 'k', 'K': + if tr != kelvin { + return false + } + default: + return false + } + t = t[size:] + + } + if len(t) > 0 { + return false + } + return true +} + +// asciiEqualFold is a specialization of bytes.EqualFold for use when +// s is all ASCII (but may contain non-letters) and contains no +// special-folding letters. +// See comments on foldFunc. +func asciiEqualFold(s, t []byte) bool { + if len(s) != len(t) { + return false + } + for i, sb := range s { + tb := t[i] + if sb == tb { + continue + } + if ('a' <= sb && sb <= 'z') || ('A' <= sb && sb <= 'Z') { + if sb&caseMask != tb&caseMask { + return false + } + } else { + return false + } + } + return true +} + +// simpleLetterEqualFold is a specialization of bytes.EqualFold for +// use when s is all ASCII letters (no underscores, etc) and also +// doesn't contain 'k', 'K', 's', or 'S'. +// See comments on foldFunc. +func simpleLetterEqualFold(s, t []byte) bool { + if len(s) != len(t) { + return false + } + for i, b := range s { + if b&caseMask != t[i]&caseMask { + return false + } + } + return true +} + +// tagOptions is the string following a comma in a struct field's "json" +// tag, or the empty string. It does not include the leading comma. +type tagOptions string + +// parseTag splits a struct field's json tag into its name and +// comma-separated options. +func parseTag(tag string) (string, tagOptions) { + if idx := strings.Index(tag, ","); idx != -1 { + return tag[:idx], tagOptions(tag[idx+1:]) + } + return tag, tagOptions("") +} + +// Contains reports whether a comma-separated list of options +// contains a particular substr flag. substr must be surrounded by a +// string boundary or commas. +func (o tagOptions) Contains(optionName string) bool { + if len(o) == 0 { + return false + } + s := string(o) + for s != "" { + var next string + i := strings.Index(s, ",") + if i >= 0 { + s, next = s[:i], s[i+1:] + } + if s == optionName { + return true + } + s = next + } + return false +} diff --git a/vendor/github.com/ghodss/yaml/yaml.go b/vendor/github.com/ghodss/yaml/yaml.go new file mode 100644 index 000000000..4fb4054a8 --- /dev/null +++ b/vendor/github.com/ghodss/yaml/yaml.go @@ -0,0 +1,277 @@ +package yaml + +import ( + "bytes" + "encoding/json" + "fmt" + "reflect" + "strconv" + + "gopkg.in/yaml.v2" +) + +// Marshals the object into JSON then converts JSON to YAML and returns the +// YAML. +func Marshal(o interface{}) ([]byte, error) { + j, err := json.Marshal(o) + if err != nil { + return nil, fmt.Errorf("error marshaling into JSON: %v", err) + } + + y, err := JSONToYAML(j) + if err != nil { + return nil, fmt.Errorf("error converting JSON to YAML: %v", err) + } + + return y, nil +} + +// Converts YAML to JSON then uses JSON to unmarshal into an object. +func Unmarshal(y []byte, o interface{}) error { + vo := reflect.ValueOf(o) + j, err := yamlToJSON(y, &vo) + if err != nil { + return fmt.Errorf("error converting YAML to JSON: %v", err) + } + + err = json.Unmarshal(j, o) + if err != nil { + return fmt.Errorf("error unmarshaling JSON: %v", err) + } + + return nil +} + +// Convert JSON to YAML. +func JSONToYAML(j []byte) ([]byte, error) { + // Convert the JSON to an object. + var jsonObj interface{} + // We are using yaml.Unmarshal here (instead of json.Unmarshal) because the + // Go JSON library doesn't try to pick the right number type (int, float, + // etc.) when unmarshalling to interface{}, it just picks float64 + // universally. go-yaml does go through the effort of picking the right + // number type, so we can preserve number type throughout this process. + err := yaml.Unmarshal(j, &jsonObj) + if err != nil { + return nil, err + } + + // Marshal this object into YAML. + return yaml.Marshal(jsonObj) +} + +// Convert YAML to JSON. Since JSON is a subset of YAML, passing JSON through +// this method should be a no-op. +// +// Things YAML can do that are not supported by JSON: +// * In YAML you can have binary and null keys in your maps. These are invalid +// in JSON. (int and float keys are converted to strings.) +// * Binary data in YAML with the !!binary tag is not supported. If you want to +// use binary data with this library, encode the data as base64 as usual but do +// not use the !!binary tag in your YAML. This will ensure the original base64 +// encoded data makes it all the way through to the JSON. +func YAMLToJSON(y []byte) ([]byte, error) { + return yamlToJSON(y, nil) +} + +func yamlToJSON(y []byte, jsonTarget *reflect.Value) ([]byte, error) { + // Convert the YAML to an object. + var yamlObj interface{} + err := yaml.Unmarshal(y, &yamlObj) + if err != nil { + return nil, err + } + + // YAML objects are not completely compatible with JSON objects (e.g. you + // can have non-string keys in YAML). So, convert the YAML-compatible object + // to a JSON-compatible object, failing with an error if irrecoverable + // incompatibilties happen along the way. + jsonObj, err := convertToJSONableObject(yamlObj, jsonTarget) + if err != nil { + return nil, err + } + + // Convert this object to JSON and return the data. + return json.Marshal(jsonObj) +} + +func convertToJSONableObject(yamlObj interface{}, jsonTarget *reflect.Value) (interface{}, error) { + var err error + + // Resolve jsonTarget to a concrete value (i.e. not a pointer or an + // interface). We pass decodingNull as false because we're not actually + // decoding into the value, we're just checking if the ultimate target is a + // string. + if jsonTarget != nil { + ju, tu, pv := indirect(*jsonTarget, false) + // We have a JSON or Text Umarshaler at this level, so we can't be trying + // to decode into a string. + if ju != nil || tu != nil { + jsonTarget = nil + } else { + jsonTarget = &pv + } + } + + // If yamlObj is a number or a boolean, check if jsonTarget is a string - + // if so, coerce. Else return normal. + // If yamlObj is a map or array, find the field that each key is + // unmarshaling to, and when you recurse pass the reflect.Value for that + // field back into this function. + switch typedYAMLObj := yamlObj.(type) { + case map[interface{}]interface{}: + // JSON does not support arbitrary keys in a map, so we must convert + // these keys to strings. + // + // From my reading of go-yaml v2 (specifically the resolve function), + // keys can only have the types string, int, int64, float64, binary + // (unsupported), or null (unsupported). + strMap := make(map[string]interface{}) + for k, v := range typedYAMLObj { + // Resolve the key to a string first. + var keyString string + switch typedKey := k.(type) { + case string: + keyString = typedKey + case int: + keyString = strconv.Itoa(typedKey) + case int64: + // go-yaml will only return an int64 as a key if the system + // architecture is 32-bit and the key's value is between 32-bit + // and 64-bit. Otherwise the key type will simply be int. + keyString = strconv.FormatInt(typedKey, 10) + case float64: + // Stolen from go-yaml to use the same conversion to string as + // the go-yaml library uses to convert float to string when + // Marshaling. + s := strconv.FormatFloat(typedKey, 'g', -1, 32) + switch s { + case "+Inf": + s = ".inf" + case "-Inf": + s = "-.inf" + case "NaN": + s = ".nan" + } + keyString = s + case bool: + if typedKey { + keyString = "true" + } else { + keyString = "false" + } + default: + return nil, fmt.Errorf("Unsupported map key of type: %s, key: %+#v, value: %+#v", + reflect.TypeOf(k), k, v) + } + + // jsonTarget should be a struct or a map. If it's a struct, find + // the field it's going to map to and pass its reflect.Value. If + // it's a map, find the element type of the map and pass the + // reflect.Value created from that type. If it's neither, just pass + // nil - JSON conversion will error for us if it's a real issue. + if jsonTarget != nil { + t := *jsonTarget + if t.Kind() == reflect.Struct { + keyBytes := []byte(keyString) + // Find the field that the JSON library would use. + var f *field + fields := cachedTypeFields(t.Type()) + for i := range fields { + ff := &fields[i] + if bytes.Equal(ff.nameBytes, keyBytes) { + f = ff + break + } + // Do case-insensitive comparison. + if f == nil && ff.equalFold(ff.nameBytes, keyBytes) { + f = ff + } + } + if f != nil { + // Find the reflect.Value of the most preferential + // struct field. + jtf := t.Field(f.index[0]) + strMap[keyString], err = convertToJSONableObject(v, &jtf) + if err != nil { + return nil, err + } + continue + } + } else if t.Kind() == reflect.Map { + // Create a zero value of the map's element type to use as + // the JSON target. + jtv := reflect.Zero(t.Type().Elem()) + strMap[keyString], err = convertToJSONableObject(v, &jtv) + if err != nil { + return nil, err + } + continue + } + } + strMap[keyString], err = convertToJSONableObject(v, nil) + if err != nil { + return nil, err + } + } + return strMap, nil + case []interface{}: + // We need to recurse into arrays in case there are any + // map[interface{}]interface{}'s inside and to convert any + // numbers to strings. + + // If jsonTarget is a slice (which it really should be), find the + // thing it's going to map to. If it's not a slice, just pass nil + // - JSON conversion will error for us if it's a real issue. + var jsonSliceElemValue *reflect.Value + if jsonTarget != nil { + t := *jsonTarget + if t.Kind() == reflect.Slice { + // By default slices point to nil, but we need a reflect.Value + // pointing to a value of the slice type, so we create one here. + ev := reflect.Indirect(reflect.New(t.Type().Elem())) + jsonSliceElemValue = &ev + } + } + + // Make and use a new array. + arr := make([]interface{}, len(typedYAMLObj)) + for i, v := range typedYAMLObj { + arr[i], err = convertToJSONableObject(v, jsonSliceElemValue) + if err != nil { + return nil, err + } + } + return arr, nil + default: + // If the target type is a string and the YAML type is a number, + // convert the YAML type to a string. + if jsonTarget != nil && (*jsonTarget).Kind() == reflect.String { + // Based on my reading of go-yaml, it may return int, int64, + // float64, or uint64. + var s string + switch typedVal := typedYAMLObj.(type) { + case int: + s = strconv.FormatInt(int64(typedVal), 10) + case int64: + s = strconv.FormatInt(typedVal, 10) + case float64: + s = strconv.FormatFloat(typedVal, 'g', -1, 32) + case uint64: + s = strconv.FormatUint(typedVal, 10) + case bool: + if typedVal { + s = "true" + } else { + s = "false" + } + } + if len(s) > 0 { + yamlObj = interface{}(s) + } + } + return yamlObj, nil + } + + return nil, nil +} diff --git a/vendor/github.com/gorilla/websocket/.editorconfig b/vendor/github.com/gorilla/websocket/.editorconfig new file mode 100644 index 000000000..2940ec92a --- /dev/null +++ b/vendor/github.com/gorilla/websocket/.editorconfig @@ -0,0 +1,20 @@ +; https://editorconfig.org/ + +root = true + +[*] +insert_final_newline = true +charset = utf-8 +trim_trailing_whitespace = true +indent_style = space +indent_size = 2 + +[{Makefile,go.mod,go.sum,*.go,.gitmodules}] +indent_style = tab +indent_size = 4 + +[*.md] +indent_size = 4 +trim_trailing_whitespace = false + +eclint_indent_style = unset diff --git a/vendor/github.com/gorilla/websocket/.gitignore b/vendor/github.com/gorilla/websocket/.gitignore index cd3fcd1ef..84039fec6 100644 --- a/vendor/github.com/gorilla/websocket/.gitignore +++ b/vendor/github.com/gorilla/websocket/.gitignore @@ -1,25 +1 @@ -# Compiled Object files, Static and Dynamic libs (Shared Objects) -*.o -*.a -*.so - -# Folders -_obj -_test - -# Architecture specific extensions/prefixes -*.[568vq] -[568vq].out - -*.cgo1.go -*.cgo2.c -_cgo_defun.c -_cgo_gotypes.go -_cgo_export.* - -_testmain.go - -*.exe - -.idea/ -*.iml +coverage.coverprofile diff --git a/vendor/github.com/gorilla/websocket/.golangci.yml b/vendor/github.com/gorilla/websocket/.golangci.yml new file mode 100644 index 000000000..34882139e --- /dev/null +++ b/vendor/github.com/gorilla/websocket/.golangci.yml @@ -0,0 +1,3 @@ +run: + skip-dirs: + - examples/*.go diff --git a/vendor/github.com/gorilla/websocket/AUTHORS b/vendor/github.com/gorilla/websocket/AUTHORS deleted file mode 100644 index 1931f4006..000000000 --- a/vendor/github.com/gorilla/websocket/AUTHORS +++ /dev/null @@ -1,9 +0,0 @@ -# This is the official list of Gorilla WebSocket authors for copyright -# purposes. -# -# Please keep the list sorted. - -Gary Burd -Google LLC (https://opensource.google.com/) -Joachim Bauch - diff --git a/vendor/github.com/gorilla/websocket/LICENSE b/vendor/github.com/gorilla/websocket/LICENSE index 9171c9722..bb9d80bc9 100644 --- a/vendor/github.com/gorilla/websocket/LICENSE +++ b/vendor/github.com/gorilla/websocket/LICENSE @@ -1,22 +1,27 @@ -Copyright (c) 2013 The Gorilla WebSocket Authors. All rights reserved. +Copyright (c) 2023 The Gorilla Authors. All rights reserved. Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: +modification, are permitted provided that the following conditions are +met: - Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. - Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/gorilla/websocket/Makefile b/vendor/github.com/gorilla/websocket/Makefile new file mode 100644 index 000000000..603a63f50 --- /dev/null +++ b/vendor/github.com/gorilla/websocket/Makefile @@ -0,0 +1,34 @@ +GO_LINT=$(shell which golangci-lint 2> /dev/null || echo '') +GO_LINT_URI=github.com/golangci/golangci-lint/cmd/golangci-lint@latest + +GO_SEC=$(shell which gosec 2> /dev/null || echo '') +GO_SEC_URI=github.com/securego/gosec/v2/cmd/gosec@latest + +GO_VULNCHECK=$(shell which govulncheck 2> /dev/null || echo '') +GO_VULNCHECK_URI=golang.org/x/vuln/cmd/govulncheck@latest + +.PHONY: golangci-lint +golangci-lint: + $(if $(GO_LINT), ,go install $(GO_LINT_URI)) + @echo "##### Running golangci-lint" + golangci-lint run -v + +.PHONY: gosec +gosec: + $(if $(GO_SEC), ,go install $(GO_SEC_URI)) + @echo "##### Running gosec" + gosec -exclude-dir examples ./... + +.PHONY: govulncheck +govulncheck: + $(if $(GO_VULNCHECK), ,go install $(GO_VULNCHECK_URI)) + @echo "##### Running govulncheck" + govulncheck ./... + +.PHONY: verify +verify: golangci-lint gosec govulncheck + +.PHONY: test +test: + @echo "##### Running tests" + go test -race -cover -coverprofile=coverage.coverprofile -covermode=atomic -v ./... diff --git a/vendor/github.com/gorilla/websocket/README.md b/vendor/github.com/gorilla/websocket/README.md index 2517a2871..1fd5e9c4e 100644 --- a/vendor/github.com/gorilla/websocket/README.md +++ b/vendor/github.com/gorilla/websocket/README.md @@ -1,17 +1,14 @@ -# Gorilla WebSocket +# gorilla/websocket -[![GoDoc](https://godoc.org/github.com/gorilla/websocket?status.svg)](https://godoc.org/github.com/gorilla/websocket) -[![CircleCI](https://circleci.com/gh/gorilla/websocket.svg?style=svg)](https://circleci.com/gh/gorilla/websocket) +![testing](https://github.com/gorilla/websocket/actions/workflows/test.yml/badge.svg) +[![codecov](https://codecov.io/github/gorilla/websocket/branch/main/graph/badge.svg)](https://codecov.io/github/gorilla/websocket) +[![godoc](https://godoc.org/github.com/gorilla/websocket?status.svg)](https://godoc.org/github.com/gorilla/websocket) +[![sourcegraph](https://sourcegraph.com/github.com/gorilla/websocket/-/badge.svg)](https://sourcegraph.com/github.com/gorilla/websocket?badge) -Gorilla WebSocket is a [Go](http://golang.org/) implementation of the -[WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. +Gorilla WebSocket is a [Go](http://golang.org/) implementation of the [WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. +![Gorilla Logo](https://github.com/gorilla/.github/assets/53367916/d92caabf-98e0-473e-bfbf-ab554ba435e5) ---- - -⚠️ **[The Gorilla WebSocket Package is looking for a new maintainer](https://github.com/gorilla/websocket/issues/370)** - ---- ### Documentation @@ -20,6 +17,7 @@ Gorilla WebSocket is a [Go](http://golang.org/) implementation of the * [Command example](https://github.com/gorilla/websocket/tree/master/examples/command) * [Client and server example](https://github.com/gorilla/websocket/tree/master/examples/echo) * [File watch example](https://github.com/gorilla/websocket/tree/master/examples/filewatch) +* [Write buffer pool example](https://github.com/gorilla/websocket/tree/master/examples/bufferpool) ### Status @@ -36,4 +34,3 @@ package API is stable. The Gorilla WebSocket package passes the server tests in the [Autobahn Test Suite](https://github.com/crossbario/autobahn-testsuite) using the application in the [examples/autobahn subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn). - diff --git a/vendor/github.com/gorilla/websocket/client.go b/vendor/github.com/gorilla/websocket/client.go index 2efd83555..815b0ca5c 100644 --- a/vendor/github.com/gorilla/websocket/client.go +++ b/vendor/github.com/gorilla/websocket/client.go @@ -9,14 +9,18 @@ import ( "context" "crypto/tls" "errors" + "fmt" "io" - "io/ioutil" + "log" + "net" "net/http" "net/http/httptrace" "net/url" "strings" "time" + + "golang.org/x/net/proxy" ) // ErrBadHandshake is returned when the server response to opening handshake is @@ -224,6 +228,7 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h k == "Connection" || k == "Sec-Websocket-Key" || k == "Sec-Websocket-Version" || + //#nosec G101 (CWE-798): Potential HTTP request smuggling via parameter pollution k == "Sec-Websocket-Extensions" || (k == "Sec-Websocket-Protocol" && len(d.Subprotocols) > 0): return nil, nil, errors.New("websocket: duplicate header not allowed: " + k) @@ -289,7 +294,9 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h } err = c.SetDeadline(deadline) if err != nil { - c.Close() + if err := c.Close(); err != nil { + log.Printf("websocket: failed to close network connection: %v", err) + } return nil, err } return c, nil @@ -303,7 +310,7 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h return nil, nil, err } if proxyURL != nil { - dialer, err := proxy_FromURL(proxyURL, netDialerFunc(netDial)) + dialer, err := proxy.FromURL(proxyURL, netDialerFunc(netDial)) if err != nil { return nil, nil, err } @@ -318,18 +325,20 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h } netConn, err := netDial("tcp", hostPort) + if err != nil { + return nil, nil, err + } if trace != nil && trace.GotConn != nil { trace.GotConn(httptrace.GotConnInfo{ Conn: netConn, }) } - if err != nil { - return nil, nil, err - } defer func() { if netConn != nil { - netConn.Close() + if err := netConn.Close(); err != nil { + log.Printf("websocket: failed to close network connection: %v", err) + } } }() @@ -370,6 +379,17 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h resp, err := http.ReadResponse(conn.br, req) if err != nil { + if d.TLSClientConfig != nil { + for _, proto := range d.TLSClientConfig.NextProtos { + if proto != "http/1.1" { + return nil, nil, fmt.Errorf( + "websocket: protocol %q was given but is not supported;"+ + "sharing tls.Config with net/http Transport can cause this error: %w", + proto, err, + ) + } + } + } return nil, nil, err } @@ -388,7 +408,7 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h // debugging. buf := make([]byte, 1024) n, _ := io.ReadFull(resp.Body, buf) - resp.Body = ioutil.NopCloser(bytes.NewReader(buf[:n])) + resp.Body = io.NopCloser(bytes.NewReader(buf[:n])) return nil, resp, ErrBadHandshake } @@ -406,17 +426,19 @@ func (d *Dialer) DialContext(ctx context.Context, urlStr string, requestHeader h break } - resp.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) + resp.Body = io.NopCloser(bytes.NewReader([]byte{})) conn.subprotocol = resp.Header.Get("Sec-Websocket-Protocol") - netConn.SetDeadline(time.Time{}) + if err := netConn.SetDeadline(time.Time{}); err != nil { + return nil, nil, err + } netConn = nil // to avoid close in defer. return conn, resp, nil } func cloneTLSConfig(cfg *tls.Config) *tls.Config { if cfg == nil { - return &tls.Config{} + return &tls.Config{MinVersion: tls.VersionTLS12} } return cfg.Clone() } diff --git a/vendor/github.com/gorilla/websocket/compression.go b/vendor/github.com/gorilla/websocket/compression.go index 813ffb1e8..9fed0ef52 100644 --- a/vendor/github.com/gorilla/websocket/compression.go +++ b/vendor/github.com/gorilla/websocket/compression.go @@ -8,6 +8,7 @@ import ( "compress/flate" "errors" "io" + "log" "strings" "sync" ) @@ -33,7 +34,9 @@ func decompressNoContextTakeover(r io.Reader) io.ReadCloser { "\x01\x00\x00\xff\xff" fr, _ := flateReaderPool.Get().(io.ReadCloser) - fr.(flate.Resetter).Reset(io.MultiReader(r, strings.NewReader(tail)), nil) + if err := fr.(flate.Resetter).Reset(io.MultiReader(r, strings.NewReader(tail)), nil); err != nil { + panic(err) + } return &flateReadWrapper{fr} } @@ -132,7 +135,9 @@ func (r *flateReadWrapper) Read(p []byte) (int, error) { // Preemptively place the reader back in the pool. This helps with // scenarios where the application does not call NextReader() soon after // this final read. - r.Close() + if err := r.Close(); err != nil { + log.Printf("websocket: flateReadWrapper.Close() returned error: %v", err) + } } return n, err } diff --git a/vendor/github.com/gorilla/websocket/conn.go b/vendor/github.com/gorilla/websocket/conn.go index 331eebc85..221e6cf79 100644 --- a/vendor/github.com/gorilla/websocket/conn.go +++ b/vendor/github.com/gorilla/websocket/conn.go @@ -6,11 +6,11 @@ package websocket import ( "bufio" + "crypto/rand" "encoding/binary" "errors" "io" - "io/ioutil" - "math/rand" + "log" "net" "strconv" "strings" @@ -181,13 +181,20 @@ var ( errInvalidControlFrame = errors.New("websocket: invalid control frame") ) +// maskRand is an io.Reader for generating mask bytes. The reader is initialized +// to crypto/rand Reader. Tests swap the reader to a math/rand reader for +// reproducible results. +var maskRand = rand.Reader + +// newMaskKey returns a new 32 bit value for masking client frames. func newMaskKey() [4]byte { - n := rand.Uint32() - return [4]byte{byte(n), byte(n >> 8), byte(n >> 16), byte(n >> 24)} + var k [4]byte + _, _ = io.ReadFull(maskRand, k[:]) + return k } func hideTempErr(err error) error { - if e, ok := err.(net.Error); ok && e.Temporary() { + if e, ok := err.(net.Error); ok { err = &netError{msg: e.Error(), timeout: e.Timeout()} } return err @@ -372,7 +379,9 @@ func (c *Conn) read(n int) ([]byte, error) { if err == io.EOF { err = errUnexpectedEOF } - c.br.Discard(len(p)) + if _, err := c.br.Discard(len(p)); err != nil { + return p, err + } return p, err } @@ -387,7 +396,9 @@ func (c *Conn) write(frameType int, deadline time.Time, buf0, buf1 []byte) error return err } - c.conn.SetWriteDeadline(deadline) + if err := c.conn.SetWriteDeadline(deadline); err != nil { + return c.writeFatal(err) + } if len(buf1) == 0 { _, err = c.conn.Write(buf0) } else { @@ -397,7 +408,7 @@ func (c *Conn) write(frameType int, deadline time.Time, buf0, buf1 []byte) error return c.writeFatal(err) } if frameType == CloseMessage { - c.writeFatal(ErrCloseSent) + _ = c.writeFatal(ErrCloseSent) } return nil } @@ -438,7 +449,7 @@ func (c *Conn) WriteControl(messageType int, data []byte, deadline time.Time) er d := 1000 * time.Hour if !deadline.IsZero() { - d = deadline.Sub(time.Now()) + d = time.Until(deadline) if d < 0 { return errWriteTimeout } @@ -460,13 +471,15 @@ func (c *Conn) WriteControl(messageType int, data []byte, deadline time.Time) er return err } - c.conn.SetWriteDeadline(deadline) + if err := c.conn.SetWriteDeadline(deadline); err != nil { + return c.writeFatal(err) + } _, err = c.conn.Write(buf) if err != nil { return c.writeFatal(err) } if messageType == CloseMessage { - c.writeFatal(ErrCloseSent) + _ = c.writeFatal(ErrCloseSent) } return err } @@ -477,7 +490,9 @@ func (c *Conn) beginMessage(mw *messageWriter, messageType int) error { // probably better to return an error in this situation, but we cannot // change this without breaking existing applications. if c.writer != nil { - c.writer.Close() + if err := c.writer.Close(); err != nil { + log.Printf("websocket: discarding writer close error: %v", err) + } c.writer = nil } @@ -630,7 +645,7 @@ func (w *messageWriter) flushFrame(final bool, extra []byte) error { } if final { - w.endMessage(errWriteClosed) + _ = w.endMessage(errWriteClosed) return nil } @@ -795,7 +810,7 @@ func (c *Conn) advanceFrame() (int, error) { // 1. Skip remainder of previous frame. if c.readRemaining > 0 { - if _, err := io.CopyN(ioutil.Discard, c.br, c.readRemaining); err != nil { + if _, err := io.CopyN(io.Discard, c.br, c.readRemaining); err != nil { return noFrame, err } } @@ -817,7 +832,9 @@ func (c *Conn) advanceFrame() (int, error) { rsv2 := p[0]&rsv2Bit != 0 rsv3 := p[0]&rsv3Bit != 0 mask := p[1]&maskBit != 0 - c.setReadRemaining(int64(p[1] & 0x7f)) + if err := c.setReadRemaining(int64(p[1] & 0x7f)); err != nil { + return noFrame, err + } c.readDecompress = false if rsv1 { @@ -922,7 +939,9 @@ func (c *Conn) advanceFrame() (int, error) { } if c.readLimit > 0 && c.readLength > c.readLimit { - c.WriteControl(CloseMessage, FormatCloseMessage(CloseMessageTooBig, ""), time.Now().Add(writeWait)) + if err := c.WriteControl(CloseMessage, FormatCloseMessage(CloseMessageTooBig, ""), time.Now().Add(writeWait)); err != nil { + return noFrame, err + } return noFrame, ErrReadLimit } @@ -934,7 +953,9 @@ func (c *Conn) advanceFrame() (int, error) { var payload []byte if c.readRemaining > 0 { payload, err = c.read(int(c.readRemaining)) - c.setReadRemaining(0) + if err := c.setReadRemaining(0); err != nil { + return noFrame, err + } if err != nil { return noFrame, err } @@ -981,7 +1002,9 @@ func (c *Conn) handleProtocolError(message string) error { if len(data) > maxControlFramePayloadSize { data = data[:maxControlFramePayloadSize] } - c.WriteControl(CloseMessage, data, time.Now().Add(writeWait)) + if err := c.WriteControl(CloseMessage, data, time.Now().Add(writeWait)); err != nil { + return err + } return errors.New("websocket: " + message) } @@ -998,7 +1021,9 @@ func (c *Conn) handleProtocolError(message string) error { func (c *Conn) NextReader() (messageType int, r io.Reader, err error) { // Close previous reader, only relevant for decompression. if c.reader != nil { - c.reader.Close() + if err := c.reader.Close(); err != nil { + log.Printf("websocket: discarding reader close error: %v", err) + } c.reader = nil } @@ -1054,7 +1079,9 @@ func (r *messageReader) Read(b []byte) (int, error) { } rem := c.readRemaining rem -= int64(n) - c.setReadRemaining(rem) + if err := c.setReadRemaining(rem); err != nil { + return 0, err + } if c.readRemaining > 0 && c.readErr == io.EOF { c.readErr = errUnexpectedEOF } @@ -1094,7 +1121,7 @@ func (c *Conn) ReadMessage() (messageType int, p []byte, err error) { if err != nil { return messageType, nil, err } - p, err = ioutil.ReadAll(r) + p, err = io.ReadAll(r) return messageType, p, err } @@ -1136,7 +1163,9 @@ func (c *Conn) SetCloseHandler(h func(code int, text string) error) { if h == nil { h = func(code int, text string) error { message := FormatCloseMessage(code, "") - c.WriteControl(CloseMessage, message, time.Now().Add(writeWait)) + if err := c.WriteControl(CloseMessage, message, time.Now().Add(writeWait)); err != nil { + return err + } return nil } } @@ -1161,7 +1190,7 @@ func (c *Conn) SetPingHandler(h func(appData string) error) { err := c.WriteControl(PongMessage, []byte(message), time.Now().Add(writeWait)) if err == ErrCloseSent { return nil - } else if e, ok := err.(net.Error); ok && e.Temporary() { + } else if _, ok := err.(net.Error); ok { return nil } return err @@ -1189,8 +1218,16 @@ func (c *Conn) SetPongHandler(h func(appData string) error) { c.handlePong = h } +// NetConn returns the underlying connection that is wrapped by c. +// Note that writing to or reading from this connection directly will corrupt the +// WebSocket connection. +func (c *Conn) NetConn() net.Conn { + return c.conn +} + // UnderlyingConn returns the internal net.Conn. This can be used to further // modifications to connection specific flags. +// Deprecated: Use the NetConn method. func (c *Conn) UnderlyingConn() net.Conn { return c.conn } diff --git a/vendor/github.com/gorilla/websocket/mask.go b/vendor/github.com/gorilla/websocket/mask.go index d0742bf2a..67d0968be 100644 --- a/vendor/github.com/gorilla/websocket/mask.go +++ b/vendor/github.com/gorilla/websocket/mask.go @@ -9,6 +9,7 @@ package websocket import "unsafe" +// #nosec G103 -- (CWE-242) Has been audited const wordSize = int(unsafe.Sizeof(uintptr(0))) func maskBytes(key [4]byte, pos int, b []byte) int { @@ -22,6 +23,7 @@ func maskBytes(key [4]byte, pos int, b []byte) int { } // Mask one byte at a time to word boundary. + //#nosec G103 -- (CWE-242) Has been audited if n := int(uintptr(unsafe.Pointer(&b[0]))) % wordSize; n != 0 { n = wordSize - n for i := range b[:n] { @@ -36,11 +38,13 @@ func maskBytes(key [4]byte, pos int, b []byte) int { for i := range k { k[i] = key[(pos+i)&3] } + //#nosec G103 -- (CWE-242) Has been audited kw := *(*uintptr)(unsafe.Pointer(&k)) // Mask one word at a time. n := (len(b) / wordSize) * wordSize for i := 0; i < n; i += wordSize { + //#nosec G103 -- (CWE-242) Has been audited *(*uintptr)(unsafe.Pointer(uintptr(unsafe.Pointer(&b[0])) + uintptr(i))) ^= kw } diff --git a/vendor/github.com/gorilla/websocket/proxy.go b/vendor/github.com/gorilla/websocket/proxy.go index e0f466b72..80f55d1ea 100644 --- a/vendor/github.com/gorilla/websocket/proxy.go +++ b/vendor/github.com/gorilla/websocket/proxy.go @@ -8,10 +8,13 @@ import ( "bufio" "encoding/base64" "errors" + "log" "net" "net/http" "net/url" "strings" + + "golang.org/x/net/proxy" ) type netDialerFunc func(network, addr string) (net.Conn, error) @@ -21,7 +24,7 @@ func (fn netDialerFunc) Dial(network, addr string) (net.Conn, error) { } func init() { - proxy_RegisterDialerType("http", func(proxyURL *url.URL, forwardDialer proxy_Dialer) (proxy_Dialer, error) { + proxy.RegisterDialerType("http", func(proxyURL *url.URL, forwardDialer proxy.Dialer) (proxy.Dialer, error) { return &httpProxyDialer{proxyURL: proxyURL, forwardDial: forwardDialer.Dial}, nil }) } @@ -55,7 +58,9 @@ func (hpd *httpProxyDialer) Dial(network string, addr string) (net.Conn, error) } if err := connectReq.Write(conn); err != nil { - conn.Close() + if err := conn.Close(); err != nil { + log.Printf("httpProxyDialer: failed to close connection: %v", err) + } return nil, err } @@ -64,12 +69,16 @@ func (hpd *httpProxyDialer) Dial(network string, addr string) (net.Conn, error) br := bufio.NewReader(conn) resp, err := http.ReadResponse(br, connectReq) if err != nil { - conn.Close() + if err := conn.Close(); err != nil { + log.Printf("httpProxyDialer: failed to close connection: %v", err) + } return nil, err } if resp.StatusCode != 200 { - conn.Close() + if err := conn.Close(); err != nil { + log.Printf("httpProxyDialer: failed to close connection: %v", err) + } f := strings.SplitN(resp.Status, " ", 2) return nil, errors.New(f[1]) } diff --git a/vendor/github.com/gorilla/websocket/server.go b/vendor/github.com/gorilla/websocket/server.go index 24d53b38a..1e720e1da 100644 --- a/vendor/github.com/gorilla/websocket/server.go +++ b/vendor/github.com/gorilla/websocket/server.go @@ -8,6 +8,7 @@ import ( "bufio" "errors" "io" + "log" "net/http" "net/url" "strings" @@ -154,8 +155,8 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade } challengeKey := r.Header.Get("Sec-Websocket-Key") - if challengeKey == "" { - return u.returnError(w, r, http.StatusBadRequest, "websocket: not a websocket handshake: 'Sec-WebSocket-Key' header is missing or blank") + if !isValidChallengeKey(challengeKey) { + return u.returnError(w, r, http.StatusBadRequest, "websocket: not a websocket handshake: 'Sec-WebSocket-Key' header must be Base64 encoded value of 16-byte in length") } subprotocol := u.selectSubprotocol(r, responseHeader) @@ -183,7 +184,9 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade } if brw.Reader.Buffered() > 0 { - netConn.Close() + if err := netConn.Close(); err != nil { + log.Printf("websocket: failed to close network connection: %v", err) + } return nil, errors.New("websocket: client sent data before handshake is complete") } @@ -248,17 +251,34 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade p = append(p, "\r\n"...) // Clear deadlines set by HTTP server. - netConn.SetDeadline(time.Time{}) + if err := netConn.SetDeadline(time.Time{}); err != nil { + if err := netConn.Close(); err != nil { + log.Printf("websocket: failed to close network connection: %v", err) + } + return nil, err + } if u.HandshakeTimeout > 0 { - netConn.SetWriteDeadline(time.Now().Add(u.HandshakeTimeout)) + if err := netConn.SetWriteDeadline(time.Now().Add(u.HandshakeTimeout)); err != nil { + if err := netConn.Close(); err != nil { + log.Printf("websocket: failed to close network connection: %v", err) + } + return nil, err + } } if _, err = netConn.Write(p); err != nil { - netConn.Close() + if err := netConn.Close(); err != nil { + log.Printf("websocket: failed to close network connection: %v", err) + } return nil, err } if u.HandshakeTimeout > 0 { - netConn.SetWriteDeadline(time.Time{}) + if err := netConn.SetWriteDeadline(time.Time{}); err != nil { + if err := netConn.Close(); err != nil { + log.Printf("websocket: failed to close network connection: %v", err) + } + return nil, err + } } return c, nil @@ -356,8 +376,12 @@ func bufioWriterBuffer(originalWriter io.Writer, bw *bufio.Writer) []byte { // bufio.Writer's underlying writer. var wh writeHook bw.Reset(&wh) - bw.WriteByte(0) - bw.Flush() + if err := bw.WriteByte(0); err != nil { + panic(err) + } + if err := bw.Flush(); err != nil { + log.Printf("websocket: bufioWriterBuffer: Flush: %v", err) + } bw.Reset(originalWriter) diff --git a/vendor/github.com/gorilla/websocket/tls_handshake.go b/vendor/github.com/gorilla/websocket/tls_handshake.go index a62b68ccb..7f3864534 100644 --- a/vendor/github.com/gorilla/websocket/tls_handshake.go +++ b/vendor/github.com/gorilla/websocket/tls_handshake.go @@ -1,6 +1,3 @@ -//go:build go1.17 -// +build go1.17 - package websocket import ( diff --git a/vendor/github.com/gorilla/websocket/tls_handshake_116.go b/vendor/github.com/gorilla/websocket/tls_handshake_116.go deleted file mode 100644 index e1b2b44f6..000000000 --- a/vendor/github.com/gorilla/websocket/tls_handshake_116.go +++ /dev/null @@ -1,21 +0,0 @@ -//go:build !go1.17 -// +build !go1.17 - -package websocket - -import ( - "context" - "crypto/tls" -) - -func doHandshake(ctx context.Context, tlsConn *tls.Conn, cfg *tls.Config) error { - if err := tlsConn.Handshake(); err != nil { - return err - } - if !cfg.InsecureSkipVerify { - if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil { - return err - } - } - return nil -} diff --git a/vendor/github.com/gorilla/websocket/util.go b/vendor/github.com/gorilla/websocket/util.go index 7bf2f66c6..9b1a629bf 100644 --- a/vendor/github.com/gorilla/websocket/util.go +++ b/vendor/github.com/gorilla/websocket/util.go @@ -6,7 +6,7 @@ package websocket import ( "crypto/rand" - "crypto/sha1" + "crypto/sha1" //#nosec G505 -- (CWE-327) https://datatracker.ietf.org/doc/html/rfc6455#page-54 "encoding/base64" "io" "net/http" @@ -17,7 +17,7 @@ import ( var keyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11") func computeAcceptKey(challengeKey string) string { - h := sha1.New() + h := sha1.New() //#nosec G401 -- (CWE-326) https://datatracker.ietf.org/doc/html/rfc6455#page-54 h.Write([]byte(challengeKey)) h.Write(keyGUID) return base64.StdEncoding.EncodeToString(h.Sum(nil)) @@ -281,3 +281,18 @@ headers: } return result } + +// isValidChallengeKey checks if the argument meets RFC6455 specification. +func isValidChallengeKey(s string) bool { + // From RFC6455: + // + // A |Sec-WebSocket-Key| header field with a base64-encoded (see + // Section 4 of [RFC4648]) value that, when decoded, is 16 bytes in + // length. + + if s == "" { + return false + } + decoded, err := base64.StdEncoding.DecodeString(s) + return err == nil && len(decoded) == 16 +} diff --git a/vendor/github.com/gorilla/websocket/x_net_proxy.go b/vendor/github.com/gorilla/websocket/x_net_proxy.go deleted file mode 100644 index 2e668f6b8..000000000 --- a/vendor/github.com/gorilla/websocket/x_net_proxy.go +++ /dev/null @@ -1,473 +0,0 @@ -// Code generated by golang.org/x/tools/cmd/bundle. DO NOT EDIT. -//go:generate bundle -o x_net_proxy.go golang.org/x/net/proxy - -// Package proxy provides support for a variety of protocols to proxy network -// data. -// - -package websocket - -import ( - "errors" - "io" - "net" - "net/url" - "os" - "strconv" - "strings" - "sync" -) - -type proxy_direct struct{} - -// Direct is a direct proxy: one that makes network connections directly. -var proxy_Direct = proxy_direct{} - -func (proxy_direct) Dial(network, addr string) (net.Conn, error) { - return net.Dial(network, addr) -} - -// A PerHost directs connections to a default Dialer unless the host name -// requested matches one of a number of exceptions. -type proxy_PerHost struct { - def, bypass proxy_Dialer - - bypassNetworks []*net.IPNet - bypassIPs []net.IP - bypassZones []string - bypassHosts []string -} - -// NewPerHost returns a PerHost Dialer that directs connections to either -// defaultDialer or bypass, depending on whether the connection matches one of -// the configured rules. -func proxy_NewPerHost(defaultDialer, bypass proxy_Dialer) *proxy_PerHost { - return &proxy_PerHost{ - def: defaultDialer, - bypass: bypass, - } -} - -// Dial connects to the address addr on the given network through either -// defaultDialer or bypass. -func (p *proxy_PerHost) Dial(network, addr string) (c net.Conn, err error) { - host, _, err := net.SplitHostPort(addr) - if err != nil { - return nil, err - } - - return p.dialerForRequest(host).Dial(network, addr) -} - -func (p *proxy_PerHost) dialerForRequest(host string) proxy_Dialer { - if ip := net.ParseIP(host); ip != nil { - for _, net := range p.bypassNetworks { - if net.Contains(ip) { - return p.bypass - } - } - for _, bypassIP := range p.bypassIPs { - if bypassIP.Equal(ip) { - return p.bypass - } - } - return p.def - } - - for _, zone := range p.bypassZones { - if strings.HasSuffix(host, zone) { - return p.bypass - } - if host == zone[1:] { - // For a zone ".example.com", we match "example.com" - // too. - return p.bypass - } - } - for _, bypassHost := range p.bypassHosts { - if bypassHost == host { - return p.bypass - } - } - return p.def -} - -// AddFromString parses a string that contains comma-separated values -// specifying hosts that should use the bypass proxy. Each value is either an -// IP address, a CIDR range, a zone (*.example.com) or a host name -// (localhost). A best effort is made to parse the string and errors are -// ignored. -func (p *proxy_PerHost) AddFromString(s string) { - hosts := strings.Split(s, ",") - for _, host := range hosts { - host = strings.TrimSpace(host) - if len(host) == 0 { - continue - } - if strings.Contains(host, "/") { - // We assume that it's a CIDR address like 127.0.0.0/8 - if _, net, err := net.ParseCIDR(host); err == nil { - p.AddNetwork(net) - } - continue - } - if ip := net.ParseIP(host); ip != nil { - p.AddIP(ip) - continue - } - if strings.HasPrefix(host, "*.") { - p.AddZone(host[1:]) - continue - } - p.AddHost(host) - } -} - -// AddIP specifies an IP address that will use the bypass proxy. Note that -// this will only take effect if a literal IP address is dialed. A connection -// to a named host will never match an IP. -func (p *proxy_PerHost) AddIP(ip net.IP) { - p.bypassIPs = append(p.bypassIPs, ip) -} - -// AddNetwork specifies an IP range that will use the bypass proxy. Note that -// this will only take effect if a literal IP address is dialed. A connection -// to a named host will never match. -func (p *proxy_PerHost) AddNetwork(net *net.IPNet) { - p.bypassNetworks = append(p.bypassNetworks, net) -} - -// AddZone specifies a DNS suffix that will use the bypass proxy. A zone of -// "example.com" matches "example.com" and all of its subdomains. -func (p *proxy_PerHost) AddZone(zone string) { - if strings.HasSuffix(zone, ".") { - zone = zone[:len(zone)-1] - } - if !strings.HasPrefix(zone, ".") { - zone = "." + zone - } - p.bypassZones = append(p.bypassZones, zone) -} - -// AddHost specifies a host name that will use the bypass proxy. -func (p *proxy_PerHost) AddHost(host string) { - if strings.HasSuffix(host, ".") { - host = host[:len(host)-1] - } - p.bypassHosts = append(p.bypassHosts, host) -} - -// A Dialer is a means to establish a connection. -type proxy_Dialer interface { - // Dial connects to the given address via the proxy. - Dial(network, addr string) (c net.Conn, err error) -} - -// Auth contains authentication parameters that specific Dialers may require. -type proxy_Auth struct { - User, Password string -} - -// FromEnvironment returns the dialer specified by the proxy related variables in -// the environment. -func proxy_FromEnvironment() proxy_Dialer { - allProxy := proxy_allProxyEnv.Get() - if len(allProxy) == 0 { - return proxy_Direct - } - - proxyURL, err := url.Parse(allProxy) - if err != nil { - return proxy_Direct - } - proxy, err := proxy_FromURL(proxyURL, proxy_Direct) - if err != nil { - return proxy_Direct - } - - noProxy := proxy_noProxyEnv.Get() - if len(noProxy) == 0 { - return proxy - } - - perHost := proxy_NewPerHost(proxy, proxy_Direct) - perHost.AddFromString(noProxy) - return perHost -} - -// proxySchemes is a map from URL schemes to a function that creates a Dialer -// from a URL with such a scheme. -var proxy_proxySchemes map[string]func(*url.URL, proxy_Dialer) (proxy_Dialer, error) - -// RegisterDialerType takes a URL scheme and a function to generate Dialers from -// a URL with that scheme and a forwarding Dialer. Registered schemes are used -// by FromURL. -func proxy_RegisterDialerType(scheme string, f func(*url.URL, proxy_Dialer) (proxy_Dialer, error)) { - if proxy_proxySchemes == nil { - proxy_proxySchemes = make(map[string]func(*url.URL, proxy_Dialer) (proxy_Dialer, error)) - } - proxy_proxySchemes[scheme] = f -} - -// FromURL returns a Dialer given a URL specification and an underlying -// Dialer for it to make network requests. -func proxy_FromURL(u *url.URL, forward proxy_Dialer) (proxy_Dialer, error) { - var auth *proxy_Auth - if u.User != nil { - auth = new(proxy_Auth) - auth.User = u.User.Username() - if p, ok := u.User.Password(); ok { - auth.Password = p - } - } - - switch u.Scheme { - case "socks5": - return proxy_SOCKS5("tcp", u.Host, auth, forward) - } - - // If the scheme doesn't match any of the built-in schemes, see if it - // was registered by another package. - if proxy_proxySchemes != nil { - if f, ok := proxy_proxySchemes[u.Scheme]; ok { - return f(u, forward) - } - } - - return nil, errors.New("proxy: unknown scheme: " + u.Scheme) -} - -var ( - proxy_allProxyEnv = &proxy_envOnce{ - names: []string{"ALL_PROXY", "all_proxy"}, - } - proxy_noProxyEnv = &proxy_envOnce{ - names: []string{"NO_PROXY", "no_proxy"}, - } -) - -// envOnce looks up an environment variable (optionally by multiple -// names) once. It mitigates expensive lookups on some platforms -// (e.g. Windows). -// (Borrowed from net/http/transport.go) -type proxy_envOnce struct { - names []string - once sync.Once - val string -} - -func (e *proxy_envOnce) Get() string { - e.once.Do(e.init) - return e.val -} - -func (e *proxy_envOnce) init() { - for _, n := range e.names { - e.val = os.Getenv(n) - if e.val != "" { - return - } - } -} - -// SOCKS5 returns a Dialer that makes SOCKSv5 connections to the given address -// with an optional username and password. See RFC 1928 and RFC 1929. -func proxy_SOCKS5(network, addr string, auth *proxy_Auth, forward proxy_Dialer) (proxy_Dialer, error) { - s := &proxy_socks5{ - network: network, - addr: addr, - forward: forward, - } - if auth != nil { - s.user = auth.User - s.password = auth.Password - } - - return s, nil -} - -type proxy_socks5 struct { - user, password string - network, addr string - forward proxy_Dialer -} - -const proxy_socks5Version = 5 - -const ( - proxy_socks5AuthNone = 0 - proxy_socks5AuthPassword = 2 -) - -const proxy_socks5Connect = 1 - -const ( - proxy_socks5IP4 = 1 - proxy_socks5Domain = 3 - proxy_socks5IP6 = 4 -) - -var proxy_socks5Errors = []string{ - "", - "general failure", - "connection forbidden", - "network unreachable", - "host unreachable", - "connection refused", - "TTL expired", - "command not supported", - "address type not supported", -} - -// Dial connects to the address addr on the given network via the SOCKS5 proxy. -func (s *proxy_socks5) Dial(network, addr string) (net.Conn, error) { - switch network { - case "tcp", "tcp6", "tcp4": - default: - return nil, errors.New("proxy: no support for SOCKS5 proxy connections of type " + network) - } - - conn, err := s.forward.Dial(s.network, s.addr) - if err != nil { - return nil, err - } - if err := s.connect(conn, addr); err != nil { - conn.Close() - return nil, err - } - return conn, nil -} - -// connect takes an existing connection to a socks5 proxy server, -// and commands the server to extend that connection to target, -// which must be a canonical address with a host and port. -func (s *proxy_socks5) connect(conn net.Conn, target string) error { - host, portStr, err := net.SplitHostPort(target) - if err != nil { - return err - } - - port, err := strconv.Atoi(portStr) - if err != nil { - return errors.New("proxy: failed to parse port number: " + portStr) - } - if port < 1 || port > 0xffff { - return errors.New("proxy: port number out of range: " + portStr) - } - - // the size here is just an estimate - buf := make([]byte, 0, 6+len(host)) - - buf = append(buf, proxy_socks5Version) - if len(s.user) > 0 && len(s.user) < 256 && len(s.password) < 256 { - buf = append(buf, 2 /* num auth methods */, proxy_socks5AuthNone, proxy_socks5AuthPassword) - } else { - buf = append(buf, 1 /* num auth methods */, proxy_socks5AuthNone) - } - - if _, err := conn.Write(buf); err != nil { - return errors.New("proxy: failed to write greeting to SOCKS5 proxy at " + s.addr + ": " + err.Error()) - } - - if _, err := io.ReadFull(conn, buf[:2]); err != nil { - return errors.New("proxy: failed to read greeting from SOCKS5 proxy at " + s.addr + ": " + err.Error()) - } - if buf[0] != 5 { - return errors.New("proxy: SOCKS5 proxy at " + s.addr + " has unexpected version " + strconv.Itoa(int(buf[0]))) - } - if buf[1] == 0xff { - return errors.New("proxy: SOCKS5 proxy at " + s.addr + " requires authentication") - } - - // See RFC 1929 - if buf[1] == proxy_socks5AuthPassword { - buf = buf[:0] - buf = append(buf, 1 /* password protocol version */) - buf = append(buf, uint8(len(s.user))) - buf = append(buf, s.user...) - buf = append(buf, uint8(len(s.password))) - buf = append(buf, s.password...) - - if _, err := conn.Write(buf); err != nil { - return errors.New("proxy: failed to write authentication request to SOCKS5 proxy at " + s.addr + ": " + err.Error()) - } - - if _, err := io.ReadFull(conn, buf[:2]); err != nil { - return errors.New("proxy: failed to read authentication reply from SOCKS5 proxy at " + s.addr + ": " + err.Error()) - } - - if buf[1] != 0 { - return errors.New("proxy: SOCKS5 proxy at " + s.addr + " rejected username/password") - } - } - - buf = buf[:0] - buf = append(buf, proxy_socks5Version, proxy_socks5Connect, 0 /* reserved */) - - if ip := net.ParseIP(host); ip != nil { - if ip4 := ip.To4(); ip4 != nil { - buf = append(buf, proxy_socks5IP4) - ip = ip4 - } else { - buf = append(buf, proxy_socks5IP6) - } - buf = append(buf, ip...) - } else { - if len(host) > 255 { - return errors.New("proxy: destination host name too long: " + host) - } - buf = append(buf, proxy_socks5Domain) - buf = append(buf, byte(len(host))) - buf = append(buf, host...) - } - buf = append(buf, byte(port>>8), byte(port)) - - if _, err := conn.Write(buf); err != nil { - return errors.New("proxy: failed to write connect request to SOCKS5 proxy at " + s.addr + ": " + err.Error()) - } - - if _, err := io.ReadFull(conn, buf[:4]); err != nil { - return errors.New("proxy: failed to read connect reply from SOCKS5 proxy at " + s.addr + ": " + err.Error()) - } - - failure := "unknown error" - if int(buf[1]) < len(proxy_socks5Errors) { - failure = proxy_socks5Errors[buf[1]] - } - - if len(failure) > 0 { - return errors.New("proxy: SOCKS5 proxy at " + s.addr + " failed to connect: " + failure) - } - - bytesToDiscard := 0 - switch buf[3] { - case proxy_socks5IP4: - bytesToDiscard = net.IPv4len - case proxy_socks5IP6: - bytesToDiscard = net.IPv6len - case proxy_socks5Domain: - _, err := io.ReadFull(conn, buf[:1]) - if err != nil { - return errors.New("proxy: failed to read domain length from SOCKS5 proxy at " + s.addr + ": " + err.Error()) - } - bytesToDiscard = int(buf[0]) - default: - return errors.New("proxy: got unknown address type " + strconv.Itoa(int(buf[3])) + " from SOCKS5 proxy at " + s.addr) - } - - if cap(buf) < bytesToDiscard { - buf = make([]byte, bytesToDiscard) - } else { - buf = buf[:bytesToDiscard] - } - if _, err := io.ReadFull(conn, buf); err != nil { - return errors.New("proxy: failed to read address from SOCKS5 proxy at " + s.addr + ": " + err.Error()) - } - - // Also need to discard the port number - if _, err := io.ReadFull(conn, buf[:2]); err != nil { - return errors.New("proxy: failed to read port from SOCKS5 proxy at " + s.addr + ": " + err.Error()) - } - - return nil -} diff --git a/vendor/github.com/rancher/norman/LICENSE b/vendor/github.com/rancher/norman/LICENSE new file mode 100644 index 000000000..f433b1a53 --- /dev/null +++ b/vendor/github.com/rancher/norman/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/vendor/github.com/rancher/norman/clientbase/common.go b/vendor/github.com/rancher/norman/clientbase/common.go new file mode 100644 index 000000000..ee0a4c3f0 --- /dev/null +++ b/vendor/github.com/rancher/norman/clientbase/common.go @@ -0,0 +1,407 @@ +package clientbase + +import ( + "bytes" + "crypto/tls" + "crypto/x509" + "encoding/base64" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "os" + "time" + + "github.com/gorilla/websocket" + "github.com/pkg/errors" + "github.com/rancher/norman/types" +) + +const ( + SELF = "self" + COLLECTION = "collection" +) + +var ( + Debug = false +) + +type APIBaseClientInterface interface { + Websocket(url string, headers map[string][]string) (*websocket.Conn, *http.Response, error) + List(schemaType string, opts *types.ListOpts, respObject interface{}) error + Post(url string, createObj interface{}, respObject interface{}) error + GetLink(resource types.Resource, link string, respObject interface{}) error + Create(schemaType string, createObj interface{}, respObject interface{}) error + Update(schemaType string, existing *types.Resource, updates interface{}, respObject interface{}) error + Replace(schemaType string, existing *types.Resource, updates interface{}, respObject interface{}) error + ByID(schemaType string, id string, respObject interface{}) error + Delete(existing *types.Resource) error + Reload(existing *types.Resource, output interface{}) error + Action(schemaType string, action string, existing *types.Resource, inputObject, respObject interface{}) error +} + +type APIBaseClient struct { + Ops *APIOperations + Opts *ClientOpts + Types map[string]types.Schema +} + +type ClientOpts struct { + URL string + AccessKey string + SecretKey string + TokenKey string + Timeout time.Duration + HTTPClient *http.Client + WSDialer *websocket.Dialer + CACerts string + Insecure bool + ProxyURL string +} + +func (c *ClientOpts) getAuthHeader() string { + if c.TokenKey != "" { + return "Bearer " + c.TokenKey + } + if c.AccessKey != "" && c.SecretKey != "" { + s := c.AccessKey + ":" + c.SecretKey + return "Basic " + base64.StdEncoding.EncodeToString([]byte(s)) + } + return "" +} + +type APIError struct { + StatusCode int + URL string + Msg string + Status string + Body string +} + +func (e *APIError) Error() string { + return e.Msg +} + +func IsNotFound(err error) bool { + apiError, ok := err.(*APIError) + if !ok { + return false + } + + return apiError.StatusCode == http.StatusNotFound +} + +func NewAPIError(resp *http.Response, url string) *APIError { + contents, err := io.ReadAll(resp.Body) + var body string + if err != nil { + body = "Unreadable body." + } else { + body = string(contents) + } + + data := map[string]interface{}{} + if json.Unmarshal(contents, &data) == nil { + delete(data, "id") + delete(data, "links") + delete(data, "actions") + delete(data, "type") + delete(data, "status") + buf := &bytes.Buffer{} + for k, v := range data { + if v == nil { + continue + } + if buf.Len() > 0 { + buf.WriteString(", ") + } + fmt.Fprintf(buf, "%s=%v", k, v) + } + body = buf.String() + } + formattedMsg := fmt.Sprintf("Bad response statusCode [%d]. Status [%s]. Body: [%s] from [%s]", + resp.StatusCode, resp.Status, body, url) + return &APIError{ + URL: url, + Msg: formattedMsg, + StatusCode: resp.StatusCode, + Status: resp.Status, + Body: body, + } +} + +func contains(array []string, item string) bool { + for _, check := range array { + if check == item { + return true + } + } + + return false +} + +func appendFilters(urlString string, filters map[string]interface{}) (string, error) { + if len(filters) == 0 { + return urlString, nil + } + + u, err := url.Parse(urlString) + if err != nil { + return "", err + } + + q := u.Query() + for k, v := range filters { + if l, ok := v.([]string); ok { + for _, v := range l { + q.Add(k, v) + } + } else { + q.Add(k, fmt.Sprintf("%v", v)) + } + } + + u.RawQuery = q.Encode() + return u.String(), nil +} + +func NewAPIClient(opts *ClientOpts) (APIBaseClient, error) { + var err error + + result := APIBaseClient{ + Types: map[string]types.Schema{}, + } + + client := opts.HTTPClient + if client == nil { + client = &http.Client{} + } + + if opts.Timeout == 0 { + opts.Timeout = time.Minute + } + + client.Timeout = opts.Timeout + + var proxy func(*http.Request) (*url.URL, error) + if opts.ProxyURL != "" { + proxyURL, err := url.Parse(opts.ProxyURL) + if err != nil { + return result, fmt.Errorf("invalid proxy address %q: %w", opts.ProxyURL, err) + } + proxy = http.ProxyURL(proxyURL) + } else { + proxy = http.ProxyFromEnvironment + } + + if opts.CACerts != "" { + if Debug { + fmt.Println("Some CAcerts are provided.") + } + roots := x509.NewCertPool() + ok := roots.AppendCertsFromPEM([]byte(opts.CACerts)) + if !ok { + return result, err + } + tr := &http.Transport{ + TLSClientConfig: &tls.Config{ + RootCAs: roots, + }, + Proxy: proxy, + } + client.Transport = tr + } + + if opts.Insecure { + if Debug { + fmt.Println("Insecure TLS set.") + } + tr := &http.Transport{ + TLSClientConfig: &tls.Config{ + InsecureSkipVerify: opts.Insecure, + }, + Proxy: proxy, + } + client.Transport = tr + } + + if !(opts.Insecure) && (opts.CACerts == "") { + if Debug { + fmt.Println("Insecure TLS not set and no CAcerts is provided.") + } + tr := &http.Transport{ + Proxy: proxy, + } + client.Transport = tr + } + + req, err := http.NewRequest("GET", opts.URL, nil) + if err != nil { + return result, err + } + req.Header.Add("Authorization", opts.getAuthHeader()) + + resp, err := client.Do(req) + if err != nil { + return result, err + } + defer func(closer io.Closer) { + closer.Close() + }(resp.Body) + + if resp.StatusCode != 200 { + return result, NewAPIError(resp, opts.URL) + } + + schemasURLs := resp.Header.Get("X-API-Schemas") + if len(schemasURLs) == 0 { + return result, errors.New("Failed to find schema at [" + opts.URL + "]") + } + + if schemasURLs != opts.URL { + req, err = http.NewRequest("GET", schemasURLs, nil) + if err != nil { + return result, err + } + req.Header.Add("Authorization", opts.getAuthHeader()) + + if Debug { + fmt.Println("GET " + req.URL.String()) + } + + resp, err = client.Do(req) + if err != nil { + return result, err + } + defer func(closer io.Closer) { + closer.Close() + }(resp.Body) + + if resp.StatusCode != 200 { + return result, NewAPIError(resp, schemasURLs) + } + } + + var schemas types.SchemaCollection + bytes, err := io.ReadAll(resp.Body) + if err != nil { + return result, err + } + + if Debug { + fmt.Println("Response <= " + string(bytes)) + } + + err = json.Unmarshal(bytes, &schemas) + if err != nil { + return result, err + } + + for _, schema := range schemas.Data { + result.Types[schema.ID] = schema + } + + result.Opts = opts + result.Ops = &APIOperations{ + Opts: opts, + Client: client, + Dialer: &websocket.Dialer{HandshakeTimeout: 10 * time.Second}, + Types: result.Types, + } + + if result.Opts.WSDialer != nil { + result.Ops.Dialer = result.Opts.WSDialer + } + + ht, ok := client.Transport.(*http.Transport) + if ok { + result.Ops.Dialer.TLSClientConfig = ht.TLSClientConfig + } + + return result, nil +} + +func NewListOpts() *types.ListOpts { + return &types.ListOpts{ + Filters: map[string]interface{}{}, + } +} + +func (a *APIBaseClient) Websocket(url string, headers map[string][]string) (*websocket.Conn, *http.Response, error) { + httpHeaders := http.Header{} + for k, v := range httpHeaders { + httpHeaders[k] = v + } + + if a.Opts != nil { + httpHeaders.Add("Authorization", a.Opts.getAuthHeader()) + } + + if Debug { + fmt.Println("WS " + url) + } + + return a.Ops.Dialer.Dial(url, http.Header(httpHeaders)) +} + +func (a *APIBaseClient) List(schemaType string, opts *types.ListOpts, respObject interface{}) error { + return a.Ops.DoList(schemaType, opts, respObject) +} + +func (a *APIBaseClient) Post(url string, createObj interface{}, respObject interface{}) error { + return a.Ops.DoModify("POST", url, createObj, respObject) +} + +func (a *APIBaseClient) GetLink(resource types.Resource, link string, respObject interface{}) error { + url := resource.Links[link] + if url == "" { + return fmt.Errorf("failed to find link: %s", link) + } + + return a.Ops.DoGet(url, &types.ListOpts{}, respObject) +} + +func (a *APIBaseClient) Create(schemaType string, createObj interface{}, respObject interface{}) error { + return a.Ops.DoCreate(schemaType, createObj, respObject) +} + +func (a *APIBaseClient) Update(schemaType string, existing *types.Resource, updates interface{}, respObject interface{}) error { + return a.Ops.DoUpdate(schemaType, existing, updates, respObject) +} + +func (a *APIBaseClient) Replace(schemaType string, existing *types.Resource, updates interface{}, respObject interface{}) error { + return a.Ops.DoReplace(schemaType, existing, updates, respObject) +} + +func (a *APIBaseClient) ByID(schemaType string, id string, respObject interface{}) error { + return a.Ops.DoByID(schemaType, id, respObject) +} + +func (a *APIBaseClient) Delete(existing *types.Resource) error { + if existing == nil { + return nil + } + return a.Ops.DoResourceDelete(existing.Type, existing) +} + +func (a *APIBaseClient) Reload(existing *types.Resource, output interface{}) error { + selfURL, ok := existing.Links[SELF] + if !ok { + return fmt.Errorf("failed to find self URL of [%v]", existing) + } + + return a.Ops.DoGet(selfURL, NewListOpts(), output) +} + +func (a *APIBaseClient) Action(schemaType string, action string, + existing *types.Resource, inputObject, respObject interface{}) error { + return a.Ops.DoAction(schemaType, action, existing, inputObject, respObject) +} + +func init() { + Debug = os.Getenv("RANCHER_CLIENT_DEBUG") == "true" + if Debug { + fmt.Println("Rancher client debug on") + } +} diff --git a/vendor/github.com/rancher/norman/clientbase/ops.go b/vendor/github.com/rancher/norman/clientbase/ops.go new file mode 100644 index 000000000..f8d6e83c3 --- /dev/null +++ b/vendor/github.com/rancher/norman/clientbase/ops.go @@ -0,0 +1,377 @@ +package clientbase + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "net/http" + "net/url" + "regexp" + + "github.com/gorilla/websocket" + "github.com/pkg/errors" + "github.com/rancher/norman/types" +) + +type APIOperations struct { + Opts *ClientOpts + Types map[string]types.Schema + Client *http.Client + Dialer *websocket.Dialer +} + +func (a *APIOperations) SetupRequest(req *http.Request) { + req.Header.Add("Authorization", a.Opts.getAuthHeader()) +} + +func (a *APIOperations) DoDelete(url string) error { + req, err := http.NewRequest("DELETE", url, nil) + if err != nil { + return err + } + + a.SetupRequest(req) + + resp, err := a.Client.Do(req) + if err != nil { + return err + } + defer func() { + _, _ = io.Copy(io.Discard, resp.Body) + resp.Body.Close() + }() + + if resp.StatusCode >= 300 { + return NewAPIError(resp, url) + } + + return nil +} + +func (a *APIOperations) DoGet(url string, opts *types.ListOpts, respObject interface{}) error { + if opts == nil { + opts = NewListOpts() + } + url, err := appendFilters(url, opts.Filters) + if err != nil { + return err + } + + if Debug { + fmt.Println("GET " + url) + } + + req, err := http.NewRequest("GET", url, nil) + if err != nil { + return err + } + + a.SetupRequest(req) + + resp, err := a.Client.Do(req) + if err != nil { + return err + } + + defer resp.Body.Close() + + if resp.StatusCode != 200 { + return NewAPIError(resp, url) + } + + byteContent, err := io.ReadAll(resp.Body) + if err != nil { + return err + } + + if Debug { + fmt.Println("Response <= " + string(byteContent)) + } + + if err := json.Unmarshal(byteContent, respObject); err != nil { + return errors.Wrap(err, fmt.Sprintf("Failed to parse: %s", byteContent)) + } + + return nil +} + +func (a *APIOperations) DoList(schemaType string, opts *types.ListOpts, respObject interface{}) error { + schema, ok := a.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.CollectionMethods, "GET") { + return errors.New("Resource type [" + schemaType + "] is not listable") + } + + collectionURL, ok := schema.Links["collection"] + if !ok { + return errors.New("Resource type [" + schemaType + "] does not have a collection URL") + } + + return a.DoGet(collectionURL, opts, respObject) +} + +func (a *APIOperations) DoNext(nextURL string, respObject interface{}) error { + return a.DoGet(nextURL, nil, respObject) +} + +func (a *APIOperations) DoModify(method string, url string, createObj interface{}, respObject interface{}) error { + if createObj == nil { + createObj = map[string]string{} + } + if respObject == nil { + respObject = &map[string]interface{}{} + } + bodyContent, err := json.Marshal(createObj) + if err != nil { + return err + } + + if Debug { + fmt.Println(method + " " + url) + fmt.Println("Request => " + string(bodyContent)) + } + + req, err := http.NewRequest(method, url, bytes.NewBuffer(bodyContent)) + if err != nil { + return err + } + + a.SetupRequest(req) + req.Header.Set("Content-Type", "application/json") + + resp, err := a.Client.Do(req) + if err != nil { + return err + } + + defer resp.Body.Close() + + if resp.StatusCode >= 300 { + return NewAPIError(resp, url) + } + + byteContent, err := io.ReadAll(resp.Body) + if err != nil { + return err + } + + if len(byteContent) > 0 { + if Debug { + fmt.Println("Response <= " + string(byteContent)) + } + return json.Unmarshal(byteContent, respObject) + } + + return nil +} + +func (a *APIOperations) DoCreate(schemaType string, createObj interface{}, respObject interface{}) error { + if createObj == nil { + createObj = map[string]string{} + } + if respObject == nil { + respObject = &map[string]interface{}{} + } + schema, ok := a.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.CollectionMethods, "POST") { + return errors.New("Resource type [" + schemaType + "] is not creatable") + } + + var collectionURL string + collectionURL, ok = schema.Links[COLLECTION] + if !ok { + // return errors.New("Failed to find collection URL for [" + schemaType + "]") + // This is a hack to address https://github.com/rancher/cattle/issues/254 + re := regexp.MustCompile("schemas.*") + collectionURL = re.ReplaceAllString(schema.Links[SELF], schema.PluralName) + } + + return a.DoModify("POST", collectionURL, createObj, respObject) +} + +func (a *APIOperations) DoReplace(schemaType string, existing *types.Resource, updates interface{}, respObject interface{}) error { + return a.doUpdate(schemaType, true, existing, updates, respObject) +} + +func (a *APIOperations) DoUpdate(schemaType string, existing *types.Resource, updates interface{}, respObject interface{}) error { + return a.doUpdate(schemaType, false, existing, updates, respObject) +} + +func (a *APIOperations) doUpdate(schemaType string, replace bool, existing *types.Resource, updates interface{}, respObject interface{}) error { + if existing == nil { + return errors.New("Existing object is nil") + } + + selfURL, ok := existing.Links[SELF] + if !ok { + return fmt.Errorf("failed to find self URL of [%v]", existing) + } + + if replace { + u, err := url.Parse(selfURL) + if err != nil { + return fmt.Errorf("failed to parse url %s: %v", selfURL, err) + } + q := u.Query() + q.Set("_replace", "true") + u.RawQuery = q.Encode() + selfURL = u.String() + } + + if updates == nil { + updates = map[string]string{} + } + + if respObject == nil { + respObject = &map[string]interface{}{} + } + + schema, ok := a.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.ResourceMethods, "PUT") { + return errors.New("Resource type [" + schemaType + "] is not updatable") + } + + return a.DoModify("PUT", selfURL, updates, respObject) +} + +func (a *APIOperations) DoByID(schemaType string, id string, respObject interface{}) error { + schema, ok := a.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.ResourceMethods, "GET") { + return errors.New("Resource type [" + schemaType + "] can not be looked up by ID") + } + + collectionURL, ok := schema.Links[COLLECTION] + if !ok { + return errors.New("Failed to find collection URL for [" + schemaType + "]") + } + + return a.DoGet(collectionURL+"/"+id, nil, respObject) +} + +func (a *APIOperations) DoResourceDelete(schemaType string, existing *types.Resource) error { + schema, ok := a.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.ResourceMethods, "DELETE") { + return errors.New("Resource type [" + schemaType + "] can not be deleted") + } + + selfURL, ok := existing.Links[SELF] + if !ok { + return fmt.Errorf("failed to find self URL of [%v]", existing) + } + + return a.DoDelete(selfURL) +} + +func (a *APIOperations) DoAction(schemaType string, action string, + existing *types.Resource, inputObject, respObject interface{}) error { + + if existing == nil { + return errors.New("Existing object is nil") + } + + actionURL, ok := existing.Actions[action] + if !ok { + return fmt.Errorf("action [%v] not available on [%v]", action, existing) + } + + return a.doAction(schemaType, action, actionURL, inputObject, respObject) +} + +func (a *APIOperations) DoCollectionAction(schemaType string, action string, + existing *types.Collection, inputObject, respObject interface{}) error { + + if existing == nil { + return errors.New("Existing object is nil") + } + + actionURL, ok := existing.Actions[action] + if !ok { + return fmt.Errorf("action [%v] not available on [%v]", action, existing) + } + + return a.doAction(schemaType, action, actionURL, inputObject, respObject) +} + +func (a *APIOperations) doAction( + schemaType string, + action string, + actionURL string, + inputObject interface{}, + respObject interface{}, +) error { + _, ok := a.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + var input io.Reader + + if Debug { + fmt.Println("POST " + actionURL) + } + + if inputObject != nil { + bodyContent, err := json.Marshal(inputObject) + if err != nil { + return err + } + if Debug { + fmt.Println("Request => " + string(bodyContent)) + } + input = bytes.NewBuffer(bodyContent) + } + + req, err := http.NewRequest("POST", actionURL, input) + if err != nil { + return err + } + + a.SetupRequest(req) + req.Header.Set("Content-Type", "application/json") + req.Header.Set("Content-Length", "0") + + resp, err := a.Client.Do(req) + if err != nil { + return err + } + + defer resp.Body.Close() + + if resp.StatusCode >= 300 { + return NewAPIError(resp, actionURL) + } + + byteContent, err := io.ReadAll(resp.Body) + if err != nil { + return err + } + + if Debug { + fmt.Println("Response <= " + string(byteContent)) + } + + if nil != respObject { + return json.Unmarshal(byteContent, respObject) + } + return nil +} diff --git a/vendor/github.com/rancher/norman/httperror/error.go b/vendor/github.com/rancher/norman/httperror/error.go new file mode 100644 index 000000000..8ac835b44 --- /dev/null +++ b/vendor/github.com/rancher/norman/httperror/error.go @@ -0,0 +1,129 @@ +package httperror + +import ( + "fmt" +) + +var ( + Unauthorized = ErrorCode{"Unauthorized", 401} + PermissionDenied = ErrorCode{"PermissionDenied", 403} + NotFound = ErrorCode{"NotFound", 404} + MethodNotAllowed = ErrorCode{"MethodNotAllow", 405} + Conflict = ErrorCode{"Conflict", 409} + + InvalidDateFormat = ErrorCode{"InvalidDateFormat", 422} + InvalidFormat = ErrorCode{"InvalidFormat", 422} + InvalidReference = ErrorCode{"InvalidReference", 422} + NotNullable = ErrorCode{"NotNullable", 422} + NotUnique = ErrorCode{"NotUnique", 422} + MinLimitExceeded = ErrorCode{"MinLimitExceeded", 422} + MaxLimitExceeded = ErrorCode{"MaxLimitExceeded", 422} + MinLengthExceeded = ErrorCode{"MinLengthExceeded", 422} + MaxLengthExceeded = ErrorCode{"MaxLengthExceeded", 422} + InvalidOption = ErrorCode{"InvalidOption", 422} + InvalidCharacters = ErrorCode{"InvalidCharacters", 422} + MissingRequired = ErrorCode{"MissingRequired", 422} + InvalidCSRFToken = ErrorCode{"InvalidCSRFToken", 422} + InvalidAction = ErrorCode{"InvalidAction", 422} + InvalidBodyContent = ErrorCode{"InvalidBodyContent", 422} + InvalidType = ErrorCode{"InvalidType", 422} + ActionNotAvailable = ErrorCode{"ActionNotAvailable", 404} + InvalidState = ErrorCode{"InvalidState", 422} + + ServerError = ErrorCode{"ServerError", 500} + ClusterUnavailable = ErrorCode{"ClusterUnavailable", 503} +) + +type ErrorCode struct { + Code string + Status int +} + +func (e ErrorCode) String() string { + return fmt.Sprintf("%s %d", e.Code, e.Status) +} + +type APIError struct { + Code ErrorCode + Message string + Cause error + FieldName string +} + +func NewAPIErrorLong(status int, code, message string) error { + return NewAPIError(ErrorCode{ + Code: code, + Status: status, + }, message) +} + +func NewAPIError(code ErrorCode, message string) error { + return &APIError{ + Code: code, + Message: message, + } +} + +func NewFieldAPIError(code ErrorCode, fieldName, message string) error { + return &APIError{ + Code: code, + Message: message, + FieldName: fieldName, + } +} + +// WrapFieldAPIError will cause the API framework to log the underlying err before returning the APIError as a response. +// err WILL NOT be in the API response +func WrapFieldAPIError(err error, code ErrorCode, fieldName, message string) error { + return &APIError{ + Cause: err, + Code: code, + Message: message, + FieldName: fieldName, + } +} + +// WrapAPIError will cause the API framework to log the underlying err before returning the APIError as a response. +// err WILL NOT be in the API response +func WrapAPIError(err error, code ErrorCode, message string) error { + return &APIError{ + Code: code, + Message: message, + Cause: err, + } +} + +func (a *APIError) Error() string { + if a.FieldName != "" { + return fmt.Sprintf("%s=%s: %s", a.FieldName, a.Code, a.Message) + } + return fmt.Sprintf("%s: %s", a.Code, a.Message) +} + +func IsAPIError(err error) bool { + _, ok := err.(*APIError) + return ok +} + +func IsNotFound(err error) bool { + if apiError, ok := err.(*APIError); ok { + return apiError.Code.Status == 404 + } + + return false +} + +func IsConflict(err error) bool { + if apiError, ok := err.(*APIError); ok { + return apiError.Code.Status == 409 + } + + return false +} + +func IsForbidden(err error) bool { + if apiError, ok := err.(*APIError); ok { + return apiError.Code.Status == 403 + } + return false +} diff --git a/vendor/github.com/rancher/norman/types/condition.go b/vendor/github.com/rancher/norman/types/condition.go new file mode 100644 index 000000000..9be6210b8 --- /dev/null +++ b/vendor/github.com/rancher/norman/types/condition.go @@ -0,0 +1,121 @@ +package types + +import ( + "github.com/rancher/norman/types/convert" +) + +var ( + CondEQ = QueryConditionType{ModifierEQ, 1} + CondNE = QueryConditionType{ModifierNE, 1} + CondNull = QueryConditionType{ModifierNull, 0} + CondNotNull = QueryConditionType{ModifierNotNull, 0} + CondIn = QueryConditionType{ModifierIn, -1} + CondNotIn = QueryConditionType{ModifierNotIn, -1} + CondOr = QueryConditionType{ModifierType("or"), 1} + CondAnd = QueryConditionType{ModifierType("and"), 1} + + mods = map[ModifierType]QueryConditionType{ + CondEQ.Name: CondEQ, + CondNE.Name: CondNE, + CondNull.Name: CondNull, + CondNotNull.Name: CondNotNull, + CondIn.Name: CondIn, + CondNotIn.Name: CondNotIn, + CondOr.Name: CondOr, + CondAnd.Name: CondAnd, + } +) + +type QueryConditionType struct { + Name ModifierType + Args int +} + +type QueryCondition struct { + Field string + Value string + Values map[string]bool + conditionType QueryConditionType + left, right *QueryCondition +} + +func (q *QueryCondition) Valid(schema *Schema, data map[string]interface{}) bool { + switch q.conditionType { + case CondAnd: + if q.left == nil || q.right == nil { + return false + } + return q.left.Valid(schema, data) && q.right.Valid(schema, data) + case CondOr: + if q.left == nil || q.right == nil { + return false + } + return q.left.Valid(schema, data) || q.right.Valid(schema, data) + case CondEQ: + return q.Value == convert.ToString(valueOrDefault(schema, data, q)) + case CondNE: + return q.Value != convert.ToString(valueOrDefault(schema, data, q)) + case CondIn: + return q.Values[convert.ToString(valueOrDefault(schema, data, q))] + case CondNotIn: + return !q.Values[convert.ToString(valueOrDefault(schema, data, q))] + case CondNotNull: + return convert.ToString(valueOrDefault(schema, data, q)) != "" + case CondNull: + return convert.ToString(valueOrDefault(schema, data, q)) == "" + } + + return false +} + +func valueOrDefault(schema *Schema, data map[string]interface{}, q *QueryCondition) interface{} { + value := data[q.Field] + if value == nil { + value = schema.ResourceFields[q.Field].Default + } + + return value +} + +func (q *QueryCondition) ToCondition() Condition { + cond := Condition{ + Modifier: q.conditionType.Name, + } + if q.conditionType.Args == 1 { + cond.Value = q.Value + } else if q.conditionType.Args == -1 { + stringValues := []string{} + for val := range q.Values { + stringValues = append(stringValues, val) + } + cond.Value = stringValues + } + + return cond +} + +func ValidMod(mod ModifierType) bool { + _, ok := mods[mod] + return ok +} + +func EQ(key, value string) *QueryCondition { + return NewConditionFromString(key, ModifierEQ, value) +} + +func NewConditionFromString(field string, mod ModifierType, values ...string) *QueryCondition { + q := &QueryCondition{ + Field: field, + conditionType: mods[mod], + Values: map[string]bool{}, + } + + for i, value := range values { + if i == 0 { + q.Value = value + } + q.Values[value] = true + } + + return q +} diff --git a/vendor/github.com/rancher/norman/types/convert/convert.go b/vendor/github.com/rancher/norman/types/convert/convert.go new file mode 100644 index 000000000..5d5e2728e --- /dev/null +++ b/vendor/github.com/rancher/norman/types/convert/convert.go @@ -0,0 +1,280 @@ +package convert + +import ( + "bytes" + "encoding/json" + "errors" + "fmt" + "golang.org/x/text/cases" + "golang.org/x/text/language" + "strconv" + "strings" + "time" + "unicode" +) + +func Chan(c <-chan map[string]interface{}, f func(map[string]interface{}) map[string]interface{}) chan map[string]interface{} { + if c == nil { + return nil + } + result := make(chan map[string]interface{}) + go func() { + for data := range c { + modified := f(data) + if modified != nil { + result <- modified + } + } + close(result) + }() + return result +} + +func Singular(value interface{}) interface{} { + if slice, ok := value.([]string); ok { + if len(slice) == 0 { + return nil + } + return slice[0] + } + if slice, ok := value.([]interface{}); ok { + if len(slice) == 0 { + return nil + } + return slice[0] + } + return value +} + +func ToStringNoTrim(value interface{}) string { + if t, ok := value.(time.Time); ok { + return t.Format(time.RFC3339) + } + single := Singular(value) + if single == nil { + return "" + } + return fmt.Sprint(single) +} + +func ToString(value interface{}) string { + return strings.TrimSpace(ToStringNoTrim(value)) +} + +func ToTimestamp(value interface{}) (int64, error) { + str := ToString(value) + if str == "" { + return 0, errors.New("invalid date") + } + t, err := time.Parse(time.RFC3339, str) + if err != nil { + return 0, err + } + return t.UnixNano() / 1000000, nil +} + +func ToBool(value interface{}) bool { + value = Singular(value) + + b, ok := value.(bool) + if ok { + return b + } + + str := strings.ToLower(ToString(value)) + return str == "true" || str == "t" || str == "yes" || str == "y" +} + +func ToNumber(value interface{}) (int64, error) { + value = Singular(value) + + i, ok := value.(int64) + if ok { + return i, nil + } + f, ok := value.(float64) + if ok { + return int64(f), nil + } + if n, ok := value.(json.Number); ok { + i, err := n.Int64() + if err == nil { + return i, nil + } + f, err := n.Float64() + return int64(f), err + } + return strconv.ParseInt(ToString(value), 10, 64) +} + +func ToFloat(value interface{}) (float64, error) { + value = Singular(value) + + f64, ok := value.(float64) + if ok { + return f64, nil + } + + f32, ok := value.(float32) + if ok { + return float64(f32), nil + } + + if n, ok := value.(json.Number); ok { + i, err := n.Int64() + if err == nil { + return float64(i), nil + } + f, err := n.Float64() + return float64(f), err + } + return strconv.ParseFloat(ToString(value), 64) +} + +func Capitalize(s string) string { + if len(s) <= 1 { + return strings.ToUpper(s) + } + + return strings.ToUpper(s[:1]) + s[1:] +} + +func Uncapitalize(s string) string { + if len(s) <= 1 { + return strings.ToLower(s) + } + + return strings.ToLower(s[:1]) + s[1:] +} + +func LowerTitle(input string) string { + runes := []rune(input) + for i := 0; i < len(runes); i++ { + if unicode.IsUpper(runes[i]) && + (i == 0 || + i == len(runes)-1 || + unicode.IsUpper(runes[i+1])) { + runes[i] = unicode.ToLower(runes[i]) + } else { + break + } + } + + return string(runes) +} + +func IsAPIObjectEmpty(v interface{}) bool { + if v == nil || v == "" || v == 0 || v == false { + return true + } + if m, ok := v.(map[string]interface{}); ok { + return len(m) == 0 + } + if s, ok := v.([]interface{}); ok { + return len(s) == 0 + } + return false +} + +func ToMapInterface(obj interface{}) map[string]interface{} { + v, _ := obj.(map[string]interface{}) + return v +} + +func ToInterfaceSlice(obj interface{}) []interface{} { + if v, ok := obj.([]interface{}); ok { + return v + } + return nil +} + +func ToMapSlice(obj interface{}) []map[string]interface{} { + if v, ok := obj.([]map[string]interface{}); ok { + return v + } + vs, _ := obj.([]interface{}) + var result []map[string]interface{} + for _, item := range vs { + if v, ok := item.(map[string]interface{}); ok { + result = append(result, v) + } else { + return nil + } + } + + return result +} + +func ToStringSlice(data interface{}) []string { + if v, ok := data.([]string); ok { + return v + } + if v, ok := data.([]interface{}); ok { + var result []string + for _, item := range v { + result = append(result, ToString(item)) + } + return result + } + return nil +} + +func ToObj(data interface{}, into interface{}) error { + bytes, err := json.Marshal(data) + if err != nil { + return err + } + return json.Unmarshal(bytes, into) +} + +func EncodeToMap(obj interface{}) (map[string]interface{}, error) { + if m, ok := obj.(map[string]interface{}); ok { + return m, nil + } + + b, err := json.Marshal(obj) + if err != nil { + return nil, err + } + result := map[string]interface{}{} + dec := json.NewDecoder(bytes.NewBuffer(b)) + dec.UseNumber() + return result, dec.Decode(&result) +} + +func ToJSONKey(str string) string { + parts := strings.Split(str, "_") + for i := 1; i < len(parts); i++ { + parts[i] = cases.Title(language.English).String(parts[i]) + } + + return strings.Join(parts, "") +} + +func ToYAMLKey(str string) string { + var result []rune + cap := false + + for i, r := range []rune(str) { + if i == 0 { + if unicode.IsUpper(r) { + cap = true + } + result = append(result, unicode.ToLower(r)) + continue + } + + if unicode.IsUpper(r) { + if cap { + result = append(result, unicode.ToLower(r)) + } else { + result = append(result, '_', unicode.ToLower(r)) + } + } else { + cap = false + result = append(result, r) + } + } + + return string(result) +} diff --git a/vendor/github.com/rancher/norman/types/convert/ref.go b/vendor/github.com/rancher/norman/types/convert/ref.go new file mode 100644 index 000000000..b269a76cd --- /dev/null +++ b/vendor/github.com/rancher/norman/types/convert/ref.go @@ -0,0 +1,11 @@ +package convert + +import "fmt" + +func ToReference(typeName string) string { + return fmt.Sprintf("reference[%s]", typeName) +} + +func ToFullReference(path, typeName string) string { + return fmt.Sprintf("reference[%s/schemas/%s]", path, typeName) +} diff --git a/vendor/github.com/rancher/norman/types/convert/transform.go b/vendor/github.com/rancher/norman/types/convert/transform.go new file mode 100644 index 000000000..3fd9b9247 --- /dev/null +++ b/vendor/github.com/rancher/norman/types/convert/transform.go @@ -0,0 +1,45 @@ +package convert + +const ( + ArrayKey = "{ARRAY}" + MapKey = "{MAP}" +) + +type TransformerFunc func(input interface{}) interface{} + +func Transform(data map[string]interface{}, path []string, transformer TransformerFunc) { + if len(path) == 0 || len(data) == 0 { + return + } + + key := path[0] + path = path[1:] + value := data[key] + + if value == nil { + return + } + + if len(path) == 0 { + data[key] = transformer(value) + return + } + + // You can't end a path with ARRAY/MAP. Not supported right now + if len(path) > 1 { + switch path[0] { + case ArrayKey: + for _, valueMap := range ToMapSlice(value) { + Transform(valueMap, path[1:], transformer) + } + return + case MapKey: + for _, valueMap := range ToMapInterface(value) { + Transform(ToMapInterface(valueMap), path[1:], transformer) + } + return + } + } + + Transform(ToMapInterface(value), path, transformer) +} diff --git a/vendor/github.com/rancher/norman/types/convert/value_set_string.go b/vendor/github.com/rancher/norman/types/convert/value_set_string.go new file mode 100644 index 000000000..d9b329fa0 --- /dev/null +++ b/vendor/github.com/rancher/norman/types/convert/value_set_string.go @@ -0,0 +1,18 @@ +package convert + +import ( + "regexp" + "strings" +) + +var ( + splitRegexp = regexp.MustCompile("[[:space:]]*,[[:space:]]*") +) + +func ToValuesSlice(value string) []string { + value = strings.TrimSpace(value) + if strings.HasPrefix(value, "(") && strings.HasSuffix(value, ")") { + return splitRegexp.Split(value[1:len(value)-1], -1) + } + return []string{value} +} diff --git a/vendor/github.com/rancher/norman/types/definition/definition.go b/vendor/github.com/rancher/norman/types/definition/definition.go new file mode 100644 index 000000000..40912afb3 --- /dev/null +++ b/vendor/github.com/rancher/norman/types/definition/definition.go @@ -0,0 +1,45 @@ +package definition + +import ( + "strings" + + "github.com/rancher/norman/types/convert" +) + +func IsMapType(fieldType string) bool { + return strings.HasPrefix(fieldType, "map[") && strings.HasSuffix(fieldType, "]") +} + +func IsArrayType(fieldType string) bool { + return strings.HasPrefix(fieldType, "array[") && strings.HasSuffix(fieldType, "]") +} + +func IsReferenceType(fieldType string) bool { + return strings.HasPrefix(fieldType, "reference[") && strings.HasSuffix(fieldType, "]") +} + +func HasReferenceType(fieldType string) bool { + return strings.Contains(fieldType, "reference[") +} + +func SubType(fieldType string) string { + i := strings.Index(fieldType, "[") + if i <= 0 || i >= len(fieldType)-1 { + return fieldType + } + + return fieldType[i+1 : len(fieldType)-1] +} + +func GetType(data map[string]interface{}) string { + return GetShortTypeFromFull(GetFullType(data)) +} + +func GetShortTypeFromFull(fullType string) string { + parts := strings.Split(fullType, "/") + return parts[len(parts)-1] +} + +func GetFullType(data map[string]interface{}) string { + return convert.ToString(data["type"]) +} diff --git a/vendor/github.com/rancher/norman/types/encoder.go b/vendor/github.com/rancher/norman/types/encoder.go new file mode 100644 index 000000000..ddaae9e24 --- /dev/null +++ b/vendor/github.com/rancher/norman/types/encoder.go @@ -0,0 +1,32 @@ +package types + +import ( + "encoding/json" + "io" + "regexp" + + "github.com/ghodss/yaml" +) + +var ( + commenter = regexp.MustCompile(`(?m)^( *)zzz#\\((.*)\\)\\((.*)\\)([a-z]+.*):(.*)`) +) + +func JSONEncoder(writer io.Writer, v interface{}) error { + return json.NewEncoder(writer).Encode(v) +} + +func YAMLEncoder(writer io.Writer, v interface{}) error { + data, err := json.Marshal(v) + if err != nil { + return err + } + buf, err := yaml.JSONToYAML(data) + if err != nil { + return err + } + //buf = commenter.ReplaceAll(buf, []byte("${1}# ${2}type: ${3}\n${1}# ${4}:${5}")) + buf = commenter.ReplaceAll(buf, []byte("${1}# ${4}:${5}")) + _, err = writer.Write(buf) + return err +} diff --git a/vendor/github.com/rancher/norman/types/id.go b/vendor/github.com/rancher/norman/types/id.go new file mode 100644 index 000000000..514b9336d --- /dev/null +++ b/vendor/github.com/rancher/norman/types/id.go @@ -0,0 +1,24 @@ +package types + +import ( + "fmt" + "regexp" + "strings" + + utilrand "k8s.io/apimachinery/pkg/util/rand" +) + +var ( + lowerChars = regexp.MustCompile("[a-z]+") +) + +func GenerateName(typeName string) string { + base := typeName[0:1] + lowerChars.ReplaceAllString(typeName[1:], "") + last := utilrand.String(5) + return fmt.Sprintf("%s-%s", strings.ToLower(base), last) +} + +func GenerateTypePrefix(typeName string) string { + base := typeName[0:1] + lowerChars.ReplaceAllString(typeName[1:], "") + return strings.ToLower(base) + "-" +} diff --git a/vendor/github.com/rancher/norman/types/mapper.go b/vendor/github.com/rancher/norman/types/mapper.go new file mode 100644 index 000000000..04f1ae0b2 --- /dev/null +++ b/vendor/github.com/rancher/norman/types/mapper.go @@ -0,0 +1,178 @@ +package types + +import ( + "fmt" + + "github.com/rancher/norman/types/convert" + "github.com/rancher/norman/types/definition" + "github.com/rancher/norman/types/values" +) + +type Mapper interface { + FromInternal(data map[string]interface{}) + ToInternal(data map[string]interface{}) error + ModifySchema(schema *Schema, schemas *Schemas) error +} + +type Mappers []Mapper + +func (m Mappers) FromInternal(data map[string]interface{}) { + for _, mapper := range m { + mapper.FromInternal(data) + } +} + +func (m Mappers) ToInternal(data map[string]interface{}) error { + var errors []error + for i := len(m) - 1; i >= 0; i-- { + errors = append(errors, m[i].ToInternal(data)) + } + return NewErrors(errors...) +} + +func (m Mappers) ModifySchema(schema *Schema, schemas *Schemas) error { + for _, mapper := range m { + if err := mapper.ModifySchema(schema, schemas); err != nil { + return err + } + } + return nil +} + +type typeMapper struct { + Mappers []Mapper + root bool + typeName string + subSchemas map[string]*Schema + subArraySchemas map[string]*Schema + subMapSchemas map[string]*Schema +} + +func (t *typeMapper) FromInternal(data map[string]interface{}) { + name, _ := values.GetValueN(data, "metadata", "name").(string) + namespace, _ := values.GetValueN(data, "metadata", "namespace").(string) + + for fieldName, schema := range t.subSchemas { + if schema.Mapper == nil { + continue + } + fieldData, _ := data[fieldName].(map[string]interface{}) + schema.Mapper.FromInternal(fieldData) + } + + for fieldName, schema := range t.subMapSchemas { + if schema.Mapper == nil { + continue + } + datas, _ := data[fieldName].(map[string]interface{}) + for _, fieldData := range datas { + mapFieldData, _ := fieldData.(map[string]interface{}) + schema.Mapper.FromInternal(mapFieldData) + } + } + + for fieldName, schema := range t.subArraySchemas { + if schema.Mapper == nil { + continue + } + datas, _ := data[fieldName].([]interface{}) + for _, fieldData := range datas { + mapFieldData, _ := fieldData.(map[string]interface{}) + schema.Mapper.FromInternal(mapFieldData) + } + } + + if _, ok := data["type"]; !ok && data != nil { + data["type"] = t.typeName + } + + Mappers(t.Mappers).FromInternal(data) + + if data != nil && t.root { + if _, ok := data["id"]; ok { + if namespace != "" { + id, _ := data["id"].(string) + data["id"] = namespace + ":" + id + } + } else { + if name != "" { + if namespace == "" { + data["id"] = name + } else { + data["id"] = namespace + ":" + name + } + } + } + } + + if _, ok := data["type"]; !ok && data != nil { + if _, ok := data["id"]; ok { + data["type"] = t.typeName + } + } +} + +func (t *typeMapper) ToInternal(data map[string]interface{}) error { + errors := Errors{} + errors.Add(Mappers(t.Mappers).ToInternal(data)) + + for fieldName, schema := range t.subArraySchemas { + if schema.Mapper == nil { + continue + } + datas, _ := data[fieldName].([]interface{}) + for _, fieldData := range datas { + errors.Add(schema.Mapper.ToInternal(convert.ToMapInterface(fieldData))) + } + } + + for fieldName, schema := range t.subMapSchemas { + if schema.Mapper == nil { + continue + } + datas, _ := data[fieldName].(map[string]interface{}) + for _, fieldData := range datas { + errors.Add(schema.Mapper.ToInternal(convert.ToMapInterface(fieldData))) + } + } + + for fieldName, schema := range t.subSchemas { + if schema.Mapper == nil { + continue + } + fieldData, _ := data[fieldName].(map[string]interface{}) + errors.Add(schema.Mapper.ToInternal(fieldData)) + } + + return errors.Err() +} + +func (t *typeMapper) ModifySchema(schema *Schema, schemas *Schemas) error { + t.subSchemas = map[string]*Schema{} + t.subArraySchemas = map[string]*Schema{} + t.subMapSchemas = map[string]*Schema{} + t.typeName = fmt.Sprintf("%s/schemas/%s", schema.Version.Path, schema.ID) + + mapperSchema := schema + if schema.InternalSchema != nil { + mapperSchema = schema.InternalSchema + } + for name, field := range mapperSchema.ResourceFields { + fieldType := field.Type + targetMap := t.subSchemas + if definition.IsArrayType(fieldType) { + fieldType = definition.SubType(fieldType) + targetMap = t.subArraySchemas + } else if definition.IsMapType(fieldType) { + fieldType = definition.SubType(fieldType) + targetMap = t.subMapSchemas + } + + schema := schemas.Schema(&schema.Version, fieldType) + if schema != nil { + targetMap[name] = schema + } + } + + return Mappers(t.Mappers).ModifySchema(schema, schemas) +} diff --git a/vendor/github.com/rancher/norman/types/reflection.go b/vendor/github.com/rancher/norman/types/reflection.go new file mode 100644 index 000000000..c80bc599b --- /dev/null +++ b/vendor/github.com/rancher/norman/types/reflection.go @@ -0,0 +1,510 @@ +package types + +import ( + "fmt" + "net/http" + "reflect" + "strconv" + "strings" + + "github.com/rancher/norman/types/convert" + "github.com/rancher/norman/types/definition" + "github.com/rancher/norman/types/slice" + "github.com/sirupsen/logrus" +) + +var ( + namespacedType = reflect.TypeOf(Namespaced{}) + resourceType = reflect.TypeOf(Resource{}) + skipNames = map[string]bool{ + "links": true, + "actions": true, + "managedFields": true, + } +) + +func (s *Schemas) TypeName(name string, obj interface{}) *Schemas { + s.typeNames[reflect.TypeOf(obj)] = name + return s +} + +func (s *Schemas) getTypeName(t reflect.Type) string { + if name, ok := s.typeNames[t]; ok { + return name + } + return convert.LowerTitle(t.Name()) +} + +func (s *Schemas) AddMapperForType(version *APIVersion, obj interface{}, mapper ...Mapper) *Schemas { + if len(mapper) == 0 { + return s + } + + t := reflect.TypeOf(obj) + typeName := s.getTypeName(t) + if len(mapper) == 1 { + return s.AddMapper(version, typeName, mapper[0]) + } + return s.AddMapper(version, typeName, Mappers(mapper)) +} + +func (s *Schemas) MustImport(version *APIVersion, obj interface{}, externalOverrides ...interface{}) *Schemas { + if reflect.ValueOf(obj).Kind() == reflect.Ptr { + panic(fmt.Errorf("obj cannot be a pointer")) + } + + if _, err := s.Import(version, obj, externalOverrides...); err != nil { + panic(err) + } + return s +} + +func (s *Schemas) MustImportAndCustomize(version *APIVersion, obj interface{}, f func(*Schema), externalOverrides ...interface{}) *Schemas { + return s.MustImport(version, obj, externalOverrides...). + MustCustomizeType(version, obj, f) +} + +func (s *Schemas) Import(version *APIVersion, obj interface{}, externalOverrides ...interface{}) (*Schema, error) { + var types []reflect.Type + for _, override := range externalOverrides { + types = append(types, reflect.TypeOf(override)) + } + + return s.importType(version, reflect.TypeOf(obj), types...) +} + +func (s *Schemas) newSchemaFromType(version *APIVersion, t reflect.Type, typeName string) (*Schema, error) { + schema := &Schema{ + ID: typeName, + Version: *version, + CodeName: t.Name(), + PkgName: t.PkgPath(), + ResourceFields: map[string]Field{}, + ResourceActions: map[string]Action{}, + CollectionActions: map[string]Action{}, + } + + s.processingTypes[t] = schema + defer delete(s.processingTypes, t) + + if err := s.readFields(schema, t); err != nil { + return nil, err + } + + return schema, nil +} + +func (s *Schemas) setupFilters(schema *Schema) { + if !slice.ContainsString(schema.CollectionMethods, http.MethodGet) { + return + } + for fieldName, field := range schema.ResourceFields { + var mods []ModifierType + switch field.Type { + case "enum": + mods = []ModifierType{ModifierEQ, ModifierNE, ModifierIn, ModifierNotIn} + case "date": + fallthrough + case "dnsLabel": + fallthrough + case "hostname": + fallthrough + case "string": + mods = []ModifierType{ModifierEQ, ModifierNE, ModifierIn, ModifierNotIn} + case "int": + mods = []ModifierType{ModifierEQ, ModifierNE, ModifierIn, ModifierNotIn} + case "boolean": + mods = []ModifierType{ModifierEQ, ModifierNE} + default: + if definition.IsReferenceType(field.Type) { + mods = []ModifierType{ModifierEQ, ModifierNE, ModifierIn, ModifierNotIn} + } + } + + if len(mods) > 0 { + if schema.CollectionFilters == nil { + schema.CollectionFilters = map[string]Filter{} + } + schema.CollectionFilters[fieldName] = Filter{ + Modifiers: mods, + } + } + } +} + +func (s *Schemas) MustCustomizeType(version *APIVersion, obj interface{}, f func(*Schema)) *Schemas { + name := s.getTypeName(reflect.TypeOf(obj)) + schema := s.Schema(version, name) + if schema == nil { + panic("Failed to find schema " + name) + } + + f(schema) + + return s +} + +func (s *Schemas) importType(version *APIVersion, t reflect.Type, overrides ...reflect.Type) (*Schema, error) { + typeName := s.getTypeName(t) + + existing := s.Schema(version, typeName) + if existing != nil { + return existing, nil + } + + if s, ok := s.processingTypes[t]; ok { + logrus.Tracef("Returning half built schema %s for %v", typeName, t) + return s, nil + } + + logrus.Tracef("Inspecting schema %s for %v", typeName, t) + + schema, err := s.newSchemaFromType(version, t, typeName) + if err != nil { + return nil, err + } + + mappers := s.mapper(&schema.Version, schema.ID) + if s.DefaultMappers != nil { + if schema.CanList(nil) == nil { + mappers = append(s.DefaultMappers(), mappers...) + } + } + if s.DefaultPostMappers != nil { + mappers = append(mappers, s.DefaultPostMappers()...) + } + + if len(mappers) > 0 { + copy, err := s.newSchemaFromType(version, t, typeName) + if err != nil { + return nil, err + } + schema.InternalSchema = copy + } + + for _, override := range overrides { + if err := s.readFields(schema, override); err != nil { + return nil, err + } + } + + mapper := &typeMapper{ + Mappers: mappers, + root: schema.CanList(nil) == nil, + } + + if err := mapper.ModifySchema(schema, s); err != nil { + return nil, err + } + + s.setupFilters(schema) + + schema.Mapper = mapper + s.AddSchema(*schema) + + return s.Schema(&schema.Version, schema.ID), s.Err() +} + +func jsonName(f reflect.StructField) string { + return strings.SplitN(f.Tag.Get("json"), ",", 2)[0] +} + +func k8sType(field reflect.StructField) bool { + return field.Type.Name() == "TypeMeta" && + strings.HasSuffix(field.Type.PkgPath(), "k8s.io/apimachinery/pkg/apis/meta/v1") +} + +func k8sObject(field reflect.StructField) bool { + return field.Type.Name() == "ObjectMeta" && + strings.HasSuffix(field.Type.PkgPath(), "k8s.io/apimachinery/pkg/apis/meta/v1") +} + +func (s *Schemas) readFields(schema *Schema, t reflect.Type) error { + if t == resourceType { + schema.CollectionMethods = []string{"GET", "POST"} + schema.ResourceMethods = []string{"GET", "PUT", "DELETE"} + } + + hasType := false + hasMeta := false + + for i := 0; i < t.NumField(); i++ { + field := t.Field(i) + + if field.PkgPath != "" { + // unexported field + continue + } + + jsonName := jsonName(field) + if jsonName == "-" { + continue + } + + if field.Anonymous && jsonName == "" && k8sType(field) { + hasType = true + } + + if field.Anonymous && jsonName == "metadata" && k8sObject(field) { + hasMeta = true + } + + if field.Anonymous && jsonName == "" { + t := field.Type + if t.Kind() == reflect.Ptr { + t = t.Elem() + } + if t.Kind() == reflect.Struct { + if t == namespacedType { + schema.Scope = NamespaceScope + } + if err := s.readFields(schema, t); err != nil { + return err + } + } + continue + } + + fieldName := jsonName + if fieldName == "" { + fieldName = convert.LowerTitle(field.Name) + if strings.HasSuffix(fieldName, "ID") { + fieldName = strings.TrimSuffix(fieldName, "ID") + "Id" + } + } + + if skipNames[fieldName] { + logrus.Tracef("Ignoring skip field %s.%s for %v", schema.ID, fieldName, field) + continue + } + + logrus.Tracef("Inspecting field %s.%s for %v", schema.ID, fieldName, field) + + schemaField := Field{ + Create: true, + Update: true, + Nullable: true, + CodeName: field.Name, + } + + fieldType := field.Type + if fieldType.Kind() == reflect.Ptr { + schemaField.Nullable = true + fieldType = fieldType.Elem() + } else if fieldType.Kind() == reflect.Bool { + schemaField.Nullable = false + schemaField.Default = false + } else if fieldType.Kind() == reflect.Int || + fieldType.Kind() == reflect.Uint32 || + fieldType.Kind() == reflect.Int32 || + fieldType.Kind() == reflect.Uint64 || + fieldType.Kind() == reflect.Int64 || + fieldType.Kind() == reflect.Float32 || + fieldType.Kind() == reflect.Float64 { + schemaField.Nullable = false + schemaField.Default = 0 + } + + if err := applyTag(&field, &schemaField); err != nil { + return err + } + + if schemaField.Type == "" { + inferedType, err := s.determineSchemaType(&schema.Version, fieldType) + if err != nil { + return fmt.Errorf("failed inspecting type %s, field %s: %v", t, fieldName, err) + } + schemaField.Type = inferedType + } + + if schemaField.Default != nil { + switch schemaField.Type { + case "int": + n, err := convert.ToNumber(schemaField.Default) + if err != nil { + return err + } + schemaField.Default = n + case "float": + n, err := convert.ToFloat(schemaField.Default) + if err != nil { + return err + } + schemaField.Default = n + case "boolean": + schemaField.Default = convert.ToBool(schemaField.Default) + } + } + + logrus.Tracef("Setting field %s.%s: %#v", schema.ID, fieldName, schemaField) + schema.ResourceFields[fieldName] = schemaField + } + + if hasType && hasMeta { + schema.CollectionMethods = []string{"GET", "POST"} + schema.ResourceMethods = []string{"GET", "PUT", "DELETE"} + } + + return nil +} + +func applyTag(structField *reflect.StructField, field *Field) error { + for _, part := range strings.Split(structField.Tag.Get("norman"), ",") { + if part == "" { + continue + } + + var err error + key, value := getKeyValue(part) + + switch key { + case "type": + field.Type = value + case "codeName": + field.CodeName = value + case "default": + field.Default = value + case "nullable": + field.Nullable = true + case "notnullable": + field.Nullable = false + case "nocreate": + field.Create = false + case "writeOnly": + field.WriteOnly = true + case "required": + field.Required = true + case "noupdate": + field.Update = false + case "minLength": + field.MinLength, err = toInt(value, structField) + case "maxLength": + field.MaxLength, err = toInt(value, structField) + case "min": + field.Min, err = toInt(value, structField) + case "max": + field.Max, err = toInt(value, structField) + case "options": + field.Options = split(value) + if field.Type == "" { + field.Type = "enum" + } + case "validChars": + field.ValidChars = value + case "invalidChars": + field.InvalidChars = value + case "pointer": + field.Pointer = true + default: + return fmt.Errorf("invalid tag %s on field %s", key, structField.Name) + } + + if err != nil { + return err + } + } + + return nil +} + +func toInt(value string, structField *reflect.StructField) (*int64, error) { + i, err := strconv.ParseInt(value, 10, 64) + if err != nil { + return nil, fmt.Errorf("invalid number on field %s: %v", structField.Name, err) + } + return &i, nil +} + +func split(input string) []string { + result := []string{} + for _, i := range strings.Split(input, "|") { + for _, part := range strings.Split(i, " ") { + part = strings.TrimSpace(part) + if len(part) > 0 { + result = append(result, part) + } + } + } + + return result +} + +func getKeyValue(input string) (string, string) { + var ( + key, value string + ) + parts := strings.SplitN(input, "=", 2) + key = parts[0] + if len(parts) > 1 { + value = parts[1] + } + + return key, value +} + +func deRef(p reflect.Type) reflect.Type { + if p.Kind() == reflect.Ptr { + return p.Elem() + } + return p +} + +func (s *Schemas) determineSchemaType(version *APIVersion, t reflect.Type) (string, error) { + switch t.Kind() { + case reflect.Uint8: + return "byte", nil + case reflect.Bool: + return "boolean", nil + case reflect.Int: + fallthrough + case reflect.Int32: + fallthrough + case reflect.Uint32: + fallthrough + case reflect.Uint64: + fallthrough + case reflect.Int64: + return "int", nil + case reflect.Float32: + fallthrough + case reflect.Float64: + return "float", nil + case reflect.Interface: + return "json", nil + case reflect.Map: + subType, err := s.determineSchemaType(version, deRef(t.Elem())) + if err != nil { + return "", err + } + return fmt.Sprintf("map[%s]", subType), nil + case reflect.Slice: + subType, err := s.determineSchemaType(version, deRef(t.Elem())) + if err != nil { + return "", err + } + if subType == "byte" { + return "base64", nil + } + return fmt.Sprintf("array[%s]", subType), nil + case reflect.String: + return "string", nil + case reflect.Struct: + if t.Name() == "Time" { + return "date", nil + } + if t.Name() == "IntOrString" { + return "intOrString", nil + } + if t.Name() == "Quantity" { + return "string", nil + } + schema, err := s.importType(version, t) + if err != nil { + return "", err + } + return schema.ID, nil + default: + return "", fmt.Errorf("unknown type kind %s", t.Kind()) + } + +} diff --git a/vendor/github.com/rancher/norman/types/schema_funcs.go b/vendor/github.com/rancher/norman/types/schema_funcs.go new file mode 100644 index 000000000..f104728af --- /dev/null +++ b/vendor/github.com/rancher/norman/types/schema_funcs.go @@ -0,0 +1,73 @@ +package types + +import ( + "net/http" + + "github.com/rancher/norman/httperror" + "github.com/rancher/norman/types/slice" +) + +func (s *Schema) MustCustomizeField(name string, f func(f Field) Field) *Schema { + field, ok := s.ResourceFields[name] + if !ok { + panic("Failed to find field " + name + " on schema " + s.ID) + } + s.ResourceFields[name] = f(field) + return s +} + +func (v *APIVersion) Equals(other *APIVersion) bool { + return v.Version == other.Version && + v.Group == other.Group && + v.Path == other.Path +} + +func (s *Schema) CanList(context *APIContext) error { + if context == nil { + if slice.ContainsString(s.CollectionMethods, http.MethodGet) { + return nil + } + return httperror.NewAPIError(httperror.PermissionDenied, "can not list "+s.ID) + } + return context.AccessControl.CanList(context, s) +} + +func (s *Schema) CanGet(context *APIContext) error { + if context == nil { + if slice.ContainsString(s.ResourceMethods, http.MethodGet) { + return nil + } + return httperror.NewAPIError(httperror.PermissionDenied, "can not get "+s.ID) + } + return context.AccessControl.CanGet(context, s) +} + +func (s *Schema) CanCreate(context *APIContext) error { + if context == nil { + if slice.ContainsString(s.CollectionMethods, http.MethodPost) { + return nil + } + return httperror.NewAPIError(httperror.PermissionDenied, "can not create "+s.ID) + } + return context.AccessControl.CanCreate(context, s) +} + +func (s *Schema) CanUpdate(context *APIContext) error { + if context == nil { + if slice.ContainsString(s.ResourceMethods, http.MethodPut) { + return nil + } + return httperror.NewAPIError(httperror.PermissionDenied, "can not update "+s.ID) + } + return context.AccessControl.CanUpdate(context, nil, s) +} + +func (s *Schema) CanDelete(context *APIContext) error { + if context == nil { + if slice.ContainsString(s.ResourceMethods, http.MethodDelete) { + return nil + } + return httperror.NewAPIError(httperror.PermissionDenied, "can not delete "+s.ID) + } + return context.AccessControl.CanDelete(context, nil, s) +} diff --git a/vendor/github.com/rancher/norman/types/schemas.go b/vendor/github.com/rancher/norman/types/schemas.go new file mode 100644 index 000000000..30819bba6 --- /dev/null +++ b/vendor/github.com/rancher/norman/types/schemas.go @@ -0,0 +1,407 @@ +package types + +import ( + "bytes" + "fmt" + "reflect" + "strings" + "sync" + + "github.com/rancher/norman/types/convert" + "github.com/rancher/norman/types/definition" + "github.com/rancher/wrangler/v3/pkg/name" +) + +type SchemaCollection struct { + Data []Schema +} + +type SchemasInitFunc func(*Schemas) *Schemas + +type SchemaHook func(*Schema) + +type MappersFactory func() []Mapper + +type BackReference struct { + FieldName string + Schema *Schema +} + +type Schemas struct { + sync.Mutex + processingTypes map[reflect.Type]*Schema + typeNames map[reflect.Type]string + schemasByPath map[string]map[string]*Schema + mappers map[string]map[string][]Mapper + references map[string][]BackReference + embedded map[string]*Schema + DefaultMappers MappersFactory + DefaultPostMappers MappersFactory + versions []APIVersion + schemas []*Schema + AddHook SchemaHook + errors []error +} + +func NewSchemas() *Schemas { + return &Schemas{ + processingTypes: map[reflect.Type]*Schema{}, + typeNames: map[reflect.Type]string{}, + schemasByPath: map[string]map[string]*Schema{}, + mappers: map[string]map[string][]Mapper{}, + references: map[string][]BackReference{}, + embedded: map[string]*Schema{}, + } +} + +func (s *Schemas) Init(initFunc SchemasInitFunc) *Schemas { + return initFunc(s) +} + +func (s *Schemas) Err() error { + return NewErrors(s.errors...) +} + +func (s *Schemas) AddSchemas(schema *Schemas) *Schemas { + for _, schema := range schema.Schemas() { + s.AddSchema(*schema) + } + return s +} + +func (s *Schemas) RemoveSchema(schema Schema) *Schemas { + s.Lock() + defer s.Unlock() + return s.doRemoveSchema(schema) +} + +func (s *Schemas) doRemoveSchema(schema Schema) *Schemas { + delete(s.schemasByPath[schema.Version.Path], schema.ID) + + s.removeReferences(&schema) + + if schema.Embed { + s.removeEmbed(&schema) + } + + return s +} + +func (s *Schemas) removeReferences(schema *Schema) { + for name, values := range s.references { + changed := false + var modified []BackReference + for _, value := range values { + if value.Schema.ID == schema.ID && value.Schema.Version.Path == schema.Version.Path { + changed = true + continue + } + modified = append(modified, value) + } + + if changed { + s.references[name] = modified + } + } +} + +func (s *Schemas) AddSchema(schema Schema) *Schemas { + s.Lock() + defer s.Unlock() + return s.doAddSchema(schema, false) +} + +func (s *Schemas) ForceAddSchema(schema Schema) *Schemas { + s.Lock() + defer s.Unlock() + return s.doAddSchema(schema, true) +} + +func (s *Schemas) doAddSchema(schema Schema, replace bool) *Schemas { + s.setupDefaults(&schema) + + if s.AddHook != nil { + s.AddHook(&schema) + } + + schemas, ok := s.schemasByPath[schema.Version.Path] + if !ok { + schemas = map[string]*Schema{} + s.schemasByPath[schema.Version.Path] = schemas + s.versions = append(s.versions, schema.Version) + } + + if _, ok := schemas[schema.ID]; !ok || + (replace && schema.DynamicSchemaVersion != schemas[schema.ID].DynamicSchemaVersion) { + schemas[schema.ID] = &schema + + if replace { + for i, candidate := range s.schemas { + if candidate.ID == schema.ID { + s.schemas[i] = &schema + break + } + } + } else { + s.schemas = append(s.schemas, &schema) + } + + if !schema.Embed { + s.addReferences(&schema) + } + } + + if schema.Embed { + s.embed(&schema) + } + + return s +} + +func (s *Schemas) removeEmbed(schema *Schema) { + target := s.doSchema(&schema.Version, schema.EmbedType, false) + if target == nil { + return + } + + newSchema := *target + newSchema.ResourceFields = map[string]Field{} + + for k, v := range target.ResourceFields { + newSchema.ResourceFields[k] = v + } + + for k := range schema.ResourceFields { + delete(newSchema.ResourceFields, k) + } + + s.doRemoveSchema(*target) + s.doAddSchema(newSchema, false) +} + +func (s *Schemas) embed(schema *Schema) { + target := s.doSchema(&schema.Version, schema.EmbedType, false) + if target == nil { + return + } + + newSchema := *target + newSchema.ResourceFields = map[string]Field{} + + for k, v := range target.ResourceFields { + // We remove the dynamic fields off the existing schema in case + // they've been removed from the dynamic schema so they won't + // be accidentally left over + if !v.DynamicField { + newSchema.ResourceFields[k] = v + } + } + for k, v := range schema.ResourceFields { + newSchema.ResourceFields[k] = v + } + + s.doRemoveSchema(*target) + s.doAddSchema(newSchema, false) +} + +func (s *Schemas) addReferences(schema *Schema) { + for name, field := range schema.ResourceFields { + if !definition.IsReferenceType(field.Type) { + continue + } + + refType := definition.SubType(field.Type) + if !strings.HasPrefix(refType, "/") { + refType = convert.ToFullReference(schema.Version.Path, refType) + } + + s.references[refType] = append(s.references[refType], BackReference{ + FieldName: name, + Schema: schema, + }) + } +} + +func (s *Schemas) setupDefaults(schema *Schema) { + schema.Type = "/meta/schemas/schema" + if schema.ID == "" { + s.errors = append(s.errors, fmt.Errorf("ID is not set on schema: %v", schema)) + return + } + if schema.Version.Path == "" || schema.Version.Version == "" { + s.errors = append(s.errors, fmt.Errorf("version is not set on schema: %s", schema.ID)) + return + } + if schema.PluralName == "" { + schema.PluralName = name.GuessPluralName(schema.ID) + } + if schema.CodeName == "" { + schema.CodeName = convert.Capitalize(schema.ID) + } + if schema.CodeNamePlural == "" { + schema.CodeNamePlural = name.GuessPluralName(schema.CodeName) + } + if schema.BaseType == "" { + schema.BaseType = schema.ID + } +} + +func (s *Schemas) References(schema *Schema) []BackReference { + refType := convert.ToFullReference(schema.Version.Path, schema.ID) + s.Lock() + defer s.Unlock() + return s.references[refType] +} + +func (s *Schemas) AddMapper(version *APIVersion, schemaID string, mapper Mapper) *Schemas { + mappers, ok := s.mappers[version.Path] + if !ok { + mappers = map[string][]Mapper{} + s.mappers[version.Path] = mappers + } + + mappers[schemaID] = append(mappers[schemaID], mapper) + return s +} + +func (s *Schemas) SchemasForVersion(version APIVersion) map[string]*Schema { + s.Lock() + defer s.Unlock() + return s.schemasByPath[version.Path] +} + +func (s *Schemas) Versions() []APIVersion { + return s.versions +} + +func (s *Schemas) Schemas() []*Schema { + return s.schemas +} + +func (s *Schemas) mapper(version *APIVersion, name string) []Mapper { + var ( + path string + ) + + if strings.Contains(name, "/") { + idx := strings.LastIndex(name, "/") + path = name[0:idx] + name = name[idx+1:] + } else if version != nil { + path = version.Path + } else { + path = "core" + } + + mappers, ok := s.mappers[path] + if !ok { + return nil + } + + mapper := mappers[name] + if mapper != nil { + return mapper + } + + return nil +} + +func (s *Schemas) Schema(version *APIVersion, name string) *Schema { + return s.doSchema(version, name, true) +} + +func (s *Schemas) doSchema(version *APIVersion, name string, lock bool) *Schema { + var ( + path string + ) + + if strings.Contains(name, "/schemas/") { + parts := strings.SplitN(name, "/schemas/", 2) + path = parts[0] + name = parts[1] + } else if version != nil { + path = version.Path + } else { + path = "core" + } + + if lock { + s.Lock() + defer s.Unlock() + } + schemas, ok := s.schemasByPath[path] + if !ok { + return nil + } + + schema := schemas[name] + if schema != nil { + return schema + } + + for _, check := range schemas { + if strings.EqualFold(check.ID, name) || strings.EqualFold(check.PluralName, name) { + return check + } + } + + return nil +} + +func (s *Schemas) SubContextVersionForSchema(schema *Schema) *APIVersion { + fullName := fmt.Sprintf("%s/schemas/%s", schema.Version.Path, schema.ID) + for _, version := range s.Versions() { + if version.SubContextSchema == fullName { + return &version + } + } + return nil +} + +type MultiErrors struct { + Errors []error +} + +type Errors struct { + errors []error +} + +func (e *Errors) Add(err error) { + if err != nil { + e.errors = append(e.errors, err) + } +} + +func (e *Errors) Err() error { + return NewErrors(e.errors...) +} + +func NewErrors(inErrors ...error) error { + var errors []error + for _, err := range inErrors { + if err != nil { + errors = append(errors, err) + } + } + + if len(errors) == 0 { + return nil + } else if len(errors) == 1 { + return errors[0] + } + return &MultiErrors{ + Errors: errors, + } +} + +func (m *MultiErrors) Error() string { + buf := bytes.NewBuffer(nil) + for _, err := range m.Errors { + if buf.Len() > 0 { + buf.WriteString(", ") + } + buf.WriteString(err.Error()) + } + + return buf.String() +} diff --git a/vendor/github.com/rancher/norman/types/server_types.go b/vendor/github.com/rancher/norman/types/server_types.go new file mode 100644 index 000000000..70d6b6905 --- /dev/null +++ b/vendor/github.com/rancher/norman/types/server_types.go @@ -0,0 +1,238 @@ +package types + +import ( + "context" + "encoding/json" + "net/http" + "net/url" +) + +type ValuesMap struct { + Foo map[string]interface{} +} + +type RawResource struct { + ID string `json:"id,omitempty" yaml:"id,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + Schema *Schema `json:"-" yaml:"-"` + Links map[string]string `json:"links,omitempty" yaml:"links,omitempty"` + Actions map[string]string `json:"actions,omitempty" yaml:"actions,omitempty"` + Values map[string]interface{} `json:",inline" yaml:",inline"` + ActionLinks bool `json:"-" yaml:"-"` + DropReadOnly bool `json:"-" yaml:"-"` +} + +func (r *RawResource) AddAction(apiContext *APIContext, name string) { + r.Actions[name] = apiContext.URLBuilder.Action(name, r) +} + +func (r *RawResource) MarshalJSON() ([]byte, error) { + return json.Marshal(r.ToMap()) +} + +func (r *RawResource) ToMap() map[string]interface{} { + data := map[string]interface{}{} + for k, v := range r.Values { + data[k] = v + } + + if r.ID != "" && !r.DropReadOnly { + data["id"] = r.ID + } + + if r.Type != "" && !r.DropReadOnly { + data["type"] = r.Type + } + if r.Schema.BaseType != "" && !r.DropReadOnly { + data["baseType"] = r.Schema.BaseType + } + + if len(r.Links) > 0 && !r.DropReadOnly { + data["links"] = r.Links + } + + if len(r.Actions) > 0 && !r.DropReadOnly { + if r.ActionLinks { + data["actionLinks"] = r.Actions + } else { + data["actions"] = r.Actions + } + } + return data +} + +type ActionHandler func(actionName string, action *Action, request *APIContext) error + +type RequestHandler func(request *APIContext, next RequestHandler) error + +type QueryFilter func(opts *QueryOptions, schema *Schema, data []map[string]interface{}) []map[string]interface{} + +type Validator func(request *APIContext, schema *Schema, data map[string]interface{}) error + +type InputFormatter func(request *APIContext, schema *Schema, data map[string]interface{}, create bool) error + +type Formatter func(request *APIContext, resource *RawResource) + +type CollectionFormatter func(request *APIContext, collection *GenericCollection) + +type ErrorHandler func(request *APIContext, err error) + +type SubContextAttributeProvider interface { + Query(apiContext *APIContext, schema *Schema) []*QueryCondition + Create(apiContext *APIContext, schema *Schema) map[string]interface{} +} + +type ResponseWriter interface { + Write(apiContext *APIContext, code int, obj interface{}) +} + +type AccessControl interface { + CanCreate(apiContext *APIContext, schema *Schema) error + CanList(apiContext *APIContext, schema *Schema) error + CanGet(apiContext *APIContext, schema *Schema) error + CanUpdate(apiContext *APIContext, obj map[string]interface{}, schema *Schema) error + CanDelete(apiContext *APIContext, obj map[string]interface{}, schema *Schema) error + // CanDo function should not yet be used if a corresponding specific method exists. It has been added to + // satisfy a specific usecase for the short term until full-blown dynamic RBAC can be implemented. + CanDo(apiGroup, resource, verb string, apiContext *APIContext, obj map[string]interface{}, schema *Schema) error + + Filter(apiContext *APIContext, schema *Schema, obj map[string]interface{}, context map[string]string) map[string]interface{} + FilterList(apiContext *APIContext, schema *Schema, obj []map[string]interface{}, context map[string]string) []map[string]interface{} +} + +type APIContext struct { + Action string + ID string + Type string + Link string + Method string + Schema *Schema + Schemas *Schemas + Version *APIVersion + SchemasVersion *APIVersion + Query url.Values + ResponseFormat string + ReferenceValidator ReferenceValidator + ResponseWriter ResponseWriter + QueryFilter QueryFilter + SubContextAttributeProvider SubContextAttributeProvider + URLBuilder URLBuilder + AccessControl AccessControl + SubContext map[string]string + Pagination *Pagination + + Request *http.Request + Response http.ResponseWriter +} + +type apiContextKey struct{} + +func NewAPIContext(req *http.Request, resp http.ResponseWriter, schemas *Schemas) *APIContext { + apiCtx := &APIContext{ + Response: resp, + Schemas: schemas, + } + ctx := context.WithValue(req.Context(), apiContextKey{}, apiCtx) + apiCtx.Request = req.WithContext(ctx) + return apiCtx +} + +func GetAPIContext(ctx context.Context) *APIContext { + apiContext, _ := ctx.Value(apiContextKey{}).(*APIContext) + return apiContext +} + +func (r *APIContext) Option(key string) string { + return r.Query.Get("_" + key) +} + +func (r *APIContext) WriteResponse(code int, obj interface{}) { + r.ResponseWriter.Write(r, code, obj) +} + +func (r *APIContext) FilterList(opts *QueryOptions, schema *Schema, obj []map[string]interface{}) []map[string]interface{} { + return r.QueryFilter(opts, schema, obj) +} + +func (r *APIContext) FilterObject(opts *QueryOptions, schema *Schema, obj map[string]interface{}) map[string]interface{} { + opts.Pagination = nil + result := r.QueryFilter(opts, schema, []map[string]interface{}{obj}) + if len(result) == 0 { + return nil + } + return result[0] +} + +func (r *APIContext) Filter(opts *QueryOptions, schema *Schema, obj interface{}) interface{} { + switch v := obj.(type) { + case []map[string]interface{}: + return r.FilterList(opts, schema, v) + case map[string]interface{}: + return r.FilterObject(opts, schema, v) + } + + return nil +} + +type Expire interface { + Expire(apiContext *APIContext, schema *Schema) +} + +func (r *APIContext) ExpireAccessControl(schema *Schema) { + if e, ok := r.AccessControl.(Expire); ok { + e.Expire(r, schema) + } +} + +var ( + ASC = SortOrder("asc") + DESC = SortOrder("desc") +) + +type QueryOptions struct { + Sort Sort + Pagination *Pagination + Conditions []*QueryCondition + Options map[string]string + // Set namespaces to an empty array will result in an empty response + Namespaces []string +} + +type ReferenceValidator interface { + Validate(resourceType, resourceID string) bool + Lookup(resourceType, resourceID string) *RawResource +} + +type URLBuilder interface { + Current() string + Collection(schema *Schema, versionOverride *APIVersion) string + CollectionAction(schema *Schema, versionOverride *APIVersion, action string) string + SubContextCollection(subContext *Schema, contextName string, schema *Schema) string + SchemaLink(schema *Schema) string + ResourceLink(resource *RawResource) string + Link(linkName string, resource *RawResource) string + RelativeToRoot(path string) string + Version(version APIVersion) string + Marker(marker string) string + ReverseSort(order SortOrder) string + Sort(field string) string + SetSubContext(subContext string) + FilterLink(schema *Schema, fieldName string, value string) string + Action(action string, resource *RawResource) string + ResourceLinkByID(schema *Schema, id string) string + ActionLinkByID(schema *Schema, id string, action string) string +} + +type StorageContext string + +var DefaultStorageContext StorageContext + +type Store interface { + Context() StorageContext + ByID(apiContext *APIContext, schema *Schema, id string) (map[string]interface{}, error) + List(apiContext *APIContext, schema *Schema, opt *QueryOptions) ([]map[string]interface{}, error) + Create(apiContext *APIContext, schema *Schema, data map[string]interface{}) (map[string]interface{}, error) + Update(apiContext *APIContext, schema *Schema, data map[string]interface{}, id string) (map[string]interface{}, error) + Delete(apiContext *APIContext, schema *Schema, id string) (map[string]interface{}, error) + Watch(apiContext *APIContext, schema *Schema, opt *QueryOptions) (chan map[string]interface{}, error) +} diff --git a/vendor/github.com/rancher/norman/types/slice/contains.go b/vendor/github.com/rancher/norman/types/slice/contains.go new file mode 100644 index 000000000..10cbac0a1 --- /dev/null +++ b/vendor/github.com/rancher/norman/types/slice/contains.go @@ -0,0 +1,22 @@ +package slice + +func ContainsString(slice []string, item string) bool { + for _, j := range slice { + if j == item { + return true + } + } + return false +} + +func StringsEqual(left, right []string) bool { + if len(left) != len(right) { + return false + } + for i := 0; i < len(left); i++ { + if left[i] != right[i] { + return false + } + } + return true +} diff --git a/vendor/github.com/rancher/norman/types/types.go b/vendor/github.com/rancher/norman/types/types.go new file mode 100644 index 000000000..a0b6301c8 --- /dev/null +++ b/vendor/github.com/rancher/norman/types/types.go @@ -0,0 +1,171 @@ +package types + +const ( + ResourceFieldID = "id" +) + +type Collection struct { + Type string `json:"type,omitempty"` + Links map[string]string `json:"links"` + CreateTypes map[string]string `json:"createTypes,omitempty"` + Actions map[string]string `json:"actions"` + Pagination *Pagination `json:"pagination,omitempty"` + Sort *Sort `json:"sort,omitempty"` + Filters map[string][]Condition `json:"filters,omitempty"` + ResourceType string `json:"resourceType"` +} + +type GenericCollection struct { + Collection + Data []interface{} `json:"data"` +} + +type ResourceCollection struct { + Collection + Data []Resource `json:"data,omitempty"` +} + +type SortOrder string + +type Sort struct { + Name string `json:"name,omitempty"` + Order SortOrder `json:"order,omitempty"` + Reverse string `json:"reverse,omitempty"` + Links map[string]string `json:"links,omitempty"` +} + +var ( + ModifierEQ ModifierType = "eq" + ModifierNE ModifierType = "ne" + ModifierNull ModifierType = "null" + ModifierNotNull ModifierType = "notnull" + ModifierIn ModifierType = "in" + ModifierNotIn ModifierType = "notin" +) + +type ModifierType string + +type Condition struct { + Modifier ModifierType `json:"modifier,omitempty"` + Value interface{} `json:"value,omitempty"` +} + +type Pagination struct { + Marker string `json:"marker,omitempty"` + First string `json:"first,omitempty"` + Previous string `json:"previous,omitempty"` + Next string `json:"next,omitempty"` + Last string `json:"last,omitempty"` + Limit *int64 `json:"limit,omitempty"` + Total *int64 `json:"total,omitempty"` + Partial bool `json:"partial,omitempty"` +} + +type Resource struct { + ID string `json:"id,omitempty"` + Type string `json:"type,omitempty"` + Links map[string]string `json:"links"` + Actions map[string]string `json:"actions"` +} + +type NamedResource struct { + Resource + Name string `json:"name"` + Description string `json:"description"` +} + +type NamedResourceCollection struct { + Collection + Data []NamedResource `json:"data,omitempty"` +} + +type APIVersion struct { + Group string `json:"group,omitempty"` + Version string `json:"version,omitempty"` + Path string `json:"path,omitempty"` + SubContext bool `json:"subContext,omitempty"` + SubContextSchema string `json:"filterField,omitempty"` +} + +type Namespaced struct{} + +var NamespaceScope TypeScope = "namespace" + +type TypeScope string + +type Schema struct { + ID string `json:"id,omitempty"` + Embed bool `json:"embed,omitempty"` + EmbedType string `json:"embedType,omitempty"` + CodeName string `json:"-"` + CodeNamePlural string `json:"-"` + PkgName string `json:"-"` + Type string `json:"type,omitempty"` + BaseType string `json:"baseType,omitempty"` + Links map[string]string `json:"links"` + Version APIVersion `json:"version"` + PluralName string `json:"pluralName,omitempty"` + ResourceMethods []string `json:"resourceMethods,omitempty"` + ResourceFields map[string]Field `json:"resourceFields"` + ResourceActions map[string]Action `json:"resourceActions,omitempty"` + CollectionMethods []string `json:"collectionMethods,omitempty"` + CollectionFields map[string]Field `json:"collectionFields,omitempty"` + CollectionActions map[string]Action `json:"collectionActions,omitempty"` + CollectionFilters map[string]Filter `json:"collectionFilters,omitempty"` + DynamicSchemaVersion string `json:"dynamicSchemaVersion,omitempty"` + Scope TypeScope `json:"-"` + Enabled func() bool `json:"-"` + + InternalSchema *Schema `json:"-"` + Mapper Mapper `json:"-"` + ActionHandler ActionHandler `json:"-"` + LinkHandler RequestHandler `json:"-"` + ListHandler RequestHandler `json:"-"` + CreateHandler RequestHandler `json:"-"` + DeleteHandler RequestHandler `json:"-"` + UpdateHandler RequestHandler `json:"-"` + InputFormatter InputFormatter `json:"-"` + Formatter Formatter `json:"-"` + CollectionFormatter CollectionFormatter `json:"-"` + ErrorHandler ErrorHandler `json:"-"` + Validator Validator `json:"-"` + Store Store `json:"-"` +} + +type Field struct { + Type string `json:"type,omitempty"` + Default interface{} `json:"default,omitempty"` + Nullable bool `json:"nullable,omitempty"` + Create bool `json:"create"` + WriteOnly bool `json:"writeOnly,omitempty"` + Required bool `json:"required,omitempty"` + Update bool `json:"update"` + MinLength *int64 `json:"minLength,omitempty"` + MaxLength *int64 `json:"maxLength,omitempty"` + Min *int64 `json:"min,omitempty"` + Max *int64 `json:"max,omitempty"` + Options []string `json:"options,omitempty"` + ValidChars string `json:"validChars,omitempty"` + InvalidChars string `json:"invalidChars,omitempty"` + Description string `json:"description,omitempty"` + CodeName string `json:"-"` + DynamicField bool `json:"dynamicField,omitempty"` + Pointer bool `json:"pointer,omitempty"` +} + +type Action struct { + Input string `json:"input,omitempty"` + Output string `json:"output,omitempty"` +} + +type Filter struct { + Modifiers []ModifierType `json:"modifiers,omitempty"` +} + +type ListOpts struct { + Filters map[string]interface{} +} + +func (c *Collection) AddAction(apiContext *APIContext, name string) { + c.Actions[name] = apiContext.URLBuilder.CollectionAction(apiContext.Schema, nil, name) +} diff --git a/vendor/github.com/rancher/norman/types/values/values.go b/vendor/github.com/rancher/norman/types/values/values.go new file mode 100644 index 000000000..0ec044578 --- /dev/null +++ b/vendor/github.com/rancher/norman/types/values/values.go @@ -0,0 +1,111 @@ +package values + +import "github.com/rancher/norman/types/convert" + +func RemoveValue(data map[string]interface{}, keys ...string) (interface{}, bool) { + for i, key := range keys { + if i == len(keys)-1 { + val, ok := data[key] + delete(data, key) + return val, ok + } + data, _ = data[key].(map[string]interface{}) + } + + return nil, false +} + +func GetStringSlice(data map[string]interface{}, keys ...string) ([]string, bool) { + val, ok := GetValue(data, keys...) + if !ok { + return nil, ok + } + + slice, typeOk := val.([]string) + if typeOk { + return slice, typeOk + } + + sliceNext, typeOk := val.([]interface{}) + if !typeOk { + return nil, typeOk + } + + var result []string + for _, item := range sliceNext { + result = append(result, convert.ToString(item)) + } + + return result, true +} + +func GetSlice(data map[string]interface{}, keys ...string) ([]map[string]interface{}, bool) { + val, ok := GetValue(data, keys...) + if !ok { + return nil, ok + } + + slice, typeOk := val.([]map[string]interface{}) + if typeOk { + return slice, typeOk + } + + sliceNext, typeOk := val.([]interface{}) + if !typeOk { + return nil, typeOk + } + + result := []map[string]interface{}{} + for _, val := range sliceNext { + if v, ok := val.(map[string]interface{}); ok { + result = append(result, v) + } + } + + return result, true + +} + +func GetValueN(data map[string]interface{}, keys ...string) interface{} { + val, _ := GetValue(data, keys...) + return val +} + +func GetValue(data map[string]interface{}, keys ...string) (interface{}, bool) { + for i, key := range keys { + if i == len(keys)-1 { + val, ok := data[key] + return val, ok + } + data, _ = data[key].(map[string]interface{}) + } + + return nil, false +} + +func PutValue(data map[string]interface{}, val interface{}, keys ...string) { + if data == nil { + return + } + + // This is so ugly + for i, key := range keys { + if i == len(keys)-1 { + data[key] = val + } else { + newData, ok := data[key] + if ok { + newMap, ok := newData.(map[string]interface{}) + if ok { + data = newMap + } else { + return + } + } else { + newMap := map[string]interface{}{} + data[key] = newMap + data = newMap + } + } + } +} diff --git a/vendor/cloud.google.com/go/compute/LICENSE b/vendor/github.com/rancher/rancher/pkg/client/LICENSE similarity index 89% rename from vendor/cloud.google.com/go/compute/LICENSE rename to vendor/github.com/rancher/rancher/pkg/client/LICENSE index d64569567..e454a5258 100644 --- a/vendor/cloud.google.com/go/compute/LICENSE +++ b/vendor/github.com/rancher/rancher/pkg/client/LICENSE @@ -176,27 +176,3 @@ END OF TERMS AND CONDITIONS - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aci_network_provider.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aci_network_provider.go new file mode 100644 index 000000000..7457b0729 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aci_network_provider.go @@ -0,0 +1,238 @@ +package client + +const ( + AciNetworkProviderType = "aciNetworkProvider" + AciNetworkProviderFieldAEP = "aep" + AciNetworkProviderFieldAciContainersControllerMemoryLimit = "aciContainersControllerMemoryLimit" + AciNetworkProviderFieldAciContainersControllerMemoryRequest = "aciContainersControllerMemoryRequest" + AciNetworkProviderFieldAciContainersHostMemoryLimit = "aciContainersHostMemoryLimit" + AciNetworkProviderFieldAciContainersHostMemoryRequest = "aciContainersHostMemoryRequest" + AciNetworkProviderFieldAciContainersMemoryLimit = "aciContainersMemoryLimit" + AciNetworkProviderFieldAciContainersMemoryRequest = "aciContainersMemoryRequest" + AciNetworkProviderFieldAciMultipod = "aciMultipod" + AciNetworkProviderFieldAciMultipodUbuntu = "aciMultipodUbuntu" + AciNetworkProviderFieldAddExternalContractToDefaultEpg = "addExternalContractToDefaultEpg" + AciNetworkProviderFieldAddExternalSubnetsToRdconfig = "addExternalSubnetsToRdconfig" + AciNetworkProviderFieldApicConnectionRetryLimit = "apicConnectionRetryLimit" + AciNetworkProviderFieldApicHosts = "apicHosts" + AciNetworkProviderFieldApicRefreshTickerAdjust = "apicRefreshTickerAdjust" + AciNetworkProviderFieldApicRefreshTime = "apicRefreshTime" + AciNetworkProviderFieldApicSubscriptionDelay = "apicSubscriptionDelay" + AciNetworkProviderFieldApicUserCrt = "apicUserCrt" + AciNetworkProviderFieldApicUserKey = "apicUserKey" + AciNetworkProviderFieldApicUserName = "apicUserName" + AciNetworkProviderFieldCApic = "capic" + AciNetworkProviderFieldControllerLogLevel = "controllerLogLevel" + AciNetworkProviderFieldDhcpDelay = "dhcpDelay" + AciNetworkProviderFieldDhcpRenewMaxRetryCount = "dhcpRenewMaxRetryCount" + AciNetworkProviderFieldDisableHppRendering = "disableHppRendering" + AciNetworkProviderFieldDisablePeriodicSnatGlobalInfoSync = "disablePeriodicSnatGlobalInfoSync" + AciNetworkProviderFieldDisableWaitForNetwork = "disableWaitForNetwork" + AciNetworkProviderFieldDropLogDisableEvents = "dropLogDisableEvents" + AciNetworkProviderFieldDropLogEnable = "dropLogEnable" + AciNetworkProviderFieldDurationWaitForNetwork = "durationWaitForNetwork" + AciNetworkProviderFieldDynamicExternalSubnet = "externDynamic" + AciNetworkProviderFieldEnableEndpointSlice = "enableEndpointSlice" + AciNetworkProviderFieldEnableOpflexAgentReconnect = "enableOpflexAgentReconnect" + AciNetworkProviderFieldEncapType = "encapType" + AciNetworkProviderFieldEpRegistry = "epRegistry" + AciNetworkProviderFieldGbpPodSubnet = "gbpPodSubnet" + AciNetworkProviderFieldHostAgentLogLevel = "hostAgentLogLevel" + AciNetworkProviderFieldHppOptimization = "hppOptimization" + AciNetworkProviderFieldImagePullPolicy = "imagePullPolicy" + AciNetworkProviderFieldImagePullSecret = "imagePullSecret" + AciNetworkProviderFieldInfraVlan = "infraVlan" + AciNetworkProviderFieldInstallIstio = "installIstio" + AciNetworkProviderFieldIstioProfile = "istioProfile" + AciNetworkProviderFieldKafkaBrokers = "kafkaBrokers" + AciNetworkProviderFieldKafkaClientCrt = "kafkaClientCrt" + AciNetworkProviderFieldKafkaClientKey = "kafkaClientKey" + AciNetworkProviderFieldKubeAPIVlan = "kubeApiVlan" + AciNetworkProviderFieldL3Out = "l3out" + AciNetworkProviderFieldL3OutExternalNetworks = "l3outExternalNetworks" + AciNetworkProviderFieldMTUHeadRoom = "mtuHeadRoom" + AciNetworkProviderFieldMaxNodesSvcGraph = "maxNodesSvcGraph" + AciNetworkProviderFieldMcastDaemonMemoryLimit = "mcastDaemonMemoryLimit" + AciNetworkProviderFieldMcastDaemonMemoryRequest = "mcastDaemonMemoryRequest" + AciNetworkProviderFieldMcastRangeEnd = "mcastRangeEnd" + AciNetworkProviderFieldMcastRangeStart = "mcastRangeStart" + AciNetworkProviderFieldMultusDisable = "multusDisable" + AciNetworkProviderFieldNoPriorityClass = "noPriorityClass" + AciNetworkProviderFieldNoWaitForServiceEpReadiness = "noWaitForServiceEpReadiness" + AciNetworkProviderFieldNodePodIfEnable = "nodePodIfEnable" + AciNetworkProviderFieldNodeSnatRedirectExclude = "nodeSnatRedirectExclude" + AciNetworkProviderFieldNodeSubnet = "nodeSubnet" + AciNetworkProviderFieldOVSMemoryLimit = "ovsMemoryLimit" + AciNetworkProviderFieldOVSMemoryRequest = "ovsMemoryRequest" + AciNetworkProviderFieldOpflexAgentLogLevel = "opflexLogLevel" + AciNetworkProviderFieldOpflexAgentMemoryLimit = "opflexAgentMemoryLimit" + AciNetworkProviderFieldOpflexAgentMemoryRequest = "opflexAgentMemoryRequest" + AciNetworkProviderFieldOpflexAgentOpflexAsyncjsonEnabled = "opflexAgentOpflexAsyncjsonEnabled" + AciNetworkProviderFieldOpflexAgentOvsAsyncjsonEnabled = "opflexAgentOvsAsyncjsonEnabled" + AciNetworkProviderFieldOpflexAgentPolicyRetryDelayTimer = "opflexAgentPolicyRetryDelayTimer" + AciNetworkProviderFieldOpflexAgentStatistics = "opflexAgentStatistics" + AciNetworkProviderFieldOpflexClientSSL = "opflexClientSsl" + AciNetworkProviderFieldOpflexDeviceDeleteTimeout = "opflexDeviceDeleteTimeout" + AciNetworkProviderFieldOpflexDeviceReconnectWaitTimeout = "opflexDeviceReconnectWaitTimeout" + AciNetworkProviderFieldOpflexMode = "opflexMode" + AciNetworkProviderFieldOpflexOpensslCompat = "opflexOpensslCompat" + AciNetworkProviderFieldOpflexServerPort = "opflexServerPort" + AciNetworkProviderFieldOpflexStartupEnabled = "opflexStartupEnabled" + AciNetworkProviderFieldOpflexStartupPolicyDuration = "opflexStartupPolicyDuration" + AciNetworkProviderFieldOpflexStartupResolveAftConn = "opflexStartupResolveAftConn" + AciNetworkProviderFieldOpflexSwitchSyncDelay = "opflexSwitchSyncDelay" + AciNetworkProviderFieldOpflexSwitchSyncDynamic = "opflexSwitchSyncDynamic" + AciNetworkProviderFieldOverlayVRFName = "overlayVrfName" + AciNetworkProviderFieldPBRTrackingNonSnat = "pbrTrackingNonSnat" + AciNetworkProviderFieldPodSubnetChunkSize = "podSubnetChunkSize" + AciNetworkProviderFieldRunGbpContainer = "runGbpContainer" + AciNetworkProviderFieldRunOpflexServerContainer = "runOpflexServerContainer" + AciNetworkProviderFieldServiceGraphEndpointAddDelay = "serviceGraphEndpointAddDelay" + AciNetworkProviderFieldServiceGraphEndpointAddServices = "serviceGraphEndpointAddServices" + AciNetworkProviderFieldServiceGraphSubnet = "nodeSvcSubnet" + AciNetworkProviderFieldServiceMonitorInterval = "serviceMonitorInterval" + AciNetworkProviderFieldServiceVlan = "serviceVlan" + AciNetworkProviderFieldSleepTimeSnatGlobalInfoSync = "sleepTimeSnatGlobalInfoSync" + AciNetworkProviderFieldSnatContractScope = "snatContractScope" + AciNetworkProviderFieldSnatNamespace = "snatNamespace" + AciNetworkProviderFieldSnatPortRangeEnd = "snatPortRangeEnd" + AciNetworkProviderFieldSnatPortRangeStart = "snatPortRangeStart" + AciNetworkProviderFieldSnatPortsPerNode = "snatPortsPerNode" + AciNetworkProviderFieldSriovEnable = "sriovEnable" + AciNetworkProviderFieldStaticExternalSubnet = "externStatic" + AciNetworkProviderFieldSubnetDomainName = "subnetDomainName" + AciNetworkProviderFieldSystemIdentifier = "systemId" + AciNetworkProviderFieldTaintNotReadyNode = "taintNotReadyNode" + AciNetworkProviderFieldTenant = "tenant" + AciNetworkProviderFieldToken = "token" + AciNetworkProviderFieldTolerationSeconds = "tolerationSeconds" + AciNetworkProviderFieldUseAciAnywhereCRD = "useAciAnywhereCrd" + AciNetworkProviderFieldUseAciCniPriorityClass = "useAciCniPriorityClass" + AciNetworkProviderFieldUseClusterRole = "useClusterRole" + AciNetworkProviderFieldUseHostNetnsVolume = "useHostNetnsVolume" + AciNetworkProviderFieldUseOpflexServerVolume = "useOpflexServerVolume" + AciNetworkProviderFieldUsePrivilegedContainer = "usePrivilegedContainer" + AciNetworkProviderFieldUseSystemNodePriorityClass = "useSystemNodePriorityClass" + AciNetworkProviderFieldVRFName = "vrfName" + AciNetworkProviderFieldVRFTenant = "vrfTenant" + AciNetworkProviderFieldVmmController = "vmmController" + AciNetworkProviderFieldVmmDomain = "vmmDomain" +) + +type AciNetworkProvider struct { + AEP string `json:"aep,omitempty" yaml:"aep,omitempty"` + AciContainersControllerMemoryLimit string `json:"aciContainersControllerMemoryLimit,omitempty" yaml:"aciContainersControllerMemoryLimit,omitempty"` + AciContainersControllerMemoryRequest string `json:"aciContainersControllerMemoryRequest,omitempty" yaml:"aciContainersControllerMemoryRequest,omitempty"` + AciContainersHostMemoryLimit string `json:"aciContainersHostMemoryLimit,omitempty" yaml:"aciContainersHostMemoryLimit,omitempty"` + AciContainersHostMemoryRequest string `json:"aciContainersHostMemoryRequest,omitempty" yaml:"aciContainersHostMemoryRequest,omitempty"` + AciContainersMemoryLimit string `json:"aciContainersMemoryLimit,omitempty" yaml:"aciContainersMemoryLimit,omitempty"` + AciContainersMemoryRequest string `json:"aciContainersMemoryRequest,omitempty" yaml:"aciContainersMemoryRequest,omitempty"` + AciMultipod string `json:"aciMultipod,omitempty" yaml:"aciMultipod,omitempty"` + AciMultipodUbuntu string `json:"aciMultipodUbuntu,omitempty" yaml:"aciMultipodUbuntu,omitempty"` + AddExternalContractToDefaultEpg string `json:"addExternalContractToDefaultEpg,omitempty" yaml:"addExternalContractToDefaultEpg,omitempty"` + AddExternalSubnetsToRdconfig string `json:"addExternalSubnetsToRdconfig,omitempty" yaml:"addExternalSubnetsToRdconfig,omitempty"` + ApicConnectionRetryLimit string `json:"apicConnectionRetryLimit,omitempty" yaml:"apicConnectionRetryLimit,omitempty"` + ApicHosts []string `json:"apicHosts,omitempty" yaml:"apicHosts,omitempty"` + ApicRefreshTickerAdjust string `json:"apicRefreshTickerAdjust,omitempty" yaml:"apicRefreshTickerAdjust,omitempty"` + ApicRefreshTime string `json:"apicRefreshTime,omitempty" yaml:"apicRefreshTime,omitempty"` + ApicSubscriptionDelay string `json:"apicSubscriptionDelay,omitempty" yaml:"apicSubscriptionDelay,omitempty"` + ApicUserCrt string `json:"apicUserCrt,omitempty" yaml:"apicUserCrt,omitempty"` + ApicUserKey string `json:"apicUserKey,omitempty" yaml:"apicUserKey,omitempty"` + ApicUserName string `json:"apicUserName,omitempty" yaml:"apicUserName,omitempty"` + CApic string `json:"capic,omitempty" yaml:"capic,omitempty"` + ControllerLogLevel string `json:"controllerLogLevel,omitempty" yaml:"controllerLogLevel,omitempty"` + DhcpDelay string `json:"dhcpDelay,omitempty" yaml:"dhcpDelay,omitempty"` + DhcpRenewMaxRetryCount string `json:"dhcpRenewMaxRetryCount,omitempty" yaml:"dhcpRenewMaxRetryCount,omitempty"` + DisableHppRendering string `json:"disableHppRendering,omitempty" yaml:"disableHppRendering,omitempty"` + DisablePeriodicSnatGlobalInfoSync string `json:"disablePeriodicSnatGlobalInfoSync,omitempty" yaml:"disablePeriodicSnatGlobalInfoSync,omitempty"` + DisableWaitForNetwork string `json:"disableWaitForNetwork,omitempty" yaml:"disableWaitForNetwork,omitempty"` + DropLogDisableEvents string `json:"dropLogDisableEvents,omitempty" yaml:"dropLogDisableEvents,omitempty"` + DropLogEnable string `json:"dropLogEnable,omitempty" yaml:"dropLogEnable,omitempty"` + DurationWaitForNetwork string `json:"durationWaitForNetwork,omitempty" yaml:"durationWaitForNetwork,omitempty"` + DynamicExternalSubnet string `json:"externDynamic,omitempty" yaml:"externDynamic,omitempty"` + EnableEndpointSlice string `json:"enableEndpointSlice,omitempty" yaml:"enableEndpointSlice,omitempty"` + EnableOpflexAgentReconnect string `json:"enableOpflexAgentReconnect,omitempty" yaml:"enableOpflexAgentReconnect,omitempty"` + EncapType string `json:"encapType,omitempty" yaml:"encapType,omitempty"` + EpRegistry string `json:"epRegistry,omitempty" yaml:"epRegistry,omitempty"` + GbpPodSubnet string `json:"gbpPodSubnet,omitempty" yaml:"gbpPodSubnet,omitempty"` + HostAgentLogLevel string `json:"hostAgentLogLevel,omitempty" yaml:"hostAgentLogLevel,omitempty"` + HppOptimization string `json:"hppOptimization,omitempty" yaml:"hppOptimization,omitempty"` + ImagePullPolicy string `json:"imagePullPolicy,omitempty" yaml:"imagePullPolicy,omitempty"` + ImagePullSecret string `json:"imagePullSecret,omitempty" yaml:"imagePullSecret,omitempty"` + InfraVlan string `json:"infraVlan,omitempty" yaml:"infraVlan,omitempty"` + InstallIstio string `json:"installIstio,omitempty" yaml:"installIstio,omitempty"` + IstioProfile string `json:"istioProfile,omitempty" yaml:"istioProfile,omitempty"` + KafkaBrokers []string `json:"kafkaBrokers,omitempty" yaml:"kafkaBrokers,omitempty"` + KafkaClientCrt string `json:"kafkaClientCrt,omitempty" yaml:"kafkaClientCrt,omitempty"` + KafkaClientKey string `json:"kafkaClientKey,omitempty" yaml:"kafkaClientKey,omitempty"` + KubeAPIVlan string `json:"kubeApiVlan,omitempty" yaml:"kubeApiVlan,omitempty"` + L3Out string `json:"l3out,omitempty" yaml:"l3out,omitempty"` + L3OutExternalNetworks []string `json:"l3outExternalNetworks,omitempty" yaml:"l3outExternalNetworks,omitempty"` + MTUHeadRoom string `json:"mtuHeadRoom,omitempty" yaml:"mtuHeadRoom,omitempty"` + MaxNodesSvcGraph string `json:"maxNodesSvcGraph,omitempty" yaml:"maxNodesSvcGraph,omitempty"` + McastDaemonMemoryLimit string `json:"mcastDaemonMemoryLimit,omitempty" yaml:"mcastDaemonMemoryLimit,omitempty"` + McastDaemonMemoryRequest string `json:"mcastDaemonMemoryRequest,omitempty" yaml:"mcastDaemonMemoryRequest,omitempty"` + McastRangeEnd string `json:"mcastRangeEnd,omitempty" yaml:"mcastRangeEnd,omitempty"` + McastRangeStart string `json:"mcastRangeStart,omitempty" yaml:"mcastRangeStart,omitempty"` + MultusDisable string `json:"multusDisable,omitempty" yaml:"multusDisable,omitempty"` + NoPriorityClass string `json:"noPriorityClass,omitempty" yaml:"noPriorityClass,omitempty"` + NoWaitForServiceEpReadiness string `json:"noWaitForServiceEpReadiness,omitempty" yaml:"noWaitForServiceEpReadiness,omitempty"` + NodePodIfEnable string `json:"nodePodIfEnable,omitempty" yaml:"nodePodIfEnable,omitempty"` + NodeSnatRedirectExclude []map[string]string `json:"nodeSnatRedirectExclude,omitempty" yaml:"nodeSnatRedirectExclude,omitempty"` + NodeSubnet string `json:"nodeSubnet,omitempty" yaml:"nodeSubnet,omitempty"` + OVSMemoryLimit string `json:"ovsMemoryLimit,omitempty" yaml:"ovsMemoryLimit,omitempty"` + OVSMemoryRequest string `json:"ovsMemoryRequest,omitempty" yaml:"ovsMemoryRequest,omitempty"` + OpflexAgentLogLevel string `json:"opflexLogLevel,omitempty" yaml:"opflexLogLevel,omitempty"` + OpflexAgentMemoryLimit string `json:"opflexAgentMemoryLimit,omitempty" yaml:"opflexAgentMemoryLimit,omitempty"` + OpflexAgentMemoryRequest string `json:"opflexAgentMemoryRequest,omitempty" yaml:"opflexAgentMemoryRequest,omitempty"` + OpflexAgentOpflexAsyncjsonEnabled string `json:"opflexAgentOpflexAsyncjsonEnabled,omitempty" yaml:"opflexAgentOpflexAsyncjsonEnabled,omitempty"` + OpflexAgentOvsAsyncjsonEnabled string `json:"opflexAgentOvsAsyncjsonEnabled,omitempty" yaml:"opflexAgentOvsAsyncjsonEnabled,omitempty"` + OpflexAgentPolicyRetryDelayTimer string `json:"opflexAgentPolicyRetryDelayTimer,omitempty" yaml:"opflexAgentPolicyRetryDelayTimer,omitempty"` + OpflexAgentStatistics string `json:"opflexAgentStatistics,omitempty" yaml:"opflexAgentStatistics,omitempty"` + OpflexClientSSL string `json:"opflexClientSsl,omitempty" yaml:"opflexClientSsl,omitempty"` + OpflexDeviceDeleteTimeout string `json:"opflexDeviceDeleteTimeout,omitempty" yaml:"opflexDeviceDeleteTimeout,omitempty"` + OpflexDeviceReconnectWaitTimeout string `json:"opflexDeviceReconnectWaitTimeout,omitempty" yaml:"opflexDeviceReconnectWaitTimeout,omitempty"` + OpflexMode string `json:"opflexMode,omitempty" yaml:"opflexMode,omitempty"` + OpflexOpensslCompat string `json:"opflexOpensslCompat,omitempty" yaml:"opflexOpensslCompat,omitempty"` + OpflexServerPort string `json:"opflexServerPort,omitempty" yaml:"opflexServerPort,omitempty"` + OpflexStartupEnabled string `json:"opflexStartupEnabled,omitempty" yaml:"opflexStartupEnabled,omitempty"` + OpflexStartupPolicyDuration string `json:"opflexStartupPolicyDuration,omitempty" yaml:"opflexStartupPolicyDuration,omitempty"` + OpflexStartupResolveAftConn string `json:"opflexStartupResolveAftConn,omitempty" yaml:"opflexStartupResolveAftConn,omitempty"` + OpflexSwitchSyncDelay string `json:"opflexSwitchSyncDelay,omitempty" yaml:"opflexSwitchSyncDelay,omitempty"` + OpflexSwitchSyncDynamic string `json:"opflexSwitchSyncDynamic,omitempty" yaml:"opflexSwitchSyncDynamic,omitempty"` + OverlayVRFName string `json:"overlayVrfName,omitempty" yaml:"overlayVrfName,omitempty"` + PBRTrackingNonSnat string `json:"pbrTrackingNonSnat,omitempty" yaml:"pbrTrackingNonSnat,omitempty"` + PodSubnetChunkSize string `json:"podSubnetChunkSize,omitempty" yaml:"podSubnetChunkSize,omitempty"` + RunGbpContainer string `json:"runGbpContainer,omitempty" yaml:"runGbpContainer,omitempty"` + RunOpflexServerContainer string `json:"runOpflexServerContainer,omitempty" yaml:"runOpflexServerContainer,omitempty"` + ServiceGraphEndpointAddDelay string `json:"serviceGraphEndpointAddDelay,omitempty" yaml:"serviceGraphEndpointAddDelay,omitempty"` + ServiceGraphEndpointAddServices []map[string]string `json:"serviceGraphEndpointAddServices,omitempty" yaml:"serviceGraphEndpointAddServices,omitempty"` + ServiceGraphSubnet string `json:"nodeSvcSubnet,omitempty" yaml:"nodeSvcSubnet,omitempty"` + ServiceMonitorInterval string `json:"serviceMonitorInterval,omitempty" yaml:"serviceMonitorInterval,omitempty"` + ServiceVlan string `json:"serviceVlan,omitempty" yaml:"serviceVlan,omitempty"` + SleepTimeSnatGlobalInfoSync string `json:"sleepTimeSnatGlobalInfoSync,omitempty" yaml:"sleepTimeSnatGlobalInfoSync,omitempty"` + SnatContractScope string `json:"snatContractScope,omitempty" yaml:"snatContractScope,omitempty"` + SnatNamespace string `json:"snatNamespace,omitempty" yaml:"snatNamespace,omitempty"` + SnatPortRangeEnd string `json:"snatPortRangeEnd,omitempty" yaml:"snatPortRangeEnd,omitempty"` + SnatPortRangeStart string `json:"snatPortRangeStart,omitempty" yaml:"snatPortRangeStart,omitempty"` + SnatPortsPerNode string `json:"snatPortsPerNode,omitempty" yaml:"snatPortsPerNode,omitempty"` + SriovEnable string `json:"sriovEnable,omitempty" yaml:"sriovEnable,omitempty"` + StaticExternalSubnet string `json:"externStatic,omitempty" yaml:"externStatic,omitempty"` + SubnetDomainName string `json:"subnetDomainName,omitempty" yaml:"subnetDomainName,omitempty"` + SystemIdentifier string `json:"systemId,omitempty" yaml:"systemId,omitempty"` + TaintNotReadyNode string `json:"taintNotReadyNode,omitempty" yaml:"taintNotReadyNode,omitempty"` + Tenant string `json:"tenant,omitempty" yaml:"tenant,omitempty"` + Token string `json:"token,omitempty" yaml:"token,omitempty"` + TolerationSeconds string `json:"tolerationSeconds,omitempty" yaml:"tolerationSeconds,omitempty"` + UseAciAnywhereCRD string `json:"useAciAnywhereCrd,omitempty" yaml:"useAciAnywhereCrd,omitempty"` + UseAciCniPriorityClass string `json:"useAciCniPriorityClass,omitempty" yaml:"useAciCniPriorityClass,omitempty"` + UseClusterRole string `json:"useClusterRole,omitempty" yaml:"useClusterRole,omitempty"` + UseHostNetnsVolume string `json:"useHostNetnsVolume,omitempty" yaml:"useHostNetnsVolume,omitempty"` + UseOpflexServerVolume string `json:"useOpflexServerVolume,omitempty" yaml:"useOpflexServerVolume,omitempty"` + UsePrivilegedContainer string `json:"usePrivilegedContainer,omitempty" yaml:"usePrivilegedContainer,omitempty"` + UseSystemNodePriorityClass string `json:"useSystemNodePriorityClass,omitempty" yaml:"useSystemNodePriorityClass,omitempty"` + VRFName string `json:"vrfName,omitempty" yaml:"vrfName,omitempty"` + VRFTenant string `json:"vrfTenant,omitempty" yaml:"vrfTenant,omitempty"` + VmmController string `json:"vmmController,omitempty" yaml:"vmmController,omitempty"` + VmmDomain string `json:"vmmDomain,omitempty" yaml:"vmmDomain,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_action.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_action.go new file mode 100644 index 000000000..6e6334bd1 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_action.go @@ -0,0 +1,12 @@ +package client + +const ( + ActionType = "action" + ActionFieldInput = "input" + ActionFieldOutput = "output" +) + +type Action struct { + Input string `json:"input,omitempty" yaml:"input,omitempty"` + Output string `json:"output,omitempty" yaml:"output,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_active_directory_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_active_directory_config.go new file mode 100644 index 000000000..511461865 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_active_directory_config.go @@ -0,0 +1,86 @@ +package client + +const ( + ActiveDirectoryConfigType = "activeDirectoryConfig" + ActiveDirectoryConfigFieldAccessMode = "accessMode" + ActiveDirectoryConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + ActiveDirectoryConfigFieldAnnotations = "annotations" + ActiveDirectoryConfigFieldCertificate = "certificate" + ActiveDirectoryConfigFieldConnectionTimeout = "connectionTimeout" + ActiveDirectoryConfigFieldCreated = "created" + ActiveDirectoryConfigFieldCreatorID = "creatorId" + ActiveDirectoryConfigFieldDefaultLoginDomain = "defaultLoginDomain" + ActiveDirectoryConfigFieldEnabled = "enabled" + ActiveDirectoryConfigFieldGroupDNAttribute = "groupDNAttribute" + ActiveDirectoryConfigFieldGroupMemberMappingAttribute = "groupMemberMappingAttribute" + ActiveDirectoryConfigFieldGroupMemberUserAttribute = "groupMemberUserAttribute" + ActiveDirectoryConfigFieldGroupNameAttribute = "groupNameAttribute" + ActiveDirectoryConfigFieldGroupObjectClass = "groupObjectClass" + ActiveDirectoryConfigFieldGroupSearchAttribute = "groupSearchAttribute" + ActiveDirectoryConfigFieldGroupSearchBase = "groupSearchBase" + ActiveDirectoryConfigFieldGroupSearchFilter = "groupSearchFilter" + ActiveDirectoryConfigFieldLabels = "labels" + ActiveDirectoryConfigFieldName = "name" + ActiveDirectoryConfigFieldNestedGroupMembershipEnabled = "nestedGroupMembershipEnabled" + ActiveDirectoryConfigFieldOwnerReferences = "ownerReferences" + ActiveDirectoryConfigFieldPort = "port" + ActiveDirectoryConfigFieldRemoved = "removed" + ActiveDirectoryConfigFieldServers = "servers" + ActiveDirectoryConfigFieldServiceAccountPassword = "serviceAccountPassword" + ActiveDirectoryConfigFieldServiceAccountUsername = "serviceAccountUsername" + ActiveDirectoryConfigFieldStartTLS = "starttls" + ActiveDirectoryConfigFieldStatus = "status" + ActiveDirectoryConfigFieldTLS = "tls" + ActiveDirectoryConfigFieldType = "type" + ActiveDirectoryConfigFieldUUID = "uuid" + ActiveDirectoryConfigFieldUserDisabledBitMask = "userDisabledBitMask" + ActiveDirectoryConfigFieldUserEnabledAttribute = "userEnabledAttribute" + ActiveDirectoryConfigFieldUserLoginAttribute = "userLoginAttribute" + ActiveDirectoryConfigFieldUserNameAttribute = "userNameAttribute" + ActiveDirectoryConfigFieldUserObjectClass = "userObjectClass" + ActiveDirectoryConfigFieldUserSearchAttribute = "userSearchAttribute" + ActiveDirectoryConfigFieldUserSearchBase = "userSearchBase" + ActiveDirectoryConfigFieldUserSearchFilter = "userSearchFilter" +) + +type ActiveDirectoryConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Certificate string `json:"certificate,omitempty" yaml:"certificate,omitempty"` + ConnectionTimeout int64 `json:"connectionTimeout,omitempty" yaml:"connectionTimeout,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + DefaultLoginDomain string `json:"defaultLoginDomain,omitempty" yaml:"defaultLoginDomain,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + GroupDNAttribute string `json:"groupDNAttribute,omitempty" yaml:"groupDNAttribute,omitempty"` + GroupMemberMappingAttribute string `json:"groupMemberMappingAttribute,omitempty" yaml:"groupMemberMappingAttribute,omitempty"` + GroupMemberUserAttribute string `json:"groupMemberUserAttribute,omitempty" yaml:"groupMemberUserAttribute,omitempty"` + GroupNameAttribute string `json:"groupNameAttribute,omitempty" yaml:"groupNameAttribute,omitempty"` + GroupObjectClass string `json:"groupObjectClass,omitempty" yaml:"groupObjectClass,omitempty"` + GroupSearchAttribute string `json:"groupSearchAttribute,omitempty" yaml:"groupSearchAttribute,omitempty"` + GroupSearchBase string `json:"groupSearchBase,omitempty" yaml:"groupSearchBase,omitempty"` + GroupSearchFilter string `json:"groupSearchFilter,omitempty" yaml:"groupSearchFilter,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NestedGroupMembershipEnabled *bool `json:"nestedGroupMembershipEnabled,omitempty" yaml:"nestedGroupMembershipEnabled,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Servers []string `json:"servers,omitempty" yaml:"servers,omitempty"` + ServiceAccountPassword string `json:"serviceAccountPassword,omitempty" yaml:"serviceAccountPassword,omitempty"` + ServiceAccountUsername string `json:"serviceAccountUsername,omitempty" yaml:"serviceAccountUsername,omitempty"` + StartTLS bool `json:"starttls,omitempty" yaml:"starttls,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + TLS bool `json:"tls,omitempty" yaml:"tls,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserDisabledBitMask int64 `json:"userDisabledBitMask,omitempty" yaml:"userDisabledBitMask,omitempty"` + UserEnabledAttribute string `json:"userEnabledAttribute,omitempty" yaml:"userEnabledAttribute,omitempty"` + UserLoginAttribute string `json:"userLoginAttribute,omitempty" yaml:"userLoginAttribute,omitempty"` + UserNameAttribute string `json:"userNameAttribute,omitempty" yaml:"userNameAttribute,omitempty"` + UserObjectClass string `json:"userObjectClass,omitempty" yaml:"userObjectClass,omitempty"` + UserSearchAttribute string `json:"userSearchAttribute,omitempty" yaml:"userSearchAttribute,omitempty"` + UserSearchBase string `json:"userSearchBase,omitempty" yaml:"userSearchBase,omitempty"` + UserSearchFilter string `json:"userSearchFilter,omitempty" yaml:"userSearchFilter,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_active_directory_test_and_apply_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_active_directory_test_and_apply_input.go new file mode 100644 index 000000000..3055af4fa --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_active_directory_test_and_apply_input.go @@ -0,0 +1,16 @@ +package client + +const ( + ActiveDirectoryTestAndApplyInputType = "activeDirectoryTestAndApplyInput" + ActiveDirectoryTestAndApplyInputFieldActiveDirectoryConfig = "activeDirectoryConfig" + ActiveDirectoryTestAndApplyInputFieldEnabled = "enabled" + ActiveDirectoryTestAndApplyInputFieldPassword = "password" + ActiveDirectoryTestAndApplyInputFieldUsername = "username" +) + +type ActiveDirectoryTestAndApplyInput struct { + ActiveDirectoryConfig *ActiveDirectoryConfig `json:"activeDirectoryConfig,omitempty" yaml:"activeDirectoryConfig,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + Password string `json:"password,omitempty" yaml:"password,omitempty"` + Username string `json:"username,omitempty" yaml:"username,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_adfs_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_adfs_config.go new file mode 100644 index 000000000..5170ec83e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_adfs_config.go @@ -0,0 +1,52 @@ +package client + +const ( + ADFSConfigType = "adfsConfig" + ADFSConfigFieldAccessMode = "accessMode" + ADFSConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + ADFSConfigFieldAnnotations = "annotations" + ADFSConfigFieldCreated = "created" + ADFSConfigFieldCreatorID = "creatorId" + ADFSConfigFieldDisplayNameField = "displayNameField" + ADFSConfigFieldEnabled = "enabled" + ADFSConfigFieldEntityID = "entityID" + ADFSConfigFieldGroupsField = "groupsField" + ADFSConfigFieldIDPMetadataContent = "idpMetadataContent" + ADFSConfigFieldLabels = "labels" + ADFSConfigFieldName = "name" + ADFSConfigFieldOwnerReferences = "ownerReferences" + ADFSConfigFieldRancherAPIHost = "rancherApiHost" + ADFSConfigFieldRemoved = "removed" + ADFSConfigFieldSpCert = "spCert" + ADFSConfigFieldSpKey = "spKey" + ADFSConfigFieldStatus = "status" + ADFSConfigFieldType = "type" + ADFSConfigFieldUIDField = "uidField" + ADFSConfigFieldUUID = "uuid" + ADFSConfigFieldUserNameField = "userNameField" +) + +type ADFSConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + DisplayNameField string `json:"displayNameField,omitempty" yaml:"displayNameField,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + EntityID string `json:"entityID,omitempty" yaml:"entityID,omitempty"` + GroupsField string `json:"groupsField,omitempty" yaml:"groupsField,omitempty"` + IDPMetadataContent string `json:"idpMetadataContent,omitempty" yaml:"idpMetadataContent,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + RancherAPIHost string `json:"rancherApiHost,omitempty" yaml:"rancherApiHost,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + SpCert string `json:"spCert,omitempty" yaml:"spCert,omitempty"` + SpKey string `json:"spKey,omitempty" yaml:"spKey,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UIDField string `json:"uidField,omitempty" yaml:"uidField,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserNameField string `json:"userNameField,omitempty" yaml:"userNameField,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aes_configuration.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aes_configuration.go new file mode 100644 index 000000000..21732a170 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aes_configuration.go @@ -0,0 +1,10 @@ +package client + +const ( + AESConfigurationType = "aesConfiguration" + AESConfigurationFieldKeys = "keys" +) + +type AESConfiguration struct { + Keys []Key `json:"keys,omitempty" yaml:"keys,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_affinity.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_affinity.go new file mode 100644 index 000000000..0489c3d65 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_affinity.go @@ -0,0 +1,14 @@ +package client + +const ( + AffinityType = "affinity" + AffinityFieldNodeAffinity = "nodeAffinity" + AffinityFieldPodAffinity = "podAffinity" + AffinityFieldPodAntiAffinity = "podAntiAffinity" +) + +type Affinity struct { + NodeAffinity *NodeAffinity `json:"nodeAffinity,omitempty" yaml:"nodeAffinity,omitempty"` + PodAffinity *PodAffinity `json:"podAffinity,omitempty" yaml:"podAffinity,omitempty"` + PodAntiAffinity *PodAntiAffinity `json:"podAntiAffinity,omitempty" yaml:"podAntiAffinity,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_agent_deployment_customization.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_agent_deployment_customization.go new file mode 100644 index 000000000..841e6e13d --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_agent_deployment_customization.go @@ -0,0 +1,14 @@ +package client + +const ( + AgentDeploymentCustomizationType = "agentDeploymentCustomization" + AgentDeploymentCustomizationFieldAppendTolerations = "appendTolerations" + AgentDeploymentCustomizationFieldOverrideAffinity = "overrideAffinity" + AgentDeploymentCustomizationFieldOverrideResourceRequirements = "overrideResourceRequirements" +) + +type AgentDeploymentCustomization struct { + AppendTolerations []Toleration `json:"appendTolerations,omitempty" yaml:"appendTolerations,omitempty"` + OverrideAffinity *Affinity `json:"overrideAffinity,omitempty" yaml:"overrideAffinity,omitempty"` + OverrideResourceRequirements *ResourceRequirements `json:"overrideResourceRequirements,omitempty" yaml:"overrideResourceRequirements,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aks_cluster_config_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aks_cluster_config_spec.go new file mode 100644 index 000000000..d6caad1ac --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aks_cluster_config_spec.go @@ -0,0 +1,76 @@ +package client + +const ( + AKSClusterConfigSpecType = "aksClusterConfigSpec" + AKSClusterConfigSpecFieldAuthBaseURL = "authBaseUrl" + AKSClusterConfigSpecFieldAuthorizedIPRanges = "authorizedIpRanges" + AKSClusterConfigSpecFieldAzureCredentialSecret = "azureCredentialSecret" + AKSClusterConfigSpecFieldBaseURL = "baseUrl" + AKSClusterConfigSpecFieldClusterName = "clusterName" + AKSClusterConfigSpecFieldDNSPrefix = "dnsPrefix" + AKSClusterConfigSpecFieldHTTPApplicationRouting = "httpApplicationRouting" + AKSClusterConfigSpecFieldImported = "imported" + AKSClusterConfigSpecFieldKubernetesVersion = "kubernetesVersion" + AKSClusterConfigSpecFieldLinuxAdminUsername = "linuxAdminUsername" + AKSClusterConfigSpecFieldLinuxSSHPublicKey = "sshPublicKey" + AKSClusterConfigSpecFieldLoadBalancerSKU = "loadBalancerSku" + AKSClusterConfigSpecFieldLogAnalyticsWorkspaceGroup = "logAnalyticsWorkspaceGroup" + AKSClusterConfigSpecFieldLogAnalyticsWorkspaceName = "logAnalyticsWorkspaceName" + AKSClusterConfigSpecFieldManagedIdentity = "managedIdentity" + AKSClusterConfigSpecFieldMonitoring = "monitoring" + AKSClusterConfigSpecFieldNetworkDNSServiceIP = "dnsServiceIp" + AKSClusterConfigSpecFieldNetworkDockerBridgeCIDR = "dockerBridgeCidr" + AKSClusterConfigSpecFieldNetworkPlugin = "networkPlugin" + AKSClusterConfigSpecFieldNetworkPodCIDR = "podCidr" + AKSClusterConfigSpecFieldNetworkPolicy = "networkPolicy" + AKSClusterConfigSpecFieldNetworkServiceCIDR = "serviceCidr" + AKSClusterConfigSpecFieldNodePools = "nodePools" + AKSClusterConfigSpecFieldNodeResourceGroup = "nodeResourceGroup" + AKSClusterConfigSpecFieldOutboundType = "outboundType" + AKSClusterConfigSpecFieldPrivateCluster = "privateCluster" + AKSClusterConfigSpecFieldPrivateDNSZone = "privateDnsZone" + AKSClusterConfigSpecFieldResourceGroup = "resourceGroup" + AKSClusterConfigSpecFieldResourceLocation = "resourceLocation" + AKSClusterConfigSpecFieldSubnet = "subnet" + AKSClusterConfigSpecFieldTags = "tags" + AKSClusterConfigSpecFieldUserAssignedIdentity = "userAssignedIdentity" + AKSClusterConfigSpecFieldVirtualNetwork = "virtualNetwork" + AKSClusterConfigSpecFieldVirtualNetworkResourceGroup = "virtualNetworkResourceGroup" +) + +type AKSClusterConfigSpec struct { + AuthBaseURL *string `json:"authBaseUrl,omitempty" yaml:"authBaseUrl,omitempty"` + AuthorizedIPRanges *[]string `json:"authorizedIpRanges,omitempty" yaml:"authorizedIpRanges,omitempty"` + AzureCredentialSecret string `json:"azureCredentialSecret,omitempty" yaml:"azureCredentialSecret,omitempty"` + BaseURL *string `json:"baseUrl,omitempty" yaml:"baseUrl,omitempty"` + ClusterName string `json:"clusterName,omitempty" yaml:"clusterName,omitempty"` + DNSPrefix *string `json:"dnsPrefix,omitempty" yaml:"dnsPrefix,omitempty"` + HTTPApplicationRouting *bool `json:"httpApplicationRouting,omitempty" yaml:"httpApplicationRouting,omitempty"` + Imported bool `json:"imported,omitempty" yaml:"imported,omitempty"` + KubernetesVersion *string `json:"kubernetesVersion,omitempty" yaml:"kubernetesVersion,omitempty"` + LinuxAdminUsername *string `json:"linuxAdminUsername,omitempty" yaml:"linuxAdminUsername,omitempty"` + LinuxSSHPublicKey *string `json:"sshPublicKey,omitempty" yaml:"sshPublicKey,omitempty"` + LoadBalancerSKU *string `json:"loadBalancerSku,omitempty" yaml:"loadBalancerSku,omitempty"` + LogAnalyticsWorkspaceGroup *string `json:"logAnalyticsWorkspaceGroup,omitempty" yaml:"logAnalyticsWorkspaceGroup,omitempty"` + LogAnalyticsWorkspaceName *string `json:"logAnalyticsWorkspaceName,omitempty" yaml:"logAnalyticsWorkspaceName,omitempty"` + ManagedIdentity **bool `json:"managedIdentity,omitempty" yaml:"managedIdentity,omitempty"` + Monitoring *bool `json:"monitoring,omitempty" yaml:"monitoring,omitempty"` + NetworkDNSServiceIP *string `json:"dnsServiceIp,omitempty" yaml:"dnsServiceIp,omitempty"` + NetworkDockerBridgeCIDR *string `json:"dockerBridgeCidr,omitempty" yaml:"dockerBridgeCidr,omitempty"` + NetworkPlugin *string `json:"networkPlugin,omitempty" yaml:"networkPlugin,omitempty"` + NetworkPodCIDR *string `json:"podCidr,omitempty" yaml:"podCidr,omitempty"` + NetworkPolicy *string `json:"networkPolicy,omitempty" yaml:"networkPolicy,omitempty"` + NetworkServiceCIDR *string `json:"serviceCidr,omitempty" yaml:"serviceCidr,omitempty"` + NodePools []AKSNodePool `json:"nodePools,omitempty" yaml:"nodePools,omitempty"` + NodeResourceGroup *string `json:"nodeResourceGroup,omitempty" yaml:"nodeResourceGroup,omitempty"` + OutboundType *string `json:"outboundType,omitempty" yaml:"outboundType,omitempty"` + PrivateCluster *bool `json:"privateCluster,omitempty" yaml:"privateCluster,omitempty"` + PrivateDNSZone *string `json:"privateDnsZone,omitempty" yaml:"privateDnsZone,omitempty"` + ResourceGroup string `json:"resourceGroup,omitempty" yaml:"resourceGroup,omitempty"` + ResourceLocation string `json:"resourceLocation,omitempty" yaml:"resourceLocation,omitempty"` + Subnet *string `json:"subnet,omitempty" yaml:"subnet,omitempty"` + Tags map[string]string `json:"tags,omitempty" yaml:"tags,omitempty"` + UserAssignedIdentity *string `json:"userAssignedIdentity,omitempty" yaml:"userAssignedIdentity,omitempty"` + VirtualNetwork *string `json:"virtualNetwork,omitempty" yaml:"virtualNetwork,omitempty"` + VirtualNetworkResourceGroup *string `json:"virtualNetworkResourceGroup,omitempty" yaml:"virtualNetworkResourceGroup,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aks_node_pool.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aks_node_pool.go new file mode 100644 index 000000000..43e5721cb --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aks_node_pool.go @@ -0,0 +1,42 @@ +package client + +const ( + AKSNodePoolType = "aksNodePool" + AKSNodePoolFieldAvailabilityZones = "availabilityZones" + AKSNodePoolFieldCount = "count" + AKSNodePoolFieldEnableAutoScaling = "enableAutoScaling" + AKSNodePoolFieldMaxCount = "maxCount" + AKSNodePoolFieldMaxPods = "maxPods" + AKSNodePoolFieldMaxSurge = "maxSurge" + AKSNodePoolFieldMinCount = "minCount" + AKSNodePoolFieldMode = "mode" + AKSNodePoolFieldName = "name" + AKSNodePoolFieldNodeLabels = "nodeLabels" + AKSNodePoolFieldNodeTaints = "nodeTaints" + AKSNodePoolFieldOrchestratorVersion = "orchestratorVersion" + AKSNodePoolFieldOsDiskSizeGB = "osDiskSizeGB" + AKSNodePoolFieldOsDiskType = "osDiskType" + AKSNodePoolFieldOsType = "osType" + AKSNodePoolFieldVMSize = "vmSize" + AKSNodePoolFieldVnetSubnetID = "vnetSubnetID" +) + +type AKSNodePool struct { + AvailabilityZones *[]string `json:"availabilityZones,omitempty" yaml:"availabilityZones,omitempty"` + Count *int64 `json:"count,omitempty" yaml:"count,omitempty"` + EnableAutoScaling *bool `json:"enableAutoScaling,omitempty" yaml:"enableAutoScaling,omitempty"` + MaxCount *int64 `json:"maxCount,omitempty" yaml:"maxCount,omitempty"` + MaxPods *int64 `json:"maxPods,omitempty" yaml:"maxPods,omitempty"` + MaxSurge string `json:"maxSurge,omitempty" yaml:"maxSurge,omitempty"` + MinCount *int64 `json:"minCount,omitempty" yaml:"minCount,omitempty"` + Mode string `json:"mode,omitempty" yaml:"mode,omitempty"` + Name *string `json:"name,omitempty" yaml:"name,omitempty"` + NodeLabels map[string]string `json:"nodeLabels,omitempty" yaml:"nodeLabels,omitempty"` + NodeTaints []string `json:"nodeTaints,omitempty" yaml:"nodeTaints,omitempty"` + OrchestratorVersion *string `json:"orchestratorVersion,omitempty" yaml:"orchestratorVersion,omitempty"` + OsDiskSizeGB *int64 `json:"osDiskSizeGB,omitempty" yaml:"osDiskSizeGB,omitempty"` + OsDiskType string `json:"osDiskType,omitempty" yaml:"osDiskType,omitempty"` + OsType string `json:"osType,omitempty" yaml:"osType,omitempty"` + VMSize string `json:"vmSize,omitempty" yaml:"vmSize,omitempty"` + VnetSubnetID *string `json:"vnetSubnetID,omitempty" yaml:"vnetSubnetID,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aks_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aks_status.go new file mode 100644 index 000000000..91074c032 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aks_status.go @@ -0,0 +1,14 @@ +package client + +const ( + AKSStatusType = "aksStatus" + AKSStatusFieldPrivateRequiresTunnel = "privateRequiresTunnel" + AKSStatusFieldRBACEnabled = "rbacEnabled" + AKSStatusFieldUpstreamSpec = "upstreamSpec" +) + +type AKSStatus struct { + PrivateRequiresTunnel *bool `json:"privateRequiresTunnel,omitempty" yaml:"privateRequiresTunnel,omitempty"` + RBACEnabled *bool `json:"rbacEnabled,omitempty" yaml:"rbacEnabled,omitempty"` + UpstreamSpec *AKSClusterConfigSpec `json:"upstreamSpec,omitempty" yaml:"upstreamSpec,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_alidns_provider_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_alidns_provider_config.go new file mode 100644 index 000000000..a58df2cac --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_alidns_provider_config.go @@ -0,0 +1,14 @@ +package client + +const ( + AlidnsProviderConfigType = "alidnsProviderConfig" + AlidnsProviderConfigFieldAccessKey = "accessKey" + AlidnsProviderConfigFieldAdditionalOptions = "additionalOptions" + AlidnsProviderConfigFieldSecretKey = "secretKey" +) + +type AlidnsProviderConfig struct { + AccessKey string `json:"accessKey,omitempty" yaml:"accessKey,omitempty"` + AdditionalOptions map[string]string `json:"additionalOptions,omitempty" yaml:"additionalOptions,omitempty"` + SecretKey string `json:"secretKey,omitempty" yaml:"secretKey,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_answer.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_answer.go new file mode 100644 index 000000000..d79e0c9e2 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_answer.go @@ -0,0 +1,16 @@ +package client + +const ( + AnswerType = "answer" + AnswerFieldClusterID = "clusterId" + AnswerFieldProjectID = "projectId" + AnswerFieldValues = "values" + AnswerFieldValuesSetString = "valuesSetString" +) + +type Answer struct { + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"` + Values map[string]string `json:"values,omitempty" yaml:"values,omitempty"` + ValuesSetString map[string]string `json:"valuesSetString,omitempty" yaml:"valuesSetString,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_app_condition.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_app_condition.go new file mode 100644 index 000000000..9d633aeea --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_app_condition.go @@ -0,0 +1,20 @@ +package client + +const ( + AppConditionType = "appCondition" + AppConditionFieldLastTransitionTime = "lastTransitionTime" + AppConditionFieldLastUpdateTime = "lastUpdateTime" + AppConditionFieldMessage = "message" + AppConditionFieldReason = "reason" + AppConditionFieldStatus = "status" + AppConditionFieldType = "type" +) + +type AppCondition struct { + LastTransitionTime string `json:"lastTransitionTime,omitempty" yaml:"lastTransitionTime,omitempty"` + LastUpdateTime string `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` + Reason string `json:"reason,omitempty" yaml:"reason,omitempty"` + Status string `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_attached_volume.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_attached_volume.go new file mode 100644 index 000000000..c3bbe0e65 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_attached_volume.go @@ -0,0 +1,10 @@ +package client + +const ( + AttachedVolumeType = "attachedVolume" + AttachedVolumeFieldName = "name" +) + +type AttachedVolume struct { + Name string `json:"name,omitempty" yaml:"name,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_audit_log.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_audit_log.go new file mode 100644 index 000000000..7d605ca8b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_audit_log.go @@ -0,0 +1,12 @@ +package client + +const ( + AuditLogType = "auditLog" + AuditLogFieldConfiguration = "configuration" + AuditLogFieldEnabled = "enabled" +) + +type AuditLog struct { + Configuration *AuditLogConfig `json:"configuration,omitempty" yaml:"configuration,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_audit_log_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_audit_log_config.go new file mode 100644 index 000000000..d1d828973 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_audit_log_config.go @@ -0,0 +1,20 @@ +package client + +const ( + AuditLogConfigType = "auditLogConfig" + AuditLogConfigFieldFormat = "format" + AuditLogConfigFieldMaxAge = "maxAge" + AuditLogConfigFieldMaxBackup = "maxBackup" + AuditLogConfigFieldMaxSize = "maxSize" + AuditLogConfigFieldPath = "path" + AuditLogConfigFieldPolicy = "policy" +) + +type AuditLogConfig struct { + Format string `json:"format,omitempty" yaml:"format,omitempty"` + MaxAge int64 `json:"maxAge,omitempty" yaml:"maxAge,omitempty"` + MaxBackup int64 `json:"maxBackup,omitempty" yaml:"maxBackup,omitempty"` + MaxSize int64 `json:"maxSize,omitempty" yaml:"maxSize,omitempty"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` + Policy map[string]interface{} `json:"policy,omitempty" yaml:"policy,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_config.go new file mode 100644 index 000000000..ac6c47bbd --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_config.go @@ -0,0 +1,128 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + AuthConfigType = "authConfig" + AuthConfigFieldAccessMode = "accessMode" + AuthConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + AuthConfigFieldAnnotations = "annotations" + AuthConfigFieldCreated = "created" + AuthConfigFieldCreatorID = "creatorId" + AuthConfigFieldEnabled = "enabled" + AuthConfigFieldLabels = "labels" + AuthConfigFieldName = "name" + AuthConfigFieldOwnerReferences = "ownerReferences" + AuthConfigFieldRemoved = "removed" + AuthConfigFieldStatus = "status" + AuthConfigFieldType = "type" + AuthConfigFieldUUID = "uuid" +) + +type AuthConfig struct { + types.Resource + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type AuthConfigCollection struct { + types.Collection + Data []AuthConfig `json:"data,omitempty"` + client *AuthConfigClient +} + +type AuthConfigClient struct { + apiClient *Client +} + +type AuthConfigOperations interface { + List(opts *types.ListOpts) (*AuthConfigCollection, error) + ListAll(opts *types.ListOpts) (*AuthConfigCollection, error) + Create(opts *AuthConfig) (*AuthConfig, error) + Update(existing *AuthConfig, updates interface{}) (*AuthConfig, error) + Replace(existing *AuthConfig) (*AuthConfig, error) + ByID(id string) (*AuthConfig, error) + Delete(container *AuthConfig) error +} + +func newAuthConfigClient(apiClient *Client) *AuthConfigClient { + return &AuthConfigClient{ + apiClient: apiClient, + } +} + +func (c *AuthConfigClient) Create(container *AuthConfig) (*AuthConfig, error) { + resp := &AuthConfig{} + err := c.apiClient.Ops.DoCreate(AuthConfigType, container, resp) + return resp, err +} + +func (c *AuthConfigClient) Update(existing *AuthConfig, updates interface{}) (*AuthConfig, error) { + resp := &AuthConfig{} + err := c.apiClient.Ops.DoUpdate(AuthConfigType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AuthConfigClient) Replace(obj *AuthConfig) (*AuthConfig, error) { + resp := &AuthConfig{} + err := c.apiClient.Ops.DoReplace(AuthConfigType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *AuthConfigClient) List(opts *types.ListOpts) (*AuthConfigCollection, error) { + resp := &AuthConfigCollection{} + err := c.apiClient.Ops.DoList(AuthConfigType, opts, resp) + resp.client = c + return resp, err +} + +func (c *AuthConfigClient) ListAll(opts *types.ListOpts) (*AuthConfigCollection, error) { + resp := &AuthConfigCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *AuthConfigCollection) Next() (*AuthConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AuthConfigCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *AuthConfigClient) ByID(id string) (*AuthConfig, error) { + resp := &AuthConfig{} + err := c.apiClient.Ops.DoByID(AuthConfigType, id, resp) + return resp, err +} + +func (c *AuthConfigClient) Delete(container *AuthConfig) error { + return c.apiClient.Ops.DoResourceDelete(AuthConfigType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_config_conditions.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_config_conditions.go new file mode 100644 index 000000000..bf92ef016 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_config_conditions.go @@ -0,0 +1,20 @@ +package client + +const ( + AuthConfigConditionsType = "authConfigConditions" + AuthConfigConditionsFieldLastTransitionTime = "lastTransitionTime" + AuthConfigConditionsFieldLastUpdateTime = "lastUpdateTime" + AuthConfigConditionsFieldMessage = "message" + AuthConfigConditionsFieldReason = "reason" + AuthConfigConditionsFieldStatus = "status" + AuthConfigConditionsFieldType = "type" +) + +type AuthConfigConditions struct { + LastTransitionTime string `json:"lastTransitionTime,omitempty" yaml:"lastTransitionTime,omitempty"` + LastUpdateTime string `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` + Reason string `json:"reason,omitempty" yaml:"reason,omitempty"` + Status string `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_config_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_config_status.go new file mode 100644 index 000000000..e92cbec76 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_config_status.go @@ -0,0 +1,10 @@ +package client + +const ( + AuthConfigStatusType = "authConfigStatus" + AuthConfigStatusFieldConditions = "conditions" +) + +type AuthConfigStatus struct { + Conditions []AuthConfigConditions `json:"conditions,omitempty" yaml:"conditions,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_webhook_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_webhook_config.go new file mode 100644 index 000000000..b9bbc1a80 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_auth_webhook_config.go @@ -0,0 +1,12 @@ +package client + +const ( + AuthWebhookConfigType = "authWebhookConfig" + AuthWebhookConfigFieldCacheTimeout = "cacheTimeout" + AuthWebhookConfigFieldConfigFile = "configFile" +) + +type AuthWebhookConfig struct { + CacheTimeout string `json:"cacheTimeout,omitempty" yaml:"cacheTimeout,omitempty"` + ConfigFile string `json:"configFile,omitempty" yaml:"configFile,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_authn_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_authn_config.go new file mode 100644 index 000000000..e740e6194 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_authn_config.go @@ -0,0 +1,14 @@ +package client + +const ( + AuthnConfigType = "authnConfig" + AuthnConfigFieldSANs = "sans" + AuthnConfigFieldStrategy = "strategy" + AuthnConfigFieldWebhook = "webhook" +) + +type AuthnConfig struct { + SANs []string `json:"sans,omitempty" yaml:"sans,omitempty"` + Strategy string `json:"strategy,omitempty" yaml:"strategy,omitempty"` + Webhook *AuthWebhookConfig `json:"webhook,omitempty" yaml:"webhook,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_authz_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_authz_config.go new file mode 100644 index 000000000..ee491dcd6 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_authz_config.go @@ -0,0 +1,12 @@ +package client + +const ( + AuthzConfigType = "authzConfig" + AuthzConfigFieldMode = "mode" + AuthzConfigFieldOptions = "options" +) + +type AuthzConfig struct { + Mode string `json:"mode,omitempty" yaml:"mode,omitempty"` + Options map[string]string `json:"options,omitempty" yaml:"options,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aws_cloud_provider.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aws_cloud_provider.go new file mode 100644 index 000000000..bb1ebd01a --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aws_cloud_provider.go @@ -0,0 +1,12 @@ +package client + +const ( + AWSCloudProviderType = "awsCloudProvider" + AWSCloudProviderFieldGlobal = "global" + AWSCloudProviderFieldServiceOverride = "serviceOverride" +) + +type AWSCloudProvider struct { + Global *GlobalAwsOpts `json:"global,omitempty" yaml:"global,omitempty"` + ServiceOverride map[string]ServiceOverride `json:"serviceOverride,omitempty" yaml:"serviceOverride,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aws_elastic_block_store_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aws_elastic_block_store_volume_source.go new file mode 100644 index 000000000..5765e83e4 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_aws_elastic_block_store_volume_source.go @@ -0,0 +1,16 @@ +package client + +const ( + AWSElasticBlockStoreVolumeSourceType = "awsElasticBlockStoreVolumeSource" + AWSElasticBlockStoreVolumeSourceFieldFSType = "fsType" + AWSElasticBlockStoreVolumeSourceFieldPartition = "partition" + AWSElasticBlockStoreVolumeSourceFieldReadOnly = "readOnly" + AWSElasticBlockStoreVolumeSourceFieldVolumeID = "volumeID" +) + +type AWSElasticBlockStoreVolumeSource struct { + FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"` + Partition int64 `json:"partition,omitempty" yaml:"partition,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + VolumeID string `json:"volumeID,omitempty" yaml:"volumeID,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_adconfig.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_adconfig.go new file mode 100644 index 000000000..4de1b3f6d --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_adconfig.go @@ -0,0 +1,54 @@ +package client + +const ( + AzureADConfigType = "azureADConfig" + AzureADConfigFieldAccessMode = "accessMode" + AzureADConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + AzureADConfigFieldAnnotations = "annotations" + AzureADConfigFieldApplicationID = "applicationId" + AzureADConfigFieldApplicationSecret = "applicationSecret" + AzureADConfigFieldAuthEndpoint = "authEndpoint" + AzureADConfigFieldCreated = "created" + AzureADConfigFieldCreatorID = "creatorId" + AzureADConfigFieldDeviceAuthEndpoint = "deviceAuthEndpoint" + AzureADConfigFieldEnabled = "enabled" + AzureADConfigFieldEndpoint = "endpoint" + AzureADConfigFieldGraphEndpoint = "graphEndpoint" + AzureADConfigFieldGroupMembershipFilter = "groupMembershipFilter" + AzureADConfigFieldLabels = "labels" + AzureADConfigFieldName = "name" + AzureADConfigFieldOwnerReferences = "ownerReferences" + AzureADConfigFieldRancherURL = "rancherUrl" + AzureADConfigFieldRemoved = "removed" + AzureADConfigFieldStatus = "status" + AzureADConfigFieldTenantID = "tenantId" + AzureADConfigFieldTokenEndpoint = "tokenEndpoint" + AzureADConfigFieldType = "type" + AzureADConfigFieldUUID = "uuid" +) + +type AzureADConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + ApplicationID string `json:"applicationId,omitempty" yaml:"applicationId,omitempty"` + ApplicationSecret string `json:"applicationSecret,omitempty" yaml:"applicationSecret,omitempty"` + AuthEndpoint string `json:"authEndpoint,omitempty" yaml:"authEndpoint,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + DeviceAuthEndpoint string `json:"deviceAuthEndpoint,omitempty" yaml:"deviceAuthEndpoint,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"` + GraphEndpoint string `json:"graphEndpoint,omitempty" yaml:"graphEndpoint,omitempty"` + GroupMembershipFilter string `json:"groupMembershipFilter,omitempty" yaml:"groupMembershipFilter,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + RancherURL string `json:"rancherUrl,omitempty" yaml:"rancherUrl,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + TenantID string `json:"tenantId,omitempty" yaml:"tenantId,omitempty"` + TokenEndpoint string `json:"tokenEndpoint,omitempty" yaml:"tokenEndpoint,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_adconfig_apply_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_adconfig_apply_input.go new file mode 100644 index 000000000..a1e5b3922 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_adconfig_apply_input.go @@ -0,0 +1,12 @@ +package client + +const ( + AzureADConfigApplyInputType = "azureADConfigApplyInput" + AzureADConfigApplyInputFieldCode = "code" + AzureADConfigApplyInputFieldConfig = "config" +) + +type AzureADConfigApplyInput struct { + Code string `json:"code,omitempty" yaml:"code,omitempty"` + Config *AzureADConfig `json:"config,omitempty" yaml:"config,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_adconfig_test_output.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_adconfig_test_output.go new file mode 100644 index 000000000..4ce982795 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_adconfig_test_output.go @@ -0,0 +1,10 @@ +package client + +const ( + AzureADConfigTestOutputType = "azureADConfigTestOutput" + AzureADConfigTestOutputFieldRedirectURL = "redirectUrl" +) + +type AzureADConfigTestOutput struct { + RedirectURL string `json:"redirectUrl,omitempty" yaml:"redirectUrl,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_cloud_provider.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_cloud_provider.go new file mode 100644 index 000000000..df355ec2b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_cloud_provider.go @@ -0,0 +1,74 @@ +package client + +const ( + AzureCloudProviderType = "azureCloudProvider" + AzureCloudProviderFieldAADClientCertPassword = "aadClientCertPassword" + AzureCloudProviderFieldAADClientCertPath = "aadClientCertPath" + AzureCloudProviderFieldAADClientID = "aadClientId" + AzureCloudProviderFieldAADClientSecret = "aadClientSecret" + AzureCloudProviderFieldCloud = "cloud" + AzureCloudProviderFieldCloudProviderBackoff = "cloudProviderBackoff" + AzureCloudProviderFieldCloudProviderBackoffDuration = "cloudProviderBackoffDuration" + AzureCloudProviderFieldCloudProviderBackoffExponent = "cloudProviderBackoffExponent" + AzureCloudProviderFieldCloudProviderBackoffJitter = "cloudProviderBackoffJitter" + AzureCloudProviderFieldCloudProviderBackoffRetries = "cloudProviderBackoffRetries" + AzureCloudProviderFieldCloudProviderRateLimit = "cloudProviderRateLimit" + AzureCloudProviderFieldCloudProviderRateLimitBucket = "cloudProviderRateLimitBucket" + AzureCloudProviderFieldCloudProviderRateLimitQPS = "cloudProviderRateLimitQPS" + AzureCloudProviderFieldExcludeMasterFromStandardLB = "excludeMasterFromStandardLB" + AzureCloudProviderFieldLoadBalancerSku = "loadBalancerSku" + AzureCloudProviderFieldLocation = "location" + AzureCloudProviderFieldMaximumLoadBalancerRuleCount = "maximumLoadBalancerRuleCount" + AzureCloudProviderFieldPrimaryAvailabilitySetName = "primaryAvailabilitySetName" + AzureCloudProviderFieldPrimaryScaleSetName = "primaryScaleSetName" + AzureCloudProviderFieldResourceGroup = "resourceGroup" + AzureCloudProviderFieldRouteTableName = "routeTableName" + AzureCloudProviderFieldSecurityGroupName = "securityGroupName" + AzureCloudProviderFieldSecurityGroupResourceGroup = "securityGroupResourceGroup" + AzureCloudProviderFieldSubnetName = "subnetName" + AzureCloudProviderFieldSubscriptionID = "subscriptionId" + AzureCloudProviderFieldTags = "tags" + AzureCloudProviderFieldTenantID = "tenantId" + AzureCloudProviderFieldUseInstanceMetadata = "useInstanceMetadata" + AzureCloudProviderFieldUseManagedIdentityExtension = "useManagedIdentityExtension" + AzureCloudProviderFieldUserAssignedIdentityID = "userAssignedIdentityID" + AzureCloudProviderFieldVMType = "vmType" + AzureCloudProviderFieldVnetName = "vnetName" + AzureCloudProviderFieldVnetResourceGroup = "vnetResourceGroup" +) + +type AzureCloudProvider struct { + AADClientCertPassword string `json:"aadClientCertPassword,omitempty" yaml:"aadClientCertPassword,omitempty"` + AADClientCertPath string `json:"aadClientCertPath,omitempty" yaml:"aadClientCertPath,omitempty"` + AADClientID string `json:"aadClientId,omitempty" yaml:"aadClientId,omitempty"` + AADClientSecret string `json:"aadClientSecret,omitempty" yaml:"aadClientSecret,omitempty"` + Cloud string `json:"cloud,omitempty" yaml:"cloud,omitempty"` + CloudProviderBackoff bool `json:"cloudProviderBackoff,omitempty" yaml:"cloudProviderBackoff,omitempty"` + CloudProviderBackoffDuration int64 `json:"cloudProviderBackoffDuration,omitempty" yaml:"cloudProviderBackoffDuration,omitempty"` + CloudProviderBackoffExponent int64 `json:"cloudProviderBackoffExponent,omitempty" yaml:"cloudProviderBackoffExponent,omitempty"` + CloudProviderBackoffJitter int64 `json:"cloudProviderBackoffJitter,omitempty" yaml:"cloudProviderBackoffJitter,omitempty"` + CloudProviderBackoffRetries int64 `json:"cloudProviderBackoffRetries,omitempty" yaml:"cloudProviderBackoffRetries,omitempty"` + CloudProviderRateLimit bool `json:"cloudProviderRateLimit,omitempty" yaml:"cloudProviderRateLimit,omitempty"` + CloudProviderRateLimitBucket int64 `json:"cloudProviderRateLimitBucket,omitempty" yaml:"cloudProviderRateLimitBucket,omitempty"` + CloudProviderRateLimitQPS int64 `json:"cloudProviderRateLimitQPS,omitempty" yaml:"cloudProviderRateLimitQPS,omitempty"` + ExcludeMasterFromStandardLB *bool `json:"excludeMasterFromStandardLB,omitempty" yaml:"excludeMasterFromStandardLB,omitempty"` + LoadBalancerSku string `json:"loadBalancerSku,omitempty" yaml:"loadBalancerSku,omitempty"` + Location string `json:"location,omitempty" yaml:"location,omitempty"` + MaximumLoadBalancerRuleCount int64 `json:"maximumLoadBalancerRuleCount,omitempty" yaml:"maximumLoadBalancerRuleCount,omitempty"` + PrimaryAvailabilitySetName string `json:"primaryAvailabilitySetName,omitempty" yaml:"primaryAvailabilitySetName,omitempty"` + PrimaryScaleSetName string `json:"primaryScaleSetName,omitempty" yaml:"primaryScaleSetName,omitempty"` + ResourceGroup string `json:"resourceGroup,omitempty" yaml:"resourceGroup,omitempty"` + RouteTableName string `json:"routeTableName,omitempty" yaml:"routeTableName,omitempty"` + SecurityGroupName string `json:"securityGroupName,omitempty" yaml:"securityGroupName,omitempty"` + SecurityGroupResourceGroup string `json:"securityGroupResourceGroup,omitempty" yaml:"securityGroupResourceGroup,omitempty"` + SubnetName string `json:"subnetName,omitempty" yaml:"subnetName,omitempty"` + SubscriptionID string `json:"subscriptionId,omitempty" yaml:"subscriptionId,omitempty"` + Tags string `json:"tags,omitempty" yaml:"tags,omitempty"` + TenantID string `json:"tenantId,omitempty" yaml:"tenantId,omitempty"` + UseInstanceMetadata bool `json:"useInstanceMetadata,omitempty" yaml:"useInstanceMetadata,omitempty"` + UseManagedIdentityExtension bool `json:"useManagedIdentityExtension,omitempty" yaml:"useManagedIdentityExtension,omitempty"` + UserAssignedIdentityID string `json:"userAssignedIdentityID,omitempty" yaml:"userAssignedIdentityID,omitempty"` + VMType string `json:"vmType,omitempty" yaml:"vmType,omitempty"` + VnetName string `json:"vnetName,omitempty" yaml:"vnetName,omitempty"` + VnetResourceGroup string `json:"vnetResourceGroup,omitempty" yaml:"vnetResourceGroup,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_disk_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_disk_volume_source.go new file mode 100644 index 000000000..28920c001 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_disk_volume_source.go @@ -0,0 +1,20 @@ +package client + +const ( + AzureDiskVolumeSourceType = "azureDiskVolumeSource" + AzureDiskVolumeSourceFieldCachingMode = "cachingMode" + AzureDiskVolumeSourceFieldDataDiskURI = "diskURI" + AzureDiskVolumeSourceFieldDiskName = "diskName" + AzureDiskVolumeSourceFieldFSType = "fsType" + AzureDiskVolumeSourceFieldKind = "kind" + AzureDiskVolumeSourceFieldReadOnly = "readOnly" +) + +type AzureDiskVolumeSource struct { + CachingMode string `json:"cachingMode,omitempty" yaml:"cachingMode,omitempty"` + DataDiskURI string `json:"diskURI,omitempty" yaml:"diskURI,omitempty"` + DiskName string `json:"diskName,omitempty" yaml:"diskName,omitempty"` + FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_file_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_file_volume_source.go new file mode 100644 index 000000000..3be8571cc --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_azure_file_volume_source.go @@ -0,0 +1,14 @@ +package client + +const ( + AzureFileVolumeSourceType = "azureFileVolumeSource" + AzureFileVolumeSourceFieldReadOnly = "readOnly" + AzureFileVolumeSourceFieldSecretName = "secretName" + AzureFileVolumeSourceFieldShareName = "shareName" +) + +type AzureFileVolumeSource struct { + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"` + ShareName string `json:"shareName,omitempty" yaml:"shareName,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_backup_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_backup_config.go new file mode 100644 index 000000000..140cf15cc --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_backup_config.go @@ -0,0 +1,20 @@ +package client + +const ( + BackupConfigType = "backupConfig" + BackupConfigFieldEnabled = "enabled" + BackupConfigFieldIntervalHours = "intervalHours" + BackupConfigFieldRetention = "retention" + BackupConfigFieldS3BackupConfig = "s3BackupConfig" + BackupConfigFieldSafeTimestamp = "safeTimestamp" + BackupConfigFieldTimeout = "timeout" +) + +type BackupConfig struct { + Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + IntervalHours int64 `json:"intervalHours,omitempty" yaml:"intervalHours,omitempty"` + Retention int64 `json:"retention,omitempty" yaml:"retention,omitempty"` + S3BackupConfig *S3BackupConfig `json:"s3BackupConfig,omitempty" yaml:"s3BackupConfig,omitempty"` + SafeTimestamp bool `json:"safeTimestamp,omitempty" yaml:"safeTimestamp,omitempty"` + Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_bastion_host.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_bastion_host.go new file mode 100644 index 000000000..ac24e24f5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_bastion_host.go @@ -0,0 +1,26 @@ +package client + +const ( + BastionHostType = "bastionHost" + BastionHostFieldAddress = "address" + BastionHostFieldIgnoreProxyEnvVars = "ignoreProxyEnvVars" + BastionHostFieldPort = "port" + BastionHostFieldSSHAgentAuth = "sshAgentAuth" + BastionHostFieldSSHCert = "sshCert" + BastionHostFieldSSHCertPath = "sshCertPath" + BastionHostFieldSSHKey = "sshKey" + BastionHostFieldSSHKeyPath = "sshKeyPath" + BastionHostFieldUser = "user" +) + +type BastionHost struct { + Address string `json:"address,omitempty" yaml:"address,omitempty"` + IgnoreProxyEnvVars bool `json:"ignoreProxyEnvVars,omitempty" yaml:"ignoreProxyEnvVars,omitempty"` + Port string `json:"port,omitempty" yaml:"port,omitempty"` + SSHAgentAuth bool `json:"sshAgentAuth,omitempty" yaml:"sshAgentAuth,omitempty"` + SSHCert string `json:"sshCert,omitempty" yaml:"sshCert,omitempty"` + SSHCertPath string `json:"sshCertPath,omitempty" yaml:"sshCertPath,omitempty"` + SSHKey string `json:"sshKey,omitempty" yaml:"sshKey,omitempty"` + SSHKeyPath string `json:"sshKeyPath,omitempty" yaml:"sshKeyPath,omitempty"` + User string `json:"user,omitempty" yaml:"user,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_block_storage_openstack_opts.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_block_storage_openstack_opts.go new file mode 100644 index 000000000..b95bb36e1 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_block_storage_openstack_opts.go @@ -0,0 +1,14 @@ +package client + +const ( + BlockStorageOpenstackOptsType = "blockStorageOpenstackOpts" + BlockStorageOpenstackOptsFieldBSVersion = "bs-version" + BlockStorageOpenstackOptsFieldIgnoreVolumeAZ = "ignore-volume-az" + BlockStorageOpenstackOptsFieldTrustDevicePath = "trust-device-path" +) + +type BlockStorageOpenstackOpts struct { + BSVersion string `json:"bs-version,omitempty" yaml:"bs-version,omitempty"` + IgnoreVolumeAZ bool `json:"ignore-volume-az,omitempty" yaml:"ignore-volume-az,omitempty"` + TrustDevicePath bool `json:"trust-device-path,omitempty" yaml:"trust-device-path,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_calico_network_provider.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_calico_network_provider.go new file mode 100644 index 000000000..4bfc50b09 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_calico_network_provider.go @@ -0,0 +1,10 @@ +package client + +const ( + CalicoNetworkProviderType = "calicoNetworkProvider" + CalicoNetworkProviderFieldCloudProvider = "cloudProvider" +) + +type CalicoNetworkProvider struct { + CloudProvider string `json:"cloudProvider,omitempty" yaml:"cloudProvider,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_canal_network_provider.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_canal_network_provider.go new file mode 100644 index 000000000..e648a18ca --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_canal_network_provider.go @@ -0,0 +1,10 @@ +package client + +const ( + CanalNetworkProviderType = "canalNetworkProvider" + CanalNetworkProviderFieldIface = "iface" +) + +type CanalNetworkProvider struct { + Iface string `json:"iface,omitempty" yaml:"iface,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_capabilities.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_capabilities.go new file mode 100644 index 000000000..887bcbd4f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_capabilities.go @@ -0,0 +1,18 @@ +package client + +const ( + CapabilitiesType = "capabilities" + CapabilitiesFieldIngressCapabilities = "ingressCapabilities" + CapabilitiesFieldLoadBalancerCapabilities = "loadBalancerCapabilities" + CapabilitiesFieldNodePoolScalingSupported = "nodePoolScalingSupported" + CapabilitiesFieldNodePortRange = "nodePortRange" + CapabilitiesFieldTaintSupport = "taintSupport" +) + +type Capabilities struct { + IngressCapabilities []IngressCapabilities `json:"ingressCapabilities,omitempty" yaml:"ingressCapabilities,omitempty"` + LoadBalancerCapabilities *LoadBalancerCapabilities `json:"loadBalancerCapabilities,omitempty" yaml:"loadBalancerCapabilities,omitempty"` + NodePoolScalingSupported bool `json:"nodePoolScalingSupported,omitempty" yaml:"nodePoolScalingSupported,omitempty"` + NodePortRange string `json:"nodePortRange,omitempty" yaml:"nodePortRange,omitempty"` + TaintSupport *bool `json:"taintSupport,omitempty" yaml:"taintSupport,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog.go new file mode 100644 index 000000000..4d3233823 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog.go @@ -0,0 +1,164 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + CatalogType = "catalog" + CatalogFieldAnnotations = "annotations" + CatalogFieldBranch = "branch" + CatalogFieldCatalogSecrets = "catalogSecrets" + CatalogFieldCommit = "commit" + CatalogFieldConditions = "conditions" + CatalogFieldCreated = "created" + CatalogFieldCreatorID = "creatorId" + CatalogFieldCredentialSecret = "credentialSecret" + CatalogFieldDescription = "description" + CatalogFieldHelmVersion = "helmVersion" + CatalogFieldKind = "kind" + CatalogFieldLabels = "labels" + CatalogFieldLastRefreshTimestamp = "lastRefreshTimestamp" + CatalogFieldName = "name" + CatalogFieldOwnerReferences = "ownerReferences" + CatalogFieldPassword = "password" + CatalogFieldRemoved = "removed" + CatalogFieldState = "state" + CatalogFieldTransitioning = "transitioning" + CatalogFieldTransitioningMessage = "transitioningMessage" + CatalogFieldURL = "url" + CatalogFieldUUID = "uuid" + CatalogFieldUsername = "username" +) + +type Catalog struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Branch string `json:"branch,omitempty" yaml:"branch,omitempty"` + CatalogSecrets *CatalogSecrets `json:"catalogSecrets,omitempty" yaml:"catalogSecrets,omitempty"` + Commit string `json:"commit,omitempty" yaml:"commit,omitempty"` + Conditions []CatalogCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + CredentialSecret string `json:"credentialSecret,omitempty" yaml:"credentialSecret,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + HelmVersion string `json:"helmVersion,omitempty" yaml:"helmVersion,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + LastRefreshTimestamp string `json:"lastRefreshTimestamp,omitempty" yaml:"lastRefreshTimestamp,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Password string `json:"password,omitempty" yaml:"password,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + URL string `json:"url,omitempty" yaml:"url,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + Username string `json:"username,omitempty" yaml:"username,omitempty"` +} + +type CatalogCollection struct { + types.Collection + Data []Catalog `json:"data,omitempty"` + client *CatalogClient +} + +type CatalogClient struct { + apiClient *Client +} + +type CatalogOperations interface { + List(opts *types.ListOpts) (*CatalogCollection, error) + ListAll(opts *types.ListOpts) (*CatalogCollection, error) + Create(opts *Catalog) (*Catalog, error) + Update(existing *Catalog, updates interface{}) (*Catalog, error) + Replace(existing *Catalog) (*Catalog, error) + ByID(id string) (*Catalog, error) + Delete(container *Catalog) error + + ActionRefresh(resource *Catalog) (*CatalogRefresh, error) + + CollectionActionRefresh(resource *CatalogCollection) (*CatalogRefresh, error) +} + +func newCatalogClient(apiClient *Client) *CatalogClient { + return &CatalogClient{ + apiClient: apiClient, + } +} + +func (c *CatalogClient) Create(container *Catalog) (*Catalog, error) { + resp := &Catalog{} + err := c.apiClient.Ops.DoCreate(CatalogType, container, resp) + return resp, err +} + +func (c *CatalogClient) Update(existing *Catalog, updates interface{}) (*Catalog, error) { + resp := &Catalog{} + err := c.apiClient.Ops.DoUpdate(CatalogType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *CatalogClient) Replace(obj *Catalog) (*Catalog, error) { + resp := &Catalog{} + err := c.apiClient.Ops.DoReplace(CatalogType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *CatalogClient) List(opts *types.ListOpts) (*CatalogCollection, error) { + resp := &CatalogCollection{} + err := c.apiClient.Ops.DoList(CatalogType, opts, resp) + resp.client = c + return resp, err +} + +func (c *CatalogClient) ListAll(opts *types.ListOpts) (*CatalogCollection, error) { + resp := &CatalogCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *CatalogCollection) Next() (*CatalogCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &CatalogCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *CatalogClient) ByID(id string) (*Catalog, error) { + resp := &Catalog{} + err := c.apiClient.Ops.DoByID(CatalogType, id, resp) + return resp, err +} + +func (c *CatalogClient) Delete(container *Catalog) error { + return c.apiClient.Ops.DoResourceDelete(CatalogType, &container.Resource) +} + +func (c *CatalogClient) ActionRefresh(resource *Catalog) (*CatalogRefresh, error) { + resp := &CatalogRefresh{} + err := c.apiClient.Ops.DoAction(CatalogType, "refresh", &resource.Resource, nil, resp) + return resp, err +} + +func (c *CatalogClient) CollectionActionRefresh(resource *CatalogCollection) (*CatalogRefresh, error) { + resp := &CatalogRefresh{} + err := c.apiClient.Ops.DoCollectionAction(CatalogType, "refresh", &resource.Collection, nil, resp) + return resp, err +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_condition.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_condition.go new file mode 100644 index 000000000..0aba7f4ea --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_condition.go @@ -0,0 +1,20 @@ +package client + +const ( + CatalogConditionType = "catalogCondition" + CatalogConditionFieldLastTransitionTime = "lastTransitionTime" + CatalogConditionFieldLastUpdateTime = "lastUpdateTime" + CatalogConditionFieldMessage = "message" + CatalogConditionFieldReason = "reason" + CatalogConditionFieldStatus = "status" + CatalogConditionFieldType = "type" +) + +type CatalogCondition struct { + LastTransitionTime string `json:"lastTransitionTime,omitempty" yaml:"lastTransitionTime,omitempty"` + LastUpdateTime string `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` + Reason string `json:"reason,omitempty" yaml:"reason,omitempty"` + Status string `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_refresh.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_refresh.go new file mode 100644 index 000000000..b2f825f71 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_refresh.go @@ -0,0 +1,10 @@ +package client + +const ( + CatalogRefreshType = "catalogRefresh" + CatalogRefreshFieldCatalogs = "catalogs" +) + +type CatalogRefresh struct { + Catalogs []string `json:"catalogs,omitempty" yaml:"catalogs,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_secrets.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_secrets.go new file mode 100644 index 000000000..d89c146f8 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_secrets.go @@ -0,0 +1,10 @@ +package client + +const ( + CatalogSecretsType = "catalogSecrets" + CatalogSecretsFieldCredentialSecret = "credentialSecret" +) + +type CatalogSecrets struct { + CredentialSecret string `json:"credentialSecret,omitempty" yaml:"credentialSecret,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_spec.go new file mode 100644 index 000000000..0eb5c87d0 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_spec.go @@ -0,0 +1,24 @@ +package client + +const ( + CatalogSpecType = "catalogSpec" + CatalogSpecFieldBranch = "branch" + CatalogSpecFieldCatalogKind = "catalogKind" + CatalogSpecFieldCatalogSecrets = "catalogSecrets" + CatalogSpecFieldDescription = "description" + CatalogSpecFieldHelmVersion = "helmVersion" + CatalogSpecFieldPassword = "password" + CatalogSpecFieldURL = "url" + CatalogSpecFieldUsername = "username" +) + +type CatalogSpec struct { + Branch string `json:"branch,omitempty" yaml:"branch,omitempty"` + CatalogKind string `json:"catalogKind,omitempty" yaml:"catalogKind,omitempty"` + CatalogSecrets *CatalogSecrets `json:"catalogSecrets,omitempty" yaml:"catalogSecrets,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + HelmVersion string `json:"helmVersion,omitempty" yaml:"helmVersion,omitempty"` + Password string `json:"password,omitempty" yaml:"password,omitempty"` + URL string `json:"url,omitempty" yaml:"url,omitempty"` + Username string `json:"username,omitempty" yaml:"username,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_status.go new file mode 100644 index 000000000..624f1434b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_status.go @@ -0,0 +1,18 @@ +package client + +const ( + CatalogStatusType = "catalogStatus" + CatalogStatusFieldCommit = "commit" + CatalogStatusFieldConditions = "conditions" + CatalogStatusFieldCredentialSecret = "credentialSecret" + CatalogStatusFieldHelmVersionCommits = "helmVersionCommits" + CatalogStatusFieldLastRefreshTimestamp = "lastRefreshTimestamp" +) + +type CatalogStatus struct { + Commit string `json:"commit,omitempty" yaml:"commit,omitempty"` + Conditions []CatalogCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + CredentialSecret string `json:"credentialSecret,omitempty" yaml:"credentialSecret,omitempty"` + HelmVersionCommits map[string]VersionCommits `json:"helmVersionCommits,omitempty" yaml:"helmVersionCommits,omitempty"` + LastRefreshTimestamp string `json:"lastRefreshTimestamp,omitempty" yaml:"lastRefreshTimestamp,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_template.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_template.go new file mode 100644 index 000000000..bc609f8a5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_template.go @@ -0,0 +1,166 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + CatalogTemplateType = "catalogTemplate" + CatalogTemplateFieldAnnotations = "annotations" + CatalogTemplateFieldCatalogID = "catalogId" + CatalogTemplateFieldCategories = "categories" + CatalogTemplateFieldCategory = "category" + CatalogTemplateFieldClusterCatalogID = "clusterCatalogId" + CatalogTemplateFieldClusterID = "clusterId" + CatalogTemplateFieldCreated = "created" + CatalogTemplateFieldCreatorID = "creatorId" + CatalogTemplateFieldDefaultTemplateVersionID = "defaultTemplateVersionId" + CatalogTemplateFieldDefaultVersion = "defaultVersion" + CatalogTemplateFieldDescription = "description" + CatalogTemplateFieldFolderName = "folderName" + CatalogTemplateFieldIcon = "icon" + CatalogTemplateFieldIconFilename = "iconFilename" + CatalogTemplateFieldLabels = "labels" + CatalogTemplateFieldMaintainer = "maintainer" + CatalogTemplateFieldName = "name" + CatalogTemplateFieldOwnerReferences = "ownerReferences" + CatalogTemplateFieldPath = "path" + CatalogTemplateFieldProjectCatalogID = "projectCatalogId" + CatalogTemplateFieldProjectID = "projectId" + CatalogTemplateFieldProjectURL = "projectURL" + CatalogTemplateFieldReadme = "readme" + CatalogTemplateFieldRemoved = "removed" + CatalogTemplateFieldState = "state" + CatalogTemplateFieldStatus = "status" + CatalogTemplateFieldTransitioning = "transitioning" + CatalogTemplateFieldTransitioningMessage = "transitioningMessage" + CatalogTemplateFieldUUID = "uuid" + CatalogTemplateFieldUpgradeFrom = "upgradeFrom" + CatalogTemplateFieldVersionLinks = "versionLinks" + CatalogTemplateFieldVersions = "versions" +) + +type CatalogTemplate struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + CatalogID string `json:"catalogId,omitempty" yaml:"catalogId,omitempty"` + Categories []string `json:"categories,omitempty" yaml:"categories,omitempty"` + Category string `json:"category,omitempty" yaml:"category,omitempty"` + ClusterCatalogID string `json:"clusterCatalogId,omitempty" yaml:"clusterCatalogId,omitempty"` + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + DefaultTemplateVersionID string `json:"defaultTemplateVersionId,omitempty" yaml:"defaultTemplateVersionId,omitempty"` + DefaultVersion string `json:"defaultVersion,omitempty" yaml:"defaultVersion,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + FolderName string `json:"folderName,omitempty" yaml:"folderName,omitempty"` + Icon string `json:"icon,omitempty" yaml:"icon,omitempty"` + IconFilename string `json:"iconFilename,omitempty" yaml:"iconFilename,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Maintainer string `json:"maintainer,omitempty" yaml:"maintainer,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` + ProjectCatalogID string `json:"projectCatalogId,omitempty" yaml:"projectCatalogId,omitempty"` + ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"` + ProjectURL string `json:"projectURL,omitempty" yaml:"projectURL,omitempty"` + Readme string `json:"readme,omitempty" yaml:"readme,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Status *TemplateStatus `json:"status,omitempty" yaml:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UpgradeFrom string `json:"upgradeFrom,omitempty" yaml:"upgradeFrom,omitempty"` + VersionLinks map[string]string `json:"versionLinks,omitempty" yaml:"versionLinks,omitempty"` + Versions []TemplateVersionSpec `json:"versions,omitempty" yaml:"versions,omitempty"` +} + +type CatalogTemplateCollection struct { + types.Collection + Data []CatalogTemplate `json:"data,omitempty"` + client *CatalogTemplateClient +} + +type CatalogTemplateClient struct { + apiClient *Client +} + +type CatalogTemplateOperations interface { + List(opts *types.ListOpts) (*CatalogTemplateCollection, error) + ListAll(opts *types.ListOpts) (*CatalogTemplateCollection, error) + Create(opts *CatalogTemplate) (*CatalogTemplate, error) + Update(existing *CatalogTemplate, updates interface{}) (*CatalogTemplate, error) + Replace(existing *CatalogTemplate) (*CatalogTemplate, error) + ByID(id string) (*CatalogTemplate, error) + Delete(container *CatalogTemplate) error +} + +func newCatalogTemplateClient(apiClient *Client) *CatalogTemplateClient { + return &CatalogTemplateClient{ + apiClient: apiClient, + } +} + +func (c *CatalogTemplateClient) Create(container *CatalogTemplate) (*CatalogTemplate, error) { + resp := &CatalogTemplate{} + err := c.apiClient.Ops.DoCreate(CatalogTemplateType, container, resp) + return resp, err +} + +func (c *CatalogTemplateClient) Update(existing *CatalogTemplate, updates interface{}) (*CatalogTemplate, error) { + resp := &CatalogTemplate{} + err := c.apiClient.Ops.DoUpdate(CatalogTemplateType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *CatalogTemplateClient) Replace(obj *CatalogTemplate) (*CatalogTemplate, error) { + resp := &CatalogTemplate{} + err := c.apiClient.Ops.DoReplace(CatalogTemplateType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *CatalogTemplateClient) List(opts *types.ListOpts) (*CatalogTemplateCollection, error) { + resp := &CatalogTemplateCollection{} + err := c.apiClient.Ops.DoList(CatalogTemplateType, opts, resp) + resp.client = c + return resp, err +} + +func (c *CatalogTemplateClient) ListAll(opts *types.ListOpts) (*CatalogTemplateCollection, error) { + resp := &CatalogTemplateCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *CatalogTemplateCollection) Next() (*CatalogTemplateCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &CatalogTemplateCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *CatalogTemplateClient) ByID(id string) (*CatalogTemplate, error) { + resp := &CatalogTemplate{} + err := c.apiClient.Ops.DoByID(CatalogTemplateType, id, resp) + return resp, err +} + +func (c *CatalogTemplateClient) Delete(container *CatalogTemplate) error { + return c.apiClient.Ops.DoResourceDelete(CatalogTemplateType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_template_version.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_template_version.go new file mode 100644 index 000000000..520ed1864 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_catalog_template_version.go @@ -0,0 +1,158 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + CatalogTemplateVersionType = "catalogTemplateVersion" + CatalogTemplateVersionFieldAnnotations = "annotations" + CatalogTemplateVersionFieldAppReadme = "appReadme" + CatalogTemplateVersionFieldCreated = "created" + CatalogTemplateVersionFieldCreatorID = "creatorId" + CatalogTemplateVersionFieldDigest = "digest" + CatalogTemplateVersionFieldExternalID = "externalId" + CatalogTemplateVersionFieldFiles = "files" + CatalogTemplateVersionFieldKubeVersion = "kubeVersion" + CatalogTemplateVersionFieldLabels = "labels" + CatalogTemplateVersionFieldName = "name" + CatalogTemplateVersionFieldOwnerReferences = "ownerReferences" + CatalogTemplateVersionFieldQuestions = "questions" + CatalogTemplateVersionFieldRancherMaxVersion = "rancherMaxVersion" + CatalogTemplateVersionFieldRancherMinVersion = "rancherMinVersion" + CatalogTemplateVersionFieldRancherVersion = "rancherVersion" + CatalogTemplateVersionFieldReadme = "readme" + CatalogTemplateVersionFieldRemoved = "removed" + CatalogTemplateVersionFieldRequiredNamespace = "requiredNamespace" + CatalogTemplateVersionFieldState = "state" + CatalogTemplateVersionFieldStatus = "status" + CatalogTemplateVersionFieldTransitioning = "transitioning" + CatalogTemplateVersionFieldTransitioningMessage = "transitioningMessage" + CatalogTemplateVersionFieldUUID = "uuid" + CatalogTemplateVersionFieldUpgradeVersionLinks = "upgradeVersionLinks" + CatalogTemplateVersionFieldVersion = "version" + CatalogTemplateVersionFieldVersionDir = "versionDir" + CatalogTemplateVersionFieldVersionName = "versionName" + CatalogTemplateVersionFieldVersionURLs = "versionUrls" +) + +type CatalogTemplateVersion struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + AppReadme string `json:"appReadme,omitempty" yaml:"appReadme,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Digest string `json:"digest,omitempty" yaml:"digest,omitempty"` + ExternalID string `json:"externalId,omitempty" yaml:"externalId,omitempty"` + Files map[string]string `json:"files,omitempty" yaml:"files,omitempty"` + KubeVersion string `json:"kubeVersion,omitempty" yaml:"kubeVersion,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Questions []Question `json:"questions,omitempty" yaml:"questions,omitempty"` + RancherMaxVersion string `json:"rancherMaxVersion,omitempty" yaml:"rancherMaxVersion,omitempty"` + RancherMinVersion string `json:"rancherMinVersion,omitempty" yaml:"rancherMinVersion,omitempty"` + RancherVersion string `json:"rancherVersion,omitempty" yaml:"rancherVersion,omitempty"` + Readme string `json:"readme,omitempty" yaml:"readme,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + RequiredNamespace string `json:"requiredNamespace,omitempty" yaml:"requiredNamespace,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Status *TemplateVersionStatus `json:"status,omitempty" yaml:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UpgradeVersionLinks map[string]string `json:"upgradeVersionLinks,omitempty" yaml:"upgradeVersionLinks,omitempty"` + Version string `json:"version,omitempty" yaml:"version,omitempty"` + VersionDir string `json:"versionDir,omitempty" yaml:"versionDir,omitempty"` + VersionName string `json:"versionName,omitempty" yaml:"versionName,omitempty"` + VersionURLs []string `json:"versionUrls,omitempty" yaml:"versionUrls,omitempty"` +} + +type CatalogTemplateVersionCollection struct { + types.Collection + Data []CatalogTemplateVersion `json:"data,omitempty"` + client *CatalogTemplateVersionClient +} + +type CatalogTemplateVersionClient struct { + apiClient *Client +} + +type CatalogTemplateVersionOperations interface { + List(opts *types.ListOpts) (*CatalogTemplateVersionCollection, error) + ListAll(opts *types.ListOpts) (*CatalogTemplateVersionCollection, error) + Create(opts *CatalogTemplateVersion) (*CatalogTemplateVersion, error) + Update(existing *CatalogTemplateVersion, updates interface{}) (*CatalogTemplateVersion, error) + Replace(existing *CatalogTemplateVersion) (*CatalogTemplateVersion, error) + ByID(id string) (*CatalogTemplateVersion, error) + Delete(container *CatalogTemplateVersion) error +} + +func newCatalogTemplateVersionClient(apiClient *Client) *CatalogTemplateVersionClient { + return &CatalogTemplateVersionClient{ + apiClient: apiClient, + } +} + +func (c *CatalogTemplateVersionClient) Create(container *CatalogTemplateVersion) (*CatalogTemplateVersion, error) { + resp := &CatalogTemplateVersion{} + err := c.apiClient.Ops.DoCreate(CatalogTemplateVersionType, container, resp) + return resp, err +} + +func (c *CatalogTemplateVersionClient) Update(existing *CatalogTemplateVersion, updates interface{}) (*CatalogTemplateVersion, error) { + resp := &CatalogTemplateVersion{} + err := c.apiClient.Ops.DoUpdate(CatalogTemplateVersionType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *CatalogTemplateVersionClient) Replace(obj *CatalogTemplateVersion) (*CatalogTemplateVersion, error) { + resp := &CatalogTemplateVersion{} + err := c.apiClient.Ops.DoReplace(CatalogTemplateVersionType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *CatalogTemplateVersionClient) List(opts *types.ListOpts) (*CatalogTemplateVersionCollection, error) { + resp := &CatalogTemplateVersionCollection{} + err := c.apiClient.Ops.DoList(CatalogTemplateVersionType, opts, resp) + resp.client = c + return resp, err +} + +func (c *CatalogTemplateVersionClient) ListAll(opts *types.ListOpts) (*CatalogTemplateVersionCollection, error) { + resp := &CatalogTemplateVersionCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *CatalogTemplateVersionCollection) Next() (*CatalogTemplateVersionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &CatalogTemplateVersionCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *CatalogTemplateVersionClient) ByID(id string) (*CatalogTemplateVersion, error) { + resp := &CatalogTemplateVersion{} + err := c.apiClient.Ops.DoByID(CatalogTemplateVersionType, id, resp) + return resp, err +} + +func (c *CatalogTemplateVersionClient) Delete(container *CatalogTemplateVersion) error { + return c.apiClient.Ops.DoResourceDelete(CatalogTemplateVersionType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ceph_fsvolume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ceph_fsvolume_source.go new file mode 100644 index 000000000..363ba5eb0 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ceph_fsvolume_source.go @@ -0,0 +1,20 @@ +package client + +const ( + CephFSVolumeSourceType = "cephFSVolumeSource" + CephFSVolumeSourceFieldMonitors = "monitors" + CephFSVolumeSourceFieldPath = "path" + CephFSVolumeSourceFieldReadOnly = "readOnly" + CephFSVolumeSourceFieldSecretFile = "secretFile" + CephFSVolumeSourceFieldSecretRef = "secretRef" + CephFSVolumeSourceFieldUser = "user" +) + +type CephFSVolumeSource struct { + Monitors []string `json:"monitors,omitempty" yaml:"monitors,omitempty"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + SecretFile string `json:"secretFile,omitempty" yaml:"secretFile,omitempty"` + SecretRef *LocalObjectReference `json:"secretRef,omitempty" yaml:"secretRef,omitempty"` + User string `json:"user,omitempty" yaml:"user,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cert_expiration.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cert_expiration.go new file mode 100644 index 000000000..0b05b4652 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cert_expiration.go @@ -0,0 +1,10 @@ +package client + +const ( + CertExpirationType = "certExpiration" + CertExpirationFieldExpirationDate = "expirationDate" +) + +type CertExpiration struct { + ExpirationDate string `json:"expirationDate,omitempty" yaml:"expirationDate,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_change_password_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_change_password_input.go new file mode 100644 index 000000000..e3a12085f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_change_password_input.go @@ -0,0 +1,12 @@ +package client + +const ( + ChangePasswordInputType = "changePasswordInput" + ChangePasswordInputFieldCurrentPassword = "currentPassword" + ChangePasswordInputFieldNewPassword = "newPassword" +) + +type ChangePasswordInput struct { + CurrentPassword string `json:"currentPassword,omitempty" yaml:"currentPassword,omitempty"` + NewPassword string `json:"newPassword,omitempty" yaml:"newPassword,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cinder_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cinder_volume_source.go new file mode 100644 index 000000000..ac0a6211e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cinder_volume_source.go @@ -0,0 +1,16 @@ +package client + +const ( + CinderVolumeSourceType = "cinderVolumeSource" + CinderVolumeSourceFieldFSType = "fsType" + CinderVolumeSourceFieldReadOnly = "readOnly" + CinderVolumeSourceFieldSecretRef = "secretRef" + CinderVolumeSourceFieldVolumeID = "volumeID" +) + +type CinderVolumeSource struct { + FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + SecretRef *LocalObjectReference `json:"secretRef,omitempty" yaml:"secretRef,omitempty"` + VolumeID string `json:"volumeID,omitempty" yaml:"volumeID,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_client.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_client.go new file mode 100644 index 000000000..8ba5dc7f6 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_client.go @@ -0,0 +1,124 @@ +package client + +import ( + "github.com/rancher/norman/clientbase" +) + +type Client struct { + clientbase.APIBaseClient + + NodePool NodePoolOperations + Node NodeOperations + NodeDriver NodeDriverOperations + NodeTemplate NodeTemplateOperations + PodSecurityAdmissionConfigurationTemplate PodSecurityAdmissionConfigurationTemplateOperations + Project ProjectOperations + GlobalRole GlobalRoleOperations + GlobalRoleBinding GlobalRoleBindingOperations + RoleTemplate RoleTemplateOperations + ClusterRoleTemplateBinding ClusterRoleTemplateBindingOperations + ProjectRoleTemplateBinding ProjectRoleTemplateBindingOperations + Cluster ClusterOperations + ClusterRegistrationToken ClusterRegistrationTokenOperations + Catalog CatalogOperations + Template TemplateOperations + CatalogTemplate CatalogTemplateOperations + CatalogTemplateVersion CatalogTemplateVersionOperations + TemplateVersion TemplateVersionOperations + TemplateContent TemplateContentOperations + Group GroupOperations + GroupMember GroupMemberOperations + SamlToken SamlTokenOperations + Principal PrincipalOperations + User UserOperations + AuthConfig AuthConfigOperations + LdapConfig LdapConfigOperations + Token TokenOperations + DynamicSchema DynamicSchemaOperations + Preference PreferenceOperations + ProjectNetworkPolicy ProjectNetworkPolicyOperations + Setting SettingOperations + Feature FeatureOperations + ComposeConfig ComposeConfigOperations + ProjectCatalog ProjectCatalogOperations + ClusterCatalog ClusterCatalogOperations + MultiClusterApp MultiClusterAppOperations + MultiClusterAppRevision MultiClusterAppRevisionOperations + GlobalDns GlobalDnsOperations + GlobalDnsProvider GlobalDnsProviderOperations + KontainerDriver KontainerDriverOperations + EtcdBackup EtcdBackupOperations + CloudCredential CloudCredentialOperations + ManagementSecret ManagementSecretOperations + ClusterTemplate ClusterTemplateOperations + ClusterTemplateRevision ClusterTemplateRevisionOperations + RkeK8sSystemImage RkeK8sSystemImageOperations + RkeK8sServiceOption RkeK8sServiceOptionOperations + RkeAddon RkeAddonOperations + FleetWorkspace FleetWorkspaceOperations + RancherUserNotification RancherUserNotificationOperations +} + +func NewClient(opts *clientbase.ClientOpts) (*Client, error) { + baseClient, err := clientbase.NewAPIClient(opts) + if err != nil { + return nil, err + } + + client := &Client{ + APIBaseClient: baseClient, + } + + client.NodePool = newNodePoolClient(client) + client.Node = newNodeClient(client) + client.NodeDriver = newNodeDriverClient(client) + client.NodeTemplate = newNodeTemplateClient(client) + client.PodSecurityAdmissionConfigurationTemplate = newPodSecurityAdmissionConfigurationTemplateClient(client) + client.Project = newProjectClient(client) + client.GlobalRole = newGlobalRoleClient(client) + client.GlobalRoleBinding = newGlobalRoleBindingClient(client) + client.RoleTemplate = newRoleTemplateClient(client) + client.ClusterRoleTemplateBinding = newClusterRoleTemplateBindingClient(client) + client.ProjectRoleTemplateBinding = newProjectRoleTemplateBindingClient(client) + client.Cluster = newClusterClient(client) + client.ClusterRegistrationToken = newClusterRegistrationTokenClient(client) + client.Catalog = newCatalogClient(client) + client.Template = newTemplateClient(client) + client.CatalogTemplate = newCatalogTemplateClient(client) + client.CatalogTemplateVersion = newCatalogTemplateVersionClient(client) + client.TemplateVersion = newTemplateVersionClient(client) + client.TemplateContent = newTemplateContentClient(client) + client.Group = newGroupClient(client) + client.GroupMember = newGroupMemberClient(client) + client.SamlToken = newSamlTokenClient(client) + client.Principal = newPrincipalClient(client) + client.User = newUserClient(client) + client.AuthConfig = newAuthConfigClient(client) + client.LdapConfig = newLdapConfigClient(client) + client.Token = newTokenClient(client) + client.DynamicSchema = newDynamicSchemaClient(client) + client.Preference = newPreferenceClient(client) + client.ProjectNetworkPolicy = newProjectNetworkPolicyClient(client) + client.Setting = newSettingClient(client) + client.Feature = newFeatureClient(client) + client.ComposeConfig = newComposeConfigClient(client) + client.ProjectCatalog = newProjectCatalogClient(client) + client.ClusterCatalog = newClusterCatalogClient(client) + client.MultiClusterApp = newMultiClusterAppClient(client) + client.MultiClusterAppRevision = newMultiClusterAppRevisionClient(client) + client.GlobalDns = newGlobalDnsClient(client) + client.GlobalDnsProvider = newGlobalDnsProviderClient(client) + client.KontainerDriver = newKontainerDriverClient(client) + client.EtcdBackup = newEtcdBackupClient(client) + client.CloudCredential = newCloudCredentialClient(client) + client.ManagementSecret = newManagementSecretClient(client) + client.ClusterTemplate = newClusterTemplateClient(client) + client.ClusterTemplateRevision = newClusterTemplateRevisionClient(client) + client.RkeK8sSystemImage = newRkeK8sSystemImageClient(client) + client.RkeK8sServiceOption = newRkeK8sServiceOptionClient(client) + client.RkeAddon = newRkeAddonClient(client) + client.FleetWorkspace = newFleetWorkspaceClient(client) + client.RancherUserNotification = newRancherUserNotificationClient(client) + + return client, nil +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloud_credential.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloud_credential.go new file mode 100644 index 000000000..9381da312 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloud_credential.go @@ -0,0 +1,122 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + CloudCredentialType = "cloudCredential" + CloudCredentialFieldAnnotations = "annotations" + CloudCredentialFieldCreated = "created" + CloudCredentialFieldCreatorID = "creatorId" + CloudCredentialFieldDescription = "description" + CloudCredentialFieldLabels = "labels" + CloudCredentialFieldName = "name" + CloudCredentialFieldOwnerReferences = "ownerReferences" + CloudCredentialFieldRemoved = "removed" + CloudCredentialFieldS3CredentialConfig = "s3credentialConfig" + CloudCredentialFieldUUID = "uuid" +) + +type CloudCredential struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + S3CredentialConfig *S3CredentialConfig `json:"s3credentialConfig,omitempty" yaml:"s3credentialConfig,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type CloudCredentialCollection struct { + types.Collection + Data []CloudCredential `json:"data,omitempty"` + client *CloudCredentialClient +} + +type CloudCredentialClient struct { + apiClient *Client +} + +type CloudCredentialOperations interface { + List(opts *types.ListOpts) (*CloudCredentialCollection, error) + ListAll(opts *types.ListOpts) (*CloudCredentialCollection, error) + Create(opts *CloudCredential) (*CloudCredential, error) + Update(existing *CloudCredential, updates interface{}) (*CloudCredential, error) + Replace(existing *CloudCredential) (*CloudCredential, error) + ByID(id string) (*CloudCredential, error) + Delete(container *CloudCredential) error +} + +func newCloudCredentialClient(apiClient *Client) *CloudCredentialClient { + return &CloudCredentialClient{ + apiClient: apiClient, + } +} + +func (c *CloudCredentialClient) Create(container *CloudCredential) (*CloudCredential, error) { + resp := &CloudCredential{} + err := c.apiClient.Ops.DoCreate(CloudCredentialType, container, resp) + return resp, err +} + +func (c *CloudCredentialClient) Update(existing *CloudCredential, updates interface{}) (*CloudCredential, error) { + resp := &CloudCredential{} + err := c.apiClient.Ops.DoUpdate(CloudCredentialType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *CloudCredentialClient) Replace(obj *CloudCredential) (*CloudCredential, error) { + resp := &CloudCredential{} + err := c.apiClient.Ops.DoReplace(CloudCredentialType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *CloudCredentialClient) List(opts *types.ListOpts) (*CloudCredentialCollection, error) { + resp := &CloudCredentialCollection{} + err := c.apiClient.Ops.DoList(CloudCredentialType, opts, resp) + resp.client = c + return resp, err +} + +func (c *CloudCredentialClient) ListAll(opts *types.ListOpts) (*CloudCredentialCollection, error) { + resp := &CloudCredentialCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *CloudCredentialCollection) Next() (*CloudCredentialCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &CloudCredentialCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *CloudCredentialClient) ByID(id string) (*CloudCredential, error) { + resp := &CloudCredential{} + err := c.apiClient.Ops.DoByID(CloudCredentialType, id, resp) + return resp, err +} + +func (c *CloudCredentialClient) Delete(container *CloudCredential) error { + return c.apiClient.Ops.DoResourceDelete(CloudCredentialType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloud_credential_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloud_credential_spec.go new file mode 100644 index 000000000..c72691980 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloud_credential_spec.go @@ -0,0 +1,14 @@ +package client + +const ( + CloudCredentialSpecType = "cloudCredentialSpec" + CloudCredentialSpecFieldDescription = "description" + CloudCredentialSpecFieldDisplayName = "displayName" + CloudCredentialSpecFieldS3CredentialConfig = "s3credentialConfig" +) + +type CloudCredentialSpec struct { + Description string `json:"description,omitempty" yaml:"description,omitempty"` + DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` + S3CredentialConfig *S3CredentialConfig `json:"s3credentialConfig,omitempty" yaml:"s3credentialConfig,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloud_provider.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloud_provider.go new file mode 100644 index 000000000..6300e6fc3 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloud_provider.go @@ -0,0 +1,24 @@ +package client + +const ( + CloudProviderType = "cloudProvider" + CloudProviderFieldAWSCloudProvider = "awsCloudProvider" + CloudProviderFieldAzureCloudProvider = "azureCloudProvider" + CloudProviderFieldCustomCloudProvider = "customCloudProvider" + CloudProviderFieldHarvesterCloudProvider = "harvesterCloudProvider" + CloudProviderFieldName = "name" + CloudProviderFieldOpenstackCloudProvider = "openstackCloudProvider" + CloudProviderFieldUseInstanceMetadataHostname = "useInstanceMetadataHostname" + CloudProviderFieldVsphereCloudProvider = "vsphereCloudProvider" +) + +type CloudProvider struct { + AWSCloudProvider *AWSCloudProvider `json:"awsCloudProvider,omitempty" yaml:"awsCloudProvider,omitempty"` + AzureCloudProvider *AzureCloudProvider `json:"azureCloudProvider,omitempty" yaml:"azureCloudProvider,omitempty"` + CustomCloudProvider string `json:"customCloudProvider,omitempty" yaml:"customCloudProvider,omitempty"` + HarvesterCloudProvider *HarvesterCloudProvider `json:"harvesterCloudProvider,omitempty" yaml:"harvesterCloudProvider,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OpenstackCloudProvider *OpenstackCloudProvider `json:"openstackCloudProvider,omitempty" yaml:"openstackCloudProvider,omitempty"` + UseInstanceMetadataHostname *bool `json:"useInstanceMetadataHostname,omitempty" yaml:"useInstanceMetadataHostname,omitempty"` + VsphereCloudProvider *VsphereCloudProvider `json:"vsphereCloudProvider,omitempty" yaml:"vsphereCloudProvider,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloudflare_provider_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloudflare_provider_config.go new file mode 100644 index 000000000..98ed97243 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cloudflare_provider_config.go @@ -0,0 +1,16 @@ +package client + +const ( + CloudflareProviderConfigType = "cloudflareProviderConfig" + CloudflareProviderConfigFieldAPIEmail = "apiEmail" + CloudflareProviderConfigFieldAPIKey = "apiKey" + CloudflareProviderConfigFieldAdditionalOptions = "additionalOptions" + CloudflareProviderConfigFieldProxySetting = "proxySetting" +) + +type CloudflareProviderConfig struct { + APIEmail string `json:"apiEmail,omitempty" yaml:"apiEmail,omitempty"` + APIKey string `json:"apiKey,omitempty" yaml:"apiKey,omitempty"` + AdditionalOptions map[string]string `json:"additionalOptions,omitempty" yaml:"additionalOptions,omitempty"` + ProxySetting *bool `json:"proxySetting,omitempty" yaml:"proxySetting,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster.go new file mode 100644 index 000000000..8fd88648e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster.go @@ -0,0 +1,318 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + ClusterType = "cluster" + ClusterFieldAADClientCertSecret = "aadClientCertSecret" + ClusterFieldAADClientSecret = "aadClientSecret" + ClusterFieldAKSConfig = "aksConfig" + ClusterFieldAKSStatus = "aksStatus" + ClusterFieldAPIEndpoint = "apiEndpoint" + ClusterFieldAgentEnvVars = "agentEnvVars" + ClusterFieldAgentFeatures = "agentFeatures" + ClusterFieldAgentImage = "agentImage" + ClusterFieldAgentImageOverride = "agentImageOverride" + ClusterFieldAllocatable = "allocatable" + ClusterFieldAnnotations = "annotations" + ClusterFieldAppliedAgentEnvVars = "appliedAgentEnvVars" + ClusterFieldAppliedClusterAgentDeploymentCustomization = "appliedClusterAgentDeploymentCustomization" + ClusterFieldAppliedEnableNetworkPolicy = "appliedEnableNetworkPolicy" + ClusterFieldAppliedSpec = "appliedSpec" + ClusterFieldAuthImage = "authImage" + ClusterFieldCACert = "caCert" + ClusterFieldCapabilities = "capabilities" + ClusterFieldCapacity = "capacity" + ClusterFieldCertificatesExpiration = "certificatesExpiration" + ClusterFieldClusterAgentDeploymentCustomization = "clusterAgentDeploymentCustomization" + ClusterFieldClusterSecrets = "clusterSecrets" + ClusterFieldClusterTemplateAnswers = "answers" + ClusterFieldClusterTemplateID = "clusterTemplateId" + ClusterFieldClusterTemplateQuestions = "questions" + ClusterFieldClusterTemplateRevisionID = "clusterTemplateRevisionId" + ClusterFieldComponentStatuses = "componentStatuses" + ClusterFieldConditions = "conditions" + ClusterFieldCreated = "created" + ClusterFieldCreatorID = "creatorId" + ClusterFieldCurrentCisRunName = "currentCisRunName" + ClusterFieldDefaultClusterRoleForProjectMembers = "defaultClusterRoleForProjectMembers" + ClusterFieldDefaultPodSecurityAdmissionConfigurationTemplateName = "defaultPodSecurityAdmissionConfigurationTemplateName" + ClusterFieldDescription = "description" + ClusterFieldDesiredAgentImage = "desiredAgentImage" + ClusterFieldDesiredAuthImage = "desiredAuthImage" + ClusterFieldDockerRootDir = "dockerRootDir" + ClusterFieldDriver = "driver" + ClusterFieldEKSConfig = "eksConfig" + ClusterFieldEKSStatus = "eksStatus" + ClusterFieldEnableNetworkPolicy = "enableNetworkPolicy" + ClusterFieldFailedSpec = "failedSpec" + ClusterFieldFleetAgentDeploymentCustomization = "fleetAgentDeploymentCustomization" + ClusterFieldFleetWorkspaceName = "fleetWorkspaceName" + ClusterFieldGKEConfig = "gkeConfig" + ClusterFieldGKEStatus = "gkeStatus" + ClusterFieldImportedConfig = "importedConfig" + ClusterFieldInternal = "internal" + ClusterFieldIstioEnabled = "istioEnabled" + ClusterFieldK3sConfig = "k3sConfig" + ClusterFieldLabels = "labels" + ClusterFieldLimits = "limits" + ClusterFieldLinuxWorkerCount = "linuxWorkerCount" + ClusterFieldLocalClusterAuthEndpoint = "localClusterAuthEndpoint" + ClusterFieldName = "name" + ClusterFieldNodeCount = "nodeCount" + ClusterFieldNodeVersion = "nodeVersion" + ClusterFieldOpenStackSecret = "openStackSecret" + ClusterFieldOwnerReferences = "ownerReferences" + ClusterFieldPrivateRegistrySecret = "privateRegistrySecret" + ClusterFieldProvider = "provider" + ClusterFieldRancherKubernetesEngineConfig = "rancherKubernetesEngineConfig" + ClusterFieldRemoved = "removed" + ClusterFieldRequested = "requested" + ClusterFieldRke2Config = "rke2Config" + ClusterFieldS3CredentialSecret = "s3CredentialSecret" + ClusterFieldServiceAccountTokenSecret = "serviceAccountTokenSecret" + ClusterFieldState = "state" + ClusterFieldTransitioning = "transitioning" + ClusterFieldTransitioningMessage = "transitioningMessage" + ClusterFieldUUID = "uuid" + ClusterFieldVersion = "version" + ClusterFieldVirtualCenterSecret = "virtualCenterSecret" + ClusterFieldVsphereSecret = "vsphereSecret" + ClusterFieldWeavePasswordSecret = "weavePasswordSecret" + ClusterFieldWindowsPreferedCluster = "windowsPreferedCluster" + ClusterFieldWindowsWorkerCount = "windowsWorkerCount" +) + +type Cluster struct { + types.Resource + AADClientCertSecret string `json:"aadClientCertSecret,omitempty" yaml:"aadClientCertSecret,omitempty"` + AADClientSecret string `json:"aadClientSecret,omitempty" yaml:"aadClientSecret,omitempty"` + AKSConfig *AKSClusterConfigSpec `json:"aksConfig,omitempty" yaml:"aksConfig,omitempty"` + AKSStatus *AKSStatus `json:"aksStatus,omitempty" yaml:"aksStatus,omitempty"` + APIEndpoint string `json:"apiEndpoint,omitempty" yaml:"apiEndpoint,omitempty"` + AgentEnvVars []EnvVar `json:"agentEnvVars,omitempty" yaml:"agentEnvVars,omitempty"` + AgentFeatures map[string]bool `json:"agentFeatures,omitempty" yaml:"agentFeatures,omitempty"` + AgentImage string `json:"agentImage,omitempty" yaml:"agentImage,omitempty"` + AgentImageOverride string `json:"agentImageOverride,omitempty" yaml:"agentImageOverride,omitempty"` + Allocatable map[string]string `json:"allocatable,omitempty" yaml:"allocatable,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + AppliedAgentEnvVars []EnvVar `json:"appliedAgentEnvVars,omitempty" yaml:"appliedAgentEnvVars,omitempty"` + AppliedClusterAgentDeploymentCustomization *AgentDeploymentCustomization `json:"appliedClusterAgentDeploymentCustomization,omitempty" yaml:"appliedClusterAgentDeploymentCustomization,omitempty"` + AppliedEnableNetworkPolicy bool `json:"appliedEnableNetworkPolicy,omitempty" yaml:"appliedEnableNetworkPolicy,omitempty"` + AppliedSpec *ClusterSpec `json:"appliedSpec,omitempty" yaml:"appliedSpec,omitempty"` + AuthImage string `json:"authImage,omitempty" yaml:"authImage,omitempty"` + CACert string `json:"caCert,omitempty" yaml:"caCert,omitempty"` + Capabilities *Capabilities `json:"capabilities,omitempty" yaml:"capabilities,omitempty"` + Capacity map[string]string `json:"capacity,omitempty" yaml:"capacity,omitempty"` + CertificatesExpiration map[string]CertExpiration `json:"certificatesExpiration,omitempty" yaml:"certificatesExpiration,omitempty"` + ClusterAgentDeploymentCustomization *AgentDeploymentCustomization `json:"clusterAgentDeploymentCustomization,omitempty" yaml:"clusterAgentDeploymentCustomization,omitempty"` + ClusterSecrets *ClusterSecrets `json:"clusterSecrets,omitempty" yaml:"clusterSecrets,omitempty"` + ClusterTemplateAnswers *Answer `json:"answers,omitempty" yaml:"answers,omitempty"` + ClusterTemplateID string `json:"clusterTemplateId,omitempty" yaml:"clusterTemplateId,omitempty"` + ClusterTemplateQuestions []Question `json:"questions,omitempty" yaml:"questions,omitempty"` + ClusterTemplateRevisionID string `json:"clusterTemplateRevisionId,omitempty" yaml:"clusterTemplateRevisionId,omitempty"` + ComponentStatuses []ClusterComponentStatus `json:"componentStatuses,omitempty" yaml:"componentStatuses,omitempty"` + Conditions []ClusterCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + CurrentCisRunName string `json:"currentCisRunName,omitempty" yaml:"currentCisRunName,omitempty"` + DefaultClusterRoleForProjectMembers string `json:"defaultClusterRoleForProjectMembers,omitempty" yaml:"defaultClusterRoleForProjectMembers,omitempty"` + DefaultPodSecurityAdmissionConfigurationTemplateName string `json:"defaultPodSecurityAdmissionConfigurationTemplateName,omitempty" yaml:"defaultPodSecurityAdmissionConfigurationTemplateName,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + DesiredAgentImage string `json:"desiredAgentImage,omitempty" yaml:"desiredAgentImage,omitempty"` + DesiredAuthImage string `json:"desiredAuthImage,omitempty" yaml:"desiredAuthImage,omitempty"` + DockerRootDir string `json:"dockerRootDir,omitempty" yaml:"dockerRootDir,omitempty"` + Driver string `json:"driver,omitempty" yaml:"driver,omitempty"` + EKSConfig *EKSClusterConfigSpec `json:"eksConfig,omitempty" yaml:"eksConfig,omitempty"` + EKSStatus *EKSStatus `json:"eksStatus,omitempty" yaml:"eksStatus,omitempty"` + EnableNetworkPolicy *bool `json:"enableNetworkPolicy,omitempty" yaml:"enableNetworkPolicy,omitempty"` + FailedSpec *ClusterSpec `json:"failedSpec,omitempty" yaml:"failedSpec,omitempty"` + FleetAgentDeploymentCustomization *AgentDeploymentCustomization `json:"fleetAgentDeploymentCustomization,omitempty" yaml:"fleetAgentDeploymentCustomization,omitempty"` + FleetWorkspaceName string `json:"fleetWorkspaceName,omitempty" yaml:"fleetWorkspaceName,omitempty"` + GKEConfig *GKEClusterConfigSpec `json:"gkeConfig,omitempty" yaml:"gkeConfig,omitempty"` + GKEStatus *GKEStatus `json:"gkeStatus,omitempty" yaml:"gkeStatus,omitempty"` + ImportedConfig *ImportedConfig `json:"importedConfig,omitempty" yaml:"importedConfig,omitempty"` + Internal bool `json:"internal,omitempty" yaml:"internal,omitempty"` + IstioEnabled bool `json:"istioEnabled,omitempty" yaml:"istioEnabled,omitempty"` + K3sConfig *K3sConfig `json:"k3sConfig,omitempty" yaml:"k3sConfig,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Limits map[string]string `json:"limits,omitempty" yaml:"limits,omitempty"` + LinuxWorkerCount int64 `json:"linuxWorkerCount,omitempty" yaml:"linuxWorkerCount,omitempty"` + LocalClusterAuthEndpoint *LocalClusterAuthEndpoint `json:"localClusterAuthEndpoint,omitempty" yaml:"localClusterAuthEndpoint,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NodeCount int64 `json:"nodeCount,omitempty" yaml:"nodeCount,omitempty"` + NodeVersion int64 `json:"nodeVersion,omitempty" yaml:"nodeVersion,omitempty"` + OpenStackSecret string `json:"openStackSecret,omitempty" yaml:"openStackSecret,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + PrivateRegistrySecret string `json:"privateRegistrySecret,omitempty" yaml:"privateRegistrySecret,omitempty"` + Provider string `json:"provider,omitempty" yaml:"provider,omitempty"` + RancherKubernetesEngineConfig *RancherKubernetesEngineConfig `json:"rancherKubernetesEngineConfig,omitempty" yaml:"rancherKubernetesEngineConfig,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Requested map[string]string `json:"requested,omitempty" yaml:"requested,omitempty"` + Rke2Config *Rke2Config `json:"rke2Config,omitempty" yaml:"rke2Config,omitempty"` + S3CredentialSecret string `json:"s3CredentialSecret,omitempty" yaml:"s3CredentialSecret,omitempty"` + ServiceAccountTokenSecret string `json:"serviceAccountTokenSecret,omitempty" yaml:"serviceAccountTokenSecret,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + Version *Info `json:"version,omitempty" yaml:"version,omitempty"` + VirtualCenterSecret string `json:"virtualCenterSecret,omitempty" yaml:"virtualCenterSecret,omitempty"` + VsphereSecret string `json:"vsphereSecret,omitempty" yaml:"vsphereSecret,omitempty"` + WeavePasswordSecret string `json:"weavePasswordSecret,omitempty" yaml:"weavePasswordSecret,omitempty"` + WindowsPreferedCluster bool `json:"windowsPreferedCluster,omitempty" yaml:"windowsPreferedCluster,omitempty"` + WindowsWorkerCount int64 `json:"windowsWorkerCount,omitempty" yaml:"windowsWorkerCount,omitempty"` +} + +type ClusterCollection struct { + types.Collection + Data []Cluster `json:"data,omitempty"` + client *ClusterClient +} + +type ClusterClient struct { + apiClient *Client +} + +type ClusterOperations interface { + List(opts *types.ListOpts) (*ClusterCollection, error) + ListAll(opts *types.ListOpts) (*ClusterCollection, error) + Create(opts *Cluster) (*Cluster, error) + Update(existing *Cluster, updates interface{}) (*Cluster, error) + Replace(existing *Cluster) (*Cluster, error) + ByID(id string) (*Cluster, error) + Delete(container *Cluster) error + + ActionBackupEtcd(resource *Cluster) error + + ActionExportYaml(resource *Cluster) (*ExportOutput, error) + + ActionGenerateKubeconfig(resource *Cluster) (*GenerateKubeConfigOutput, error) + + ActionImportYaml(resource *Cluster, input *ImportClusterYamlInput) (*ImportYamlOutput, error) + + ActionRestoreFromEtcdBackup(resource *Cluster, input *RestoreFromEtcdBackupInput) error + + ActionRotateCertificates(resource *Cluster, input *RotateCertificateInput) (*RotateCertificateOutput, error) + + ActionRotateEncryptionKey(resource *Cluster) (*RotateEncryptionKeyOutput, error) + + ActionSaveAsTemplate(resource *Cluster, input *SaveAsTemplateInput) (*SaveAsTemplateOutput, error) +} + +func newClusterClient(apiClient *Client) *ClusterClient { + return &ClusterClient{ + apiClient: apiClient, + } +} + +func (c *ClusterClient) Create(container *Cluster) (*Cluster, error) { + resp := &Cluster{} + err := c.apiClient.Ops.DoCreate(ClusterType, container, resp) + return resp, err +} + +func (c *ClusterClient) Update(existing *Cluster, updates interface{}) (*Cluster, error) { + resp := &Cluster{} + err := c.apiClient.Ops.DoUpdate(ClusterType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ClusterClient) Replace(obj *Cluster) (*Cluster, error) { + resp := &Cluster{} + err := c.apiClient.Ops.DoReplace(ClusterType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *ClusterClient) List(opts *types.ListOpts) (*ClusterCollection, error) { + resp := &ClusterCollection{} + err := c.apiClient.Ops.DoList(ClusterType, opts, resp) + resp.client = c + return resp, err +} + +func (c *ClusterClient) ListAll(opts *types.ListOpts) (*ClusterCollection, error) { + resp := &ClusterCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *ClusterCollection) Next() (*ClusterCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ClusterCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *ClusterClient) ByID(id string) (*Cluster, error) { + resp := &Cluster{} + err := c.apiClient.Ops.DoByID(ClusterType, id, resp) + return resp, err +} + +func (c *ClusterClient) Delete(container *Cluster) error { + return c.apiClient.Ops.DoResourceDelete(ClusterType, &container.Resource) +} + +func (c *ClusterClient) ActionBackupEtcd(resource *Cluster) error { + err := c.apiClient.Ops.DoAction(ClusterType, "backupEtcd", &resource.Resource, nil, nil) + return err +} + +func (c *ClusterClient) ActionExportYaml(resource *Cluster) (*ExportOutput, error) { + resp := &ExportOutput{} + err := c.apiClient.Ops.DoAction(ClusterType, "exportYaml", &resource.Resource, nil, resp) + return resp, err +} + +func (c *ClusterClient) ActionGenerateKubeconfig(resource *Cluster) (*GenerateKubeConfigOutput, error) { + resp := &GenerateKubeConfigOutput{} + err := c.apiClient.Ops.DoAction(ClusterType, "generateKubeconfig", &resource.Resource, nil, resp) + return resp, err +} + +func (c *ClusterClient) ActionImportYaml(resource *Cluster, input *ImportClusterYamlInput) (*ImportYamlOutput, error) { + resp := &ImportYamlOutput{} + err := c.apiClient.Ops.DoAction(ClusterType, "importYaml", &resource.Resource, input, resp) + return resp, err +} + +func (c *ClusterClient) ActionRestoreFromEtcdBackup(resource *Cluster, input *RestoreFromEtcdBackupInput) error { + err := c.apiClient.Ops.DoAction(ClusterType, "restoreFromEtcdBackup", &resource.Resource, input, nil) + return err +} + +func (c *ClusterClient) ActionRotateCertificates(resource *Cluster, input *RotateCertificateInput) (*RotateCertificateOutput, error) { + resp := &RotateCertificateOutput{} + err := c.apiClient.Ops.DoAction(ClusterType, "rotateCertificates", &resource.Resource, input, resp) + return resp, err +} + +func (c *ClusterClient) ActionRotateEncryptionKey(resource *Cluster) (*RotateEncryptionKeyOutput, error) { + resp := &RotateEncryptionKeyOutput{} + err := c.apiClient.Ops.DoAction(ClusterType, "rotateEncryptionKey", &resource.Resource, nil, resp) + return resp, err +} + +func (c *ClusterClient) ActionSaveAsTemplate(resource *Cluster, input *SaveAsTemplateInput) (*SaveAsTemplateOutput, error) { + resp := &SaveAsTemplateOutput{} + err := c.apiClient.Ops.DoAction(ClusterType, "saveAsTemplate", &resource.Resource, input, resp) + return resp, err +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_catalog.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_catalog.go new file mode 100644 index 000000000..d555f2bf0 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_catalog.go @@ -0,0 +1,168 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + ClusterCatalogType = "clusterCatalog" + ClusterCatalogFieldAnnotations = "annotations" + ClusterCatalogFieldBranch = "branch" + ClusterCatalogFieldCatalogSecrets = "catalogSecrets" + ClusterCatalogFieldClusterID = "clusterId" + ClusterCatalogFieldCommit = "commit" + ClusterCatalogFieldConditions = "conditions" + ClusterCatalogFieldCreated = "created" + ClusterCatalogFieldCreatorID = "creatorId" + ClusterCatalogFieldCredentialSecret = "credentialSecret" + ClusterCatalogFieldDescription = "description" + ClusterCatalogFieldHelmVersion = "helmVersion" + ClusterCatalogFieldKind = "kind" + ClusterCatalogFieldLabels = "labels" + ClusterCatalogFieldLastRefreshTimestamp = "lastRefreshTimestamp" + ClusterCatalogFieldName = "name" + ClusterCatalogFieldNamespaceId = "namespaceId" + ClusterCatalogFieldOwnerReferences = "ownerReferences" + ClusterCatalogFieldPassword = "password" + ClusterCatalogFieldRemoved = "removed" + ClusterCatalogFieldState = "state" + ClusterCatalogFieldTransitioning = "transitioning" + ClusterCatalogFieldTransitioningMessage = "transitioningMessage" + ClusterCatalogFieldURL = "url" + ClusterCatalogFieldUUID = "uuid" + ClusterCatalogFieldUsername = "username" +) + +type ClusterCatalog struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Branch string `json:"branch,omitempty" yaml:"branch,omitempty"` + CatalogSecrets *CatalogSecrets `json:"catalogSecrets,omitempty" yaml:"catalogSecrets,omitempty"` + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + Commit string `json:"commit,omitempty" yaml:"commit,omitempty"` + Conditions []CatalogCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + CredentialSecret string `json:"credentialSecret,omitempty" yaml:"credentialSecret,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + HelmVersion string `json:"helmVersion,omitempty" yaml:"helmVersion,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + LastRefreshTimestamp string `json:"lastRefreshTimestamp,omitempty" yaml:"lastRefreshTimestamp,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Password string `json:"password,omitempty" yaml:"password,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + URL string `json:"url,omitempty" yaml:"url,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + Username string `json:"username,omitempty" yaml:"username,omitempty"` +} + +type ClusterCatalogCollection struct { + types.Collection + Data []ClusterCatalog `json:"data,omitempty"` + client *ClusterCatalogClient +} + +type ClusterCatalogClient struct { + apiClient *Client +} + +type ClusterCatalogOperations interface { + List(opts *types.ListOpts) (*ClusterCatalogCollection, error) + ListAll(opts *types.ListOpts) (*ClusterCatalogCollection, error) + Create(opts *ClusterCatalog) (*ClusterCatalog, error) + Update(existing *ClusterCatalog, updates interface{}) (*ClusterCatalog, error) + Replace(existing *ClusterCatalog) (*ClusterCatalog, error) + ByID(id string) (*ClusterCatalog, error) + Delete(container *ClusterCatalog) error + + ActionRefresh(resource *ClusterCatalog) (*CatalogRefresh, error) + + CollectionActionRefresh(resource *ClusterCatalogCollection) (*CatalogRefresh, error) +} + +func newClusterCatalogClient(apiClient *Client) *ClusterCatalogClient { + return &ClusterCatalogClient{ + apiClient: apiClient, + } +} + +func (c *ClusterCatalogClient) Create(container *ClusterCatalog) (*ClusterCatalog, error) { + resp := &ClusterCatalog{} + err := c.apiClient.Ops.DoCreate(ClusterCatalogType, container, resp) + return resp, err +} + +func (c *ClusterCatalogClient) Update(existing *ClusterCatalog, updates interface{}) (*ClusterCatalog, error) { + resp := &ClusterCatalog{} + err := c.apiClient.Ops.DoUpdate(ClusterCatalogType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ClusterCatalogClient) Replace(obj *ClusterCatalog) (*ClusterCatalog, error) { + resp := &ClusterCatalog{} + err := c.apiClient.Ops.DoReplace(ClusterCatalogType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *ClusterCatalogClient) List(opts *types.ListOpts) (*ClusterCatalogCollection, error) { + resp := &ClusterCatalogCollection{} + err := c.apiClient.Ops.DoList(ClusterCatalogType, opts, resp) + resp.client = c + return resp, err +} + +func (c *ClusterCatalogClient) ListAll(opts *types.ListOpts) (*ClusterCatalogCollection, error) { + resp := &ClusterCatalogCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *ClusterCatalogCollection) Next() (*ClusterCatalogCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ClusterCatalogCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *ClusterCatalogClient) ByID(id string) (*ClusterCatalog, error) { + resp := &ClusterCatalog{} + err := c.apiClient.Ops.DoByID(ClusterCatalogType, id, resp) + return resp, err +} + +func (c *ClusterCatalogClient) Delete(container *ClusterCatalog) error { + return c.apiClient.Ops.DoResourceDelete(ClusterCatalogType, &container.Resource) +} + +func (c *ClusterCatalogClient) ActionRefresh(resource *ClusterCatalog) (*CatalogRefresh, error) { + resp := &CatalogRefresh{} + err := c.apiClient.Ops.DoAction(ClusterCatalogType, "refresh", &resource.Resource, nil, resp) + return resp, err +} + +func (c *ClusterCatalogClient) CollectionActionRefresh(resource *ClusterCatalogCollection) (*CatalogRefresh, error) { + resp := &CatalogRefresh{} + err := c.apiClient.Ops.DoCollectionAction(ClusterCatalogType, "refresh", &resource.Collection, nil, resp) + return resp, err +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_component_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_component_status.go new file mode 100644 index 000000000..9955ee880 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_component_status.go @@ -0,0 +1,12 @@ +package client + +const ( + ClusterComponentStatusType = "clusterComponentStatus" + ClusterComponentStatusFieldConditions = "conditions" + ClusterComponentStatusFieldName = "name" +) + +type ClusterComponentStatus struct { + Conditions []ComponentCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_condition.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_condition.go new file mode 100644 index 000000000..1ecf2ee45 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_condition.go @@ -0,0 +1,20 @@ +package client + +const ( + ClusterConditionType = "clusterCondition" + ClusterConditionFieldLastTransitionTime = "lastTransitionTime" + ClusterConditionFieldLastUpdateTime = "lastUpdateTime" + ClusterConditionFieldMessage = "message" + ClusterConditionFieldReason = "reason" + ClusterConditionFieldStatus = "status" + ClusterConditionFieldType = "type" +) + +type ClusterCondition struct { + LastTransitionTime string `json:"lastTransitionTime,omitempty" yaml:"lastTransitionTime,omitempty"` + LastUpdateTime string `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` + Reason string `json:"reason,omitempty" yaml:"reason,omitempty"` + Status string `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_registration_token.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_registration_token.go new file mode 100644 index 000000000..2b0e191f1 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_registration_token.go @@ -0,0 +1,144 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + ClusterRegistrationTokenType = "clusterRegistrationToken" + ClusterRegistrationTokenFieldAnnotations = "annotations" + ClusterRegistrationTokenFieldClusterID = "clusterId" + ClusterRegistrationTokenFieldCommand = "command" + ClusterRegistrationTokenFieldCreated = "created" + ClusterRegistrationTokenFieldCreatorID = "creatorId" + ClusterRegistrationTokenFieldInsecureCommand = "insecureCommand" + ClusterRegistrationTokenFieldInsecureNodeCommand = "insecureNodeCommand" + ClusterRegistrationTokenFieldInsecureWindowsNodeCommand = "insecureWindowsNodeCommand" + ClusterRegistrationTokenFieldLabels = "labels" + ClusterRegistrationTokenFieldManifestURL = "manifestUrl" + ClusterRegistrationTokenFieldName = "name" + ClusterRegistrationTokenFieldNamespaceId = "namespaceId" + ClusterRegistrationTokenFieldNodeCommand = "nodeCommand" + ClusterRegistrationTokenFieldOwnerReferences = "ownerReferences" + ClusterRegistrationTokenFieldRemoved = "removed" + ClusterRegistrationTokenFieldState = "state" + ClusterRegistrationTokenFieldToken = "token" + ClusterRegistrationTokenFieldTransitioning = "transitioning" + ClusterRegistrationTokenFieldTransitioningMessage = "transitioningMessage" + ClusterRegistrationTokenFieldUUID = "uuid" + ClusterRegistrationTokenFieldWindowsNodeCommand = "windowsNodeCommand" +) + +type ClusterRegistrationToken struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + Command string `json:"command,omitempty" yaml:"command,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + InsecureCommand string `json:"insecureCommand,omitempty" yaml:"insecureCommand,omitempty"` + InsecureNodeCommand string `json:"insecureNodeCommand,omitempty" yaml:"insecureNodeCommand,omitempty"` + InsecureWindowsNodeCommand string `json:"insecureWindowsNodeCommand,omitempty" yaml:"insecureWindowsNodeCommand,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + ManifestURL string `json:"manifestUrl,omitempty" yaml:"manifestUrl,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"` + NodeCommand string `json:"nodeCommand,omitempty" yaml:"nodeCommand,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Token string `json:"token,omitempty" yaml:"token,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + WindowsNodeCommand string `json:"windowsNodeCommand,omitempty" yaml:"windowsNodeCommand,omitempty"` +} + +type ClusterRegistrationTokenCollection struct { + types.Collection + Data []ClusterRegistrationToken `json:"data,omitempty"` + client *ClusterRegistrationTokenClient +} + +type ClusterRegistrationTokenClient struct { + apiClient *Client +} + +type ClusterRegistrationTokenOperations interface { + List(opts *types.ListOpts) (*ClusterRegistrationTokenCollection, error) + ListAll(opts *types.ListOpts) (*ClusterRegistrationTokenCollection, error) + Create(opts *ClusterRegistrationToken) (*ClusterRegistrationToken, error) + Update(existing *ClusterRegistrationToken, updates interface{}) (*ClusterRegistrationToken, error) + Replace(existing *ClusterRegistrationToken) (*ClusterRegistrationToken, error) + ByID(id string) (*ClusterRegistrationToken, error) + Delete(container *ClusterRegistrationToken) error +} + +func newClusterRegistrationTokenClient(apiClient *Client) *ClusterRegistrationTokenClient { + return &ClusterRegistrationTokenClient{ + apiClient: apiClient, + } +} + +func (c *ClusterRegistrationTokenClient) Create(container *ClusterRegistrationToken) (*ClusterRegistrationToken, error) { + resp := &ClusterRegistrationToken{} + err := c.apiClient.Ops.DoCreate(ClusterRegistrationTokenType, container, resp) + return resp, err +} + +func (c *ClusterRegistrationTokenClient) Update(existing *ClusterRegistrationToken, updates interface{}) (*ClusterRegistrationToken, error) { + resp := &ClusterRegistrationToken{} + err := c.apiClient.Ops.DoUpdate(ClusterRegistrationTokenType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ClusterRegistrationTokenClient) Replace(obj *ClusterRegistrationToken) (*ClusterRegistrationToken, error) { + resp := &ClusterRegistrationToken{} + err := c.apiClient.Ops.DoReplace(ClusterRegistrationTokenType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *ClusterRegistrationTokenClient) List(opts *types.ListOpts) (*ClusterRegistrationTokenCollection, error) { + resp := &ClusterRegistrationTokenCollection{} + err := c.apiClient.Ops.DoList(ClusterRegistrationTokenType, opts, resp) + resp.client = c + return resp, err +} + +func (c *ClusterRegistrationTokenClient) ListAll(opts *types.ListOpts) (*ClusterRegistrationTokenCollection, error) { + resp := &ClusterRegistrationTokenCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *ClusterRegistrationTokenCollection) Next() (*ClusterRegistrationTokenCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ClusterRegistrationTokenCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *ClusterRegistrationTokenClient) ByID(id string) (*ClusterRegistrationToken, error) { + resp := &ClusterRegistrationToken{} + err := c.apiClient.Ops.DoByID(ClusterRegistrationTokenType, id, resp) + return resp, err +} + +func (c *ClusterRegistrationTokenClient) Delete(container *ClusterRegistrationToken) error { + return c.apiClient.Ops.DoResourceDelete(ClusterRegistrationTokenType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_registration_token_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_registration_token_spec.go new file mode 100644 index 000000000..9a0fd3f25 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_registration_token_spec.go @@ -0,0 +1,10 @@ +package client + +const ( + ClusterRegistrationTokenSpecType = "clusterRegistrationTokenSpec" + ClusterRegistrationTokenSpecFieldClusterID = "clusterId" +) + +type ClusterRegistrationTokenSpec struct { + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_registration_token_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_registration_token_status.go new file mode 100644 index 000000000..1e51b1054 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_registration_token_status.go @@ -0,0 +1,24 @@ +package client + +const ( + ClusterRegistrationTokenStatusType = "clusterRegistrationTokenStatus" + ClusterRegistrationTokenStatusFieldCommand = "command" + ClusterRegistrationTokenStatusFieldInsecureCommand = "insecureCommand" + ClusterRegistrationTokenStatusFieldInsecureNodeCommand = "insecureNodeCommand" + ClusterRegistrationTokenStatusFieldInsecureWindowsNodeCommand = "insecureWindowsNodeCommand" + ClusterRegistrationTokenStatusFieldManifestURL = "manifestUrl" + ClusterRegistrationTokenStatusFieldNodeCommand = "nodeCommand" + ClusterRegistrationTokenStatusFieldToken = "token" + ClusterRegistrationTokenStatusFieldWindowsNodeCommand = "windowsNodeCommand" +) + +type ClusterRegistrationTokenStatus struct { + Command string `json:"command,omitempty" yaml:"command,omitempty"` + InsecureCommand string `json:"insecureCommand,omitempty" yaml:"insecureCommand,omitempty"` + InsecureNodeCommand string `json:"insecureNodeCommand,omitempty" yaml:"insecureNodeCommand,omitempty"` + InsecureWindowsNodeCommand string `json:"insecureWindowsNodeCommand,omitempty" yaml:"insecureWindowsNodeCommand,omitempty"` + ManifestURL string `json:"manifestUrl,omitempty" yaml:"manifestUrl,omitempty"` + NodeCommand string `json:"nodeCommand,omitempty" yaml:"nodeCommand,omitempty"` + Token string `json:"token,omitempty" yaml:"token,omitempty"` + WindowsNodeCommand string `json:"windowsNodeCommand,omitempty" yaml:"windowsNodeCommand,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_role_template_binding.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_role_template_binding.go new file mode 100644 index 000000000..e4301c214 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_role_template_binding.go @@ -0,0 +1,132 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + ClusterRoleTemplateBindingType = "clusterRoleTemplateBinding" + ClusterRoleTemplateBindingFieldAnnotations = "annotations" + ClusterRoleTemplateBindingFieldClusterID = "clusterId" + ClusterRoleTemplateBindingFieldCreated = "created" + ClusterRoleTemplateBindingFieldCreatorID = "creatorId" + ClusterRoleTemplateBindingFieldGroupID = "groupId" + ClusterRoleTemplateBindingFieldGroupPrincipalID = "groupPrincipalId" + ClusterRoleTemplateBindingFieldLabels = "labels" + ClusterRoleTemplateBindingFieldName = "name" + ClusterRoleTemplateBindingFieldNamespaceId = "namespaceId" + ClusterRoleTemplateBindingFieldOwnerReferences = "ownerReferences" + ClusterRoleTemplateBindingFieldRemoved = "removed" + ClusterRoleTemplateBindingFieldRoleTemplateID = "roleTemplateId" + ClusterRoleTemplateBindingFieldUUID = "uuid" + ClusterRoleTemplateBindingFieldUserID = "userId" + ClusterRoleTemplateBindingFieldUserPrincipalID = "userPrincipalId" +) + +type ClusterRoleTemplateBinding struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + GroupID string `json:"groupId,omitempty" yaml:"groupId,omitempty"` + GroupPrincipalID string `json:"groupPrincipalId,omitempty" yaml:"groupPrincipalId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + RoleTemplateID string `json:"roleTemplateId,omitempty" yaml:"roleTemplateId,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserID string `json:"userId,omitempty" yaml:"userId,omitempty"` + UserPrincipalID string `json:"userPrincipalId,omitempty" yaml:"userPrincipalId,omitempty"` +} + +type ClusterRoleTemplateBindingCollection struct { + types.Collection + Data []ClusterRoleTemplateBinding `json:"data,omitempty"` + client *ClusterRoleTemplateBindingClient +} + +type ClusterRoleTemplateBindingClient struct { + apiClient *Client +} + +type ClusterRoleTemplateBindingOperations interface { + List(opts *types.ListOpts) (*ClusterRoleTemplateBindingCollection, error) + ListAll(opts *types.ListOpts) (*ClusterRoleTemplateBindingCollection, error) + Create(opts *ClusterRoleTemplateBinding) (*ClusterRoleTemplateBinding, error) + Update(existing *ClusterRoleTemplateBinding, updates interface{}) (*ClusterRoleTemplateBinding, error) + Replace(existing *ClusterRoleTemplateBinding) (*ClusterRoleTemplateBinding, error) + ByID(id string) (*ClusterRoleTemplateBinding, error) + Delete(container *ClusterRoleTemplateBinding) error +} + +func newClusterRoleTemplateBindingClient(apiClient *Client) *ClusterRoleTemplateBindingClient { + return &ClusterRoleTemplateBindingClient{ + apiClient: apiClient, + } +} + +func (c *ClusterRoleTemplateBindingClient) Create(container *ClusterRoleTemplateBinding) (*ClusterRoleTemplateBinding, error) { + resp := &ClusterRoleTemplateBinding{} + err := c.apiClient.Ops.DoCreate(ClusterRoleTemplateBindingType, container, resp) + return resp, err +} + +func (c *ClusterRoleTemplateBindingClient) Update(existing *ClusterRoleTemplateBinding, updates interface{}) (*ClusterRoleTemplateBinding, error) { + resp := &ClusterRoleTemplateBinding{} + err := c.apiClient.Ops.DoUpdate(ClusterRoleTemplateBindingType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ClusterRoleTemplateBindingClient) Replace(obj *ClusterRoleTemplateBinding) (*ClusterRoleTemplateBinding, error) { + resp := &ClusterRoleTemplateBinding{} + err := c.apiClient.Ops.DoReplace(ClusterRoleTemplateBindingType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *ClusterRoleTemplateBindingClient) List(opts *types.ListOpts) (*ClusterRoleTemplateBindingCollection, error) { + resp := &ClusterRoleTemplateBindingCollection{} + err := c.apiClient.Ops.DoList(ClusterRoleTemplateBindingType, opts, resp) + resp.client = c + return resp, err +} + +func (c *ClusterRoleTemplateBindingClient) ListAll(opts *types.ListOpts) (*ClusterRoleTemplateBindingCollection, error) { + resp := &ClusterRoleTemplateBindingCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *ClusterRoleTemplateBindingCollection) Next() (*ClusterRoleTemplateBindingCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ClusterRoleTemplateBindingCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *ClusterRoleTemplateBindingClient) ByID(id string) (*ClusterRoleTemplateBinding, error) { + resp := &ClusterRoleTemplateBinding{} + err := c.apiClient.Ops.DoByID(ClusterRoleTemplateBindingType, id, resp) + return resp, err +} + +func (c *ClusterRoleTemplateBindingClient) Delete(container *ClusterRoleTemplateBinding) error { + return c.apiClient.Ops.DoResourceDelete(ClusterRoleTemplateBindingType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_secrets.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_secrets.go new file mode 100644 index 000000000..6f5cc7643 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_secrets.go @@ -0,0 +1,40 @@ +package client + +const ( + ClusterSecretsType = "clusterSecrets" + ClusterSecretsFieldAADClientCertSecret = "aadClientCertSecret" + ClusterSecretsFieldAADClientSecret = "aadClientSecret" + ClusterSecretsFieldACIAPICUserKeySecret = "aciAPICUserKeySecret" + ClusterSecretsFieldACIKafkaClientKeySecret = "aciKafkaClientKeySecret" + ClusterSecretsFieldACITokenSecret = "aciTokenSecret" + ClusterSecretsFieldBastionHostSSHKeySecret = "bastionHostSSHKeySecret" + ClusterSecretsFieldKubeletExtraEnvSecret = "kubeletExtraEnvSecret" + ClusterSecretsFieldOpenStackSecret = "openStackSecret" + ClusterSecretsFieldPrivateRegistryECRSecret = "privateRegistryECRSecret" + ClusterSecretsFieldPrivateRegistrySecret = "privateRegistrySecret" + ClusterSecretsFieldPrivateRegistryURL = "privateRegistryURL" + ClusterSecretsFieldS3CredentialSecret = "s3CredentialSecret" + ClusterSecretsFieldSecretsEncryptionProvidersSecret = "secretsEncryptionProvidersSecret" + ClusterSecretsFieldVirtualCenterSecret = "virtualCenterSecret" + ClusterSecretsFieldVsphereSecret = "vsphereSecret" + ClusterSecretsFieldWeavePasswordSecret = "weavePasswordSecret" +) + +type ClusterSecrets struct { + AADClientCertSecret string `json:"aadClientCertSecret,omitempty" yaml:"aadClientCertSecret,omitempty"` + AADClientSecret string `json:"aadClientSecret,omitempty" yaml:"aadClientSecret,omitempty"` + ACIAPICUserKeySecret string `json:"aciAPICUserKeySecret,omitempty" yaml:"aciAPICUserKeySecret,omitempty"` + ACIKafkaClientKeySecret string `json:"aciKafkaClientKeySecret,omitempty" yaml:"aciKafkaClientKeySecret,omitempty"` + ACITokenSecret string `json:"aciTokenSecret,omitempty" yaml:"aciTokenSecret,omitempty"` + BastionHostSSHKeySecret string `json:"bastionHostSSHKeySecret,omitempty" yaml:"bastionHostSSHKeySecret,omitempty"` + KubeletExtraEnvSecret string `json:"kubeletExtraEnvSecret,omitempty" yaml:"kubeletExtraEnvSecret,omitempty"` + OpenStackSecret string `json:"openStackSecret,omitempty" yaml:"openStackSecret,omitempty"` + PrivateRegistryECRSecret string `json:"privateRegistryECRSecret,omitempty" yaml:"privateRegistryECRSecret,omitempty"` + PrivateRegistrySecret string `json:"privateRegistrySecret,omitempty" yaml:"privateRegistrySecret,omitempty"` + PrivateRegistryURL string `json:"privateRegistryURL,omitempty" yaml:"privateRegistryURL,omitempty"` + S3CredentialSecret string `json:"s3CredentialSecret,omitempty" yaml:"s3CredentialSecret,omitempty"` + SecretsEncryptionProvidersSecret string `json:"secretsEncryptionProvidersSecret,omitempty" yaml:"secretsEncryptionProvidersSecret,omitempty"` + VirtualCenterSecret string `json:"virtualCenterSecret,omitempty" yaml:"virtualCenterSecret,omitempty"` + VsphereSecret string `json:"vsphereSecret,omitempty" yaml:"vsphereSecret,omitempty"` + WeavePasswordSecret string `json:"weavePasswordSecret,omitempty" yaml:"weavePasswordSecret,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_spec.go new file mode 100644 index 000000000..94664533a --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_spec.go @@ -0,0 +1,72 @@ +package client + +const ( + ClusterSpecType = "clusterSpec" + ClusterSpecFieldAKSConfig = "aksConfig" + ClusterSpecFieldAgentEnvVars = "agentEnvVars" + ClusterSpecFieldAgentImageOverride = "agentImageOverride" + ClusterSpecFieldAmazonElasticContainerServiceConfig = "amazonElasticContainerServiceConfig" + ClusterSpecFieldAzureKubernetesServiceConfig = "azureKubernetesServiceConfig" + ClusterSpecFieldClusterAgentDeploymentCustomization = "clusterAgentDeploymentCustomization" + ClusterSpecFieldClusterSecrets = "clusterSecrets" + ClusterSpecFieldClusterTemplateAnswers = "answers" + ClusterSpecFieldClusterTemplateID = "clusterTemplateId" + ClusterSpecFieldClusterTemplateQuestions = "questions" + ClusterSpecFieldClusterTemplateRevisionID = "clusterTemplateRevisionId" + ClusterSpecFieldDefaultClusterRoleForProjectMembers = "defaultClusterRoleForProjectMembers" + ClusterSpecFieldDefaultPodSecurityAdmissionConfigurationTemplateName = "defaultPodSecurityAdmissionConfigurationTemplateName" + ClusterSpecFieldDescription = "description" + ClusterSpecFieldDesiredAgentImage = "desiredAgentImage" + ClusterSpecFieldDesiredAuthImage = "desiredAuthImage" + ClusterSpecFieldDisplayName = "displayName" + ClusterSpecFieldDockerRootDir = "dockerRootDir" + ClusterSpecFieldEKSConfig = "eksConfig" + ClusterSpecFieldEnableNetworkPolicy = "enableNetworkPolicy" + ClusterSpecFieldFleetAgentDeploymentCustomization = "fleetAgentDeploymentCustomization" + ClusterSpecFieldFleetWorkspaceName = "fleetWorkspaceName" + ClusterSpecFieldGKEConfig = "gkeConfig" + ClusterSpecFieldGenericEngineConfig = "genericEngineConfig" + ClusterSpecFieldGoogleKubernetesEngineConfig = "googleKubernetesEngineConfig" + ClusterSpecFieldImportedConfig = "importedConfig" + ClusterSpecFieldInternal = "internal" + ClusterSpecFieldK3sConfig = "k3sConfig" + ClusterSpecFieldLocalClusterAuthEndpoint = "localClusterAuthEndpoint" + ClusterSpecFieldRancherKubernetesEngineConfig = "rancherKubernetesEngineConfig" + ClusterSpecFieldRke2Config = "rke2Config" + ClusterSpecFieldWindowsPreferedCluster = "windowsPreferedCluster" +) + +type ClusterSpec struct { + AKSConfig *AKSClusterConfigSpec `json:"aksConfig,omitempty" yaml:"aksConfig,omitempty"` + AgentEnvVars []EnvVar `json:"agentEnvVars,omitempty" yaml:"agentEnvVars,omitempty"` + AgentImageOverride string `json:"agentImageOverride,omitempty" yaml:"agentImageOverride,omitempty"` + AmazonElasticContainerServiceConfig map[string]interface{} `json:"amazonElasticContainerServiceConfig,omitempty" yaml:"amazonElasticContainerServiceConfig,omitempty"` + AzureKubernetesServiceConfig map[string]interface{} `json:"azureKubernetesServiceConfig,omitempty" yaml:"azureKubernetesServiceConfig,omitempty"` + ClusterAgentDeploymentCustomization *AgentDeploymentCustomization `json:"clusterAgentDeploymentCustomization,omitempty" yaml:"clusterAgentDeploymentCustomization,omitempty"` + ClusterSecrets *ClusterSecrets `json:"clusterSecrets,omitempty" yaml:"clusterSecrets,omitempty"` + ClusterTemplateAnswers *Answer `json:"answers,omitempty" yaml:"answers,omitempty"` + ClusterTemplateID string `json:"clusterTemplateId,omitempty" yaml:"clusterTemplateId,omitempty"` + ClusterTemplateQuestions []Question `json:"questions,omitempty" yaml:"questions,omitempty"` + ClusterTemplateRevisionID string `json:"clusterTemplateRevisionId,omitempty" yaml:"clusterTemplateRevisionId,omitempty"` + DefaultClusterRoleForProjectMembers string `json:"defaultClusterRoleForProjectMembers,omitempty" yaml:"defaultClusterRoleForProjectMembers,omitempty"` + DefaultPodSecurityAdmissionConfigurationTemplateName string `json:"defaultPodSecurityAdmissionConfigurationTemplateName,omitempty" yaml:"defaultPodSecurityAdmissionConfigurationTemplateName,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + DesiredAgentImage string `json:"desiredAgentImage,omitempty" yaml:"desiredAgentImage,omitempty"` + DesiredAuthImage string `json:"desiredAuthImage,omitempty" yaml:"desiredAuthImage,omitempty"` + DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` + DockerRootDir string `json:"dockerRootDir,omitempty" yaml:"dockerRootDir,omitempty"` + EKSConfig *EKSClusterConfigSpec `json:"eksConfig,omitempty" yaml:"eksConfig,omitempty"` + EnableNetworkPolicy *bool `json:"enableNetworkPolicy,omitempty" yaml:"enableNetworkPolicy,omitempty"` + FleetAgentDeploymentCustomization *AgentDeploymentCustomization `json:"fleetAgentDeploymentCustomization,omitempty" yaml:"fleetAgentDeploymentCustomization,omitempty"` + FleetWorkspaceName string `json:"fleetWorkspaceName,omitempty" yaml:"fleetWorkspaceName,omitempty"` + GKEConfig *GKEClusterConfigSpec `json:"gkeConfig,omitempty" yaml:"gkeConfig,omitempty"` + GenericEngineConfig map[string]interface{} `json:"genericEngineConfig,omitempty" yaml:"genericEngineConfig,omitempty"` + GoogleKubernetesEngineConfig map[string]interface{} `json:"googleKubernetesEngineConfig,omitempty" yaml:"googleKubernetesEngineConfig,omitempty"` + ImportedConfig *ImportedConfig `json:"importedConfig,omitempty" yaml:"importedConfig,omitempty"` + Internal bool `json:"internal,omitempty" yaml:"internal,omitempty"` + K3sConfig *K3sConfig `json:"k3sConfig,omitempty" yaml:"k3sConfig,omitempty"` + LocalClusterAuthEndpoint *LocalClusterAuthEndpoint `json:"localClusterAuthEndpoint,omitempty" yaml:"localClusterAuthEndpoint,omitempty"` + RancherKubernetesEngineConfig *RancherKubernetesEngineConfig `json:"rancherKubernetesEngineConfig,omitempty" yaml:"rancherKubernetesEngineConfig,omitempty"` + Rke2Config *Rke2Config `json:"rke2Config,omitempty" yaml:"rke2Config,omitempty"` + WindowsPreferedCluster bool `json:"windowsPreferedCluster,omitempty" yaml:"windowsPreferedCluster,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_spec_base.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_spec_base.go new file mode 100644 index 000000000..d4585824c --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_spec_base.go @@ -0,0 +1,36 @@ +package client + +const ( + ClusterSpecBaseType = "clusterSpecBase" + ClusterSpecBaseFieldAgentEnvVars = "agentEnvVars" + ClusterSpecBaseFieldAgentImageOverride = "agentImageOverride" + ClusterSpecBaseFieldClusterAgentDeploymentCustomization = "clusterAgentDeploymentCustomization" + ClusterSpecBaseFieldClusterSecrets = "clusterSecrets" + ClusterSpecBaseFieldDefaultClusterRoleForProjectMembers = "defaultClusterRoleForProjectMembers" + ClusterSpecBaseFieldDefaultPodSecurityAdmissionConfigurationTemplateName = "defaultPodSecurityAdmissionConfigurationTemplateName" + ClusterSpecBaseFieldDesiredAgentImage = "desiredAgentImage" + ClusterSpecBaseFieldDesiredAuthImage = "desiredAuthImage" + ClusterSpecBaseFieldDockerRootDir = "dockerRootDir" + ClusterSpecBaseFieldEnableNetworkPolicy = "enableNetworkPolicy" + ClusterSpecBaseFieldFleetAgentDeploymentCustomization = "fleetAgentDeploymentCustomization" + ClusterSpecBaseFieldLocalClusterAuthEndpoint = "localClusterAuthEndpoint" + ClusterSpecBaseFieldRancherKubernetesEngineConfig = "rancherKubernetesEngineConfig" + ClusterSpecBaseFieldWindowsPreferedCluster = "windowsPreferedCluster" +) + +type ClusterSpecBase struct { + AgentEnvVars []EnvVar `json:"agentEnvVars,omitempty" yaml:"agentEnvVars,omitempty"` + AgentImageOverride string `json:"agentImageOverride,omitempty" yaml:"agentImageOverride,omitempty"` + ClusterAgentDeploymentCustomization *AgentDeploymentCustomization `json:"clusterAgentDeploymentCustomization,omitempty" yaml:"clusterAgentDeploymentCustomization,omitempty"` + ClusterSecrets *ClusterSecrets `json:"clusterSecrets,omitempty" yaml:"clusterSecrets,omitempty"` + DefaultClusterRoleForProjectMembers string `json:"defaultClusterRoleForProjectMembers,omitempty" yaml:"defaultClusterRoleForProjectMembers,omitempty"` + DefaultPodSecurityAdmissionConfigurationTemplateName string `json:"defaultPodSecurityAdmissionConfigurationTemplateName,omitempty" yaml:"defaultPodSecurityAdmissionConfigurationTemplateName,omitempty"` + DesiredAgentImage string `json:"desiredAgentImage,omitempty" yaml:"desiredAgentImage,omitempty"` + DesiredAuthImage string `json:"desiredAuthImage,omitempty" yaml:"desiredAuthImage,omitempty"` + DockerRootDir string `json:"dockerRootDir,omitempty" yaml:"dockerRootDir,omitempty"` + EnableNetworkPolicy *bool `json:"enableNetworkPolicy,omitempty" yaml:"enableNetworkPolicy,omitempty"` + FleetAgentDeploymentCustomization *AgentDeploymentCustomization `json:"fleetAgentDeploymentCustomization,omitempty" yaml:"fleetAgentDeploymentCustomization,omitempty"` + LocalClusterAuthEndpoint *LocalClusterAuthEndpoint `json:"localClusterAuthEndpoint,omitempty" yaml:"localClusterAuthEndpoint,omitempty"` + RancherKubernetesEngineConfig *RancherKubernetesEngineConfig `json:"rancherKubernetesEngineConfig,omitempty" yaml:"rancherKubernetesEngineConfig,omitempty"` + WindowsPreferedCluster bool `json:"windowsPreferedCluster,omitempty" yaml:"windowsPreferedCluster,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_status.go new file mode 100644 index 000000000..25b838b1d --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_status.go @@ -0,0 +1,86 @@ +package client + +const ( + ClusterStatusType = "clusterStatus" + ClusterStatusFieldAADClientCertSecret = "aadClientCertSecret" + ClusterStatusFieldAADClientSecret = "aadClientSecret" + ClusterStatusFieldAKSStatus = "aksStatus" + ClusterStatusFieldAPIEndpoint = "apiEndpoint" + ClusterStatusFieldAgentFeatures = "agentFeatures" + ClusterStatusFieldAgentImage = "agentImage" + ClusterStatusFieldAllocatable = "allocatable" + ClusterStatusFieldAppliedAgentEnvVars = "appliedAgentEnvVars" + ClusterStatusFieldAppliedClusterAgentDeploymentCustomization = "appliedClusterAgentDeploymentCustomization" + ClusterStatusFieldAppliedEnableNetworkPolicy = "appliedEnableNetworkPolicy" + ClusterStatusFieldAppliedSpec = "appliedSpec" + ClusterStatusFieldAuthImage = "authImage" + ClusterStatusFieldCACert = "caCert" + ClusterStatusFieldCapabilities = "capabilities" + ClusterStatusFieldCapacity = "capacity" + ClusterStatusFieldCertificatesExpiration = "certificatesExpiration" + ClusterStatusFieldComponentStatuses = "componentStatuses" + ClusterStatusFieldConditions = "conditions" + ClusterStatusFieldCurrentCisRunName = "currentCisRunName" + ClusterStatusFieldDriver = "driver" + ClusterStatusFieldEKSStatus = "eksStatus" + ClusterStatusFieldFailedSpec = "failedSpec" + ClusterStatusFieldGKEStatus = "gkeStatus" + ClusterStatusFieldIstioEnabled = "istioEnabled" + ClusterStatusFieldLimits = "limits" + ClusterStatusFieldLinuxWorkerCount = "linuxWorkerCount" + ClusterStatusFieldNodeCount = "nodeCount" + ClusterStatusFieldNodeVersion = "nodeVersion" + ClusterStatusFieldOpenStackSecret = "openStackSecret" + ClusterStatusFieldPrivateRegistrySecret = "privateRegistrySecret" + ClusterStatusFieldProvider = "provider" + ClusterStatusFieldRequested = "requested" + ClusterStatusFieldS3CredentialSecret = "s3CredentialSecret" + ClusterStatusFieldServiceAccountTokenSecret = "serviceAccountTokenSecret" + ClusterStatusFieldVersion = "version" + ClusterStatusFieldVirtualCenterSecret = "virtualCenterSecret" + ClusterStatusFieldVsphereSecret = "vsphereSecret" + ClusterStatusFieldWeavePasswordSecret = "weavePasswordSecret" + ClusterStatusFieldWindowsWorkerCount = "windowsWorkerCount" +) + +type ClusterStatus struct { + AADClientCertSecret string `json:"aadClientCertSecret,omitempty" yaml:"aadClientCertSecret,omitempty"` + AADClientSecret string `json:"aadClientSecret,omitempty" yaml:"aadClientSecret,omitempty"` + AKSStatus *AKSStatus `json:"aksStatus,omitempty" yaml:"aksStatus,omitempty"` + APIEndpoint string `json:"apiEndpoint,omitempty" yaml:"apiEndpoint,omitempty"` + AgentFeatures map[string]bool `json:"agentFeatures,omitempty" yaml:"agentFeatures,omitempty"` + AgentImage string `json:"agentImage,omitempty" yaml:"agentImage,omitempty"` + Allocatable map[string]string `json:"allocatable,omitempty" yaml:"allocatable,omitempty"` + AppliedAgentEnvVars []EnvVar `json:"appliedAgentEnvVars,omitempty" yaml:"appliedAgentEnvVars,omitempty"` + AppliedClusterAgentDeploymentCustomization *AgentDeploymentCustomization `json:"appliedClusterAgentDeploymentCustomization,omitempty" yaml:"appliedClusterAgentDeploymentCustomization,omitempty"` + AppliedEnableNetworkPolicy bool `json:"appliedEnableNetworkPolicy,omitempty" yaml:"appliedEnableNetworkPolicy,omitempty"` + AppliedSpec *ClusterSpec `json:"appliedSpec,omitempty" yaml:"appliedSpec,omitempty"` + AuthImage string `json:"authImage,omitempty" yaml:"authImage,omitempty"` + CACert string `json:"caCert,omitempty" yaml:"caCert,omitempty"` + Capabilities *Capabilities `json:"capabilities,omitempty" yaml:"capabilities,omitempty"` + Capacity map[string]string `json:"capacity,omitempty" yaml:"capacity,omitempty"` + CertificatesExpiration map[string]CertExpiration `json:"certificatesExpiration,omitempty" yaml:"certificatesExpiration,omitempty"` + ComponentStatuses []ClusterComponentStatus `json:"componentStatuses,omitempty" yaml:"componentStatuses,omitempty"` + Conditions []ClusterCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + CurrentCisRunName string `json:"currentCisRunName,omitempty" yaml:"currentCisRunName,omitempty"` + Driver string `json:"driver,omitempty" yaml:"driver,omitempty"` + EKSStatus *EKSStatus `json:"eksStatus,omitempty" yaml:"eksStatus,omitempty"` + FailedSpec *ClusterSpec `json:"failedSpec,omitempty" yaml:"failedSpec,omitempty"` + GKEStatus *GKEStatus `json:"gkeStatus,omitempty" yaml:"gkeStatus,omitempty"` + IstioEnabled bool `json:"istioEnabled,omitempty" yaml:"istioEnabled,omitempty"` + Limits map[string]string `json:"limits,omitempty" yaml:"limits,omitempty"` + LinuxWorkerCount int64 `json:"linuxWorkerCount,omitempty" yaml:"linuxWorkerCount,omitempty"` + NodeCount int64 `json:"nodeCount,omitempty" yaml:"nodeCount,omitempty"` + NodeVersion int64 `json:"nodeVersion,omitempty" yaml:"nodeVersion,omitempty"` + OpenStackSecret string `json:"openStackSecret,omitempty" yaml:"openStackSecret,omitempty"` + PrivateRegistrySecret string `json:"privateRegistrySecret,omitempty" yaml:"privateRegistrySecret,omitempty"` + Provider string `json:"provider,omitempty" yaml:"provider,omitempty"` + Requested map[string]string `json:"requested,omitempty" yaml:"requested,omitempty"` + S3CredentialSecret string `json:"s3CredentialSecret,omitempty" yaml:"s3CredentialSecret,omitempty"` + ServiceAccountTokenSecret string `json:"serviceAccountTokenSecret,omitempty" yaml:"serviceAccountTokenSecret,omitempty"` + Version *Info `json:"version,omitempty" yaml:"version,omitempty"` + VirtualCenterSecret string `json:"virtualCenterSecret,omitempty" yaml:"virtualCenterSecret,omitempty"` + VsphereSecret string `json:"vsphereSecret,omitempty" yaml:"vsphereSecret,omitempty"` + WeavePasswordSecret string `json:"weavePasswordSecret,omitempty" yaml:"weavePasswordSecret,omitempty"` + WindowsWorkerCount int64 `json:"windowsWorkerCount,omitempty" yaml:"windowsWorkerCount,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template.go new file mode 100644 index 000000000..63fcdb4d5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template.go @@ -0,0 +1,124 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + ClusterTemplateType = "clusterTemplate" + ClusterTemplateFieldAnnotations = "annotations" + ClusterTemplateFieldCreated = "created" + ClusterTemplateFieldCreatorID = "creatorId" + ClusterTemplateFieldDefaultRevisionID = "defaultRevisionId" + ClusterTemplateFieldDescription = "description" + ClusterTemplateFieldLabels = "labels" + ClusterTemplateFieldMembers = "members" + ClusterTemplateFieldName = "name" + ClusterTemplateFieldOwnerReferences = "ownerReferences" + ClusterTemplateFieldRemoved = "removed" + ClusterTemplateFieldUUID = "uuid" +) + +type ClusterTemplate struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + DefaultRevisionID string `json:"defaultRevisionId,omitempty" yaml:"defaultRevisionId,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Members []Member `json:"members,omitempty" yaml:"members,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ClusterTemplateCollection struct { + types.Collection + Data []ClusterTemplate `json:"data,omitempty"` + client *ClusterTemplateClient +} + +type ClusterTemplateClient struct { + apiClient *Client +} + +type ClusterTemplateOperations interface { + List(opts *types.ListOpts) (*ClusterTemplateCollection, error) + ListAll(opts *types.ListOpts) (*ClusterTemplateCollection, error) + Create(opts *ClusterTemplate) (*ClusterTemplate, error) + Update(existing *ClusterTemplate, updates interface{}) (*ClusterTemplate, error) + Replace(existing *ClusterTemplate) (*ClusterTemplate, error) + ByID(id string) (*ClusterTemplate, error) + Delete(container *ClusterTemplate) error +} + +func newClusterTemplateClient(apiClient *Client) *ClusterTemplateClient { + return &ClusterTemplateClient{ + apiClient: apiClient, + } +} + +func (c *ClusterTemplateClient) Create(container *ClusterTemplate) (*ClusterTemplate, error) { + resp := &ClusterTemplate{} + err := c.apiClient.Ops.DoCreate(ClusterTemplateType, container, resp) + return resp, err +} + +func (c *ClusterTemplateClient) Update(existing *ClusterTemplate, updates interface{}) (*ClusterTemplate, error) { + resp := &ClusterTemplate{} + err := c.apiClient.Ops.DoUpdate(ClusterTemplateType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ClusterTemplateClient) Replace(obj *ClusterTemplate) (*ClusterTemplate, error) { + resp := &ClusterTemplate{} + err := c.apiClient.Ops.DoReplace(ClusterTemplateType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *ClusterTemplateClient) List(opts *types.ListOpts) (*ClusterTemplateCollection, error) { + resp := &ClusterTemplateCollection{} + err := c.apiClient.Ops.DoList(ClusterTemplateType, opts, resp) + resp.client = c + return resp, err +} + +func (c *ClusterTemplateClient) ListAll(opts *types.ListOpts) (*ClusterTemplateCollection, error) { + resp := &ClusterTemplateCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *ClusterTemplateCollection) Next() (*ClusterTemplateCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ClusterTemplateCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *ClusterTemplateClient) ByID(id string) (*ClusterTemplate, error) { + resp := &ClusterTemplate{} + err := c.apiClient.Ops.DoByID(ClusterTemplateType, id, resp) + return resp, err +} + +func (c *ClusterTemplateClient) Delete(container *ClusterTemplate) error { + return c.apiClient.Ops.DoResourceDelete(ClusterTemplateType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_questions_output.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_questions_output.go new file mode 100644 index 000000000..2de339909 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_questions_output.go @@ -0,0 +1,10 @@ +package client + +const ( + ClusterTemplateQuestionsOutputType = "clusterTemplateQuestionsOutput" + ClusterTemplateQuestionsOutputFieldQuestions = "questions" +) + +type ClusterTemplateQuestionsOutput struct { + Questions []Question `json:"questions,omitempty" yaml:"questions,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision.go new file mode 100644 index 000000000..6986d4e39 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision.go @@ -0,0 +1,186 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + ClusterTemplateRevisionType = "clusterTemplateRevision" + ClusterTemplateRevisionFieldAADClientCertSecret = "aadClientCertSecret" + ClusterTemplateRevisionFieldAADClientSecret = "aadClientSecret" + ClusterTemplateRevisionFieldACIAPICUserKeySecret = "aciAPICUserKeySecret" + ClusterTemplateRevisionFieldACIKafkaClientKeySecret = "aciKafkaClientKeySecret" + ClusterTemplateRevisionFieldACITokenSecret = "aciTokenSecret" + ClusterTemplateRevisionFieldAnnotations = "annotations" + ClusterTemplateRevisionFieldBastionHostSSHKeySecret = "bastionHostSSHKeySecret" + ClusterTemplateRevisionFieldClusterConfig = "clusterConfig" + ClusterTemplateRevisionFieldClusterTemplateID = "clusterTemplateId" + ClusterTemplateRevisionFieldConditions = "conditions" + ClusterTemplateRevisionFieldCreated = "created" + ClusterTemplateRevisionFieldCreatorID = "creatorId" + ClusterTemplateRevisionFieldEnabled = "enabled" + ClusterTemplateRevisionFieldKubeletExtraEnvSecret = "kubeletExtraEnvSecret" + ClusterTemplateRevisionFieldLabels = "labels" + ClusterTemplateRevisionFieldName = "name" + ClusterTemplateRevisionFieldOpenStackSecret = "openStackSecret" + ClusterTemplateRevisionFieldOwnerReferences = "ownerReferences" + ClusterTemplateRevisionFieldPrivateRegistryECRSecret = "privateRegistryECRSecret" + ClusterTemplateRevisionFieldPrivateRegistrySecret = "privateRegistrySecret" + ClusterTemplateRevisionFieldQuestions = "questions" + ClusterTemplateRevisionFieldRemoved = "removed" + ClusterTemplateRevisionFieldS3CredentialSecret = "s3CredentialSecret" + ClusterTemplateRevisionFieldSecretsEncryptionProvidersSecret = "secretsEncryptionProvidersSecret" + ClusterTemplateRevisionFieldState = "state" + ClusterTemplateRevisionFieldTransitioning = "transitioning" + ClusterTemplateRevisionFieldTransitioningMessage = "transitioningMessage" + ClusterTemplateRevisionFieldUUID = "uuid" + ClusterTemplateRevisionFieldVirtualCenterSecret = "virtualCenterSecret" + ClusterTemplateRevisionFieldVsphereSecret = "vsphereSecret" + ClusterTemplateRevisionFieldWeavePasswordSecret = "weavePasswordSecret" +) + +type ClusterTemplateRevision struct { + types.Resource + AADClientCertSecret string `json:"aadClientCertSecret,omitempty" yaml:"aadClientCertSecret,omitempty"` + AADClientSecret string `json:"aadClientSecret,omitempty" yaml:"aadClientSecret,omitempty"` + ACIAPICUserKeySecret string `json:"aciAPICUserKeySecret,omitempty" yaml:"aciAPICUserKeySecret,omitempty"` + ACIKafkaClientKeySecret string `json:"aciKafkaClientKeySecret,omitempty" yaml:"aciKafkaClientKeySecret,omitempty"` + ACITokenSecret string `json:"aciTokenSecret,omitempty" yaml:"aciTokenSecret,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + BastionHostSSHKeySecret string `json:"bastionHostSSHKeySecret,omitempty" yaml:"bastionHostSSHKeySecret,omitempty"` + ClusterConfig *ClusterSpecBase `json:"clusterConfig,omitempty" yaml:"clusterConfig,omitempty"` + ClusterTemplateID string `json:"clusterTemplateId,omitempty" yaml:"clusterTemplateId,omitempty"` + Conditions []ClusterTemplateRevisionCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + KubeletExtraEnvSecret string `json:"kubeletExtraEnvSecret,omitempty" yaml:"kubeletExtraEnvSecret,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OpenStackSecret string `json:"openStackSecret,omitempty" yaml:"openStackSecret,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + PrivateRegistryECRSecret string `json:"privateRegistryECRSecret,omitempty" yaml:"privateRegistryECRSecret,omitempty"` + PrivateRegistrySecret string `json:"privateRegistrySecret,omitempty" yaml:"privateRegistrySecret,omitempty"` + Questions []Question `json:"questions,omitempty" yaml:"questions,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + S3CredentialSecret string `json:"s3CredentialSecret,omitempty" yaml:"s3CredentialSecret,omitempty"` + SecretsEncryptionProvidersSecret string `json:"secretsEncryptionProvidersSecret,omitempty" yaml:"secretsEncryptionProvidersSecret,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + VirtualCenterSecret string `json:"virtualCenterSecret,omitempty" yaml:"virtualCenterSecret,omitempty"` + VsphereSecret string `json:"vsphereSecret,omitempty" yaml:"vsphereSecret,omitempty"` + WeavePasswordSecret string `json:"weavePasswordSecret,omitempty" yaml:"weavePasswordSecret,omitempty"` +} + +type ClusterTemplateRevisionCollection struct { + types.Collection + Data []ClusterTemplateRevision `json:"data,omitempty"` + client *ClusterTemplateRevisionClient +} + +type ClusterTemplateRevisionClient struct { + apiClient *Client +} + +type ClusterTemplateRevisionOperations interface { + List(opts *types.ListOpts) (*ClusterTemplateRevisionCollection, error) + ListAll(opts *types.ListOpts) (*ClusterTemplateRevisionCollection, error) + Create(opts *ClusterTemplateRevision) (*ClusterTemplateRevision, error) + Update(existing *ClusterTemplateRevision, updates interface{}) (*ClusterTemplateRevision, error) + Replace(existing *ClusterTemplateRevision) (*ClusterTemplateRevision, error) + ByID(id string) (*ClusterTemplateRevision, error) + Delete(container *ClusterTemplateRevision) error + + ActionDisable(resource *ClusterTemplateRevision) error + + ActionEnable(resource *ClusterTemplateRevision) error + + CollectionActionListquestions(resource *ClusterTemplateRevisionCollection) (*ClusterTemplateQuestionsOutput, error) +} + +func newClusterTemplateRevisionClient(apiClient *Client) *ClusterTemplateRevisionClient { + return &ClusterTemplateRevisionClient{ + apiClient: apiClient, + } +} + +func (c *ClusterTemplateRevisionClient) Create(container *ClusterTemplateRevision) (*ClusterTemplateRevision, error) { + resp := &ClusterTemplateRevision{} + err := c.apiClient.Ops.DoCreate(ClusterTemplateRevisionType, container, resp) + return resp, err +} + +func (c *ClusterTemplateRevisionClient) Update(existing *ClusterTemplateRevision, updates interface{}) (*ClusterTemplateRevision, error) { + resp := &ClusterTemplateRevision{} + err := c.apiClient.Ops.DoUpdate(ClusterTemplateRevisionType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ClusterTemplateRevisionClient) Replace(obj *ClusterTemplateRevision) (*ClusterTemplateRevision, error) { + resp := &ClusterTemplateRevision{} + err := c.apiClient.Ops.DoReplace(ClusterTemplateRevisionType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *ClusterTemplateRevisionClient) List(opts *types.ListOpts) (*ClusterTemplateRevisionCollection, error) { + resp := &ClusterTemplateRevisionCollection{} + err := c.apiClient.Ops.DoList(ClusterTemplateRevisionType, opts, resp) + resp.client = c + return resp, err +} + +func (c *ClusterTemplateRevisionClient) ListAll(opts *types.ListOpts) (*ClusterTemplateRevisionCollection, error) { + resp := &ClusterTemplateRevisionCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *ClusterTemplateRevisionCollection) Next() (*ClusterTemplateRevisionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ClusterTemplateRevisionCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *ClusterTemplateRevisionClient) ByID(id string) (*ClusterTemplateRevision, error) { + resp := &ClusterTemplateRevision{} + err := c.apiClient.Ops.DoByID(ClusterTemplateRevisionType, id, resp) + return resp, err +} + +func (c *ClusterTemplateRevisionClient) Delete(container *ClusterTemplateRevision) error { + return c.apiClient.Ops.DoResourceDelete(ClusterTemplateRevisionType, &container.Resource) +} + +func (c *ClusterTemplateRevisionClient) ActionDisable(resource *ClusterTemplateRevision) error { + err := c.apiClient.Ops.DoAction(ClusterTemplateRevisionType, "disable", &resource.Resource, nil, nil) + return err +} + +func (c *ClusterTemplateRevisionClient) ActionEnable(resource *ClusterTemplateRevision) error { + err := c.apiClient.Ops.DoAction(ClusterTemplateRevisionType, "enable", &resource.Resource, nil, nil) + return err +} + +func (c *ClusterTemplateRevisionClient) CollectionActionListquestions(resource *ClusterTemplateRevisionCollection) (*ClusterTemplateQuestionsOutput, error) { + resp := &ClusterTemplateQuestionsOutput{} + err := c.apiClient.Ops.DoCollectionAction(ClusterTemplateRevisionType, "listquestions", &resource.Collection, nil, resp) + return resp, err +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision_condition.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision_condition.go new file mode 100644 index 000000000..114d52be1 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision_condition.go @@ -0,0 +1,20 @@ +package client + +const ( + ClusterTemplateRevisionConditionType = "clusterTemplateRevisionCondition" + ClusterTemplateRevisionConditionFieldLastTransitionTime = "lastTransitionTime" + ClusterTemplateRevisionConditionFieldLastUpdateTime = "lastUpdateTime" + ClusterTemplateRevisionConditionFieldMessage = "message" + ClusterTemplateRevisionConditionFieldReason = "reason" + ClusterTemplateRevisionConditionFieldStatus = "status" + ClusterTemplateRevisionConditionFieldType = "type" +) + +type ClusterTemplateRevisionCondition struct { + LastTransitionTime string `json:"lastTransitionTime,omitempty" yaml:"lastTransitionTime,omitempty"` + LastUpdateTime string `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` + Reason string `json:"reason,omitempty" yaml:"reason,omitempty"` + Status string `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision_spec.go new file mode 100644 index 000000000..72a46d6c9 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision_spec.go @@ -0,0 +1,18 @@ +package client + +const ( + ClusterTemplateRevisionSpecType = "clusterTemplateRevisionSpec" + ClusterTemplateRevisionSpecFieldClusterConfig = "clusterConfig" + ClusterTemplateRevisionSpecFieldClusterTemplateID = "clusterTemplateId" + ClusterTemplateRevisionSpecFieldDisplayName = "displayName" + ClusterTemplateRevisionSpecFieldEnabled = "enabled" + ClusterTemplateRevisionSpecFieldQuestions = "questions" +) + +type ClusterTemplateRevisionSpec struct { + ClusterConfig *ClusterSpecBase `json:"clusterConfig,omitempty" yaml:"clusterConfig,omitempty"` + ClusterTemplateID string `json:"clusterTemplateId,omitempty" yaml:"clusterTemplateId,omitempty"` + DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` + Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + Questions []Question `json:"questions,omitempty" yaml:"questions,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision_status.go new file mode 100644 index 000000000..1aa56ea24 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_revision_status.go @@ -0,0 +1,40 @@ +package client + +const ( + ClusterTemplateRevisionStatusType = "clusterTemplateRevisionStatus" + ClusterTemplateRevisionStatusFieldAADClientCertSecret = "aadClientCertSecret" + ClusterTemplateRevisionStatusFieldAADClientSecret = "aadClientSecret" + ClusterTemplateRevisionStatusFieldACIAPICUserKeySecret = "aciAPICUserKeySecret" + ClusterTemplateRevisionStatusFieldACIKafkaClientKeySecret = "aciKafkaClientKeySecret" + ClusterTemplateRevisionStatusFieldACITokenSecret = "aciTokenSecret" + ClusterTemplateRevisionStatusFieldBastionHostSSHKeySecret = "bastionHostSSHKeySecret" + ClusterTemplateRevisionStatusFieldConditions = "conditions" + ClusterTemplateRevisionStatusFieldKubeletExtraEnvSecret = "kubeletExtraEnvSecret" + ClusterTemplateRevisionStatusFieldOpenStackSecret = "openStackSecret" + ClusterTemplateRevisionStatusFieldPrivateRegistryECRSecret = "privateRegistryECRSecret" + ClusterTemplateRevisionStatusFieldPrivateRegistrySecret = "privateRegistrySecret" + ClusterTemplateRevisionStatusFieldS3CredentialSecret = "s3CredentialSecret" + ClusterTemplateRevisionStatusFieldSecretsEncryptionProvidersSecret = "secretsEncryptionProvidersSecret" + ClusterTemplateRevisionStatusFieldVirtualCenterSecret = "virtualCenterSecret" + ClusterTemplateRevisionStatusFieldVsphereSecret = "vsphereSecret" + ClusterTemplateRevisionStatusFieldWeavePasswordSecret = "weavePasswordSecret" +) + +type ClusterTemplateRevisionStatus struct { + AADClientCertSecret string `json:"aadClientCertSecret,omitempty" yaml:"aadClientCertSecret,omitempty"` + AADClientSecret string `json:"aadClientSecret,omitempty" yaml:"aadClientSecret,omitempty"` + ACIAPICUserKeySecret string `json:"aciAPICUserKeySecret,omitempty" yaml:"aciAPICUserKeySecret,omitempty"` + ACIKafkaClientKeySecret string `json:"aciKafkaClientKeySecret,omitempty" yaml:"aciKafkaClientKeySecret,omitempty"` + ACITokenSecret string `json:"aciTokenSecret,omitempty" yaml:"aciTokenSecret,omitempty"` + BastionHostSSHKeySecret string `json:"bastionHostSSHKeySecret,omitempty" yaml:"bastionHostSSHKeySecret,omitempty"` + Conditions []ClusterTemplateRevisionCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + KubeletExtraEnvSecret string `json:"kubeletExtraEnvSecret,omitempty" yaml:"kubeletExtraEnvSecret,omitempty"` + OpenStackSecret string `json:"openStackSecret,omitempty" yaml:"openStackSecret,omitempty"` + PrivateRegistryECRSecret string `json:"privateRegistryECRSecret,omitempty" yaml:"privateRegistryECRSecret,omitempty"` + PrivateRegistrySecret string `json:"privateRegistrySecret,omitempty" yaml:"privateRegistrySecret,omitempty"` + S3CredentialSecret string `json:"s3CredentialSecret,omitempty" yaml:"s3CredentialSecret,omitempty"` + SecretsEncryptionProvidersSecret string `json:"secretsEncryptionProvidersSecret,omitempty" yaml:"secretsEncryptionProvidersSecret,omitempty"` + VirtualCenterSecret string `json:"virtualCenterSecret,omitempty" yaml:"virtualCenterSecret,omitempty"` + VsphereSecret string `json:"vsphereSecret,omitempty" yaml:"vsphereSecret,omitempty"` + WeavePasswordSecret string `json:"weavePasswordSecret,omitempty" yaml:"weavePasswordSecret,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_spec.go new file mode 100644 index 000000000..6d0270f5b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_template_spec.go @@ -0,0 +1,16 @@ +package client + +const ( + ClusterTemplateSpecType = "clusterTemplateSpec" + ClusterTemplateSpecFieldDefaultRevisionID = "defaultRevisionId" + ClusterTemplateSpecFieldDescription = "description" + ClusterTemplateSpecFieldDisplayName = "displayName" + ClusterTemplateSpecFieldMembers = "members" +) + +type ClusterTemplateSpec struct { + DefaultRevisionID string `json:"defaultRevisionId,omitempty" yaml:"defaultRevisionId,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` + Members []Member `json:"members,omitempty" yaml:"members,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_trust_bundle_projection.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_trust_bundle_projection.go new file mode 100644 index 000000000..61d322dea --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_trust_bundle_projection.go @@ -0,0 +1,18 @@ +package client + +const ( + ClusterTrustBundleProjectionType = "clusterTrustBundleProjection" + ClusterTrustBundleProjectionFieldLabelSelector = "labelSelector" + ClusterTrustBundleProjectionFieldName = "name" + ClusterTrustBundleProjectionFieldOptional = "optional" + ClusterTrustBundleProjectionFieldPath = "path" + ClusterTrustBundleProjectionFieldSignerName = "signerName" +) + +type ClusterTrustBundleProjection struct { + LabelSelector *LabelSelector `json:"labelSelector,omitempty" yaml:"labelSelector,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Optional *bool `json:"optional,omitempty" yaml:"optional,omitempty"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` + SignerName string `json:"signerName,omitempty" yaml:"signerName,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_upgrade_strategy.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_upgrade_strategy.go new file mode 100644 index 000000000..c50810784 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cluster_upgrade_strategy.go @@ -0,0 +1,16 @@ +package client + +const ( + ClusterUpgradeStrategyType = "clusterUpgradeStrategy" + ClusterUpgradeStrategyFieldDrainServerNodes = "drainServerNodes" + ClusterUpgradeStrategyFieldDrainWorkerNodes = "drainWorkerNodes" + ClusterUpgradeStrategyFieldServerConcurrency = "serverConcurrency" + ClusterUpgradeStrategyFieldWorkerConcurrency = "workerConcurrency" +) + +type ClusterUpgradeStrategy struct { + DrainServerNodes bool `json:"drainServerNodes,omitempty" yaml:"drainServerNodes,omitempty"` + DrainWorkerNodes bool `json:"drainWorkerNodes,omitempty" yaml:"drainWorkerNodes,omitempty"` + ServerConcurrency int64 `json:"serverConcurrency,omitempty" yaml:"serverConcurrency,omitempty"` + WorkerConcurrency int64 `json:"workerConcurrency,omitempty" yaml:"workerConcurrency,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cmek_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cmek_config.go new file mode 100644 index 000000000..c30a6580e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cmek_config.go @@ -0,0 +1,12 @@ +package client + +const ( + CMEKConfigType = "cmekConfig" + CMEKConfigFieldKeyName = "keyName" + CMEKConfigFieldRingName = "ringName" +) + +type CMEKConfig struct { + KeyName string `json:"keyName,omitempty" yaml:"keyName,omitempty"` + RingName string `json:"ringName,omitempty" yaml:"ringName,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_component_condition.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_component_condition.go new file mode 100644 index 000000000..ac2357941 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_component_condition.go @@ -0,0 +1,16 @@ +package client + +const ( + ComponentConditionType = "componentCondition" + ComponentConditionFieldError = "error" + ComponentConditionFieldMessage = "message" + ComponentConditionFieldStatus = "status" + ComponentConditionFieldType = "type" +) + +type ComponentCondition struct { + Error string `json:"error,omitempty" yaml:"error,omitempty"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` + Status string `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_condition.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_condition.go new file mode 100644 index 000000000..e2b5a1ec4 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_condition.go @@ -0,0 +1,20 @@ +package client + +const ( + ComposeConditionType = "composeCondition" + ComposeConditionFieldLastTransitionTime = "lastTransitionTime" + ComposeConditionFieldLastUpdateTime = "lastUpdateTime" + ComposeConditionFieldMessage = "message" + ComposeConditionFieldReason = "reason" + ComposeConditionFieldStatus = "status" + ComposeConditionFieldType = "type" +) + +type ComposeCondition struct { + LastTransitionTime string `json:"lastTransitionTime,omitempty" yaml:"lastTransitionTime,omitempty"` + LastUpdateTime string `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` + Reason string `json:"reason,omitempty" yaml:"reason,omitempty"` + Status string `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_config.go new file mode 100644 index 000000000..7b926c8d5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_config.go @@ -0,0 +1,128 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + ComposeConfigType = "composeConfig" + ComposeConfigFieldAnnotations = "annotations" + ComposeConfigFieldCreated = "created" + ComposeConfigFieldCreatorID = "creatorId" + ComposeConfigFieldLabels = "labels" + ComposeConfigFieldName = "name" + ComposeConfigFieldOwnerReferences = "ownerReferences" + ComposeConfigFieldRancherCompose = "rancherCompose" + ComposeConfigFieldRemoved = "removed" + ComposeConfigFieldState = "state" + ComposeConfigFieldStatus = "status" + ComposeConfigFieldTransitioning = "transitioning" + ComposeConfigFieldTransitioningMessage = "transitioningMessage" + ComposeConfigFieldUUID = "uuid" +) + +type ComposeConfig struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + RancherCompose string `json:"rancherCompose,omitempty" yaml:"rancherCompose,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Status *ComposeStatus `json:"status,omitempty" yaml:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ComposeConfigCollection struct { + types.Collection + Data []ComposeConfig `json:"data,omitempty"` + client *ComposeConfigClient +} + +type ComposeConfigClient struct { + apiClient *Client +} + +type ComposeConfigOperations interface { + List(opts *types.ListOpts) (*ComposeConfigCollection, error) + ListAll(opts *types.ListOpts) (*ComposeConfigCollection, error) + Create(opts *ComposeConfig) (*ComposeConfig, error) + Update(existing *ComposeConfig, updates interface{}) (*ComposeConfig, error) + Replace(existing *ComposeConfig) (*ComposeConfig, error) + ByID(id string) (*ComposeConfig, error) + Delete(container *ComposeConfig) error +} + +func newComposeConfigClient(apiClient *Client) *ComposeConfigClient { + return &ComposeConfigClient{ + apiClient: apiClient, + } +} + +func (c *ComposeConfigClient) Create(container *ComposeConfig) (*ComposeConfig, error) { + resp := &ComposeConfig{} + err := c.apiClient.Ops.DoCreate(ComposeConfigType, container, resp) + return resp, err +} + +func (c *ComposeConfigClient) Update(existing *ComposeConfig, updates interface{}) (*ComposeConfig, error) { + resp := &ComposeConfig{} + err := c.apiClient.Ops.DoUpdate(ComposeConfigType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ComposeConfigClient) Replace(obj *ComposeConfig) (*ComposeConfig, error) { + resp := &ComposeConfig{} + err := c.apiClient.Ops.DoReplace(ComposeConfigType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *ComposeConfigClient) List(opts *types.ListOpts) (*ComposeConfigCollection, error) { + resp := &ComposeConfigCollection{} + err := c.apiClient.Ops.DoList(ComposeConfigType, opts, resp) + resp.client = c + return resp, err +} + +func (c *ComposeConfigClient) ListAll(opts *types.ListOpts) (*ComposeConfigCollection, error) { + resp := &ComposeConfigCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *ComposeConfigCollection) Next() (*ComposeConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ComposeConfigCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *ComposeConfigClient) ByID(id string) (*ComposeConfig, error) { + resp := &ComposeConfig{} + err := c.apiClient.Ops.DoByID(ComposeConfigType, id, resp) + return resp, err +} + +func (c *ComposeConfigClient) Delete(container *ComposeConfig) error { + return c.apiClient.Ops.DoResourceDelete(ComposeConfigType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_spec.go new file mode 100644 index 000000000..6477b002b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_spec.go @@ -0,0 +1,10 @@ +package client + +const ( + ComposeSpecType = "composeSpec" + ComposeSpecFieldRancherCompose = "rancherCompose" +) + +type ComposeSpec struct { + RancherCompose string `json:"rancherCompose,omitempty" yaml:"rancherCompose,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_status.go new file mode 100644 index 000000000..53138f03d --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_compose_status.go @@ -0,0 +1,10 @@ +package client + +const ( + ComposeStatusType = "composeStatus" + ComposeStatusFieldConditions = "conditions" +) + +type ComposeStatus struct { + Conditions []ComposeCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_condition.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_condition.go new file mode 100644 index 000000000..7f5020434 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_condition.go @@ -0,0 +1,20 @@ +package client + +const ( + ConditionType = "condition" + ConditionFieldLastTransitionTime = "lastTransitionTime" + ConditionFieldLastUpdateTime = "lastUpdateTime" + ConditionFieldMessage = "message" + ConditionFieldReason = "reason" + ConditionFieldStatus = "status" + ConditionFieldType = "type" +) + +type Condition struct { + LastTransitionTime string `json:"lastTransitionTime,omitempty" yaml:"lastTransitionTime,omitempty"` + LastUpdateTime string `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` + Reason string `json:"reason,omitempty" yaml:"reason,omitempty"` + Status string `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_key_selector.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_key_selector.go new file mode 100644 index 000000000..e1b599115 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_key_selector.go @@ -0,0 +1,14 @@ +package client + +const ( + ConfigMapKeySelectorType = "configMapKeySelector" + ConfigMapKeySelectorFieldKey = "key" + ConfigMapKeySelectorFieldName = "name" + ConfigMapKeySelectorFieldOptional = "optional" +) + +type ConfigMapKeySelector struct { + Key string `json:"key,omitempty" yaml:"key,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Optional *bool `json:"optional,omitempty" yaml:"optional,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_node_config_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_node_config_source.go new file mode 100644 index 000000000..1f6d09001 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_node_config_source.go @@ -0,0 +1,18 @@ +package client + +const ( + ConfigMapNodeConfigSourceType = "configMapNodeConfigSource" + ConfigMapNodeConfigSourceFieldKubeletConfigKey = "kubeletConfigKey" + ConfigMapNodeConfigSourceFieldName = "name" + ConfigMapNodeConfigSourceFieldNamespace = "namespace" + ConfigMapNodeConfigSourceFieldResourceVersion = "resourceVersion" + ConfigMapNodeConfigSourceFieldUID = "uid" +) + +type ConfigMapNodeConfigSource struct { + KubeletConfigKey string `json:"kubeletConfigKey,omitempty" yaml:"kubeletConfigKey,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` + ResourceVersion string `json:"resourceVersion,omitempty" yaml:"resourceVersion,omitempty"` + UID string `json:"uid,omitempty" yaml:"uid,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_projection.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_projection.go new file mode 100644 index 000000000..94388a508 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_projection.go @@ -0,0 +1,14 @@ +package client + +const ( + ConfigMapProjectionType = "configMapProjection" + ConfigMapProjectionFieldItems = "items" + ConfigMapProjectionFieldName = "name" + ConfigMapProjectionFieldOptional = "optional" +) + +type ConfigMapProjection struct { + Items []KeyToPath `json:"items,omitempty" yaml:"items,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Optional *bool `json:"optional,omitempty" yaml:"optional,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_volume_source.go new file mode 100644 index 000000000..4de7b8ad3 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_config_map_volume_source.go @@ -0,0 +1,16 @@ +package client + +const ( + ConfigMapVolumeSourceType = "configMapVolumeSource" + ConfigMapVolumeSourceFieldDefaultMode = "defaultMode" + ConfigMapVolumeSourceFieldItems = "items" + ConfigMapVolumeSourceFieldName = "name" + ConfigMapVolumeSourceFieldOptional = "optional" +) + +type ConfigMapVolumeSource struct { + DefaultMode *int64 `json:"defaultMode,omitempty" yaml:"defaultMode,omitempty"` + Items []KeyToPath `json:"items,omitempty" yaml:"items,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Optional *bool `json:"optional,omitempty" yaml:"optional,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_container_image.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_container_image.go new file mode 100644 index 000000000..5f1419740 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_container_image.go @@ -0,0 +1,12 @@ +package client + +const ( + ContainerImageType = "containerImage" + ContainerImageFieldNames = "names" + ContainerImageFieldSizeBytes = "sizeBytes" +) + +type ContainerImage struct { + Names []string `json:"names,omitempty" yaml:"names,omitempty"` + SizeBytes int64 `json:"sizeBytes,omitempty" yaml:"sizeBytes,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_container_resource_limit.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_container_resource_limit.go new file mode 100644 index 000000000..b36a49929 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_container_resource_limit.go @@ -0,0 +1,16 @@ +package client + +const ( + ContainerResourceLimitType = "containerResourceLimit" + ContainerResourceLimitFieldLimitsCPU = "limitsCpu" + ContainerResourceLimitFieldLimitsMemory = "limitsMemory" + ContainerResourceLimitFieldRequestsCPU = "requestsCpu" + ContainerResourceLimitFieldRequestsMemory = "requestsMemory" +) + +type ContainerResourceLimit struct { + LimitsCPU string `json:"limitsCpu,omitempty" yaml:"limitsCpu,omitempty"` + LimitsMemory string `json:"limitsMemory,omitempty" yaml:"limitsMemory,omitempty"` + RequestsCPU string `json:"requestsCpu,omitempty" yaml:"requestsCpu,omitempty"` + RequestsMemory string `json:"requestsMemory,omitempty" yaml:"requestsMemory,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cpu_info.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cpu_info.go new file mode 100644 index 000000000..08764a5e5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_cpu_info.go @@ -0,0 +1,10 @@ +package client + +const ( + CPUInfoType = "cpuInfo" + CPUInfoFieldCount = "count" +) + +type CPUInfo struct { + Count int64 `json:"count,omitempty" yaml:"count,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_csi_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_csi_volume_source.go new file mode 100644 index 000000000..f341d5300 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_csi_volume_source.go @@ -0,0 +1,18 @@ +package client + +const ( + CSIVolumeSourceType = "csiVolumeSource" + CSIVolumeSourceFieldDriver = "driver" + CSIVolumeSourceFieldFSType = "fsType" + CSIVolumeSourceFieldNodePublishSecretRef = "nodePublishSecretRef" + CSIVolumeSourceFieldReadOnly = "readOnly" + CSIVolumeSourceFieldVolumeAttributes = "volumeAttributes" +) + +type CSIVolumeSource struct { + Driver string `json:"driver,omitempty" yaml:"driver,omitempty"` + FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"` + NodePublishSecretRef *LocalObjectReference `json:"nodePublishSecretRef,omitempty" yaml:"nodePublishSecretRef,omitempty"` + ReadOnly *bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + VolumeAttributes map[string]string `json:"volumeAttributes,omitempty" yaml:"volumeAttributes,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_custom_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_custom_config.go new file mode 100644 index 000000000..677392bb5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_custom_config.go @@ -0,0 +1,24 @@ +package client + +const ( + CustomConfigType = "customConfig" + CustomConfigFieldAddress = "address" + CustomConfigFieldDockerSocket = "dockerSocket" + CustomConfigFieldInternalAddress = "internalAddress" + CustomConfigFieldLabel = "label" + CustomConfigFieldSSHCert = "sshCert" + CustomConfigFieldSSHKey = "sshKey" + CustomConfigFieldTaints = "taints" + CustomConfigFieldUser = "user" +) + +type CustomConfig struct { + Address string `json:"address,omitempty" yaml:"address,omitempty"` + DockerSocket string `json:"dockerSocket,omitempty" yaml:"dockerSocket,omitempty"` + InternalAddress string `json:"internalAddress,omitempty" yaml:"internalAddress,omitempty"` + Label map[string]string `json:"label,omitempty" yaml:"label,omitempty"` + SSHCert string `json:"sshCert,omitempty" yaml:"sshCert,omitempty"` + SSHKey string `json:"sshKey,omitempty" yaml:"sshKey,omitempty"` + Taints []string `json:"taints,omitempty" yaml:"taints,omitempty"` + User string `json:"user,omitempty" yaml:"user,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_daemon_endpoint.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_daemon_endpoint.go new file mode 100644 index 000000000..88cefc764 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_daemon_endpoint.go @@ -0,0 +1,10 @@ +package client + +const ( + DaemonEndpointType = "daemonEndpoint" + DaemonEndpointFieldPort = "Port" +) + +type DaemonEndpoint struct { + Port int64 `json:"Port,omitempty" yaml:"Port,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_daemon_set_update_strategy.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_daemon_set_update_strategy.go new file mode 100644 index 000000000..775007ecd --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_daemon_set_update_strategy.go @@ -0,0 +1,12 @@ +package client + +const ( + DaemonSetUpdateStrategyType = "daemonSetUpdateStrategy" + DaemonSetUpdateStrategyFieldRollingUpdate = "rollingUpdate" + DaemonSetUpdateStrategyFieldStrategy = "strategy" +) + +type DaemonSetUpdateStrategy struct { + RollingUpdate *RollingUpdateDaemonSet `json:"rollingUpdate,omitempty" yaml:"rollingUpdate,omitempty"` + Strategy string `json:"strategy,omitempty" yaml:"strategy,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_deployment_strategy.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_deployment_strategy.go new file mode 100644 index 000000000..69c4b91bf --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_deployment_strategy.go @@ -0,0 +1,12 @@ +package client + +const ( + DeploymentStrategyType = "deploymentStrategy" + DeploymentStrategyFieldRollingUpdate = "rollingUpdate" + DeploymentStrategyFieldStrategy = "strategy" +) + +type DeploymentStrategy struct { + RollingUpdate *RollingUpdateDeployment `json:"rollingUpdate,omitempty" yaml:"rollingUpdate,omitempty"` + Strategy string `json:"strategy,omitempty" yaml:"strategy,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_disk_vsphere_opts.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_disk_vsphere_opts.go new file mode 100644 index 000000000..d3db88aee --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_disk_vsphere_opts.go @@ -0,0 +1,10 @@ +package client + +const ( + DiskVsphereOptsType = "diskVsphereOpts" + DiskVsphereOptsFieldSCSIControllerType = "scsicontrollertype" +) + +type DiskVsphereOpts struct { + SCSIControllerType string `json:"scsicontrollertype,omitempty" yaml:"scsicontrollertype,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dns_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dns_config.go new file mode 100644 index 000000000..d7a5630b4 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dns_config.go @@ -0,0 +1,28 @@ +package client + +const ( + DNSConfigType = "dnsConfig" + DNSConfigFieldLinearAutoscalerParams = "linearAutoscalerParams" + DNSConfigFieldNodeSelector = "nodeSelector" + DNSConfigFieldNodelocal = "nodelocal" + DNSConfigFieldOptions = "options" + DNSConfigFieldProvider = "provider" + DNSConfigFieldReverseCIDRs = "reversecidrs" + DNSConfigFieldStubDomains = "stubdomains" + DNSConfigFieldTolerations = "tolerations" + DNSConfigFieldUpdateStrategy = "updateStrategy" + DNSConfigFieldUpstreamNameservers = "upstreamnameservers" +) + +type DNSConfig struct { + LinearAutoscalerParams *LinearAutoscalerParams `json:"linearAutoscalerParams,omitempty" yaml:"linearAutoscalerParams,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"` + Nodelocal *Nodelocal `json:"nodelocal,omitempty" yaml:"nodelocal,omitempty"` + Options map[string]string `json:"options,omitempty" yaml:"options,omitempty"` + Provider string `json:"provider,omitempty" yaml:"provider,omitempty"` + ReverseCIDRs []string `json:"reversecidrs,omitempty" yaml:"reversecidrs,omitempty"` + StubDomains map[string][]string `json:"stubdomains,omitempty" yaml:"stubdomains,omitempty"` + Tolerations []Toleration `json:"tolerations,omitempty" yaml:"tolerations,omitempty"` + UpdateStrategy *DeploymentStrategy `json:"updateStrategy,omitempty" yaml:"updateStrategy,omitempty"` + UpstreamNameservers []string `json:"upstreamnameservers,omitempty" yaml:"upstreamnameservers,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_docker_info.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_docker_info.go new file mode 100644 index 000000000..1b66e6284 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_docker_info.go @@ -0,0 +1,48 @@ +package client + +const ( + DockerInfoType = "dockerInfo" + DockerInfoFieldArchitecture = "architecture" + DockerInfoFieldCgroupDriver = "cgroupDriver" + DockerInfoFieldDebug = "debug" + DockerInfoFieldDockerRootDir = "dockerRootDir" + DockerInfoFieldDriver = "driver" + DockerInfoFieldExperimentalBuild = "experimentalBuild" + DockerInfoFieldHTTPProxy = "httpProxy" + DockerInfoFieldHTTPSProxy = "httpsProxy" + DockerInfoFieldID = "id" + DockerInfoFieldIndexServerAddress = "indexServerAddress" + DockerInfoFieldInitBinary = "initBinary" + DockerInfoFieldKernelVersion = "kernelVersion" + DockerInfoFieldLabels = "labels" + DockerInfoFieldLoggingDriver = "loggingDriver" + DockerInfoFieldName = "name" + DockerInfoFieldNoProxy = "noProxy" + DockerInfoFieldOSType = "osType" + DockerInfoFieldOperatingSystem = "operatingSystem" + DockerInfoFieldSecurityOptions = "securityOptions" + DockerInfoFieldServerVersion = "serverVersion" +) + +type DockerInfo struct { + Architecture string `json:"architecture,omitempty" yaml:"architecture,omitempty"` + CgroupDriver string `json:"cgroupDriver,omitempty" yaml:"cgroupDriver,omitempty"` + Debug bool `json:"debug,omitempty" yaml:"debug,omitempty"` + DockerRootDir string `json:"dockerRootDir,omitempty" yaml:"dockerRootDir,omitempty"` + Driver string `json:"driver,omitempty" yaml:"driver,omitempty"` + ExperimentalBuild bool `json:"experimentalBuild,omitempty" yaml:"experimentalBuild,omitempty"` + HTTPProxy string `json:"httpProxy,omitempty" yaml:"httpProxy,omitempty"` + HTTPSProxy string `json:"httpsProxy,omitempty" yaml:"httpsProxy,omitempty"` + ID string `json:"id,omitempty" yaml:"id,omitempty"` + IndexServerAddress string `json:"indexServerAddress,omitempty" yaml:"indexServerAddress,omitempty"` + InitBinary string `json:"initBinary,omitempty" yaml:"initBinary,omitempty"` + KernelVersion string `json:"kernelVersion,omitempty" yaml:"kernelVersion,omitempty"` + Labels []string `json:"labels,omitempty" yaml:"labels,omitempty"` + LoggingDriver string `json:"loggingDriver,omitempty" yaml:"loggingDriver,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NoProxy string `json:"noProxy,omitempty" yaml:"noProxy,omitempty"` + OSType string `json:"osType,omitempty" yaml:"osType,omitempty"` + OperatingSystem string `json:"operatingSystem,omitempty" yaml:"operatingSystem,omitempty"` + SecurityOptions []string `json:"securityOptions,omitempty" yaml:"securityOptions,omitempty"` + ServerVersion string `json:"serverVersion,omitempty" yaml:"serverVersion,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_downward_apiprojection.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_downward_apiprojection.go new file mode 100644 index 000000000..ca02c4ddf --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_downward_apiprojection.go @@ -0,0 +1,10 @@ +package client + +const ( + DownwardAPIProjectionType = "downwardAPIProjection" + DownwardAPIProjectionFieldItems = "items" +) + +type DownwardAPIProjection struct { + Items []DownwardAPIVolumeFile `json:"items,omitempty" yaml:"items,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_downward_apivolume_file.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_downward_apivolume_file.go new file mode 100644 index 000000000..c8f8bc2b7 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_downward_apivolume_file.go @@ -0,0 +1,16 @@ +package client + +const ( + DownwardAPIVolumeFileType = "downwardAPIVolumeFile" + DownwardAPIVolumeFileFieldFieldRef = "fieldRef" + DownwardAPIVolumeFileFieldMode = "mode" + DownwardAPIVolumeFileFieldPath = "path" + DownwardAPIVolumeFileFieldResourceFieldRef = "resourceFieldRef" +) + +type DownwardAPIVolumeFile struct { + FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" yaml:"fieldRef,omitempty"` + Mode *int64 `json:"mode,omitempty" yaml:"mode,omitempty"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` + ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" yaml:"resourceFieldRef,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_downward_apivolume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_downward_apivolume_source.go new file mode 100644 index 000000000..f6be19447 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_downward_apivolume_source.go @@ -0,0 +1,12 @@ +package client + +const ( + DownwardAPIVolumeSourceType = "downwardAPIVolumeSource" + DownwardAPIVolumeSourceFieldDefaultMode = "defaultMode" + DownwardAPIVolumeSourceFieldItems = "items" +) + +type DownwardAPIVolumeSource struct { + DefaultMode *int64 `json:"defaultMode,omitempty" yaml:"defaultMode,omitempty"` + Items []DownwardAPIVolumeFile `json:"items,omitempty" yaml:"items,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_duration.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_duration.go new file mode 100644 index 000000000..cf0920cf5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_duration.go @@ -0,0 +1,8 @@ +package client + +const ( + DurationType = "duration" +) + +type Duration struct { +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dynamic_schema.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dynamic_schema.go new file mode 100644 index 000000000..080dcb417 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dynamic_schema.go @@ -0,0 +1,152 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + DynamicSchemaType = "dynamicSchema" + DynamicSchemaFieldAnnotations = "annotations" + DynamicSchemaFieldCollectionActions = "collectionActions" + DynamicSchemaFieldCollectionFields = "collectionFields" + DynamicSchemaFieldCollectionFilters = "collectionFilters" + DynamicSchemaFieldCollectionMethods = "collectionMethods" + DynamicSchemaFieldCreated = "created" + DynamicSchemaFieldCreatorID = "creatorId" + DynamicSchemaFieldDynamicSchemaVersion = "dynamicSchemaVersion" + DynamicSchemaFieldEmbed = "embed" + DynamicSchemaFieldEmbedType = "embedType" + DynamicSchemaFieldIncludeableLinks = "includeableLinks" + DynamicSchemaFieldLabels = "labels" + DynamicSchemaFieldName = "name" + DynamicSchemaFieldOwnerReferences = "ownerReferences" + DynamicSchemaFieldPluralName = "pluralName" + DynamicSchemaFieldRemoved = "removed" + DynamicSchemaFieldResourceActions = "resourceActions" + DynamicSchemaFieldResourceFields = "resourceFields" + DynamicSchemaFieldResourceMethods = "resourceMethods" + DynamicSchemaFieldSchemaName = "schemaName" + DynamicSchemaFieldState = "state" + DynamicSchemaFieldStatus = "status" + DynamicSchemaFieldTransitioning = "transitioning" + DynamicSchemaFieldTransitioningMessage = "transitioningMessage" + DynamicSchemaFieldUUID = "uuid" +) + +type DynamicSchema struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + CollectionActions map[string]Action `json:"collectionActions,omitempty" yaml:"collectionActions,omitempty"` + CollectionFields map[string]Field `json:"collectionFields,omitempty" yaml:"collectionFields,omitempty"` + CollectionFilters map[string]Filter `json:"collectionFilters,omitempty" yaml:"collectionFilters,omitempty"` + CollectionMethods []string `json:"collectionMethods,omitempty" yaml:"collectionMethods,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + DynamicSchemaVersion string `json:"dynamicSchemaVersion,omitempty" yaml:"dynamicSchemaVersion,omitempty"` + Embed bool `json:"embed,omitempty" yaml:"embed,omitempty"` + EmbedType string `json:"embedType,omitempty" yaml:"embedType,omitempty"` + IncludeableLinks []string `json:"includeableLinks,omitempty" yaml:"includeableLinks,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + PluralName string `json:"pluralName,omitempty" yaml:"pluralName,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + ResourceActions map[string]Action `json:"resourceActions,omitempty" yaml:"resourceActions,omitempty"` + ResourceFields map[string]Field `json:"resourceFields,omitempty" yaml:"resourceFields,omitempty"` + ResourceMethods []string `json:"resourceMethods,omitempty" yaml:"resourceMethods,omitempty"` + SchemaName string `json:"schemaName,omitempty" yaml:"schemaName,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Status *DynamicSchemaStatus `json:"status,omitempty" yaml:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type DynamicSchemaCollection struct { + types.Collection + Data []DynamicSchema `json:"data,omitempty"` + client *DynamicSchemaClient +} + +type DynamicSchemaClient struct { + apiClient *Client +} + +type DynamicSchemaOperations interface { + List(opts *types.ListOpts) (*DynamicSchemaCollection, error) + ListAll(opts *types.ListOpts) (*DynamicSchemaCollection, error) + Create(opts *DynamicSchema) (*DynamicSchema, error) + Update(existing *DynamicSchema, updates interface{}) (*DynamicSchema, error) + Replace(existing *DynamicSchema) (*DynamicSchema, error) + ByID(id string) (*DynamicSchema, error) + Delete(container *DynamicSchema) error +} + +func newDynamicSchemaClient(apiClient *Client) *DynamicSchemaClient { + return &DynamicSchemaClient{ + apiClient: apiClient, + } +} + +func (c *DynamicSchemaClient) Create(container *DynamicSchema) (*DynamicSchema, error) { + resp := &DynamicSchema{} + err := c.apiClient.Ops.DoCreate(DynamicSchemaType, container, resp) + return resp, err +} + +func (c *DynamicSchemaClient) Update(existing *DynamicSchema, updates interface{}) (*DynamicSchema, error) { + resp := &DynamicSchema{} + err := c.apiClient.Ops.DoUpdate(DynamicSchemaType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *DynamicSchemaClient) Replace(obj *DynamicSchema) (*DynamicSchema, error) { + resp := &DynamicSchema{} + err := c.apiClient.Ops.DoReplace(DynamicSchemaType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *DynamicSchemaClient) List(opts *types.ListOpts) (*DynamicSchemaCollection, error) { + resp := &DynamicSchemaCollection{} + err := c.apiClient.Ops.DoList(DynamicSchemaType, opts, resp) + resp.client = c + return resp, err +} + +func (c *DynamicSchemaClient) ListAll(opts *types.ListOpts) (*DynamicSchemaCollection, error) { + resp := &DynamicSchemaCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *DynamicSchemaCollection) Next() (*DynamicSchemaCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &DynamicSchemaCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *DynamicSchemaClient) ByID(id string) (*DynamicSchema, error) { + resp := &DynamicSchema{} + err := c.apiClient.Ops.DoByID(DynamicSchemaType, id, resp) + return resp, err +} + +func (c *DynamicSchemaClient) Delete(container *DynamicSchema) error { + return c.apiClient.Ops.DoResourceDelete(DynamicSchemaType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dynamic_schema_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dynamic_schema_spec.go new file mode 100644 index 000000000..db9b5440d --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dynamic_schema_spec.go @@ -0,0 +1,34 @@ +package client + +const ( + DynamicSchemaSpecType = "dynamicSchemaSpec" + DynamicSchemaSpecFieldCollectionActions = "collectionActions" + DynamicSchemaSpecFieldCollectionFields = "collectionFields" + DynamicSchemaSpecFieldCollectionFilters = "collectionFilters" + DynamicSchemaSpecFieldCollectionMethods = "collectionMethods" + DynamicSchemaSpecFieldDynamicSchemaVersion = "dynamicSchemaVersion" + DynamicSchemaSpecFieldEmbed = "embed" + DynamicSchemaSpecFieldEmbedType = "embedType" + DynamicSchemaSpecFieldIncludeableLinks = "includeableLinks" + DynamicSchemaSpecFieldPluralName = "pluralName" + DynamicSchemaSpecFieldResourceActions = "resourceActions" + DynamicSchemaSpecFieldResourceFields = "resourceFields" + DynamicSchemaSpecFieldResourceMethods = "resourceMethods" + DynamicSchemaSpecFieldSchemaName = "schemaName" +) + +type DynamicSchemaSpec struct { + CollectionActions map[string]Action `json:"collectionActions,omitempty" yaml:"collectionActions,omitempty"` + CollectionFields map[string]Field `json:"collectionFields,omitempty" yaml:"collectionFields,omitempty"` + CollectionFilters map[string]Filter `json:"collectionFilters,omitempty" yaml:"collectionFilters,omitempty"` + CollectionMethods []string `json:"collectionMethods,omitempty" yaml:"collectionMethods,omitempty"` + DynamicSchemaVersion string `json:"dynamicSchemaVersion,omitempty" yaml:"dynamicSchemaVersion,omitempty"` + Embed bool `json:"embed,omitempty" yaml:"embed,omitempty"` + EmbedType string `json:"embedType,omitempty" yaml:"embedType,omitempty"` + IncludeableLinks []string `json:"includeableLinks,omitempty" yaml:"includeableLinks,omitempty"` + PluralName string `json:"pluralName,omitempty" yaml:"pluralName,omitempty"` + ResourceActions map[string]Action `json:"resourceActions,omitempty" yaml:"resourceActions,omitempty"` + ResourceFields map[string]Field `json:"resourceFields,omitempty" yaml:"resourceFields,omitempty"` + ResourceMethods []string `json:"resourceMethods,omitempty" yaml:"resourceMethods,omitempty"` + SchemaName string `json:"schemaName,omitempty" yaml:"schemaName,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dynamic_schema_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dynamic_schema_status.go new file mode 100644 index 000000000..014783e64 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_dynamic_schema_status.go @@ -0,0 +1,10 @@ +package client + +const ( + DynamicSchemaStatusType = "dynamicSchemaStatus" + DynamicSchemaStatusFieldFake = "fake" +) + +type DynamicSchemaStatus struct { + Fake string `json:"fake,omitempty" yaml:"fake,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ecr_credential_plugin.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ecr_credential_plugin.go new file mode 100644 index 000000000..f4e0ae480 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ecr_credential_plugin.go @@ -0,0 +1,14 @@ +package client + +const ( + ECRCredentialPluginType = "ecrCredentialPlugin" + ECRCredentialPluginFieldAwsAccessKeyID = "awsAccessKeyId" + ECRCredentialPluginFieldAwsSecretAccessKey = "awsSecretAccessKey" + ECRCredentialPluginFieldAwsSessionToken = "awsAccessToken" +) + +type ECRCredentialPlugin struct { + AwsAccessKeyID string `json:"awsAccessKeyId,omitempty" yaml:"awsAccessKeyId,omitempty"` + AwsSecretAccessKey string `json:"awsSecretAccessKey,omitempty" yaml:"awsSecretAccessKey,omitempty"` + AwsSessionToken string `json:"awsAccessToken,omitempty" yaml:"awsAccessToken,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_eks_cluster_config_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_eks_cluster_config_spec.go new file mode 100644 index 000000000..b4471101b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_eks_cluster_config_spec.go @@ -0,0 +1,42 @@ +package client + +const ( + EKSClusterConfigSpecType = "eksClusterConfigSpec" + EKSClusterConfigSpecFieldAmazonCredentialSecret = "amazonCredentialSecret" + EKSClusterConfigSpecFieldDisplayName = "displayName" + EKSClusterConfigSpecFieldEBSCSIDriver = "ebsCSIDriver" + EKSClusterConfigSpecFieldImported = "imported" + EKSClusterConfigSpecFieldKmsKey = "kmsKey" + EKSClusterConfigSpecFieldKubernetesVersion = "kubernetesVersion" + EKSClusterConfigSpecFieldLoggingTypes = "loggingTypes" + EKSClusterConfigSpecFieldNodeGroups = "nodeGroups" + EKSClusterConfigSpecFieldPrivateAccess = "privateAccess" + EKSClusterConfigSpecFieldPublicAccess = "publicAccess" + EKSClusterConfigSpecFieldPublicAccessSources = "publicAccessSources" + EKSClusterConfigSpecFieldRegion = "region" + EKSClusterConfigSpecFieldSecretsEncryption = "secretsEncryption" + EKSClusterConfigSpecFieldSecurityGroups = "securityGroups" + EKSClusterConfigSpecFieldServiceRole = "serviceRole" + EKSClusterConfigSpecFieldSubnets = "subnets" + EKSClusterConfigSpecFieldTags = "tags" +) + +type EKSClusterConfigSpec struct { + AmazonCredentialSecret string `json:"amazonCredentialSecret,omitempty" yaml:"amazonCredentialSecret,omitempty"` + DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` + EBSCSIDriver *bool `json:"ebsCSIDriver,omitempty" yaml:"ebsCSIDriver,omitempty"` + Imported bool `json:"imported,omitempty" yaml:"imported,omitempty"` + KmsKey *string `json:"kmsKey,omitempty" yaml:"kmsKey,omitempty"` + KubernetesVersion *string `json:"kubernetesVersion,omitempty" yaml:"kubernetesVersion,omitempty"` + LoggingTypes []string `json:"loggingTypes,omitempty" yaml:"loggingTypes,omitempty"` + NodeGroups []NodeGroup `json:"nodeGroups,omitempty" yaml:"nodeGroups,omitempty"` + PrivateAccess *bool `json:"privateAccess,omitempty" yaml:"privateAccess,omitempty"` + PublicAccess *bool `json:"publicAccess,omitempty" yaml:"publicAccess,omitempty"` + PublicAccessSources []string `json:"publicAccessSources,omitempty" yaml:"publicAccessSources,omitempty"` + Region string `json:"region,omitempty" yaml:"region,omitempty"` + SecretsEncryption *bool `json:"secretsEncryption,omitempty" yaml:"secretsEncryption,omitempty"` + SecurityGroups []string `json:"securityGroups,omitempty" yaml:"securityGroups,omitempty"` + ServiceRole *string `json:"serviceRole,omitempty" yaml:"serviceRole,omitempty"` + Subnets []string `json:"subnets,omitempty" yaml:"subnets,omitempty"` + Tags map[string]string `json:"tags,omitempty" yaml:"tags,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_eks_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_eks_status.go new file mode 100644 index 000000000..54127aac0 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_eks_status.go @@ -0,0 +1,24 @@ +package client + +const ( + EKSStatusType = "eksStatus" + EKSStatusFieldGeneratedNodeRole = "generatedNodeRole" + EKSStatusFieldManagedLaunchTemplateID = "managedLaunchTemplateID" + EKSStatusFieldManagedLaunchTemplateVersions = "managedLaunchTemplateVersions" + EKSStatusFieldPrivateRequiresTunnel = "privateRequiresTunnel" + EKSStatusFieldSecurityGroups = "securityGroups" + EKSStatusFieldSubnets = "subnets" + EKSStatusFieldUpstreamSpec = "upstreamSpec" + EKSStatusFieldVirtualNetwork = "virtualNetwork" +) + +type EKSStatus struct { + GeneratedNodeRole string `json:"generatedNodeRole,omitempty" yaml:"generatedNodeRole,omitempty"` + ManagedLaunchTemplateID string `json:"managedLaunchTemplateID,omitempty" yaml:"managedLaunchTemplateID,omitempty"` + ManagedLaunchTemplateVersions map[string]string `json:"managedLaunchTemplateVersions,omitempty" yaml:"managedLaunchTemplateVersions,omitempty"` + PrivateRequiresTunnel *bool `json:"privateRequiresTunnel,omitempty" yaml:"privateRequiresTunnel,omitempty"` + SecurityGroups []string `json:"securityGroups,omitempty" yaml:"securityGroups,omitempty"` + Subnets []string `json:"subnets,omitempty" yaml:"subnets,omitempty"` + UpstreamSpec *EKSClusterConfigSpec `json:"upstreamSpec,omitempty" yaml:"upstreamSpec,omitempty"` + VirtualNetwork string `json:"virtualNetwork,omitempty" yaml:"virtualNetwork,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_empty_dir_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_empty_dir_volume_source.go new file mode 100644 index 000000000..c4856f332 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_empty_dir_volume_source.go @@ -0,0 +1,12 @@ +package client + +const ( + EmptyDirVolumeSourceType = "emptyDirVolumeSource" + EmptyDirVolumeSourceFieldMedium = "medium" + EmptyDirVolumeSourceFieldSizeLimit = "sizeLimit" +) + +type EmptyDirVolumeSource struct { + Medium string `json:"medium,omitempty" yaml:"medium,omitempty"` + SizeLimit string `json:"sizeLimit,omitempty" yaml:"sizeLimit,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_encryption_configuration.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_encryption_configuration.go new file mode 100644 index 000000000..8cc644dd2 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_encryption_configuration.go @@ -0,0 +1,14 @@ +package client + +const ( + EncryptionConfigurationType = "encryptionConfiguration" + EncryptionConfigurationFieldAPIVersion = "apiVersion" + EncryptionConfigurationFieldKind = "kind" + EncryptionConfigurationFieldResources = "resources" +) + +type EncryptionConfiguration struct { + APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + Resources []ResourceConfiguration `json:"resources,omitempty" yaml:"resources,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_env_var.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_env_var.go new file mode 100644 index 000000000..35ccda3f8 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_env_var.go @@ -0,0 +1,14 @@ +package client + +const ( + EnvVarType = "envVar" + EnvVarFieldName = "name" + EnvVarFieldValue = "value" + EnvVarFieldValueFrom = "valueFrom" +) + +type EnvVar struct { + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Value string `json:"value,omitempty" yaml:"value,omitempty"` + ValueFrom *EnvVarSource `json:"valueFrom,omitempty" yaml:"valueFrom,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_env_var_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_env_var_source.go new file mode 100644 index 000000000..390a033e5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_env_var_source.go @@ -0,0 +1,16 @@ +package client + +const ( + EnvVarSourceType = "envVarSource" + EnvVarSourceFieldConfigMapKeyRef = "configMapKeyRef" + EnvVarSourceFieldFieldRef = "fieldRef" + EnvVarSourceFieldResourceFieldRef = "resourceFieldRef" + EnvVarSourceFieldSecretKeyRef = "secretKeyRef" +) + +type EnvVarSource struct { + ConfigMapKeyRef *ConfigMapKeySelector `json:"configMapKeyRef,omitempty" yaml:"configMapKeyRef,omitempty"` + FieldRef *ObjectFieldSelector `json:"fieldRef,omitempty" yaml:"fieldRef,omitempty"` + ResourceFieldRef *ResourceFieldSelector `json:"resourceFieldRef,omitempty" yaml:"resourceFieldRef,omitempty"` + SecretKeyRef *SecretKeySelector `json:"secretKeyRef,omitempty" yaml:"secretKeyRef,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ephemeral_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ephemeral_volume_source.go new file mode 100644 index 000000000..fc7f09e54 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ephemeral_volume_source.go @@ -0,0 +1,10 @@ +package client + +const ( + EphemeralVolumeSourceType = "ephemeralVolumeSource" + EphemeralVolumeSourceFieldVolumeClaimTemplate = "volumeClaimTemplate" +) + +type EphemeralVolumeSource struct { + VolumeClaimTemplate *PersistentVolumeClaimTemplate `json:"volumeClaimTemplate,omitempty" yaml:"volumeClaimTemplate,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup.go new file mode 100644 index 000000000..74cdd40c3 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup.go @@ -0,0 +1,136 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + EtcdBackupType = "etcdBackup" + EtcdBackupFieldAnnotations = "annotations" + EtcdBackupFieldBackupConfig = "backupConfig" + EtcdBackupFieldClusterID = "clusterId" + EtcdBackupFieldCreated = "created" + EtcdBackupFieldCreatorID = "creatorId" + EtcdBackupFieldFilename = "filename" + EtcdBackupFieldLabels = "labels" + EtcdBackupFieldManual = "manual" + EtcdBackupFieldName = "name" + EtcdBackupFieldNamespaceId = "namespaceId" + EtcdBackupFieldOwnerReferences = "ownerReferences" + EtcdBackupFieldRemoved = "removed" + EtcdBackupFieldState = "state" + EtcdBackupFieldStatus = "status" + EtcdBackupFieldTransitioning = "transitioning" + EtcdBackupFieldTransitioningMessage = "transitioningMessage" + EtcdBackupFieldUUID = "uuid" +) + +type EtcdBackup struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + BackupConfig *BackupConfig `json:"backupConfig,omitempty" yaml:"backupConfig,omitempty"` + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Filename string `json:"filename,omitempty" yaml:"filename,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Manual bool `json:"manual,omitempty" yaml:"manual,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Status *EtcdBackupStatus `json:"status,omitempty" yaml:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type EtcdBackupCollection struct { + types.Collection + Data []EtcdBackup `json:"data,omitempty"` + client *EtcdBackupClient +} + +type EtcdBackupClient struct { + apiClient *Client +} + +type EtcdBackupOperations interface { + List(opts *types.ListOpts) (*EtcdBackupCollection, error) + ListAll(opts *types.ListOpts) (*EtcdBackupCollection, error) + Create(opts *EtcdBackup) (*EtcdBackup, error) + Update(existing *EtcdBackup, updates interface{}) (*EtcdBackup, error) + Replace(existing *EtcdBackup) (*EtcdBackup, error) + ByID(id string) (*EtcdBackup, error) + Delete(container *EtcdBackup) error +} + +func newEtcdBackupClient(apiClient *Client) *EtcdBackupClient { + return &EtcdBackupClient{ + apiClient: apiClient, + } +} + +func (c *EtcdBackupClient) Create(container *EtcdBackup) (*EtcdBackup, error) { + resp := &EtcdBackup{} + err := c.apiClient.Ops.DoCreate(EtcdBackupType, container, resp) + return resp, err +} + +func (c *EtcdBackupClient) Update(existing *EtcdBackup, updates interface{}) (*EtcdBackup, error) { + resp := &EtcdBackup{} + err := c.apiClient.Ops.DoUpdate(EtcdBackupType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *EtcdBackupClient) Replace(obj *EtcdBackup) (*EtcdBackup, error) { + resp := &EtcdBackup{} + err := c.apiClient.Ops.DoReplace(EtcdBackupType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *EtcdBackupClient) List(opts *types.ListOpts) (*EtcdBackupCollection, error) { + resp := &EtcdBackupCollection{} + err := c.apiClient.Ops.DoList(EtcdBackupType, opts, resp) + resp.client = c + return resp, err +} + +func (c *EtcdBackupClient) ListAll(opts *types.ListOpts) (*EtcdBackupCollection, error) { + resp := &EtcdBackupCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *EtcdBackupCollection) Next() (*EtcdBackupCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &EtcdBackupCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *EtcdBackupClient) ByID(id string) (*EtcdBackup, error) { + resp := &EtcdBackup{} + err := c.apiClient.Ops.DoByID(EtcdBackupType, id, resp) + return resp, err +} + +func (c *EtcdBackupClient) Delete(container *EtcdBackup) error { + return c.apiClient.Ops.DoResourceDelete(EtcdBackupType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup_condition.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup_condition.go new file mode 100644 index 000000000..bfae75301 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup_condition.go @@ -0,0 +1,20 @@ +package client + +const ( + EtcdBackupConditionType = "etcdBackupCondition" + EtcdBackupConditionFieldLastTransitionTime = "lastTransitionTime" + EtcdBackupConditionFieldLastUpdateTime = "lastUpdateTime" + EtcdBackupConditionFieldMessage = "message" + EtcdBackupConditionFieldReason = "reason" + EtcdBackupConditionFieldStatus = "status" + EtcdBackupConditionFieldType = "type" +) + +type EtcdBackupCondition struct { + LastTransitionTime string `json:"lastTransitionTime,omitempty" yaml:"lastTransitionTime,omitempty"` + LastUpdateTime string `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` + Reason string `json:"reason,omitempty" yaml:"reason,omitempty"` + Status string `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup_spec.go new file mode 100644 index 000000000..f78b22766 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup_spec.go @@ -0,0 +1,16 @@ +package client + +const ( + EtcdBackupSpecType = "etcdBackupSpec" + EtcdBackupSpecFieldBackupConfig = "backupConfig" + EtcdBackupSpecFieldClusterID = "clusterId" + EtcdBackupSpecFieldFilename = "filename" + EtcdBackupSpecFieldManual = "manual" +) + +type EtcdBackupSpec struct { + BackupConfig *BackupConfig `json:"backupConfig,omitempty" yaml:"backupConfig,omitempty"` + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + Filename string `json:"filename,omitempty" yaml:"filename,omitempty"` + Manual bool `json:"manual,omitempty" yaml:"manual,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup_status.go new file mode 100644 index 000000000..57b48ef72 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_backup_status.go @@ -0,0 +1,14 @@ +package client + +const ( + EtcdBackupStatusType = "etcdBackupStatus" + EtcdBackupStatusFieldClusterObject = "clusterObject" + EtcdBackupStatusFieldConditions = "conditions" + EtcdBackupStatusFieldKubernetesVersion = "kubernetesVersion" +) + +type EtcdBackupStatus struct { + ClusterObject string `json:"clusterObject,omitempty" yaml:"clusterObject,omitempty"` + Conditions []EtcdBackupCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + KubernetesVersion string `json:"kubernetesVersion,omitempty" yaml:"kubernetesVersion,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_service.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_service.go new file mode 100644 index 000000000..6c1749921 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_etcd_service.go @@ -0,0 +1,48 @@ +package client + +const ( + ETCDServiceType = "etcdService" + ETCDServiceFieldBackupConfig = "backupConfig" + ETCDServiceFieldCACert = "caCert" + ETCDServiceFieldCert = "cert" + ETCDServiceFieldCreation = "creation" + ETCDServiceFieldExternalURLs = "externalUrls" + ETCDServiceFieldExtraArgs = "extraArgs" + ETCDServiceFieldExtraArgsArray = "extraArgsArray" + ETCDServiceFieldExtraBinds = "extraBinds" + ETCDServiceFieldExtraEnv = "extraEnv" + ETCDServiceFieldGID = "gid" + ETCDServiceFieldImage = "image" + ETCDServiceFieldKey = "key" + ETCDServiceFieldPath = "path" + ETCDServiceFieldRetention = "retention" + ETCDServiceFieldSnapshot = "snapshot" + ETCDServiceFieldUID = "uid" + ETCDServiceFieldWindowsExtraArgs = "winExtraArgs" + ETCDServiceFieldWindowsExtraArgsArray = "winExtraArgsArray" + ETCDServiceFieldWindowsExtraBinds = "winExtraBinds" + ETCDServiceFieldWindowsExtraEnv = "winExtraEnv" +) + +type ETCDService struct { + BackupConfig *BackupConfig `json:"backupConfig,omitempty" yaml:"backupConfig,omitempty"` + CACert string `json:"caCert,omitempty" yaml:"caCert,omitempty"` + Cert string `json:"cert,omitempty" yaml:"cert,omitempty"` + Creation string `json:"creation,omitempty" yaml:"creation,omitempty"` + ExternalURLs []string `json:"externalUrls,omitempty" yaml:"externalUrls,omitempty"` + ExtraArgs map[string]string `json:"extraArgs,omitempty" yaml:"extraArgs,omitempty"` + ExtraArgsArray map[string][]string `json:"extraArgsArray,omitempty" yaml:"extraArgsArray,omitempty"` + ExtraBinds []string `json:"extraBinds,omitempty" yaml:"extraBinds,omitempty"` + ExtraEnv []string `json:"extraEnv,omitempty" yaml:"extraEnv,omitempty"` + GID int64 `json:"gid,omitempty" yaml:"gid,omitempty"` + Image string `json:"image,omitempty" yaml:"image,omitempty"` + Key string `json:"key,omitempty" yaml:"key,omitempty"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` + Retention string `json:"retention,omitempty" yaml:"retention,omitempty"` + Snapshot *bool `json:"snapshot,omitempty" yaml:"snapshot,omitempty"` + UID int64 `json:"uid,omitempty" yaml:"uid,omitempty"` + WindowsExtraArgs map[string]string `json:"winExtraArgs,omitempty" yaml:"winExtraArgs,omitempty"` + WindowsExtraArgsArray map[string][]string `json:"winExtraArgsArray,omitempty" yaml:"winExtraArgsArray,omitempty"` + WindowsExtraBinds []string `json:"winExtraBinds,omitempty" yaml:"winExtraBinds,omitempty"` + WindowsExtraEnv []string `json:"winExtraEnv,omitempty" yaml:"winExtraEnv,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_event_rate_limit.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_event_rate_limit.go new file mode 100644 index 000000000..6ba3b86d1 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_event_rate_limit.go @@ -0,0 +1,12 @@ +package client + +const ( + EventRateLimitType = "eventRateLimit" + EventRateLimitFieldConfiguration = "configuration" + EventRateLimitFieldEnabled = "enabled" +) + +type EventRateLimit struct { + Configuration map[string]interface{} `json:"configuration,omitempty" yaml:"configuration,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_export_output.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_export_output.go new file mode 100644 index 000000000..cf2559bc9 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_export_output.go @@ -0,0 +1,10 @@ +package client + +const ( + ExportOutputType = "exportOutput" + ExportOutputFieldYAMLOutput = "yamlOutput" +) + +type ExportOutput struct { + YAMLOutput string `json:"yamlOutput,omitempty" yaml:"yamlOutput,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_extra_env.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_extra_env.go new file mode 100644 index 000000000..96a3ece2c --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_extra_env.go @@ -0,0 +1,14 @@ +package client + +const ( + ExtraEnvType = "extraEnv" + ExtraEnvFieldName = "name" + ExtraEnvFieldValue = "value" + ExtraEnvFieldValueFrom = "valueFrom" +) + +type ExtraEnv struct { + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Value string `json:"value,omitempty" yaml:"value,omitempty"` + ValueFrom *EnvVarSource `json:"valueFrom,omitempty" yaml:"valueFrom,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_extra_volume.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_extra_volume.go new file mode 100644 index 000000000..cd629ef5d --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_extra_volume.go @@ -0,0 +1,68 @@ +package client + +const ( + ExtraVolumeType = "extraVolume" + ExtraVolumeFieldAWSElasticBlockStore = "awsElasticBlockStore" + ExtraVolumeFieldAzureDisk = "azureDisk" + ExtraVolumeFieldAzureFile = "azureFile" + ExtraVolumeFieldCSI = "csi" + ExtraVolumeFieldCephFS = "cephfs" + ExtraVolumeFieldCinder = "cinder" + ExtraVolumeFieldConfigMap = "configMap" + ExtraVolumeFieldDownwardAPI = "downwardAPI" + ExtraVolumeFieldEmptyDir = "emptyDir" + ExtraVolumeFieldEphemeral = "ephemeral" + ExtraVolumeFieldFC = "fc" + ExtraVolumeFieldFlexVolume = "flexVolume" + ExtraVolumeFieldFlocker = "flocker" + ExtraVolumeFieldGCEPersistentDisk = "gcePersistentDisk" + ExtraVolumeFieldGitRepo = "gitRepo" + ExtraVolumeFieldGlusterfs = "glusterfs" + ExtraVolumeFieldHostPath = "hostPath" + ExtraVolumeFieldISCSI = "iscsi" + ExtraVolumeFieldNFS = "nfs" + ExtraVolumeFieldName = "name" + ExtraVolumeFieldPersistentVolumeClaim = "persistentVolumeClaim" + ExtraVolumeFieldPhotonPersistentDisk = "photonPersistentDisk" + ExtraVolumeFieldPortworxVolume = "portworxVolume" + ExtraVolumeFieldProjected = "projected" + ExtraVolumeFieldQuobyte = "quobyte" + ExtraVolumeFieldRBD = "rbd" + ExtraVolumeFieldScaleIO = "scaleIO" + ExtraVolumeFieldSecret = "secret" + ExtraVolumeFieldStorageOS = "storageos" + ExtraVolumeFieldVsphereVolume = "vsphereVolume" +) + +type ExtraVolume struct { + AWSElasticBlockStore *AWSElasticBlockStoreVolumeSource `json:"awsElasticBlockStore,omitempty" yaml:"awsElasticBlockStore,omitempty"` + AzureDisk *AzureDiskVolumeSource `json:"azureDisk,omitempty" yaml:"azureDisk,omitempty"` + AzureFile *AzureFileVolumeSource `json:"azureFile,omitempty" yaml:"azureFile,omitempty"` + CSI *CSIVolumeSource `json:"csi,omitempty" yaml:"csi,omitempty"` + CephFS *CephFSVolumeSource `json:"cephfs,omitempty" yaml:"cephfs,omitempty"` + Cinder *CinderVolumeSource `json:"cinder,omitempty" yaml:"cinder,omitempty"` + ConfigMap *ConfigMapVolumeSource `json:"configMap,omitempty" yaml:"configMap,omitempty"` + DownwardAPI *DownwardAPIVolumeSource `json:"downwardAPI,omitempty" yaml:"downwardAPI,omitempty"` + EmptyDir *EmptyDirVolumeSource `json:"emptyDir,omitempty" yaml:"emptyDir,omitempty"` + Ephemeral *EphemeralVolumeSource `json:"ephemeral,omitempty" yaml:"ephemeral,omitempty"` + FC *FCVolumeSource `json:"fc,omitempty" yaml:"fc,omitempty"` + FlexVolume *FlexVolumeSource `json:"flexVolume,omitempty" yaml:"flexVolume,omitempty"` + Flocker *FlockerVolumeSource `json:"flocker,omitempty" yaml:"flocker,omitempty"` + GCEPersistentDisk *GCEPersistentDiskVolumeSource `json:"gcePersistentDisk,omitempty" yaml:"gcePersistentDisk,omitempty"` + GitRepo *GitRepoVolumeSource `json:"gitRepo,omitempty" yaml:"gitRepo,omitempty"` + Glusterfs *GlusterfsVolumeSource `json:"glusterfs,omitempty" yaml:"glusterfs,omitempty"` + HostPath *HostPathVolumeSource `json:"hostPath,omitempty" yaml:"hostPath,omitempty"` + ISCSI *ISCSIVolumeSource `json:"iscsi,omitempty" yaml:"iscsi,omitempty"` + NFS *NFSVolumeSource `json:"nfs,omitempty" yaml:"nfs,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + PersistentVolumeClaim *PersistentVolumeClaimVolumeSource `json:"persistentVolumeClaim,omitempty" yaml:"persistentVolumeClaim,omitempty"` + PhotonPersistentDisk *PhotonPersistentDiskVolumeSource `json:"photonPersistentDisk,omitempty" yaml:"photonPersistentDisk,omitempty"` + PortworxVolume *PortworxVolumeSource `json:"portworxVolume,omitempty" yaml:"portworxVolume,omitempty"` + Projected *ProjectedVolumeSource `json:"projected,omitempty" yaml:"projected,omitempty"` + Quobyte *QuobyteVolumeSource `json:"quobyte,omitempty" yaml:"quobyte,omitempty"` + RBD *RBDVolumeSource `json:"rbd,omitempty" yaml:"rbd,omitempty"` + ScaleIO *ScaleIOVolumeSource `json:"scaleIO,omitempty" yaml:"scaleIO,omitempty"` + Secret *SecretVolumeSource `json:"secret,omitempty" yaml:"secret,omitempty"` + StorageOS *StorageOSVolumeSource `json:"storageos,omitempty" yaml:"storageos,omitempty"` + VsphereVolume *VsphereVirtualDiskVolumeSource `json:"vsphereVolume,omitempty" yaml:"vsphereVolume,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_extra_volume_mount.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_extra_volume_mount.go new file mode 100644 index 000000000..bbfbaeaaa --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_extra_volume_mount.go @@ -0,0 +1,22 @@ +package client + +const ( + ExtraVolumeMountType = "extraVolumeMount" + ExtraVolumeMountFieldMountPath = "mountPath" + ExtraVolumeMountFieldMountPropagation = "mountPropagation" + ExtraVolumeMountFieldName = "name" + ExtraVolumeMountFieldReadOnly = "readOnly" + ExtraVolumeMountFieldRecursiveReadOnly = "recursiveReadOnly" + ExtraVolumeMountFieldSubPath = "subPath" + ExtraVolumeMountFieldSubPathExpr = "subPathExpr" +) + +type ExtraVolumeMount struct { + MountPath string `json:"mountPath,omitempty" yaml:"mountPath,omitempty"` + MountPropagation string `json:"mountPropagation,omitempty" yaml:"mountPropagation,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + RecursiveReadOnly string `json:"recursiveReadOnly,omitempty" yaml:"recursiveReadOnly,omitempty"` + SubPath string `json:"subPath,omitempty" yaml:"subPath,omitempty"` + SubPathExpr string `json:"subPathExpr,omitempty" yaml:"subPathExpr,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fc_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fc_volume_source.go new file mode 100644 index 000000000..ebc0b63ff --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fc_volume_source.go @@ -0,0 +1,18 @@ +package client + +const ( + FCVolumeSourceType = "fcVolumeSource" + FCVolumeSourceFieldFSType = "fsType" + FCVolumeSourceFieldLun = "lun" + FCVolumeSourceFieldReadOnly = "readOnly" + FCVolumeSourceFieldTargetWWNs = "targetWWNs" + FCVolumeSourceFieldWWIDs = "wwids" +) + +type FCVolumeSource struct { + FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"` + Lun *int64 `json:"lun,omitempty" yaml:"lun,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + TargetWWNs []string `json:"targetWWNs,omitempty" yaml:"targetWWNs,omitempty"` + WWIDs []string `json:"wwids,omitempty" yaml:"wwids,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_feature.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_feature.go new file mode 100644 index 000000000..a8d17862e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_feature.go @@ -0,0 +1,128 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + FeatureType = "feature" + FeatureFieldAnnotations = "annotations" + FeatureFieldCreated = "created" + FeatureFieldCreatorID = "creatorId" + FeatureFieldLabels = "labels" + FeatureFieldName = "name" + FeatureFieldOwnerReferences = "ownerReferences" + FeatureFieldRemoved = "removed" + FeatureFieldState = "state" + FeatureFieldStatus = "status" + FeatureFieldTransitioning = "transitioning" + FeatureFieldTransitioningMessage = "transitioningMessage" + FeatureFieldUUID = "uuid" + FeatureFieldValue = "value" +) + +type Feature struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Status *FeatureStatus `json:"status,omitempty" yaml:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + Value *bool `json:"value,omitempty" yaml:"value,omitempty"` +} + +type FeatureCollection struct { + types.Collection + Data []Feature `json:"data,omitempty"` + client *FeatureClient +} + +type FeatureClient struct { + apiClient *Client +} + +type FeatureOperations interface { + List(opts *types.ListOpts) (*FeatureCollection, error) + ListAll(opts *types.ListOpts) (*FeatureCollection, error) + Create(opts *Feature) (*Feature, error) + Update(existing *Feature, updates interface{}) (*Feature, error) + Replace(existing *Feature) (*Feature, error) + ByID(id string) (*Feature, error) + Delete(container *Feature) error +} + +func newFeatureClient(apiClient *Client) *FeatureClient { + return &FeatureClient{ + apiClient: apiClient, + } +} + +func (c *FeatureClient) Create(container *Feature) (*Feature, error) { + resp := &Feature{} + err := c.apiClient.Ops.DoCreate(FeatureType, container, resp) + return resp, err +} + +func (c *FeatureClient) Update(existing *Feature, updates interface{}) (*Feature, error) { + resp := &Feature{} + err := c.apiClient.Ops.DoUpdate(FeatureType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *FeatureClient) Replace(obj *Feature) (*Feature, error) { + resp := &Feature{} + err := c.apiClient.Ops.DoReplace(FeatureType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *FeatureClient) List(opts *types.ListOpts) (*FeatureCollection, error) { + resp := &FeatureCollection{} + err := c.apiClient.Ops.DoList(FeatureType, opts, resp) + resp.client = c + return resp, err +} + +func (c *FeatureClient) ListAll(opts *types.ListOpts) (*FeatureCollection, error) { + resp := &FeatureCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *FeatureCollection) Next() (*FeatureCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &FeatureCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *FeatureClient) ByID(id string) (*Feature, error) { + resp := &Feature{} + err := c.apiClient.Ops.DoByID(FeatureType, id, resp) + return resp, err +} + +func (c *FeatureClient) Delete(container *Feature) error { + return c.apiClient.Ops.DoResourceDelete(FeatureType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_feature_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_feature_spec.go new file mode 100644 index 000000000..95c50292c --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_feature_spec.go @@ -0,0 +1,10 @@ +package client + +const ( + FeatureSpecType = "featureSpec" + FeatureSpecFieldValue = "value" +) + +type FeatureSpec struct { + Value *bool `json:"value,omitempty" yaml:"value,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_feature_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_feature_status.go new file mode 100644 index 000000000..be4799a9a --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_feature_status.go @@ -0,0 +1,16 @@ +package client + +const ( + FeatureStatusType = "featureStatus" + FeatureStatusFieldDefault = "default" + FeatureStatusFieldDescription = "description" + FeatureStatusFieldDynamic = "dynamic" + FeatureStatusFieldLockedValue = "lockedValue" +) + +type FeatureStatus struct { + Default bool `json:"default,omitempty" yaml:"default,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + Dynamic bool `json:"dynamic,omitempty" yaml:"dynamic,omitempty"` + LockedValue *bool `json:"lockedValue,omitempty" yaml:"lockedValue,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_field.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_field.go new file mode 100644 index 000000000..9f13a3ac5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_field.go @@ -0,0 +1,40 @@ +package client + +const ( + FieldType = "field" + FieldFieldCreate = "create" + FieldFieldDefault = "default" + FieldFieldDescription = "description" + FieldFieldDynamicField = "dynamicField" + FieldFieldInvalidChars = "invalidChars" + FieldFieldMax = "max" + FieldFieldMaxLength = "maxLength" + FieldFieldMin = "min" + FieldFieldMinLength = "minLength" + FieldFieldNullable = "nullable" + FieldFieldOptions = "options" + FieldFieldRequired = "required" + FieldFieldType = "type" + FieldFieldUnique = "unique" + FieldFieldUpdate = "update" + FieldFieldValidChars = "validChars" +) + +type Field struct { + Create bool `json:"create,omitempty" yaml:"create,omitempty"` + Default *Values `json:"default,omitempty" yaml:"default,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + DynamicField bool `json:"dynamicField,omitempty" yaml:"dynamicField,omitempty"` + InvalidChars string `json:"invalidChars,omitempty" yaml:"invalidChars,omitempty"` + Max int64 `json:"max,omitempty" yaml:"max,omitempty"` + MaxLength int64 `json:"maxLength,omitempty" yaml:"maxLength,omitempty"` + Min int64 `json:"min,omitempty" yaml:"min,omitempty"` + MinLength int64 `json:"minLength,omitempty" yaml:"minLength,omitempty"` + Nullable bool `json:"nullable,omitempty" yaml:"nullable,omitempty"` + Options []string `json:"options,omitempty" yaml:"options,omitempty"` + Required bool `json:"required,omitempty" yaml:"required,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + Unique bool `json:"unique,omitempty" yaml:"unique,omitempty"` + Update bool `json:"update,omitempty" yaml:"update,omitempty"` + ValidChars string `json:"validChars,omitempty" yaml:"validChars,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_file.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_file.go new file mode 100644 index 000000000..18d80cc77 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_file.go @@ -0,0 +1,12 @@ +package client + +const ( + FileType = "file" + FileFieldContents = "contents" + FileFieldName = "name" +) + +type File struct { + Contents string `json:"contents,omitempty" yaml:"contents,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_filter.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_filter.go new file mode 100644 index 000000000..8bb3f7142 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_filter.go @@ -0,0 +1,10 @@ +package client + +const ( + FilterType = "filter" + FilterFieldModifiers = "modifiers" +) + +type Filter struct { + Modifiers []string `json:"modifiers,omitempty" yaml:"modifiers,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_flannel_network_provider.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_flannel_network_provider.go new file mode 100644 index 000000000..088fe6bb3 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_flannel_network_provider.go @@ -0,0 +1,10 @@ +package client + +const ( + FlannelNetworkProviderType = "flannelNetworkProvider" + FlannelNetworkProviderFieldIface = "iface" +) + +type FlannelNetworkProvider struct { + Iface string `json:"iface,omitempty" yaml:"iface,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fleet_workspace.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fleet_workspace.go new file mode 100644 index 000000000..963b286ca --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fleet_workspace.go @@ -0,0 +1,120 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + FleetWorkspaceType = "fleetWorkspace" + FleetWorkspaceFieldAnnotations = "annotations" + FleetWorkspaceFieldCreated = "created" + FleetWorkspaceFieldCreatorID = "creatorId" + FleetWorkspaceFieldLabels = "labels" + FleetWorkspaceFieldName = "name" + FleetWorkspaceFieldOwnerReferences = "ownerReferences" + FleetWorkspaceFieldRemoved = "removed" + FleetWorkspaceFieldStatus = "status" + FleetWorkspaceFieldUUID = "uuid" +) + +type FleetWorkspace struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Status *FleetWorkspaceStatus `json:"status,omitempty" yaml:"status,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type FleetWorkspaceCollection struct { + types.Collection + Data []FleetWorkspace `json:"data,omitempty"` + client *FleetWorkspaceClient +} + +type FleetWorkspaceClient struct { + apiClient *Client +} + +type FleetWorkspaceOperations interface { + List(opts *types.ListOpts) (*FleetWorkspaceCollection, error) + ListAll(opts *types.ListOpts) (*FleetWorkspaceCollection, error) + Create(opts *FleetWorkspace) (*FleetWorkspace, error) + Update(existing *FleetWorkspace, updates interface{}) (*FleetWorkspace, error) + Replace(existing *FleetWorkspace) (*FleetWorkspace, error) + ByID(id string) (*FleetWorkspace, error) + Delete(container *FleetWorkspace) error +} + +func newFleetWorkspaceClient(apiClient *Client) *FleetWorkspaceClient { + return &FleetWorkspaceClient{ + apiClient: apiClient, + } +} + +func (c *FleetWorkspaceClient) Create(container *FleetWorkspace) (*FleetWorkspace, error) { + resp := &FleetWorkspace{} + err := c.apiClient.Ops.DoCreate(FleetWorkspaceType, container, resp) + return resp, err +} + +func (c *FleetWorkspaceClient) Update(existing *FleetWorkspace, updates interface{}) (*FleetWorkspace, error) { + resp := &FleetWorkspace{} + err := c.apiClient.Ops.DoUpdate(FleetWorkspaceType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *FleetWorkspaceClient) Replace(obj *FleetWorkspace) (*FleetWorkspace, error) { + resp := &FleetWorkspace{} + err := c.apiClient.Ops.DoReplace(FleetWorkspaceType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *FleetWorkspaceClient) List(opts *types.ListOpts) (*FleetWorkspaceCollection, error) { + resp := &FleetWorkspaceCollection{} + err := c.apiClient.Ops.DoList(FleetWorkspaceType, opts, resp) + resp.client = c + return resp, err +} + +func (c *FleetWorkspaceClient) ListAll(opts *types.ListOpts) (*FleetWorkspaceCollection, error) { + resp := &FleetWorkspaceCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *FleetWorkspaceCollection) Next() (*FleetWorkspaceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &FleetWorkspaceCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *FleetWorkspaceClient) ByID(id string) (*FleetWorkspace, error) { + resp := &FleetWorkspace{} + err := c.apiClient.Ops.DoByID(FleetWorkspaceType, id, resp) + return resp, err +} + +func (c *FleetWorkspaceClient) Delete(container *FleetWorkspace) error { + return c.apiClient.Ops.DoResourceDelete(FleetWorkspaceType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fleet_workspace_permission.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fleet_workspace_permission.go new file mode 100644 index 000000000..209f62321 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fleet_workspace_permission.go @@ -0,0 +1,12 @@ +package client + +const ( + FleetWorkspacePermissionType = "fleetWorkspacePermission" + FleetWorkspacePermissionFieldResourceRules = "resourceRules" + FleetWorkspacePermissionFieldWorkspaceVerbs = "workspaceVerbs" +) + +type FleetWorkspacePermission struct { + ResourceRules []PolicyRule `json:"resourceRules,omitempty" yaml:"resourceRules,omitempty"` + WorkspaceVerbs []string `json:"workspaceVerbs,omitempty" yaml:"workspaceVerbs,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fleet_workspace_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fleet_workspace_status.go new file mode 100644 index 000000000..aa5db188f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_fleet_workspace_status.go @@ -0,0 +1,8 @@ +package client + +const ( + FleetWorkspaceStatusType = "fleetWorkspaceStatus" +) + +type FleetWorkspaceStatus struct { +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_flex_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_flex_volume_source.go new file mode 100644 index 000000000..d2e942b92 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_flex_volume_source.go @@ -0,0 +1,18 @@ +package client + +const ( + FlexVolumeSourceType = "flexVolumeSource" + FlexVolumeSourceFieldDriver = "driver" + FlexVolumeSourceFieldFSType = "fsType" + FlexVolumeSourceFieldOptions = "options" + FlexVolumeSourceFieldReadOnly = "readOnly" + FlexVolumeSourceFieldSecretRef = "secretRef" +) + +type FlexVolumeSource struct { + Driver string `json:"driver,omitempty" yaml:"driver,omitempty"` + FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"` + Options map[string]string `json:"options,omitempty" yaml:"options,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + SecretRef *LocalObjectReference `json:"secretRef,omitempty" yaml:"secretRef,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_flocker_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_flocker_volume_source.go new file mode 100644 index 000000000..802b77ff2 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_flocker_volume_source.go @@ -0,0 +1,12 @@ +package client + +const ( + FlockerVolumeSourceType = "flockerVolumeSource" + FlockerVolumeSourceFieldDatasetName = "datasetName" + FlockerVolumeSourceFieldDatasetUUID = "datasetUUID" +) + +type FlockerVolumeSource struct { + DatasetName string `json:"datasetName,omitempty" yaml:"datasetName,omitempty"` + DatasetUUID string `json:"datasetUUID,omitempty" yaml:"datasetUUID,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_free_ipa_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_free_ipa_config.go new file mode 100644 index 000000000..750de6132 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_free_ipa_config.go @@ -0,0 +1,84 @@ +package client + +const ( + FreeIpaConfigType = "freeIpaConfig" + FreeIpaConfigFieldAccessMode = "accessMode" + FreeIpaConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + FreeIpaConfigFieldAnnotations = "annotations" + FreeIpaConfigFieldCertificate = "certificate" + FreeIpaConfigFieldConnectionTimeout = "connectionTimeout" + FreeIpaConfigFieldCreated = "created" + FreeIpaConfigFieldCreatorID = "creatorId" + FreeIpaConfigFieldEnabled = "enabled" + FreeIpaConfigFieldGroupDNAttribute = "groupDNAttribute" + FreeIpaConfigFieldGroupMemberMappingAttribute = "groupMemberMappingAttribute" + FreeIpaConfigFieldGroupMemberUserAttribute = "groupMemberUserAttribute" + FreeIpaConfigFieldGroupNameAttribute = "groupNameAttribute" + FreeIpaConfigFieldGroupObjectClass = "groupObjectClass" + FreeIpaConfigFieldGroupSearchAttribute = "groupSearchAttribute" + FreeIpaConfigFieldGroupSearchBase = "groupSearchBase" + FreeIpaConfigFieldGroupSearchFilter = "groupSearchFilter" + FreeIpaConfigFieldLabels = "labels" + FreeIpaConfigFieldName = "name" + FreeIpaConfigFieldOwnerReferences = "ownerReferences" + FreeIpaConfigFieldPort = "port" + FreeIpaConfigFieldRemoved = "removed" + FreeIpaConfigFieldServers = "servers" + FreeIpaConfigFieldServiceAccountDistinguishedName = "serviceAccountDistinguishedName" + FreeIpaConfigFieldServiceAccountPassword = "serviceAccountPassword" + FreeIpaConfigFieldStartTLS = "starttls" + FreeIpaConfigFieldStatus = "status" + FreeIpaConfigFieldTLS = "tls" + FreeIpaConfigFieldType = "type" + FreeIpaConfigFieldUUID = "uuid" + FreeIpaConfigFieldUserDisabledBitMask = "userDisabledBitMask" + FreeIpaConfigFieldUserEnabledAttribute = "userEnabledAttribute" + FreeIpaConfigFieldUserLoginAttribute = "userLoginAttribute" + FreeIpaConfigFieldUserMemberAttribute = "userMemberAttribute" + FreeIpaConfigFieldUserNameAttribute = "userNameAttribute" + FreeIpaConfigFieldUserObjectClass = "userObjectClass" + FreeIpaConfigFieldUserSearchAttribute = "userSearchAttribute" + FreeIpaConfigFieldUserSearchBase = "userSearchBase" + FreeIpaConfigFieldUserSearchFilter = "userSearchFilter" +) + +type FreeIpaConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Certificate string `json:"certificate,omitempty" yaml:"certificate,omitempty"` + ConnectionTimeout int64 `json:"connectionTimeout,omitempty" yaml:"connectionTimeout,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + GroupDNAttribute string `json:"groupDNAttribute,omitempty" yaml:"groupDNAttribute,omitempty"` + GroupMemberMappingAttribute string `json:"groupMemberMappingAttribute,omitempty" yaml:"groupMemberMappingAttribute,omitempty"` + GroupMemberUserAttribute string `json:"groupMemberUserAttribute,omitempty" yaml:"groupMemberUserAttribute,omitempty"` + GroupNameAttribute string `json:"groupNameAttribute,omitempty" yaml:"groupNameAttribute,omitempty"` + GroupObjectClass string `json:"groupObjectClass,omitempty" yaml:"groupObjectClass,omitempty"` + GroupSearchAttribute string `json:"groupSearchAttribute,omitempty" yaml:"groupSearchAttribute,omitempty"` + GroupSearchBase string `json:"groupSearchBase,omitempty" yaml:"groupSearchBase,omitempty"` + GroupSearchFilter string `json:"groupSearchFilter,omitempty" yaml:"groupSearchFilter,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Servers []string `json:"servers,omitempty" yaml:"servers,omitempty"` + ServiceAccountDistinguishedName string `json:"serviceAccountDistinguishedName,omitempty" yaml:"serviceAccountDistinguishedName,omitempty"` + ServiceAccountPassword string `json:"serviceAccountPassword,omitempty" yaml:"serviceAccountPassword,omitempty"` + StartTLS bool `json:"starttls,omitempty" yaml:"starttls,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + TLS bool `json:"tls,omitempty" yaml:"tls,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserDisabledBitMask int64 `json:"userDisabledBitMask,omitempty" yaml:"userDisabledBitMask,omitempty"` + UserEnabledAttribute string `json:"userEnabledAttribute,omitempty" yaml:"userEnabledAttribute,omitempty"` + UserLoginAttribute string `json:"userLoginAttribute,omitempty" yaml:"userLoginAttribute,omitempty"` + UserMemberAttribute string `json:"userMemberAttribute,omitempty" yaml:"userMemberAttribute,omitempty"` + UserNameAttribute string `json:"userNameAttribute,omitempty" yaml:"userNameAttribute,omitempty"` + UserObjectClass string `json:"userObjectClass,omitempty" yaml:"userObjectClass,omitempty"` + UserSearchAttribute string `json:"userSearchAttribute,omitempty" yaml:"userSearchAttribute,omitempty"` + UserSearchBase string `json:"userSearchBase,omitempty" yaml:"userSearchBase,omitempty"` + UserSearchFilter string `json:"userSearchFilter,omitempty" yaml:"userSearchFilter,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_free_ipa_test_and_apply_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_free_ipa_test_and_apply_input.go new file mode 100644 index 000000000..ad27c5914 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_free_ipa_test_and_apply_input.go @@ -0,0 +1,14 @@ +package client + +const ( + FreeIpaTestAndApplyInputType = "freeIpaTestAndApplyInput" + FreeIpaTestAndApplyInputFieldLdapConfig = "ldapConfig" + FreeIpaTestAndApplyInputFieldPassword = "password" + FreeIpaTestAndApplyInputFieldUsername = "username" +) + +type FreeIpaTestAndApplyInput struct { + LdapConfig *LdapConfig `json:"ldapConfig,omitempty" yaml:"ldapConfig,omitempty"` + Password string `json:"password,omitempty" yaml:"password,omitempty"` + Username string `json:"username,omitempty" yaml:"username,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gce_persistent_disk_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gce_persistent_disk_volume_source.go new file mode 100644 index 000000000..726a44839 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gce_persistent_disk_volume_source.go @@ -0,0 +1,16 @@ +package client + +const ( + GCEPersistentDiskVolumeSourceType = "gcePersistentDiskVolumeSource" + GCEPersistentDiskVolumeSourceFieldFSType = "fsType" + GCEPersistentDiskVolumeSourceFieldPDName = "pdName" + GCEPersistentDiskVolumeSourceFieldPartition = "partition" + GCEPersistentDiskVolumeSourceFieldReadOnly = "readOnly" +) + +type GCEPersistentDiskVolumeSource struct { + FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"` + PDName string `json:"pdName,omitempty" yaml:"pdName,omitempty"` + Partition int64 `json:"partition,omitempty" yaml:"partition,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generate_kube_config_output.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generate_kube_config_output.go new file mode 100644 index 000000000..2603f41c7 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generate_kube_config_output.go @@ -0,0 +1,10 @@ +package client + +const ( + GenerateKubeConfigOutputType = "generateKubeConfigOutput" + GenerateKubeConfigOutputFieldConfig = "config" +) + +type GenerateKubeConfigOutput struct { + Config string `json:"config,omitempty" yaml:"config,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generic_oidcapply_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generic_oidcapply_input.go new file mode 100644 index 000000000..5bc8c60f5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generic_oidcapply_input.go @@ -0,0 +1,14 @@ +package client + +const ( + GenericOIDCApplyInputType = "genericOIDCApplyInput" + GenericOIDCApplyInputFieldCode = "code" + GenericOIDCApplyInputFieldEnabled = "enabled" + GenericOIDCApplyInputFieldOIDCConfig = "oidcConfig" +) + +type GenericOIDCApplyInput struct { + Code string `json:"code,omitempty" yaml:"code,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + OIDCConfig *OIDCConfig `json:"oidcConfig,omitempty" yaml:"oidcConfig,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generic_oidcconfig.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generic_oidcconfig.go new file mode 100644 index 000000000..4d120bbbe --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generic_oidcconfig.go @@ -0,0 +1,62 @@ +package client + +const ( + GenericOIDCConfigType = "genericOIDCConfig" + GenericOIDCConfigFieldAccessMode = "accessMode" + GenericOIDCConfigFieldAcrValue = "acrValue" + GenericOIDCConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + GenericOIDCConfigFieldAnnotations = "annotations" + GenericOIDCConfigFieldAuthEndpoint = "authEndpoint" + GenericOIDCConfigFieldCertificate = "certificate" + GenericOIDCConfigFieldClientID = "clientId" + GenericOIDCConfigFieldClientSecret = "clientSecret" + GenericOIDCConfigFieldCreated = "created" + GenericOIDCConfigFieldCreatorID = "creatorId" + GenericOIDCConfigFieldEnabled = "enabled" + GenericOIDCConfigFieldGroupSearchEnabled = "groupSearchEnabled" + GenericOIDCConfigFieldGroupsClaim = "groupsClaim" + GenericOIDCConfigFieldIssuer = "issuer" + GenericOIDCConfigFieldJWKSUrl = "jwksUrl" + GenericOIDCConfigFieldLabels = "labels" + GenericOIDCConfigFieldName = "name" + GenericOIDCConfigFieldOwnerReferences = "ownerReferences" + GenericOIDCConfigFieldPrivateKey = "privateKey" + GenericOIDCConfigFieldRancherURL = "rancherUrl" + GenericOIDCConfigFieldRemoved = "removed" + GenericOIDCConfigFieldScopes = "scope" + GenericOIDCConfigFieldStatus = "status" + GenericOIDCConfigFieldTokenEndpoint = "tokenEndpoint" + GenericOIDCConfigFieldType = "type" + GenericOIDCConfigFieldUUID = "uuid" + GenericOIDCConfigFieldUserInfoEndpoint = "userInfoEndpoint" +) + +type GenericOIDCConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AcrValue string `json:"acrValue,omitempty" yaml:"acrValue,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + AuthEndpoint string `json:"authEndpoint,omitempty" yaml:"authEndpoint,omitempty"` + Certificate string `json:"certificate,omitempty" yaml:"certificate,omitempty"` + ClientID string `json:"clientId,omitempty" yaml:"clientId,omitempty"` + ClientSecret string `json:"clientSecret,omitempty" yaml:"clientSecret,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + GroupSearchEnabled *bool `json:"groupSearchEnabled,omitempty" yaml:"groupSearchEnabled,omitempty"` + GroupsClaim string `json:"groupsClaim,omitempty" yaml:"groupsClaim,omitempty"` + Issuer string `json:"issuer,omitempty" yaml:"issuer,omitempty"` + JWKSUrl string `json:"jwksUrl,omitempty" yaml:"jwksUrl,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + PrivateKey string `json:"privateKey,omitempty" yaml:"privateKey,omitempty"` + RancherURL string `json:"rancherUrl,omitempty" yaml:"rancherUrl,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Scopes string `json:"scope,omitempty" yaml:"scope,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + TokenEndpoint string `json:"tokenEndpoint,omitempty" yaml:"tokenEndpoint,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserInfoEndpoint string `json:"userInfoEndpoint,omitempty" yaml:"userInfoEndpoint,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generic_oidctest_output.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generic_oidctest_output.go new file mode 100644 index 000000000..93d2fdcf5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_generic_oidctest_output.go @@ -0,0 +1,10 @@ +package client + +const ( + GenericOIDCTestOutputType = "genericOIDCTestOutput" + GenericOIDCTestOutputFieldRedirectURL = "redirectUrl" +) + +type GenericOIDCTestOutput struct { + RedirectURL string `json:"redirectUrl,omitempty" yaml:"redirectUrl,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_git_repo_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_git_repo_volume_source.go new file mode 100644 index 000000000..102d08fd0 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_git_repo_volume_source.go @@ -0,0 +1,14 @@ +package client + +const ( + GitRepoVolumeSourceType = "gitRepoVolumeSource" + GitRepoVolumeSourceFieldDirectory = "directory" + GitRepoVolumeSourceFieldRepository = "repository" + GitRepoVolumeSourceFieldRevision = "revision" +) + +type GitRepoVolumeSource struct { + Directory string `json:"directory,omitempty" yaml:"directory,omitempty"` + Repository string `json:"repository,omitempty" yaml:"repository,omitempty"` + Revision string `json:"revision,omitempty" yaml:"revision,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_github_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_github_config.go new file mode 100644 index 000000000..04dc45315 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_github_config.go @@ -0,0 +1,46 @@ +package client + +const ( + GithubConfigType = "githubConfig" + GithubConfigFieldAccessMode = "accessMode" + GithubConfigFieldAdditionalClientIDs = "additionalClientIds" + GithubConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + GithubConfigFieldAnnotations = "annotations" + GithubConfigFieldClientID = "clientId" + GithubConfigFieldClientSecret = "clientSecret" + GithubConfigFieldCreated = "created" + GithubConfigFieldCreatorID = "creatorId" + GithubConfigFieldEnabled = "enabled" + GithubConfigFieldHostname = "hostname" + GithubConfigFieldHostnameToClientID = "hostnameToClientId" + GithubConfigFieldLabels = "labels" + GithubConfigFieldName = "name" + GithubConfigFieldOwnerReferences = "ownerReferences" + GithubConfigFieldRemoved = "removed" + GithubConfigFieldStatus = "status" + GithubConfigFieldTLS = "tls" + GithubConfigFieldType = "type" + GithubConfigFieldUUID = "uuid" +) + +type GithubConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AdditionalClientIDs map[string]string `json:"additionalClientIds,omitempty" yaml:"additionalClientIds,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + ClientID string `json:"clientId,omitempty" yaml:"clientId,omitempty"` + ClientSecret string `json:"clientSecret,omitempty" yaml:"clientSecret,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + HostnameToClientID map[string]string `json:"hostnameToClientId,omitempty" yaml:"hostnameToClientId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + TLS bool `json:"tls,omitempty" yaml:"tls,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_github_config_apply_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_github_config_apply_input.go new file mode 100644 index 000000000..af9cae872 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_github_config_apply_input.go @@ -0,0 +1,14 @@ +package client + +const ( + GithubConfigApplyInputType = "githubConfigApplyInput" + GithubConfigApplyInputFieldCode = "code" + GithubConfigApplyInputFieldEnabled = "enabled" + GithubConfigApplyInputFieldGithubConfig = "githubConfig" +) + +type GithubConfigApplyInput struct { + Code string `json:"code,omitempty" yaml:"code,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + GithubConfig *GithubConfig `json:"githubConfig,omitempty" yaml:"githubConfig,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_github_config_test_output.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_github_config_test_output.go new file mode 100644 index 000000000..d7eaf8861 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_github_config_test_output.go @@ -0,0 +1,10 @@ +package client + +const ( + GithubConfigTestOutputType = "githubConfigTestOutput" + GithubConfigTestOutputFieldRedirectURL = "redirectUrl" +) + +type GithubConfigTestOutput struct { + RedirectURL string `json:"redirectUrl,omitempty" yaml:"redirectUrl,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_autopilot_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_autopilot_config.go new file mode 100644 index 000000000..83bf5ac72 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_autopilot_config.go @@ -0,0 +1,10 @@ +package client + +const ( + GKEAutopilotConfigType = "gkeAutopilotConfig" + GKEAutopilotConfigFieldEnabled = "enabled" +) + +type GKEAutopilotConfig struct { + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_cidr_block.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_cidr_block.go new file mode 100644 index 000000000..d89fa3eac --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_cidr_block.go @@ -0,0 +1,12 @@ +package client + +const ( + GKECidrBlockType = "gkeCidrBlock" + GKECidrBlockFieldCidrBlock = "cidrBlock" + GKECidrBlockFieldDisplayName = "displayName" +) + +type GKECidrBlock struct { + CidrBlock string `json:"cidrBlock,omitempty" yaml:"cidrBlock,omitempty"` + DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_cluster_addons.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_cluster_addons.go new file mode 100644 index 000000000..8cbf23c79 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_cluster_addons.go @@ -0,0 +1,14 @@ +package client + +const ( + GKEClusterAddonsType = "gkeClusterAddons" + GKEClusterAddonsFieldHTTPLoadBalancing = "httpLoadBalancing" + GKEClusterAddonsFieldHorizontalPodAutoscaling = "horizontalPodAutoscaling" + GKEClusterAddonsFieldNetworkPolicyConfig = "networkPolicyConfig" +) + +type GKEClusterAddons struct { + HTTPLoadBalancing bool `json:"httpLoadBalancing,omitempty" yaml:"httpLoadBalancing,omitempty"` + HorizontalPodAutoscaling bool `json:"horizontalPodAutoscaling,omitempty" yaml:"horizontalPodAutoscaling,omitempty"` + NetworkPolicyConfig bool `json:"networkPolicyConfig,omitempty" yaml:"networkPolicyConfig,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_cluster_config_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_cluster_config_spec.go new file mode 100644 index 000000000..4973fe668 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_cluster_config_spec.go @@ -0,0 +1,58 @@ +package client + +const ( + GKEClusterConfigSpecType = "gkeClusterConfigSpec" + GKEClusterConfigSpecFieldAutopilotConfig = "autopilotConfig" + GKEClusterConfigSpecFieldClusterAddons = "clusterAddons" + GKEClusterConfigSpecFieldClusterIpv4CidrBlock = "clusterIpv4Cidr" + GKEClusterConfigSpecFieldClusterName = "clusterName" + GKEClusterConfigSpecFieldCustomerManagedEncryptionKey = "customerManagedEncryptionKey" + GKEClusterConfigSpecFieldDescription = "description" + GKEClusterConfigSpecFieldEnableKubernetesAlpha = "enableKubernetesAlpha" + GKEClusterConfigSpecFieldGoogleCredentialSecret = "googleCredentialSecret" + GKEClusterConfigSpecFieldIPAllocationPolicy = "ipAllocationPolicy" + GKEClusterConfigSpecFieldImported = "imported" + GKEClusterConfigSpecFieldKubernetesVersion = "kubernetesVersion" + GKEClusterConfigSpecFieldLabels = "labels" + GKEClusterConfigSpecFieldLocations = "locations" + GKEClusterConfigSpecFieldLoggingService = "loggingService" + GKEClusterConfigSpecFieldMaintenanceWindow = "maintenanceWindow" + GKEClusterConfigSpecFieldMasterAuthorizedNetworksConfig = "masterAuthorizedNetworks" + GKEClusterConfigSpecFieldMonitoringService = "monitoringService" + GKEClusterConfigSpecFieldNetwork = "network" + GKEClusterConfigSpecFieldNetworkPolicyEnabled = "networkPolicyEnabled" + GKEClusterConfigSpecFieldNodePools = "nodePools" + GKEClusterConfigSpecFieldPrivateClusterConfig = "privateClusterConfig" + GKEClusterConfigSpecFieldProjectID = "projectID" + GKEClusterConfigSpecFieldRegion = "region" + GKEClusterConfigSpecFieldSubnetwork = "subnetwork" + GKEClusterConfigSpecFieldZone = "zone" +) + +type GKEClusterConfigSpec struct { + AutopilotConfig *GKEAutopilotConfig `json:"autopilotConfig,omitempty" yaml:"autopilotConfig,omitempty"` + ClusterAddons *GKEClusterAddons `json:"clusterAddons,omitempty" yaml:"clusterAddons,omitempty"` + ClusterIpv4CidrBlock *string `json:"clusterIpv4Cidr,omitempty" yaml:"clusterIpv4Cidr,omitempty"` + ClusterName string `json:"clusterName,omitempty" yaml:"clusterName,omitempty"` + CustomerManagedEncryptionKey *CMEKConfig `json:"customerManagedEncryptionKey,omitempty" yaml:"customerManagedEncryptionKey,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + EnableKubernetesAlpha *bool `json:"enableKubernetesAlpha,omitempty" yaml:"enableKubernetesAlpha,omitempty"` + GoogleCredentialSecret string `json:"googleCredentialSecret,omitempty" yaml:"googleCredentialSecret,omitempty"` + IPAllocationPolicy *GKEIPAllocationPolicy `json:"ipAllocationPolicy,omitempty" yaml:"ipAllocationPolicy,omitempty"` + Imported bool `json:"imported,omitempty" yaml:"imported,omitempty"` + KubernetesVersion *string `json:"kubernetesVersion,omitempty" yaml:"kubernetesVersion,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Locations []string `json:"locations,omitempty" yaml:"locations,omitempty"` + LoggingService *string `json:"loggingService,omitempty" yaml:"loggingService,omitempty"` + MaintenanceWindow *string `json:"maintenanceWindow,omitempty" yaml:"maintenanceWindow,omitempty"` + MasterAuthorizedNetworksConfig *GKEMasterAuthorizedNetworksConfig `json:"masterAuthorizedNetworks,omitempty" yaml:"masterAuthorizedNetworks,omitempty"` + MonitoringService *string `json:"monitoringService,omitempty" yaml:"monitoringService,omitempty"` + Network *string `json:"network,omitempty" yaml:"network,omitempty"` + NetworkPolicyEnabled *bool `json:"networkPolicyEnabled,omitempty" yaml:"networkPolicyEnabled,omitempty"` + NodePools []GKENodePoolConfig `json:"nodePools,omitempty" yaml:"nodePools,omitempty"` + PrivateClusterConfig *GKEPrivateClusterConfig `json:"privateClusterConfig,omitempty" yaml:"privateClusterConfig,omitempty"` + ProjectID string `json:"projectID,omitempty" yaml:"projectID,omitempty"` + Region string `json:"region,omitempty" yaml:"region,omitempty"` + Subnetwork *string `json:"subnetwork,omitempty" yaml:"subnetwork,omitempty"` + Zone string `json:"zone,omitempty" yaml:"zone,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_master_authorized_networks_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_master_authorized_networks_config.go new file mode 100644 index 000000000..0eb9371a7 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_master_authorized_networks_config.go @@ -0,0 +1,12 @@ +package client + +const ( + GKEMasterAuthorizedNetworksConfigType = "gkeMasterAuthorizedNetworksConfig" + GKEMasterAuthorizedNetworksConfigFieldCidrBlocks = "cidrBlocks" + GKEMasterAuthorizedNetworksConfigFieldEnabled = "enabled" +) + +type GKEMasterAuthorizedNetworksConfig struct { + CidrBlocks []GKECidrBlock `json:"cidrBlocks,omitempty" yaml:"cidrBlocks,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_config.go new file mode 100644 index 000000000..ee72b7273 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_config.go @@ -0,0 +1,32 @@ +package client + +const ( + GKENodeConfigType = "gkeNodeConfig" + GKENodeConfigFieldBootDiskKmsKey = "bootDiskKmsKey" + GKENodeConfigFieldDiskSizeGb = "diskSizeGb" + GKENodeConfigFieldDiskType = "diskType" + GKENodeConfigFieldImageType = "imageType" + GKENodeConfigFieldLabels = "labels" + GKENodeConfigFieldLocalSsdCount = "localSsdCount" + GKENodeConfigFieldMachineType = "machineType" + GKENodeConfigFieldOauthScopes = "oauthScopes" + GKENodeConfigFieldPreemptible = "preemptible" + GKENodeConfigFieldServiceAccount = "serviceAccount" + GKENodeConfigFieldTags = "tags" + GKENodeConfigFieldTaints = "taints" +) + +type GKENodeConfig struct { + BootDiskKmsKey string `json:"bootDiskKmsKey,omitempty" yaml:"bootDiskKmsKey,omitempty"` + DiskSizeGb int64 `json:"diskSizeGb,omitempty" yaml:"diskSizeGb,omitempty"` + DiskType string `json:"diskType,omitempty" yaml:"diskType,omitempty"` + ImageType string `json:"imageType,omitempty" yaml:"imageType,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + LocalSsdCount int64 `json:"localSsdCount,omitempty" yaml:"localSsdCount,omitempty"` + MachineType string `json:"machineType,omitempty" yaml:"machineType,omitempty"` + OauthScopes []string `json:"oauthScopes,omitempty" yaml:"oauthScopes,omitempty"` + Preemptible bool `json:"preemptible,omitempty" yaml:"preemptible,omitempty"` + ServiceAccount string `json:"serviceAccount,omitempty" yaml:"serviceAccount,omitempty"` + Tags []string `json:"tags,omitempty" yaml:"tags,omitempty"` + Taints []GKENodeTaintConfig `json:"taints,omitempty" yaml:"taints,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_pool_autoscaling.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_pool_autoscaling.go new file mode 100644 index 000000000..7be64fc9f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_pool_autoscaling.go @@ -0,0 +1,14 @@ +package client + +const ( + GKENodePoolAutoscalingType = "gkeNodePoolAutoscaling" + GKENodePoolAutoscalingFieldEnabled = "enabled" + GKENodePoolAutoscalingFieldMaxNodeCount = "maxNodeCount" + GKENodePoolAutoscalingFieldMinNodeCount = "minNodeCount" +) + +type GKENodePoolAutoscaling struct { + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + MaxNodeCount int64 `json:"maxNodeCount,omitempty" yaml:"maxNodeCount,omitempty"` + MinNodeCount int64 `json:"minNodeCount,omitempty" yaml:"minNodeCount,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_pool_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_pool_config.go new file mode 100644 index 000000000..30bf77072 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_pool_config.go @@ -0,0 +1,22 @@ +package client + +const ( + GKENodePoolConfigType = "gkeNodePoolConfig" + GKENodePoolConfigFieldAutoscaling = "autoscaling" + GKENodePoolConfigFieldConfig = "config" + GKENodePoolConfigFieldInitialNodeCount = "initialNodeCount" + GKENodePoolConfigFieldManagement = "management" + GKENodePoolConfigFieldMaxPodsConstraint = "maxPodsConstraint" + GKENodePoolConfigFieldName = "name" + GKENodePoolConfigFieldVersion = "version" +) + +type GKENodePoolConfig struct { + Autoscaling *GKENodePoolAutoscaling `json:"autoscaling,omitempty" yaml:"autoscaling,omitempty"` + Config *GKENodeConfig `json:"config,omitempty" yaml:"config,omitempty"` + InitialNodeCount *int64 `json:"initialNodeCount,omitempty" yaml:"initialNodeCount,omitempty"` + Management *GKENodePoolManagement `json:"management,omitempty" yaml:"management,omitempty"` + MaxPodsConstraint *int64 `json:"maxPodsConstraint,omitempty" yaml:"maxPodsConstraint,omitempty"` + Name *string `json:"name,omitempty" yaml:"name,omitempty"` + Version *string `json:"version,omitempty" yaml:"version,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_pool_management.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_pool_management.go new file mode 100644 index 000000000..de37c5a16 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_pool_management.go @@ -0,0 +1,12 @@ +package client + +const ( + GKENodePoolManagementType = "gkeNodePoolManagement" + GKENodePoolManagementFieldAutoRepair = "autoRepair" + GKENodePoolManagementFieldAutoUpgrade = "autoUpgrade" +) + +type GKENodePoolManagement struct { + AutoRepair bool `json:"autoRepair,omitempty" yaml:"autoRepair,omitempty"` + AutoUpgrade bool `json:"autoUpgrade,omitempty" yaml:"autoUpgrade,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_taint_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_taint_config.go new file mode 100644 index 000000000..f9fd1e9b3 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_node_taint_config.go @@ -0,0 +1,14 @@ +package client + +const ( + GKENodeTaintConfigType = "gkeNodeTaintConfig" + GKENodeTaintConfigFieldEffect = "effect" + GKENodeTaintConfigFieldKey = "key" + GKENodeTaintConfigFieldValue = "value" +) + +type GKENodeTaintConfig struct { + Effect string `json:"effect,omitempty" yaml:"effect,omitempty"` + Key string `json:"key,omitempty" yaml:"key,omitempty"` + Value string `json:"value,omitempty" yaml:"value,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_private_cluster_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_private_cluster_config.go new file mode 100644 index 000000000..7607cbe61 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_private_cluster_config.go @@ -0,0 +1,14 @@ +package client + +const ( + GKEPrivateClusterConfigType = "gkePrivateClusterConfig" + GKEPrivateClusterConfigFieldEnablePrivateEndpoint = "enablePrivateEndpoint" + GKEPrivateClusterConfigFieldEnablePrivateNodes = "enablePrivateNodes" + GKEPrivateClusterConfigFieldMasterIpv4CidrBlock = "masterIpv4CidrBlock" +) + +type GKEPrivateClusterConfig struct { + EnablePrivateEndpoint bool `json:"enablePrivateEndpoint,omitempty" yaml:"enablePrivateEndpoint,omitempty"` + EnablePrivateNodes bool `json:"enablePrivateNodes,omitempty" yaml:"enablePrivateNodes,omitempty"` + MasterIpv4CidrBlock string `json:"masterIpv4CidrBlock,omitempty" yaml:"masterIpv4CidrBlock,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_status.go new file mode 100644 index 000000000..3c943906b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gke_status.go @@ -0,0 +1,12 @@ +package client + +const ( + GKEStatusType = "gkeStatus" + GKEStatusFieldPrivateRequiresTunnel = "privateRequiresTunnel" + GKEStatusFieldUpstreamSpec = "upstreamSpec" +) + +type GKEStatus struct { + PrivateRequiresTunnel *bool `json:"privateRequiresTunnel,omitempty" yaml:"privateRequiresTunnel,omitempty"` + UpstreamSpec *GKEClusterConfigSpec `json:"upstreamSpec,omitempty" yaml:"upstreamSpec,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gkeip_allocation_policy.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gkeip_allocation_policy.go new file mode 100644 index 000000000..140bd42a3 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_gkeip_allocation_policy.go @@ -0,0 +1,24 @@ +package client + +const ( + GKEIPAllocationPolicyType = "gkeipAllocationPolicy" + GKEIPAllocationPolicyFieldClusterIpv4CidrBlock = "clusterIpv4CidrBlock" + GKEIPAllocationPolicyFieldClusterSecondaryRangeName = "clusterSecondaryRangeName" + GKEIPAllocationPolicyFieldCreateSubnetwork = "createSubnetwork" + GKEIPAllocationPolicyFieldNodeIpv4CidrBlock = "nodeIpv4CidrBlock" + GKEIPAllocationPolicyFieldServicesIpv4CidrBlock = "servicesIpv4CidrBlock" + GKEIPAllocationPolicyFieldServicesSecondaryRangeName = "servicesSecondaryRangeName" + GKEIPAllocationPolicyFieldSubnetworkName = "subnetworkName" + GKEIPAllocationPolicyFieldUseIPAliases = "useIpAliases" +) + +type GKEIPAllocationPolicy struct { + ClusterIpv4CidrBlock string `json:"clusterIpv4CidrBlock,omitempty" yaml:"clusterIpv4CidrBlock,omitempty"` + ClusterSecondaryRangeName string `json:"clusterSecondaryRangeName,omitempty" yaml:"clusterSecondaryRangeName,omitempty"` + CreateSubnetwork bool `json:"createSubnetwork,omitempty" yaml:"createSubnetwork,omitempty"` + NodeIpv4CidrBlock string `json:"nodeIpv4CidrBlock,omitempty" yaml:"nodeIpv4CidrBlock,omitempty"` + ServicesIpv4CidrBlock string `json:"servicesIpv4CidrBlock,omitempty" yaml:"servicesIpv4CidrBlock,omitempty"` + ServicesSecondaryRangeName string `json:"servicesSecondaryRangeName,omitempty" yaml:"servicesSecondaryRangeName,omitempty"` + SubnetworkName string `json:"subnetworkName,omitempty" yaml:"subnetworkName,omitempty"` + UseIPAliases bool `json:"useIpAliases,omitempty" yaml:"useIpAliases,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_aws_opts.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_aws_opts.go new file mode 100644 index 000000000..61965de73 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_aws_opts.go @@ -0,0 +1,28 @@ +package client + +const ( + GlobalAwsOptsType = "globalAwsOpts" + GlobalAwsOptsFieldDisableSecurityGroupIngress = "disable-security-group-ingress" + GlobalAwsOptsFieldDisableStrictZoneCheck = "disable-strict-zone-check" + GlobalAwsOptsFieldElbSecurityGroup = "elb-security-group" + GlobalAwsOptsFieldKubernetesClusterID = "kubernetes-cluster-id" + GlobalAwsOptsFieldKubernetesClusterTag = "kubernetes-cluster-tag" + GlobalAwsOptsFieldRoleARN = "role-arn" + GlobalAwsOptsFieldRouteTableID = "routetable-id" + GlobalAwsOptsFieldSubnetID = "subnet-id" + GlobalAwsOptsFieldVPC = "vpc" + GlobalAwsOptsFieldZone = "zone" +) + +type GlobalAwsOpts struct { + DisableSecurityGroupIngress bool `json:"disable-security-group-ingress,omitempty" yaml:"disable-security-group-ingress,omitempty"` + DisableStrictZoneCheck bool `json:"disable-strict-zone-check,omitempty" yaml:"disable-strict-zone-check,omitempty"` + ElbSecurityGroup string `json:"elb-security-group,omitempty" yaml:"elb-security-group,omitempty"` + KubernetesClusterID string `json:"kubernetes-cluster-id,omitempty" yaml:"kubernetes-cluster-id,omitempty"` + KubernetesClusterTag string `json:"kubernetes-cluster-tag,omitempty" yaml:"kubernetes-cluster-tag,omitempty"` + RoleARN string `json:"role-arn,omitempty" yaml:"role-arn,omitempty"` + RouteTableID string `json:"routetable-id,omitempty" yaml:"routetable-id,omitempty"` + SubnetID string `json:"subnet-id,omitempty" yaml:"subnet-id,omitempty"` + VPC string `json:"vpc,omitempty" yaml:"vpc,omitempty"` + Zone string `json:"zone,omitempty" yaml:"zone,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns.go new file mode 100644 index 000000000..2de8450e3 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns.go @@ -0,0 +1,152 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + GlobalDnsType = "globalDns" + GlobalDnsFieldAnnotations = "annotations" + GlobalDnsFieldCreated = "created" + GlobalDnsFieldCreatorID = "creatorId" + GlobalDnsFieldFQDN = "fqdn" + GlobalDnsFieldLabels = "labels" + GlobalDnsFieldMembers = "members" + GlobalDnsFieldMultiClusterAppID = "multiClusterAppId" + GlobalDnsFieldName = "name" + GlobalDnsFieldOwnerReferences = "ownerReferences" + GlobalDnsFieldProjectIDs = "projectIds" + GlobalDnsFieldProviderID = "providerId" + GlobalDnsFieldRemoved = "removed" + GlobalDnsFieldState = "state" + GlobalDnsFieldStatus = "status" + GlobalDnsFieldTTL = "ttl" + GlobalDnsFieldTransitioning = "transitioning" + GlobalDnsFieldTransitioningMessage = "transitioningMessage" + GlobalDnsFieldUUID = "uuid" +) + +type GlobalDns struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + FQDN string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Members []Member `json:"members,omitempty" yaml:"members,omitempty"` + MultiClusterAppID string `json:"multiClusterAppId,omitempty" yaml:"multiClusterAppId,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + ProjectIDs []string `json:"projectIds,omitempty" yaml:"projectIds,omitempty"` + ProviderID string `json:"providerId,omitempty" yaml:"providerId,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Status *GlobalDNSStatus `json:"status,omitempty" yaml:"status,omitempty"` + TTL int64 `json:"ttl,omitempty" yaml:"ttl,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type GlobalDnsCollection struct { + types.Collection + Data []GlobalDns `json:"data,omitempty"` + client *GlobalDnsClient +} + +type GlobalDnsClient struct { + apiClient *Client +} + +type GlobalDnsOperations interface { + List(opts *types.ListOpts) (*GlobalDnsCollection, error) + ListAll(opts *types.ListOpts) (*GlobalDnsCollection, error) + Create(opts *GlobalDns) (*GlobalDns, error) + Update(existing *GlobalDns, updates interface{}) (*GlobalDns, error) + Replace(existing *GlobalDns) (*GlobalDns, error) + ByID(id string) (*GlobalDns, error) + Delete(container *GlobalDns) error + + ActionAddProjects(resource *GlobalDns, input *UpdateGlobalDNSTargetsInput) error + + ActionRemoveProjects(resource *GlobalDns, input *UpdateGlobalDNSTargetsInput) error +} + +func newGlobalDnsClient(apiClient *Client) *GlobalDnsClient { + return &GlobalDnsClient{ + apiClient: apiClient, + } +} + +func (c *GlobalDnsClient) Create(container *GlobalDns) (*GlobalDns, error) { + resp := &GlobalDns{} + err := c.apiClient.Ops.DoCreate(GlobalDnsType, container, resp) + return resp, err +} + +func (c *GlobalDnsClient) Update(existing *GlobalDns, updates interface{}) (*GlobalDns, error) { + resp := &GlobalDns{} + err := c.apiClient.Ops.DoUpdate(GlobalDnsType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *GlobalDnsClient) Replace(obj *GlobalDns) (*GlobalDns, error) { + resp := &GlobalDns{} + err := c.apiClient.Ops.DoReplace(GlobalDnsType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *GlobalDnsClient) List(opts *types.ListOpts) (*GlobalDnsCollection, error) { + resp := &GlobalDnsCollection{} + err := c.apiClient.Ops.DoList(GlobalDnsType, opts, resp) + resp.client = c + return resp, err +} + +func (c *GlobalDnsClient) ListAll(opts *types.ListOpts) (*GlobalDnsCollection, error) { + resp := &GlobalDnsCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *GlobalDnsCollection) Next() (*GlobalDnsCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &GlobalDnsCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *GlobalDnsClient) ByID(id string) (*GlobalDns, error) { + resp := &GlobalDns{} + err := c.apiClient.Ops.DoByID(GlobalDnsType, id, resp) + return resp, err +} + +func (c *GlobalDnsClient) Delete(container *GlobalDns) error { + return c.apiClient.Ops.DoResourceDelete(GlobalDnsType, &container.Resource) +} + +func (c *GlobalDnsClient) ActionAddProjects(resource *GlobalDns, input *UpdateGlobalDNSTargetsInput) error { + err := c.apiClient.Ops.DoAction(GlobalDnsType, "addProjects", &resource.Resource, input, nil) + return err +} + +func (c *GlobalDnsClient) ActionRemoveProjects(resource *GlobalDns, input *UpdateGlobalDNSTargetsInput) error { + err := c.apiClient.Ops.DoAction(GlobalDnsType, "removeProjects", &resource.Resource, input, nil) + return err +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_provider.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_provider.go new file mode 100644 index 000000000..951b22847 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_provider.go @@ -0,0 +1,128 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + GlobalDnsProviderType = "globalDnsProvider" + GlobalDnsProviderFieldAlidnsProviderConfig = "alidnsProviderConfig" + GlobalDnsProviderFieldAnnotations = "annotations" + GlobalDnsProviderFieldCloudflareProviderConfig = "cloudflareProviderConfig" + GlobalDnsProviderFieldCreated = "created" + GlobalDnsProviderFieldCreatorID = "creatorId" + GlobalDnsProviderFieldLabels = "labels" + GlobalDnsProviderFieldMembers = "members" + GlobalDnsProviderFieldName = "name" + GlobalDnsProviderFieldOwnerReferences = "ownerReferences" + GlobalDnsProviderFieldRemoved = "removed" + GlobalDnsProviderFieldRootDomain = "rootDomain" + GlobalDnsProviderFieldRoute53ProviderConfig = "route53ProviderConfig" + GlobalDnsProviderFieldUUID = "uuid" +) + +type GlobalDnsProvider struct { + types.Resource + AlidnsProviderConfig *AlidnsProviderConfig `json:"alidnsProviderConfig,omitempty" yaml:"alidnsProviderConfig,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + CloudflareProviderConfig *CloudflareProviderConfig `json:"cloudflareProviderConfig,omitempty" yaml:"cloudflareProviderConfig,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Members []Member `json:"members,omitempty" yaml:"members,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + RootDomain string `json:"rootDomain,omitempty" yaml:"rootDomain,omitempty"` + Route53ProviderConfig *Route53ProviderConfig `json:"route53ProviderConfig,omitempty" yaml:"route53ProviderConfig,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type GlobalDnsProviderCollection struct { + types.Collection + Data []GlobalDnsProvider `json:"data,omitempty"` + client *GlobalDnsProviderClient +} + +type GlobalDnsProviderClient struct { + apiClient *Client +} + +type GlobalDnsProviderOperations interface { + List(opts *types.ListOpts) (*GlobalDnsProviderCollection, error) + ListAll(opts *types.ListOpts) (*GlobalDnsProviderCollection, error) + Create(opts *GlobalDnsProvider) (*GlobalDnsProvider, error) + Update(existing *GlobalDnsProvider, updates interface{}) (*GlobalDnsProvider, error) + Replace(existing *GlobalDnsProvider) (*GlobalDnsProvider, error) + ByID(id string) (*GlobalDnsProvider, error) + Delete(container *GlobalDnsProvider) error +} + +func newGlobalDnsProviderClient(apiClient *Client) *GlobalDnsProviderClient { + return &GlobalDnsProviderClient{ + apiClient: apiClient, + } +} + +func (c *GlobalDnsProviderClient) Create(container *GlobalDnsProvider) (*GlobalDnsProvider, error) { + resp := &GlobalDnsProvider{} + err := c.apiClient.Ops.DoCreate(GlobalDnsProviderType, container, resp) + return resp, err +} + +func (c *GlobalDnsProviderClient) Update(existing *GlobalDnsProvider, updates interface{}) (*GlobalDnsProvider, error) { + resp := &GlobalDnsProvider{} + err := c.apiClient.Ops.DoUpdate(GlobalDnsProviderType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *GlobalDnsProviderClient) Replace(obj *GlobalDnsProvider) (*GlobalDnsProvider, error) { + resp := &GlobalDnsProvider{} + err := c.apiClient.Ops.DoReplace(GlobalDnsProviderType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *GlobalDnsProviderClient) List(opts *types.ListOpts) (*GlobalDnsProviderCollection, error) { + resp := &GlobalDnsProviderCollection{} + err := c.apiClient.Ops.DoList(GlobalDnsProviderType, opts, resp) + resp.client = c + return resp, err +} + +func (c *GlobalDnsProviderClient) ListAll(opts *types.ListOpts) (*GlobalDnsProviderCollection, error) { + resp := &GlobalDnsProviderCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *GlobalDnsProviderCollection) Next() (*GlobalDnsProviderCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &GlobalDnsProviderCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *GlobalDnsProviderClient) ByID(id string) (*GlobalDnsProvider, error) { + resp := &GlobalDnsProvider{} + err := c.apiClient.Ops.DoByID(GlobalDnsProviderType, id, resp) + return resp, err +} + +func (c *GlobalDnsProviderClient) Delete(container *GlobalDnsProvider) error { + return c.apiClient.Ops.DoResourceDelete(GlobalDnsProviderType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_provider_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_provider_spec.go new file mode 100644 index 000000000..b5f1157a0 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_provider_spec.go @@ -0,0 +1,18 @@ +package client + +const ( + GlobalDNSProviderSpecType = "globalDnsProviderSpec" + GlobalDNSProviderSpecFieldAlidnsProviderConfig = "alidnsProviderConfig" + GlobalDNSProviderSpecFieldCloudflareProviderConfig = "cloudflareProviderConfig" + GlobalDNSProviderSpecFieldMembers = "members" + GlobalDNSProviderSpecFieldRootDomain = "rootDomain" + GlobalDNSProviderSpecFieldRoute53ProviderConfig = "route53ProviderConfig" +) + +type GlobalDNSProviderSpec struct { + AlidnsProviderConfig *AlidnsProviderConfig `json:"alidnsProviderConfig,omitempty" yaml:"alidnsProviderConfig,omitempty"` + CloudflareProviderConfig *CloudflareProviderConfig `json:"cloudflareProviderConfig,omitempty" yaml:"cloudflareProviderConfig,omitempty"` + Members []Member `json:"members,omitempty" yaml:"members,omitempty"` + RootDomain string `json:"rootDomain,omitempty" yaml:"rootDomain,omitempty"` + Route53ProviderConfig *Route53ProviderConfig `json:"route53ProviderConfig,omitempty" yaml:"route53ProviderConfig,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_spec.go new file mode 100644 index 000000000..3f22ef299 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_spec.go @@ -0,0 +1,20 @@ +package client + +const ( + GlobalDNSSpecType = "globalDnsSpec" + GlobalDNSSpecFieldFQDN = "fqdn" + GlobalDNSSpecFieldMembers = "members" + GlobalDNSSpecFieldMultiClusterAppID = "multiClusterAppId" + GlobalDNSSpecFieldProjectIDs = "projectIds" + GlobalDNSSpecFieldProviderID = "providerId" + GlobalDNSSpecFieldTTL = "ttl" +) + +type GlobalDNSSpec struct { + FQDN string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"` + Members []Member `json:"members,omitempty" yaml:"members,omitempty"` + MultiClusterAppID string `json:"multiClusterAppId,omitempty" yaml:"multiClusterAppId,omitempty"` + ProjectIDs []string `json:"projectIds,omitempty" yaml:"projectIds,omitempty"` + ProviderID string `json:"providerId,omitempty" yaml:"providerId,omitempty"` + TTL int64 `json:"ttl,omitempty" yaml:"ttl,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_status.go new file mode 100644 index 000000000..d37181ae6 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_dns_status.go @@ -0,0 +1,12 @@ +package client + +const ( + GlobalDNSStatusType = "globalDnsStatus" + GlobalDNSStatusFieldClusterEndpoints = "clusterEndpoints" + GlobalDNSStatusFieldEndpoints = "endpoints" +) + +type GlobalDNSStatus struct { + ClusterEndpoints map[string][]string `json:"clusterEndpoints,omitempty" yaml:"clusterEndpoints,omitempty"` + Endpoints []string `json:"endpoints,omitempty" yaml:"endpoints,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_openstack_opts.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_openstack_opts.go new file mode 100644 index 000000000..7db5e17e2 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_openstack_opts.go @@ -0,0 +1,30 @@ +package client + +const ( + GlobalOpenstackOptsType = "globalOpenstackOpts" + GlobalOpenstackOptsFieldAuthURL = "auth-url" + GlobalOpenstackOptsFieldCAFile = "ca-file" + GlobalOpenstackOptsFieldDomainID = "domain-id" + GlobalOpenstackOptsFieldDomainName = "domain-name" + GlobalOpenstackOptsFieldPassword = "password" + GlobalOpenstackOptsFieldRegion = "region" + GlobalOpenstackOptsFieldTenantID = "tenant-id" + GlobalOpenstackOptsFieldTenantName = "tenant-name" + GlobalOpenstackOptsFieldTrustID = "trust-id" + GlobalOpenstackOptsFieldUserID = "user-id" + GlobalOpenstackOptsFieldUsername = "username" +) + +type GlobalOpenstackOpts struct { + AuthURL string `json:"auth-url,omitempty" yaml:"auth-url,omitempty"` + CAFile string `json:"ca-file,omitempty" yaml:"ca-file,omitempty"` + DomainID string `json:"domain-id,omitempty" yaml:"domain-id,omitempty"` + DomainName string `json:"domain-name,omitempty" yaml:"domain-name,omitempty"` + Password string `json:"password,omitempty" yaml:"password,omitempty"` + Region string `json:"region,omitempty" yaml:"region,omitempty"` + TenantID string `json:"tenant-id,omitempty" yaml:"tenant-id,omitempty"` + TenantName string `json:"tenant-name,omitempty" yaml:"tenant-name,omitempty"` + TrustID string `json:"trust-id,omitempty" yaml:"trust-id,omitempty"` + UserID string `json:"user-id,omitempty" yaml:"user-id,omitempty"` + Username string `json:"username,omitempty" yaml:"username,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_role.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_role.go new file mode 100644 index 000000000..f528984f7 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_role.go @@ -0,0 +1,134 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + GlobalRoleType = "globalRole" + GlobalRoleFieldAnnotations = "annotations" + GlobalRoleFieldBuiltin = "builtin" + GlobalRoleFieldCreated = "created" + GlobalRoleFieldCreatorID = "creatorId" + GlobalRoleFieldDescription = "description" + GlobalRoleFieldInheritedClusterRoles = "inheritedClusterRoles" + GlobalRoleFieldInheritedFleetWorkspacePermissions = "inheritedFleetWorkspacePermissions" + GlobalRoleFieldLabels = "labels" + GlobalRoleFieldName = "name" + GlobalRoleFieldNamespacedRules = "namespacedRules" + GlobalRoleFieldNewUserDefault = "newUserDefault" + GlobalRoleFieldOwnerReferences = "ownerReferences" + GlobalRoleFieldRemoved = "removed" + GlobalRoleFieldRules = "rules" + GlobalRoleFieldStatus = "status" + GlobalRoleFieldUUID = "uuid" +) + +type GlobalRole struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Builtin bool `json:"builtin,omitempty" yaml:"builtin,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + InheritedClusterRoles []string `json:"inheritedClusterRoles,omitempty" yaml:"inheritedClusterRoles,omitempty"` + InheritedFleetWorkspacePermissions *FleetWorkspacePermission `json:"inheritedFleetWorkspacePermissions,omitempty" yaml:"inheritedFleetWorkspacePermissions,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NamespacedRules map[string][]PolicyRule `json:"namespacedRules,omitempty" yaml:"namespacedRules,omitempty"` + NewUserDefault bool `json:"newUserDefault,omitempty" yaml:"newUserDefault,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Rules []PolicyRule `json:"rules,omitempty" yaml:"rules,omitempty"` + Status GlobalRoleStatus `json:"status,omitempty" yaml:"status,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type GlobalRoleCollection struct { + types.Collection + Data []GlobalRole `json:"data,omitempty"` + client *GlobalRoleClient +} + +type GlobalRoleClient struct { + apiClient *Client +} + +type GlobalRoleOperations interface { + List(opts *types.ListOpts) (*GlobalRoleCollection, error) + ListAll(opts *types.ListOpts) (*GlobalRoleCollection, error) + Create(opts *GlobalRole) (*GlobalRole, error) + Update(existing *GlobalRole, updates interface{}) (*GlobalRole, error) + Replace(existing *GlobalRole) (*GlobalRole, error) + ByID(id string) (*GlobalRole, error) + Delete(container *GlobalRole) error +} + +func newGlobalRoleClient(apiClient *Client) *GlobalRoleClient { + return &GlobalRoleClient{ + apiClient: apiClient, + } +} + +func (c *GlobalRoleClient) Create(container *GlobalRole) (*GlobalRole, error) { + resp := &GlobalRole{} + err := c.apiClient.Ops.DoCreate(GlobalRoleType, container, resp) + return resp, err +} + +func (c *GlobalRoleClient) Update(existing *GlobalRole, updates interface{}) (*GlobalRole, error) { + resp := &GlobalRole{} + err := c.apiClient.Ops.DoUpdate(GlobalRoleType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *GlobalRoleClient) Replace(obj *GlobalRole) (*GlobalRole, error) { + resp := &GlobalRole{} + err := c.apiClient.Ops.DoReplace(GlobalRoleType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *GlobalRoleClient) List(opts *types.ListOpts) (*GlobalRoleCollection, error) { + resp := &GlobalRoleCollection{} + err := c.apiClient.Ops.DoList(GlobalRoleType, opts, resp) + resp.client = c + return resp, err +} + +func (c *GlobalRoleClient) ListAll(opts *types.ListOpts) (*GlobalRoleCollection, error) { + resp := &GlobalRoleCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *GlobalRoleCollection) Next() (*GlobalRoleCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &GlobalRoleCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *GlobalRoleClient) ByID(id string) (*GlobalRole, error) { + resp := &GlobalRole{} + err := c.apiClient.Ops.DoByID(GlobalRoleType, id, resp) + return resp, err +} + +func (c *GlobalRoleClient) Delete(container *GlobalRole) error { + return c.apiClient.Ops.DoResourceDelete(GlobalRoleType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_role_binding.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_role_binding.go new file mode 100644 index 000000000..0d447d01f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_role_binding.go @@ -0,0 +1,124 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + GlobalRoleBindingType = "globalRoleBinding" + GlobalRoleBindingFieldAnnotations = "annotations" + GlobalRoleBindingFieldCreated = "created" + GlobalRoleBindingFieldCreatorID = "creatorId" + GlobalRoleBindingFieldGlobalRoleID = "globalRoleId" + GlobalRoleBindingFieldGroupPrincipalID = "groupPrincipalId" + GlobalRoleBindingFieldLabels = "labels" + GlobalRoleBindingFieldName = "name" + GlobalRoleBindingFieldOwnerReferences = "ownerReferences" + GlobalRoleBindingFieldRemoved = "removed" + GlobalRoleBindingFieldUUID = "uuid" + GlobalRoleBindingFieldUserID = "userId" +) + +type GlobalRoleBinding struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + GlobalRoleID string `json:"globalRoleId,omitempty" yaml:"globalRoleId,omitempty"` + GroupPrincipalID string `json:"groupPrincipalId,omitempty" yaml:"groupPrincipalId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserID string `json:"userId,omitempty" yaml:"userId,omitempty"` +} + +type GlobalRoleBindingCollection struct { + types.Collection + Data []GlobalRoleBinding `json:"data,omitempty"` + client *GlobalRoleBindingClient +} + +type GlobalRoleBindingClient struct { + apiClient *Client +} + +type GlobalRoleBindingOperations interface { + List(opts *types.ListOpts) (*GlobalRoleBindingCollection, error) + ListAll(opts *types.ListOpts) (*GlobalRoleBindingCollection, error) + Create(opts *GlobalRoleBinding) (*GlobalRoleBinding, error) + Update(existing *GlobalRoleBinding, updates interface{}) (*GlobalRoleBinding, error) + Replace(existing *GlobalRoleBinding) (*GlobalRoleBinding, error) + ByID(id string) (*GlobalRoleBinding, error) + Delete(container *GlobalRoleBinding) error +} + +func newGlobalRoleBindingClient(apiClient *Client) *GlobalRoleBindingClient { + return &GlobalRoleBindingClient{ + apiClient: apiClient, + } +} + +func (c *GlobalRoleBindingClient) Create(container *GlobalRoleBinding) (*GlobalRoleBinding, error) { + resp := &GlobalRoleBinding{} + err := c.apiClient.Ops.DoCreate(GlobalRoleBindingType, container, resp) + return resp, err +} + +func (c *GlobalRoleBindingClient) Update(existing *GlobalRoleBinding, updates interface{}) (*GlobalRoleBinding, error) { + resp := &GlobalRoleBinding{} + err := c.apiClient.Ops.DoUpdate(GlobalRoleBindingType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *GlobalRoleBindingClient) Replace(obj *GlobalRoleBinding) (*GlobalRoleBinding, error) { + resp := &GlobalRoleBinding{} + err := c.apiClient.Ops.DoReplace(GlobalRoleBindingType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *GlobalRoleBindingClient) List(opts *types.ListOpts) (*GlobalRoleBindingCollection, error) { + resp := &GlobalRoleBindingCollection{} + err := c.apiClient.Ops.DoList(GlobalRoleBindingType, opts, resp) + resp.client = c + return resp, err +} + +func (c *GlobalRoleBindingClient) ListAll(opts *types.ListOpts) (*GlobalRoleBindingCollection, error) { + resp := &GlobalRoleBindingCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *GlobalRoleBindingCollection) Next() (*GlobalRoleBindingCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &GlobalRoleBindingCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *GlobalRoleBindingClient) ByID(id string) (*GlobalRoleBinding, error) { + resp := &GlobalRoleBinding{} + err := c.apiClient.Ops.DoByID(GlobalRoleBindingType, id, resp) + return resp, err +} + +func (c *GlobalRoleBindingClient) Delete(container *GlobalRoleBinding) error { + return c.apiClient.Ops.DoResourceDelete(GlobalRoleBindingType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_role_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_role_status.go new file mode 100644 index 000000000..2e90c1e28 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_role_status.go @@ -0,0 +1,16 @@ +package client + +const ( + GlobalRoleStatusType = "globalRoleStatus" + GlobalRoleStatusFieldConditions = "conditions" + GlobalRoleStatusFieldLastUpdate = "lastUpdateTime" + GlobalRoleStatusFieldObservedGeneration = "observedGeneration" + GlobalRoleStatusFieldSummary = "summary" +) + +type GlobalRoleStatus struct { + Conditions []Condition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + LastUpdate string `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"` + ObservedGeneration int64 `json:"observedGeneration,omitempty" yaml:"observedGeneration,omitempty"` + Summary string `json:"summary,omitempty" yaml:"summary,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_vsphere_opts.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_vsphere_opts.go new file mode 100644 index 000000000..3b515a06f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_global_vsphere_opts.go @@ -0,0 +1,32 @@ +package client + +const ( + GlobalVsphereOptsType = "globalVsphereOpts" + GlobalVsphereOptsFieldDatacenter = "datacenter" + GlobalVsphereOptsFieldDatacenters = "datacenters" + GlobalVsphereOptsFieldDefaultDatastore = "datastore" + GlobalVsphereOptsFieldInsecureFlag = "insecure-flag" + GlobalVsphereOptsFieldPassword = "password" + GlobalVsphereOptsFieldRoundTripperCount = "soap-roundtrip-count" + GlobalVsphereOptsFieldUser = "user" + GlobalVsphereOptsFieldVCenterIP = "server" + GlobalVsphereOptsFieldVCenterPort = "port" + GlobalVsphereOptsFieldVMName = "vm-name" + GlobalVsphereOptsFieldVMUUID = "vm-uuid" + GlobalVsphereOptsFieldWorkingDir = "working-dir" +) + +type GlobalVsphereOpts struct { + Datacenter string `json:"datacenter,omitempty" yaml:"datacenter,omitempty"` + Datacenters string `json:"datacenters,omitempty" yaml:"datacenters,omitempty"` + DefaultDatastore string `json:"datastore,omitempty" yaml:"datastore,omitempty"` + InsecureFlag bool `json:"insecure-flag,omitempty" yaml:"insecure-flag,omitempty"` + Password string `json:"password,omitempty" yaml:"password,omitempty"` + RoundTripperCount int64 `json:"soap-roundtrip-count,omitempty" yaml:"soap-roundtrip-count,omitempty"` + User string `json:"user,omitempty" yaml:"user,omitempty"` + VCenterIP string `json:"server,omitempty" yaml:"server,omitempty"` + VCenterPort string `json:"port,omitempty" yaml:"port,omitempty"` + VMName string `json:"vm-name,omitempty" yaml:"vm-name,omitempty"` + VMUUID string `json:"vm-uuid,omitempty" yaml:"vm-uuid,omitempty"` + WorkingDir string `json:"working-dir,omitempty" yaml:"working-dir,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_glusterfs_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_glusterfs_volume_source.go new file mode 100644 index 000000000..fa5900b3f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_glusterfs_volume_source.go @@ -0,0 +1,14 @@ +package client + +const ( + GlusterfsVolumeSourceType = "glusterfsVolumeSource" + GlusterfsVolumeSourceFieldEndpointsName = "endpoints" + GlusterfsVolumeSourceFieldPath = "path" + GlusterfsVolumeSourceFieldReadOnly = "readOnly" +) + +type GlusterfsVolumeSource struct { + EndpointsName string `json:"endpoints,omitempty" yaml:"endpoints,omitempty"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_google_oauth_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_google_oauth_config.go new file mode 100644 index 000000000..f44142293 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_google_oauth_config.go @@ -0,0 +1,46 @@ +package client + +const ( + GoogleOauthConfigType = "googleOauthConfig" + GoogleOauthConfigFieldAccessMode = "accessMode" + GoogleOauthConfigFieldAdminEmail = "adminEmail" + GoogleOauthConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + GoogleOauthConfigFieldAnnotations = "annotations" + GoogleOauthConfigFieldCreated = "created" + GoogleOauthConfigFieldCreatorID = "creatorId" + GoogleOauthConfigFieldEnabled = "enabled" + GoogleOauthConfigFieldHostname = "hostname" + GoogleOauthConfigFieldLabels = "labels" + GoogleOauthConfigFieldName = "name" + GoogleOauthConfigFieldNestedGroupMembershipEnabled = "nestedGroupMembershipEnabled" + GoogleOauthConfigFieldOauthCredential = "oauthCredential" + GoogleOauthConfigFieldOwnerReferences = "ownerReferences" + GoogleOauthConfigFieldRemoved = "removed" + GoogleOauthConfigFieldServiceAccountCredential = "serviceAccountCredential" + GoogleOauthConfigFieldStatus = "status" + GoogleOauthConfigFieldType = "type" + GoogleOauthConfigFieldUUID = "uuid" + GoogleOauthConfigFieldUserInfoEndpoint = "userInfoEndpoint" +) + +type GoogleOauthConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AdminEmail string `json:"adminEmail,omitempty" yaml:"adminEmail,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NestedGroupMembershipEnabled bool `json:"nestedGroupMembershipEnabled,omitempty" yaml:"nestedGroupMembershipEnabled,omitempty"` + OauthCredential string `json:"oauthCredential,omitempty" yaml:"oauthCredential,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + ServiceAccountCredential string `json:"serviceAccountCredential,omitempty" yaml:"serviceAccountCredential,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserInfoEndpoint string `json:"userInfoEndpoint,omitempty" yaml:"userInfoEndpoint,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_google_oauth_config_apply_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_google_oauth_config_apply_input.go new file mode 100644 index 000000000..9b5d8c586 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_google_oauth_config_apply_input.go @@ -0,0 +1,14 @@ +package client + +const ( + GoogleOauthConfigApplyInputType = "googleOauthConfigApplyInput" + GoogleOauthConfigApplyInputFieldCode = "code" + GoogleOauthConfigApplyInputFieldEnabled = "enabled" + GoogleOauthConfigApplyInputFieldGoogleOauthConfig = "googleOauthConfig" +) + +type GoogleOauthConfigApplyInput struct { + Code string `json:"code,omitempty" yaml:"code,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + GoogleOauthConfig *GoogleOauthConfig `json:"googleOauthConfig,omitempty" yaml:"googleOauthConfig,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_google_oauth_config_test_output.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_google_oauth_config_test_output.go new file mode 100644 index 000000000..941108c06 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_google_oauth_config_test_output.go @@ -0,0 +1,10 @@ +package client + +const ( + GoogleOauthConfigTestOutputType = "googleOauthConfigTestOutput" + GoogleOauthConfigTestOutputFieldRedirectURL = "redirectUrl" +) + +type GoogleOauthConfigTestOutput struct { + RedirectURL string `json:"redirectUrl,omitempty" yaml:"redirectUrl,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_group.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_group.go new file mode 100644 index 000000000..f14da72bc --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_group.go @@ -0,0 +1,118 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + GroupType = "group" + GroupFieldAnnotations = "annotations" + GroupFieldCreated = "created" + GroupFieldCreatorID = "creatorId" + GroupFieldLabels = "labels" + GroupFieldName = "name" + GroupFieldOwnerReferences = "ownerReferences" + GroupFieldRemoved = "removed" + GroupFieldUUID = "uuid" +) + +type Group struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type GroupCollection struct { + types.Collection + Data []Group `json:"data,omitempty"` + client *GroupClient +} + +type GroupClient struct { + apiClient *Client +} + +type GroupOperations interface { + List(opts *types.ListOpts) (*GroupCollection, error) + ListAll(opts *types.ListOpts) (*GroupCollection, error) + Create(opts *Group) (*Group, error) + Update(existing *Group, updates interface{}) (*Group, error) + Replace(existing *Group) (*Group, error) + ByID(id string) (*Group, error) + Delete(container *Group) error +} + +func newGroupClient(apiClient *Client) *GroupClient { + return &GroupClient{ + apiClient: apiClient, + } +} + +func (c *GroupClient) Create(container *Group) (*Group, error) { + resp := &Group{} + err := c.apiClient.Ops.DoCreate(GroupType, container, resp) + return resp, err +} + +func (c *GroupClient) Update(existing *Group, updates interface{}) (*Group, error) { + resp := &Group{} + err := c.apiClient.Ops.DoUpdate(GroupType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *GroupClient) Replace(obj *Group) (*Group, error) { + resp := &Group{} + err := c.apiClient.Ops.DoReplace(GroupType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *GroupClient) List(opts *types.ListOpts) (*GroupCollection, error) { + resp := &GroupCollection{} + err := c.apiClient.Ops.DoList(GroupType, opts, resp) + resp.client = c + return resp, err +} + +func (c *GroupClient) ListAll(opts *types.ListOpts) (*GroupCollection, error) { + resp := &GroupCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *GroupCollection) Next() (*GroupCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &GroupCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *GroupClient) ByID(id string) (*Group, error) { + resp := &Group{} + err := c.apiClient.Ops.DoByID(GroupType, id, resp) + return resp, err +} + +func (c *GroupClient) Delete(container *Group) error { + return c.apiClient.Ops.DoResourceDelete(GroupType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_group_member.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_group_member.go new file mode 100644 index 000000000..bbcfe3466 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_group_member.go @@ -0,0 +1,122 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + GroupMemberType = "groupMember" + GroupMemberFieldAnnotations = "annotations" + GroupMemberFieldCreated = "created" + GroupMemberFieldCreatorID = "creatorId" + GroupMemberFieldGroupID = "groupId" + GroupMemberFieldLabels = "labels" + GroupMemberFieldName = "name" + GroupMemberFieldOwnerReferences = "ownerReferences" + GroupMemberFieldPrincipalID = "principalId" + GroupMemberFieldRemoved = "removed" + GroupMemberFieldUUID = "uuid" +) + +type GroupMember struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + GroupID string `json:"groupId,omitempty" yaml:"groupId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + PrincipalID string `json:"principalId,omitempty" yaml:"principalId,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type GroupMemberCollection struct { + types.Collection + Data []GroupMember `json:"data,omitempty"` + client *GroupMemberClient +} + +type GroupMemberClient struct { + apiClient *Client +} + +type GroupMemberOperations interface { + List(opts *types.ListOpts) (*GroupMemberCollection, error) + ListAll(opts *types.ListOpts) (*GroupMemberCollection, error) + Create(opts *GroupMember) (*GroupMember, error) + Update(existing *GroupMember, updates interface{}) (*GroupMember, error) + Replace(existing *GroupMember) (*GroupMember, error) + ByID(id string) (*GroupMember, error) + Delete(container *GroupMember) error +} + +func newGroupMemberClient(apiClient *Client) *GroupMemberClient { + return &GroupMemberClient{ + apiClient: apiClient, + } +} + +func (c *GroupMemberClient) Create(container *GroupMember) (*GroupMember, error) { + resp := &GroupMember{} + err := c.apiClient.Ops.DoCreate(GroupMemberType, container, resp) + return resp, err +} + +func (c *GroupMemberClient) Update(existing *GroupMember, updates interface{}) (*GroupMember, error) { + resp := &GroupMember{} + err := c.apiClient.Ops.DoUpdate(GroupMemberType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *GroupMemberClient) Replace(obj *GroupMember) (*GroupMember, error) { + resp := &GroupMember{} + err := c.apiClient.Ops.DoReplace(GroupMemberType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *GroupMemberClient) List(opts *types.ListOpts) (*GroupMemberCollection, error) { + resp := &GroupMemberCollection{} + err := c.apiClient.Ops.DoList(GroupMemberType, opts, resp) + resp.client = c + return resp, err +} + +func (c *GroupMemberClient) ListAll(opts *types.ListOpts) (*GroupMemberCollection, error) { + resp := &GroupMemberCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *GroupMemberCollection) Next() (*GroupMemberCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &GroupMemberCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *GroupMemberClient) ByID(id string) (*GroupMember, error) { + resp := &GroupMember{} + err := c.apiClient.Ops.DoByID(GroupMemberType, id, resp) + return resp, err +} + +func (c *GroupMemberClient) Delete(container *GroupMember) error { + return c.apiClient.Ops.DoResourceDelete(GroupMemberType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_harvester_cloud_provider.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_harvester_cloud_provider.go new file mode 100644 index 000000000..4075744a5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_harvester_cloud_provider.go @@ -0,0 +1,10 @@ +package client + +const ( + HarvesterCloudProviderType = "harvesterCloudProvider" + HarvesterCloudProviderFieldCloudConfig = "cloudConfig" +) + +type HarvesterCloudProvider struct { + CloudConfig string `json:"cloudConfig,omitempty" yaml:"cloudConfig,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_health_check.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_health_check.go new file mode 100644 index 000000000..b7e8e5b6f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_health_check.go @@ -0,0 +1,10 @@ +package client + +const ( + HealthCheckType = "healthCheck" + HealthCheckFieldURL = "url" +) + +type HealthCheck struct { + URL string `json:"url,omitempty" yaml:"url,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_host_path_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_host_path_volume_source.go new file mode 100644 index 000000000..cbeffd336 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_host_path_volume_source.go @@ -0,0 +1,12 @@ +package client + +const ( + HostPathVolumeSourceType = "hostPathVolumeSource" + HostPathVolumeSourceFieldPath = "path" + HostPathVolumeSourceFieldType = "type" +) + +type HostPathVolumeSource struct { + Path string `json:"path,omitempty" yaml:"path,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_identity_configuration.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_identity_configuration.go new file mode 100644 index 000000000..1cc371d3f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_identity_configuration.go @@ -0,0 +1,8 @@ +package client + +const ( + IdentityConfigurationType = "identityConfiguration" +) + +type IdentityConfiguration struct { +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_import_cluster_yaml_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_import_cluster_yaml_input.go new file mode 100644 index 000000000..4bc36257f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_import_cluster_yaml_input.go @@ -0,0 +1,16 @@ +package client + +const ( + ImportClusterYamlInputType = "importClusterYamlInput" + ImportClusterYamlInputFieldDefaultNamespace = "defaultNamespace" + ImportClusterYamlInputFieldNamespace = "namespace" + ImportClusterYamlInputFieldProjectID = "projectId" + ImportClusterYamlInputFieldYAML = "yaml" +) + +type ImportClusterYamlInput struct { + DefaultNamespace string `json:"defaultNamespace,omitempty" yaml:"defaultNamespace,omitempty"` + Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` + ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"` + YAML string `json:"yaml,omitempty" yaml:"yaml,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_import_yaml_output.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_import_yaml_output.go new file mode 100644 index 000000000..7b4a2852a --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_import_yaml_output.go @@ -0,0 +1,10 @@ +package client + +const ( + ImportYamlOutputType = "importYamlOutput" + ImportYamlOutputFieldMessage = "message" +) + +type ImportYamlOutput struct { + Message string `json:"message,omitempty" yaml:"message,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_imported_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_imported_config.go new file mode 100644 index 000000000..b3a9699cc --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_imported_config.go @@ -0,0 +1,10 @@ +package client + +const ( + ImportedConfigType = "importedConfig" + ImportedConfigFieldKubeConfig = "kubeConfig" +) + +type ImportedConfig struct { + KubeConfig string `json:"kubeConfig,omitempty" yaml:"kubeConfig,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_info.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_info.go new file mode 100644 index 000000000..1f3715179 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_info.go @@ -0,0 +1,26 @@ +package client + +const ( + InfoType = "info" + InfoFieldBuildDate = "buildDate" + InfoFieldCompiler = "compiler" + InfoFieldGitCommit = "gitCommit" + InfoFieldGitTreeState = "gitTreeState" + InfoFieldGitVersion = "gitVersion" + InfoFieldGoVersion = "goVersion" + InfoFieldMajor = "major" + InfoFieldMinor = "minor" + InfoFieldPlatform = "platform" +) + +type Info struct { + BuildDate string `json:"buildDate,omitempty" yaml:"buildDate,omitempty"` + Compiler string `json:"compiler,omitempty" yaml:"compiler,omitempty"` + GitCommit string `json:"gitCommit,omitempty" yaml:"gitCommit,omitempty"` + GitTreeState string `json:"gitTreeState,omitempty" yaml:"gitTreeState,omitempty"` + GitVersion string `json:"gitVersion,omitempty" yaml:"gitVersion,omitempty"` + GoVersion string `json:"goVersion,omitempty" yaml:"goVersion,omitempty"` + Major string `json:"major,omitempty" yaml:"major,omitempty"` + Minor string `json:"minor,omitempty" yaml:"minor,omitempty"` + Platform string `json:"platform,omitempty" yaml:"platform,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ingress_capabilities.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ingress_capabilities.go new file mode 100644 index 000000000..ff678cd70 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ingress_capabilities.go @@ -0,0 +1,12 @@ +package client + +const ( + IngressCapabilitiesType = "ingressCapabilities" + IngressCapabilitiesFieldCustomDefaultBackend = "customDefaultBackend" + IngressCapabilitiesFieldIngressProvider = "ingressProvider" +) + +type IngressCapabilities struct { + CustomDefaultBackend *bool `json:"customDefaultBackend,omitempty" yaml:"customDefaultBackend,omitempty"` + IngressProvider string `json:"ingressProvider,omitempty" yaml:"ingressProvider,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ingress_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ingress_config.go new file mode 100644 index 000000000..ac1057987 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ingress_config.go @@ -0,0 +1,42 @@ +package client + +const ( + IngressConfigType = "ingressConfig" + IngressConfigFieldDNSPolicy = "dnsPolicy" + IngressConfigFieldDefaultBackend = "defaultBackend" + IngressConfigFieldDefaultHTTPBackendPriorityClassName = "defaultHttpBackendPriorityClassName" + IngressConfigFieldDefaultIngressClass = "defaultIngressClass" + IngressConfigFieldExtraArgs = "extraArgs" + IngressConfigFieldExtraEnvs = "extraEnvs" + IngressConfigFieldExtraVolumeMounts = "extraVolumeMounts" + IngressConfigFieldExtraVolumes = "extraVolumes" + IngressConfigFieldHTTPPort = "httpPort" + IngressConfigFieldHTTPSPort = "httpsPort" + IngressConfigFieldNetworkMode = "networkMode" + IngressConfigFieldNginxIngressControllerPriorityClassName = "nginxIngressControllerPriorityClassName" + IngressConfigFieldNodeSelector = "nodeSelector" + IngressConfigFieldOptions = "options" + IngressConfigFieldProvider = "provider" + IngressConfigFieldTolerations = "tolerations" + IngressConfigFieldUpdateStrategy = "updateStrategy" +) + +type IngressConfig struct { + DNSPolicy string `json:"dnsPolicy,omitempty" yaml:"dnsPolicy,omitempty"` + DefaultBackend *bool `json:"defaultBackend,omitempty" yaml:"defaultBackend,omitempty"` + DefaultHTTPBackendPriorityClassName string `json:"defaultHttpBackendPriorityClassName,omitempty" yaml:"defaultHttpBackendPriorityClassName,omitempty"` + DefaultIngressClass *bool `json:"defaultIngressClass,omitempty" yaml:"defaultIngressClass,omitempty"` + ExtraArgs map[string]string `json:"extraArgs,omitempty" yaml:"extraArgs,omitempty"` + ExtraEnvs []interface{} `json:"extraEnvs,omitempty" yaml:"extraEnvs,omitempty"` + ExtraVolumeMounts []interface{} `json:"extraVolumeMounts,omitempty" yaml:"extraVolumeMounts,omitempty"` + ExtraVolumes []interface{} `json:"extraVolumes,omitempty" yaml:"extraVolumes,omitempty"` + HTTPPort int64 `json:"httpPort,omitempty" yaml:"httpPort,omitempty"` + HTTPSPort int64 `json:"httpsPort,omitempty" yaml:"httpsPort,omitempty"` + NetworkMode string `json:"networkMode,omitempty" yaml:"networkMode,omitempty"` + NginxIngressControllerPriorityClassName string `json:"nginxIngressControllerPriorityClassName,omitempty" yaml:"nginxIngressControllerPriorityClassName,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"` + Options map[string]string `json:"options,omitempty" yaml:"options,omitempty"` + Provider string `json:"provider,omitempty" yaml:"provider,omitempty"` + Tolerations []Toleration `json:"tolerations,omitempty" yaml:"tolerations,omitempty"` + UpdateStrategy *DaemonSetUpdateStrategy `json:"updateStrategy,omitempty" yaml:"updateStrategy,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_internal_node_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_internal_node_spec.go new file mode 100644 index 000000000..ced92343f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_internal_node_spec.go @@ -0,0 +1,18 @@ +package client + +const ( + InternalNodeSpecType = "internalNodeSpec" + InternalNodeSpecFieldPodCidr = "podCidr" + InternalNodeSpecFieldPodCidrs = "podCidrs" + InternalNodeSpecFieldProviderId = "providerId" + InternalNodeSpecFieldTaints = "taints" + InternalNodeSpecFieldUnschedulable = "unschedulable" +) + +type InternalNodeSpec struct { + PodCidr string `json:"podCidr,omitempty" yaml:"podCidr,omitempty"` + PodCidrs []string `json:"podCidrs,omitempty" yaml:"podCidrs,omitempty"` + ProviderId string `json:"providerId,omitempty" yaml:"providerId,omitempty"` + Taints []Taint `json:"taints,omitempty" yaml:"taints,omitempty"` + Unschedulable bool `json:"unschedulable,omitempty" yaml:"unschedulable,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_internal_node_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_internal_node_status.go new file mode 100644 index 000000000..7515d504e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_internal_node_status.go @@ -0,0 +1,30 @@ +package client + +const ( + InternalNodeStatusType = "internalNodeStatus" + InternalNodeStatusFieldAllocatable = "allocatable" + InternalNodeStatusFieldCapacity = "capacity" + InternalNodeStatusFieldConfig = "config" + InternalNodeStatusFieldExternalIPAddress = "externalIpAddress" + InternalNodeStatusFieldHostname = "hostname" + InternalNodeStatusFieldIPAddress = "ipAddress" + InternalNodeStatusFieldInfo = "info" + InternalNodeStatusFieldNodeConditions = "nodeConditions" + InternalNodeStatusFieldRuntimeHandlers = "runtimeHandlers" + InternalNodeStatusFieldVolumesAttached = "volumesAttached" + InternalNodeStatusFieldVolumesInUse = "volumesInUse" +) + +type InternalNodeStatus struct { + Allocatable map[string]string `json:"allocatable,omitempty" yaml:"allocatable,omitempty"` + Capacity map[string]string `json:"capacity,omitempty" yaml:"capacity,omitempty"` + Config *NodeConfigStatus `json:"config,omitempty" yaml:"config,omitempty"` + ExternalIPAddress string `json:"externalIpAddress,omitempty" yaml:"externalIpAddress,omitempty"` + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + IPAddress string `json:"ipAddress,omitempty" yaml:"ipAddress,omitempty"` + Info *NodeInfo `json:"info,omitempty" yaml:"info,omitempty"` + NodeConditions []NodeCondition `json:"nodeConditions,omitempty" yaml:"nodeConditions,omitempty"` + RuntimeHandlers []NodeRuntimeHandler `json:"runtimeHandlers,omitempty" yaml:"runtimeHandlers,omitempty"` + VolumesAttached map[string]AttachedVolume `json:"volumesAttached,omitempty" yaml:"volumesAttached,omitempty"` + VolumesInUse []string `json:"volumesInUse,omitempty" yaml:"volumesInUse,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_iscsi_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_iscsi_volume_source.go new file mode 100644 index 000000000..ef0762070 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_iscsi_volume_source.go @@ -0,0 +1,30 @@ +package client + +const ( + ISCSIVolumeSourceType = "iscsiVolumeSource" + ISCSIVolumeSourceFieldDiscoveryCHAPAuth = "chapAuthDiscovery" + ISCSIVolumeSourceFieldFSType = "fsType" + ISCSIVolumeSourceFieldIQN = "iqn" + ISCSIVolumeSourceFieldISCSIInterface = "iscsiInterface" + ISCSIVolumeSourceFieldInitiatorName = "initiatorName" + ISCSIVolumeSourceFieldLun = "lun" + ISCSIVolumeSourceFieldPortals = "portals" + ISCSIVolumeSourceFieldReadOnly = "readOnly" + ISCSIVolumeSourceFieldSecretRef = "secretRef" + ISCSIVolumeSourceFieldSessionCHAPAuth = "chapAuthSession" + ISCSIVolumeSourceFieldTargetPortal = "targetPortal" +) + +type ISCSIVolumeSource struct { + DiscoveryCHAPAuth bool `json:"chapAuthDiscovery,omitempty" yaml:"chapAuthDiscovery,omitempty"` + FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"` + IQN string `json:"iqn,omitempty" yaml:"iqn,omitempty"` + ISCSIInterface string `json:"iscsiInterface,omitempty" yaml:"iscsiInterface,omitempty"` + InitiatorName string `json:"initiatorName,omitempty" yaml:"initiatorName,omitempty"` + Lun int64 `json:"lun,omitempty" yaml:"lun,omitempty"` + Portals []string `json:"portals,omitempty" yaml:"portals,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + SecretRef *LocalObjectReference `json:"secretRef,omitempty" yaml:"secretRef,omitempty"` + SessionCHAPAuth bool `json:"chapAuthSession,omitempty" yaml:"chapAuthSession,omitempty"` + TargetPortal string `json:"targetPortal,omitempty" yaml:"targetPortal,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_k3s_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_k3s_config.go new file mode 100644 index 000000000..425cbd73f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_k3s_config.go @@ -0,0 +1,12 @@ +package client + +const ( + K3sConfigType = "k3sConfig" + K3sConfigFieldClusterUpgradeStrategy = "k3supgradeStrategy" + K3sConfigFieldVersion = "kubernetesVersion" +) + +type K3sConfig struct { + ClusterUpgradeStrategy *ClusterUpgradeStrategy `json:"k3supgradeStrategy,omitempty" yaml:"k3supgradeStrategy,omitempty"` + Version string `json:"kubernetesVersion,omitempty" yaml:"kubernetesVersion,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key.go new file mode 100644 index 000000000..0aa9ed6e7 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key.go @@ -0,0 +1,12 @@ +package client + +const ( + KeyType = "key" + KeyFieldName = "name" + KeyFieldSecret = "secret" +) + +type Key struct { + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Secret string `json:"secret,omitempty" yaml:"secret,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key_cloak_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key_cloak_config.go new file mode 100644 index 000000000..7a2b3925f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key_cloak_config.go @@ -0,0 +1,52 @@ +package client + +const ( + KeyCloakConfigType = "keyCloakConfig" + KeyCloakConfigFieldAccessMode = "accessMode" + KeyCloakConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + KeyCloakConfigFieldAnnotations = "annotations" + KeyCloakConfigFieldCreated = "created" + KeyCloakConfigFieldCreatorID = "creatorId" + KeyCloakConfigFieldDisplayNameField = "displayNameField" + KeyCloakConfigFieldEnabled = "enabled" + KeyCloakConfigFieldEntityID = "entityID" + KeyCloakConfigFieldGroupsField = "groupsField" + KeyCloakConfigFieldIDPMetadataContent = "idpMetadataContent" + KeyCloakConfigFieldLabels = "labels" + KeyCloakConfigFieldName = "name" + KeyCloakConfigFieldOwnerReferences = "ownerReferences" + KeyCloakConfigFieldRancherAPIHost = "rancherApiHost" + KeyCloakConfigFieldRemoved = "removed" + KeyCloakConfigFieldSpCert = "spCert" + KeyCloakConfigFieldSpKey = "spKey" + KeyCloakConfigFieldStatus = "status" + KeyCloakConfigFieldType = "type" + KeyCloakConfigFieldUIDField = "uidField" + KeyCloakConfigFieldUUID = "uuid" + KeyCloakConfigFieldUserNameField = "userNameField" +) + +type KeyCloakConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + DisplayNameField string `json:"displayNameField,omitempty" yaml:"displayNameField,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + EntityID string `json:"entityID,omitempty" yaml:"entityID,omitempty"` + GroupsField string `json:"groupsField,omitempty" yaml:"groupsField,omitempty"` + IDPMetadataContent string `json:"idpMetadataContent,omitempty" yaml:"idpMetadataContent,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + RancherAPIHost string `json:"rancherApiHost,omitempty" yaml:"rancherApiHost,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + SpCert string `json:"spCert,omitempty" yaml:"spCert,omitempty"` + SpKey string `json:"spKey,omitempty" yaml:"spKey,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UIDField string `json:"uidField,omitempty" yaml:"uidField,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserNameField string `json:"userNameField,omitempty" yaml:"userNameField,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key_cloak_oidcconfig.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key_cloak_oidcconfig.go new file mode 100644 index 000000000..522b444b0 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key_cloak_oidcconfig.go @@ -0,0 +1,62 @@ +package client + +const ( + KeyCloakOIDCConfigType = "keyCloakOIDCConfig" + KeyCloakOIDCConfigFieldAccessMode = "accessMode" + KeyCloakOIDCConfigFieldAcrValue = "acrValue" + KeyCloakOIDCConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + KeyCloakOIDCConfigFieldAnnotations = "annotations" + KeyCloakOIDCConfigFieldAuthEndpoint = "authEndpoint" + KeyCloakOIDCConfigFieldCertificate = "certificate" + KeyCloakOIDCConfigFieldClientID = "clientId" + KeyCloakOIDCConfigFieldClientSecret = "clientSecret" + KeyCloakOIDCConfigFieldCreated = "created" + KeyCloakOIDCConfigFieldCreatorID = "creatorId" + KeyCloakOIDCConfigFieldEnabled = "enabled" + KeyCloakOIDCConfigFieldGroupSearchEnabled = "groupSearchEnabled" + KeyCloakOIDCConfigFieldGroupsClaim = "groupsClaim" + KeyCloakOIDCConfigFieldIssuer = "issuer" + KeyCloakOIDCConfigFieldJWKSUrl = "jwksUrl" + KeyCloakOIDCConfigFieldLabels = "labels" + KeyCloakOIDCConfigFieldName = "name" + KeyCloakOIDCConfigFieldOwnerReferences = "ownerReferences" + KeyCloakOIDCConfigFieldPrivateKey = "privateKey" + KeyCloakOIDCConfigFieldRancherURL = "rancherUrl" + KeyCloakOIDCConfigFieldRemoved = "removed" + KeyCloakOIDCConfigFieldScopes = "scope" + KeyCloakOIDCConfigFieldStatus = "status" + KeyCloakOIDCConfigFieldTokenEndpoint = "tokenEndpoint" + KeyCloakOIDCConfigFieldType = "type" + KeyCloakOIDCConfigFieldUUID = "uuid" + KeyCloakOIDCConfigFieldUserInfoEndpoint = "userInfoEndpoint" +) + +type KeyCloakOIDCConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AcrValue string `json:"acrValue,omitempty" yaml:"acrValue,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + AuthEndpoint string `json:"authEndpoint,omitempty" yaml:"authEndpoint,omitempty"` + Certificate string `json:"certificate,omitempty" yaml:"certificate,omitempty"` + ClientID string `json:"clientId,omitempty" yaml:"clientId,omitempty"` + ClientSecret string `json:"clientSecret,omitempty" yaml:"clientSecret,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + GroupSearchEnabled *bool `json:"groupSearchEnabled,omitempty" yaml:"groupSearchEnabled,omitempty"` + GroupsClaim string `json:"groupsClaim,omitempty" yaml:"groupsClaim,omitempty"` + Issuer string `json:"issuer,omitempty" yaml:"issuer,omitempty"` + JWKSUrl string `json:"jwksUrl,omitempty" yaml:"jwksUrl,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + PrivateKey string `json:"privateKey,omitempty" yaml:"privateKey,omitempty"` + RancherURL string `json:"rancherUrl,omitempty" yaml:"rancherUrl,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Scopes string `json:"scope,omitempty" yaml:"scope,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + TokenEndpoint string `json:"tokenEndpoint,omitempty" yaml:"tokenEndpoint,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserInfoEndpoint string `json:"userInfoEndpoint,omitempty" yaml:"userInfoEndpoint,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key_to_path.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key_to_path.go new file mode 100644 index 000000000..de4ae6072 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_key_to_path.go @@ -0,0 +1,14 @@ +package client + +const ( + KeyToPathType = "keyToPath" + KeyToPathFieldKey = "key" + KeyToPathFieldMode = "mode" + KeyToPathFieldPath = "path" +) + +type KeyToPath struct { + Key string `json:"key,omitempty" yaml:"key,omitempty"` + Mode *int64 `json:"mode,omitempty" yaml:"mode,omitempty"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kms_configuration.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kms_configuration.go new file mode 100644 index 000000000..74ea0ed12 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kms_configuration.go @@ -0,0 +1,18 @@ +package client + +const ( + KMSConfigurationType = "kmsConfiguration" + KMSConfigurationFieldAPIVersion = "apiVersion" + KMSConfigurationFieldCacheSize = "cachesize" + KMSConfigurationFieldEndpoint = "endpoint" + KMSConfigurationFieldName = "name" + KMSConfigurationFieldTimeout = "timeout" +) + +type KMSConfiguration struct { + APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"` + CacheSize *int64 `json:"cachesize,omitempty" yaml:"cachesize,omitempty"` + Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Timeout *Duration `json:"timeout,omitempty" yaml:"timeout,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kontainer_driver.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kontainer_driver.go new file mode 100644 index 000000000..319d68a0c --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kontainer_driver.go @@ -0,0 +1,163 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + KontainerDriverType = "kontainerDriver" + KontainerDriverFieldActive = "active" + KontainerDriverFieldActualURL = "actualUrl" + KontainerDriverFieldAnnotations = "annotations" + KontainerDriverFieldBuiltIn = "builtIn" + KontainerDriverFieldChecksum = "checksum" + KontainerDriverFieldConditions = "conditions" + KontainerDriverFieldCreated = "created" + KontainerDriverFieldCreatorID = "creatorId" + KontainerDriverFieldExecutablePath = "executablePath" + KontainerDriverFieldLabels = "labels" + KontainerDriverFieldName = "name" + KontainerDriverFieldOwnerReferences = "ownerReferences" + KontainerDriverFieldRemoved = "removed" + KontainerDriverFieldState = "state" + KontainerDriverFieldTransitioning = "transitioning" + KontainerDriverFieldTransitioningMessage = "transitioningMessage" + KontainerDriverFieldUIURL = "uiUrl" + KontainerDriverFieldURL = "url" + KontainerDriverFieldUUID = "uuid" + KontainerDriverFieldWhitelistDomains = "whitelistDomains" +) + +type KontainerDriver struct { + types.Resource + Active bool `json:"active,omitempty" yaml:"active,omitempty"` + ActualURL string `json:"actualUrl,omitempty" yaml:"actualUrl,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + BuiltIn bool `json:"builtIn,omitempty" yaml:"builtIn,omitempty"` + Checksum string `json:"checksum,omitempty" yaml:"checksum,omitempty"` + Conditions []Condition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + ExecutablePath string `json:"executablePath,omitempty" yaml:"executablePath,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UIURL string `json:"uiUrl,omitempty" yaml:"uiUrl,omitempty"` + URL string `json:"url,omitempty" yaml:"url,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + WhitelistDomains []string `json:"whitelistDomains,omitempty" yaml:"whitelistDomains,omitempty"` +} + +type KontainerDriverCollection struct { + types.Collection + Data []KontainerDriver `json:"data,omitempty"` + client *KontainerDriverClient +} + +type KontainerDriverClient struct { + apiClient *Client +} + +type KontainerDriverOperations interface { + List(opts *types.ListOpts) (*KontainerDriverCollection, error) + ListAll(opts *types.ListOpts) (*KontainerDriverCollection, error) + Create(opts *KontainerDriver) (*KontainerDriver, error) + Update(existing *KontainerDriver, updates interface{}) (*KontainerDriver, error) + Replace(existing *KontainerDriver) (*KontainerDriver, error) + ByID(id string) (*KontainerDriver, error) + Delete(container *KontainerDriver) error + + ActionActivate(resource *KontainerDriver) error + + ActionDeactivate(resource *KontainerDriver) error + + CollectionActionRefresh(resource *KontainerDriverCollection) error +} + +func newKontainerDriverClient(apiClient *Client) *KontainerDriverClient { + return &KontainerDriverClient{ + apiClient: apiClient, + } +} + +func (c *KontainerDriverClient) Create(container *KontainerDriver) (*KontainerDriver, error) { + resp := &KontainerDriver{} + err := c.apiClient.Ops.DoCreate(KontainerDriverType, container, resp) + return resp, err +} + +func (c *KontainerDriverClient) Update(existing *KontainerDriver, updates interface{}) (*KontainerDriver, error) { + resp := &KontainerDriver{} + err := c.apiClient.Ops.DoUpdate(KontainerDriverType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *KontainerDriverClient) Replace(obj *KontainerDriver) (*KontainerDriver, error) { + resp := &KontainerDriver{} + err := c.apiClient.Ops.DoReplace(KontainerDriverType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *KontainerDriverClient) List(opts *types.ListOpts) (*KontainerDriverCollection, error) { + resp := &KontainerDriverCollection{} + err := c.apiClient.Ops.DoList(KontainerDriverType, opts, resp) + resp.client = c + return resp, err +} + +func (c *KontainerDriverClient) ListAll(opts *types.ListOpts) (*KontainerDriverCollection, error) { + resp := &KontainerDriverCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *KontainerDriverCollection) Next() (*KontainerDriverCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &KontainerDriverCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *KontainerDriverClient) ByID(id string) (*KontainerDriver, error) { + resp := &KontainerDriver{} + err := c.apiClient.Ops.DoByID(KontainerDriverType, id, resp) + return resp, err +} + +func (c *KontainerDriverClient) Delete(container *KontainerDriver) error { + return c.apiClient.Ops.DoResourceDelete(KontainerDriverType, &container.Resource) +} + +func (c *KontainerDriverClient) ActionActivate(resource *KontainerDriver) error { + err := c.apiClient.Ops.DoAction(KontainerDriverType, "activate", &resource.Resource, nil, nil) + return err +} + +func (c *KontainerDriverClient) ActionDeactivate(resource *KontainerDriver) error { + err := c.apiClient.Ops.DoAction(KontainerDriverType, "deactivate", &resource.Resource, nil, nil) + return err +} + +func (c *KontainerDriverClient) CollectionActionRefresh(resource *KontainerDriverCollection) error { + err := c.apiClient.Ops.DoCollectionAction(KontainerDriverType, "refresh", &resource.Collection, nil, nil) + return err +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kontainer_driver_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kontainer_driver_spec.go new file mode 100644 index 000000000..985f7d981 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kontainer_driver_spec.go @@ -0,0 +1,20 @@ +package client + +const ( + KontainerDriverSpecType = "kontainerDriverSpec" + KontainerDriverSpecFieldActive = "active" + KontainerDriverSpecFieldBuiltIn = "builtIn" + KontainerDriverSpecFieldChecksum = "checksum" + KontainerDriverSpecFieldUIURL = "uiUrl" + KontainerDriverSpecFieldURL = "url" + KontainerDriverSpecFieldWhitelistDomains = "whitelistDomains" +) + +type KontainerDriverSpec struct { + Active bool `json:"active,omitempty" yaml:"active,omitempty"` + BuiltIn bool `json:"builtIn,omitempty" yaml:"builtIn,omitempty"` + Checksum string `json:"checksum,omitempty" yaml:"checksum,omitempty"` + UIURL string `json:"uiUrl,omitempty" yaml:"uiUrl,omitempty"` + URL string `json:"url,omitempty" yaml:"url,omitempty"` + WhitelistDomains []string `json:"whitelistDomains,omitempty" yaml:"whitelistDomains,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kontainer_driver_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kontainer_driver_status.go new file mode 100644 index 000000000..9ea025d69 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kontainer_driver_status.go @@ -0,0 +1,16 @@ +package client + +const ( + KontainerDriverStatusType = "kontainerDriverStatus" + KontainerDriverStatusFieldActualURL = "actualUrl" + KontainerDriverStatusFieldConditions = "conditions" + KontainerDriverStatusFieldDisplayName = "displayName" + KontainerDriverStatusFieldExecutablePath = "executablePath" +) + +type KontainerDriverStatus struct { + ActualURL string `json:"actualUrl,omitempty" yaml:"actualUrl,omitempty"` + Conditions []Condition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` + ExecutablePath string `json:"executablePath,omitempty" yaml:"executablePath,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kube_apiservice.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kube_apiservice.go new file mode 100644 index 000000000..b55abd857 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kube_apiservice.go @@ -0,0 +1,42 @@ +package client + +const ( + KubeAPIServiceType = "kubeAPIService" + KubeAPIServiceFieldAdmissionConfiguration = "admissionConfiguration" + KubeAPIServiceFieldAlwaysPullImages = "alwaysPullImages" + KubeAPIServiceFieldAuditLog = "auditLog" + KubeAPIServiceFieldEventRateLimit = "eventRateLimit" + KubeAPIServiceFieldExtraArgs = "extraArgs" + KubeAPIServiceFieldExtraArgsArray = "extraArgsArray" + KubeAPIServiceFieldExtraBinds = "extraBinds" + KubeAPIServiceFieldExtraEnv = "extraEnv" + KubeAPIServiceFieldImage = "image" + KubeAPIServiceFieldPodSecurityConfiguration = "podSecurityConfiguration" + KubeAPIServiceFieldSecretsEncryptionConfig = "secretsEncryptionConfig" + KubeAPIServiceFieldServiceClusterIPRange = "serviceClusterIpRange" + KubeAPIServiceFieldServiceNodePortRange = "serviceNodePortRange" + KubeAPIServiceFieldWindowsExtraArgs = "winExtraArgs" + KubeAPIServiceFieldWindowsExtraArgsArray = "winExtraArgsArray" + KubeAPIServiceFieldWindowsExtraBinds = "winExtraBinds" + KubeAPIServiceFieldWindowsExtraEnv = "winExtraEnv" +) + +type KubeAPIService struct { + AdmissionConfiguration map[string]interface{} `json:"admissionConfiguration,omitempty" yaml:"admissionConfiguration,omitempty"` + AlwaysPullImages bool `json:"alwaysPullImages,omitempty" yaml:"alwaysPullImages,omitempty"` + AuditLog *AuditLog `json:"auditLog,omitempty" yaml:"auditLog,omitempty"` + EventRateLimit *EventRateLimit `json:"eventRateLimit,omitempty" yaml:"eventRateLimit,omitempty"` + ExtraArgs map[string]string `json:"extraArgs,omitempty" yaml:"extraArgs,omitempty"` + ExtraArgsArray map[string][]string `json:"extraArgsArray,omitempty" yaml:"extraArgsArray,omitempty"` + ExtraBinds []string `json:"extraBinds,omitempty" yaml:"extraBinds,omitempty"` + ExtraEnv []string `json:"extraEnv,omitempty" yaml:"extraEnv,omitempty"` + Image string `json:"image,omitempty" yaml:"image,omitempty"` + PodSecurityConfiguration string `json:"podSecurityConfiguration,omitempty" yaml:"podSecurityConfiguration,omitempty"` + SecretsEncryptionConfig *SecretsEncryptionConfig `json:"secretsEncryptionConfig,omitempty" yaml:"secretsEncryptionConfig,omitempty"` + ServiceClusterIPRange string `json:"serviceClusterIpRange,omitempty" yaml:"serviceClusterIpRange,omitempty"` + ServiceNodePortRange string `json:"serviceNodePortRange,omitempty" yaml:"serviceNodePortRange,omitempty"` + WindowsExtraArgs map[string]string `json:"winExtraArgs,omitempty" yaml:"winExtraArgs,omitempty"` + WindowsExtraArgsArray map[string][]string `json:"winExtraArgsArray,omitempty" yaml:"winExtraArgsArray,omitempty"` + WindowsExtraBinds []string `json:"winExtraBinds,omitempty" yaml:"winExtraBinds,omitempty"` + WindowsExtraEnv []string `json:"winExtraEnv,omitempty" yaml:"winExtraEnv,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kube_controller_service.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kube_controller_service.go new file mode 100644 index 000000000..304cecf82 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kube_controller_service.go @@ -0,0 +1,30 @@ +package client + +const ( + KubeControllerServiceType = "kubeControllerService" + KubeControllerServiceFieldClusterCIDR = "clusterCidr" + KubeControllerServiceFieldExtraArgs = "extraArgs" + KubeControllerServiceFieldExtraArgsArray = "extraArgsArray" + KubeControllerServiceFieldExtraBinds = "extraBinds" + KubeControllerServiceFieldExtraEnv = "extraEnv" + KubeControllerServiceFieldImage = "image" + KubeControllerServiceFieldServiceClusterIPRange = "serviceClusterIpRange" + KubeControllerServiceFieldWindowsExtraArgs = "winExtraArgs" + KubeControllerServiceFieldWindowsExtraArgsArray = "winExtraArgsArray" + KubeControllerServiceFieldWindowsExtraBinds = "winExtraBinds" + KubeControllerServiceFieldWindowsExtraEnv = "winExtraEnv" +) + +type KubeControllerService struct { + ClusterCIDR string `json:"clusterCidr,omitempty" yaml:"clusterCidr,omitempty"` + ExtraArgs map[string]string `json:"extraArgs,omitempty" yaml:"extraArgs,omitempty"` + ExtraArgsArray map[string][]string `json:"extraArgsArray,omitempty" yaml:"extraArgsArray,omitempty"` + ExtraBinds []string `json:"extraBinds,omitempty" yaml:"extraBinds,omitempty"` + ExtraEnv []string `json:"extraEnv,omitempty" yaml:"extraEnv,omitempty"` + Image string `json:"image,omitempty" yaml:"image,omitempty"` + ServiceClusterIPRange string `json:"serviceClusterIpRange,omitempty" yaml:"serviceClusterIpRange,omitempty"` + WindowsExtraArgs map[string]string `json:"winExtraArgs,omitempty" yaml:"winExtraArgs,omitempty"` + WindowsExtraArgsArray map[string][]string `json:"winExtraArgsArray,omitempty" yaml:"winExtraArgsArray,omitempty"` + WindowsExtraBinds []string `json:"winExtraBinds,omitempty" yaml:"winExtraBinds,omitempty"` + WindowsExtraEnv []string `json:"winExtraEnv,omitempty" yaml:"winExtraEnv,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubelet_service.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubelet_service.go new file mode 100644 index 000000000..7474a10d4 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubelet_service.go @@ -0,0 +1,36 @@ +package client + +const ( + KubeletServiceType = "kubeletService" + KubeletServiceFieldClusterDNSServer = "clusterDnsServer" + KubeletServiceFieldClusterDomain = "clusterDomain" + KubeletServiceFieldExtraArgs = "extraArgs" + KubeletServiceFieldExtraArgsArray = "extraArgsArray" + KubeletServiceFieldExtraBinds = "extraBinds" + KubeletServiceFieldExtraEnv = "extraEnv" + KubeletServiceFieldFailSwapOn = "failSwapOn" + KubeletServiceFieldGenerateServingCertificate = "generateServingCertificate" + KubeletServiceFieldImage = "image" + KubeletServiceFieldInfraContainerImage = "infraContainerImage" + KubeletServiceFieldWindowsExtraArgs = "winExtraArgs" + KubeletServiceFieldWindowsExtraArgsArray = "winExtraArgsArray" + KubeletServiceFieldWindowsExtraBinds = "winExtraBinds" + KubeletServiceFieldWindowsExtraEnv = "winExtraEnv" +) + +type KubeletService struct { + ClusterDNSServer string `json:"clusterDnsServer,omitempty" yaml:"clusterDnsServer,omitempty"` + ClusterDomain string `json:"clusterDomain,omitempty" yaml:"clusterDomain,omitempty"` + ExtraArgs map[string]string `json:"extraArgs,omitempty" yaml:"extraArgs,omitempty"` + ExtraArgsArray map[string][]string `json:"extraArgsArray,omitempty" yaml:"extraArgsArray,omitempty"` + ExtraBinds []string `json:"extraBinds,omitempty" yaml:"extraBinds,omitempty"` + ExtraEnv []string `json:"extraEnv,omitempty" yaml:"extraEnv,omitempty"` + FailSwapOn bool `json:"failSwapOn,omitempty" yaml:"failSwapOn,omitempty"` + GenerateServingCertificate bool `json:"generateServingCertificate,omitempty" yaml:"generateServingCertificate,omitempty"` + Image string `json:"image,omitempty" yaml:"image,omitempty"` + InfraContainerImage string `json:"infraContainerImage,omitempty" yaml:"infraContainerImage,omitempty"` + WindowsExtraArgs map[string]string `json:"winExtraArgs,omitempty" yaml:"winExtraArgs,omitempty"` + WindowsExtraArgsArray map[string][]string `json:"winExtraArgsArray,omitempty" yaml:"winExtraArgsArray,omitempty"` + WindowsExtraBinds []string `json:"winExtraBinds,omitempty" yaml:"winExtraBinds,omitempty"` + WindowsExtraEnv []string `json:"winExtraEnv,omitempty" yaml:"winExtraEnv,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubeproxy_service.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubeproxy_service.go new file mode 100644 index 000000000..9159447ba --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubeproxy_service.go @@ -0,0 +1,26 @@ +package client + +const ( + KubeproxyServiceType = "kubeproxyService" + KubeproxyServiceFieldExtraArgs = "extraArgs" + KubeproxyServiceFieldExtraArgsArray = "extraArgsArray" + KubeproxyServiceFieldExtraBinds = "extraBinds" + KubeproxyServiceFieldExtraEnv = "extraEnv" + KubeproxyServiceFieldImage = "image" + KubeproxyServiceFieldWindowsExtraArgs = "winExtraArgs" + KubeproxyServiceFieldWindowsExtraArgsArray = "winExtraArgsArray" + KubeproxyServiceFieldWindowsExtraBinds = "winExtraBinds" + KubeproxyServiceFieldWindowsExtraEnv = "winExtraEnv" +) + +type KubeproxyService struct { + ExtraArgs map[string]string `json:"extraArgs,omitempty" yaml:"extraArgs,omitempty"` + ExtraArgsArray map[string][]string `json:"extraArgsArray,omitempty" yaml:"extraArgsArray,omitempty"` + ExtraBinds []string `json:"extraBinds,omitempty" yaml:"extraBinds,omitempty"` + ExtraEnv []string `json:"extraEnv,omitempty" yaml:"extraEnv,omitempty"` + Image string `json:"image,omitempty" yaml:"image,omitempty"` + WindowsExtraArgs map[string]string `json:"winExtraArgs,omitempty" yaml:"winExtraArgs,omitempty"` + WindowsExtraArgsArray map[string][]string `json:"winExtraArgsArray,omitempty" yaml:"winExtraArgsArray,omitempty"` + WindowsExtraBinds []string `json:"winExtraBinds,omitempty" yaml:"winExtraBinds,omitempty"` + WindowsExtraEnv []string `json:"winExtraEnv,omitempty" yaml:"winExtraEnv,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubernetes_info.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubernetes_info.go new file mode 100644 index 000000000..69aa0588c --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubernetes_info.go @@ -0,0 +1,12 @@ +package client + +const ( + KubernetesInfoType = "kubernetesInfo" + KubernetesInfoFieldKubeProxyVersion = "kubeProxyVersion" + KubernetesInfoFieldKubeletVersion = "kubeletVersion" +) + +type KubernetesInfo struct { + KubeProxyVersion string `json:"kubeProxyVersion,omitempty" yaml:"kubeProxyVersion,omitempty"` + KubeletVersion string `json:"kubeletVersion,omitempty" yaml:"kubeletVersion,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubernetes_services_options.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubernetes_services_options.go new file mode 100644 index 000000000..b2fe33cee --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_kubernetes_services_options.go @@ -0,0 +1,20 @@ +package client + +const ( + KubernetesServicesOptionsType = "kubernetesServicesOptions" + KubernetesServicesOptionsFieldEtcd = "etcd" + KubernetesServicesOptionsFieldKubeAPI = "kubeapi" + KubernetesServicesOptionsFieldKubeController = "kubeController" + KubernetesServicesOptionsFieldKubelet = "kubelet" + KubernetesServicesOptionsFieldKubeproxy = "kubeproxy" + KubernetesServicesOptionsFieldScheduler = "scheduler" +) + +type KubernetesServicesOptions struct { + Etcd map[string]string `json:"etcd,omitempty" yaml:"etcd,omitempty"` + KubeAPI map[string]string `json:"kubeapi,omitempty" yaml:"kubeapi,omitempty"` + KubeController map[string]string `json:"kubeController,omitempty" yaml:"kubeController,omitempty"` + Kubelet map[string]string `json:"kubelet,omitempty" yaml:"kubelet,omitempty"` + Kubeproxy map[string]string `json:"kubeproxy,omitempty" yaml:"kubeproxy,omitempty"` + Scheduler map[string]string `json:"scheduler,omitempty" yaml:"scheduler,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_label_selector.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_label_selector.go new file mode 100644 index 000000000..27162cf29 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_label_selector.go @@ -0,0 +1,12 @@ +package client + +const ( + LabelSelectorType = "labelSelector" + LabelSelectorFieldMatchExpressions = "matchExpressions" + LabelSelectorFieldMatchLabels = "matchLabels" +) + +type LabelSelector struct { + MatchExpressions []LabelSelectorRequirement `json:"matchExpressions,omitempty" yaml:"matchExpressions,omitempty"` + MatchLabels map[string]string `json:"matchLabels,omitempty" yaml:"matchLabels,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_label_selector_requirement.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_label_selector_requirement.go new file mode 100644 index 000000000..3a875acbb --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_label_selector_requirement.go @@ -0,0 +1,14 @@ +package client + +const ( + LabelSelectorRequirementType = "labelSelectorRequirement" + LabelSelectorRequirementFieldKey = "key" + LabelSelectorRequirementFieldOperator = "operator" + LabelSelectorRequirementFieldValues = "values" +) + +type LabelSelectorRequirement struct { + Key string `json:"key,omitempty" yaml:"key,omitempty"` + Operator string `json:"operator,omitempty" yaml:"operator,omitempty"` + Values []string `json:"values,omitempty" yaml:"values,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_launch_template.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_launch_template.go new file mode 100644 index 000000000..a5d4c84cb --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_launch_template.go @@ -0,0 +1,14 @@ +package client + +const ( + LaunchTemplateType = "launchTemplate" + LaunchTemplateFieldID = "id" + LaunchTemplateFieldName = "name" + LaunchTemplateFieldVersion = "version" +) + +type LaunchTemplate struct { + ID *string `json:"id,omitempty" yaml:"id,omitempty"` + Name *string `json:"name,omitempty" yaml:"name,omitempty"` + Version *int64 `json:"version,omitempty" yaml:"version,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ldap_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ldap_config.go new file mode 100644 index 000000000..73a21c5ef --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ldap_config.go @@ -0,0 +1,180 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + LdapConfigType = "ldapConfig" + LdapConfigFieldAccessMode = "accessMode" + LdapConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + LdapConfigFieldAnnotations = "annotations" + LdapConfigFieldCertificate = "certificate" + LdapConfigFieldConnectionTimeout = "connectionTimeout" + LdapConfigFieldCreated = "created" + LdapConfigFieldCreatorID = "creatorId" + LdapConfigFieldEnabled = "enabled" + LdapConfigFieldGroupDNAttribute = "groupDNAttribute" + LdapConfigFieldGroupMemberMappingAttribute = "groupMemberMappingAttribute" + LdapConfigFieldGroupMemberUserAttribute = "groupMemberUserAttribute" + LdapConfigFieldGroupNameAttribute = "groupNameAttribute" + LdapConfigFieldGroupObjectClass = "groupObjectClass" + LdapConfigFieldGroupSearchAttribute = "groupSearchAttribute" + LdapConfigFieldGroupSearchBase = "groupSearchBase" + LdapConfigFieldGroupSearchFilter = "groupSearchFilter" + LdapConfigFieldLabels = "labels" + LdapConfigFieldName = "name" + LdapConfigFieldNestedGroupMembershipEnabled = "nestedGroupMembershipEnabled" + LdapConfigFieldOwnerReferences = "ownerReferences" + LdapConfigFieldPort = "port" + LdapConfigFieldRemoved = "removed" + LdapConfigFieldServers = "servers" + LdapConfigFieldServiceAccountDistinguishedName = "serviceAccountDistinguishedName" + LdapConfigFieldServiceAccountPassword = "serviceAccountPassword" + LdapConfigFieldStartTLS = "starttls" + LdapConfigFieldStatus = "status" + LdapConfigFieldTLS = "tls" + LdapConfigFieldType = "type" + LdapConfigFieldUUID = "uuid" + LdapConfigFieldUserDisabledBitMask = "userDisabledBitMask" + LdapConfigFieldUserEnabledAttribute = "userEnabledAttribute" + LdapConfigFieldUserLoginAttribute = "userLoginAttribute" + LdapConfigFieldUserMemberAttribute = "userMemberAttribute" + LdapConfigFieldUserNameAttribute = "userNameAttribute" + LdapConfigFieldUserObjectClass = "userObjectClass" + LdapConfigFieldUserSearchAttribute = "userSearchAttribute" + LdapConfigFieldUserSearchBase = "userSearchBase" + LdapConfigFieldUserSearchFilter = "userSearchFilter" +) + +type LdapConfig struct { + types.Resource + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Certificate string `json:"certificate,omitempty" yaml:"certificate,omitempty"` + ConnectionTimeout int64 `json:"connectionTimeout,omitempty" yaml:"connectionTimeout,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + GroupDNAttribute string `json:"groupDNAttribute,omitempty" yaml:"groupDNAttribute,omitempty"` + GroupMemberMappingAttribute string `json:"groupMemberMappingAttribute,omitempty" yaml:"groupMemberMappingAttribute,omitempty"` + GroupMemberUserAttribute string `json:"groupMemberUserAttribute,omitempty" yaml:"groupMemberUserAttribute,omitempty"` + GroupNameAttribute string `json:"groupNameAttribute,omitempty" yaml:"groupNameAttribute,omitempty"` + GroupObjectClass string `json:"groupObjectClass,omitempty" yaml:"groupObjectClass,omitempty"` + GroupSearchAttribute string `json:"groupSearchAttribute,omitempty" yaml:"groupSearchAttribute,omitempty"` + GroupSearchBase string `json:"groupSearchBase,omitempty" yaml:"groupSearchBase,omitempty"` + GroupSearchFilter string `json:"groupSearchFilter,omitempty" yaml:"groupSearchFilter,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NestedGroupMembershipEnabled bool `json:"nestedGroupMembershipEnabled,omitempty" yaml:"nestedGroupMembershipEnabled,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Servers []string `json:"servers,omitempty" yaml:"servers,omitempty"` + ServiceAccountDistinguishedName string `json:"serviceAccountDistinguishedName,omitempty" yaml:"serviceAccountDistinguishedName,omitempty"` + ServiceAccountPassword string `json:"serviceAccountPassword,omitempty" yaml:"serviceAccountPassword,omitempty"` + StartTLS bool `json:"starttls,omitempty" yaml:"starttls,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + TLS bool `json:"tls,omitempty" yaml:"tls,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserDisabledBitMask int64 `json:"userDisabledBitMask,omitempty" yaml:"userDisabledBitMask,omitempty"` + UserEnabledAttribute string `json:"userEnabledAttribute,omitempty" yaml:"userEnabledAttribute,omitempty"` + UserLoginAttribute string `json:"userLoginAttribute,omitempty" yaml:"userLoginAttribute,omitempty"` + UserMemberAttribute string `json:"userMemberAttribute,omitempty" yaml:"userMemberAttribute,omitempty"` + UserNameAttribute string `json:"userNameAttribute,omitempty" yaml:"userNameAttribute,omitempty"` + UserObjectClass string `json:"userObjectClass,omitempty" yaml:"userObjectClass,omitempty"` + UserSearchAttribute string `json:"userSearchAttribute,omitempty" yaml:"userSearchAttribute,omitempty"` + UserSearchBase string `json:"userSearchBase,omitempty" yaml:"userSearchBase,omitempty"` + UserSearchFilter string `json:"userSearchFilter,omitempty" yaml:"userSearchFilter,omitempty"` +} + +type LdapConfigCollection struct { + types.Collection + Data []LdapConfig `json:"data,omitempty"` + client *LdapConfigClient +} + +type LdapConfigClient struct { + apiClient *Client +} + +type LdapConfigOperations interface { + List(opts *types.ListOpts) (*LdapConfigCollection, error) + ListAll(opts *types.ListOpts) (*LdapConfigCollection, error) + Create(opts *LdapConfig) (*LdapConfig, error) + Update(existing *LdapConfig, updates interface{}) (*LdapConfig, error) + Replace(existing *LdapConfig) (*LdapConfig, error) + ByID(id string) (*LdapConfig, error) + Delete(container *LdapConfig) error +} + +func newLdapConfigClient(apiClient *Client) *LdapConfigClient { + return &LdapConfigClient{ + apiClient: apiClient, + } +} + +func (c *LdapConfigClient) Create(container *LdapConfig) (*LdapConfig, error) { + resp := &LdapConfig{} + err := c.apiClient.Ops.DoCreate(LdapConfigType, container, resp) + return resp, err +} + +func (c *LdapConfigClient) Update(existing *LdapConfig, updates interface{}) (*LdapConfig, error) { + resp := &LdapConfig{} + err := c.apiClient.Ops.DoUpdate(LdapConfigType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LdapConfigClient) Replace(obj *LdapConfig) (*LdapConfig, error) { + resp := &LdapConfig{} + err := c.apiClient.Ops.DoReplace(LdapConfigType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *LdapConfigClient) List(opts *types.ListOpts) (*LdapConfigCollection, error) { + resp := &LdapConfigCollection{} + err := c.apiClient.Ops.DoList(LdapConfigType, opts, resp) + resp.client = c + return resp, err +} + +func (c *LdapConfigClient) ListAll(opts *types.ListOpts) (*LdapConfigCollection, error) { + resp := &LdapConfigCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *LdapConfigCollection) Next() (*LdapConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LdapConfigCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *LdapConfigClient) ByID(id string) (*LdapConfig, error) { + resp := &LdapConfig{} + err := c.apiClient.Ops.DoByID(LdapConfigType, id, resp) + return resp, err +} + +func (c *LdapConfigClient) Delete(container *LdapConfig) error { + return c.apiClient.Ops.DoResourceDelete(LdapConfigType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ldap_fields.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ldap_fields.go new file mode 100644 index 000000000..7c342d176 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ldap_fields.go @@ -0,0 +1,60 @@ +package client + +const ( + LdapFieldsType = "ldapFields" + LdapFieldsFieldCertificate = "certificate" + LdapFieldsFieldConnectionTimeout = "connectionTimeout" + LdapFieldsFieldGroupDNAttribute = "groupDNAttribute" + LdapFieldsFieldGroupMemberMappingAttribute = "groupMemberMappingAttribute" + LdapFieldsFieldGroupMemberUserAttribute = "groupMemberUserAttribute" + LdapFieldsFieldGroupNameAttribute = "groupNameAttribute" + LdapFieldsFieldGroupObjectClass = "groupObjectClass" + LdapFieldsFieldGroupSearchAttribute = "groupSearchAttribute" + LdapFieldsFieldGroupSearchBase = "groupSearchBase" + LdapFieldsFieldGroupSearchFilter = "groupSearchFilter" + LdapFieldsFieldNestedGroupMembershipEnabled = "nestedGroupMembershipEnabled" + LdapFieldsFieldPort = "port" + LdapFieldsFieldServers = "servers" + LdapFieldsFieldServiceAccountDistinguishedName = "serviceAccountDistinguishedName" + LdapFieldsFieldServiceAccountPassword = "serviceAccountPassword" + LdapFieldsFieldStartTLS = "starttls" + LdapFieldsFieldTLS = "tls" + LdapFieldsFieldUserDisabledBitMask = "userDisabledBitMask" + LdapFieldsFieldUserEnabledAttribute = "userEnabledAttribute" + LdapFieldsFieldUserLoginAttribute = "userLoginAttribute" + LdapFieldsFieldUserMemberAttribute = "userMemberAttribute" + LdapFieldsFieldUserNameAttribute = "userNameAttribute" + LdapFieldsFieldUserObjectClass = "userObjectClass" + LdapFieldsFieldUserSearchAttribute = "userSearchAttribute" + LdapFieldsFieldUserSearchBase = "userSearchBase" + LdapFieldsFieldUserSearchFilter = "userSearchFilter" +) + +type LdapFields struct { + Certificate string `json:"certificate,omitempty" yaml:"certificate,omitempty"` + ConnectionTimeout int64 `json:"connectionTimeout,omitempty" yaml:"connectionTimeout,omitempty"` + GroupDNAttribute string `json:"groupDNAttribute,omitempty" yaml:"groupDNAttribute,omitempty"` + GroupMemberMappingAttribute string `json:"groupMemberMappingAttribute,omitempty" yaml:"groupMemberMappingAttribute,omitempty"` + GroupMemberUserAttribute string `json:"groupMemberUserAttribute,omitempty" yaml:"groupMemberUserAttribute,omitempty"` + GroupNameAttribute string `json:"groupNameAttribute,omitempty" yaml:"groupNameAttribute,omitempty"` + GroupObjectClass string `json:"groupObjectClass,omitempty" yaml:"groupObjectClass,omitempty"` + GroupSearchAttribute string `json:"groupSearchAttribute,omitempty" yaml:"groupSearchAttribute,omitempty"` + GroupSearchBase string `json:"groupSearchBase,omitempty" yaml:"groupSearchBase,omitempty"` + GroupSearchFilter string `json:"groupSearchFilter,omitempty" yaml:"groupSearchFilter,omitempty"` + NestedGroupMembershipEnabled bool `json:"nestedGroupMembershipEnabled,omitempty" yaml:"nestedGroupMembershipEnabled,omitempty"` + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + Servers []string `json:"servers,omitempty" yaml:"servers,omitempty"` + ServiceAccountDistinguishedName string `json:"serviceAccountDistinguishedName,omitempty" yaml:"serviceAccountDistinguishedName,omitempty"` + ServiceAccountPassword string `json:"serviceAccountPassword,omitempty" yaml:"serviceAccountPassword,omitempty"` + StartTLS bool `json:"starttls,omitempty" yaml:"starttls,omitempty"` + TLS bool `json:"tls,omitempty" yaml:"tls,omitempty"` + UserDisabledBitMask int64 `json:"userDisabledBitMask,omitempty" yaml:"userDisabledBitMask,omitempty"` + UserEnabledAttribute string `json:"userEnabledAttribute,omitempty" yaml:"userEnabledAttribute,omitempty"` + UserLoginAttribute string `json:"userLoginAttribute,omitempty" yaml:"userLoginAttribute,omitempty"` + UserMemberAttribute string `json:"userMemberAttribute,omitempty" yaml:"userMemberAttribute,omitempty"` + UserNameAttribute string `json:"userNameAttribute,omitempty" yaml:"userNameAttribute,omitempty"` + UserObjectClass string `json:"userObjectClass,omitempty" yaml:"userObjectClass,omitempty"` + UserSearchAttribute string `json:"userSearchAttribute,omitempty" yaml:"userSearchAttribute,omitempty"` + UserSearchBase string `json:"userSearchBase,omitempty" yaml:"userSearchBase,omitempty"` + UserSearchFilter string `json:"userSearchFilter,omitempty" yaml:"userSearchFilter,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_linear_autoscaler_params.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_linear_autoscaler_params.go new file mode 100644 index 000000000..f9ed17d6e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_linear_autoscaler_params.go @@ -0,0 +1,18 @@ +package client + +const ( + LinearAutoscalerParamsType = "linearAutoscalerParams" + LinearAutoscalerParamsFieldCoresPerReplica = "coresPerReplica" + LinearAutoscalerParamsFieldMax = "max" + LinearAutoscalerParamsFieldMin = "min" + LinearAutoscalerParamsFieldNodesPerReplica = "nodesPerReplica" + LinearAutoscalerParamsFieldPreventSinglePointFailure = "preventSinglePointFailure" +) + +type LinearAutoscalerParams struct { + CoresPerReplica float64 `json:"coresPerReplica,omitempty" yaml:"coresPerReplica,omitempty"` + Max int64 `json:"max,omitempty" yaml:"max,omitempty"` + Min int64 `json:"min,omitempty" yaml:"min,omitempty"` + NodesPerReplica float64 `json:"nodesPerReplica,omitempty" yaml:"nodesPerReplica,omitempty"` + PreventSinglePointFailure bool `json:"preventSinglePointFailure,omitempty" yaml:"preventSinglePointFailure,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_load_balancer_capabilities.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_load_balancer_capabilities.go new file mode 100644 index 000000000..6258b573d --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_load_balancer_capabilities.go @@ -0,0 +1,16 @@ +package client + +const ( + LoadBalancerCapabilitiesType = "loadBalancerCapabilities" + LoadBalancerCapabilitiesFieldEnabled = "enabled" + LoadBalancerCapabilitiesFieldHealthCheckSupported = "healthCheckSupported" + LoadBalancerCapabilitiesFieldProtocolsSupported = "protocolsSupported" + LoadBalancerCapabilitiesFieldProvider = "provider" +) + +type LoadBalancerCapabilities struct { + Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + HealthCheckSupported bool `json:"healthCheckSupported,omitempty" yaml:"healthCheckSupported,omitempty"` + ProtocolsSupported []string `json:"protocolsSupported,omitempty" yaml:"protocolsSupported,omitempty"` + Provider string `json:"provider,omitempty" yaml:"provider,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_load_balancer_openstack_opts.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_load_balancer_openstack_opts.go new file mode 100644 index 000000000..bd4f38686 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_load_balancer_openstack_opts.go @@ -0,0 +1,30 @@ +package client + +const ( + LoadBalancerOpenstackOptsType = "loadBalancerOpenstackOpts" + LoadBalancerOpenstackOptsFieldCreateMonitor = "create-monitor" + LoadBalancerOpenstackOptsFieldFloatingNetworkID = "floating-network-id" + LoadBalancerOpenstackOptsFieldLBMethod = "lb-method" + LoadBalancerOpenstackOptsFieldLBProvider = "lb-provider" + LoadBalancerOpenstackOptsFieldLBVersion = "lb-version" + LoadBalancerOpenstackOptsFieldManageSecurityGroups = "manage-security-groups" + LoadBalancerOpenstackOptsFieldMonitorDelay = "monitor-delay" + LoadBalancerOpenstackOptsFieldMonitorMaxRetries = "monitor-max-retries" + LoadBalancerOpenstackOptsFieldMonitorTimeout = "monitor-timeout" + LoadBalancerOpenstackOptsFieldSubnetID = "subnet-id" + LoadBalancerOpenstackOptsFieldUseOctavia = "use-octavia" +) + +type LoadBalancerOpenstackOpts struct { + CreateMonitor bool `json:"create-monitor,omitempty" yaml:"create-monitor,omitempty"` + FloatingNetworkID string `json:"floating-network-id,omitempty" yaml:"floating-network-id,omitempty"` + LBMethod string `json:"lb-method,omitempty" yaml:"lb-method,omitempty"` + LBProvider string `json:"lb-provider,omitempty" yaml:"lb-provider,omitempty"` + LBVersion string `json:"lb-version,omitempty" yaml:"lb-version,omitempty"` + ManageSecurityGroups bool `json:"manage-security-groups,omitempty" yaml:"manage-security-groups,omitempty"` + MonitorDelay string `json:"monitor-delay,omitempty" yaml:"monitor-delay,omitempty"` + MonitorMaxRetries int64 `json:"monitor-max-retries,omitempty" yaml:"monitor-max-retries,omitempty"` + MonitorTimeout string `json:"monitor-timeout,omitempty" yaml:"monitor-timeout,omitempty"` + SubnetID string `json:"subnet-id,omitempty" yaml:"subnet-id,omitempty"` + UseOctavia bool `json:"use-octavia,omitempty" yaml:"use-octavia,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_local_cluster_auth_endpoint.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_local_cluster_auth_endpoint.go new file mode 100644 index 000000000..830583d44 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_local_cluster_auth_endpoint.go @@ -0,0 +1,14 @@ +package client + +const ( + LocalClusterAuthEndpointType = "localClusterAuthEndpoint" + LocalClusterAuthEndpointFieldCACerts = "caCerts" + LocalClusterAuthEndpointFieldEnabled = "enabled" + LocalClusterAuthEndpointFieldFQDN = "fqdn" +) + +type LocalClusterAuthEndpoint struct { + CACerts string `json:"caCerts,omitempty" yaml:"caCerts,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + FQDN string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_local_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_local_config.go new file mode 100644 index 000000000..ca4d5123d --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_local_config.go @@ -0,0 +1,34 @@ +package client + +const ( + LocalConfigType = "localConfig" + LocalConfigFieldAccessMode = "accessMode" + LocalConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + LocalConfigFieldAnnotations = "annotations" + LocalConfigFieldCreated = "created" + LocalConfigFieldCreatorID = "creatorId" + LocalConfigFieldEnabled = "enabled" + LocalConfigFieldLabels = "labels" + LocalConfigFieldName = "name" + LocalConfigFieldOwnerReferences = "ownerReferences" + LocalConfigFieldRemoved = "removed" + LocalConfigFieldStatus = "status" + LocalConfigFieldType = "type" + LocalConfigFieldUUID = "uuid" +) + +type LocalConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_local_object_reference.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_local_object_reference.go new file mode 100644 index 000000000..e4d3b5057 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_local_object_reference.go @@ -0,0 +1,10 @@ +package client + +const ( + LocalObjectReferenceType = "localObjectReference" + LocalObjectReferenceFieldName = "name" +) + +type LocalObjectReference struct { + Name string `json:"name,omitempty" yaml:"name,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_management_secret.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_management_secret.go new file mode 100644 index 000000000..4814ba4eb --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_management_secret.go @@ -0,0 +1,126 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + ManagementSecretType = "managementSecret" + ManagementSecretFieldAnnotations = "annotations" + ManagementSecretFieldCreated = "created" + ManagementSecretFieldCreatorID = "creatorId" + ManagementSecretFieldData = "data" + ManagementSecretFieldImmutable = "immutable" + ManagementSecretFieldLabels = "labels" + ManagementSecretFieldName = "name" + ManagementSecretFieldOwnerReferences = "ownerReferences" + ManagementSecretFieldRemoved = "removed" + ManagementSecretFieldStringData = "stringData" + ManagementSecretFieldType = "type" + ManagementSecretFieldUUID = "uuid" +) + +type ManagementSecret struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Data map[string]string `json:"data,omitempty" yaml:"data,omitempty"` + Immutable *bool `json:"immutable,omitempty" yaml:"immutable,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + StringData map[string]string `json:"stringData,omitempty" yaml:"stringData,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ManagementSecretCollection struct { + types.Collection + Data []ManagementSecret `json:"data,omitempty"` + client *ManagementSecretClient +} + +type ManagementSecretClient struct { + apiClient *Client +} + +type ManagementSecretOperations interface { + List(opts *types.ListOpts) (*ManagementSecretCollection, error) + ListAll(opts *types.ListOpts) (*ManagementSecretCollection, error) + Create(opts *ManagementSecret) (*ManagementSecret, error) + Update(existing *ManagementSecret, updates interface{}) (*ManagementSecret, error) + Replace(existing *ManagementSecret) (*ManagementSecret, error) + ByID(id string) (*ManagementSecret, error) + Delete(container *ManagementSecret) error +} + +func newManagementSecretClient(apiClient *Client) *ManagementSecretClient { + return &ManagementSecretClient{ + apiClient: apiClient, + } +} + +func (c *ManagementSecretClient) Create(container *ManagementSecret) (*ManagementSecret, error) { + resp := &ManagementSecret{} + err := c.apiClient.Ops.DoCreate(ManagementSecretType, container, resp) + return resp, err +} + +func (c *ManagementSecretClient) Update(existing *ManagementSecret, updates interface{}) (*ManagementSecret, error) { + resp := &ManagementSecret{} + err := c.apiClient.Ops.DoUpdate(ManagementSecretType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ManagementSecretClient) Replace(obj *ManagementSecret) (*ManagementSecret, error) { + resp := &ManagementSecret{} + err := c.apiClient.Ops.DoReplace(ManagementSecretType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *ManagementSecretClient) List(opts *types.ListOpts) (*ManagementSecretCollection, error) { + resp := &ManagementSecretCollection{} + err := c.apiClient.Ops.DoList(ManagementSecretType, opts, resp) + resp.client = c + return resp, err +} + +func (c *ManagementSecretClient) ListAll(opts *types.ListOpts) (*ManagementSecretCollection, error) { + resp := &ManagementSecretCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *ManagementSecretCollection) Next() (*ManagementSecretCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ManagementSecretCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *ManagementSecretClient) ByID(id string) (*ManagementSecret, error) { + resp := &ManagementSecret{} + err := c.apiClient.Ops.DoByID(ManagementSecretType, id, resp) + return resp, err +} + +func (c *ManagementSecretClient) Delete(container *ManagementSecret) error { + return c.apiClient.Ops.DoResourceDelete(ManagementSecretType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_map_delta.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_map_delta.go new file mode 100644 index 000000000..b6861818a --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_map_delta.go @@ -0,0 +1,12 @@ +package client + +const ( + MapDeltaType = "mapDelta" + MapDeltaFieldAdd = "add" + MapDeltaFieldDelete = "delete" +) + +type MapDelta struct { + Add map[string]string `json:"add,omitempty" yaml:"add,omitempty"` + Delete map[string]bool `json:"delete,omitempty" yaml:"delete,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_member.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_member.go new file mode 100644 index 000000000..620e4607c --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_member.go @@ -0,0 +1,14 @@ +package client + +const ( + MemberType = "member" + MemberFieldAccessType = "accessType" + MemberFieldGroupPrincipalID = "groupPrincipalId" + MemberFieldUserPrincipalID = "userPrincipalId" +) + +type Member struct { + AccessType string `json:"accessType,omitempty" yaml:"accessType,omitempty"` + GroupPrincipalID string `json:"groupPrincipalId,omitempty" yaml:"groupPrincipalId,omitempty"` + UserPrincipalID string `json:"userPrincipalId,omitempty" yaml:"userPrincipalId,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_memory_info.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_memory_info.go new file mode 100644 index 000000000..ecd1a1701 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_memory_info.go @@ -0,0 +1,10 @@ +package client + +const ( + MemoryInfoType = "memoryInfo" + MemoryInfoFieldMemTotalKiB = "memTotalKiB" +) + +type MemoryInfo struct { + MemTotalKiB int64 `json:"memTotalKiB,omitempty" yaml:"memTotalKiB,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_metadata_openstack_opts.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_metadata_openstack_opts.go new file mode 100644 index 000000000..8a38e9326 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_metadata_openstack_opts.go @@ -0,0 +1,12 @@ +package client + +const ( + MetadataOpenstackOptsType = "metadataOpenstackOpts" + MetadataOpenstackOptsFieldRequestTimeout = "request-timeout" + MetadataOpenstackOptsFieldSearchOrder = "search-order" +) + +type MetadataOpenstackOpts struct { + RequestTimeout int64 `json:"request-timeout,omitempty" yaml:"request-timeout,omitempty"` + SearchOrder string `json:"search-order,omitempty" yaml:"search-order,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_metadata_update.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_metadata_update.go new file mode 100644 index 000000000..1d1f5b294 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_metadata_update.go @@ -0,0 +1,12 @@ +package client + +const ( + MetadataUpdateType = "metadataUpdate" + MetadataUpdateFieldAnnotations = "annotations" + MetadataUpdateFieldLabels = "labels" +) + +type MetadataUpdate struct { + Annotations *MapDelta `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Labels *MapDelta `json:"labels,omitempty" yaml:"labels,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_monitoring_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_monitoring_config.go new file mode 100644 index 000000000..3cb7049d5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_monitoring_config.go @@ -0,0 +1,22 @@ +package client + +const ( + MonitoringConfigType = "monitoringConfig" + MonitoringConfigFieldMetricsServerPriorityClassName = "metricsServerPriorityClassName" + MonitoringConfigFieldNodeSelector = "nodeSelector" + MonitoringConfigFieldOptions = "options" + MonitoringConfigFieldProvider = "provider" + MonitoringConfigFieldReplicas = "replicas" + MonitoringConfigFieldTolerations = "tolerations" + MonitoringConfigFieldUpdateStrategy = "updateStrategy" +) + +type MonitoringConfig struct { + MetricsServerPriorityClassName string `json:"metricsServerPriorityClassName,omitempty" yaml:"metricsServerPriorityClassName,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"` + Options map[string]string `json:"options,omitempty" yaml:"options,omitempty"` + Provider string `json:"provider,omitempty" yaml:"provider,omitempty"` + Replicas *int64 `json:"replicas,omitempty" yaml:"replicas,omitempty"` + Tolerations []Toleration `json:"tolerations,omitempty" yaml:"tolerations,omitempty"` + UpdateStrategy *DeploymentStrategy `json:"updateStrategy,omitempty" yaml:"updateStrategy,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app.go new file mode 100644 index 000000000..228b842b4 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app.go @@ -0,0 +1,165 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + MultiClusterAppType = "multiClusterApp" + MultiClusterAppFieldAnnotations = "annotations" + MultiClusterAppFieldAnswers = "answers" + MultiClusterAppFieldCreated = "created" + MultiClusterAppFieldCreatorID = "creatorId" + MultiClusterAppFieldLabels = "labels" + MultiClusterAppFieldMembers = "members" + MultiClusterAppFieldName = "name" + MultiClusterAppFieldOwnerReferences = "ownerReferences" + MultiClusterAppFieldRemoved = "removed" + MultiClusterAppFieldRevisionHistoryLimit = "revisionHistoryLimit" + MultiClusterAppFieldRoles = "roles" + MultiClusterAppFieldState = "state" + MultiClusterAppFieldStatus = "status" + MultiClusterAppFieldTargets = "targets" + MultiClusterAppFieldTemplateVersionID = "templateVersionId" + MultiClusterAppFieldTimeout = "timeout" + MultiClusterAppFieldTransitioning = "transitioning" + MultiClusterAppFieldTransitioningMessage = "transitioningMessage" + MultiClusterAppFieldUUID = "uuid" + MultiClusterAppFieldUpgradeStrategy = "upgradeStrategy" + MultiClusterAppFieldWait = "wait" +) + +type MultiClusterApp struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Answers []Answer `json:"answers,omitempty" yaml:"answers,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Members []Member `json:"members,omitempty" yaml:"members,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + RevisionHistoryLimit int64 `json:"revisionHistoryLimit,omitempty" yaml:"revisionHistoryLimit,omitempty"` + Roles []string `json:"roles,omitempty" yaml:"roles,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Status *MultiClusterAppStatus `json:"status,omitempty" yaml:"status,omitempty"` + Targets []Target `json:"targets,omitempty" yaml:"targets,omitempty"` + TemplateVersionID string `json:"templateVersionId,omitempty" yaml:"templateVersionId,omitempty"` + Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UpgradeStrategy *UpgradeStrategy `json:"upgradeStrategy,omitempty" yaml:"upgradeStrategy,omitempty"` + Wait bool `json:"wait,omitempty" yaml:"wait,omitempty"` +} + +type MultiClusterAppCollection struct { + types.Collection + Data []MultiClusterApp `json:"data,omitempty"` + client *MultiClusterAppClient +} + +type MultiClusterAppClient struct { + apiClient *Client +} + +type MultiClusterAppOperations interface { + List(opts *types.ListOpts) (*MultiClusterAppCollection, error) + ListAll(opts *types.ListOpts) (*MultiClusterAppCollection, error) + Create(opts *MultiClusterApp) (*MultiClusterApp, error) + Update(existing *MultiClusterApp, updates interface{}) (*MultiClusterApp, error) + Replace(existing *MultiClusterApp) (*MultiClusterApp, error) + ByID(id string) (*MultiClusterApp, error) + Delete(container *MultiClusterApp) error + + ActionAddProjects(resource *MultiClusterApp, input *UpdateMultiClusterAppTargetsInput) error + + ActionRemoveProjects(resource *MultiClusterApp, input *UpdateMultiClusterAppTargetsInput) error + + ActionRollback(resource *MultiClusterApp, input *MultiClusterAppRollbackInput) error +} + +func newMultiClusterAppClient(apiClient *Client) *MultiClusterAppClient { + return &MultiClusterAppClient{ + apiClient: apiClient, + } +} + +func (c *MultiClusterAppClient) Create(container *MultiClusterApp) (*MultiClusterApp, error) { + resp := &MultiClusterApp{} + err := c.apiClient.Ops.DoCreate(MultiClusterAppType, container, resp) + return resp, err +} + +func (c *MultiClusterAppClient) Update(existing *MultiClusterApp, updates interface{}) (*MultiClusterApp, error) { + resp := &MultiClusterApp{} + err := c.apiClient.Ops.DoUpdate(MultiClusterAppType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *MultiClusterAppClient) Replace(obj *MultiClusterApp) (*MultiClusterApp, error) { + resp := &MultiClusterApp{} + err := c.apiClient.Ops.DoReplace(MultiClusterAppType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *MultiClusterAppClient) List(opts *types.ListOpts) (*MultiClusterAppCollection, error) { + resp := &MultiClusterAppCollection{} + err := c.apiClient.Ops.DoList(MultiClusterAppType, opts, resp) + resp.client = c + return resp, err +} + +func (c *MultiClusterAppClient) ListAll(opts *types.ListOpts) (*MultiClusterAppCollection, error) { + resp := &MultiClusterAppCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *MultiClusterAppCollection) Next() (*MultiClusterAppCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &MultiClusterAppCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *MultiClusterAppClient) ByID(id string) (*MultiClusterApp, error) { + resp := &MultiClusterApp{} + err := c.apiClient.Ops.DoByID(MultiClusterAppType, id, resp) + return resp, err +} + +func (c *MultiClusterAppClient) Delete(container *MultiClusterApp) error { + return c.apiClient.Ops.DoResourceDelete(MultiClusterAppType, &container.Resource) +} + +func (c *MultiClusterAppClient) ActionAddProjects(resource *MultiClusterApp, input *UpdateMultiClusterAppTargetsInput) error { + err := c.apiClient.Ops.DoAction(MultiClusterAppType, "addProjects", &resource.Resource, input, nil) + return err +} + +func (c *MultiClusterAppClient) ActionRemoveProjects(resource *MultiClusterApp, input *UpdateMultiClusterAppTargetsInput) error { + err := c.apiClient.Ops.DoAction(MultiClusterAppType, "removeProjects", &resource.Resource, input, nil) + return err +} + +func (c *MultiClusterAppClient) ActionRollback(resource *MultiClusterApp, input *MultiClusterAppRollbackInput) error { + err := c.apiClient.Ops.DoAction(MultiClusterAppType, "rollback", &resource.Resource, input, nil) + return err +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_revision.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_revision.go new file mode 100644 index 000000000..a759036fc --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_revision.go @@ -0,0 +1,122 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + MultiClusterAppRevisionType = "multiClusterAppRevision" + MultiClusterAppRevisionFieldAnnotations = "annotations" + MultiClusterAppRevisionFieldAnswers = "answers" + MultiClusterAppRevisionFieldCreated = "created" + MultiClusterAppRevisionFieldCreatorID = "creatorId" + MultiClusterAppRevisionFieldLabels = "labels" + MultiClusterAppRevisionFieldName = "name" + MultiClusterAppRevisionFieldOwnerReferences = "ownerReferences" + MultiClusterAppRevisionFieldRemoved = "removed" + MultiClusterAppRevisionFieldTemplateVersionID = "templateVersionId" + MultiClusterAppRevisionFieldUUID = "uuid" +) + +type MultiClusterAppRevision struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Answers []Answer `json:"answers,omitempty" yaml:"answers,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + TemplateVersionID string `json:"templateVersionId,omitempty" yaml:"templateVersionId,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type MultiClusterAppRevisionCollection struct { + types.Collection + Data []MultiClusterAppRevision `json:"data,omitempty"` + client *MultiClusterAppRevisionClient +} + +type MultiClusterAppRevisionClient struct { + apiClient *Client +} + +type MultiClusterAppRevisionOperations interface { + List(opts *types.ListOpts) (*MultiClusterAppRevisionCollection, error) + ListAll(opts *types.ListOpts) (*MultiClusterAppRevisionCollection, error) + Create(opts *MultiClusterAppRevision) (*MultiClusterAppRevision, error) + Update(existing *MultiClusterAppRevision, updates interface{}) (*MultiClusterAppRevision, error) + Replace(existing *MultiClusterAppRevision) (*MultiClusterAppRevision, error) + ByID(id string) (*MultiClusterAppRevision, error) + Delete(container *MultiClusterAppRevision) error +} + +func newMultiClusterAppRevisionClient(apiClient *Client) *MultiClusterAppRevisionClient { + return &MultiClusterAppRevisionClient{ + apiClient: apiClient, + } +} + +func (c *MultiClusterAppRevisionClient) Create(container *MultiClusterAppRevision) (*MultiClusterAppRevision, error) { + resp := &MultiClusterAppRevision{} + err := c.apiClient.Ops.DoCreate(MultiClusterAppRevisionType, container, resp) + return resp, err +} + +func (c *MultiClusterAppRevisionClient) Update(existing *MultiClusterAppRevision, updates interface{}) (*MultiClusterAppRevision, error) { + resp := &MultiClusterAppRevision{} + err := c.apiClient.Ops.DoUpdate(MultiClusterAppRevisionType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *MultiClusterAppRevisionClient) Replace(obj *MultiClusterAppRevision) (*MultiClusterAppRevision, error) { + resp := &MultiClusterAppRevision{} + err := c.apiClient.Ops.DoReplace(MultiClusterAppRevisionType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *MultiClusterAppRevisionClient) List(opts *types.ListOpts) (*MultiClusterAppRevisionCollection, error) { + resp := &MultiClusterAppRevisionCollection{} + err := c.apiClient.Ops.DoList(MultiClusterAppRevisionType, opts, resp) + resp.client = c + return resp, err +} + +func (c *MultiClusterAppRevisionClient) ListAll(opts *types.ListOpts) (*MultiClusterAppRevisionCollection, error) { + resp := &MultiClusterAppRevisionCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *MultiClusterAppRevisionCollection) Next() (*MultiClusterAppRevisionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &MultiClusterAppRevisionCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *MultiClusterAppRevisionClient) ByID(id string) (*MultiClusterAppRevision, error) { + resp := &MultiClusterAppRevision{} + err := c.apiClient.Ops.DoByID(MultiClusterAppRevisionType, id, resp) + return resp, err +} + +func (c *MultiClusterAppRevisionClient) Delete(container *MultiClusterAppRevision) error { + return c.apiClient.Ops.DoResourceDelete(MultiClusterAppRevisionType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_rollback_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_rollback_input.go new file mode 100644 index 000000000..90a033eb1 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_rollback_input.go @@ -0,0 +1,10 @@ +package client + +const ( + MultiClusterAppRollbackInputType = "multiClusterAppRollbackInput" + MultiClusterAppRollbackInputFieldRevisionID = "revisionId" +) + +type MultiClusterAppRollbackInput struct { + RevisionID string `json:"revisionId,omitempty" yaml:"revisionId,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_spec.go new file mode 100644 index 000000000..c9d0b3800 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_spec.go @@ -0,0 +1,26 @@ +package client + +const ( + MultiClusterAppSpecType = "multiClusterAppSpec" + MultiClusterAppSpecFieldAnswers = "answers" + MultiClusterAppSpecFieldMembers = "members" + MultiClusterAppSpecFieldRevisionHistoryLimit = "revisionHistoryLimit" + MultiClusterAppSpecFieldRoles = "roles" + MultiClusterAppSpecFieldTargets = "targets" + MultiClusterAppSpecFieldTemplateVersionID = "templateVersionId" + MultiClusterAppSpecFieldTimeout = "timeout" + MultiClusterAppSpecFieldUpgradeStrategy = "upgradeStrategy" + MultiClusterAppSpecFieldWait = "wait" +) + +type MultiClusterAppSpec struct { + Answers []Answer `json:"answers,omitempty" yaml:"answers,omitempty"` + Members []Member `json:"members,omitempty" yaml:"members,omitempty"` + RevisionHistoryLimit int64 `json:"revisionHistoryLimit,omitempty" yaml:"revisionHistoryLimit,omitempty"` + Roles []string `json:"roles,omitempty" yaml:"roles,omitempty"` + Targets []Target `json:"targets,omitempty" yaml:"targets,omitempty"` + TemplateVersionID string `json:"templateVersionId,omitempty" yaml:"templateVersionId,omitempty"` + Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"` + UpgradeStrategy *UpgradeStrategy `json:"upgradeStrategy,omitempty" yaml:"upgradeStrategy,omitempty"` + Wait bool `json:"wait,omitempty" yaml:"wait,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_status.go new file mode 100644 index 000000000..e84859c17 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_multi_cluster_app_status.go @@ -0,0 +1,14 @@ +package client + +const ( + MultiClusterAppStatusType = "multiClusterAppStatus" + MultiClusterAppStatusFieldConditions = "conditions" + MultiClusterAppStatusFieldHelmVersion = "helmVersion" + MultiClusterAppStatusFieldRevisionID = "revisionId" +) + +type MultiClusterAppStatus struct { + Conditions []AppCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + HelmVersion string `json:"helmVersion,omitempty" yaml:"helmVersion,omitempty"` + RevisionID string `json:"revisionId,omitempty" yaml:"revisionId,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_namespace_resource_quota.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_namespace_resource_quota.go new file mode 100644 index 000000000..b170bf5d2 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_namespace_resource_quota.go @@ -0,0 +1,10 @@ +package client + +const ( + NamespaceResourceQuotaType = "namespaceResourceQuota" + NamespaceResourceQuotaFieldLimit = "limit" +) + +type NamespaceResourceQuota struct { + Limit *ResourceQuotaLimit `json:"limit,omitempty" yaml:"limit,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_network_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_network_config.go new file mode 100644 index 000000000..4235298e4 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_network_config.go @@ -0,0 +1,30 @@ +package client + +const ( + NetworkConfigType = "networkConfig" + NetworkConfigFieldAciNetworkProvider = "aciNetworkProvider" + NetworkConfigFieldCalicoNetworkProvider = "calicoNetworkProvider" + NetworkConfigFieldCanalNetworkProvider = "canalNetworkProvider" + NetworkConfigFieldFlannelNetworkProvider = "flannelNetworkProvider" + NetworkConfigFieldMTU = "mtu" + NetworkConfigFieldNodeSelector = "nodeSelector" + NetworkConfigFieldOptions = "options" + NetworkConfigFieldPlugin = "plugin" + NetworkConfigFieldTolerations = "tolerations" + NetworkConfigFieldUpdateStrategy = "updateStrategy" + NetworkConfigFieldWeaveNetworkProvider = "weaveNetworkProvider" +) + +type NetworkConfig struct { + AciNetworkProvider *AciNetworkProvider `json:"aciNetworkProvider,omitempty" yaml:"aciNetworkProvider,omitempty"` + CalicoNetworkProvider *CalicoNetworkProvider `json:"calicoNetworkProvider,omitempty" yaml:"calicoNetworkProvider,omitempty"` + CanalNetworkProvider *CanalNetworkProvider `json:"canalNetworkProvider,omitempty" yaml:"canalNetworkProvider,omitempty"` + FlannelNetworkProvider *FlannelNetworkProvider `json:"flannelNetworkProvider,omitempty" yaml:"flannelNetworkProvider,omitempty"` + MTU int64 `json:"mtu,omitempty" yaml:"mtu,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"` + Options map[string]string `json:"options,omitempty" yaml:"options,omitempty"` + Plugin string `json:"plugin,omitempty" yaml:"plugin,omitempty"` + Tolerations []Toleration `json:"tolerations,omitempty" yaml:"tolerations,omitempty"` + UpdateStrategy *DaemonSetUpdateStrategy `json:"updateStrategy,omitempty" yaml:"updateStrategy,omitempty"` + WeaveNetworkProvider *WeaveNetworkProvider `json:"weaveNetworkProvider,omitempty" yaml:"weaveNetworkProvider,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_network_vshpere_opts.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_network_vshpere_opts.go new file mode 100644 index 000000000..ad27335a9 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_network_vshpere_opts.go @@ -0,0 +1,10 @@ +package client + +const ( + NetworkVshpereOptsType = "networkVshpereOpts" + NetworkVshpereOptsFieldPublicNetwork = "public-network" +) + +type NetworkVshpereOpts struct { + PublicNetwork string `json:"public-network,omitempty" yaml:"public-network,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_nfs_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_nfs_volume_source.go new file mode 100644 index 000000000..bbaeecf93 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_nfs_volume_source.go @@ -0,0 +1,14 @@ +package client + +const ( + NFSVolumeSourceType = "nfsVolumeSource" + NFSVolumeSourceFieldPath = "path" + NFSVolumeSourceFieldReadOnly = "readOnly" + NFSVolumeSourceFieldServer = "server" +) + +type NFSVolumeSource struct { + Path string `json:"path,omitempty" yaml:"path,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + Server string `json:"server,omitempty" yaml:"server,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node.go new file mode 100644 index 000000000..5f3ab5775 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node.go @@ -0,0 +1,231 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + NodeType = "node" + NodeFieldAllocatable = "allocatable" + NodeFieldAnnotations = "annotations" + NodeFieldAppliedNodeVersion = "appliedNodeVersion" + NodeFieldCapacity = "capacity" + NodeFieldClusterID = "clusterId" + NodeFieldConditions = "conditions" + NodeFieldControlPlane = "controlPlane" + NodeFieldCreated = "created" + NodeFieldCreatorID = "creatorId" + NodeFieldCustomConfig = "customConfig" + NodeFieldDescription = "description" + NodeFieldDockerInfo = "dockerInfo" + NodeFieldEtcd = "etcd" + NodeFieldExternalIPAddress = "externalIpAddress" + NodeFieldHostname = "hostname" + NodeFieldIPAddress = "ipAddress" + NodeFieldImported = "imported" + NodeFieldInfo = "info" + NodeFieldLabels = "labels" + NodeFieldLimits = "limits" + NodeFieldName = "name" + NodeFieldNamespaceId = "namespaceId" + NodeFieldNodeName = "nodeName" + NodeFieldNodePlan = "nodePlan" + NodeFieldNodePoolID = "nodePoolId" + NodeFieldNodeTaints = "nodeTaints" + NodeFieldNodeTemplateID = "nodeTemplateId" + NodeFieldOwnerReferences = "ownerReferences" + NodeFieldPodCidr = "podCidr" + NodeFieldPodCidrs = "podCidrs" + NodeFieldProviderId = "providerId" + NodeFieldPublicEndpoints = "publicEndpoints" + NodeFieldRemoved = "removed" + NodeFieldRequested = "requested" + NodeFieldRequestedHostname = "requestedHostname" + NodeFieldRuntimeHandlers = "runtimeHandlers" + NodeFieldScaledownTime = "scaledownTime" + NodeFieldSshUser = "sshUser" + NodeFieldState = "state" + NodeFieldTaints = "taints" + NodeFieldTransitioning = "transitioning" + NodeFieldTransitioningMessage = "transitioningMessage" + NodeFieldUUID = "uuid" + NodeFieldUnschedulable = "unschedulable" + NodeFieldVolumesAttached = "volumesAttached" + NodeFieldVolumesInUse = "volumesInUse" + NodeFieldWorker = "worker" +) + +type Node struct { + types.Resource + Allocatable map[string]string `json:"allocatable,omitempty" yaml:"allocatable,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + AppliedNodeVersion int64 `json:"appliedNodeVersion,omitempty" yaml:"appliedNodeVersion,omitempty"` + Capacity map[string]string `json:"capacity,omitempty" yaml:"capacity,omitempty"` + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + Conditions []NodeCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + ControlPlane bool `json:"controlPlane,omitempty" yaml:"controlPlane,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + CustomConfig *CustomConfig `json:"customConfig,omitempty" yaml:"customConfig,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + DockerInfo *DockerInfo `json:"dockerInfo,omitempty" yaml:"dockerInfo,omitempty"` + Etcd bool `json:"etcd,omitempty" yaml:"etcd,omitempty"` + ExternalIPAddress string `json:"externalIpAddress,omitempty" yaml:"externalIpAddress,omitempty"` + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + IPAddress string `json:"ipAddress,omitempty" yaml:"ipAddress,omitempty"` + Imported bool `json:"imported,omitempty" yaml:"imported,omitempty"` + Info *NodeInfo `json:"info,omitempty" yaml:"info,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Limits map[string]string `json:"limits,omitempty" yaml:"limits,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"` + NodeName string `json:"nodeName,omitempty" yaml:"nodeName,omitempty"` + NodePlan *NodePlan `json:"nodePlan,omitempty" yaml:"nodePlan,omitempty"` + NodePoolID string `json:"nodePoolId,omitempty" yaml:"nodePoolId,omitempty"` + NodeTaints []Taint `json:"nodeTaints,omitempty" yaml:"nodeTaints,omitempty"` + NodeTemplateID string `json:"nodeTemplateId,omitempty" yaml:"nodeTemplateId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + PodCidr string `json:"podCidr,omitempty" yaml:"podCidr,omitempty"` + PodCidrs []string `json:"podCidrs,omitempty" yaml:"podCidrs,omitempty"` + ProviderId string `json:"providerId,omitempty" yaml:"providerId,omitempty"` + PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"publicEndpoints,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Requested map[string]string `json:"requested,omitempty" yaml:"requested,omitempty"` + RequestedHostname string `json:"requestedHostname,omitempty" yaml:"requestedHostname,omitempty"` + RuntimeHandlers []NodeRuntimeHandler `json:"runtimeHandlers,omitempty" yaml:"runtimeHandlers,omitempty"` + ScaledownTime string `json:"scaledownTime,omitempty" yaml:"scaledownTime,omitempty"` + SshUser string `json:"sshUser,omitempty" yaml:"sshUser,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Taints []Taint `json:"taints,omitempty" yaml:"taints,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + Unschedulable bool `json:"unschedulable,omitempty" yaml:"unschedulable,omitempty"` + VolumesAttached map[string]AttachedVolume `json:"volumesAttached,omitempty" yaml:"volumesAttached,omitempty"` + VolumesInUse []string `json:"volumesInUse,omitempty" yaml:"volumesInUse,omitempty"` + Worker bool `json:"worker,omitempty" yaml:"worker,omitempty"` +} + +type NodeCollection struct { + types.Collection + Data []Node `json:"data,omitempty"` + client *NodeClient +} + +type NodeClient struct { + apiClient *Client +} + +type NodeOperations interface { + List(opts *types.ListOpts) (*NodeCollection, error) + ListAll(opts *types.ListOpts) (*NodeCollection, error) + Create(opts *Node) (*Node, error) + Update(existing *Node, updates interface{}) (*Node, error) + Replace(existing *Node) (*Node, error) + ByID(id string) (*Node, error) + Delete(container *Node) error + + ActionCordon(resource *Node) error + + ActionDrain(resource *Node, input *NodeDrainInput) error + + ActionScaledown(resource *Node) error + + ActionStopDrain(resource *Node) error + + ActionUncordon(resource *Node) error +} + +func newNodeClient(apiClient *Client) *NodeClient { + return &NodeClient{ + apiClient: apiClient, + } +} + +func (c *NodeClient) Create(container *Node) (*Node, error) { + resp := &Node{} + err := c.apiClient.Ops.DoCreate(NodeType, container, resp) + return resp, err +} + +func (c *NodeClient) Update(existing *Node, updates interface{}) (*Node, error) { + resp := &Node{} + err := c.apiClient.Ops.DoUpdate(NodeType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *NodeClient) Replace(obj *Node) (*Node, error) { + resp := &Node{} + err := c.apiClient.Ops.DoReplace(NodeType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *NodeClient) List(opts *types.ListOpts) (*NodeCollection, error) { + resp := &NodeCollection{} + err := c.apiClient.Ops.DoList(NodeType, opts, resp) + resp.client = c + return resp, err +} + +func (c *NodeClient) ListAll(opts *types.ListOpts) (*NodeCollection, error) { + resp := &NodeCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *NodeCollection) Next() (*NodeCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NodeCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *NodeClient) ByID(id string) (*Node, error) { + resp := &Node{} + err := c.apiClient.Ops.DoByID(NodeType, id, resp) + return resp, err +} + +func (c *NodeClient) Delete(container *Node) error { + return c.apiClient.Ops.DoResourceDelete(NodeType, &container.Resource) +} + +func (c *NodeClient) ActionCordon(resource *Node) error { + err := c.apiClient.Ops.DoAction(NodeType, "cordon", &resource.Resource, nil, nil) + return err +} + +func (c *NodeClient) ActionDrain(resource *Node, input *NodeDrainInput) error { + err := c.apiClient.Ops.DoAction(NodeType, "drain", &resource.Resource, input, nil) + return err +} + +func (c *NodeClient) ActionScaledown(resource *Node) error { + err := c.apiClient.Ops.DoAction(NodeType, "scaledown", &resource.Resource, nil, nil) + return err +} + +func (c *NodeClient) ActionStopDrain(resource *Node) error { + err := c.apiClient.Ops.DoAction(NodeType, "stopDrain", &resource.Resource, nil, nil) + return err +} + +func (c *NodeClient) ActionUncordon(resource *Node) error { + err := c.apiClient.Ops.DoAction(NodeType, "uncordon", &resource.Resource, nil, nil) + return err +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_address.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_address.go new file mode 100644 index 000000000..972c24802 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_address.go @@ -0,0 +1,12 @@ +package client + +const ( + NodeAddressType = "nodeAddress" + NodeAddressFieldAddress = "address" + NodeAddressFieldType = "type" +) + +type NodeAddress struct { + Address string `json:"address,omitempty" yaml:"address,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_affinity.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_affinity.go new file mode 100644 index 000000000..c1563fff1 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_affinity.go @@ -0,0 +1,12 @@ +package client + +const ( + NodeAffinityType = "nodeAffinity" + NodeAffinityFieldPreferredDuringSchedulingIgnoredDuringExecution = "preferredDuringSchedulingIgnoredDuringExecution" + NodeAffinityFieldRequiredDuringSchedulingIgnoredDuringExecution = "requiredDuringSchedulingIgnoredDuringExecution" +) + +type NodeAffinity struct { + PreferredDuringSchedulingIgnoredDuringExecution []PreferredSchedulingTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" yaml:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"` + RequiredDuringSchedulingIgnoredDuringExecution *NodeSelector `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" yaml:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_condition.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_condition.go new file mode 100644 index 000000000..a07010acf --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_condition.go @@ -0,0 +1,20 @@ +package client + +const ( + NodeConditionType = "nodeCondition" + NodeConditionFieldLastHeartbeatTime = "lastHeartbeatTime" + NodeConditionFieldLastTransitionTime = "lastTransitionTime" + NodeConditionFieldMessage = "message" + NodeConditionFieldReason = "reason" + NodeConditionFieldStatus = "status" + NodeConditionFieldType = "type" +) + +type NodeCondition struct { + LastHeartbeatTime string `json:"lastHeartbeatTime,omitempty" yaml:"lastHeartbeatTime,omitempty"` + LastTransitionTime string `json:"lastTransitionTime,omitempty" yaml:"lastTransitionTime,omitempty"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` + Reason string `json:"reason,omitempty" yaml:"reason,omitempty"` + Status string `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_config_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_config_source.go new file mode 100644 index 000000000..fc84f3493 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_config_source.go @@ -0,0 +1,10 @@ +package client + +const ( + NodeConfigSourceType = "nodeConfigSource" + NodeConfigSourceFieldConfigMap = "configMap" +) + +type NodeConfigSource struct { + ConfigMap *ConfigMapNodeConfigSource `json:"configMap,omitempty" yaml:"configMap,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_config_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_config_status.go new file mode 100644 index 000000000..919108f38 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_config_status.go @@ -0,0 +1,16 @@ +package client + +const ( + NodeConfigStatusType = "nodeConfigStatus" + NodeConfigStatusFieldActive = "active" + NodeConfigStatusFieldAssigned = "assigned" + NodeConfigStatusFieldError = "error" + NodeConfigStatusFieldLastKnownGood = "lastKnownGood" +) + +type NodeConfigStatus struct { + Active *NodeConfigSource `json:"active,omitempty" yaml:"active,omitempty"` + Assigned *NodeConfigSource `json:"assigned,omitempty" yaml:"assigned,omitempty"` + Error string `json:"error,omitempty" yaml:"error,omitempty"` + LastKnownGood *NodeConfigSource `json:"lastKnownGood,omitempty" yaml:"lastKnownGood,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_daemon_endpoints.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_daemon_endpoints.go new file mode 100644 index 000000000..57da90d57 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_daemon_endpoints.go @@ -0,0 +1,10 @@ +package client + +const ( + NodeDaemonEndpointsType = "nodeDaemonEndpoints" + NodeDaemonEndpointsFieldKubeletEndpoint = "kubeletEndpoint" +) + +type NodeDaemonEndpoints struct { + KubeletEndpoint *DaemonEndpoint `json:"kubeletEndpoint,omitempty" yaml:"kubeletEndpoint,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_drain_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_drain_input.go new file mode 100644 index 000000000..974ac7e60 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_drain_input.go @@ -0,0 +1,18 @@ +package client + +const ( + NodeDrainInputType = "nodeDrainInput" + NodeDrainInputFieldDeleteLocalData = "deleteLocalData" + NodeDrainInputFieldForce = "force" + NodeDrainInputFieldGracePeriod = "gracePeriod" + NodeDrainInputFieldIgnoreDaemonSets = "ignoreDaemonSets" + NodeDrainInputFieldTimeout = "timeout" +) + +type NodeDrainInput struct { + DeleteLocalData bool `json:"deleteLocalData,omitempty" yaml:"deleteLocalData,omitempty"` + Force bool `json:"force,omitempty" yaml:"force,omitempty"` + GracePeriod int64 `json:"gracePeriod,omitempty" yaml:"gracePeriod,omitempty"` + IgnoreDaemonSets *bool `json:"ignoreDaemonSets,omitempty" yaml:"ignoreDaemonSets,omitempty"` + Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_driver.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_driver.go new file mode 100644 index 000000000..4e0cefd0f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_driver.go @@ -0,0 +1,160 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + NodeDriverType = "nodeDriver" + NodeDriverFieldActive = "active" + NodeDriverFieldAddCloudCredential = "addCloudCredential" + NodeDriverFieldAnnotations = "annotations" + NodeDriverFieldBuiltin = "builtin" + NodeDriverFieldChecksum = "checksum" + NodeDriverFieldCreated = "created" + NodeDriverFieldCreatorID = "creatorId" + NodeDriverFieldDescription = "description" + NodeDriverFieldExternalID = "externalId" + NodeDriverFieldLabels = "labels" + NodeDriverFieldName = "name" + NodeDriverFieldOwnerReferences = "ownerReferences" + NodeDriverFieldRemoved = "removed" + NodeDriverFieldState = "state" + NodeDriverFieldStatus = "status" + NodeDriverFieldTransitioning = "transitioning" + NodeDriverFieldTransitioningMessage = "transitioningMessage" + NodeDriverFieldUIURL = "uiUrl" + NodeDriverFieldURL = "url" + NodeDriverFieldUUID = "uuid" + NodeDriverFieldWhitelistDomains = "whitelistDomains" +) + +type NodeDriver struct { + types.Resource + Active bool `json:"active,omitempty" yaml:"active,omitempty"` + AddCloudCredential bool `json:"addCloudCredential,omitempty" yaml:"addCloudCredential,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Builtin bool `json:"builtin,omitempty" yaml:"builtin,omitempty"` + Checksum string `json:"checksum,omitempty" yaml:"checksum,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + ExternalID string `json:"externalId,omitempty" yaml:"externalId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Status *NodeDriverStatus `json:"status,omitempty" yaml:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UIURL string `json:"uiUrl,omitempty" yaml:"uiUrl,omitempty"` + URL string `json:"url,omitempty" yaml:"url,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + WhitelistDomains []string `json:"whitelistDomains,omitempty" yaml:"whitelistDomains,omitempty"` +} + +type NodeDriverCollection struct { + types.Collection + Data []NodeDriver `json:"data,omitempty"` + client *NodeDriverClient +} + +type NodeDriverClient struct { + apiClient *Client +} + +type NodeDriverOperations interface { + List(opts *types.ListOpts) (*NodeDriverCollection, error) + ListAll(opts *types.ListOpts) (*NodeDriverCollection, error) + Create(opts *NodeDriver) (*NodeDriver, error) + Update(existing *NodeDriver, updates interface{}) (*NodeDriver, error) + Replace(existing *NodeDriver) (*NodeDriver, error) + ByID(id string) (*NodeDriver, error) + Delete(container *NodeDriver) error + + ActionActivate(resource *NodeDriver) (*NodeDriver, error) + + ActionDeactivate(resource *NodeDriver) (*NodeDriver, error) +} + +func newNodeDriverClient(apiClient *Client) *NodeDriverClient { + return &NodeDriverClient{ + apiClient: apiClient, + } +} + +func (c *NodeDriverClient) Create(container *NodeDriver) (*NodeDriver, error) { + resp := &NodeDriver{} + err := c.apiClient.Ops.DoCreate(NodeDriverType, container, resp) + return resp, err +} + +func (c *NodeDriverClient) Update(existing *NodeDriver, updates interface{}) (*NodeDriver, error) { + resp := &NodeDriver{} + err := c.apiClient.Ops.DoUpdate(NodeDriverType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *NodeDriverClient) Replace(obj *NodeDriver) (*NodeDriver, error) { + resp := &NodeDriver{} + err := c.apiClient.Ops.DoReplace(NodeDriverType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *NodeDriverClient) List(opts *types.ListOpts) (*NodeDriverCollection, error) { + resp := &NodeDriverCollection{} + err := c.apiClient.Ops.DoList(NodeDriverType, opts, resp) + resp.client = c + return resp, err +} + +func (c *NodeDriverClient) ListAll(opts *types.ListOpts) (*NodeDriverCollection, error) { + resp := &NodeDriverCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *NodeDriverCollection) Next() (*NodeDriverCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NodeDriverCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *NodeDriverClient) ByID(id string) (*NodeDriver, error) { + resp := &NodeDriver{} + err := c.apiClient.Ops.DoByID(NodeDriverType, id, resp) + return resp, err +} + +func (c *NodeDriverClient) Delete(container *NodeDriver) error { + return c.apiClient.Ops.DoResourceDelete(NodeDriverType, &container.Resource) +} + +func (c *NodeDriverClient) ActionActivate(resource *NodeDriver) (*NodeDriver, error) { + resp := &NodeDriver{} + err := c.apiClient.Ops.DoAction(NodeDriverType, "activate", &resource.Resource, nil, resp) + return resp, err +} + +func (c *NodeDriverClient) ActionDeactivate(resource *NodeDriver) (*NodeDriver, error) { + resp := &NodeDriver{} + err := c.apiClient.Ops.DoAction(NodeDriverType, "deactivate", &resource.Resource, nil, resp) + return resp, err +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_driver_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_driver_spec.go new file mode 100644 index 000000000..d8a64cb26 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_driver_spec.go @@ -0,0 +1,28 @@ +package client + +const ( + NodeDriverSpecType = "nodeDriverSpec" + NodeDriverSpecFieldActive = "active" + NodeDriverSpecFieldAddCloudCredential = "addCloudCredential" + NodeDriverSpecFieldBuiltin = "builtin" + NodeDriverSpecFieldChecksum = "checksum" + NodeDriverSpecFieldDescription = "description" + NodeDriverSpecFieldDisplayName = "displayName" + NodeDriverSpecFieldExternalID = "externalId" + NodeDriverSpecFieldUIURL = "uiUrl" + NodeDriverSpecFieldURL = "url" + NodeDriverSpecFieldWhitelistDomains = "whitelistDomains" +) + +type NodeDriverSpec struct { + Active bool `json:"active,omitempty" yaml:"active,omitempty"` + AddCloudCredential bool `json:"addCloudCredential,omitempty" yaml:"addCloudCredential,omitempty"` + Builtin bool `json:"builtin,omitempty" yaml:"builtin,omitempty"` + Checksum string `json:"checksum,omitempty" yaml:"checksum,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` + ExternalID string `json:"externalId,omitempty" yaml:"externalId,omitempty"` + UIURL string `json:"uiUrl,omitempty" yaml:"uiUrl,omitempty"` + URL string `json:"url,omitempty" yaml:"url,omitempty"` + WhitelistDomains []string `json:"whitelistDomains,omitempty" yaml:"whitelistDomains,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_driver_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_driver_status.go new file mode 100644 index 000000000..971f6bab7 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_driver_status.go @@ -0,0 +1,16 @@ +package client + +const ( + NodeDriverStatusType = "nodeDriverStatus" + NodeDriverStatusFieldAppliedChecksum = "appliedChecksum" + NodeDriverStatusFieldAppliedDockerMachineVersion = "appliedDockerMachineVersion" + NodeDriverStatusFieldAppliedURL = "appliedURL" + NodeDriverStatusFieldConditions = "conditions" +) + +type NodeDriverStatus struct { + AppliedChecksum string `json:"appliedChecksum,omitempty" yaml:"appliedChecksum,omitempty"` + AppliedDockerMachineVersion string `json:"appliedDockerMachineVersion,omitempty" yaml:"appliedDockerMachineVersion,omitempty"` + AppliedURL string `json:"appliedURL,omitempty" yaml:"appliedURL,omitempty"` + Conditions []Condition `json:"conditions,omitempty" yaml:"conditions,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_group.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_group.go new file mode 100644 index 000000000..733983a6c --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_group.go @@ -0,0 +1,48 @@ +package client + +const ( + NodeGroupType = "nodeGroup" + NodeGroupFieldArm = "arm" + NodeGroupFieldDesiredSize = "desiredSize" + NodeGroupFieldDiskSize = "diskSize" + NodeGroupFieldEc2SshKey = "ec2SshKey" + NodeGroupFieldGpu = "gpu" + NodeGroupFieldImageID = "imageId" + NodeGroupFieldInstanceType = "instanceType" + NodeGroupFieldLabels = "labels" + NodeGroupFieldLaunchTemplate = "launchTemplate" + NodeGroupFieldMaxSize = "maxSize" + NodeGroupFieldMinSize = "minSize" + NodeGroupFieldNodeRole = "nodeRole" + NodeGroupFieldNodegroupName = "nodegroupName" + NodeGroupFieldRequestSpotInstances = "requestSpotInstances" + NodeGroupFieldResourceTags = "resourceTags" + NodeGroupFieldSpotInstanceTypes = "spotInstanceTypes" + NodeGroupFieldSubnets = "subnets" + NodeGroupFieldTags = "tags" + NodeGroupFieldUserData = "userData" + NodeGroupFieldVersion = "version" +) + +type NodeGroup struct { + Arm *bool `json:"arm,omitempty" yaml:"arm,omitempty"` + DesiredSize *int64 `json:"desiredSize,omitempty" yaml:"desiredSize,omitempty"` + DiskSize *int64 `json:"diskSize,omitempty" yaml:"diskSize,omitempty"` + Ec2SshKey *string `json:"ec2SshKey,omitempty" yaml:"ec2SshKey,omitempty"` + Gpu *bool `json:"gpu,omitempty" yaml:"gpu,omitempty"` + ImageID *string `json:"imageId,omitempty" yaml:"imageId,omitempty"` + InstanceType *string `json:"instanceType,omitempty" yaml:"instanceType,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + LaunchTemplate *LaunchTemplate `json:"launchTemplate,omitempty" yaml:"launchTemplate,omitempty"` + MaxSize *int64 `json:"maxSize,omitempty" yaml:"maxSize,omitempty"` + MinSize *int64 `json:"minSize,omitempty" yaml:"minSize,omitempty"` + NodeRole *string `json:"nodeRole,omitempty" yaml:"nodeRole,omitempty"` + NodegroupName *string `json:"nodegroupName,omitempty" yaml:"nodegroupName,omitempty"` + RequestSpotInstances *bool `json:"requestSpotInstances,omitempty" yaml:"requestSpotInstances,omitempty"` + ResourceTags map[string]string `json:"resourceTags,omitempty" yaml:"resourceTags,omitempty"` + SpotInstanceTypes []string `json:"spotInstanceTypes,omitempty" yaml:"spotInstanceTypes,omitempty"` + Subnets []string `json:"subnets,omitempty" yaml:"subnets,omitempty"` + Tags map[string]string `json:"tags,omitempty" yaml:"tags,omitempty"` + UserData *string `json:"userData,omitempty" yaml:"userData,omitempty"` + Version *string `json:"version,omitempty" yaml:"version,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_info.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_info.go new file mode 100644 index 000000000..d3d8ac457 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_info.go @@ -0,0 +1,16 @@ +package client + +const ( + NodeInfoType = "nodeInfo" + NodeInfoFieldCPU = "cpu" + NodeInfoFieldKubernetes = "kubernetes" + NodeInfoFieldMemory = "memory" + NodeInfoFieldOS = "os" +) + +type NodeInfo struct { + CPU *CPUInfo `json:"cpu,omitempty" yaml:"cpu,omitempty"` + Kubernetes *KubernetesInfo `json:"kubernetes,omitempty" yaml:"kubernetes,omitempty"` + Memory *MemoryInfo `json:"memory,omitempty" yaml:"memory,omitempty"` + OS *OSInfo `json:"os,omitempty" yaml:"os,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_plan.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_plan.go new file mode 100644 index 000000000..4bf3c78a7 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_plan.go @@ -0,0 +1,14 @@ +package client + +const ( + NodePlanType = "nodePlan" + NodePlanFieldAgentCheckInterval = "agentCheckInterval" + NodePlanFieldPlan = "plan" + NodePlanFieldVersion = "version" +) + +type NodePlan struct { + AgentCheckInterval int64 `json:"agentCheckInterval,omitempty" yaml:"agentCheckInterval,omitempty"` + Plan *RKEConfigNodePlan `json:"plan,omitempty" yaml:"plan,omitempty"` + Version int64 `json:"version,omitempty" yaml:"version,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_pool.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_pool.go new file mode 100644 index 000000000..345acd27a --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_pool.go @@ -0,0 +1,156 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + NodePoolType = "nodePool" + NodePoolFieldAnnotations = "annotations" + NodePoolFieldClusterID = "clusterId" + NodePoolFieldControlPlane = "controlPlane" + NodePoolFieldCreated = "created" + NodePoolFieldCreatorID = "creatorId" + NodePoolFieldDeleteNotReadyAfterSecs = "deleteNotReadyAfterSecs" + NodePoolFieldDisplayName = "displayName" + NodePoolFieldDrainBeforeDelete = "drainBeforeDelete" + NodePoolFieldDriver = "driver" + NodePoolFieldEtcd = "etcd" + NodePoolFieldHostnamePrefix = "hostnamePrefix" + NodePoolFieldLabels = "labels" + NodePoolFieldName = "name" + NodePoolFieldNamespaceId = "namespaceId" + NodePoolFieldNodeAnnotations = "nodeAnnotations" + NodePoolFieldNodeLabels = "nodeLabels" + NodePoolFieldNodeTaints = "nodeTaints" + NodePoolFieldNodeTemplateID = "nodeTemplateId" + NodePoolFieldOwnerReferences = "ownerReferences" + NodePoolFieldQuantity = "quantity" + NodePoolFieldRemoved = "removed" + NodePoolFieldState = "state" + NodePoolFieldStatus = "status" + NodePoolFieldTransitioning = "transitioning" + NodePoolFieldTransitioningMessage = "transitioningMessage" + NodePoolFieldUUID = "uuid" + NodePoolFieldWorker = "worker" +) + +type NodePool struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + ControlPlane bool `json:"controlPlane,omitempty" yaml:"controlPlane,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + DeleteNotReadyAfterSecs int64 `json:"deleteNotReadyAfterSecs,omitempty" yaml:"deleteNotReadyAfterSecs,omitempty"` + DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` + DrainBeforeDelete bool `json:"drainBeforeDelete,omitempty" yaml:"drainBeforeDelete,omitempty"` + Driver string `json:"driver,omitempty" yaml:"driver,omitempty"` + Etcd bool `json:"etcd,omitempty" yaml:"etcd,omitempty"` + HostnamePrefix string `json:"hostnamePrefix,omitempty" yaml:"hostnamePrefix,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"` + NodeAnnotations map[string]string `json:"nodeAnnotations,omitempty" yaml:"nodeAnnotations,omitempty"` + NodeLabels map[string]string `json:"nodeLabels,omitempty" yaml:"nodeLabels,omitempty"` + NodeTaints []Taint `json:"nodeTaints,omitempty" yaml:"nodeTaints,omitempty"` + NodeTemplateID string `json:"nodeTemplateId,omitempty" yaml:"nodeTemplateId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Quantity int64 `json:"quantity,omitempty" yaml:"quantity,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Status *NodePoolStatus `json:"status,omitempty" yaml:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + Worker bool `json:"worker,omitempty" yaml:"worker,omitempty"` +} + +type NodePoolCollection struct { + types.Collection + Data []NodePool `json:"data,omitempty"` + client *NodePoolClient +} + +type NodePoolClient struct { + apiClient *Client +} + +type NodePoolOperations interface { + List(opts *types.ListOpts) (*NodePoolCollection, error) + ListAll(opts *types.ListOpts) (*NodePoolCollection, error) + Create(opts *NodePool) (*NodePool, error) + Update(existing *NodePool, updates interface{}) (*NodePool, error) + Replace(existing *NodePool) (*NodePool, error) + ByID(id string) (*NodePool, error) + Delete(container *NodePool) error +} + +func newNodePoolClient(apiClient *Client) *NodePoolClient { + return &NodePoolClient{ + apiClient: apiClient, + } +} + +func (c *NodePoolClient) Create(container *NodePool) (*NodePool, error) { + resp := &NodePool{} + err := c.apiClient.Ops.DoCreate(NodePoolType, container, resp) + return resp, err +} + +func (c *NodePoolClient) Update(existing *NodePool, updates interface{}) (*NodePool, error) { + resp := &NodePool{} + err := c.apiClient.Ops.DoUpdate(NodePoolType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *NodePoolClient) Replace(obj *NodePool) (*NodePool, error) { + resp := &NodePool{} + err := c.apiClient.Ops.DoReplace(NodePoolType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *NodePoolClient) List(opts *types.ListOpts) (*NodePoolCollection, error) { + resp := &NodePoolCollection{} + err := c.apiClient.Ops.DoList(NodePoolType, opts, resp) + resp.client = c + return resp, err +} + +func (c *NodePoolClient) ListAll(opts *types.ListOpts) (*NodePoolCollection, error) { + resp := &NodePoolCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *NodePoolCollection) Next() (*NodePoolCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NodePoolCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *NodePoolClient) ByID(id string) (*NodePool, error) { + resp := &NodePool{} + err := c.apiClient.Ops.DoByID(NodePoolType, id, resp) + return resp, err +} + +func (c *NodePoolClient) Delete(container *NodePool) error { + return c.apiClient.Ops.DoResourceDelete(NodePoolType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_pool_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_pool_spec.go new file mode 100644 index 000000000..408463fcd --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_pool_spec.go @@ -0,0 +1,34 @@ +package client + +const ( + NodePoolSpecType = "nodePoolSpec" + NodePoolSpecFieldClusterID = "clusterId" + NodePoolSpecFieldControlPlane = "controlPlane" + NodePoolSpecFieldDeleteNotReadyAfterSecs = "deleteNotReadyAfterSecs" + NodePoolSpecFieldDisplayName = "displayName" + NodePoolSpecFieldDrainBeforeDelete = "drainBeforeDelete" + NodePoolSpecFieldEtcd = "etcd" + NodePoolSpecFieldHostnamePrefix = "hostnamePrefix" + NodePoolSpecFieldNodeAnnotations = "nodeAnnotations" + NodePoolSpecFieldNodeLabels = "nodeLabels" + NodePoolSpecFieldNodeTaints = "nodeTaints" + NodePoolSpecFieldNodeTemplateID = "nodeTemplateId" + NodePoolSpecFieldQuantity = "quantity" + NodePoolSpecFieldWorker = "worker" +) + +type NodePoolSpec struct { + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + ControlPlane bool `json:"controlPlane,omitempty" yaml:"controlPlane,omitempty"` + DeleteNotReadyAfterSecs int64 `json:"deleteNotReadyAfterSecs,omitempty" yaml:"deleteNotReadyAfterSecs,omitempty"` + DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` + DrainBeforeDelete bool `json:"drainBeforeDelete,omitempty" yaml:"drainBeforeDelete,omitempty"` + Etcd bool `json:"etcd,omitempty" yaml:"etcd,omitempty"` + HostnamePrefix string `json:"hostnamePrefix,omitempty" yaml:"hostnamePrefix,omitempty"` + NodeAnnotations map[string]string `json:"nodeAnnotations,omitempty" yaml:"nodeAnnotations,omitempty"` + NodeLabels map[string]string `json:"nodeLabels,omitempty" yaml:"nodeLabels,omitempty"` + NodeTaints []Taint `json:"nodeTaints,omitempty" yaml:"nodeTaints,omitempty"` + NodeTemplateID string `json:"nodeTemplateId,omitempty" yaml:"nodeTemplateId,omitempty"` + Quantity int64 `json:"quantity,omitempty" yaml:"quantity,omitempty"` + Worker bool `json:"worker,omitempty" yaml:"worker,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_pool_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_pool_status.go new file mode 100644 index 000000000..f5c7ed7da --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_pool_status.go @@ -0,0 +1,10 @@ +package client + +const ( + NodePoolStatusType = "nodePoolStatus" + NodePoolStatusFieldConditions = "conditions" +) + +type NodePoolStatus struct { + Conditions []Condition `json:"conditions,omitempty" yaml:"conditions,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_runtime_handler.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_runtime_handler.go new file mode 100644 index 000000000..500e2c91f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_runtime_handler.go @@ -0,0 +1,12 @@ +package client + +const ( + NodeRuntimeHandlerType = "nodeRuntimeHandler" + NodeRuntimeHandlerFieldFeatures = "features" + NodeRuntimeHandlerFieldName = "name" +) + +type NodeRuntimeHandler struct { + Features *NodeRuntimeHandlerFeatures `json:"features,omitempty" yaml:"features,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_runtime_handler_features.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_runtime_handler_features.go new file mode 100644 index 000000000..dda38ddee --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_runtime_handler_features.go @@ -0,0 +1,10 @@ +package client + +const ( + NodeRuntimeHandlerFeaturesType = "nodeRuntimeHandlerFeatures" + NodeRuntimeHandlerFeaturesFieldRecursiveReadOnlyMounts = "recursiveReadOnlyMounts" +) + +type NodeRuntimeHandlerFeatures struct { + RecursiveReadOnlyMounts *bool `json:"recursiveReadOnlyMounts,omitempty" yaml:"recursiveReadOnlyMounts,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_selector.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_selector.go new file mode 100644 index 000000000..721a16f4b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_selector.go @@ -0,0 +1,10 @@ +package client + +const ( + NodeSelectorType = "nodeSelector" + NodeSelectorFieldNodeSelectorTerms = "nodeSelectorTerms" +) + +type NodeSelector struct { + NodeSelectorTerms []NodeSelectorTerm `json:"nodeSelectorTerms,omitempty" yaml:"nodeSelectorTerms,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_selector_requirement.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_selector_requirement.go new file mode 100644 index 000000000..9338a8c86 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_selector_requirement.go @@ -0,0 +1,14 @@ +package client + +const ( + NodeSelectorRequirementType = "nodeSelectorRequirement" + NodeSelectorRequirementFieldKey = "key" + NodeSelectorRequirementFieldOperator = "operator" + NodeSelectorRequirementFieldValues = "values" +) + +type NodeSelectorRequirement struct { + Key string `json:"key,omitempty" yaml:"key,omitempty"` + Operator string `json:"operator,omitempty" yaml:"operator,omitempty"` + Values []string `json:"values,omitempty" yaml:"values,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_selector_term.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_selector_term.go new file mode 100644 index 000000000..11bf2562b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_selector_term.go @@ -0,0 +1,12 @@ +package client + +const ( + NodeSelectorTermType = "nodeSelectorTerm" + NodeSelectorTermFieldMatchExpressions = "matchExpressions" + NodeSelectorTermFieldMatchFields = "matchFields" +) + +type NodeSelectorTerm struct { + MatchExpressions []NodeSelectorRequirement `json:"matchExpressions,omitempty" yaml:"matchExpressions,omitempty"` + MatchFields []NodeSelectorRequirement `json:"matchFields,omitempty" yaml:"matchFields,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_spec.go new file mode 100644 index 000000000..f2f6eefe2 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_spec.go @@ -0,0 +1,50 @@ +package client + +const ( + NodeSpecType = "nodeSpec" + NodeSpecFieldControlPlane = "controlPlane" + NodeSpecFieldCustomConfig = "customConfig" + NodeSpecFieldDescription = "description" + NodeSpecFieldDesiredNodeTaints = "desiredNodeTaints" + NodeSpecFieldDesiredNodeUnschedulable = "desiredNodeUnschedulable" + NodeSpecFieldDisplayName = "displayName" + NodeSpecFieldEtcd = "etcd" + NodeSpecFieldImported = "imported" + NodeSpecFieldMetadataUpdate = "metadataUpdate" + NodeSpecFieldNodeDrainInput = "nodeDrainInput" + NodeSpecFieldNodePoolID = "nodePoolId" + NodeSpecFieldNodeTemplateID = "nodeTemplateId" + NodeSpecFieldPodCidr = "podCidr" + NodeSpecFieldPodCidrs = "podCidrs" + NodeSpecFieldProviderId = "providerId" + NodeSpecFieldRequestedHostname = "requestedHostname" + NodeSpecFieldScaledownTime = "scaledownTime" + NodeSpecFieldTaints = "taints" + NodeSpecFieldUnschedulable = "unschedulable" + NodeSpecFieldUpdateTaintsFromAPI = "updateTaintsFromAPI" + NodeSpecFieldWorker = "worker" +) + +type NodeSpec struct { + ControlPlane bool `json:"controlPlane,omitempty" yaml:"controlPlane,omitempty"` + CustomConfig *CustomConfig `json:"customConfig,omitempty" yaml:"customConfig,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + DesiredNodeTaints []Taint `json:"desiredNodeTaints,omitempty" yaml:"desiredNodeTaints,omitempty"` + DesiredNodeUnschedulable string `json:"desiredNodeUnschedulable,omitempty" yaml:"desiredNodeUnschedulable,omitempty"` + DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` + Etcd bool `json:"etcd,omitempty" yaml:"etcd,omitempty"` + Imported bool `json:"imported,omitempty" yaml:"imported,omitempty"` + MetadataUpdate *MetadataUpdate `json:"metadataUpdate,omitempty" yaml:"metadataUpdate,omitempty"` + NodeDrainInput *NodeDrainInput `json:"nodeDrainInput,omitempty" yaml:"nodeDrainInput,omitempty"` + NodePoolID string `json:"nodePoolId,omitempty" yaml:"nodePoolId,omitempty"` + NodeTemplateID string `json:"nodeTemplateId,omitempty" yaml:"nodeTemplateId,omitempty"` + PodCidr string `json:"podCidr,omitempty" yaml:"podCidr,omitempty"` + PodCidrs []string `json:"podCidrs,omitempty" yaml:"podCidrs,omitempty"` + ProviderId string `json:"providerId,omitempty" yaml:"providerId,omitempty"` + RequestedHostname string `json:"requestedHostname,omitempty" yaml:"requestedHostname,omitempty"` + ScaledownTime string `json:"scaledownTime,omitempty" yaml:"scaledownTime,omitempty"` + Taints []Taint `json:"taints,omitempty" yaml:"taints,omitempty"` + Unschedulable bool `json:"unschedulable,omitempty" yaml:"unschedulable,omitempty"` + UpdateTaintsFromAPI *bool `json:"updateTaintsFromAPI,omitempty" yaml:"updateTaintsFromAPI,omitempty"` + Worker bool `json:"worker,omitempty" yaml:"worker,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_status.go new file mode 100644 index 000000000..99a1754c5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_status.go @@ -0,0 +1,48 @@ +package client + +const ( + NodeStatusType = "nodeStatus" + NodeStatusFieldAllocatable = "allocatable" + NodeStatusFieldAppliedNodeVersion = "appliedNodeVersion" + NodeStatusFieldCapacity = "capacity" + NodeStatusFieldConditions = "conditions" + NodeStatusFieldDockerInfo = "dockerInfo" + NodeStatusFieldExternalIPAddress = "externalIpAddress" + NodeStatusFieldHostname = "hostname" + NodeStatusFieldIPAddress = "ipAddress" + NodeStatusFieldInfo = "info" + NodeStatusFieldLimits = "limits" + NodeStatusFieldNodeAnnotations = "nodeAnnotations" + NodeStatusFieldNodeConfig = "rkeNode" + NodeStatusFieldNodeLabels = "nodeLabels" + NodeStatusFieldNodeName = "nodeName" + NodeStatusFieldNodePlan = "nodePlan" + NodeStatusFieldNodeTaints = "nodeTaints" + NodeStatusFieldRequested = "requested" + NodeStatusFieldRuntimeHandlers = "runtimeHandlers" + NodeStatusFieldVolumesAttached = "volumesAttached" + NodeStatusFieldVolumesInUse = "volumesInUse" +) + +type NodeStatus struct { + Allocatable map[string]string `json:"allocatable,omitempty" yaml:"allocatable,omitempty"` + AppliedNodeVersion int64 `json:"appliedNodeVersion,omitempty" yaml:"appliedNodeVersion,omitempty"` + Capacity map[string]string `json:"capacity,omitempty" yaml:"capacity,omitempty"` + Conditions []NodeCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + DockerInfo *DockerInfo `json:"dockerInfo,omitempty" yaml:"dockerInfo,omitempty"` + ExternalIPAddress string `json:"externalIpAddress,omitempty" yaml:"externalIpAddress,omitempty"` + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + IPAddress string `json:"ipAddress,omitempty" yaml:"ipAddress,omitempty"` + Info *NodeInfo `json:"info,omitempty" yaml:"info,omitempty"` + Limits map[string]string `json:"limits,omitempty" yaml:"limits,omitempty"` + NodeAnnotations map[string]string `json:"nodeAnnotations,omitempty" yaml:"nodeAnnotations,omitempty"` + NodeConfig *RKEConfigNode `json:"rkeNode,omitempty" yaml:"rkeNode,omitempty"` + NodeLabels map[string]string `json:"nodeLabels,omitempty" yaml:"nodeLabels,omitempty"` + NodeName string `json:"nodeName,omitempty" yaml:"nodeName,omitempty"` + NodePlan *NodePlan `json:"nodePlan,omitempty" yaml:"nodePlan,omitempty"` + NodeTaints []Taint `json:"nodeTaints,omitempty" yaml:"nodeTaints,omitempty"` + Requested map[string]string `json:"requested,omitempty" yaml:"requested,omitempty"` + RuntimeHandlers []NodeRuntimeHandler `json:"runtimeHandlers,omitempty" yaml:"runtimeHandlers,omitempty"` + VolumesAttached map[string]AttachedVolume `json:"volumesAttached,omitempty" yaml:"volumesAttached,omitempty"` + VolumesInUse []string `json:"volumesInUse,omitempty" yaml:"volumesInUse,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_system_info.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_system_info.go new file mode 100644 index 000000000..c5632f827 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_system_info.go @@ -0,0 +1,28 @@ +package client + +const ( + NodeSystemInfoType = "nodeSystemInfo" + NodeSystemInfoFieldArchitecture = "architecture" + NodeSystemInfoFieldBootID = "bootID" + NodeSystemInfoFieldContainerRuntimeVersion = "containerRuntimeVersion" + NodeSystemInfoFieldKernelVersion = "kernelVersion" + NodeSystemInfoFieldKubeProxyVersion = "kubeProxyVersion" + NodeSystemInfoFieldKubeletVersion = "kubeletVersion" + NodeSystemInfoFieldMachineID = "machineID" + NodeSystemInfoFieldOSImage = "osImage" + NodeSystemInfoFieldOperatingSystem = "operatingSystem" + NodeSystemInfoFieldSystemUUID = "systemUUID" +) + +type NodeSystemInfo struct { + Architecture string `json:"architecture,omitempty" yaml:"architecture,omitempty"` + BootID string `json:"bootID,omitempty" yaml:"bootID,omitempty"` + ContainerRuntimeVersion string `json:"containerRuntimeVersion,omitempty" yaml:"containerRuntimeVersion,omitempty"` + KernelVersion string `json:"kernelVersion,omitempty" yaml:"kernelVersion,omitempty"` + KubeProxyVersion string `json:"kubeProxyVersion,omitempty" yaml:"kubeProxyVersion,omitempty"` + KubeletVersion string `json:"kubeletVersion,omitempty" yaml:"kubeletVersion,omitempty"` + MachineID string `json:"machineID,omitempty" yaml:"machineID,omitempty"` + OSImage string `json:"osImage,omitempty" yaml:"osImage,omitempty"` + OperatingSystem string `json:"operatingSystem,omitempty" yaml:"operatingSystem,omitempty"` + SystemUUID string `json:"systemUUID,omitempty" yaml:"systemUUID,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template.go new file mode 100644 index 000000000..bd6ce9c3e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template.go @@ -0,0 +1,160 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + NodeTemplateType = "nodeTemplate" + NodeTemplateFieldAnnotations = "annotations" + NodeTemplateFieldAuthCertificateAuthority = "authCertificateAuthority" + NodeTemplateFieldAuthKey = "authKey" + NodeTemplateFieldCloudCredentialID = "cloudCredentialId" + NodeTemplateFieldCreated = "created" + NodeTemplateFieldCreatorID = "creatorId" + NodeTemplateFieldDescription = "description" + NodeTemplateFieldDockerVersion = "dockerVersion" + NodeTemplateFieldDriver = "driver" + NodeTemplateFieldEngineEnv = "engineEnv" + NodeTemplateFieldEngineInsecureRegistry = "engineInsecureRegistry" + NodeTemplateFieldEngineInstallURL = "engineInstallURL" + NodeTemplateFieldEngineLabel = "engineLabel" + NodeTemplateFieldEngineOpt = "engineOpt" + NodeTemplateFieldEngineRegistryMirror = "engineRegistryMirror" + NodeTemplateFieldEngineStorageDriver = "engineStorageDriver" + NodeTemplateFieldLabels = "labels" + NodeTemplateFieldLogOpt = "logOpt" + NodeTemplateFieldName = "name" + NodeTemplateFieldNodeTaints = "nodeTaints" + NodeTemplateFieldOwnerReferences = "ownerReferences" + NodeTemplateFieldRemoved = "removed" + NodeTemplateFieldState = "state" + NodeTemplateFieldStatus = "status" + NodeTemplateFieldStorageOpt = "storageOpt" + NodeTemplateFieldTransitioning = "transitioning" + NodeTemplateFieldTransitioningMessage = "transitioningMessage" + NodeTemplateFieldUUID = "uuid" + NodeTemplateFieldUseInternalIPAddress = "useInternalIpAddress" +) + +type NodeTemplate struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + AuthCertificateAuthority string `json:"authCertificateAuthority,omitempty" yaml:"authCertificateAuthority,omitempty"` + AuthKey string `json:"authKey,omitempty" yaml:"authKey,omitempty"` + CloudCredentialID string `json:"cloudCredentialId,omitempty" yaml:"cloudCredentialId,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + DockerVersion string `json:"dockerVersion,omitempty" yaml:"dockerVersion,omitempty"` + Driver string `json:"driver,omitempty" yaml:"driver,omitempty"` + EngineEnv map[string]string `json:"engineEnv,omitempty" yaml:"engineEnv,omitempty"` + EngineInsecureRegistry []string `json:"engineInsecureRegistry,omitempty" yaml:"engineInsecureRegistry,omitempty"` + EngineInstallURL string `json:"engineInstallURL,omitempty" yaml:"engineInstallURL,omitempty"` + EngineLabel map[string]string `json:"engineLabel,omitempty" yaml:"engineLabel,omitempty"` + EngineOpt map[string]string `json:"engineOpt,omitempty" yaml:"engineOpt,omitempty"` + EngineRegistryMirror []string `json:"engineRegistryMirror,omitempty" yaml:"engineRegistryMirror,omitempty"` + EngineStorageDriver string `json:"engineStorageDriver,omitempty" yaml:"engineStorageDriver,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + LogOpt map[string]string `json:"logOpt,omitempty" yaml:"logOpt,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NodeTaints []Taint `json:"nodeTaints,omitempty" yaml:"nodeTaints,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Status *NodeTemplateStatus `json:"status,omitempty" yaml:"status,omitempty"` + StorageOpt map[string]string `json:"storageOpt,omitempty" yaml:"storageOpt,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UseInternalIPAddress *bool `json:"useInternalIpAddress,omitempty" yaml:"useInternalIpAddress,omitempty"` +} + +type NodeTemplateCollection struct { + types.Collection + Data []NodeTemplate `json:"data,omitempty"` + client *NodeTemplateClient +} + +type NodeTemplateClient struct { + apiClient *Client +} + +type NodeTemplateOperations interface { + List(opts *types.ListOpts) (*NodeTemplateCollection, error) + ListAll(opts *types.ListOpts) (*NodeTemplateCollection, error) + Create(opts *NodeTemplate) (*NodeTemplate, error) + Update(existing *NodeTemplate, updates interface{}) (*NodeTemplate, error) + Replace(existing *NodeTemplate) (*NodeTemplate, error) + ByID(id string) (*NodeTemplate, error) + Delete(container *NodeTemplate) error +} + +func newNodeTemplateClient(apiClient *Client) *NodeTemplateClient { + return &NodeTemplateClient{ + apiClient: apiClient, + } +} + +func (c *NodeTemplateClient) Create(container *NodeTemplate) (*NodeTemplate, error) { + resp := &NodeTemplate{} + err := c.apiClient.Ops.DoCreate(NodeTemplateType, container, resp) + return resp, err +} + +func (c *NodeTemplateClient) Update(existing *NodeTemplate, updates interface{}) (*NodeTemplate, error) { + resp := &NodeTemplate{} + err := c.apiClient.Ops.DoUpdate(NodeTemplateType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *NodeTemplateClient) Replace(obj *NodeTemplate) (*NodeTemplate, error) { + resp := &NodeTemplate{} + err := c.apiClient.Ops.DoReplace(NodeTemplateType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *NodeTemplateClient) List(opts *types.ListOpts) (*NodeTemplateCollection, error) { + resp := &NodeTemplateCollection{} + err := c.apiClient.Ops.DoList(NodeTemplateType, opts, resp) + resp.client = c + return resp, err +} + +func (c *NodeTemplateClient) ListAll(opts *types.ListOpts) (*NodeTemplateCollection, error) { + resp := &NodeTemplateCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *NodeTemplateCollection) Next() (*NodeTemplateCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NodeTemplateCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *NodeTemplateClient) ByID(id string) (*NodeTemplate, error) { + resp := &NodeTemplate{} + err := c.apiClient.Ops.DoByID(NodeTemplateType, id, resp) + return resp, err +} + +func (c *NodeTemplateClient) Delete(container *NodeTemplate) error { + return c.apiClient.Ops.DoResourceDelete(NodeTemplateType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template_condition.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template_condition.go new file mode 100644 index 000000000..c3b3fe97a --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template_condition.go @@ -0,0 +1,18 @@ +package client + +const ( + NodeTemplateConditionType = "nodeTemplateCondition" + NodeTemplateConditionFieldLastTransitionTime = "lastTransitionTime" + NodeTemplateConditionFieldLastUpdateTime = "lastUpdateTime" + NodeTemplateConditionFieldReason = "reason" + NodeTemplateConditionFieldStatus = "status" + NodeTemplateConditionFieldType = "type" +) + +type NodeTemplateCondition struct { + LastTransitionTime string `json:"lastTransitionTime,omitempty" yaml:"lastTransitionTime,omitempty"` + LastUpdateTime string `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"` + Reason string `json:"reason,omitempty" yaml:"reason,omitempty"` + Status string `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template_spec.go new file mode 100644 index 000000000..e93072202 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template_spec.go @@ -0,0 +1,44 @@ +package client + +const ( + NodeTemplateSpecType = "nodeTemplateSpec" + NodeTemplateSpecFieldAuthCertificateAuthority = "authCertificateAuthority" + NodeTemplateSpecFieldAuthKey = "authKey" + NodeTemplateSpecFieldCloudCredentialID = "cloudCredentialId" + NodeTemplateSpecFieldDescription = "description" + NodeTemplateSpecFieldDisplayName = "displayName" + NodeTemplateSpecFieldDockerVersion = "dockerVersion" + NodeTemplateSpecFieldDriver = "driver" + NodeTemplateSpecFieldEngineEnv = "engineEnv" + NodeTemplateSpecFieldEngineInsecureRegistry = "engineInsecureRegistry" + NodeTemplateSpecFieldEngineInstallURL = "engineInstallURL" + NodeTemplateSpecFieldEngineLabel = "engineLabel" + NodeTemplateSpecFieldEngineOpt = "engineOpt" + NodeTemplateSpecFieldEngineRegistryMirror = "engineRegistryMirror" + NodeTemplateSpecFieldEngineStorageDriver = "engineStorageDriver" + NodeTemplateSpecFieldLogOpt = "logOpt" + NodeTemplateSpecFieldNodeTaints = "nodeTaints" + NodeTemplateSpecFieldStorageOpt = "storageOpt" + NodeTemplateSpecFieldUseInternalIPAddress = "useInternalIpAddress" +) + +type NodeTemplateSpec struct { + AuthCertificateAuthority string `json:"authCertificateAuthority,omitempty" yaml:"authCertificateAuthority,omitempty"` + AuthKey string `json:"authKey,omitempty" yaml:"authKey,omitempty"` + CloudCredentialID string `json:"cloudCredentialId,omitempty" yaml:"cloudCredentialId,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` + DockerVersion string `json:"dockerVersion,omitempty" yaml:"dockerVersion,omitempty"` + Driver string `json:"driver,omitempty" yaml:"driver,omitempty"` + EngineEnv map[string]string `json:"engineEnv,omitempty" yaml:"engineEnv,omitempty"` + EngineInsecureRegistry []string `json:"engineInsecureRegistry,omitempty" yaml:"engineInsecureRegistry,omitempty"` + EngineInstallURL string `json:"engineInstallURL,omitempty" yaml:"engineInstallURL,omitempty"` + EngineLabel map[string]string `json:"engineLabel,omitempty" yaml:"engineLabel,omitempty"` + EngineOpt map[string]string `json:"engineOpt,omitempty" yaml:"engineOpt,omitempty"` + EngineRegistryMirror []string `json:"engineRegistryMirror,omitempty" yaml:"engineRegistryMirror,omitempty"` + EngineStorageDriver string `json:"engineStorageDriver,omitempty" yaml:"engineStorageDriver,omitempty"` + LogOpt map[string]string `json:"logOpt,omitempty" yaml:"logOpt,omitempty"` + NodeTaints []Taint `json:"nodeTaints,omitempty" yaml:"nodeTaints,omitempty"` + StorageOpt map[string]string `json:"storageOpt,omitempty" yaml:"storageOpt,omitempty"` + UseInternalIPAddress *bool `json:"useInternalIpAddress,omitempty" yaml:"useInternalIpAddress,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template_status.go new file mode 100644 index 000000000..c8b5d713b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_template_status.go @@ -0,0 +1,10 @@ +package client + +const ( + NodeTemplateStatusType = "nodeTemplateStatus" + NodeTemplateStatusFieldConditions = "conditions" +) + +type NodeTemplateStatus struct { + Conditions []NodeTemplateCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_upgrade_strategy.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_upgrade_strategy.go new file mode 100644 index 000000000..3e6106c32 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_node_upgrade_strategy.go @@ -0,0 +1,16 @@ +package client + +const ( + NodeUpgradeStrategyType = "nodeUpgradeStrategy" + NodeUpgradeStrategyFieldDrain = "drain" + NodeUpgradeStrategyFieldDrainInput = "nodeDrainInput" + NodeUpgradeStrategyFieldMaxUnavailableControlplane = "maxUnavailableControlplane" + NodeUpgradeStrategyFieldMaxUnavailableWorker = "maxUnavailableWorker" +) + +type NodeUpgradeStrategy struct { + Drain *bool `json:"drain,omitempty" yaml:"drain,omitempty"` + DrainInput *NodeDrainInput `json:"nodeDrainInput,omitempty" yaml:"nodeDrainInput,omitempty"` + MaxUnavailableControlplane string `json:"maxUnavailableControlplane,omitempty" yaml:"maxUnavailableControlplane,omitempty"` + MaxUnavailableWorker string `json:"maxUnavailableWorker,omitempty" yaml:"maxUnavailableWorker,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_nodelocal.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_nodelocal.go new file mode 100644 index 000000000..392249ccb --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_nodelocal.go @@ -0,0 +1,16 @@ +package client + +const ( + NodelocalType = "nodelocal" + NodelocalFieldIPAddress = "ipAddress" + NodelocalFieldNodeLocalDNSPriorityClassName = "nodeLocalDnsPriorityClassName" + NodelocalFieldNodeSelector = "nodeSelector" + NodelocalFieldUpdateStrategy = "updateStrategy" +) + +type Nodelocal struct { + IPAddress string `json:"ipAddress,omitempty" yaml:"ipAddress,omitempty"` + NodeLocalDNSPriorityClassName string `json:"nodeLocalDnsPriorityClassName,omitempty" yaml:"nodeLocalDnsPriorityClassName,omitempty"` + NodeSelector map[string]string `json:"nodeSelector,omitempty" yaml:"nodeSelector,omitempty"` + UpdateStrategy *DaemonSetUpdateStrategy `json:"updateStrategy,omitempty" yaml:"updateStrategy,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_object_field_selector.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_object_field_selector.go new file mode 100644 index 000000000..4951d2af7 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_object_field_selector.go @@ -0,0 +1,12 @@ +package client + +const ( + ObjectFieldSelectorType = "objectFieldSelector" + ObjectFieldSelectorFieldAPIVersion = "apiVersion" + ObjectFieldSelectorFieldFieldPath = "fieldPath" +) + +type ObjectFieldSelector struct { + APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"` + FieldPath string `json:"fieldPath,omitempty" yaml:"fieldPath,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_object_meta.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_object_meta.go new file mode 100644 index 000000000..29f79630f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_object_meta.go @@ -0,0 +1,28 @@ +package client + +const ( + ObjectMetaType = "objectMeta" + ObjectMetaFieldAnnotations = "annotations" + ObjectMetaFieldCreated = "created" + ObjectMetaFieldFinalizers = "finalizers" + ObjectMetaFieldLabels = "labels" + ObjectMetaFieldName = "name" + ObjectMetaFieldNamespace = "namespace" + ObjectMetaFieldOwnerReferences = "ownerReferences" + ObjectMetaFieldRemoved = "removed" + ObjectMetaFieldSelfLink = "selfLink" + ObjectMetaFieldUUID = "uuid" +) + +type ObjectMeta struct { + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + Finalizers []string `json:"finalizers,omitempty" yaml:"finalizers,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + SelfLink string `json:"selfLink,omitempty" yaml:"selfLink,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_oidc_apply_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_oidc_apply_input.go new file mode 100644 index 000000000..cc73a7708 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_oidc_apply_input.go @@ -0,0 +1,14 @@ +package client + +const ( + OIDCApplyInputType = "oidcApplyInput" + OIDCApplyInputFieldCode = "code" + OIDCApplyInputFieldEnabled = "enabled" + OIDCApplyInputFieldOIDCConfig = "oidcConfig" +) + +type OIDCApplyInput struct { + Code string `json:"code,omitempty" yaml:"code,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + OIDCConfig *OIDCConfig `json:"oidcConfig,omitempty" yaml:"oidcConfig,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_oidc_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_oidc_config.go new file mode 100644 index 000000000..c8a5c21ce --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_oidc_config.go @@ -0,0 +1,62 @@ +package client + +const ( + OIDCConfigType = "oidcConfig" + OIDCConfigFieldAccessMode = "accessMode" + OIDCConfigFieldAcrValue = "acrValue" + OIDCConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + OIDCConfigFieldAnnotations = "annotations" + OIDCConfigFieldAuthEndpoint = "authEndpoint" + OIDCConfigFieldCertificate = "certificate" + OIDCConfigFieldClientID = "clientId" + OIDCConfigFieldClientSecret = "clientSecret" + OIDCConfigFieldCreated = "created" + OIDCConfigFieldCreatorID = "creatorId" + OIDCConfigFieldEnabled = "enabled" + OIDCConfigFieldGroupSearchEnabled = "groupSearchEnabled" + OIDCConfigFieldGroupsClaim = "groupsClaim" + OIDCConfigFieldIssuer = "issuer" + OIDCConfigFieldJWKSUrl = "jwksUrl" + OIDCConfigFieldLabels = "labels" + OIDCConfigFieldName = "name" + OIDCConfigFieldOwnerReferences = "ownerReferences" + OIDCConfigFieldPrivateKey = "privateKey" + OIDCConfigFieldRancherURL = "rancherUrl" + OIDCConfigFieldRemoved = "removed" + OIDCConfigFieldScopes = "scope" + OIDCConfigFieldStatus = "status" + OIDCConfigFieldTokenEndpoint = "tokenEndpoint" + OIDCConfigFieldType = "type" + OIDCConfigFieldUUID = "uuid" + OIDCConfigFieldUserInfoEndpoint = "userInfoEndpoint" +) + +type OIDCConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AcrValue string `json:"acrValue,omitempty" yaml:"acrValue,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + AuthEndpoint string `json:"authEndpoint,omitempty" yaml:"authEndpoint,omitempty"` + Certificate string `json:"certificate,omitempty" yaml:"certificate,omitempty"` + ClientID string `json:"clientId,omitempty" yaml:"clientId,omitempty"` + ClientSecret string `json:"clientSecret,omitempty" yaml:"clientSecret,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + GroupSearchEnabled *bool `json:"groupSearchEnabled,omitempty" yaml:"groupSearchEnabled,omitempty"` + GroupsClaim string `json:"groupsClaim,omitempty" yaml:"groupsClaim,omitempty"` + Issuer string `json:"issuer,omitempty" yaml:"issuer,omitempty"` + JWKSUrl string `json:"jwksUrl,omitempty" yaml:"jwksUrl,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + PrivateKey string `json:"privateKey,omitempty" yaml:"privateKey,omitempty"` + RancherURL string `json:"rancherUrl,omitempty" yaml:"rancherUrl,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Scopes string `json:"scope,omitempty" yaml:"scope,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + TokenEndpoint string `json:"tokenEndpoint,omitempty" yaml:"tokenEndpoint,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserInfoEndpoint string `json:"userInfoEndpoint,omitempty" yaml:"userInfoEndpoint,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_oidc_test_output.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_oidc_test_output.go new file mode 100644 index 000000000..db930c861 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_oidc_test_output.go @@ -0,0 +1,10 @@ +package client + +const ( + OIDCTestOutputType = "oidcTestOutput" + OIDCTestOutputFieldRedirectURL = "redirectUrl" +) + +type OIDCTestOutput struct { + RedirectURL string `json:"redirectUrl,omitempty" yaml:"redirectUrl,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_okta_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_okta_config.go new file mode 100644 index 000000000..4279acbc0 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_okta_config.go @@ -0,0 +1,54 @@ +package client + +const ( + OKTAConfigType = "oktaConfig" + OKTAConfigFieldAccessMode = "accessMode" + OKTAConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + OKTAConfigFieldAnnotations = "annotations" + OKTAConfigFieldCreated = "created" + OKTAConfigFieldCreatorID = "creatorId" + OKTAConfigFieldDisplayNameField = "displayNameField" + OKTAConfigFieldEnabled = "enabled" + OKTAConfigFieldEntityID = "entityID" + OKTAConfigFieldGroupsField = "groupsField" + OKTAConfigFieldIDPMetadataContent = "idpMetadataContent" + OKTAConfigFieldLabels = "labels" + OKTAConfigFieldName = "name" + OKTAConfigFieldOpenLdapConfig = "openLdapConfig" + OKTAConfigFieldOwnerReferences = "ownerReferences" + OKTAConfigFieldRancherAPIHost = "rancherApiHost" + OKTAConfigFieldRemoved = "removed" + OKTAConfigFieldSpCert = "spCert" + OKTAConfigFieldSpKey = "spKey" + OKTAConfigFieldStatus = "status" + OKTAConfigFieldType = "type" + OKTAConfigFieldUIDField = "uidField" + OKTAConfigFieldUUID = "uuid" + OKTAConfigFieldUserNameField = "userNameField" +) + +type OKTAConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + DisplayNameField string `json:"displayNameField,omitempty" yaml:"displayNameField,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + EntityID string `json:"entityID,omitempty" yaml:"entityID,omitempty"` + GroupsField string `json:"groupsField,omitempty" yaml:"groupsField,omitempty"` + IDPMetadataContent string `json:"idpMetadataContent,omitempty" yaml:"idpMetadataContent,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OpenLdapConfig *LdapFields `json:"openLdapConfig,omitempty" yaml:"openLdapConfig,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + RancherAPIHost string `json:"rancherApiHost,omitempty" yaml:"rancherApiHost,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + SpCert string `json:"spCert,omitempty" yaml:"spCert,omitempty"` + SpKey string `json:"spKey,omitempty" yaml:"spKey,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UIDField string `json:"uidField,omitempty" yaml:"uidField,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserNameField string `json:"userNameField,omitempty" yaml:"userNameField,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_open_ldap_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_open_ldap_config.go new file mode 100644 index 000000000..36af1a48a --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_open_ldap_config.go @@ -0,0 +1,86 @@ +package client + +const ( + OpenLdapConfigType = "openLdapConfig" + OpenLdapConfigFieldAccessMode = "accessMode" + OpenLdapConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + OpenLdapConfigFieldAnnotations = "annotations" + OpenLdapConfigFieldCertificate = "certificate" + OpenLdapConfigFieldConnectionTimeout = "connectionTimeout" + OpenLdapConfigFieldCreated = "created" + OpenLdapConfigFieldCreatorID = "creatorId" + OpenLdapConfigFieldEnabled = "enabled" + OpenLdapConfigFieldGroupDNAttribute = "groupDNAttribute" + OpenLdapConfigFieldGroupMemberMappingAttribute = "groupMemberMappingAttribute" + OpenLdapConfigFieldGroupMemberUserAttribute = "groupMemberUserAttribute" + OpenLdapConfigFieldGroupNameAttribute = "groupNameAttribute" + OpenLdapConfigFieldGroupObjectClass = "groupObjectClass" + OpenLdapConfigFieldGroupSearchAttribute = "groupSearchAttribute" + OpenLdapConfigFieldGroupSearchBase = "groupSearchBase" + OpenLdapConfigFieldGroupSearchFilter = "groupSearchFilter" + OpenLdapConfigFieldLabels = "labels" + OpenLdapConfigFieldName = "name" + OpenLdapConfigFieldNestedGroupMembershipEnabled = "nestedGroupMembershipEnabled" + OpenLdapConfigFieldOwnerReferences = "ownerReferences" + OpenLdapConfigFieldPort = "port" + OpenLdapConfigFieldRemoved = "removed" + OpenLdapConfigFieldServers = "servers" + OpenLdapConfigFieldServiceAccountDistinguishedName = "serviceAccountDistinguishedName" + OpenLdapConfigFieldServiceAccountPassword = "serviceAccountPassword" + OpenLdapConfigFieldStartTLS = "starttls" + OpenLdapConfigFieldStatus = "status" + OpenLdapConfigFieldTLS = "tls" + OpenLdapConfigFieldType = "type" + OpenLdapConfigFieldUUID = "uuid" + OpenLdapConfigFieldUserDisabledBitMask = "userDisabledBitMask" + OpenLdapConfigFieldUserEnabledAttribute = "userEnabledAttribute" + OpenLdapConfigFieldUserLoginAttribute = "userLoginAttribute" + OpenLdapConfigFieldUserMemberAttribute = "userMemberAttribute" + OpenLdapConfigFieldUserNameAttribute = "userNameAttribute" + OpenLdapConfigFieldUserObjectClass = "userObjectClass" + OpenLdapConfigFieldUserSearchAttribute = "userSearchAttribute" + OpenLdapConfigFieldUserSearchBase = "userSearchBase" + OpenLdapConfigFieldUserSearchFilter = "userSearchFilter" +) + +type OpenLdapConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Certificate string `json:"certificate,omitempty" yaml:"certificate,omitempty"` + ConnectionTimeout int64 `json:"connectionTimeout,omitempty" yaml:"connectionTimeout,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + GroupDNAttribute string `json:"groupDNAttribute,omitempty" yaml:"groupDNAttribute,omitempty"` + GroupMemberMappingAttribute string `json:"groupMemberMappingAttribute,omitempty" yaml:"groupMemberMappingAttribute,omitempty"` + GroupMemberUserAttribute string `json:"groupMemberUserAttribute,omitempty" yaml:"groupMemberUserAttribute,omitempty"` + GroupNameAttribute string `json:"groupNameAttribute,omitempty" yaml:"groupNameAttribute,omitempty"` + GroupObjectClass string `json:"groupObjectClass,omitempty" yaml:"groupObjectClass,omitempty"` + GroupSearchAttribute string `json:"groupSearchAttribute,omitempty" yaml:"groupSearchAttribute,omitempty"` + GroupSearchBase string `json:"groupSearchBase,omitempty" yaml:"groupSearchBase,omitempty"` + GroupSearchFilter string `json:"groupSearchFilter,omitempty" yaml:"groupSearchFilter,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NestedGroupMembershipEnabled bool `json:"nestedGroupMembershipEnabled,omitempty" yaml:"nestedGroupMembershipEnabled,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Servers []string `json:"servers,omitempty" yaml:"servers,omitempty"` + ServiceAccountDistinguishedName string `json:"serviceAccountDistinguishedName,omitempty" yaml:"serviceAccountDistinguishedName,omitempty"` + ServiceAccountPassword string `json:"serviceAccountPassword,omitempty" yaml:"serviceAccountPassword,omitempty"` + StartTLS bool `json:"starttls,omitempty" yaml:"starttls,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + TLS bool `json:"tls,omitempty" yaml:"tls,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserDisabledBitMask int64 `json:"userDisabledBitMask,omitempty" yaml:"userDisabledBitMask,omitempty"` + UserEnabledAttribute string `json:"userEnabledAttribute,omitempty" yaml:"userEnabledAttribute,omitempty"` + UserLoginAttribute string `json:"userLoginAttribute,omitempty" yaml:"userLoginAttribute,omitempty"` + UserMemberAttribute string `json:"userMemberAttribute,omitempty" yaml:"userMemberAttribute,omitempty"` + UserNameAttribute string `json:"userNameAttribute,omitempty" yaml:"userNameAttribute,omitempty"` + UserObjectClass string `json:"userObjectClass,omitempty" yaml:"userObjectClass,omitempty"` + UserSearchAttribute string `json:"userSearchAttribute,omitempty" yaml:"userSearchAttribute,omitempty"` + UserSearchBase string `json:"userSearchBase,omitempty" yaml:"userSearchBase,omitempty"` + UserSearchFilter string `json:"userSearchFilter,omitempty" yaml:"userSearchFilter,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_open_ldap_test_and_apply_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_open_ldap_test_and_apply_input.go new file mode 100644 index 000000000..29c48f160 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_open_ldap_test_and_apply_input.go @@ -0,0 +1,14 @@ +package client + +const ( + OpenLdapTestAndApplyInputType = "openLdapTestAndApplyInput" + OpenLdapTestAndApplyInputFieldLdapConfig = "ldapConfig" + OpenLdapTestAndApplyInputFieldPassword = "password" + OpenLdapTestAndApplyInputFieldUsername = "username" +) + +type OpenLdapTestAndApplyInput struct { + LdapConfig *LdapConfig `json:"ldapConfig,omitempty" yaml:"ldapConfig,omitempty"` + Password string `json:"password,omitempty" yaml:"password,omitempty"` + Username string `json:"username,omitempty" yaml:"username,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_openstack_cloud_provider.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_openstack_cloud_provider.go new file mode 100644 index 000000000..6d883ff22 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_openstack_cloud_provider.go @@ -0,0 +1,18 @@ +package client + +const ( + OpenstackCloudProviderType = "openstackCloudProvider" + OpenstackCloudProviderFieldBlockStorage = "blockStorage" + OpenstackCloudProviderFieldGlobal = "global" + OpenstackCloudProviderFieldLoadBalancer = "loadBalancer" + OpenstackCloudProviderFieldMetadata = "metadata" + OpenstackCloudProviderFieldRoute = "route" +) + +type OpenstackCloudProvider struct { + BlockStorage *BlockStorageOpenstackOpts `json:"blockStorage,omitempty" yaml:"blockStorage,omitempty"` + Global *GlobalOpenstackOpts `json:"global,omitempty" yaml:"global,omitempty"` + LoadBalancer *LoadBalancerOpenstackOpts `json:"loadBalancer,omitempty" yaml:"loadBalancer,omitempty"` + Metadata *MetadataOpenstackOpts `json:"metadata,omitempty" yaml:"metadata,omitempty"` + Route *RouteOpenstackOpts `json:"route,omitempty" yaml:"route,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_os_info.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_os_info.go new file mode 100644 index 000000000..c2c503cea --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_os_info.go @@ -0,0 +1,14 @@ +package client + +const ( + OSInfoType = "osInfo" + OSInfoFieldDockerVersion = "dockerVersion" + OSInfoFieldKernelVersion = "kernelVersion" + OSInfoFieldOperatingSystem = "operatingSystem" +) + +type OSInfo struct { + DockerVersion string `json:"dockerVersion,omitempty" yaml:"dockerVersion,omitempty"` + KernelVersion string `json:"kernelVersion,omitempty" yaml:"kernelVersion,omitempty"` + OperatingSystem string `json:"operatingSystem,omitempty" yaml:"operatingSystem,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_owner_reference.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_owner_reference.go new file mode 100644 index 000000000..5f4436b64 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_owner_reference.go @@ -0,0 +1,20 @@ +package client + +const ( + OwnerReferenceType = "ownerReference" + OwnerReferenceFieldAPIVersion = "apiVersion" + OwnerReferenceFieldBlockOwnerDeletion = "blockOwnerDeletion" + OwnerReferenceFieldController = "controller" + OwnerReferenceFieldKind = "kind" + OwnerReferenceFieldName = "name" + OwnerReferenceFieldUID = "uid" +) + +type OwnerReference struct { + APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"` + BlockOwnerDeletion *bool `json:"blockOwnerDeletion,omitempty" yaml:"blockOwnerDeletion,omitempty"` + Controller *bool `json:"controller,omitempty" yaml:"controller,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + UID string `json:"uid,omitempty" yaml:"uid,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_persistent_volume_claim_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_persistent_volume_claim_spec.go new file mode 100644 index 000000000..b3f2c1648 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_persistent_volume_claim_spec.go @@ -0,0 +1,26 @@ +package client + +const ( + PersistentVolumeClaimSpecType = "persistentVolumeClaimSpec" + PersistentVolumeClaimSpecFieldAccessModes = "accessModes" + PersistentVolumeClaimSpecFieldDataSource = "dataSource" + PersistentVolumeClaimSpecFieldDataSourceRef = "dataSourceRef" + PersistentVolumeClaimSpecFieldResources = "resources" + PersistentVolumeClaimSpecFieldSelector = "selector" + PersistentVolumeClaimSpecFieldStorageClassName = "storageClassName" + PersistentVolumeClaimSpecFieldVolumeAttributesClassName = "volumeAttributesClassName" + PersistentVolumeClaimSpecFieldVolumeMode = "volumeMode" + PersistentVolumeClaimSpecFieldVolumeName = "volumeName" +) + +type PersistentVolumeClaimSpec struct { + AccessModes []string `json:"accessModes,omitempty" yaml:"accessModes,omitempty"` + DataSource *TypedLocalObjectReference `json:"dataSource,omitempty" yaml:"dataSource,omitempty"` + DataSourceRef *TypedObjectReference `json:"dataSourceRef,omitempty" yaml:"dataSourceRef,omitempty"` + Resources *VolumeResourceRequirements `json:"resources,omitempty" yaml:"resources,omitempty"` + Selector *LabelSelector `json:"selector,omitempty" yaml:"selector,omitempty"` + StorageClassName string `json:"storageClassName,omitempty" yaml:"storageClassName,omitempty"` + VolumeAttributesClassName string `json:"volumeAttributesClassName,omitempty" yaml:"volumeAttributesClassName,omitempty"` + VolumeMode string `json:"volumeMode,omitempty" yaml:"volumeMode,omitempty"` + VolumeName string `json:"volumeName,omitempty" yaml:"volumeName,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_persistent_volume_claim_template.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_persistent_volume_claim_template.go new file mode 100644 index 000000000..1eed7b41d --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_persistent_volume_claim_template.go @@ -0,0 +1,12 @@ +package client + +const ( + PersistentVolumeClaimTemplateType = "persistentVolumeClaimTemplate" + PersistentVolumeClaimTemplateFieldObjectMeta = "metadata" + PersistentVolumeClaimTemplateFieldSpec = "spec" +) + +type PersistentVolumeClaimTemplate struct { + ObjectMeta *ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"` + Spec *PersistentVolumeClaimSpec `json:"spec,omitempty" yaml:"spec,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_persistent_volume_claim_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_persistent_volume_claim_volume_source.go new file mode 100644 index 000000000..1b4ae4bb0 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_persistent_volume_claim_volume_source.go @@ -0,0 +1,12 @@ +package client + +const ( + PersistentVolumeClaimVolumeSourceType = "persistentVolumeClaimVolumeSource" + PersistentVolumeClaimVolumeSourceFieldClaimName = "claimName" + PersistentVolumeClaimVolumeSourceFieldReadOnly = "readOnly" +) + +type PersistentVolumeClaimVolumeSource struct { + ClaimName string `json:"claimName,omitempty" yaml:"claimName,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_photon_persistent_disk_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_photon_persistent_disk_volume_source.go new file mode 100644 index 000000000..d6e8ffd30 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_photon_persistent_disk_volume_source.go @@ -0,0 +1,12 @@ +package client + +const ( + PhotonPersistentDiskVolumeSourceType = "photonPersistentDiskVolumeSource" + PhotonPersistentDiskVolumeSourceFieldFSType = "fsType" + PhotonPersistentDiskVolumeSourceFieldPdID = "pdID" +) + +type PhotonPersistentDiskVolumeSource struct { + FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"` + PdID string `json:"pdID,omitempty" yaml:"pdID,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ping_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ping_config.go new file mode 100644 index 000000000..3905905b2 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_ping_config.go @@ -0,0 +1,52 @@ +package client + +const ( + PingConfigType = "pingConfig" + PingConfigFieldAccessMode = "accessMode" + PingConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + PingConfigFieldAnnotations = "annotations" + PingConfigFieldCreated = "created" + PingConfigFieldCreatorID = "creatorId" + PingConfigFieldDisplayNameField = "displayNameField" + PingConfigFieldEnabled = "enabled" + PingConfigFieldEntityID = "entityID" + PingConfigFieldGroupsField = "groupsField" + PingConfigFieldIDPMetadataContent = "idpMetadataContent" + PingConfigFieldLabels = "labels" + PingConfigFieldName = "name" + PingConfigFieldOwnerReferences = "ownerReferences" + PingConfigFieldRancherAPIHost = "rancherApiHost" + PingConfigFieldRemoved = "removed" + PingConfigFieldSpCert = "spCert" + PingConfigFieldSpKey = "spKey" + PingConfigFieldStatus = "status" + PingConfigFieldType = "type" + PingConfigFieldUIDField = "uidField" + PingConfigFieldUUID = "uuid" + PingConfigFieldUserNameField = "userNameField" +) + +type PingConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + DisplayNameField string `json:"displayNameField,omitempty" yaml:"displayNameField,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + EntityID string `json:"entityID,omitempty" yaml:"entityID,omitempty"` + GroupsField string `json:"groupsField,omitempty" yaml:"groupsField,omitempty"` + IDPMetadataContent string `json:"idpMetadataContent,omitempty" yaml:"idpMetadataContent,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + RancherAPIHost string `json:"rancherApiHost,omitempty" yaml:"rancherApiHost,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + SpCert string `json:"spCert,omitempty" yaml:"spCert,omitempty"` + SpKey string `json:"spKey,omitempty" yaml:"spKey,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UIDField string `json:"uidField,omitempty" yaml:"uidField,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserNameField string `json:"userNameField,omitempty" yaml:"userNameField,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_affinity.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_affinity.go new file mode 100644 index 000000000..ebe2958ee --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_affinity.go @@ -0,0 +1,12 @@ +package client + +const ( + PodAffinityType = "podAffinity" + PodAffinityFieldPreferredDuringSchedulingIgnoredDuringExecution = "preferredDuringSchedulingIgnoredDuringExecution" + PodAffinityFieldRequiredDuringSchedulingIgnoredDuringExecution = "requiredDuringSchedulingIgnoredDuringExecution" +) + +type PodAffinity struct { + PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" yaml:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"` + RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" yaml:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_affinity_term.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_affinity_term.go new file mode 100644 index 000000000..aa1478e0b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_affinity_term.go @@ -0,0 +1,20 @@ +package client + +const ( + PodAffinityTermType = "podAffinityTerm" + PodAffinityTermFieldLabelSelector = "labelSelector" + PodAffinityTermFieldMatchLabelKeys = "matchLabelKeys" + PodAffinityTermFieldMismatchLabelKeys = "mismatchLabelKeys" + PodAffinityTermFieldNamespaceSelector = "namespaceSelector" + PodAffinityTermFieldNamespaces = "namespaces" + PodAffinityTermFieldTopologyKey = "topologyKey" +) + +type PodAffinityTerm struct { + LabelSelector *LabelSelector `json:"labelSelector,omitempty" yaml:"labelSelector,omitempty"` + MatchLabelKeys []string `json:"matchLabelKeys,omitempty" yaml:"matchLabelKeys,omitempty"` + MismatchLabelKeys []string `json:"mismatchLabelKeys,omitempty" yaml:"mismatchLabelKeys,omitempty"` + NamespaceSelector *LabelSelector `json:"namespaceSelector,omitempty" yaml:"namespaceSelector,omitempty"` + Namespaces []string `json:"namespaces,omitempty" yaml:"namespaces,omitempty"` + TopologyKey string `json:"topologyKey,omitempty" yaml:"topologyKey,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_anti_affinity.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_anti_affinity.go new file mode 100644 index 000000000..47fdd692e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_anti_affinity.go @@ -0,0 +1,12 @@ +package client + +const ( + PodAntiAffinityType = "podAntiAffinity" + PodAntiAffinityFieldPreferredDuringSchedulingIgnoredDuringExecution = "preferredDuringSchedulingIgnoredDuringExecution" + PodAntiAffinityFieldRequiredDuringSchedulingIgnoredDuringExecution = "requiredDuringSchedulingIgnoredDuringExecution" +) + +type PodAntiAffinity struct { + PreferredDuringSchedulingIgnoredDuringExecution []WeightedPodAffinityTerm `json:"preferredDuringSchedulingIgnoredDuringExecution,omitempty" yaml:"preferredDuringSchedulingIgnoredDuringExecution,omitempty"` + RequiredDuringSchedulingIgnoredDuringExecution []PodAffinityTerm `json:"requiredDuringSchedulingIgnoredDuringExecution,omitempty" yaml:"requiredDuringSchedulingIgnoredDuringExecution,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template.go new file mode 100644 index 000000000..5fc4e6c64 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template.go @@ -0,0 +1,122 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + PodSecurityAdmissionConfigurationTemplateType = "podSecurityAdmissionConfigurationTemplate" + PodSecurityAdmissionConfigurationTemplateFieldAnnotations = "annotations" + PodSecurityAdmissionConfigurationTemplateFieldConfiguration = "configuration" + PodSecurityAdmissionConfigurationTemplateFieldCreated = "created" + PodSecurityAdmissionConfigurationTemplateFieldCreatorID = "creatorId" + PodSecurityAdmissionConfigurationTemplateFieldDescription = "description" + PodSecurityAdmissionConfigurationTemplateFieldLabels = "labels" + PodSecurityAdmissionConfigurationTemplateFieldName = "name" + PodSecurityAdmissionConfigurationTemplateFieldOwnerReferences = "ownerReferences" + PodSecurityAdmissionConfigurationTemplateFieldRemoved = "removed" + PodSecurityAdmissionConfigurationTemplateFieldUUID = "uuid" +) + +type PodSecurityAdmissionConfigurationTemplate struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Configuration *PodSecurityAdmissionConfigurationTemplateSpec `json:"configuration,omitempty" yaml:"configuration,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type PodSecurityAdmissionConfigurationTemplateCollection struct { + types.Collection + Data []PodSecurityAdmissionConfigurationTemplate `json:"data,omitempty"` + client *PodSecurityAdmissionConfigurationTemplateClient +} + +type PodSecurityAdmissionConfigurationTemplateClient struct { + apiClient *Client +} + +type PodSecurityAdmissionConfigurationTemplateOperations interface { + List(opts *types.ListOpts) (*PodSecurityAdmissionConfigurationTemplateCollection, error) + ListAll(opts *types.ListOpts) (*PodSecurityAdmissionConfigurationTemplateCollection, error) + Create(opts *PodSecurityAdmissionConfigurationTemplate) (*PodSecurityAdmissionConfigurationTemplate, error) + Update(existing *PodSecurityAdmissionConfigurationTemplate, updates interface{}) (*PodSecurityAdmissionConfigurationTemplate, error) + Replace(existing *PodSecurityAdmissionConfigurationTemplate) (*PodSecurityAdmissionConfigurationTemplate, error) + ByID(id string) (*PodSecurityAdmissionConfigurationTemplate, error) + Delete(container *PodSecurityAdmissionConfigurationTemplate) error +} + +func newPodSecurityAdmissionConfigurationTemplateClient(apiClient *Client) *PodSecurityAdmissionConfigurationTemplateClient { + return &PodSecurityAdmissionConfigurationTemplateClient{ + apiClient: apiClient, + } +} + +func (c *PodSecurityAdmissionConfigurationTemplateClient) Create(container *PodSecurityAdmissionConfigurationTemplate) (*PodSecurityAdmissionConfigurationTemplate, error) { + resp := &PodSecurityAdmissionConfigurationTemplate{} + err := c.apiClient.Ops.DoCreate(PodSecurityAdmissionConfigurationTemplateType, container, resp) + return resp, err +} + +func (c *PodSecurityAdmissionConfigurationTemplateClient) Update(existing *PodSecurityAdmissionConfigurationTemplate, updates interface{}) (*PodSecurityAdmissionConfigurationTemplate, error) { + resp := &PodSecurityAdmissionConfigurationTemplate{} + err := c.apiClient.Ops.DoUpdate(PodSecurityAdmissionConfigurationTemplateType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *PodSecurityAdmissionConfigurationTemplateClient) Replace(obj *PodSecurityAdmissionConfigurationTemplate) (*PodSecurityAdmissionConfigurationTemplate, error) { + resp := &PodSecurityAdmissionConfigurationTemplate{} + err := c.apiClient.Ops.DoReplace(PodSecurityAdmissionConfigurationTemplateType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *PodSecurityAdmissionConfigurationTemplateClient) List(opts *types.ListOpts) (*PodSecurityAdmissionConfigurationTemplateCollection, error) { + resp := &PodSecurityAdmissionConfigurationTemplateCollection{} + err := c.apiClient.Ops.DoList(PodSecurityAdmissionConfigurationTemplateType, opts, resp) + resp.client = c + return resp, err +} + +func (c *PodSecurityAdmissionConfigurationTemplateClient) ListAll(opts *types.ListOpts) (*PodSecurityAdmissionConfigurationTemplateCollection, error) { + resp := &PodSecurityAdmissionConfigurationTemplateCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *PodSecurityAdmissionConfigurationTemplateCollection) Next() (*PodSecurityAdmissionConfigurationTemplateCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PodSecurityAdmissionConfigurationTemplateCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *PodSecurityAdmissionConfigurationTemplateClient) ByID(id string) (*PodSecurityAdmissionConfigurationTemplate, error) { + resp := &PodSecurityAdmissionConfigurationTemplate{} + err := c.apiClient.Ops.DoByID(PodSecurityAdmissionConfigurationTemplateType, id, resp) + return resp, err +} + +func (c *PodSecurityAdmissionConfigurationTemplateClient) Delete(container *PodSecurityAdmissionConfigurationTemplate) error { + return c.apiClient.Ops.DoResourceDelete(PodSecurityAdmissionConfigurationTemplateType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template_defaults.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template_defaults.go new file mode 100644 index 000000000..f2fc1d83a --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template_defaults.go @@ -0,0 +1,20 @@ +package client + +const ( + PodSecurityAdmissionConfigurationTemplateDefaultsType = "podSecurityAdmissionConfigurationTemplateDefaults" + PodSecurityAdmissionConfigurationTemplateDefaultsFieldAudit = "audit" + PodSecurityAdmissionConfigurationTemplateDefaultsFieldAuditVersion = "audit-version" + PodSecurityAdmissionConfigurationTemplateDefaultsFieldEnforce = "enforce" + PodSecurityAdmissionConfigurationTemplateDefaultsFieldEnforceVersion = "enforce-version" + PodSecurityAdmissionConfigurationTemplateDefaultsFieldWarn = "warn" + PodSecurityAdmissionConfigurationTemplateDefaultsFieldWarnVersion = "warn-version" +) + +type PodSecurityAdmissionConfigurationTemplateDefaults struct { + Audit string `json:"audit,omitempty" yaml:"audit,omitempty"` + AuditVersion string `json:"audit-version,omitempty" yaml:"audit-version,omitempty"` + Enforce string `json:"enforce,omitempty" yaml:"enforce,omitempty"` + EnforceVersion string `json:"enforce-version,omitempty" yaml:"enforce-version,omitempty"` + Warn string `json:"warn,omitempty" yaml:"warn,omitempty"` + WarnVersion string `json:"warn-version,omitempty" yaml:"warn-version,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template_exemptions.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template_exemptions.go new file mode 100644 index 000000000..392c5c4e7 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template_exemptions.go @@ -0,0 +1,14 @@ +package client + +const ( + PodSecurityAdmissionConfigurationTemplateExemptionsType = "podSecurityAdmissionConfigurationTemplateExemptions" + PodSecurityAdmissionConfigurationTemplateExemptionsFieldNamespaces = "namespaces" + PodSecurityAdmissionConfigurationTemplateExemptionsFieldRuntimeClasses = "runtimeClasses" + PodSecurityAdmissionConfigurationTemplateExemptionsFieldUsernames = "usernames" +) + +type PodSecurityAdmissionConfigurationTemplateExemptions struct { + Namespaces []string `json:"namespaces,omitempty" yaml:"namespaces,omitempty"` + RuntimeClasses []string `json:"runtimeClasses,omitempty" yaml:"runtimeClasses,omitempty"` + Usernames []string `json:"usernames,omitempty" yaml:"usernames,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template_spec.go new file mode 100644 index 000000000..afe2ef0df --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_pod_security_admission_configuration_template_spec.go @@ -0,0 +1,12 @@ +package client + +const ( + PodSecurityAdmissionConfigurationTemplateSpecType = "podSecurityAdmissionConfigurationTemplateSpec" + PodSecurityAdmissionConfigurationTemplateSpecFieldDefaults = "defaults" + PodSecurityAdmissionConfigurationTemplateSpecFieldExemptions = "exemptions" +) + +type PodSecurityAdmissionConfigurationTemplateSpec struct { + Defaults *PodSecurityAdmissionConfigurationTemplateDefaults `json:"defaults,omitempty" yaml:"defaults,omitempty"` + Exemptions *PodSecurityAdmissionConfigurationTemplateExemptions `json:"exemptions,omitempty" yaml:"exemptions,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_policy_rule.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_policy_rule.go new file mode 100644 index 000000000..b7a51ca27 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_policy_rule.go @@ -0,0 +1,18 @@ +package client + +const ( + PolicyRuleType = "policyRule" + PolicyRuleFieldAPIGroups = "apiGroups" + PolicyRuleFieldNonResourceURLs = "nonResourceURLs" + PolicyRuleFieldResourceNames = "resourceNames" + PolicyRuleFieldResources = "resources" + PolicyRuleFieldVerbs = "verbs" +) + +type PolicyRule struct { + APIGroups []string `json:"apiGroups,omitempty" yaml:"apiGroups,omitempty"` + NonResourceURLs []string `json:"nonResourceURLs,omitempty" yaml:"nonResourceURLs,omitempty"` + ResourceNames []string `json:"resourceNames,omitempty" yaml:"resourceNames,omitempty"` + Resources []string `json:"resources,omitempty" yaml:"resources,omitempty"` + Verbs []string `json:"verbs,omitempty" yaml:"verbs,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_port_check.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_port_check.go new file mode 100644 index 000000000..2e9c37e59 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_port_check.go @@ -0,0 +1,14 @@ +package client + +const ( + PortCheckType = "portCheck" + PortCheckFieldAddress = "address" + PortCheckFieldPort = "port" + PortCheckFieldProtocol = "protocol" +) + +type PortCheck struct { + Address string `json:"address,omitempty" yaml:"address,omitempty"` + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + Protocol string `json:"protocol,omitempty" yaml:"protocol,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_portworx_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_portworx_volume_source.go new file mode 100644 index 000000000..cbe98c652 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_portworx_volume_source.go @@ -0,0 +1,14 @@ +package client + +const ( + PortworxVolumeSourceType = "portworxVolumeSource" + PortworxVolumeSourceFieldFSType = "fsType" + PortworxVolumeSourceFieldReadOnly = "readOnly" + PortworxVolumeSourceFieldVolumeID = "volumeID" +) + +type PortworxVolumeSource struct { + FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + VolumeID string `json:"volumeID,omitempty" yaml:"volumeID,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_preference.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_preference.go new file mode 100644 index 000000000..5028069c4 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_preference.go @@ -0,0 +1,122 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + PreferenceType = "preference" + PreferenceFieldAnnotations = "annotations" + PreferenceFieldCreated = "created" + PreferenceFieldCreatorID = "creatorId" + PreferenceFieldLabels = "labels" + PreferenceFieldName = "name" + PreferenceFieldNamespaceId = "namespaceId" + PreferenceFieldOwnerReferences = "ownerReferences" + PreferenceFieldRemoved = "removed" + PreferenceFieldUUID = "uuid" + PreferenceFieldValue = "value" +) + +type Preference struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + Value string `json:"value,omitempty" yaml:"value,omitempty"` +} + +type PreferenceCollection struct { + types.Collection + Data []Preference `json:"data,omitempty"` + client *PreferenceClient +} + +type PreferenceClient struct { + apiClient *Client +} + +type PreferenceOperations interface { + List(opts *types.ListOpts) (*PreferenceCollection, error) + ListAll(opts *types.ListOpts) (*PreferenceCollection, error) + Create(opts *Preference) (*Preference, error) + Update(existing *Preference, updates interface{}) (*Preference, error) + Replace(existing *Preference) (*Preference, error) + ByID(id string) (*Preference, error) + Delete(container *Preference) error +} + +func newPreferenceClient(apiClient *Client) *PreferenceClient { + return &PreferenceClient{ + apiClient: apiClient, + } +} + +func (c *PreferenceClient) Create(container *Preference) (*Preference, error) { + resp := &Preference{} + err := c.apiClient.Ops.DoCreate(PreferenceType, container, resp) + return resp, err +} + +func (c *PreferenceClient) Update(existing *Preference, updates interface{}) (*Preference, error) { + resp := &Preference{} + err := c.apiClient.Ops.DoUpdate(PreferenceType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *PreferenceClient) Replace(obj *Preference) (*Preference, error) { + resp := &Preference{} + err := c.apiClient.Ops.DoReplace(PreferenceType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *PreferenceClient) List(opts *types.ListOpts) (*PreferenceCollection, error) { + resp := &PreferenceCollection{} + err := c.apiClient.Ops.DoList(PreferenceType, opts, resp) + resp.client = c + return resp, err +} + +func (c *PreferenceClient) ListAll(opts *types.ListOpts) (*PreferenceCollection, error) { + resp := &PreferenceCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *PreferenceCollection) Next() (*PreferenceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PreferenceCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *PreferenceClient) ByID(id string) (*Preference, error) { + resp := &Preference{} + err := c.apiClient.Ops.DoByID(PreferenceType, id, resp) + return resp, err +} + +func (c *PreferenceClient) Delete(container *Preference) error { + return c.apiClient.Ops.DoResourceDelete(PreferenceType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_preferred_scheduling_term.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_preferred_scheduling_term.go new file mode 100644 index 000000000..b5be217c2 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_preferred_scheduling_term.go @@ -0,0 +1,12 @@ +package client + +const ( + PreferredSchedulingTermType = "preferredSchedulingTerm" + PreferredSchedulingTermFieldPreference = "preference" + PreferredSchedulingTermFieldWeight = "weight" +) + +type PreferredSchedulingTerm struct { + Preference *NodeSelectorTerm `json:"preference,omitempty" yaml:"preference,omitempty"` + Weight int64 `json:"weight,omitempty" yaml:"weight,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_principal.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_principal.go new file mode 100644 index 000000000..1f51a8b12 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_principal.go @@ -0,0 +1,142 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + PrincipalType = "principal" + PrincipalFieldAnnotations = "annotations" + PrincipalFieldCreated = "created" + PrincipalFieldCreatorID = "creatorId" + PrincipalFieldExtraInfo = "extraInfo" + PrincipalFieldLabels = "labels" + PrincipalFieldLoginName = "loginName" + PrincipalFieldMe = "me" + PrincipalFieldMemberOf = "memberOf" + PrincipalFieldName = "name" + PrincipalFieldOwnerReferences = "ownerReferences" + PrincipalFieldPrincipalType = "principalType" + PrincipalFieldProfilePicture = "profilePicture" + PrincipalFieldProfileURL = "profileURL" + PrincipalFieldProvider = "provider" + PrincipalFieldRemoved = "removed" + PrincipalFieldUUID = "uuid" +) + +type Principal struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + ExtraInfo map[string]string `json:"extraInfo,omitempty" yaml:"extraInfo,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + LoginName string `json:"loginName,omitempty" yaml:"loginName,omitempty"` + Me bool `json:"me,omitempty" yaml:"me,omitempty"` + MemberOf bool `json:"memberOf,omitempty" yaml:"memberOf,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + PrincipalType string `json:"principalType,omitempty" yaml:"principalType,omitempty"` + ProfilePicture string `json:"profilePicture,omitempty" yaml:"profilePicture,omitempty"` + ProfileURL string `json:"profileURL,omitempty" yaml:"profileURL,omitempty"` + Provider string `json:"provider,omitempty" yaml:"provider,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type PrincipalCollection struct { + types.Collection + Data []Principal `json:"data,omitempty"` + client *PrincipalClient +} + +type PrincipalClient struct { + apiClient *Client +} + +type PrincipalOperations interface { + List(opts *types.ListOpts) (*PrincipalCollection, error) + ListAll(opts *types.ListOpts) (*PrincipalCollection, error) + Create(opts *Principal) (*Principal, error) + Update(existing *Principal, updates interface{}) (*Principal, error) + Replace(existing *Principal) (*Principal, error) + ByID(id string) (*Principal, error) + Delete(container *Principal) error + + CollectionActionSearch(resource *PrincipalCollection, input *SearchPrincipalsInput) (*PrincipalCollection, error) +} + +func newPrincipalClient(apiClient *Client) *PrincipalClient { + return &PrincipalClient{ + apiClient: apiClient, + } +} + +func (c *PrincipalClient) Create(container *Principal) (*Principal, error) { + resp := &Principal{} + err := c.apiClient.Ops.DoCreate(PrincipalType, container, resp) + return resp, err +} + +func (c *PrincipalClient) Update(existing *Principal, updates interface{}) (*Principal, error) { + resp := &Principal{} + err := c.apiClient.Ops.DoUpdate(PrincipalType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *PrincipalClient) Replace(obj *Principal) (*Principal, error) { + resp := &Principal{} + err := c.apiClient.Ops.DoReplace(PrincipalType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *PrincipalClient) List(opts *types.ListOpts) (*PrincipalCollection, error) { + resp := &PrincipalCollection{} + err := c.apiClient.Ops.DoList(PrincipalType, opts, resp) + resp.client = c + return resp, err +} + +func (c *PrincipalClient) ListAll(opts *types.ListOpts) (*PrincipalCollection, error) { + resp := &PrincipalCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *PrincipalCollection) Next() (*PrincipalCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PrincipalCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *PrincipalClient) ByID(id string) (*Principal, error) { + resp := &Principal{} + err := c.apiClient.Ops.DoByID(PrincipalType, id, resp) + return resp, err +} + +func (c *PrincipalClient) Delete(container *Principal) error { + return c.apiClient.Ops.DoResourceDelete(PrincipalType, &container.Resource) +} + +func (c *PrincipalClient) CollectionActionSearch(resource *PrincipalCollection, input *SearchPrincipalsInput) (*PrincipalCollection, error) { + resp := &PrincipalCollection{} + err := c.apiClient.Ops.DoCollectionAction(PrincipalType, "search", &resource.Collection, input, resp) + return resp, err +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_private_registry.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_private_registry.go new file mode 100644 index 000000000..1f6f19991 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_private_registry.go @@ -0,0 +1,18 @@ +package client + +const ( + PrivateRegistryType = "privateRegistry" + PrivateRegistryFieldECRCredentialPlugin = "ecrCredentialPlugin" + PrivateRegistryFieldIsDefault = "isDefault" + PrivateRegistryFieldPassword = "password" + PrivateRegistryFieldURL = "url" + PrivateRegistryFieldUser = "user" +) + +type PrivateRegistry struct { + ECRCredentialPlugin *ECRCredentialPlugin `json:"ecrCredentialPlugin,omitempty" yaml:"ecrCredentialPlugin,omitempty"` + IsDefault bool `json:"isDefault,omitempty" yaml:"isDefault,omitempty"` + Password string `json:"password,omitempty" yaml:"password,omitempty"` + URL string `json:"url,omitempty" yaml:"url,omitempty"` + User string `json:"user,omitempty" yaml:"user,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_process.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_process.go new file mode 100644 index 000000000..425fd657d --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_process.go @@ -0,0 +1,40 @@ +package client + +const ( + ProcessType = "process" + ProcessFieldArgs = "args" + ProcessFieldBinds = "binds" + ProcessFieldCommand = "command" + ProcessFieldEnv = "env" + ProcessFieldHealthCheck = "healthCheck" + ProcessFieldImage = "image" + ProcessFieldImageRegistryAuthConfig = "imageRegistryAuthConfig" + ProcessFieldLabels = "labels" + ProcessFieldName = "name" + ProcessFieldNetworkMode = "networkMode" + ProcessFieldPidMode = "pidMode" + ProcessFieldPrivileged = "privileged" + ProcessFieldPublish = "publish" + ProcessFieldRestartPolicy = "restartPolicy" + ProcessFieldUser = "user" + ProcessFieldVolumesFrom = "volumesFrom" +) + +type Process struct { + Args []string `json:"args,omitempty" yaml:"args,omitempty"` + Binds []string `json:"binds,omitempty" yaml:"binds,omitempty"` + Command []string `json:"command,omitempty" yaml:"command,omitempty"` + Env []string `json:"env,omitempty" yaml:"env,omitempty"` + HealthCheck *HealthCheck `json:"healthCheck,omitempty" yaml:"healthCheck,omitempty"` + Image string `json:"image,omitempty" yaml:"image,omitempty"` + ImageRegistryAuthConfig string `json:"imageRegistryAuthConfig,omitempty" yaml:"imageRegistryAuthConfig,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NetworkMode string `json:"networkMode,omitempty" yaml:"networkMode,omitempty"` + PidMode string `json:"pidMode,omitempty" yaml:"pidMode,omitempty"` + Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"` + Publish []string `json:"publish,omitempty" yaml:"publish,omitempty"` + RestartPolicy string `json:"restartPolicy,omitempty" yaml:"restartPolicy,omitempty"` + User string `json:"user,omitempty" yaml:"user,omitempty"` + VolumesFrom []string `json:"volumesFrom,omitempty" yaml:"volumesFrom,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project.go new file mode 100644 index 000000000..63ae4240f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project.go @@ -0,0 +1,145 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + ProjectType = "project" + ProjectFieldAnnotations = "annotations" + ProjectFieldClusterID = "clusterId" + ProjectFieldConditions = "conditions" + ProjectFieldContainerDefaultResourceLimit = "containerDefaultResourceLimit" + ProjectFieldCreated = "created" + ProjectFieldCreatorID = "creatorId" + ProjectFieldDescription = "description" + ProjectFieldLabels = "labels" + ProjectFieldName = "name" + ProjectFieldNamespaceDefaultResourceQuota = "namespaceDefaultResourceQuota" + ProjectFieldNamespaceId = "namespaceId" + ProjectFieldOwnerReferences = "ownerReferences" + ProjectFieldRemoved = "removed" + ProjectFieldResourceQuota = "resourceQuota" + ProjectFieldState = "state" + ProjectFieldTransitioning = "transitioning" + ProjectFieldTransitioningMessage = "transitioningMessage" + ProjectFieldUUID = "uuid" +) + +type Project struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + Conditions []ProjectCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + ContainerDefaultResourceLimit *ContainerResourceLimit `json:"containerDefaultResourceLimit,omitempty" yaml:"containerDefaultResourceLimit,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NamespaceDefaultResourceQuota *NamespaceResourceQuota `json:"namespaceDefaultResourceQuota,omitempty" yaml:"namespaceDefaultResourceQuota,omitempty"` + NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + ResourceQuota *ProjectResourceQuota `json:"resourceQuota,omitempty" yaml:"resourceQuota,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ProjectCollection struct { + types.Collection + Data []Project `json:"data,omitempty"` + client *ProjectClient +} + +type ProjectClient struct { + apiClient *Client +} + +type ProjectOperations interface { + List(opts *types.ListOpts) (*ProjectCollection, error) + ListAll(opts *types.ListOpts) (*ProjectCollection, error) + Create(opts *Project) (*Project, error) + Update(existing *Project, updates interface{}) (*Project, error) + Replace(existing *Project) (*Project, error) + ByID(id string) (*Project, error) + Delete(container *Project) error + + ActionExportYaml(resource *Project) error +} + +func newProjectClient(apiClient *Client) *ProjectClient { + return &ProjectClient{ + apiClient: apiClient, + } +} + +func (c *ProjectClient) Create(container *Project) (*Project, error) { + resp := &Project{} + err := c.apiClient.Ops.DoCreate(ProjectType, container, resp) + return resp, err +} + +func (c *ProjectClient) Update(existing *Project, updates interface{}) (*Project, error) { + resp := &Project{} + err := c.apiClient.Ops.DoUpdate(ProjectType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ProjectClient) Replace(obj *Project) (*Project, error) { + resp := &Project{} + err := c.apiClient.Ops.DoReplace(ProjectType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *ProjectClient) List(opts *types.ListOpts) (*ProjectCollection, error) { + resp := &ProjectCollection{} + err := c.apiClient.Ops.DoList(ProjectType, opts, resp) + resp.client = c + return resp, err +} + +func (c *ProjectClient) ListAll(opts *types.ListOpts) (*ProjectCollection, error) { + resp := &ProjectCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *ProjectCollection) Next() (*ProjectCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ProjectCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *ProjectClient) ByID(id string) (*Project, error) { + resp := &Project{} + err := c.apiClient.Ops.DoByID(ProjectType, id, resp) + return resp, err +} + +func (c *ProjectClient) Delete(container *Project) error { + return c.apiClient.Ops.DoResourceDelete(ProjectType, &container.Resource) +} + +func (c *ProjectClient) ActionExportYaml(resource *Project) error { + err := c.apiClient.Ops.DoAction(ProjectType, "exportYaml", &resource.Resource, nil, nil) + return err +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_catalog.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_catalog.go new file mode 100644 index 000000000..2185abe09 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_catalog.go @@ -0,0 +1,168 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + ProjectCatalogType = "projectCatalog" + ProjectCatalogFieldAnnotations = "annotations" + ProjectCatalogFieldBranch = "branch" + ProjectCatalogFieldCatalogSecrets = "catalogSecrets" + ProjectCatalogFieldCommit = "commit" + ProjectCatalogFieldConditions = "conditions" + ProjectCatalogFieldCreated = "created" + ProjectCatalogFieldCreatorID = "creatorId" + ProjectCatalogFieldCredentialSecret = "credentialSecret" + ProjectCatalogFieldDescription = "description" + ProjectCatalogFieldHelmVersion = "helmVersion" + ProjectCatalogFieldKind = "kind" + ProjectCatalogFieldLabels = "labels" + ProjectCatalogFieldLastRefreshTimestamp = "lastRefreshTimestamp" + ProjectCatalogFieldName = "name" + ProjectCatalogFieldNamespaceId = "namespaceId" + ProjectCatalogFieldOwnerReferences = "ownerReferences" + ProjectCatalogFieldPassword = "password" + ProjectCatalogFieldProjectID = "projectId" + ProjectCatalogFieldRemoved = "removed" + ProjectCatalogFieldState = "state" + ProjectCatalogFieldTransitioning = "transitioning" + ProjectCatalogFieldTransitioningMessage = "transitioningMessage" + ProjectCatalogFieldURL = "url" + ProjectCatalogFieldUUID = "uuid" + ProjectCatalogFieldUsername = "username" +) + +type ProjectCatalog struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Branch string `json:"branch,omitempty" yaml:"branch,omitempty"` + CatalogSecrets *CatalogSecrets `json:"catalogSecrets,omitempty" yaml:"catalogSecrets,omitempty"` + Commit string `json:"commit,omitempty" yaml:"commit,omitempty"` + Conditions []CatalogCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + CredentialSecret string `json:"credentialSecret,omitempty" yaml:"credentialSecret,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + HelmVersion string `json:"helmVersion,omitempty" yaml:"helmVersion,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + LastRefreshTimestamp string `json:"lastRefreshTimestamp,omitempty" yaml:"lastRefreshTimestamp,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Password string `json:"password,omitempty" yaml:"password,omitempty"` + ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + URL string `json:"url,omitempty" yaml:"url,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + Username string `json:"username,omitempty" yaml:"username,omitempty"` +} + +type ProjectCatalogCollection struct { + types.Collection + Data []ProjectCatalog `json:"data,omitempty"` + client *ProjectCatalogClient +} + +type ProjectCatalogClient struct { + apiClient *Client +} + +type ProjectCatalogOperations interface { + List(opts *types.ListOpts) (*ProjectCatalogCollection, error) + ListAll(opts *types.ListOpts) (*ProjectCatalogCollection, error) + Create(opts *ProjectCatalog) (*ProjectCatalog, error) + Update(existing *ProjectCatalog, updates interface{}) (*ProjectCatalog, error) + Replace(existing *ProjectCatalog) (*ProjectCatalog, error) + ByID(id string) (*ProjectCatalog, error) + Delete(container *ProjectCatalog) error + + ActionRefresh(resource *ProjectCatalog) (*CatalogRefresh, error) + + CollectionActionRefresh(resource *ProjectCatalogCollection) (*CatalogRefresh, error) +} + +func newProjectCatalogClient(apiClient *Client) *ProjectCatalogClient { + return &ProjectCatalogClient{ + apiClient: apiClient, + } +} + +func (c *ProjectCatalogClient) Create(container *ProjectCatalog) (*ProjectCatalog, error) { + resp := &ProjectCatalog{} + err := c.apiClient.Ops.DoCreate(ProjectCatalogType, container, resp) + return resp, err +} + +func (c *ProjectCatalogClient) Update(existing *ProjectCatalog, updates interface{}) (*ProjectCatalog, error) { + resp := &ProjectCatalog{} + err := c.apiClient.Ops.DoUpdate(ProjectCatalogType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ProjectCatalogClient) Replace(obj *ProjectCatalog) (*ProjectCatalog, error) { + resp := &ProjectCatalog{} + err := c.apiClient.Ops.DoReplace(ProjectCatalogType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *ProjectCatalogClient) List(opts *types.ListOpts) (*ProjectCatalogCollection, error) { + resp := &ProjectCatalogCollection{} + err := c.apiClient.Ops.DoList(ProjectCatalogType, opts, resp) + resp.client = c + return resp, err +} + +func (c *ProjectCatalogClient) ListAll(opts *types.ListOpts) (*ProjectCatalogCollection, error) { + resp := &ProjectCatalogCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *ProjectCatalogCollection) Next() (*ProjectCatalogCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ProjectCatalogCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *ProjectCatalogClient) ByID(id string) (*ProjectCatalog, error) { + resp := &ProjectCatalog{} + err := c.apiClient.Ops.DoByID(ProjectCatalogType, id, resp) + return resp, err +} + +func (c *ProjectCatalogClient) Delete(container *ProjectCatalog) error { + return c.apiClient.Ops.DoResourceDelete(ProjectCatalogType, &container.Resource) +} + +func (c *ProjectCatalogClient) ActionRefresh(resource *ProjectCatalog) (*CatalogRefresh, error) { + resp := &CatalogRefresh{} + err := c.apiClient.Ops.DoAction(ProjectCatalogType, "refresh", &resource.Resource, nil, resp) + return resp, err +} + +func (c *ProjectCatalogClient) CollectionActionRefresh(resource *ProjectCatalogCollection) (*CatalogRefresh, error) { + resp := &CatalogRefresh{} + err := c.apiClient.Ops.DoCollectionAction(ProjectCatalogType, "refresh", &resource.Collection, nil, resp) + return resp, err +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_condition.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_condition.go new file mode 100644 index 000000000..b0907cfb8 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_condition.go @@ -0,0 +1,20 @@ +package client + +const ( + ProjectConditionType = "projectCondition" + ProjectConditionFieldLastTransitionTime = "lastTransitionTime" + ProjectConditionFieldLastUpdateTime = "lastUpdateTime" + ProjectConditionFieldMessage = "message" + ProjectConditionFieldReason = "reason" + ProjectConditionFieldStatus = "status" + ProjectConditionFieldType = "type" +) + +type ProjectCondition struct { + LastTransitionTime string `json:"lastTransitionTime,omitempty" yaml:"lastTransitionTime,omitempty"` + LastUpdateTime string `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` + Reason string `json:"reason,omitempty" yaml:"reason,omitempty"` + Status string `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_network_policy.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_network_policy.go new file mode 100644 index 000000000..0df489f8b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_network_policy.go @@ -0,0 +1,132 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + ProjectNetworkPolicyType = "projectNetworkPolicy" + ProjectNetworkPolicyFieldAnnotations = "annotations" + ProjectNetworkPolicyFieldCreated = "created" + ProjectNetworkPolicyFieldCreatorID = "creatorId" + ProjectNetworkPolicyFieldDescription = "description" + ProjectNetworkPolicyFieldLabels = "labels" + ProjectNetworkPolicyFieldName = "name" + ProjectNetworkPolicyFieldNamespaceId = "namespaceId" + ProjectNetworkPolicyFieldOwnerReferences = "ownerReferences" + ProjectNetworkPolicyFieldProjectID = "projectId" + ProjectNetworkPolicyFieldRemoved = "removed" + ProjectNetworkPolicyFieldState = "state" + ProjectNetworkPolicyFieldStatus = "status" + ProjectNetworkPolicyFieldTransitioning = "transitioning" + ProjectNetworkPolicyFieldTransitioningMessage = "transitioningMessage" + ProjectNetworkPolicyFieldUUID = "uuid" +) + +type ProjectNetworkPolicy struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Status *ProjectNetworkPolicyStatus `json:"status,omitempty" yaml:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ProjectNetworkPolicyCollection struct { + types.Collection + Data []ProjectNetworkPolicy `json:"data,omitempty"` + client *ProjectNetworkPolicyClient +} + +type ProjectNetworkPolicyClient struct { + apiClient *Client +} + +type ProjectNetworkPolicyOperations interface { + List(opts *types.ListOpts) (*ProjectNetworkPolicyCollection, error) + ListAll(opts *types.ListOpts) (*ProjectNetworkPolicyCollection, error) + Create(opts *ProjectNetworkPolicy) (*ProjectNetworkPolicy, error) + Update(existing *ProjectNetworkPolicy, updates interface{}) (*ProjectNetworkPolicy, error) + Replace(existing *ProjectNetworkPolicy) (*ProjectNetworkPolicy, error) + ByID(id string) (*ProjectNetworkPolicy, error) + Delete(container *ProjectNetworkPolicy) error +} + +func newProjectNetworkPolicyClient(apiClient *Client) *ProjectNetworkPolicyClient { + return &ProjectNetworkPolicyClient{ + apiClient: apiClient, + } +} + +func (c *ProjectNetworkPolicyClient) Create(container *ProjectNetworkPolicy) (*ProjectNetworkPolicy, error) { + resp := &ProjectNetworkPolicy{} + err := c.apiClient.Ops.DoCreate(ProjectNetworkPolicyType, container, resp) + return resp, err +} + +func (c *ProjectNetworkPolicyClient) Update(existing *ProjectNetworkPolicy, updates interface{}) (*ProjectNetworkPolicy, error) { + resp := &ProjectNetworkPolicy{} + err := c.apiClient.Ops.DoUpdate(ProjectNetworkPolicyType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ProjectNetworkPolicyClient) Replace(obj *ProjectNetworkPolicy) (*ProjectNetworkPolicy, error) { + resp := &ProjectNetworkPolicy{} + err := c.apiClient.Ops.DoReplace(ProjectNetworkPolicyType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *ProjectNetworkPolicyClient) List(opts *types.ListOpts) (*ProjectNetworkPolicyCollection, error) { + resp := &ProjectNetworkPolicyCollection{} + err := c.apiClient.Ops.DoList(ProjectNetworkPolicyType, opts, resp) + resp.client = c + return resp, err +} + +func (c *ProjectNetworkPolicyClient) ListAll(opts *types.ListOpts) (*ProjectNetworkPolicyCollection, error) { + resp := &ProjectNetworkPolicyCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *ProjectNetworkPolicyCollection) Next() (*ProjectNetworkPolicyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ProjectNetworkPolicyCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *ProjectNetworkPolicyClient) ByID(id string) (*ProjectNetworkPolicy, error) { + resp := &ProjectNetworkPolicy{} + err := c.apiClient.Ops.DoByID(ProjectNetworkPolicyType, id, resp) + return resp, err +} + +func (c *ProjectNetworkPolicyClient) Delete(container *ProjectNetworkPolicy) error { + return c.apiClient.Ops.DoResourceDelete(ProjectNetworkPolicyType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_network_policy_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_network_policy_spec.go new file mode 100644 index 000000000..6875efbd5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_network_policy_spec.go @@ -0,0 +1,12 @@ +package client + +const ( + ProjectNetworkPolicySpecType = "projectNetworkPolicySpec" + ProjectNetworkPolicySpecFieldDescription = "description" + ProjectNetworkPolicySpecFieldProjectID = "projectId" +) + +type ProjectNetworkPolicySpec struct { + Description string `json:"description,omitempty" yaml:"description,omitempty"` + ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_network_policy_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_network_policy_status.go new file mode 100644 index 000000000..cef3c1639 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_network_policy_status.go @@ -0,0 +1,8 @@ +package client + +const ( + ProjectNetworkPolicyStatusType = "projectNetworkPolicyStatus" +) + +type ProjectNetworkPolicyStatus struct { +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_resource_quota.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_resource_quota.go new file mode 100644 index 000000000..05f736609 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_resource_quota.go @@ -0,0 +1,12 @@ +package client + +const ( + ProjectResourceQuotaType = "projectResourceQuota" + ProjectResourceQuotaFieldLimit = "limit" + ProjectResourceQuotaFieldUsedLimit = "usedLimit" +) + +type ProjectResourceQuota struct { + Limit *ResourceQuotaLimit `json:"limit,omitempty" yaml:"limit,omitempty"` + UsedLimit *ResourceQuotaLimit `json:"usedLimit,omitempty" yaml:"usedLimit,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_role_template_binding.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_role_template_binding.go new file mode 100644 index 000000000..47237560b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_role_template_binding.go @@ -0,0 +1,134 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + ProjectRoleTemplateBindingType = "projectRoleTemplateBinding" + ProjectRoleTemplateBindingFieldAnnotations = "annotations" + ProjectRoleTemplateBindingFieldCreated = "created" + ProjectRoleTemplateBindingFieldCreatorID = "creatorId" + ProjectRoleTemplateBindingFieldGroupID = "groupId" + ProjectRoleTemplateBindingFieldGroupPrincipalID = "groupPrincipalId" + ProjectRoleTemplateBindingFieldLabels = "labels" + ProjectRoleTemplateBindingFieldName = "name" + ProjectRoleTemplateBindingFieldNamespaceId = "namespaceId" + ProjectRoleTemplateBindingFieldOwnerReferences = "ownerReferences" + ProjectRoleTemplateBindingFieldProjectID = "projectId" + ProjectRoleTemplateBindingFieldRemoved = "removed" + ProjectRoleTemplateBindingFieldRoleTemplateID = "roleTemplateId" + ProjectRoleTemplateBindingFieldServiceAccount = "serviceAccount" + ProjectRoleTemplateBindingFieldUUID = "uuid" + ProjectRoleTemplateBindingFieldUserID = "userId" + ProjectRoleTemplateBindingFieldUserPrincipalID = "userPrincipalId" +) + +type ProjectRoleTemplateBinding struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + GroupID string `json:"groupId,omitempty" yaml:"groupId,omitempty"` + GroupPrincipalID string `json:"groupPrincipalId,omitempty" yaml:"groupPrincipalId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + RoleTemplateID string `json:"roleTemplateId,omitempty" yaml:"roleTemplateId,omitempty"` + ServiceAccount string `json:"serviceAccount,omitempty" yaml:"serviceAccount,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserID string `json:"userId,omitempty" yaml:"userId,omitempty"` + UserPrincipalID string `json:"userPrincipalId,omitempty" yaml:"userPrincipalId,omitempty"` +} + +type ProjectRoleTemplateBindingCollection struct { + types.Collection + Data []ProjectRoleTemplateBinding `json:"data,omitempty"` + client *ProjectRoleTemplateBindingClient +} + +type ProjectRoleTemplateBindingClient struct { + apiClient *Client +} + +type ProjectRoleTemplateBindingOperations interface { + List(opts *types.ListOpts) (*ProjectRoleTemplateBindingCollection, error) + ListAll(opts *types.ListOpts) (*ProjectRoleTemplateBindingCollection, error) + Create(opts *ProjectRoleTemplateBinding) (*ProjectRoleTemplateBinding, error) + Update(existing *ProjectRoleTemplateBinding, updates interface{}) (*ProjectRoleTemplateBinding, error) + Replace(existing *ProjectRoleTemplateBinding) (*ProjectRoleTemplateBinding, error) + ByID(id string) (*ProjectRoleTemplateBinding, error) + Delete(container *ProjectRoleTemplateBinding) error +} + +func newProjectRoleTemplateBindingClient(apiClient *Client) *ProjectRoleTemplateBindingClient { + return &ProjectRoleTemplateBindingClient{ + apiClient: apiClient, + } +} + +func (c *ProjectRoleTemplateBindingClient) Create(container *ProjectRoleTemplateBinding) (*ProjectRoleTemplateBinding, error) { + resp := &ProjectRoleTemplateBinding{} + err := c.apiClient.Ops.DoCreate(ProjectRoleTemplateBindingType, container, resp) + return resp, err +} + +func (c *ProjectRoleTemplateBindingClient) Update(existing *ProjectRoleTemplateBinding, updates interface{}) (*ProjectRoleTemplateBinding, error) { + resp := &ProjectRoleTemplateBinding{} + err := c.apiClient.Ops.DoUpdate(ProjectRoleTemplateBindingType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ProjectRoleTemplateBindingClient) Replace(obj *ProjectRoleTemplateBinding) (*ProjectRoleTemplateBinding, error) { + resp := &ProjectRoleTemplateBinding{} + err := c.apiClient.Ops.DoReplace(ProjectRoleTemplateBindingType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *ProjectRoleTemplateBindingClient) List(opts *types.ListOpts) (*ProjectRoleTemplateBindingCollection, error) { + resp := &ProjectRoleTemplateBindingCollection{} + err := c.apiClient.Ops.DoList(ProjectRoleTemplateBindingType, opts, resp) + resp.client = c + return resp, err +} + +func (c *ProjectRoleTemplateBindingClient) ListAll(opts *types.ListOpts) (*ProjectRoleTemplateBindingCollection, error) { + resp := &ProjectRoleTemplateBindingCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *ProjectRoleTemplateBindingCollection) Next() (*ProjectRoleTemplateBindingCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ProjectRoleTemplateBindingCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *ProjectRoleTemplateBindingClient) ByID(id string) (*ProjectRoleTemplateBinding, error) { + resp := &ProjectRoleTemplateBinding{} + err := c.apiClient.Ops.DoByID(ProjectRoleTemplateBindingType, id, resp) + return resp, err +} + +func (c *ProjectRoleTemplateBindingClient) Delete(container *ProjectRoleTemplateBinding) error { + return c.apiClient.Ops.DoResourceDelete(ProjectRoleTemplateBindingType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_spec.go new file mode 100644 index 000000000..e1e940bc1 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_spec.go @@ -0,0 +1,20 @@ +package client + +const ( + ProjectSpecType = "projectSpec" + ProjectSpecFieldClusterID = "clusterId" + ProjectSpecFieldContainerDefaultResourceLimit = "containerDefaultResourceLimit" + ProjectSpecFieldDescription = "description" + ProjectSpecFieldDisplayName = "displayName" + ProjectSpecFieldNamespaceDefaultResourceQuota = "namespaceDefaultResourceQuota" + ProjectSpecFieldResourceQuota = "resourceQuota" +) + +type ProjectSpec struct { + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + ContainerDefaultResourceLimit *ContainerResourceLimit `json:"containerDefaultResourceLimit,omitempty" yaml:"containerDefaultResourceLimit,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` + NamespaceDefaultResourceQuota *NamespaceResourceQuota `json:"namespaceDefaultResourceQuota,omitempty" yaml:"namespaceDefaultResourceQuota,omitempty"` + ResourceQuota *ProjectResourceQuota `json:"resourceQuota,omitempty" yaml:"resourceQuota,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_status.go new file mode 100644 index 000000000..7806c91b4 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_project_status.go @@ -0,0 +1,10 @@ +package client + +const ( + ProjectStatusType = "projectStatus" + ProjectStatusFieldConditions = "conditions" +) + +type ProjectStatus struct { + Conditions []ProjectCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_projected_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_projected_volume_source.go new file mode 100644 index 000000000..f90539eef --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_projected_volume_source.go @@ -0,0 +1,12 @@ +package client + +const ( + ProjectedVolumeSourceType = "projectedVolumeSource" + ProjectedVolumeSourceFieldDefaultMode = "defaultMode" + ProjectedVolumeSourceFieldSources = "sources" +) + +type ProjectedVolumeSource struct { + DefaultMode *int64 `json:"defaultMode,omitempty" yaml:"defaultMode,omitempty"` + Sources []VolumeProjection `json:"sources,omitempty" yaml:"sources,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_provider_configuration.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_provider_configuration.go new file mode 100644 index 000000000..4a29cfdff --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_provider_configuration.go @@ -0,0 +1,18 @@ +package client + +const ( + ProviderConfigurationType = "providerConfiguration" + ProviderConfigurationFieldAESCBC = "aescbc" + ProviderConfigurationFieldAESGCM = "aesgcm" + ProviderConfigurationFieldIdentity = "identity" + ProviderConfigurationFieldKMS = "kms" + ProviderConfigurationFieldSecretbox = "secretbox" +) + +type ProviderConfiguration struct { + AESCBC *AESConfiguration `json:"aescbc,omitempty" yaml:"aescbc,omitempty"` + AESGCM *AESConfiguration `json:"aesgcm,omitempty" yaml:"aesgcm,omitempty"` + Identity *IdentityConfiguration `json:"identity,omitempty" yaml:"identity,omitempty"` + KMS *KMSConfiguration `json:"kms,omitempty" yaml:"kms,omitempty"` + Secretbox *SecretboxConfiguration `json:"secretbox,omitempty" yaml:"secretbox,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_public_endpoint.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_public_endpoint.go new file mode 100644 index 000000000..85844aac7 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_public_endpoint.go @@ -0,0 +1,28 @@ +package client + +const ( + PublicEndpointType = "publicEndpoint" + PublicEndpointFieldAddresses = "addresses" + PublicEndpointFieldAllNodes = "allNodes" + PublicEndpointFieldHostname = "hostname" + PublicEndpointFieldIngressID = "ingressId" + PublicEndpointFieldNodeID = "nodeId" + PublicEndpointFieldPath = "path" + PublicEndpointFieldPodID = "podId" + PublicEndpointFieldPort = "port" + PublicEndpointFieldProtocol = "protocol" + PublicEndpointFieldServiceID = "serviceId" +) + +type PublicEndpoint struct { + Addresses []string `json:"addresses,omitempty" yaml:"addresses,omitempty"` + AllNodes bool `json:"allNodes,omitempty" yaml:"allNodes,omitempty"` + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + IngressID string `json:"ingressId,omitempty" yaml:"ingressId,omitempty"` + NodeID string `json:"nodeId,omitempty" yaml:"nodeId,omitempty"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` + PodID string `json:"podId,omitempty" yaml:"podId,omitempty"` + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + Protocol string `json:"protocol,omitempty" yaml:"protocol,omitempty"` + ServiceID string `json:"serviceId,omitempty" yaml:"serviceId,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_question.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_question.go new file mode 100644 index 000000000..60426833d --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_question.go @@ -0,0 +1,44 @@ +package client + +const ( + QuestionType = "question" + QuestionFieldDefault = "default" + QuestionFieldDescription = "description" + QuestionFieldGroup = "group" + QuestionFieldInvalidChars = "invalidChars" + QuestionFieldLabel = "label" + QuestionFieldMax = "max" + QuestionFieldMaxLength = "maxLength" + QuestionFieldMin = "min" + QuestionFieldMinLength = "minLength" + QuestionFieldOptions = "options" + QuestionFieldRequired = "required" + QuestionFieldSatisfies = "satisfies" + QuestionFieldShowIf = "showIf" + QuestionFieldShowSubquestionIf = "showSubquestionIf" + QuestionFieldSubquestions = "subquestions" + QuestionFieldType = "type" + QuestionFieldValidChars = "validChars" + QuestionFieldVariable = "variable" +) + +type Question struct { + Default string `json:"default,omitempty" yaml:"default,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + Group string `json:"group,omitempty" yaml:"group,omitempty"` + InvalidChars string `json:"invalidChars,omitempty" yaml:"invalidChars,omitempty"` + Label string `json:"label,omitempty" yaml:"label,omitempty"` + Max int64 `json:"max,omitempty" yaml:"max,omitempty"` + MaxLength int64 `json:"maxLength,omitempty" yaml:"maxLength,omitempty"` + Min int64 `json:"min,omitempty" yaml:"min,omitempty"` + MinLength int64 `json:"minLength,omitempty" yaml:"minLength,omitempty"` + Options []string `json:"options,omitempty" yaml:"options,omitempty"` + Required bool `json:"required,omitempty" yaml:"required,omitempty"` + Satisfies string `json:"satisfies,omitempty" yaml:"satisfies,omitempty"` + ShowIf string `json:"showIf,omitempty" yaml:"showIf,omitempty"` + ShowSubquestionIf string `json:"showSubquestionIf,omitempty" yaml:"showSubquestionIf,omitempty"` + Subquestions []SubQuestion `json:"subquestions,omitempty" yaml:"subquestions,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + ValidChars string `json:"validChars,omitempty" yaml:"validChars,omitempty"` + Variable string `json:"variable,omitempty" yaml:"variable,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_quobyte_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_quobyte_volume_source.go new file mode 100644 index 000000000..41e308d3b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_quobyte_volume_source.go @@ -0,0 +1,20 @@ +package client + +const ( + QuobyteVolumeSourceType = "quobyteVolumeSource" + QuobyteVolumeSourceFieldGroup = "group" + QuobyteVolumeSourceFieldReadOnly = "readOnly" + QuobyteVolumeSourceFieldRegistry = "registry" + QuobyteVolumeSourceFieldTenant = "tenant" + QuobyteVolumeSourceFieldUser = "user" + QuobyteVolumeSourceFieldVolume = "volume" +) + +type QuobyteVolumeSource struct { + Group string `json:"group,omitempty" yaml:"group,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + Registry string `json:"registry,omitempty" yaml:"registry,omitempty"` + Tenant string `json:"tenant,omitempty" yaml:"tenant,omitempty"` + User string `json:"user,omitempty" yaml:"user,omitempty"` + Volume string `json:"volume,omitempty" yaml:"volume,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rancher_kubernetes_engine_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rancher_kubernetes_engine_config.go new file mode 100644 index 000000000..19d33699c --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rancher_kubernetes_engine_config.go @@ -0,0 +1,62 @@ +package client + +const ( + RancherKubernetesEngineConfigType = "rancherKubernetesEngineConfig" + RancherKubernetesEngineConfigFieldAddonJobTimeout = "addonJobTimeout" + RancherKubernetesEngineConfigFieldAddons = "addons" + RancherKubernetesEngineConfigFieldAddonsInclude = "addonsInclude" + RancherKubernetesEngineConfigFieldAuthentication = "authentication" + RancherKubernetesEngineConfigFieldAuthorization = "authorization" + RancherKubernetesEngineConfigFieldBastionHost = "bastionHost" + RancherKubernetesEngineConfigFieldCloudProvider = "cloudProvider" + RancherKubernetesEngineConfigFieldClusterName = "clusterName" + RancherKubernetesEngineConfigFieldDNS = "dns" + RancherKubernetesEngineConfigFieldEnableCRIDockerd = "enableCriDockerd" + RancherKubernetesEngineConfigFieldIgnoreDockerVersion = "ignoreDockerVersion" + RancherKubernetesEngineConfigFieldIngress = "ingress" + RancherKubernetesEngineConfigFieldMonitoring = "monitoring" + RancherKubernetesEngineConfigFieldNetwork = "network" + RancherKubernetesEngineConfigFieldNodes = "nodes" + RancherKubernetesEngineConfigFieldPrefixPath = "prefixPath" + RancherKubernetesEngineConfigFieldPrivateRegistries = "privateRegistries" + RancherKubernetesEngineConfigFieldRestore = "restore" + RancherKubernetesEngineConfigFieldRotateCertificates = "rotateCertificates" + RancherKubernetesEngineConfigFieldRotateEncryptionKey = "rotateEncryptionKey" + RancherKubernetesEngineConfigFieldSSHAgentAuth = "sshAgentAuth" + RancherKubernetesEngineConfigFieldSSHCertPath = "sshCertPath" + RancherKubernetesEngineConfigFieldSSHKeyPath = "sshKeyPath" + RancherKubernetesEngineConfigFieldServices = "services" + RancherKubernetesEngineConfigFieldUpgradeStrategy = "upgradeStrategy" + RancherKubernetesEngineConfigFieldVersion = "kubernetesVersion" + RancherKubernetesEngineConfigFieldWindowsPrefixPath = "winPrefixPath" +) + +type RancherKubernetesEngineConfig struct { + AddonJobTimeout int64 `json:"addonJobTimeout,omitempty" yaml:"addonJobTimeout,omitempty"` + Addons string `json:"addons,omitempty" yaml:"addons,omitempty"` + AddonsInclude []string `json:"addonsInclude,omitempty" yaml:"addonsInclude,omitempty"` + Authentication *AuthnConfig `json:"authentication,omitempty" yaml:"authentication,omitempty"` + Authorization *AuthzConfig `json:"authorization,omitempty" yaml:"authorization,omitempty"` + BastionHost *BastionHost `json:"bastionHost,omitempty" yaml:"bastionHost,omitempty"` + CloudProvider *CloudProvider `json:"cloudProvider,omitempty" yaml:"cloudProvider,omitempty"` + ClusterName string `json:"clusterName,omitempty" yaml:"clusterName,omitempty"` + DNS *DNSConfig `json:"dns,omitempty" yaml:"dns,omitempty"` + EnableCRIDockerd *bool `json:"enableCriDockerd,omitempty" yaml:"enableCriDockerd,omitempty"` + IgnoreDockerVersion *bool `json:"ignoreDockerVersion,omitempty" yaml:"ignoreDockerVersion,omitempty"` + Ingress *IngressConfig `json:"ingress,omitempty" yaml:"ingress,omitempty"` + Monitoring *MonitoringConfig `json:"monitoring,omitempty" yaml:"monitoring,omitempty"` + Network *NetworkConfig `json:"network,omitempty" yaml:"network,omitempty"` + Nodes []RKEConfigNode `json:"nodes,omitempty" yaml:"nodes,omitempty"` + PrefixPath string `json:"prefixPath,omitempty" yaml:"prefixPath,omitempty"` + PrivateRegistries []PrivateRegistry `json:"privateRegistries,omitempty" yaml:"privateRegistries,omitempty"` + Restore *RestoreConfig `json:"restore,omitempty" yaml:"restore,omitempty"` + RotateCertificates *RotateCertificates `json:"rotateCertificates,omitempty" yaml:"rotateCertificates,omitempty"` + RotateEncryptionKey bool `json:"rotateEncryptionKey,omitempty" yaml:"rotateEncryptionKey,omitempty"` + SSHAgentAuth bool `json:"sshAgentAuth,omitempty" yaml:"sshAgentAuth,omitempty"` + SSHCertPath string `json:"sshCertPath,omitempty" yaml:"sshCertPath,omitempty"` + SSHKeyPath string `json:"sshKeyPath,omitempty" yaml:"sshKeyPath,omitempty"` + Services *RKEConfigServices `json:"services,omitempty" yaml:"services,omitempty"` + UpgradeStrategy *NodeUpgradeStrategy `json:"upgradeStrategy,omitempty" yaml:"upgradeStrategy,omitempty"` + Version string `json:"kubernetesVersion,omitempty" yaml:"kubernetesVersion,omitempty"` + WindowsPrefixPath string `json:"winPrefixPath,omitempty" yaml:"winPrefixPath,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rancher_user_notification.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rancher_user_notification.go new file mode 100644 index 000000000..8fa289e62 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rancher_user_notification.go @@ -0,0 +1,122 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + RancherUserNotificationType = "rancherUserNotification" + RancherUserNotificationFieldAnnotations = "annotations" + RancherUserNotificationFieldComponentName = "componentName" + RancherUserNotificationFieldCreated = "created" + RancherUserNotificationFieldCreatorID = "creatorId" + RancherUserNotificationFieldLabels = "labels" + RancherUserNotificationFieldMessage = "message" + RancherUserNotificationFieldName = "name" + RancherUserNotificationFieldOwnerReferences = "ownerReferences" + RancherUserNotificationFieldRemoved = "removed" + RancherUserNotificationFieldUUID = "uuid" +) + +type RancherUserNotification struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + ComponentName string `json:"componentName,omitempty" yaml:"componentName,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type RancherUserNotificationCollection struct { + types.Collection + Data []RancherUserNotification `json:"data,omitempty"` + client *RancherUserNotificationClient +} + +type RancherUserNotificationClient struct { + apiClient *Client +} + +type RancherUserNotificationOperations interface { + List(opts *types.ListOpts) (*RancherUserNotificationCollection, error) + ListAll(opts *types.ListOpts) (*RancherUserNotificationCollection, error) + Create(opts *RancherUserNotification) (*RancherUserNotification, error) + Update(existing *RancherUserNotification, updates interface{}) (*RancherUserNotification, error) + Replace(existing *RancherUserNotification) (*RancherUserNotification, error) + ByID(id string) (*RancherUserNotification, error) + Delete(container *RancherUserNotification) error +} + +func newRancherUserNotificationClient(apiClient *Client) *RancherUserNotificationClient { + return &RancherUserNotificationClient{ + apiClient: apiClient, + } +} + +func (c *RancherUserNotificationClient) Create(container *RancherUserNotification) (*RancherUserNotification, error) { + resp := &RancherUserNotification{} + err := c.apiClient.Ops.DoCreate(RancherUserNotificationType, container, resp) + return resp, err +} + +func (c *RancherUserNotificationClient) Update(existing *RancherUserNotification, updates interface{}) (*RancherUserNotification, error) { + resp := &RancherUserNotification{} + err := c.apiClient.Ops.DoUpdate(RancherUserNotificationType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RancherUserNotificationClient) Replace(obj *RancherUserNotification) (*RancherUserNotification, error) { + resp := &RancherUserNotification{} + err := c.apiClient.Ops.DoReplace(RancherUserNotificationType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *RancherUserNotificationClient) List(opts *types.ListOpts) (*RancherUserNotificationCollection, error) { + resp := &RancherUserNotificationCollection{} + err := c.apiClient.Ops.DoList(RancherUserNotificationType, opts, resp) + resp.client = c + return resp, err +} + +func (c *RancherUserNotificationClient) ListAll(opts *types.ListOpts) (*RancherUserNotificationCollection, error) { + resp := &RancherUserNotificationCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *RancherUserNotificationCollection) Next() (*RancherUserNotificationCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RancherUserNotificationCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *RancherUserNotificationClient) ByID(id string) (*RancherUserNotification, error) { + resp := &RancherUserNotification{} + err := c.apiClient.Ops.DoByID(RancherUserNotificationType, id, resp) + return resp, err +} + +func (c *RancherUserNotificationClient) Delete(container *RancherUserNotification) error { + return c.apiClient.Ops.DoResourceDelete(RancherUserNotificationType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rbd_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rbd_volume_source.go new file mode 100644 index 000000000..436a8b73b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rbd_volume_source.go @@ -0,0 +1,24 @@ +package client + +const ( + RBDVolumeSourceType = "rbdVolumeSource" + RBDVolumeSourceFieldCephMonitors = "monitors" + RBDVolumeSourceFieldFSType = "fsType" + RBDVolumeSourceFieldKeyring = "keyring" + RBDVolumeSourceFieldRBDImage = "image" + RBDVolumeSourceFieldRBDPool = "pool" + RBDVolumeSourceFieldRadosUser = "user" + RBDVolumeSourceFieldReadOnly = "readOnly" + RBDVolumeSourceFieldSecretRef = "secretRef" +) + +type RBDVolumeSource struct { + CephMonitors []string `json:"monitors,omitempty" yaml:"monitors,omitempty"` + FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"` + Keyring string `json:"keyring,omitempty" yaml:"keyring,omitempty"` + RBDImage string `json:"image,omitempty" yaml:"image,omitempty"` + RBDPool string `json:"pool,omitempty" yaml:"pool,omitempty"` + RadosUser string `json:"user,omitempty" yaml:"user,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + SecretRef *LocalObjectReference `json:"secretRef,omitempty" yaml:"secretRef,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_claim.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_claim.go new file mode 100644 index 000000000..1ef8e0a54 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_claim.go @@ -0,0 +1,10 @@ +package client + +const ( + ResourceClaimType = "resourceClaim" + ResourceClaimFieldName = "name" +) + +type ResourceClaim struct { + Name string `json:"name,omitempty" yaml:"name,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_configuration.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_configuration.go new file mode 100644 index 000000000..3c09f763b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_configuration.go @@ -0,0 +1,12 @@ +package client + +const ( + ResourceConfigurationType = "resourceConfiguration" + ResourceConfigurationFieldProviders = "providers" + ResourceConfigurationFieldResources = "resources" +) + +type ResourceConfiguration struct { + Providers []ProviderConfiguration `json:"providers,omitempty" yaml:"providers,omitempty"` + Resources []string `json:"resources,omitempty" yaml:"resources,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_field_selector.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_field_selector.go new file mode 100644 index 000000000..d9c0c92e5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_field_selector.go @@ -0,0 +1,14 @@ +package client + +const ( + ResourceFieldSelectorType = "resourceFieldSelector" + ResourceFieldSelectorFieldContainerName = "containerName" + ResourceFieldSelectorFieldDivisor = "divisor" + ResourceFieldSelectorFieldResource = "resource" +) + +type ResourceFieldSelector struct { + ContainerName string `json:"containerName,omitempty" yaml:"containerName,omitempty"` + Divisor string `json:"divisor,omitempty" yaml:"divisor,omitempty"` + Resource string `json:"resource,omitempty" yaml:"resource,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_quota_limit.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_quota_limit.go new file mode 100644 index 000000000..4bc04abf4 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_quota_limit.go @@ -0,0 +1,34 @@ +package client + +const ( + ResourceQuotaLimitType = "resourceQuotaLimit" + ResourceQuotaLimitFieldConfigMaps = "configMaps" + ResourceQuotaLimitFieldLimitsCPU = "limitsCpu" + ResourceQuotaLimitFieldLimitsMemory = "limitsMemory" + ResourceQuotaLimitFieldPersistentVolumeClaims = "persistentVolumeClaims" + ResourceQuotaLimitFieldPods = "pods" + ResourceQuotaLimitFieldReplicationControllers = "replicationControllers" + ResourceQuotaLimitFieldRequestsCPU = "requestsCpu" + ResourceQuotaLimitFieldRequestsMemory = "requestsMemory" + ResourceQuotaLimitFieldRequestsStorage = "requestsStorage" + ResourceQuotaLimitFieldSecrets = "secrets" + ResourceQuotaLimitFieldServices = "services" + ResourceQuotaLimitFieldServicesLoadBalancers = "servicesLoadBalancers" + ResourceQuotaLimitFieldServicesNodePorts = "servicesNodePorts" +) + +type ResourceQuotaLimit struct { + ConfigMaps string `json:"configMaps,omitempty" yaml:"configMaps,omitempty"` + LimitsCPU string `json:"limitsCpu,omitempty" yaml:"limitsCpu,omitempty"` + LimitsMemory string `json:"limitsMemory,omitempty" yaml:"limitsMemory,omitempty"` + PersistentVolumeClaims string `json:"persistentVolumeClaims,omitempty" yaml:"persistentVolumeClaims,omitempty"` + Pods string `json:"pods,omitempty" yaml:"pods,omitempty"` + ReplicationControllers string `json:"replicationControllers,omitempty" yaml:"replicationControllers,omitempty"` + RequestsCPU string `json:"requestsCpu,omitempty" yaml:"requestsCpu,omitempty"` + RequestsMemory string `json:"requestsMemory,omitempty" yaml:"requestsMemory,omitempty"` + RequestsStorage string `json:"requestsStorage,omitempty" yaml:"requestsStorage,omitempty"` + Secrets string `json:"secrets,omitempty" yaml:"secrets,omitempty"` + Services string `json:"services,omitempty" yaml:"services,omitempty"` + ServicesLoadBalancers string `json:"servicesLoadBalancers,omitempty" yaml:"servicesLoadBalancers,omitempty"` + ServicesNodePorts string `json:"servicesNodePorts,omitempty" yaml:"servicesNodePorts,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_requirements.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_requirements.go new file mode 100644 index 000000000..5fe765a54 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_resource_requirements.go @@ -0,0 +1,14 @@ +package client + +const ( + ResourceRequirementsType = "resourceRequirements" + ResourceRequirementsFieldClaims = "claims" + ResourceRequirementsFieldLimits = "limits" + ResourceRequirementsFieldRequests = "requests" +) + +type ResourceRequirements struct { + Claims []ResourceClaim `json:"claims,omitempty" yaml:"claims,omitempty"` + Limits map[string]string `json:"limits,omitempty" yaml:"limits,omitempty"` + Requests map[string]string `json:"requests,omitempty" yaml:"requests,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_restore_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_restore_config.go new file mode 100644 index 000000000..8370f96f3 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_restore_config.go @@ -0,0 +1,12 @@ +package client + +const ( + RestoreConfigType = "restoreConfig" + RestoreConfigFieldRestore = "restore" + RestoreConfigFieldSnapshotName = "snapshotName" +) + +type RestoreConfig struct { + Restore bool `json:"restore,omitempty" yaml:"restore,omitempty"` + SnapshotName string `json:"snapshotName,omitempty" yaml:"snapshotName,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_restore_from_etcd_backup_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_restore_from_etcd_backup_input.go new file mode 100644 index 000000000..7bd5f59f9 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_restore_from_etcd_backup_input.go @@ -0,0 +1,12 @@ +package client + +const ( + RestoreFromEtcdBackupInputType = "restoreFromEtcdBackupInput" + RestoreFromEtcdBackupInputFieldEtcdBackupID = "etcdBackupId" + RestoreFromEtcdBackupInputFieldRestoreRkeConfig = "restoreRkeConfig" +) + +type RestoreFromEtcdBackupInput struct { + EtcdBackupID string `json:"etcdBackupId,omitempty" yaml:"etcdBackupId,omitempty"` + RestoreRkeConfig string `json:"restoreRkeConfig,omitempty" yaml:"restoreRkeConfig,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke2config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke2config.go new file mode 100644 index 000000000..3e355a9a5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke2config.go @@ -0,0 +1,12 @@ +package client + +const ( + Rke2ConfigType = "rke2Config" + Rke2ConfigFieldClusterUpgradeStrategy = "rke2upgradeStrategy" + Rke2ConfigFieldVersion = "kubernetesVersion" +) + +type Rke2Config struct { + ClusterUpgradeStrategy *ClusterUpgradeStrategy `json:"rke2upgradeStrategy,omitempty" yaml:"rke2upgradeStrategy,omitempty"` + Version string `json:"kubernetesVersion,omitempty" yaml:"kubernetesVersion,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_addon.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_addon.go new file mode 100644 index 000000000..67719eedd --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_addon.go @@ -0,0 +1,120 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + RkeAddonType = "rkeAddon" + RkeAddonFieldAnnotations = "annotations" + RkeAddonFieldCreated = "created" + RkeAddonFieldCreatorID = "creatorId" + RkeAddonFieldLabels = "labels" + RkeAddonFieldName = "name" + RkeAddonFieldOwnerReferences = "ownerReferences" + RkeAddonFieldRemoved = "removed" + RkeAddonFieldTemplate = "template" + RkeAddonFieldUUID = "uuid" +) + +type RkeAddon struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Template string `json:"template,omitempty" yaml:"template,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type RkeAddonCollection struct { + types.Collection + Data []RkeAddon `json:"data,omitempty"` + client *RkeAddonClient +} + +type RkeAddonClient struct { + apiClient *Client +} + +type RkeAddonOperations interface { + List(opts *types.ListOpts) (*RkeAddonCollection, error) + ListAll(opts *types.ListOpts) (*RkeAddonCollection, error) + Create(opts *RkeAddon) (*RkeAddon, error) + Update(existing *RkeAddon, updates interface{}) (*RkeAddon, error) + Replace(existing *RkeAddon) (*RkeAddon, error) + ByID(id string) (*RkeAddon, error) + Delete(container *RkeAddon) error +} + +func newRkeAddonClient(apiClient *Client) *RkeAddonClient { + return &RkeAddonClient{ + apiClient: apiClient, + } +} + +func (c *RkeAddonClient) Create(container *RkeAddon) (*RkeAddon, error) { + resp := &RkeAddon{} + err := c.apiClient.Ops.DoCreate(RkeAddonType, container, resp) + return resp, err +} + +func (c *RkeAddonClient) Update(existing *RkeAddon, updates interface{}) (*RkeAddon, error) { + resp := &RkeAddon{} + err := c.apiClient.Ops.DoUpdate(RkeAddonType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RkeAddonClient) Replace(obj *RkeAddon) (*RkeAddon, error) { + resp := &RkeAddon{} + err := c.apiClient.Ops.DoReplace(RkeAddonType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *RkeAddonClient) List(opts *types.ListOpts) (*RkeAddonCollection, error) { + resp := &RkeAddonCollection{} + err := c.apiClient.Ops.DoList(RkeAddonType, opts, resp) + resp.client = c + return resp, err +} + +func (c *RkeAddonClient) ListAll(opts *types.ListOpts) (*RkeAddonCollection, error) { + resp := &RkeAddonCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *RkeAddonCollection) Next() (*RkeAddonCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RkeAddonCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *RkeAddonClient) ByID(id string) (*RkeAddon, error) { + resp := &RkeAddon{} + err := c.apiClient.Ops.DoByID(RkeAddonType, id, resp) + return resp, err +} + +func (c *RkeAddonClient) Delete(container *RkeAddon) error { + return c.apiClient.Ops.DoResourceDelete(RkeAddonType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_config_node.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_config_node.go new file mode 100644 index 000000000..a8a2c20ab --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_config_node.go @@ -0,0 +1,38 @@ +package client + +const ( + RKEConfigNodeType = "rkeConfigNode" + RKEConfigNodeFieldAddress = "address" + RKEConfigNodeFieldDockerSocket = "dockerSocket" + RKEConfigNodeFieldHostnameOverride = "hostnameOverride" + RKEConfigNodeFieldInternalAddress = "internalAddress" + RKEConfigNodeFieldLabels = "labels" + RKEConfigNodeFieldNodeID = "nodeId" + RKEConfigNodeFieldPort = "port" + RKEConfigNodeFieldRole = "role" + RKEConfigNodeFieldSSHAgentAuth = "sshAgentAuth" + RKEConfigNodeFieldSSHCert = "sshCert" + RKEConfigNodeFieldSSHCertPath = "sshCertPath" + RKEConfigNodeFieldSSHKey = "sshKey" + RKEConfigNodeFieldSSHKeyPath = "sshKeyPath" + RKEConfigNodeFieldTaints = "taints" + RKEConfigNodeFieldUser = "user" +) + +type RKEConfigNode struct { + Address string `json:"address,omitempty" yaml:"address,omitempty"` + DockerSocket string `json:"dockerSocket,omitempty" yaml:"dockerSocket,omitempty"` + HostnameOverride string `json:"hostnameOverride,omitempty" yaml:"hostnameOverride,omitempty"` + InternalAddress string `json:"internalAddress,omitempty" yaml:"internalAddress,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + NodeID string `json:"nodeId,omitempty" yaml:"nodeId,omitempty"` + Port string `json:"port,omitempty" yaml:"port,omitempty"` + Role []string `json:"role,omitempty" yaml:"role,omitempty"` + SSHAgentAuth bool `json:"sshAgentAuth,omitempty" yaml:"sshAgentAuth,omitempty"` + SSHCert string `json:"sshCert,omitempty" yaml:"sshCert,omitempty"` + SSHCertPath string `json:"sshCertPath,omitempty" yaml:"sshCertPath,omitempty"` + SSHKey string `json:"sshKey,omitempty" yaml:"sshKey,omitempty"` + SSHKeyPath string `json:"sshKeyPath,omitempty" yaml:"sshKeyPath,omitempty"` + Taints []RKETaint `json:"taints,omitempty" yaml:"taints,omitempty"` + User string `json:"user,omitempty" yaml:"user,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_config_node_plan.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_config_node_plan.go new file mode 100644 index 000000000..fd9224fed --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_config_node_plan.go @@ -0,0 +1,22 @@ +package client + +const ( + RKEConfigNodePlanType = "rkeConfigNodePlan" + RKEConfigNodePlanFieldAddress = "address" + RKEConfigNodePlanFieldAnnotations = "annotations" + RKEConfigNodePlanFieldFiles = "files" + RKEConfigNodePlanFieldLabels = "labels" + RKEConfigNodePlanFieldPortChecks = "portChecks" + RKEConfigNodePlanFieldProcesses = "processes" + RKEConfigNodePlanFieldTaints = "taints" +) + +type RKEConfigNodePlan struct { + Address string `json:"address,omitempty" yaml:"address,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Files []File `json:"files,omitempty" yaml:"files,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + PortChecks []PortCheck `json:"portChecks,omitempty" yaml:"portChecks,omitempty"` + Processes map[string]Process `json:"processes,omitempty" yaml:"processes,omitempty"` + Taints []RKETaint `json:"taints,omitempty" yaml:"taints,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_config_services.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_config_services.go new file mode 100644 index 000000000..16086f60e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_config_services.go @@ -0,0 +1,20 @@ +package client + +const ( + RKEConfigServicesType = "rkeConfigServices" + RKEConfigServicesFieldEtcd = "etcd" + RKEConfigServicesFieldKubeAPI = "kubeApi" + RKEConfigServicesFieldKubeController = "kubeController" + RKEConfigServicesFieldKubelet = "kubelet" + RKEConfigServicesFieldKubeproxy = "kubeproxy" + RKEConfigServicesFieldScheduler = "scheduler" +) + +type RKEConfigServices struct { + Etcd *ETCDService `json:"etcd,omitempty" yaml:"etcd,omitempty"` + KubeAPI *KubeAPIService `json:"kubeApi,omitempty" yaml:"kubeApi,omitempty"` + KubeController *KubeControllerService `json:"kubeController,omitempty" yaml:"kubeController,omitempty"` + Kubelet *KubeletService `json:"kubelet,omitempty" yaml:"kubelet,omitempty"` + Kubeproxy *KubeproxyService `json:"kubeproxy,omitempty" yaml:"kubeproxy,omitempty"` + Scheduler *SchedulerService `json:"scheduler,omitempty" yaml:"scheduler,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_k8s_service_option.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_k8s_service_option.go new file mode 100644 index 000000000..6c5173f0f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_k8s_service_option.go @@ -0,0 +1,120 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + RkeK8sServiceOptionType = "rkeK8sServiceOption" + RkeK8sServiceOptionFieldAnnotations = "annotations" + RkeK8sServiceOptionFieldCreated = "created" + RkeK8sServiceOptionFieldCreatorID = "creatorId" + RkeK8sServiceOptionFieldLabels = "labels" + RkeK8sServiceOptionFieldName = "name" + RkeK8sServiceOptionFieldOwnerReferences = "ownerReferences" + RkeK8sServiceOptionFieldRemoved = "removed" + RkeK8sServiceOptionFieldServiceOptions = "serviceOptions" + RkeK8sServiceOptionFieldUUID = "uuid" +) + +type RkeK8sServiceOption struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + ServiceOptions *KubernetesServicesOptions `json:"serviceOptions,omitempty" yaml:"serviceOptions,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type RkeK8sServiceOptionCollection struct { + types.Collection + Data []RkeK8sServiceOption `json:"data,omitempty"` + client *RkeK8sServiceOptionClient +} + +type RkeK8sServiceOptionClient struct { + apiClient *Client +} + +type RkeK8sServiceOptionOperations interface { + List(opts *types.ListOpts) (*RkeK8sServiceOptionCollection, error) + ListAll(opts *types.ListOpts) (*RkeK8sServiceOptionCollection, error) + Create(opts *RkeK8sServiceOption) (*RkeK8sServiceOption, error) + Update(existing *RkeK8sServiceOption, updates interface{}) (*RkeK8sServiceOption, error) + Replace(existing *RkeK8sServiceOption) (*RkeK8sServiceOption, error) + ByID(id string) (*RkeK8sServiceOption, error) + Delete(container *RkeK8sServiceOption) error +} + +func newRkeK8sServiceOptionClient(apiClient *Client) *RkeK8sServiceOptionClient { + return &RkeK8sServiceOptionClient{ + apiClient: apiClient, + } +} + +func (c *RkeK8sServiceOptionClient) Create(container *RkeK8sServiceOption) (*RkeK8sServiceOption, error) { + resp := &RkeK8sServiceOption{} + err := c.apiClient.Ops.DoCreate(RkeK8sServiceOptionType, container, resp) + return resp, err +} + +func (c *RkeK8sServiceOptionClient) Update(existing *RkeK8sServiceOption, updates interface{}) (*RkeK8sServiceOption, error) { + resp := &RkeK8sServiceOption{} + err := c.apiClient.Ops.DoUpdate(RkeK8sServiceOptionType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RkeK8sServiceOptionClient) Replace(obj *RkeK8sServiceOption) (*RkeK8sServiceOption, error) { + resp := &RkeK8sServiceOption{} + err := c.apiClient.Ops.DoReplace(RkeK8sServiceOptionType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *RkeK8sServiceOptionClient) List(opts *types.ListOpts) (*RkeK8sServiceOptionCollection, error) { + resp := &RkeK8sServiceOptionCollection{} + err := c.apiClient.Ops.DoList(RkeK8sServiceOptionType, opts, resp) + resp.client = c + return resp, err +} + +func (c *RkeK8sServiceOptionClient) ListAll(opts *types.ListOpts) (*RkeK8sServiceOptionCollection, error) { + resp := &RkeK8sServiceOptionCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *RkeK8sServiceOptionCollection) Next() (*RkeK8sServiceOptionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RkeK8sServiceOptionCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *RkeK8sServiceOptionClient) ByID(id string) (*RkeK8sServiceOption, error) { + resp := &RkeK8sServiceOption{} + err := c.apiClient.Ops.DoByID(RkeK8sServiceOptionType, id, resp) + return resp, err +} + +func (c *RkeK8sServiceOptionClient) Delete(container *RkeK8sServiceOption) error { + return c.apiClient.Ops.DoResourceDelete(RkeK8sServiceOptionType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_k8s_system_image.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_k8s_system_image.go new file mode 100644 index 000000000..3fb0e153f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_k8s_system_image.go @@ -0,0 +1,120 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + RkeK8sSystemImageType = "rkeK8sSystemImage" + RkeK8sSystemImageFieldAnnotations = "annotations" + RkeK8sSystemImageFieldCreated = "created" + RkeK8sSystemImageFieldCreatorID = "creatorId" + RkeK8sSystemImageFieldLabels = "labels" + RkeK8sSystemImageFieldName = "name" + RkeK8sSystemImageFieldOwnerReferences = "ownerReferences" + RkeK8sSystemImageFieldRemoved = "removed" + RkeK8sSystemImageFieldSystemImages = "systemImages" + RkeK8sSystemImageFieldUUID = "uuid" +) + +type RkeK8sSystemImage struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + SystemImages *RKESystemImages `json:"systemImages,omitempty" yaml:"systemImages,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type RkeK8sSystemImageCollection struct { + types.Collection + Data []RkeK8sSystemImage `json:"data,omitempty"` + client *RkeK8sSystemImageClient +} + +type RkeK8sSystemImageClient struct { + apiClient *Client +} + +type RkeK8sSystemImageOperations interface { + List(opts *types.ListOpts) (*RkeK8sSystemImageCollection, error) + ListAll(opts *types.ListOpts) (*RkeK8sSystemImageCollection, error) + Create(opts *RkeK8sSystemImage) (*RkeK8sSystemImage, error) + Update(existing *RkeK8sSystemImage, updates interface{}) (*RkeK8sSystemImage, error) + Replace(existing *RkeK8sSystemImage) (*RkeK8sSystemImage, error) + ByID(id string) (*RkeK8sSystemImage, error) + Delete(container *RkeK8sSystemImage) error +} + +func newRkeK8sSystemImageClient(apiClient *Client) *RkeK8sSystemImageClient { + return &RkeK8sSystemImageClient{ + apiClient: apiClient, + } +} + +func (c *RkeK8sSystemImageClient) Create(container *RkeK8sSystemImage) (*RkeK8sSystemImage, error) { + resp := &RkeK8sSystemImage{} + err := c.apiClient.Ops.DoCreate(RkeK8sSystemImageType, container, resp) + return resp, err +} + +func (c *RkeK8sSystemImageClient) Update(existing *RkeK8sSystemImage, updates interface{}) (*RkeK8sSystemImage, error) { + resp := &RkeK8sSystemImage{} + err := c.apiClient.Ops.DoUpdate(RkeK8sSystemImageType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RkeK8sSystemImageClient) Replace(obj *RkeK8sSystemImage) (*RkeK8sSystemImage, error) { + resp := &RkeK8sSystemImage{} + err := c.apiClient.Ops.DoReplace(RkeK8sSystemImageType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *RkeK8sSystemImageClient) List(opts *types.ListOpts) (*RkeK8sSystemImageCollection, error) { + resp := &RkeK8sSystemImageCollection{} + err := c.apiClient.Ops.DoList(RkeK8sSystemImageType, opts, resp) + resp.client = c + return resp, err +} + +func (c *RkeK8sSystemImageClient) ListAll(opts *types.ListOpts) (*RkeK8sSystemImageCollection, error) { + resp := &RkeK8sSystemImageCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *RkeK8sSystemImageCollection) Next() (*RkeK8sSystemImageCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RkeK8sSystemImageCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *RkeK8sSystemImageClient) ByID(id string) (*RkeK8sSystemImage, error) { + resp := &RkeK8sSystemImage{} + err := c.apiClient.Ops.DoByID(RkeK8sSystemImageType, id, resp) + return resp, err +} + +func (c *RkeK8sSystemImageClient) Delete(container *RkeK8sSystemImage) error { + return c.apiClient.Ops.DoResourceDelete(RkeK8sSystemImageType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_system_images.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_system_images.go new file mode 100644 index 000000000..185a3f077 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_system_images.go @@ -0,0 +1,90 @@ +package client + +const ( + RKESystemImagesType = "rkeSystemImages" + RKESystemImagesFieldAciCniDeployContainer = "aciCniDeployContainer" + RKESystemImagesFieldAciControllerContainer = "aciControllerContainer" + RKESystemImagesFieldAciGbpServerContainer = "aciGbpServerContainer" + RKESystemImagesFieldAciHostContainer = "aciHostContainer" + RKESystemImagesFieldAciMcastContainer = "aciMcastContainer" + RKESystemImagesFieldAciOpenvSwitchContainer = "aciOvsContainer" + RKESystemImagesFieldAciOpflexContainer = "aciOpflexContainer" + RKESystemImagesFieldAciOpflexServerContainer = "aciOpflexServerContainer" + RKESystemImagesFieldAlpine = "alpine" + RKESystemImagesFieldCalicoCNI = "calicoCni" + RKESystemImagesFieldCalicoControllers = "calicoControllers" + RKESystemImagesFieldCalicoCtl = "calicoCtl" + RKESystemImagesFieldCalicoFlexVol = "calicoFlexVol" + RKESystemImagesFieldCalicoNode = "calicoNode" + RKESystemImagesFieldCanalCNI = "canalCni" + RKESystemImagesFieldCanalControllers = "canalControllers" + RKESystemImagesFieldCanalFlannel = "canalFlannel" + RKESystemImagesFieldCanalFlexVol = "canalFlexVol" + RKESystemImagesFieldCanalNode = "canalNode" + RKESystemImagesFieldCertDownloader = "certDownloader" + RKESystemImagesFieldCoreDNS = "coredns" + RKESystemImagesFieldCoreDNSAutoscaler = "corednsAutoscaler" + RKESystemImagesFieldDNSmasq = "dnsmasq" + RKESystemImagesFieldEtcd = "etcd" + RKESystemImagesFieldFlannel = "flannel" + RKESystemImagesFieldFlannelCNI = "flannelCni" + RKESystemImagesFieldIngress = "ingress" + RKESystemImagesFieldIngressBackend = "ingressBackend" + RKESystemImagesFieldIngressWebhook = "ingressWebhook" + RKESystemImagesFieldKubeDNS = "kubedns" + RKESystemImagesFieldKubeDNSAutoscaler = "kubednsAutoscaler" + RKESystemImagesFieldKubeDNSSidecar = "kubednsSidecar" + RKESystemImagesFieldKubernetes = "kubernetes" + RKESystemImagesFieldKubernetesServicesSidecar = "kubernetesServicesSidecar" + RKESystemImagesFieldMetricsServer = "metricsServer" + RKESystemImagesFieldNginxProxy = "nginxProxy" + RKESystemImagesFieldNodelocal = "nodelocal" + RKESystemImagesFieldPodInfraContainer = "podInfraContainer" + RKESystemImagesFieldWeaveCNI = "weaveCni" + RKESystemImagesFieldWeaveNode = "weaveNode" + RKESystemImagesFieldWindowsPodInfraContainer = "windowsPodInfraContainer" +) + +type RKESystemImages struct { + AciCniDeployContainer string `json:"aciCniDeployContainer,omitempty" yaml:"aciCniDeployContainer,omitempty"` + AciControllerContainer string `json:"aciControllerContainer,omitempty" yaml:"aciControllerContainer,omitempty"` + AciGbpServerContainer string `json:"aciGbpServerContainer,omitempty" yaml:"aciGbpServerContainer,omitempty"` + AciHostContainer string `json:"aciHostContainer,omitempty" yaml:"aciHostContainer,omitempty"` + AciMcastContainer string `json:"aciMcastContainer,omitempty" yaml:"aciMcastContainer,omitempty"` + AciOpenvSwitchContainer string `json:"aciOvsContainer,omitempty" yaml:"aciOvsContainer,omitempty"` + AciOpflexContainer string `json:"aciOpflexContainer,omitempty" yaml:"aciOpflexContainer,omitempty"` + AciOpflexServerContainer string `json:"aciOpflexServerContainer,omitempty" yaml:"aciOpflexServerContainer,omitempty"` + Alpine string `json:"alpine,omitempty" yaml:"alpine,omitempty"` + CalicoCNI string `json:"calicoCni,omitempty" yaml:"calicoCni,omitempty"` + CalicoControllers string `json:"calicoControllers,omitempty" yaml:"calicoControllers,omitempty"` + CalicoCtl string `json:"calicoCtl,omitempty" yaml:"calicoCtl,omitempty"` + CalicoFlexVol string `json:"calicoFlexVol,omitempty" yaml:"calicoFlexVol,omitempty"` + CalicoNode string `json:"calicoNode,omitempty" yaml:"calicoNode,omitempty"` + CanalCNI string `json:"canalCni,omitempty" yaml:"canalCni,omitempty"` + CanalControllers string `json:"canalControllers,omitempty" yaml:"canalControllers,omitempty"` + CanalFlannel string `json:"canalFlannel,omitempty" yaml:"canalFlannel,omitempty"` + CanalFlexVol string `json:"canalFlexVol,omitempty" yaml:"canalFlexVol,omitempty"` + CanalNode string `json:"canalNode,omitempty" yaml:"canalNode,omitempty"` + CertDownloader string `json:"certDownloader,omitempty" yaml:"certDownloader,omitempty"` + CoreDNS string `json:"coredns,omitempty" yaml:"coredns,omitempty"` + CoreDNSAutoscaler string `json:"corednsAutoscaler,omitempty" yaml:"corednsAutoscaler,omitempty"` + DNSmasq string `json:"dnsmasq,omitempty" yaml:"dnsmasq,omitempty"` + Etcd string `json:"etcd,omitempty" yaml:"etcd,omitempty"` + Flannel string `json:"flannel,omitempty" yaml:"flannel,omitempty"` + FlannelCNI string `json:"flannelCni,omitempty" yaml:"flannelCni,omitempty"` + Ingress string `json:"ingress,omitempty" yaml:"ingress,omitempty"` + IngressBackend string `json:"ingressBackend,omitempty" yaml:"ingressBackend,omitempty"` + IngressWebhook string `json:"ingressWebhook,omitempty" yaml:"ingressWebhook,omitempty"` + KubeDNS string `json:"kubedns,omitempty" yaml:"kubedns,omitempty"` + KubeDNSAutoscaler string `json:"kubednsAutoscaler,omitempty" yaml:"kubednsAutoscaler,omitempty"` + KubeDNSSidecar string `json:"kubednsSidecar,omitempty" yaml:"kubednsSidecar,omitempty"` + Kubernetes string `json:"kubernetes,omitempty" yaml:"kubernetes,omitempty"` + KubernetesServicesSidecar string `json:"kubernetesServicesSidecar,omitempty" yaml:"kubernetesServicesSidecar,omitempty"` + MetricsServer string `json:"metricsServer,omitempty" yaml:"metricsServer,omitempty"` + NginxProxy string `json:"nginxProxy,omitempty" yaml:"nginxProxy,omitempty"` + Nodelocal string `json:"nodelocal,omitempty" yaml:"nodelocal,omitempty"` + PodInfraContainer string `json:"podInfraContainer,omitempty" yaml:"podInfraContainer,omitempty"` + WeaveCNI string `json:"weaveCni,omitempty" yaml:"weaveCni,omitempty"` + WeaveNode string `json:"weaveNode,omitempty" yaml:"weaveNode,omitempty"` + WindowsPodInfraContainer string `json:"windowsPodInfraContainer,omitempty" yaml:"windowsPodInfraContainer,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_taint.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_taint.go new file mode 100644 index 000000000..8cd196fab --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rke_taint.go @@ -0,0 +1,16 @@ +package client + +const ( + RKETaintType = "rkeTaint" + RKETaintFieldEffect = "effect" + RKETaintFieldKey = "key" + RKETaintFieldTimeAdded = "timeAdded" + RKETaintFieldValue = "value" +) + +type RKETaint struct { + Effect string `json:"effect,omitempty" yaml:"effect,omitempty"` + Key string `json:"key,omitempty" yaml:"key,omitempty"` + TimeAdded string `json:"timeAdded,omitempty" yaml:"timeAdded,omitempty"` + Value string `json:"value,omitempty" yaml:"value,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_role_template.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_role_template.go new file mode 100644 index 000000000..ed746083c --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_role_template.go @@ -0,0 +1,142 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + RoleTemplateType = "roleTemplate" + RoleTemplateFieldAdministrative = "administrative" + RoleTemplateFieldAnnotations = "annotations" + RoleTemplateFieldBuiltin = "builtin" + RoleTemplateFieldClusterCreatorDefault = "clusterCreatorDefault" + RoleTemplateFieldContext = "context" + RoleTemplateFieldCreated = "created" + RoleTemplateFieldCreatorID = "creatorId" + RoleTemplateFieldDescription = "description" + RoleTemplateFieldExternal = "external" + RoleTemplateFieldExternalRules = "externalRules" + RoleTemplateFieldHidden = "hidden" + RoleTemplateFieldLabels = "labels" + RoleTemplateFieldLocked = "locked" + RoleTemplateFieldName = "name" + RoleTemplateFieldOwnerReferences = "ownerReferences" + RoleTemplateFieldProjectCreatorDefault = "projectCreatorDefault" + RoleTemplateFieldRemoved = "removed" + RoleTemplateFieldRoleTemplateIDs = "roleTemplateIds" + RoleTemplateFieldRules = "rules" + RoleTemplateFieldUUID = "uuid" +) + +type RoleTemplate struct { + types.Resource + Administrative bool `json:"administrative,omitempty" yaml:"administrative,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Builtin bool `json:"builtin,omitempty" yaml:"builtin,omitempty"` + ClusterCreatorDefault bool `json:"clusterCreatorDefault,omitempty" yaml:"clusterCreatorDefault,omitempty"` + Context string `json:"context,omitempty" yaml:"context,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + External bool `json:"external,omitempty" yaml:"external,omitempty"` + ExternalRules []PolicyRule `json:"externalRules,omitempty" yaml:"externalRules,omitempty"` + Hidden bool `json:"hidden,omitempty" yaml:"hidden,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Locked bool `json:"locked,omitempty" yaml:"locked,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + ProjectCreatorDefault bool `json:"projectCreatorDefault,omitempty" yaml:"projectCreatorDefault,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + RoleTemplateIDs []string `json:"roleTemplateIds,omitempty" yaml:"roleTemplateIds,omitempty"` + Rules []PolicyRule `json:"rules,omitempty" yaml:"rules,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type RoleTemplateCollection struct { + types.Collection + Data []RoleTemplate `json:"data,omitempty"` + client *RoleTemplateClient +} + +type RoleTemplateClient struct { + apiClient *Client +} + +type RoleTemplateOperations interface { + List(opts *types.ListOpts) (*RoleTemplateCollection, error) + ListAll(opts *types.ListOpts) (*RoleTemplateCollection, error) + Create(opts *RoleTemplate) (*RoleTemplate, error) + Update(existing *RoleTemplate, updates interface{}) (*RoleTemplate, error) + Replace(existing *RoleTemplate) (*RoleTemplate, error) + ByID(id string) (*RoleTemplate, error) + Delete(container *RoleTemplate) error +} + +func newRoleTemplateClient(apiClient *Client) *RoleTemplateClient { + return &RoleTemplateClient{ + apiClient: apiClient, + } +} + +func (c *RoleTemplateClient) Create(container *RoleTemplate) (*RoleTemplate, error) { + resp := &RoleTemplate{} + err := c.apiClient.Ops.DoCreate(RoleTemplateType, container, resp) + return resp, err +} + +func (c *RoleTemplateClient) Update(existing *RoleTemplate, updates interface{}) (*RoleTemplate, error) { + resp := &RoleTemplate{} + err := c.apiClient.Ops.DoUpdate(RoleTemplateType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RoleTemplateClient) Replace(obj *RoleTemplate) (*RoleTemplate, error) { + resp := &RoleTemplate{} + err := c.apiClient.Ops.DoReplace(RoleTemplateType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *RoleTemplateClient) List(opts *types.ListOpts) (*RoleTemplateCollection, error) { + resp := &RoleTemplateCollection{} + err := c.apiClient.Ops.DoList(RoleTemplateType, opts, resp) + resp.client = c + return resp, err +} + +func (c *RoleTemplateClient) ListAll(opts *types.ListOpts) (*RoleTemplateCollection, error) { + resp := &RoleTemplateCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *RoleTemplateCollection) Next() (*RoleTemplateCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RoleTemplateCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *RoleTemplateClient) ByID(id string) (*RoleTemplate, error) { + resp := &RoleTemplate{} + err := c.apiClient.Ops.DoByID(RoleTemplateType, id, resp) + return resp, err +} + +func (c *RoleTemplateClient) Delete(container *RoleTemplate) error { + return c.apiClient.Ops.DoResourceDelete(RoleTemplateType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rolling_update.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rolling_update.go new file mode 100644 index 000000000..180f638b9 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rolling_update.go @@ -0,0 +1,12 @@ +package client + +const ( + RollingUpdateType = "rollingUpdate" + RollingUpdateFieldBatchSize = "batchSize" + RollingUpdateFieldInterval = "interval" +) + +type RollingUpdate struct { + BatchSize int64 `json:"batchSize,omitempty" yaml:"batchSize,omitempty"` + Interval int64 `json:"interval,omitempty" yaml:"interval,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rolling_update_daemon_set.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rolling_update_daemon_set.go new file mode 100644 index 000000000..f6c2e12b2 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rolling_update_daemon_set.go @@ -0,0 +1,16 @@ +package client + +import ( + "k8s.io/apimachinery/pkg/util/intstr" +) + +const ( + RollingUpdateDaemonSetType = "rollingUpdateDaemonSet" + RollingUpdateDaemonSetFieldMaxSurge = "maxSurge" + RollingUpdateDaemonSetFieldMaxUnavailable = "maxUnavailable" +) + +type RollingUpdateDaemonSet struct { + MaxSurge intstr.IntOrString `json:"maxSurge,omitempty" yaml:"maxSurge,omitempty"` + MaxUnavailable intstr.IntOrString `json:"maxUnavailable,omitempty" yaml:"maxUnavailable,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rolling_update_deployment.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rolling_update_deployment.go new file mode 100644 index 000000000..535fb36fa --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rolling_update_deployment.go @@ -0,0 +1,16 @@ +package client + +import ( + "k8s.io/apimachinery/pkg/util/intstr" +) + +const ( + RollingUpdateDeploymentType = "rollingUpdateDeployment" + RollingUpdateDeploymentFieldMaxSurge = "maxSurge" + RollingUpdateDeploymentFieldMaxUnavailable = "maxUnavailable" +) + +type RollingUpdateDeployment struct { + MaxSurge intstr.IntOrString `json:"maxSurge,omitempty" yaml:"maxSurge,omitempty"` + MaxUnavailable intstr.IntOrString `json:"maxUnavailable,omitempty" yaml:"maxUnavailable,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_certificate_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_certificate_input.go new file mode 100644 index 000000000..e82747620 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_certificate_input.go @@ -0,0 +1,12 @@ +package client + +const ( + RotateCertificateInputType = "rotateCertificateInput" + RotateCertificateInputFieldCACertificates = "caCertificates" + RotateCertificateInputFieldServices = "services" +) + +type RotateCertificateInput struct { + CACertificates bool `json:"caCertificates,omitempty" yaml:"caCertificates,omitempty"` + Services string `json:"services,omitempty" yaml:"services,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_certificate_output.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_certificate_output.go new file mode 100644 index 000000000..47c50ec82 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_certificate_output.go @@ -0,0 +1,10 @@ +package client + +const ( + RotateCertificateOutputType = "rotateCertificateOutput" + RotateCertificateOutputFieldMessage = "message" +) + +type RotateCertificateOutput struct { + Message string `json:"message,omitempty" yaml:"message,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_certificates.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_certificates.go new file mode 100644 index 000000000..219450f86 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_certificates.go @@ -0,0 +1,12 @@ +package client + +const ( + RotateCertificatesType = "rotateCertificates" + RotateCertificatesFieldCACertificates = "caCertificates" + RotateCertificatesFieldServices = "services" +) + +type RotateCertificates struct { + CACertificates bool `json:"caCertificates,omitempty" yaml:"caCertificates,omitempty"` + Services string `json:"services,omitempty" yaml:"services,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_encryption_key_output.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_encryption_key_output.go new file mode 100644 index 000000000..23360d02f --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_rotate_encryption_key_output.go @@ -0,0 +1,10 @@ +package client + +const ( + RotateEncryptionKeyOutputType = "rotateEncryptionKeyOutput" + RotateEncryptionKeyOutputFieldMessage = "message" +) + +type RotateEncryptionKeyOutput struct { + Message string `json:"message,omitempty" yaml:"message,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_route53provider_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_route53provider_config.go new file mode 100644 index 000000000..0932c3f52 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_route53provider_config.go @@ -0,0 +1,22 @@ +package client + +const ( + Route53ProviderConfigType = "route53ProviderConfig" + Route53ProviderConfigFieldAccessKey = "accessKey" + Route53ProviderConfigFieldAdditionalOptions = "additionalOptions" + Route53ProviderConfigFieldCredentialsPath = "credentialsPath" + Route53ProviderConfigFieldRegion = "region" + Route53ProviderConfigFieldRoleArn = "roleArn" + Route53ProviderConfigFieldSecretKey = "secretKey" + Route53ProviderConfigFieldZoneType = "zoneType" +) + +type Route53ProviderConfig struct { + AccessKey string `json:"accessKey,omitempty" yaml:"accessKey,omitempty"` + AdditionalOptions map[string]string `json:"additionalOptions,omitempty" yaml:"additionalOptions,omitempty"` + CredentialsPath string `json:"credentialsPath,omitempty" yaml:"credentialsPath,omitempty"` + Region string `json:"region,omitempty" yaml:"region,omitempty"` + RoleArn string `json:"roleArn,omitempty" yaml:"roleArn,omitempty"` + SecretKey string `json:"secretKey,omitempty" yaml:"secretKey,omitempty"` + ZoneType string `json:"zoneType,omitempty" yaml:"zoneType,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_route_openstack_opts.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_route_openstack_opts.go new file mode 100644 index 000000000..ad6f9882e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_route_openstack_opts.go @@ -0,0 +1,10 @@ +package client + +const ( + RouteOpenstackOptsType = "routeOpenstackOpts" + RouteOpenstackOptsFieldRouterID = "router-id" +) + +type RouteOpenstackOpts struct { + RouterID string `json:"router-id,omitempty" yaml:"router-id,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_s3backup_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_s3backup_config.go new file mode 100644 index 000000000..14ea58749 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_s3backup_config.go @@ -0,0 +1,22 @@ +package client + +const ( + S3BackupConfigType = "s3BackupConfig" + S3BackupConfigFieldAccessKey = "accessKey" + S3BackupConfigFieldBucketName = "bucketName" + S3BackupConfigFieldCustomCA = "customCa" + S3BackupConfigFieldEndpoint = "endpoint" + S3BackupConfigFieldFolder = "folder" + S3BackupConfigFieldRegion = "region" + S3BackupConfigFieldSecretKey = "secretKey" +) + +type S3BackupConfig struct { + AccessKey string `json:"accessKey,omitempty" yaml:"accessKey,omitempty"` + BucketName string `json:"bucketName,omitempty" yaml:"bucketName,omitempty"` + CustomCA string `json:"customCa,omitempty" yaml:"customCa,omitempty"` + Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"` + Folder string `json:"folder,omitempty" yaml:"folder,omitempty"` + Region string `json:"region,omitempty" yaml:"region,omitempty"` + SecretKey string `json:"secretKey,omitempty" yaml:"secretKey,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_s3credential_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_s3credential_config.go new file mode 100644 index 000000000..f351e8a3b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_s3credential_config.go @@ -0,0 +1,24 @@ +package client + +const ( + S3CredentialConfigType = "s3CredentialConfig" + S3CredentialConfigFieldAccessKey = "accessKey" + S3CredentialConfigFieldDefaultBucket = "defaultBucket" + S3CredentialConfigFieldDefaultEndpoint = "defaultEndpoint" + S3CredentialConfigFieldDefaultEndpointCA = "defaultEndpointCA" + S3CredentialConfigFieldDefaultFolder = "defaultFolder" + S3CredentialConfigFieldDefaultRegion = "defaultRegion" + S3CredentialConfigFieldDefaultSkipSSLVerify = "defaultSkipSSLVerify" + S3CredentialConfigFieldSecretKey = "secretKey" +) + +type S3CredentialConfig struct { + AccessKey string `json:"accessKey,omitempty" yaml:"accessKey,omitempty"` + DefaultBucket string `json:"defaultBucket,omitempty" yaml:"defaultBucket,omitempty"` + DefaultEndpoint string `json:"defaultEndpoint,omitempty" yaml:"defaultEndpoint,omitempty"` + DefaultEndpointCA string `json:"defaultEndpointCA,omitempty" yaml:"defaultEndpointCA,omitempty"` + DefaultFolder string `json:"defaultFolder,omitempty" yaml:"defaultFolder,omitempty"` + DefaultRegion string `json:"defaultRegion,omitempty" yaml:"defaultRegion,omitempty"` + DefaultSkipSSLVerify string `json:"defaultSkipSSLVerify,omitempty" yaml:"defaultSkipSSLVerify,omitempty"` + SecretKey string `json:"secretKey,omitempty" yaml:"secretKey,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_saml_config_test_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_saml_config_test_input.go new file mode 100644 index 000000000..a7d31f937 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_saml_config_test_input.go @@ -0,0 +1,10 @@ +package client + +const ( + SamlConfigTestInputType = "samlConfigTestInput" + SamlConfigTestInputFieldFinalRedirectURL = "finalRedirectUrl" +) + +type SamlConfigTestInput struct { + FinalRedirectURL string `json:"finalRedirectUrl,omitempty" yaml:"finalRedirectUrl,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_saml_config_test_output.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_saml_config_test_output.go new file mode 100644 index 000000000..e9e5b95bc --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_saml_config_test_output.go @@ -0,0 +1,10 @@ +package client + +const ( + SamlConfigTestOutputType = "samlConfigTestOutput" + SamlConfigTestOutputFieldIdpRedirectURL = "idpRedirectUrl" +) + +type SamlConfigTestOutput struct { + IdpRedirectURL string `json:"idpRedirectUrl,omitempty" yaml:"idpRedirectUrl,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_saml_token.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_saml_token.go new file mode 100644 index 000000000..91f0fb3ce --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_saml_token.go @@ -0,0 +1,124 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + SamlTokenType = "samlToken" + SamlTokenFieldAnnotations = "annotations" + SamlTokenFieldCreated = "created" + SamlTokenFieldCreatorID = "creatorId" + SamlTokenFieldExpiresAt = "expiresAt" + SamlTokenFieldLabels = "labels" + SamlTokenFieldName = "name" + SamlTokenFieldNamespaceId = "namespaceId" + SamlTokenFieldOwnerReferences = "ownerReferences" + SamlTokenFieldRemoved = "removed" + SamlTokenFieldToken = "token" + SamlTokenFieldUUID = "uuid" +) + +type SamlToken struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + ExpiresAt string `json:"expiresAt,omitempty" yaml:"expiresAt,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NamespaceId string `json:"namespaceId,omitempty" yaml:"namespaceId,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Token string `json:"token,omitempty" yaml:"token,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type SamlTokenCollection struct { + types.Collection + Data []SamlToken `json:"data,omitempty"` + client *SamlTokenClient +} + +type SamlTokenClient struct { + apiClient *Client +} + +type SamlTokenOperations interface { + List(opts *types.ListOpts) (*SamlTokenCollection, error) + ListAll(opts *types.ListOpts) (*SamlTokenCollection, error) + Create(opts *SamlToken) (*SamlToken, error) + Update(existing *SamlToken, updates interface{}) (*SamlToken, error) + Replace(existing *SamlToken) (*SamlToken, error) + ByID(id string) (*SamlToken, error) + Delete(container *SamlToken) error +} + +func newSamlTokenClient(apiClient *Client) *SamlTokenClient { + return &SamlTokenClient{ + apiClient: apiClient, + } +} + +func (c *SamlTokenClient) Create(container *SamlToken) (*SamlToken, error) { + resp := &SamlToken{} + err := c.apiClient.Ops.DoCreate(SamlTokenType, container, resp) + return resp, err +} + +func (c *SamlTokenClient) Update(existing *SamlToken, updates interface{}) (*SamlToken, error) { + resp := &SamlToken{} + err := c.apiClient.Ops.DoUpdate(SamlTokenType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SamlTokenClient) Replace(obj *SamlToken) (*SamlToken, error) { + resp := &SamlToken{} + err := c.apiClient.Ops.DoReplace(SamlTokenType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *SamlTokenClient) List(opts *types.ListOpts) (*SamlTokenCollection, error) { + resp := &SamlTokenCollection{} + err := c.apiClient.Ops.DoList(SamlTokenType, opts, resp) + resp.client = c + return resp, err +} + +func (c *SamlTokenClient) ListAll(opts *types.ListOpts) (*SamlTokenCollection, error) { + resp := &SamlTokenCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *SamlTokenCollection) Next() (*SamlTokenCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SamlTokenCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *SamlTokenClient) ByID(id string) (*SamlToken, error) { + resp := &SamlToken{} + err := c.apiClient.Ops.DoByID(SamlTokenType, id, resp) + return resp, err +} + +func (c *SamlTokenClient) Delete(container *SamlToken) error { + return c.apiClient.Ops.DoResourceDelete(SamlTokenType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_save_as_template_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_save_as_template_input.go new file mode 100644 index 000000000..b756e4fea --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_save_as_template_input.go @@ -0,0 +1,12 @@ +package client + +const ( + SaveAsTemplateInputType = "saveAsTemplateInput" + SaveAsTemplateInputFieldClusterTemplateName = "clusterTemplateName" + SaveAsTemplateInputFieldClusterTemplateRevisionName = "clusterTemplateRevisionName" +) + +type SaveAsTemplateInput struct { + ClusterTemplateName string `json:"clusterTemplateName,omitempty" yaml:"clusterTemplateName,omitempty"` + ClusterTemplateRevisionName string `json:"clusterTemplateRevisionName,omitempty" yaml:"clusterTemplateRevisionName,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_save_as_template_output.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_save_as_template_output.go new file mode 100644 index 000000000..e50901051 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_save_as_template_output.go @@ -0,0 +1,12 @@ +package client + +const ( + SaveAsTemplateOutputType = "saveAsTemplateOutput" + SaveAsTemplateOutputFieldClusterTemplateName = "clusterTemplateName" + SaveAsTemplateOutputFieldClusterTemplateRevisionName = "clusterTemplateRevisionName" +) + +type SaveAsTemplateOutput struct { + ClusterTemplateName string `json:"clusterTemplateName,omitempty" yaml:"clusterTemplateName,omitempty"` + ClusterTemplateRevisionName string `json:"clusterTemplateRevisionName,omitempty" yaml:"clusterTemplateRevisionName,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_scale_iovolume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_scale_iovolume_source.go new file mode 100644 index 000000000..58e000917 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_scale_iovolume_source.go @@ -0,0 +1,28 @@ +package client + +const ( + ScaleIOVolumeSourceType = "scaleIOVolumeSource" + ScaleIOVolumeSourceFieldFSType = "fsType" + ScaleIOVolumeSourceFieldGateway = "gateway" + ScaleIOVolumeSourceFieldProtectionDomain = "protectionDomain" + ScaleIOVolumeSourceFieldReadOnly = "readOnly" + ScaleIOVolumeSourceFieldSSLEnabled = "sslEnabled" + ScaleIOVolumeSourceFieldSecretRef = "secretRef" + ScaleIOVolumeSourceFieldStorageMode = "storageMode" + ScaleIOVolumeSourceFieldStoragePool = "storagePool" + ScaleIOVolumeSourceFieldSystem = "system" + ScaleIOVolumeSourceFieldVolumeName = "volumeName" +) + +type ScaleIOVolumeSource struct { + FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"` + Gateway string `json:"gateway,omitempty" yaml:"gateway,omitempty"` + ProtectionDomain string `json:"protectionDomain,omitempty" yaml:"protectionDomain,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + SSLEnabled bool `json:"sslEnabled,omitempty" yaml:"sslEnabled,omitempty"` + SecretRef *LocalObjectReference `json:"secretRef,omitempty" yaml:"secretRef,omitempty"` + StorageMode string `json:"storageMode,omitempty" yaml:"storageMode,omitempty"` + StoragePool string `json:"storagePool,omitempty" yaml:"storagePool,omitempty"` + System string `json:"system,omitempty" yaml:"system,omitempty"` + VolumeName string `json:"volumeName,omitempty" yaml:"volumeName,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_scheduler_service.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_scheduler_service.go new file mode 100644 index 000000000..1af88decf --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_scheduler_service.go @@ -0,0 +1,26 @@ +package client + +const ( + SchedulerServiceType = "schedulerService" + SchedulerServiceFieldExtraArgs = "extraArgs" + SchedulerServiceFieldExtraArgsArray = "extraArgsArray" + SchedulerServiceFieldExtraBinds = "extraBinds" + SchedulerServiceFieldExtraEnv = "extraEnv" + SchedulerServiceFieldImage = "image" + SchedulerServiceFieldWindowsExtraArgs = "winExtraArgs" + SchedulerServiceFieldWindowsExtraArgsArray = "winExtraArgsArray" + SchedulerServiceFieldWindowsExtraBinds = "winExtraBinds" + SchedulerServiceFieldWindowsExtraEnv = "winExtraEnv" +) + +type SchedulerService struct { + ExtraArgs map[string]string `json:"extraArgs,omitempty" yaml:"extraArgs,omitempty"` + ExtraArgsArray map[string][]string `json:"extraArgsArray,omitempty" yaml:"extraArgsArray,omitempty"` + ExtraBinds []string `json:"extraBinds,omitempty" yaml:"extraBinds,omitempty"` + ExtraEnv []string `json:"extraEnv,omitempty" yaml:"extraEnv,omitempty"` + Image string `json:"image,omitempty" yaml:"image,omitempty"` + WindowsExtraArgs map[string]string `json:"winExtraArgs,omitempty" yaml:"winExtraArgs,omitempty"` + WindowsExtraArgsArray map[string][]string `json:"winExtraArgsArray,omitempty" yaml:"winExtraArgsArray,omitempty"` + WindowsExtraBinds []string `json:"winExtraBinds,omitempty" yaml:"winExtraBinds,omitempty"` + WindowsExtraEnv []string `json:"winExtraEnv,omitempty" yaml:"winExtraEnv,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_search_principals_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_search_principals_input.go new file mode 100644 index 000000000..c486b4c2d --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_search_principals_input.go @@ -0,0 +1,12 @@ +package client + +const ( + SearchPrincipalsInputType = "searchPrincipalsInput" + SearchPrincipalsInputFieldName = "name" + SearchPrincipalsInputFieldPrincipalType = "principalType" +) + +type SearchPrincipalsInput struct { + Name string `json:"name,omitempty" yaml:"name,omitempty"` + PrincipalType string `json:"principalType,omitempty" yaml:"principalType,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secret_key_selector.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secret_key_selector.go new file mode 100644 index 000000000..9a236419e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secret_key_selector.go @@ -0,0 +1,14 @@ +package client + +const ( + SecretKeySelectorType = "secretKeySelector" + SecretKeySelectorFieldKey = "key" + SecretKeySelectorFieldName = "name" + SecretKeySelectorFieldOptional = "optional" +) + +type SecretKeySelector struct { + Key string `json:"key,omitempty" yaml:"key,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Optional *bool `json:"optional,omitempty" yaml:"optional,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secret_projection.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secret_projection.go new file mode 100644 index 000000000..684b025c3 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secret_projection.go @@ -0,0 +1,14 @@ +package client + +const ( + SecretProjectionType = "secretProjection" + SecretProjectionFieldItems = "items" + SecretProjectionFieldName = "name" + SecretProjectionFieldOptional = "optional" +) + +type SecretProjection struct { + Items []KeyToPath `json:"items,omitempty" yaml:"items,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Optional *bool `json:"optional,omitempty" yaml:"optional,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secret_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secret_volume_source.go new file mode 100644 index 000000000..bdb5109b1 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secret_volume_source.go @@ -0,0 +1,16 @@ +package client + +const ( + SecretVolumeSourceType = "secretVolumeSource" + SecretVolumeSourceFieldDefaultMode = "defaultMode" + SecretVolumeSourceFieldItems = "items" + SecretVolumeSourceFieldOptional = "optional" + SecretVolumeSourceFieldSecretName = "secretName" +) + +type SecretVolumeSource struct { + DefaultMode *int64 `json:"defaultMode,omitempty" yaml:"defaultMode,omitempty"` + Items []KeyToPath `json:"items,omitempty" yaml:"items,omitempty"` + Optional *bool `json:"optional,omitempty" yaml:"optional,omitempty"` + SecretName string `json:"secretName,omitempty" yaml:"secretName,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secretbox_configuration.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secretbox_configuration.go new file mode 100644 index 000000000..c913985ab --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secretbox_configuration.go @@ -0,0 +1,10 @@ +package client + +const ( + SecretboxConfigurationType = "secretboxConfiguration" + SecretboxConfigurationFieldKeys = "keys" +) + +type SecretboxConfiguration struct { + Keys []Key `json:"keys,omitempty" yaml:"keys,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secrets_encryption_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secrets_encryption_config.go new file mode 100644 index 000000000..658ff6b5a --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_secrets_encryption_config.go @@ -0,0 +1,12 @@ +package client + +const ( + SecretsEncryptionConfigType = "secretsEncryptionConfig" + SecretsEncryptionConfigFieldCustomConfig = "customConfig" + SecretsEncryptionConfigFieldEnabled = "enabled" +) + +type SecretsEncryptionConfig struct { + CustomConfig *EncryptionConfiguration `json:"customConfig,omitempty" yaml:"customConfig,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_service_account_token_projection.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_service_account_token_projection.go new file mode 100644 index 000000000..7d2e880ec --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_service_account_token_projection.go @@ -0,0 +1,14 @@ +package client + +const ( + ServiceAccountTokenProjectionType = "serviceAccountTokenProjection" + ServiceAccountTokenProjectionFieldAudience = "audience" + ServiceAccountTokenProjectionFieldExpirationSeconds = "expirationSeconds" + ServiceAccountTokenProjectionFieldPath = "path" +) + +type ServiceAccountTokenProjection struct { + Audience string `json:"audience,omitempty" yaml:"audience,omitempty"` + ExpirationSeconds *int64 `json:"expirationSeconds,omitempty" yaml:"expirationSeconds,omitempty"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_service_override.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_service_override.go new file mode 100644 index 000000000..96ed63c04 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_service_override.go @@ -0,0 +1,20 @@ +package client + +const ( + ServiceOverrideType = "serviceOverride" + ServiceOverrideFieldRegion = "region" + ServiceOverrideFieldService = "service" + ServiceOverrideFieldSigningMethod = "signing-method" + ServiceOverrideFieldSigningName = "signing-name" + ServiceOverrideFieldSigningRegion = "signing-region" + ServiceOverrideFieldURL = "url" +) + +type ServiceOverride struct { + Region string `json:"region,omitempty" yaml:"region,omitempty"` + Service string `json:"service,omitempty" yaml:"service,omitempty"` + SigningMethod string `json:"signing-method,omitempty" yaml:"signing-method,omitempty"` + SigningName string `json:"signing-name,omitempty" yaml:"signing-name,omitempty"` + SigningRegion string `json:"signing-region,omitempty" yaml:"signing-region,omitempty"` + URL string `json:"url,omitempty" yaml:"url,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_set_password_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_set_password_input.go new file mode 100644 index 000000000..4dc32d6c9 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_set_password_input.go @@ -0,0 +1,10 @@ +package client + +const ( + SetPasswordInputType = "setPasswordInput" + SetPasswordInputFieldNewPassword = "newPassword" +) + +type SetPasswordInput struct { + NewPassword string `json:"newPassword,omitempty" yaml:"newPassword,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_setting.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_setting.go new file mode 100644 index 000000000..6ea352ba2 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_setting.go @@ -0,0 +1,126 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + SettingType = "setting" + SettingFieldAnnotations = "annotations" + SettingFieldCreated = "created" + SettingFieldCreatorID = "creatorId" + SettingFieldCustomized = "customized" + SettingFieldDefault = "default" + SettingFieldLabels = "labels" + SettingFieldName = "name" + SettingFieldOwnerReferences = "ownerReferences" + SettingFieldRemoved = "removed" + SettingFieldSource = "source" + SettingFieldUUID = "uuid" + SettingFieldValue = "value" +) + +type Setting struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Customized bool `json:"customized,omitempty" yaml:"customized,omitempty"` + Default string `json:"default,omitempty" yaml:"default,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Source string `json:"source,omitempty" yaml:"source,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + Value string `json:"value,omitempty" yaml:"value,omitempty"` +} + +type SettingCollection struct { + types.Collection + Data []Setting `json:"data,omitempty"` + client *SettingClient +} + +type SettingClient struct { + apiClient *Client +} + +type SettingOperations interface { + List(opts *types.ListOpts) (*SettingCollection, error) + ListAll(opts *types.ListOpts) (*SettingCollection, error) + Create(opts *Setting) (*Setting, error) + Update(existing *Setting, updates interface{}) (*Setting, error) + Replace(existing *Setting) (*Setting, error) + ByID(id string) (*Setting, error) + Delete(container *Setting) error +} + +func newSettingClient(apiClient *Client) *SettingClient { + return &SettingClient{ + apiClient: apiClient, + } +} + +func (c *SettingClient) Create(container *Setting) (*Setting, error) { + resp := &Setting{} + err := c.apiClient.Ops.DoCreate(SettingType, container, resp) + return resp, err +} + +func (c *SettingClient) Update(existing *Setting, updates interface{}) (*Setting, error) { + resp := &Setting{} + err := c.apiClient.Ops.DoUpdate(SettingType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SettingClient) Replace(obj *Setting) (*Setting, error) { + resp := &Setting{} + err := c.apiClient.Ops.DoReplace(SettingType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *SettingClient) List(opts *types.ListOpts) (*SettingCollection, error) { + resp := &SettingCollection{} + err := c.apiClient.Ops.DoList(SettingType, opts, resp) + resp.client = c + return resp, err +} + +func (c *SettingClient) ListAll(opts *types.ListOpts) (*SettingCollection, error) { + resp := &SettingCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *SettingCollection) Next() (*SettingCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SettingCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *SettingClient) ByID(id string) (*Setting, error) { + resp := &Setting{} + err := c.apiClient.Ops.DoByID(SettingType, id, resp) + return resp, err +} + +func (c *SettingClient) Delete(container *Setting) error { + return c.apiClient.Ops.DoResourceDelete(SettingType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_shibboleth_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_shibboleth_config.go new file mode 100644 index 000000000..8ab4b89af --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_shibboleth_config.go @@ -0,0 +1,54 @@ +package client + +const ( + ShibbolethConfigType = "shibbolethConfig" + ShibbolethConfigFieldAccessMode = "accessMode" + ShibbolethConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" + ShibbolethConfigFieldAnnotations = "annotations" + ShibbolethConfigFieldCreated = "created" + ShibbolethConfigFieldCreatorID = "creatorId" + ShibbolethConfigFieldDisplayNameField = "displayNameField" + ShibbolethConfigFieldEnabled = "enabled" + ShibbolethConfigFieldEntityID = "entityID" + ShibbolethConfigFieldGroupsField = "groupsField" + ShibbolethConfigFieldIDPMetadataContent = "idpMetadataContent" + ShibbolethConfigFieldLabels = "labels" + ShibbolethConfigFieldName = "name" + ShibbolethConfigFieldOpenLdapConfig = "openLdapConfig" + ShibbolethConfigFieldOwnerReferences = "ownerReferences" + ShibbolethConfigFieldRancherAPIHost = "rancherApiHost" + ShibbolethConfigFieldRemoved = "removed" + ShibbolethConfigFieldSpCert = "spCert" + ShibbolethConfigFieldSpKey = "spKey" + ShibbolethConfigFieldStatus = "status" + ShibbolethConfigFieldType = "type" + ShibbolethConfigFieldUIDField = "uidField" + ShibbolethConfigFieldUUID = "uuid" + ShibbolethConfigFieldUserNameField = "userNameField" +) + +type ShibbolethConfig struct { + AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + DisplayNameField string `json:"displayNameField,omitempty" yaml:"displayNameField,omitempty"` + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + EntityID string `json:"entityID,omitempty" yaml:"entityID,omitempty"` + GroupsField string `json:"groupsField,omitempty" yaml:"groupsField,omitempty"` + IDPMetadataContent string `json:"idpMetadataContent,omitempty" yaml:"idpMetadataContent,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OpenLdapConfig *LdapFields `json:"openLdapConfig,omitempty" yaml:"openLdapConfig,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + RancherAPIHost string `json:"rancherApiHost,omitempty" yaml:"rancherApiHost,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + SpCert string `json:"spCert,omitempty" yaml:"spCert,omitempty"` + SpKey string `json:"spKey,omitempty" yaml:"spKey,omitempty"` + Status *AuthConfigStatus `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + UIDField string `json:"uidField,omitempty" yaml:"uidField,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserNameField string `json:"userNameField,omitempty" yaml:"userNameField,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_storage_osvolume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_storage_osvolume_source.go new file mode 100644 index 000000000..46dc40fd3 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_storage_osvolume_source.go @@ -0,0 +1,18 @@ +package client + +const ( + StorageOSVolumeSourceType = "storageOSVolumeSource" + StorageOSVolumeSourceFieldFSType = "fsType" + StorageOSVolumeSourceFieldReadOnly = "readOnly" + StorageOSVolumeSourceFieldSecretRef = "secretRef" + StorageOSVolumeSourceFieldVolumeName = "volumeName" + StorageOSVolumeSourceFieldVolumeNamespace = "volumeNamespace" +) + +type StorageOSVolumeSource struct { + FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"` + ReadOnly bool `json:"readOnly,omitempty" yaml:"readOnly,omitempty"` + SecretRef *LocalObjectReference `json:"secretRef,omitempty" yaml:"secretRef,omitempty"` + VolumeName string `json:"volumeName,omitempty" yaml:"volumeName,omitempty"` + VolumeNamespace string `json:"volumeNamespace,omitempty" yaml:"volumeNamespace,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_sub_question.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_sub_question.go new file mode 100644 index 000000000..f0a47e0a3 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_sub_question.go @@ -0,0 +1,40 @@ +package client + +const ( + SubQuestionType = "subQuestion" + SubQuestionFieldDefault = "default" + SubQuestionFieldDescription = "description" + SubQuestionFieldGroup = "group" + SubQuestionFieldInvalidChars = "invalidChars" + SubQuestionFieldLabel = "label" + SubQuestionFieldMax = "max" + SubQuestionFieldMaxLength = "maxLength" + SubQuestionFieldMin = "min" + SubQuestionFieldMinLength = "minLength" + SubQuestionFieldOptions = "options" + SubQuestionFieldRequired = "required" + SubQuestionFieldSatisfies = "satisfies" + SubQuestionFieldShowIf = "showIf" + SubQuestionFieldType = "type" + SubQuestionFieldValidChars = "validChars" + SubQuestionFieldVariable = "variable" +) + +type SubQuestion struct { + Default string `json:"default,omitempty" yaml:"default,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + Group string `json:"group,omitempty" yaml:"group,omitempty"` + InvalidChars string `json:"invalidChars,omitempty" yaml:"invalidChars,omitempty"` + Label string `json:"label,omitempty" yaml:"label,omitempty"` + Max int64 `json:"max,omitempty" yaml:"max,omitempty"` + MaxLength int64 `json:"maxLength,omitempty" yaml:"maxLength,omitempty"` + Min int64 `json:"min,omitempty" yaml:"min,omitempty"` + MinLength int64 `json:"minLength,omitempty" yaml:"minLength,omitempty"` + Options []string `json:"options,omitempty" yaml:"options,omitempty"` + Required bool `json:"required,omitempty" yaml:"required,omitempty"` + Satisfies string `json:"satisfies,omitempty" yaml:"satisfies,omitempty"` + ShowIf string `json:"showIf,omitempty" yaml:"showIf,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` + ValidChars string `json:"validChars,omitempty" yaml:"validChars,omitempty"` + Variable string `json:"variable,omitempty" yaml:"variable,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_taint.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_taint.go new file mode 100644 index 000000000..cec2b5ff7 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_taint.go @@ -0,0 +1,16 @@ +package client + +const ( + TaintType = "taint" + TaintFieldEffect = "effect" + TaintFieldKey = "key" + TaintFieldTimeAdded = "timeAdded" + TaintFieldValue = "value" +) + +type Taint struct { + Effect string `json:"effect,omitempty" yaml:"effect,omitempty"` + Key string `json:"key,omitempty" yaml:"key,omitempty"` + TimeAdded string `json:"timeAdded,omitempty" yaml:"timeAdded,omitempty"` + Value string `json:"value,omitempty" yaml:"value,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_target.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_target.go new file mode 100644 index 000000000..cd8d72820 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_target.go @@ -0,0 +1,16 @@ +package client + +const ( + TargetType = "target" + TargetFieldAppID = "appId" + TargetFieldHealthstate = "healthState" + TargetFieldProjectID = "projectId" + TargetFieldState = "state" +) + +type Target struct { + AppID string `json:"appId,omitempty" yaml:"appId,omitempty"` + Healthstate string `json:"healthState,omitempty" yaml:"healthState,omitempty"` + ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template.go new file mode 100644 index 000000000..9b1556300 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template.go @@ -0,0 +1,166 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + TemplateType = "template" + TemplateFieldAnnotations = "annotations" + TemplateFieldCatalogID = "catalogId" + TemplateFieldCategories = "categories" + TemplateFieldCategory = "category" + TemplateFieldClusterCatalogID = "clusterCatalogId" + TemplateFieldClusterID = "clusterId" + TemplateFieldCreated = "created" + TemplateFieldCreatorID = "creatorId" + TemplateFieldDefaultTemplateVersionID = "defaultTemplateVersionId" + TemplateFieldDefaultVersion = "defaultVersion" + TemplateFieldDescription = "description" + TemplateFieldFolderName = "folderName" + TemplateFieldIcon = "icon" + TemplateFieldIconFilename = "iconFilename" + TemplateFieldLabels = "labels" + TemplateFieldMaintainer = "maintainer" + TemplateFieldName = "name" + TemplateFieldOwnerReferences = "ownerReferences" + TemplateFieldPath = "path" + TemplateFieldProjectCatalogID = "projectCatalogId" + TemplateFieldProjectID = "projectId" + TemplateFieldProjectURL = "projectURL" + TemplateFieldReadme = "readme" + TemplateFieldRemoved = "removed" + TemplateFieldState = "state" + TemplateFieldStatus = "status" + TemplateFieldTransitioning = "transitioning" + TemplateFieldTransitioningMessage = "transitioningMessage" + TemplateFieldUUID = "uuid" + TemplateFieldUpgradeFrom = "upgradeFrom" + TemplateFieldVersionLinks = "versionLinks" + TemplateFieldVersions = "versions" +) + +type Template struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + CatalogID string `json:"catalogId,omitempty" yaml:"catalogId,omitempty"` + Categories []string `json:"categories,omitempty" yaml:"categories,omitempty"` + Category string `json:"category,omitempty" yaml:"category,omitempty"` + ClusterCatalogID string `json:"clusterCatalogId,omitempty" yaml:"clusterCatalogId,omitempty"` + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + DefaultTemplateVersionID string `json:"defaultTemplateVersionId,omitempty" yaml:"defaultTemplateVersionId,omitempty"` + DefaultVersion string `json:"defaultVersion,omitempty" yaml:"defaultVersion,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + FolderName string `json:"folderName,omitempty" yaml:"folderName,omitempty"` + Icon string `json:"icon,omitempty" yaml:"icon,omitempty"` + IconFilename string `json:"iconFilename,omitempty" yaml:"iconFilename,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Maintainer string `json:"maintainer,omitempty" yaml:"maintainer,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` + ProjectCatalogID string `json:"projectCatalogId,omitempty" yaml:"projectCatalogId,omitempty"` + ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"` + ProjectURL string `json:"projectURL,omitempty" yaml:"projectURL,omitempty"` + Readme string `json:"readme,omitempty" yaml:"readme,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Status *TemplateStatus `json:"status,omitempty" yaml:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UpgradeFrom string `json:"upgradeFrom,omitempty" yaml:"upgradeFrom,omitempty"` + VersionLinks map[string]string `json:"versionLinks,omitempty" yaml:"versionLinks,omitempty"` + Versions []TemplateVersionSpec `json:"versions,omitempty" yaml:"versions,omitempty"` +} + +type TemplateCollection struct { + types.Collection + Data []Template `json:"data,omitempty"` + client *TemplateClient +} + +type TemplateClient struct { + apiClient *Client +} + +type TemplateOperations interface { + List(opts *types.ListOpts) (*TemplateCollection, error) + ListAll(opts *types.ListOpts) (*TemplateCollection, error) + Create(opts *Template) (*Template, error) + Update(existing *Template, updates interface{}) (*Template, error) + Replace(existing *Template) (*Template, error) + ByID(id string) (*Template, error) + Delete(container *Template) error +} + +func newTemplateClient(apiClient *Client) *TemplateClient { + return &TemplateClient{ + apiClient: apiClient, + } +} + +func (c *TemplateClient) Create(container *Template) (*Template, error) { + resp := &Template{} + err := c.apiClient.Ops.DoCreate(TemplateType, container, resp) + return resp, err +} + +func (c *TemplateClient) Update(existing *Template, updates interface{}) (*Template, error) { + resp := &Template{} + err := c.apiClient.Ops.DoUpdate(TemplateType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *TemplateClient) Replace(obj *Template) (*Template, error) { + resp := &Template{} + err := c.apiClient.Ops.DoReplace(TemplateType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *TemplateClient) List(opts *types.ListOpts) (*TemplateCollection, error) { + resp := &TemplateCollection{} + err := c.apiClient.Ops.DoList(TemplateType, opts, resp) + resp.client = c + return resp, err +} + +func (c *TemplateClient) ListAll(opts *types.ListOpts) (*TemplateCollection, error) { + resp := &TemplateCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *TemplateCollection) Next() (*TemplateCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &TemplateCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *TemplateClient) ByID(id string) (*Template, error) { + resp := &Template{} + err := c.apiClient.Ops.DoByID(TemplateType, id, resp) + return resp, err +} + +func (c *TemplateClient) Delete(container *Template) error { + return c.apiClient.Ops.DoResourceDelete(TemplateType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_content.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_content.go new file mode 100644 index 000000000..14061ba7b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_content.go @@ -0,0 +1,120 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + TemplateContentType = "templateContent" + TemplateContentFieldAnnotations = "annotations" + TemplateContentFieldCreated = "created" + TemplateContentFieldCreatorID = "creatorId" + TemplateContentFieldData = "data" + TemplateContentFieldLabels = "labels" + TemplateContentFieldName = "name" + TemplateContentFieldOwnerReferences = "ownerReferences" + TemplateContentFieldRemoved = "removed" + TemplateContentFieldUUID = "uuid" +) + +type TemplateContent struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Data string `json:"data,omitempty" yaml:"data,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type TemplateContentCollection struct { + types.Collection + Data []TemplateContent `json:"data,omitempty"` + client *TemplateContentClient +} + +type TemplateContentClient struct { + apiClient *Client +} + +type TemplateContentOperations interface { + List(opts *types.ListOpts) (*TemplateContentCollection, error) + ListAll(opts *types.ListOpts) (*TemplateContentCollection, error) + Create(opts *TemplateContent) (*TemplateContent, error) + Update(existing *TemplateContent, updates interface{}) (*TemplateContent, error) + Replace(existing *TemplateContent) (*TemplateContent, error) + ByID(id string) (*TemplateContent, error) + Delete(container *TemplateContent) error +} + +func newTemplateContentClient(apiClient *Client) *TemplateContentClient { + return &TemplateContentClient{ + apiClient: apiClient, + } +} + +func (c *TemplateContentClient) Create(container *TemplateContent) (*TemplateContent, error) { + resp := &TemplateContent{} + err := c.apiClient.Ops.DoCreate(TemplateContentType, container, resp) + return resp, err +} + +func (c *TemplateContentClient) Update(existing *TemplateContent, updates interface{}) (*TemplateContent, error) { + resp := &TemplateContent{} + err := c.apiClient.Ops.DoUpdate(TemplateContentType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *TemplateContentClient) Replace(obj *TemplateContent) (*TemplateContent, error) { + resp := &TemplateContent{} + err := c.apiClient.Ops.DoReplace(TemplateContentType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *TemplateContentClient) List(opts *types.ListOpts) (*TemplateContentCollection, error) { + resp := &TemplateContentCollection{} + err := c.apiClient.Ops.DoList(TemplateContentType, opts, resp) + resp.client = c + return resp, err +} + +func (c *TemplateContentClient) ListAll(opts *types.ListOpts) (*TemplateContentCollection, error) { + resp := &TemplateContentCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *TemplateContentCollection) Next() (*TemplateContentCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &TemplateContentCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *TemplateContentClient) ByID(id string) (*TemplateContent, error) { + resp := &TemplateContent{} + err := c.apiClient.Ops.DoByID(TemplateContentType, id, resp) + return resp, err +} + +func (c *TemplateContentClient) Delete(container *TemplateContent) error { + return c.apiClient.Ops.DoResourceDelete(TemplateContentType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_spec.go new file mode 100644 index 000000000..dbce148ad --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_spec.go @@ -0,0 +1,48 @@ +package client + +const ( + TemplateSpecType = "templateSpec" + TemplateSpecFieldCatalogID = "catalogId" + TemplateSpecFieldCategories = "categories" + TemplateSpecFieldCategory = "category" + TemplateSpecFieldClusterCatalogID = "clusterCatalogId" + TemplateSpecFieldClusterID = "clusterId" + TemplateSpecFieldDefaultTemplateVersionID = "defaultTemplateVersionId" + TemplateSpecFieldDefaultVersion = "defaultVersion" + TemplateSpecFieldDescription = "description" + TemplateSpecFieldDisplayName = "displayName" + TemplateSpecFieldFolderName = "folderName" + TemplateSpecFieldIcon = "icon" + TemplateSpecFieldIconFilename = "iconFilename" + TemplateSpecFieldMaintainer = "maintainer" + TemplateSpecFieldPath = "path" + TemplateSpecFieldProjectCatalogID = "projectCatalogId" + TemplateSpecFieldProjectID = "projectId" + TemplateSpecFieldProjectURL = "projectURL" + TemplateSpecFieldReadme = "readme" + TemplateSpecFieldUpgradeFrom = "upgradeFrom" + TemplateSpecFieldVersions = "versions" +) + +type TemplateSpec struct { + CatalogID string `json:"catalogId,omitempty" yaml:"catalogId,omitempty"` + Categories []string `json:"categories,omitempty" yaml:"categories,omitempty"` + Category string `json:"category,omitempty" yaml:"category,omitempty"` + ClusterCatalogID string `json:"clusterCatalogId,omitempty" yaml:"clusterCatalogId,omitempty"` + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + DefaultTemplateVersionID string `json:"defaultTemplateVersionId,omitempty" yaml:"defaultTemplateVersionId,omitempty"` + DefaultVersion string `json:"defaultVersion,omitempty" yaml:"defaultVersion,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + DisplayName string `json:"displayName,omitempty" yaml:"displayName,omitempty"` + FolderName string `json:"folderName,omitempty" yaml:"folderName,omitempty"` + Icon string `json:"icon,omitempty" yaml:"icon,omitempty"` + IconFilename string `json:"iconFilename,omitempty" yaml:"iconFilename,omitempty"` + Maintainer string `json:"maintainer,omitempty" yaml:"maintainer,omitempty"` + Path string `json:"path,omitempty" yaml:"path,omitempty"` + ProjectCatalogID string `json:"projectCatalogId,omitempty" yaml:"projectCatalogId,omitempty"` + ProjectID string `json:"projectId,omitempty" yaml:"projectId,omitempty"` + ProjectURL string `json:"projectURL,omitempty" yaml:"projectURL,omitempty"` + Readme string `json:"readme,omitempty" yaml:"readme,omitempty"` + UpgradeFrom string `json:"upgradeFrom,omitempty" yaml:"upgradeFrom,omitempty"` + Versions []TemplateVersionSpec `json:"versions,omitempty" yaml:"versions,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_status.go new file mode 100644 index 000000000..573947c56 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_status.go @@ -0,0 +1,10 @@ +package client + +const ( + TemplateStatusType = "templateStatus" + TemplateStatusFieldHelmVersion = "helmVersion" +) + +type TemplateStatus struct { + HelmVersion string `json:"helmVersion,omitempty" yaml:"helmVersion,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_version.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_version.go new file mode 100644 index 000000000..f981e2c84 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_version.go @@ -0,0 +1,158 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + TemplateVersionType = "templateVersion" + TemplateVersionFieldAnnotations = "annotations" + TemplateVersionFieldAppReadme = "appReadme" + TemplateVersionFieldCreated = "created" + TemplateVersionFieldCreatorID = "creatorId" + TemplateVersionFieldDigest = "digest" + TemplateVersionFieldExternalID = "externalId" + TemplateVersionFieldFiles = "files" + TemplateVersionFieldKubeVersion = "kubeVersion" + TemplateVersionFieldLabels = "labels" + TemplateVersionFieldName = "name" + TemplateVersionFieldOwnerReferences = "ownerReferences" + TemplateVersionFieldQuestions = "questions" + TemplateVersionFieldRancherMaxVersion = "rancherMaxVersion" + TemplateVersionFieldRancherMinVersion = "rancherMinVersion" + TemplateVersionFieldRancherVersion = "rancherVersion" + TemplateVersionFieldReadme = "readme" + TemplateVersionFieldRemoved = "removed" + TemplateVersionFieldRequiredNamespace = "requiredNamespace" + TemplateVersionFieldState = "state" + TemplateVersionFieldStatus = "status" + TemplateVersionFieldTransitioning = "transitioning" + TemplateVersionFieldTransitioningMessage = "transitioningMessage" + TemplateVersionFieldUUID = "uuid" + TemplateVersionFieldUpgradeVersionLinks = "upgradeVersionLinks" + TemplateVersionFieldVersion = "version" + TemplateVersionFieldVersionDir = "versionDir" + TemplateVersionFieldVersionName = "versionName" + TemplateVersionFieldVersionURLs = "versionUrls" +) + +type TemplateVersion struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + AppReadme string `json:"appReadme,omitempty" yaml:"appReadme,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Digest string `json:"digest,omitempty" yaml:"digest,omitempty"` + ExternalID string `json:"externalId,omitempty" yaml:"externalId,omitempty"` + Files map[string]string `json:"files,omitempty" yaml:"files,omitempty"` + KubeVersion string `json:"kubeVersion,omitempty" yaml:"kubeVersion,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Questions []Question `json:"questions,omitempty" yaml:"questions,omitempty"` + RancherMaxVersion string `json:"rancherMaxVersion,omitempty" yaml:"rancherMaxVersion,omitempty"` + RancherMinVersion string `json:"rancherMinVersion,omitempty" yaml:"rancherMinVersion,omitempty"` + RancherVersion string `json:"rancherVersion,omitempty" yaml:"rancherVersion,omitempty"` + Readme string `json:"readme,omitempty" yaml:"readme,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + RequiredNamespace string `json:"requiredNamespace,omitempty" yaml:"requiredNamespace,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Status *TemplateVersionStatus `json:"status,omitempty" yaml:"status,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UpgradeVersionLinks map[string]string `json:"upgradeVersionLinks,omitempty" yaml:"upgradeVersionLinks,omitempty"` + Version string `json:"version,omitempty" yaml:"version,omitempty"` + VersionDir string `json:"versionDir,omitempty" yaml:"versionDir,omitempty"` + VersionName string `json:"versionName,omitempty" yaml:"versionName,omitempty"` + VersionURLs []string `json:"versionUrls,omitempty" yaml:"versionUrls,omitempty"` +} + +type TemplateVersionCollection struct { + types.Collection + Data []TemplateVersion `json:"data,omitempty"` + client *TemplateVersionClient +} + +type TemplateVersionClient struct { + apiClient *Client +} + +type TemplateVersionOperations interface { + List(opts *types.ListOpts) (*TemplateVersionCollection, error) + ListAll(opts *types.ListOpts) (*TemplateVersionCollection, error) + Create(opts *TemplateVersion) (*TemplateVersion, error) + Update(existing *TemplateVersion, updates interface{}) (*TemplateVersion, error) + Replace(existing *TemplateVersion) (*TemplateVersion, error) + ByID(id string) (*TemplateVersion, error) + Delete(container *TemplateVersion) error +} + +func newTemplateVersionClient(apiClient *Client) *TemplateVersionClient { + return &TemplateVersionClient{ + apiClient: apiClient, + } +} + +func (c *TemplateVersionClient) Create(container *TemplateVersion) (*TemplateVersion, error) { + resp := &TemplateVersion{} + err := c.apiClient.Ops.DoCreate(TemplateVersionType, container, resp) + return resp, err +} + +func (c *TemplateVersionClient) Update(existing *TemplateVersion, updates interface{}) (*TemplateVersion, error) { + resp := &TemplateVersion{} + err := c.apiClient.Ops.DoUpdate(TemplateVersionType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *TemplateVersionClient) Replace(obj *TemplateVersion) (*TemplateVersion, error) { + resp := &TemplateVersion{} + err := c.apiClient.Ops.DoReplace(TemplateVersionType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *TemplateVersionClient) List(opts *types.ListOpts) (*TemplateVersionCollection, error) { + resp := &TemplateVersionCollection{} + err := c.apiClient.Ops.DoList(TemplateVersionType, opts, resp) + resp.client = c + return resp, err +} + +func (c *TemplateVersionClient) ListAll(opts *types.ListOpts) (*TemplateVersionCollection, error) { + resp := &TemplateVersionCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *TemplateVersionCollection) Next() (*TemplateVersionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &TemplateVersionCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *TemplateVersionClient) ByID(id string) (*TemplateVersion, error) { + resp := &TemplateVersion{} + err := c.apiClient.Ops.DoByID(TemplateVersionType, id, resp) + return resp, err +} + +func (c *TemplateVersionClient) Delete(container *TemplateVersion) error { + return c.apiClient.Ops.DoResourceDelete(TemplateVersionType, &container.Resource) +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_version_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_version_spec.go new file mode 100644 index 000000000..ba9dd9fe5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_version_spec.go @@ -0,0 +1,40 @@ +package client + +const ( + TemplateVersionSpecType = "templateVersionSpec" + TemplateVersionSpecFieldAppReadme = "appReadme" + TemplateVersionSpecFieldDigest = "digest" + TemplateVersionSpecFieldExternalID = "externalId" + TemplateVersionSpecFieldFiles = "files" + TemplateVersionSpecFieldKubeVersion = "kubeVersion" + TemplateVersionSpecFieldQuestions = "questions" + TemplateVersionSpecFieldRancherMaxVersion = "rancherMaxVersion" + TemplateVersionSpecFieldRancherMinVersion = "rancherMinVersion" + TemplateVersionSpecFieldRancherVersion = "rancherVersion" + TemplateVersionSpecFieldReadme = "readme" + TemplateVersionSpecFieldRequiredNamespace = "requiredNamespace" + TemplateVersionSpecFieldUpgradeVersionLinks = "upgradeVersionLinks" + TemplateVersionSpecFieldVersion = "version" + TemplateVersionSpecFieldVersionDir = "versionDir" + TemplateVersionSpecFieldVersionName = "versionName" + TemplateVersionSpecFieldVersionURLs = "versionUrls" +) + +type TemplateVersionSpec struct { + AppReadme string `json:"appReadme,omitempty" yaml:"appReadme,omitempty"` + Digest string `json:"digest,omitempty" yaml:"digest,omitempty"` + ExternalID string `json:"externalId,omitempty" yaml:"externalId,omitempty"` + Files map[string]string `json:"files,omitempty" yaml:"files,omitempty"` + KubeVersion string `json:"kubeVersion,omitempty" yaml:"kubeVersion,omitempty"` + Questions []Question `json:"questions,omitempty" yaml:"questions,omitempty"` + RancherMaxVersion string `json:"rancherMaxVersion,omitempty" yaml:"rancherMaxVersion,omitempty"` + RancherMinVersion string `json:"rancherMinVersion,omitempty" yaml:"rancherMinVersion,omitempty"` + RancherVersion string `json:"rancherVersion,omitempty" yaml:"rancherVersion,omitempty"` + Readme string `json:"readme,omitempty" yaml:"readme,omitempty"` + RequiredNamespace string `json:"requiredNamespace,omitempty" yaml:"requiredNamespace,omitempty"` + UpgradeVersionLinks map[string]string `json:"upgradeVersionLinks,omitempty" yaml:"upgradeVersionLinks,omitempty"` + Version string `json:"version,omitempty" yaml:"version,omitempty"` + VersionDir string `json:"versionDir,omitempty" yaml:"versionDir,omitempty"` + VersionName string `json:"versionName,omitempty" yaml:"versionName,omitempty"` + VersionURLs []string `json:"versionUrls,omitempty" yaml:"versionUrls,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_version_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_version_status.go new file mode 100644 index 000000000..ea736ff6c --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_template_version_status.go @@ -0,0 +1,10 @@ +package client + +const ( + TemplateVersionStatusType = "templateVersionStatus" + TemplateVersionStatusFieldHelmVersion = "helmVersion" +) + +type TemplateVersionStatus struct { + HelmVersion string `json:"helmVersion,omitempty" yaml:"helmVersion,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_token.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_token.go new file mode 100644 index 000000000..40c591dd0 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_token.go @@ -0,0 +1,155 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + TokenType = "token" + TokenFieldAnnotations = "annotations" + TokenFieldAuthProvider = "authProvider" + TokenFieldClusterID = "clusterId" + TokenFieldCreated = "created" + TokenFieldCreatorID = "creatorId" + TokenFieldCurrent = "current" + TokenFieldDescription = "description" + TokenFieldEnabled = "enabled" + TokenFieldExpired = "expired" + TokenFieldExpiresAt = "expiresAt" + TokenFieldGroupPrincipals = "groupPrincipals" + TokenFieldIsDerived = "isDerived" + TokenFieldLabels = "labels" + TokenFieldLastUpdateTime = "lastUpdateTime" + TokenFieldName = "name" + TokenFieldOwnerReferences = "ownerReferences" + TokenFieldProviderInfo = "providerInfo" + TokenFieldRemoved = "removed" + TokenFieldTTLMillis = "ttl" + TokenFieldToken = "token" + TokenFieldUUID = "uuid" + TokenFieldUserID = "userId" + TokenFieldUserPrincipal = "userPrincipal" +) + +type Token struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + AuthProvider string `json:"authProvider,omitempty" yaml:"authProvider,omitempty"` + ClusterID string `json:"clusterId,omitempty" yaml:"clusterId,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Current bool `json:"current,omitempty" yaml:"current,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + Expired bool `json:"expired,omitempty" yaml:"expired,omitempty"` + ExpiresAt string `json:"expiresAt,omitempty" yaml:"expiresAt,omitempty"` + GroupPrincipals []string `json:"groupPrincipals,omitempty" yaml:"groupPrincipals,omitempty"` + IsDerived bool `json:"isDerived,omitempty" yaml:"isDerived,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + LastUpdateTime string `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + ProviderInfo map[string]string `json:"providerInfo,omitempty" yaml:"providerInfo,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + TTLMillis int64 `json:"ttl,omitempty" yaml:"ttl,omitempty"` + Token string `json:"token,omitempty" yaml:"token,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserID string `json:"userId,omitempty" yaml:"userId,omitempty"` + UserPrincipal string `json:"userPrincipal,omitempty" yaml:"userPrincipal,omitempty"` +} + +type TokenCollection struct { + types.Collection + Data []Token `json:"data,omitempty"` + client *TokenClient +} + +type TokenClient struct { + apiClient *Client +} + +type TokenOperations interface { + List(opts *types.ListOpts) (*TokenCollection, error) + ListAll(opts *types.ListOpts) (*TokenCollection, error) + Create(opts *Token) (*Token, error) + Update(existing *Token, updates interface{}) (*Token, error) + Replace(existing *Token) (*Token, error) + ByID(id string) (*Token, error) + Delete(container *Token) error + + CollectionActionLogout(resource *TokenCollection) error +} + +func newTokenClient(apiClient *Client) *TokenClient { + return &TokenClient{ + apiClient: apiClient, + } +} + +func (c *TokenClient) Create(container *Token) (*Token, error) { + resp := &Token{} + err := c.apiClient.Ops.DoCreate(TokenType, container, resp) + return resp, err +} + +func (c *TokenClient) Update(existing *Token, updates interface{}) (*Token, error) { + resp := &Token{} + err := c.apiClient.Ops.DoUpdate(TokenType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *TokenClient) Replace(obj *Token) (*Token, error) { + resp := &Token{} + err := c.apiClient.Ops.DoReplace(TokenType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *TokenClient) List(opts *types.ListOpts) (*TokenCollection, error) { + resp := &TokenCollection{} + err := c.apiClient.Ops.DoList(TokenType, opts, resp) + resp.client = c + return resp, err +} + +func (c *TokenClient) ListAll(opts *types.ListOpts) (*TokenCollection, error) { + resp := &TokenCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *TokenCollection) Next() (*TokenCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &TokenCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *TokenClient) ByID(id string) (*Token, error) { + resp := &Token{} + err := c.apiClient.Ops.DoByID(TokenType, id, resp) + return resp, err +} + +func (c *TokenClient) Delete(container *Token) error { + return c.apiClient.Ops.DoResourceDelete(TokenType, &container.Resource) +} + +func (c *TokenClient) CollectionActionLogout(resource *TokenCollection) error { + err := c.apiClient.Ops.DoCollectionAction(TokenType, "logout", &resource.Collection, nil, nil) + return err +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_toleration.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_toleration.go new file mode 100644 index 000000000..eabdd9d9b --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_toleration.go @@ -0,0 +1,18 @@ +package client + +const ( + TolerationType = "toleration" + TolerationFieldEffect = "effect" + TolerationFieldKey = "key" + TolerationFieldOperator = "operator" + TolerationFieldTolerationSeconds = "tolerationSeconds" + TolerationFieldValue = "value" +) + +type Toleration struct { + Effect string `json:"effect,omitempty" yaml:"effect,omitempty"` + Key string `json:"key,omitempty" yaml:"key,omitempty"` + Operator string `json:"operator,omitempty" yaml:"operator,omitempty"` + TolerationSeconds *int64 `json:"tolerationSeconds,omitempty" yaml:"tolerationSeconds,omitempty"` + Value string `json:"value,omitempty" yaml:"value,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_typed_local_object_reference.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_typed_local_object_reference.go new file mode 100644 index 000000000..0de2ebea0 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_typed_local_object_reference.go @@ -0,0 +1,14 @@ +package client + +const ( + TypedLocalObjectReferenceType = "typedLocalObjectReference" + TypedLocalObjectReferenceFieldAPIGroup = "apiGroup" + TypedLocalObjectReferenceFieldKind = "kind" + TypedLocalObjectReferenceFieldName = "name" +) + +type TypedLocalObjectReference struct { + APIGroup string `json:"apiGroup,omitempty" yaml:"apiGroup,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_typed_object_reference.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_typed_object_reference.go new file mode 100644 index 000000000..d60df80ad --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_typed_object_reference.go @@ -0,0 +1,16 @@ +package client + +const ( + TypedObjectReferenceType = "typedObjectReference" + TypedObjectReferenceFieldAPIGroup = "apiGroup" + TypedObjectReferenceFieldKind = "kind" + TypedObjectReferenceFieldName = "name" + TypedObjectReferenceFieldNamespace = "namespace" +) + +type TypedObjectReference struct { + APIGroup string `json:"apiGroup,omitempty" yaml:"apiGroup,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_update_global_dnstargets_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_update_global_dnstargets_input.go new file mode 100644 index 000000000..5aec4f78e --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_update_global_dnstargets_input.go @@ -0,0 +1,10 @@ +package client + +const ( + UpdateGlobalDNSTargetsInputType = "updateGlobalDNSTargetsInput" + UpdateGlobalDNSTargetsInputFieldProjectIDs = "projectIds" +) + +type UpdateGlobalDNSTargetsInput struct { + ProjectIDs []string `json:"projectIds,omitempty" yaml:"projectIds,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_update_multi_cluster_app_targets_input.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_update_multi_cluster_app_targets_input.go new file mode 100644 index 000000000..8ccaf6a12 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_update_multi_cluster_app_targets_input.go @@ -0,0 +1,12 @@ +package client + +const ( + UpdateMultiClusterAppTargetsInputType = "updateMultiClusterAppTargetsInput" + UpdateMultiClusterAppTargetsInputFieldAnswers = "answers" + UpdateMultiClusterAppTargetsInputFieldProjects = "projects" +) + +type UpdateMultiClusterAppTargetsInput struct { + Answers []Answer `json:"answers,omitempty" yaml:"answers,omitempty"` + Projects []string `json:"projects,omitempty" yaml:"projects,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_upgrade_strategy.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_upgrade_strategy.go new file mode 100644 index 000000000..1bd375c9c --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_upgrade_strategy.go @@ -0,0 +1,10 @@ +package client + +const ( + UpgradeStrategyType = "upgradeStrategy" + UpgradeStrategyFieldRollingUpdate = "rollingUpdate" +) + +type UpgradeStrategy struct { + RollingUpdate *RollingUpdate `json:"rollingUpdate,omitempty" yaml:"rollingUpdate,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user.go new file mode 100644 index 000000000..454a2965a --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user.go @@ -0,0 +1,169 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + UserType = "user" + UserFieldAnnotations = "annotations" + UserFieldConditions = "conditions" + UserFieldCreated = "created" + UserFieldCreatorID = "creatorId" + UserFieldDescription = "description" + UserFieldEnabled = "enabled" + UserFieldLabels = "labels" + UserFieldMe = "me" + UserFieldMustChangePassword = "mustChangePassword" + UserFieldName = "name" + UserFieldOwnerReferences = "ownerReferences" + UserFieldPassword = "password" + UserFieldPrincipalIDs = "principalIds" + UserFieldRemoved = "removed" + UserFieldState = "state" + UserFieldTransitioning = "transitioning" + UserFieldTransitioningMessage = "transitioningMessage" + UserFieldUUID = "uuid" + UserFieldUsername = "username" +) + +type User struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Conditions []UserCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Description string `json:"description,omitempty" yaml:"description,omitempty"` + Enabled *bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Me bool `json:"me,omitempty" yaml:"me,omitempty"` + MustChangePassword bool `json:"mustChangePassword,omitempty" yaml:"mustChangePassword,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Password string `json:"password,omitempty" yaml:"password,omitempty"` + PrincipalIDs []string `json:"principalIds,omitempty" yaml:"principalIds,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioningMessage,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + Username string `json:"username,omitempty" yaml:"username,omitempty"` +} + +type UserCollection struct { + types.Collection + Data []User `json:"data,omitempty"` + client *UserClient +} + +type UserClient struct { + apiClient *Client +} + +type UserOperations interface { + List(opts *types.ListOpts) (*UserCollection, error) + ListAll(opts *types.ListOpts) (*UserCollection, error) + Create(opts *User) (*User, error) + Update(existing *User, updates interface{}) (*User, error) + Replace(existing *User) (*User, error) + ByID(id string) (*User, error) + Delete(container *User) error + + ActionRefreshauthprovideraccess(resource *User) error + + ActionSetpassword(resource *User, input *SetPasswordInput) (*User, error) + + CollectionActionChangepassword(resource *UserCollection, input *ChangePasswordInput) error + + CollectionActionRefreshauthprovideraccess(resource *UserCollection) error +} + +func newUserClient(apiClient *Client) *UserClient { + return &UserClient{ + apiClient: apiClient, + } +} + +func (c *UserClient) Create(container *User) (*User, error) { + resp := &User{} + err := c.apiClient.Ops.DoCreate(UserType, container, resp) + return resp, err +} + +func (c *UserClient) Update(existing *User, updates interface{}) (*User, error) { + resp := &User{} + err := c.apiClient.Ops.DoUpdate(UserType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *UserClient) Replace(obj *User) (*User, error) { + resp := &User{} + err := c.apiClient.Ops.DoReplace(UserType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *UserClient) List(opts *types.ListOpts) (*UserCollection, error) { + resp := &UserCollection{} + err := c.apiClient.Ops.DoList(UserType, opts, resp) + resp.client = c + return resp, err +} + +func (c *UserClient) ListAll(opts *types.ListOpts) (*UserCollection, error) { + resp := &UserCollection{} + resp, err := c.List(opts) + if err != nil { + return resp, err + } + data := resp.Data + for next, err := resp.Next(); next != nil && err == nil; next, err = next.Next() { + data = append(data, next.Data...) + resp = next + resp.Data = data + } + if err != nil { + return resp, err + } + return resp, err +} + +func (cc *UserCollection) Next() (*UserCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &UserCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *UserClient) ByID(id string) (*User, error) { + resp := &User{} + err := c.apiClient.Ops.DoByID(UserType, id, resp) + return resp, err +} + +func (c *UserClient) Delete(container *User) error { + return c.apiClient.Ops.DoResourceDelete(UserType, &container.Resource) +} + +func (c *UserClient) ActionRefreshauthprovideraccess(resource *User) error { + err := c.apiClient.Ops.DoAction(UserType, "refreshauthprovideraccess", &resource.Resource, nil, nil) + return err +} + +func (c *UserClient) ActionSetpassword(resource *User, input *SetPasswordInput) (*User, error) { + resp := &User{} + err := c.apiClient.Ops.DoAction(UserType, "setpassword", &resource.Resource, input, resp) + return resp, err +} + +func (c *UserClient) CollectionActionChangepassword(resource *UserCollection, input *ChangePasswordInput) error { + err := c.apiClient.Ops.DoCollectionAction(UserType, "changepassword", &resource.Collection, input, nil) + return err +} + +func (c *UserClient) CollectionActionRefreshauthprovideraccess(resource *UserCollection) error { + err := c.apiClient.Ops.DoCollectionAction(UserType, "refreshauthprovideraccess", &resource.Collection, nil, nil) + return err +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_attribute.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_attribute.go new file mode 100644 index 000000000..16ce8aad1 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_attribute.go @@ -0,0 +1,40 @@ +package client + +const ( + UserAttributeType = "userAttribute" + UserAttributeFieldAnnotations = "annotations" + UserAttributeFieldCreated = "created" + UserAttributeFieldCreatorID = "creatorId" + UserAttributeFieldDeleteAfter = "deleteAfter" + UserAttributeFieldDisableAfter = "disableAfter" + UserAttributeFieldExtraByProvider = "extraByProvider" + UserAttributeFieldGroupPrincipals = "groupPrincipals" + UserAttributeFieldLabels = "labels" + UserAttributeFieldLastLogin = "lastLogin" + UserAttributeFieldLastRefresh = "lastRefresh" + UserAttributeFieldName = "name" + UserAttributeFieldNeedsRefresh = "needsRefresh" + UserAttributeFieldOwnerReferences = "ownerReferences" + UserAttributeFieldRemoved = "removed" + UserAttributeFieldUUID = "uuid" + UserAttributeFieldUserName = "userName" +) + +type UserAttribute struct { + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + DeleteAfter string `json:"deleteAfter,omitempty" yaml:"deleteAfter,omitempty"` + DisableAfter string `json:"disableAfter,omitempty" yaml:"disableAfter,omitempty"` + ExtraByProvider map[string]map[string][]string `json:"extraByProvider,omitempty" yaml:"extraByProvider,omitempty"` + GroupPrincipals map[string]Principal `json:"groupPrincipals,omitempty" yaml:"groupPrincipals,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + LastLogin string `json:"lastLogin,omitempty" yaml:"lastLogin,omitempty"` + LastRefresh string `json:"lastRefresh,omitempty" yaml:"lastRefresh,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + NeedsRefresh bool `json:"needsRefresh,omitempty" yaml:"needsRefresh,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + UserName string `json:"userName,omitempty" yaml:"userName,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_condition.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_condition.go new file mode 100644 index 000000000..7d19141d1 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_condition.go @@ -0,0 +1,20 @@ +package client + +const ( + UserConditionType = "userCondition" + UserConditionFieldLastTransitionTime = "lastTransitionTime" + UserConditionFieldLastUpdateTime = "lastUpdateTime" + UserConditionFieldMessage = "message" + UserConditionFieldReason = "reason" + UserConditionFieldStatus = "status" + UserConditionFieldType = "type" +) + +type UserCondition struct { + LastTransitionTime string `json:"lastTransitionTime,omitempty" yaml:"lastTransitionTime,omitempty"` + LastUpdateTime string `json:"lastUpdateTime,omitempty" yaml:"lastUpdateTime,omitempty"` + Message string `json:"message,omitempty" yaml:"message,omitempty"` + Reason string `json:"reason,omitempty" yaml:"reason,omitempty"` + Status string `json:"status,omitempty" yaml:"status,omitempty"` + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_spec.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_spec.go new file mode 100644 index 000000000..a3b927d32 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_spec.go @@ -0,0 +1,8 @@ +package client + +const ( + UserSpecType = "userSpec" +) + +type UserSpec struct { +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_status.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_status.go new file mode 100644 index 000000000..a42c797d6 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_user_status.go @@ -0,0 +1,10 @@ +package client + +const ( + UserStatusType = "userStatus" + UserStatusFieldConditions = "conditions" +) + +type UserStatus struct { + Conditions []UserCondition `json:"conditions,omitempty" yaml:"conditions,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_values.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_values.go new file mode 100644 index 000000000..f8b87ddb0 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_values.go @@ -0,0 +1,16 @@ +package client + +const ( + ValuesType = "values" + ValuesFieldBoolValue = "boolValue" + ValuesFieldIntValue = "intValue" + ValuesFieldStringSliceValue = "stringSliceValue" + ValuesFieldStringValue = "stringValue" +) + +type Values struct { + BoolValue bool `json:"boolValue,omitempty" yaml:"boolValue,omitempty"` + IntValue int64 `json:"intValue,omitempty" yaml:"intValue,omitempty"` + StringSliceValue []string `json:"stringSliceValue,omitempty" yaml:"stringSliceValue,omitempty"` + StringValue string `json:"stringValue,omitempty" yaml:"stringValue,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_version_commits.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_version_commits.go new file mode 100644 index 000000000..493b1e1e6 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_version_commits.go @@ -0,0 +1,10 @@ +package client + +const ( + VersionCommitsType = "versionCommits" + VersionCommitsFieldValue = "Value" +) + +type VersionCommits struct { + Value map[string]string `json:"Value,omitempty" yaml:"Value,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_virtual_center_config.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_virtual_center_config.go new file mode 100644 index 000000000..b29d74df5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_virtual_center_config.go @@ -0,0 +1,18 @@ +package client + +const ( + VirtualCenterConfigType = "virtualCenterConfig" + VirtualCenterConfigFieldDatacenters = "datacenters" + VirtualCenterConfigFieldPassword = "password" + VirtualCenterConfigFieldRoundTripperCount = "soap-roundtrip-count" + VirtualCenterConfigFieldUser = "user" + VirtualCenterConfigFieldVCenterPort = "port" +) + +type VirtualCenterConfig struct { + Datacenters string `json:"datacenters,omitempty" yaml:"datacenters,omitempty"` + Password string `json:"password,omitempty" yaml:"password,omitempty"` + RoundTripperCount int64 `json:"soap-roundtrip-count,omitempty" yaml:"soap-roundtrip-count,omitempty"` + User string `json:"user,omitempty" yaml:"user,omitempty"` + VCenterPort string `json:"port,omitempty" yaml:"port,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_volume_projection.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_volume_projection.go new file mode 100644 index 000000000..d67ed14c8 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_volume_projection.go @@ -0,0 +1,18 @@ +package client + +const ( + VolumeProjectionType = "volumeProjection" + VolumeProjectionFieldClusterTrustBundle = "clusterTrustBundle" + VolumeProjectionFieldConfigMap = "configMap" + VolumeProjectionFieldDownwardAPI = "downwardAPI" + VolumeProjectionFieldSecret = "secret" + VolumeProjectionFieldServiceAccountToken = "serviceAccountToken" +) + +type VolumeProjection struct { + ClusterTrustBundle *ClusterTrustBundleProjection `json:"clusterTrustBundle,omitempty" yaml:"clusterTrustBundle,omitempty"` + ConfigMap *ConfigMapProjection `json:"configMap,omitempty" yaml:"configMap,omitempty"` + DownwardAPI *DownwardAPIProjection `json:"downwardAPI,omitempty" yaml:"downwardAPI,omitempty"` + Secret *SecretProjection `json:"secret,omitempty" yaml:"secret,omitempty"` + ServiceAccountToken *ServiceAccountTokenProjection `json:"serviceAccountToken,omitempty" yaml:"serviceAccountToken,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_volume_resource_requirements.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_volume_resource_requirements.go new file mode 100644 index 000000000..780368bba --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_volume_resource_requirements.go @@ -0,0 +1,12 @@ +package client + +const ( + VolumeResourceRequirementsType = "volumeResourceRequirements" + VolumeResourceRequirementsFieldLimits = "limits" + VolumeResourceRequirementsFieldRequests = "requests" +) + +type VolumeResourceRequirements struct { + Limits map[string]string `json:"limits,omitempty" yaml:"limits,omitempty"` + Requests map[string]string `json:"requests,omitempty" yaml:"requests,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_vsphere_cloud_provider.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_vsphere_cloud_provider.go new file mode 100644 index 000000000..63bbae2d5 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_vsphere_cloud_provider.go @@ -0,0 +1,18 @@ +package client + +const ( + VsphereCloudProviderType = "vsphereCloudProvider" + VsphereCloudProviderFieldDisk = "disk" + VsphereCloudProviderFieldGlobal = "global" + VsphereCloudProviderFieldNetwork = "network" + VsphereCloudProviderFieldVirtualCenter = "virtualCenter" + VsphereCloudProviderFieldWorkspace = "workspace" +) + +type VsphereCloudProvider struct { + Disk *DiskVsphereOpts `json:"disk,omitempty" yaml:"disk,omitempty"` + Global *GlobalVsphereOpts `json:"global,omitempty" yaml:"global,omitempty"` + Network *NetworkVshpereOpts `json:"network,omitempty" yaml:"network,omitempty"` + VirtualCenter map[string]VirtualCenterConfig `json:"virtualCenter,omitempty" yaml:"virtualCenter,omitempty"` + Workspace *WorkspaceVsphereOpts `json:"workspace,omitempty" yaml:"workspace,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_vsphere_virtual_disk_volume_source.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_vsphere_virtual_disk_volume_source.go new file mode 100644 index 000000000..ed671ad47 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_vsphere_virtual_disk_volume_source.go @@ -0,0 +1,16 @@ +package client + +const ( + VsphereVirtualDiskVolumeSourceType = "vsphereVirtualDiskVolumeSource" + VsphereVirtualDiskVolumeSourceFieldFSType = "fsType" + VsphereVirtualDiskVolumeSourceFieldStoragePolicyID = "storagePolicyID" + VsphereVirtualDiskVolumeSourceFieldStoragePolicyName = "storagePolicyName" + VsphereVirtualDiskVolumeSourceFieldVolumePath = "volumePath" +) + +type VsphereVirtualDiskVolumeSource struct { + FSType string `json:"fsType,omitempty" yaml:"fsType,omitempty"` + StoragePolicyID string `json:"storagePolicyID,omitempty" yaml:"storagePolicyID,omitempty"` + StoragePolicyName string `json:"storagePolicyName,omitempty" yaml:"storagePolicyName,omitempty"` + VolumePath string `json:"volumePath,omitempty" yaml:"volumePath,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_weave_network_provider.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_weave_network_provider.go new file mode 100644 index 000000000..2cd7b6fa0 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_weave_network_provider.go @@ -0,0 +1,10 @@ +package client + +const ( + WeaveNetworkProviderType = "weaveNetworkProvider" + WeaveNetworkProviderFieldPassword = "password" +) + +type WeaveNetworkProvider struct { + Password string `json:"password,omitempty" yaml:"password,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_weighted_pod_affinity_term.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_weighted_pod_affinity_term.go new file mode 100644 index 000000000..a046f5ae2 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_weighted_pod_affinity_term.go @@ -0,0 +1,12 @@ +package client + +const ( + WeightedPodAffinityTermType = "weightedPodAffinityTerm" + WeightedPodAffinityTermFieldPodAffinityTerm = "podAffinityTerm" + WeightedPodAffinityTermFieldWeight = "weight" +) + +type WeightedPodAffinityTerm struct { + PodAffinityTerm *PodAffinityTerm `json:"podAffinityTerm,omitempty" yaml:"podAffinityTerm,omitempty"` + Weight int64 `json:"weight,omitempty" yaml:"weight,omitempty"` +} diff --git a/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_workspace_vsphere_opts.go b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_workspace_vsphere_opts.go new file mode 100644 index 000000000..3f13897e9 --- /dev/null +++ b/vendor/github.com/rancher/rancher/pkg/client/generated/management/v3/zz_generated_workspace_vsphere_opts.go @@ -0,0 +1,18 @@ +package client + +const ( + WorkspaceVsphereOptsType = "workspaceVsphereOpts" + WorkspaceVsphereOptsFieldDatacenter = "datacenter" + WorkspaceVsphereOptsFieldDefaultDatastore = "default-datastore" + WorkspaceVsphereOptsFieldFolder = "folder" + WorkspaceVsphereOptsFieldResourcePoolPath = "resourcepool-path" + WorkspaceVsphereOptsFieldVCenterIP = "server" +) + +type WorkspaceVsphereOpts struct { + Datacenter string `json:"datacenter,omitempty" yaml:"datacenter,omitempty"` + DefaultDatastore string `json:"default-datastore,omitempty" yaml:"default-datastore,omitempty"` + Folder string `json:"folder,omitempty" yaml:"folder,omitempty"` + ResourcePoolPath string `json:"resourcepool-path,omitempty" yaml:"resourcepool-path,omitempty"` + VCenterIP string `json:"server,omitempty" yaml:"server,omitempty"` +} diff --git a/vendor/github.com/rancher/wrangler/v3/LICENSE b/vendor/github.com/rancher/wrangler/v3/LICENSE new file mode 100644 index 000000000..e454a5258 --- /dev/null +++ b/vendor/github.com/rancher/wrangler/v3/LICENSE @@ -0,0 +1,178 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + diff --git a/vendor/github.com/rancher/wrangler/v3/pkg/name/name.go b/vendor/github.com/rancher/wrangler/v3/pkg/name/name.go new file mode 100644 index 000000000..99161dffa --- /dev/null +++ b/vendor/github.com/rancher/wrangler/v3/pkg/name/name.go @@ -0,0 +1,75 @@ +package name + +import ( + "crypto/md5" + "crypto/sha256" + "encoding/hex" + "fmt" + "strings" +) + +// GuessPluralName attempts to pluralize a noun. +func GuessPluralName(name string) string { + if name == "" { + return name + } + + if strings.EqualFold(name, "Endpoints") { + return name + } + + if suffix(name, "s") || suffix(name, "ch") || suffix(name, "x") || suffix(name, "sh") { + return name + "es" + } + + if suffix(name, "f") || suffix(name, "fe") { + return name + "ves" + } + + if suffix(name, "y") && len(name) > 2 && !strings.ContainsAny(name[len(name)-2:len(name)-1], "[aeiou]") { + return name[0:len(name)-1] + "ies" + } + + return name + "s" +} + +func suffix(str, end string) bool { + return strings.HasSuffix(str, end) +} + +// Limit the length of a string to count characters. If the string's length is +// greater or equal to count, it will be truncated and a hash will be appended +// to the end. +// Warning: runtime error for count <= 5: https://go.dev/play/p/UAbpZIOvIYo +func Limit(s string, count int) string { + if len(s) < count { + return s + } + return fmt.Sprintf("%s-%s", s[:count-6], Hex(s, 5)) +} + +// Hex gets the checksum of s, encodes it to hexadecimal and returns the first n characters of that hexadecimal. +// Warning: runtime error for n > 32 or n < 0. +func Hex(s string, n int) string { + h := md5.Sum([]byte(s)) + d := hex.EncodeToString(h[:]) + return d[:n] +} + +// SafeConcatName concatenates the given strings and ensures the returned name is under 64 characters +// by cutting the string off at 57 characters and setting the last 6 with an encoded version of the concatenated string. +func SafeConcatName(name ...string) string { + fullPath := strings.Join(name, "-") + if len(fullPath) < 64 { + return fullPath + } + digest := sha256.Sum256([]byte(fullPath)) + // since we cut the string in the middle, the last char may not be compatible with what is expected in k8s + // we are checking and if necessary removing the last char + c := fullPath[56] + if 'a' <= c && c <= 'z' || '0' <= c && c <= '9' { + return fullPath[0:57] + "-" + hex.EncodeToString(digest[0:])[0:5] + } + + return fullPath[0:56] + "-" + hex.EncodeToString(digest[0:])[0:6] +} diff --git a/vendor/golang.org/x/crypto/LICENSE b/vendor/golang.org/x/crypto/LICENSE index 6a66aea5e..2a7cf70da 100644 --- a/vendor/golang.org/x/crypto/LICENSE +++ b/vendor/golang.org/x/crypto/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go index 5577c0f93..dc9311870 100644 --- a/vendor/golang.org/x/crypto/bcrypt/bcrypt.go +++ b/vendor/golang.org/x/crypto/bcrypt/bcrypt.go @@ -4,7 +4,7 @@ // Package bcrypt implements Provos and Mazières's bcrypt adaptive hashing // algorithm. See http://www.usenix.org/event/usenix99/provos/provos.pdf -package bcrypt // import "golang.org/x/crypto/bcrypt" +package bcrypt // The code is a port of Provos and Mazières's C implementation. import ( diff --git a/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s b/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s index 9ae8206c2..f75162e03 100644 --- a/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s +++ b/vendor/golang.org/x/crypto/blake2b/blake2bAVX2_amd64.s @@ -1,722 +1,4517 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// Code generated by command: go run blake2bAVX2_amd64_asm.go -out ../../blake2bAVX2_amd64.s -pkg blake2b. DO NOT EDIT. //go:build amd64 && gc && !purego #include "textflag.h" -DATA ·AVX2_iv0<>+0x00(SB)/8, $0x6a09e667f3bcc908 -DATA ·AVX2_iv0<>+0x08(SB)/8, $0xbb67ae8584caa73b -DATA ·AVX2_iv0<>+0x10(SB)/8, $0x3c6ef372fe94f82b -DATA ·AVX2_iv0<>+0x18(SB)/8, $0xa54ff53a5f1d36f1 -GLOBL ·AVX2_iv0<>(SB), (NOPTR+RODATA), $32 - -DATA ·AVX2_iv1<>+0x00(SB)/8, $0x510e527fade682d1 -DATA ·AVX2_iv1<>+0x08(SB)/8, $0x9b05688c2b3e6c1f -DATA ·AVX2_iv1<>+0x10(SB)/8, $0x1f83d9abfb41bd6b -DATA ·AVX2_iv1<>+0x18(SB)/8, $0x5be0cd19137e2179 -GLOBL ·AVX2_iv1<>(SB), (NOPTR+RODATA), $32 - -DATA ·AVX2_c40<>+0x00(SB)/8, $0x0201000706050403 -DATA ·AVX2_c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b -DATA ·AVX2_c40<>+0x10(SB)/8, $0x0201000706050403 -DATA ·AVX2_c40<>+0x18(SB)/8, $0x0a09080f0e0d0c0b -GLOBL ·AVX2_c40<>(SB), (NOPTR+RODATA), $32 - -DATA ·AVX2_c48<>+0x00(SB)/8, $0x0100070605040302 -DATA ·AVX2_c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a -DATA ·AVX2_c48<>+0x10(SB)/8, $0x0100070605040302 -DATA ·AVX2_c48<>+0x18(SB)/8, $0x09080f0e0d0c0b0a -GLOBL ·AVX2_c48<>(SB), (NOPTR+RODATA), $32 - -DATA ·AVX_iv0<>+0x00(SB)/8, $0x6a09e667f3bcc908 -DATA ·AVX_iv0<>+0x08(SB)/8, $0xbb67ae8584caa73b -GLOBL ·AVX_iv0<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_iv1<>+0x00(SB)/8, $0x3c6ef372fe94f82b -DATA ·AVX_iv1<>+0x08(SB)/8, $0xa54ff53a5f1d36f1 -GLOBL ·AVX_iv1<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_iv2<>+0x00(SB)/8, $0x510e527fade682d1 -DATA ·AVX_iv2<>+0x08(SB)/8, $0x9b05688c2b3e6c1f -GLOBL ·AVX_iv2<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_iv3<>+0x00(SB)/8, $0x1f83d9abfb41bd6b -DATA ·AVX_iv3<>+0x08(SB)/8, $0x5be0cd19137e2179 -GLOBL ·AVX_iv3<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_c40<>+0x00(SB)/8, $0x0201000706050403 -DATA ·AVX_c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b -GLOBL ·AVX_c40<>(SB), (NOPTR+RODATA), $16 - -DATA ·AVX_c48<>+0x00(SB)/8, $0x0100070605040302 -DATA ·AVX_c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a -GLOBL ·AVX_c48<>(SB), (NOPTR+RODATA), $16 - -#define VPERMQ_0x39_Y1_Y1 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xc9; BYTE $0x39 -#define VPERMQ_0x93_Y1_Y1 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xc9; BYTE $0x93 -#define VPERMQ_0x4E_Y2_Y2 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xd2; BYTE $0x4e -#define VPERMQ_0x93_Y3_Y3 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xdb; BYTE $0x93 -#define VPERMQ_0x39_Y3_Y3 BYTE $0xc4; BYTE $0xe3; BYTE $0xfd; BYTE $0x00; BYTE $0xdb; BYTE $0x39 - -#define ROUND_AVX2(m0, m1, m2, m3, t, c40, c48) \ - VPADDQ m0, Y0, Y0; \ - VPADDQ Y1, Y0, Y0; \ - VPXOR Y0, Y3, Y3; \ - VPSHUFD $-79, Y3, Y3; \ - VPADDQ Y3, Y2, Y2; \ - VPXOR Y2, Y1, Y1; \ - VPSHUFB c40, Y1, Y1; \ - VPADDQ m1, Y0, Y0; \ - VPADDQ Y1, Y0, Y0; \ - VPXOR Y0, Y3, Y3; \ - VPSHUFB c48, Y3, Y3; \ - VPADDQ Y3, Y2, Y2; \ - VPXOR Y2, Y1, Y1; \ - VPADDQ Y1, Y1, t; \ - VPSRLQ $63, Y1, Y1; \ - VPXOR t, Y1, Y1; \ - VPERMQ_0x39_Y1_Y1; \ - VPERMQ_0x4E_Y2_Y2; \ - VPERMQ_0x93_Y3_Y3; \ - VPADDQ m2, Y0, Y0; \ - VPADDQ Y1, Y0, Y0; \ - VPXOR Y0, Y3, Y3; \ - VPSHUFD $-79, Y3, Y3; \ - VPADDQ Y3, Y2, Y2; \ - VPXOR Y2, Y1, Y1; \ - VPSHUFB c40, Y1, Y1; \ - VPADDQ m3, Y0, Y0; \ - VPADDQ Y1, Y0, Y0; \ - VPXOR Y0, Y3, Y3; \ - VPSHUFB c48, Y3, Y3; \ - VPADDQ Y3, Y2, Y2; \ - VPXOR Y2, Y1, Y1; \ - VPADDQ Y1, Y1, t; \ - VPSRLQ $63, Y1, Y1; \ - VPXOR t, Y1, Y1; \ - VPERMQ_0x39_Y3_Y3; \ - VPERMQ_0x4E_Y2_Y2; \ - VPERMQ_0x93_Y1_Y1 - -#define VMOVQ_SI_X11_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x1E -#define VMOVQ_SI_X12_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x26 -#define VMOVQ_SI_X13_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x2E -#define VMOVQ_SI_X14_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x36 -#define VMOVQ_SI_X15_0 BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x3E - -#define VMOVQ_SI_X11(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x5E; BYTE $n -#define VMOVQ_SI_X12(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x66; BYTE $n -#define VMOVQ_SI_X13(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x6E; BYTE $n -#define VMOVQ_SI_X14(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x76; BYTE $n -#define VMOVQ_SI_X15(n) BYTE $0xC5; BYTE $0x7A; BYTE $0x7E; BYTE $0x7E; BYTE $n - -#define VPINSRQ_1_SI_X11_0 BYTE $0xC4; BYTE $0x63; BYTE $0xA1; BYTE $0x22; BYTE $0x1E; BYTE $0x01 -#define VPINSRQ_1_SI_X12_0 BYTE $0xC4; BYTE $0x63; BYTE $0x99; BYTE $0x22; BYTE $0x26; BYTE $0x01 -#define VPINSRQ_1_SI_X13_0 BYTE $0xC4; BYTE $0x63; BYTE $0x91; BYTE $0x22; BYTE $0x2E; BYTE $0x01 -#define VPINSRQ_1_SI_X14_0 BYTE $0xC4; BYTE $0x63; BYTE $0x89; BYTE $0x22; BYTE $0x36; BYTE $0x01 -#define VPINSRQ_1_SI_X15_0 BYTE $0xC4; BYTE $0x63; BYTE $0x81; BYTE $0x22; BYTE $0x3E; BYTE $0x01 - -#define VPINSRQ_1_SI_X11(n) BYTE $0xC4; BYTE $0x63; BYTE $0xA1; BYTE $0x22; BYTE $0x5E; BYTE $n; BYTE $0x01 -#define VPINSRQ_1_SI_X12(n) BYTE $0xC4; BYTE $0x63; BYTE $0x99; BYTE $0x22; BYTE $0x66; BYTE $n; BYTE $0x01 -#define VPINSRQ_1_SI_X13(n) BYTE $0xC4; BYTE $0x63; BYTE $0x91; BYTE $0x22; BYTE $0x6E; BYTE $n; BYTE $0x01 -#define VPINSRQ_1_SI_X14(n) BYTE $0xC4; BYTE $0x63; BYTE $0x89; BYTE $0x22; BYTE $0x76; BYTE $n; BYTE $0x01 -#define VPINSRQ_1_SI_X15(n) BYTE $0xC4; BYTE $0x63; BYTE $0x81; BYTE $0x22; BYTE $0x7E; BYTE $n; BYTE $0x01 - -#define VMOVQ_R8_X15 BYTE $0xC4; BYTE $0x41; BYTE $0xF9; BYTE $0x6E; BYTE $0xF8 -#define VPINSRQ_1_R9_X15 BYTE $0xC4; BYTE $0x43; BYTE $0x81; BYTE $0x22; BYTE $0xF9; BYTE $0x01 - -// load msg: Y12 = (i0, i1, i2, i3) -// i0, i1, i2, i3 must not be 0 -#define LOAD_MSG_AVX2_Y12(i0, i1, i2, i3) \ - VMOVQ_SI_X12(i0*8); \ - VMOVQ_SI_X11(i2*8); \ - VPINSRQ_1_SI_X12(i1*8); \ - VPINSRQ_1_SI_X11(i3*8); \ - VINSERTI128 $1, X11, Y12, Y12 - -// load msg: Y13 = (i0, i1, i2, i3) -// i0, i1, i2, i3 must not be 0 -#define LOAD_MSG_AVX2_Y13(i0, i1, i2, i3) \ - VMOVQ_SI_X13(i0*8); \ - VMOVQ_SI_X11(i2*8); \ - VPINSRQ_1_SI_X13(i1*8); \ - VPINSRQ_1_SI_X11(i3*8); \ - VINSERTI128 $1, X11, Y13, Y13 - -// load msg: Y14 = (i0, i1, i2, i3) -// i0, i1, i2, i3 must not be 0 -#define LOAD_MSG_AVX2_Y14(i0, i1, i2, i3) \ - VMOVQ_SI_X14(i0*8); \ - VMOVQ_SI_X11(i2*8); \ - VPINSRQ_1_SI_X14(i1*8); \ - VPINSRQ_1_SI_X11(i3*8); \ - VINSERTI128 $1, X11, Y14, Y14 - -// load msg: Y15 = (i0, i1, i2, i3) -// i0, i1, i2, i3 must not be 0 -#define LOAD_MSG_AVX2_Y15(i0, i1, i2, i3) \ - VMOVQ_SI_X15(i0*8); \ - VMOVQ_SI_X11(i2*8); \ - VPINSRQ_1_SI_X15(i1*8); \ - VPINSRQ_1_SI_X11(i3*8); \ - VINSERTI128 $1, X11, Y15, Y15 - -#define LOAD_MSG_AVX2_0_2_4_6_1_3_5_7_8_10_12_14_9_11_13_15() \ - VMOVQ_SI_X12_0; \ - VMOVQ_SI_X11(4*8); \ - VPINSRQ_1_SI_X12(2*8); \ - VPINSRQ_1_SI_X11(6*8); \ - VINSERTI128 $1, X11, Y12, Y12; \ - LOAD_MSG_AVX2_Y13(1, 3, 5, 7); \ - LOAD_MSG_AVX2_Y14(8, 10, 12, 14); \ - LOAD_MSG_AVX2_Y15(9, 11, 13, 15) - -#define LOAD_MSG_AVX2_14_4_9_13_10_8_15_6_1_0_11_5_12_2_7_3() \ - LOAD_MSG_AVX2_Y12(14, 4, 9, 13); \ - LOAD_MSG_AVX2_Y13(10, 8, 15, 6); \ - VMOVQ_SI_X11(11*8); \ - VPSHUFD $0x4E, 0*8(SI), X14; \ - VPINSRQ_1_SI_X11(5*8); \ - VINSERTI128 $1, X11, Y14, Y14; \ - LOAD_MSG_AVX2_Y15(12, 2, 7, 3) - -#define LOAD_MSG_AVX2_11_12_5_15_8_0_2_13_10_3_7_9_14_6_1_4() \ - VMOVQ_SI_X11(5*8); \ - VMOVDQU 11*8(SI), X12; \ - VPINSRQ_1_SI_X11(15*8); \ - VINSERTI128 $1, X11, Y12, Y12; \ - VMOVQ_SI_X13(8*8); \ - VMOVQ_SI_X11(2*8); \ - VPINSRQ_1_SI_X13_0; \ - VPINSRQ_1_SI_X11(13*8); \ - VINSERTI128 $1, X11, Y13, Y13; \ - LOAD_MSG_AVX2_Y14(10, 3, 7, 9); \ - LOAD_MSG_AVX2_Y15(14, 6, 1, 4) - -#define LOAD_MSG_AVX2_7_3_13_11_9_1_12_14_2_5_4_15_6_10_0_8() \ - LOAD_MSG_AVX2_Y12(7, 3, 13, 11); \ - LOAD_MSG_AVX2_Y13(9, 1, 12, 14); \ - LOAD_MSG_AVX2_Y14(2, 5, 4, 15); \ - VMOVQ_SI_X15(6*8); \ - VMOVQ_SI_X11_0; \ - VPINSRQ_1_SI_X15(10*8); \ - VPINSRQ_1_SI_X11(8*8); \ - VINSERTI128 $1, X11, Y15, Y15 - -#define LOAD_MSG_AVX2_9_5_2_10_0_7_4_15_14_11_6_3_1_12_8_13() \ - LOAD_MSG_AVX2_Y12(9, 5, 2, 10); \ - VMOVQ_SI_X13_0; \ - VMOVQ_SI_X11(4*8); \ - VPINSRQ_1_SI_X13(7*8); \ - VPINSRQ_1_SI_X11(15*8); \ - VINSERTI128 $1, X11, Y13, Y13; \ - LOAD_MSG_AVX2_Y14(14, 11, 6, 3); \ - LOAD_MSG_AVX2_Y15(1, 12, 8, 13) - -#define LOAD_MSG_AVX2_2_6_0_8_12_10_11_3_4_7_15_1_13_5_14_9() \ - VMOVQ_SI_X12(2*8); \ - VMOVQ_SI_X11_0; \ - VPINSRQ_1_SI_X12(6*8); \ - VPINSRQ_1_SI_X11(8*8); \ - VINSERTI128 $1, X11, Y12, Y12; \ - LOAD_MSG_AVX2_Y13(12, 10, 11, 3); \ - LOAD_MSG_AVX2_Y14(4, 7, 15, 1); \ - LOAD_MSG_AVX2_Y15(13, 5, 14, 9) - -#define LOAD_MSG_AVX2_12_1_14_4_5_15_13_10_0_6_9_8_7_3_2_11() \ - LOAD_MSG_AVX2_Y12(12, 1, 14, 4); \ - LOAD_MSG_AVX2_Y13(5, 15, 13, 10); \ - VMOVQ_SI_X14_0; \ - VPSHUFD $0x4E, 8*8(SI), X11; \ - VPINSRQ_1_SI_X14(6*8); \ - VINSERTI128 $1, X11, Y14, Y14; \ - LOAD_MSG_AVX2_Y15(7, 3, 2, 11) - -#define LOAD_MSG_AVX2_13_7_12_3_11_14_1_9_5_15_8_2_0_4_6_10() \ - LOAD_MSG_AVX2_Y12(13, 7, 12, 3); \ - LOAD_MSG_AVX2_Y13(11, 14, 1, 9); \ - LOAD_MSG_AVX2_Y14(5, 15, 8, 2); \ - VMOVQ_SI_X15_0; \ - VMOVQ_SI_X11(6*8); \ - VPINSRQ_1_SI_X15(4*8); \ - VPINSRQ_1_SI_X11(10*8); \ - VINSERTI128 $1, X11, Y15, Y15 - -#define LOAD_MSG_AVX2_6_14_11_0_15_9_3_8_12_13_1_10_2_7_4_5() \ - VMOVQ_SI_X12(6*8); \ - VMOVQ_SI_X11(11*8); \ - VPINSRQ_1_SI_X12(14*8); \ - VPINSRQ_1_SI_X11_0; \ - VINSERTI128 $1, X11, Y12, Y12; \ - LOAD_MSG_AVX2_Y13(15, 9, 3, 8); \ - VMOVQ_SI_X11(1*8); \ - VMOVDQU 12*8(SI), X14; \ - VPINSRQ_1_SI_X11(10*8); \ - VINSERTI128 $1, X11, Y14, Y14; \ - VMOVQ_SI_X15(2*8); \ - VMOVDQU 4*8(SI), X11; \ - VPINSRQ_1_SI_X15(7*8); \ - VINSERTI128 $1, X11, Y15, Y15 - -#define LOAD_MSG_AVX2_10_8_7_1_2_4_6_5_15_9_3_13_11_14_12_0() \ - LOAD_MSG_AVX2_Y12(10, 8, 7, 1); \ - VMOVQ_SI_X13(2*8); \ - VPSHUFD $0x4E, 5*8(SI), X11; \ - VPINSRQ_1_SI_X13(4*8); \ - VINSERTI128 $1, X11, Y13, Y13; \ - LOAD_MSG_AVX2_Y14(15, 9, 3, 13); \ - VMOVQ_SI_X15(11*8); \ - VMOVQ_SI_X11(12*8); \ - VPINSRQ_1_SI_X15(14*8); \ - VPINSRQ_1_SI_X11_0; \ - VINSERTI128 $1, X11, Y15, Y15 - // func hashBlocksAVX2(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) -TEXT ·hashBlocksAVX2(SB), 4, $320-48 // frame size = 288 + 32 byte alignment - MOVQ h+0(FP), AX - MOVQ c+8(FP), BX - MOVQ flag+16(FP), CX - MOVQ blocks_base+24(FP), SI - MOVQ blocks_len+32(FP), DI - - MOVQ SP, DX - ADDQ $31, DX - ANDQ $~31, DX - - MOVQ CX, 16(DX) - XORQ CX, CX - MOVQ CX, 24(DX) - - VMOVDQU ·AVX2_c40<>(SB), Y4 - VMOVDQU ·AVX2_c48<>(SB), Y5 - - VMOVDQU 0(AX), Y8 +// Requires: AVX, AVX2 +TEXT ·hashBlocksAVX2(SB), NOSPLIT, $320-48 + MOVQ h+0(FP), AX + MOVQ c+8(FP), BX + MOVQ flag+16(FP), CX + MOVQ blocks_base+24(FP), SI + MOVQ blocks_len+32(FP), DI + MOVQ SP, DX + ADDQ $+31, DX + ANDQ $-32, DX + MOVQ CX, 16(DX) + XORQ CX, CX + MOVQ CX, 24(DX) + VMOVDQU ·AVX2_c40<>+0(SB), Y4 + VMOVDQU ·AVX2_c48<>+0(SB), Y5 + VMOVDQU (AX), Y8 VMOVDQU 32(AX), Y9 - VMOVDQU ·AVX2_iv0<>(SB), Y6 - VMOVDQU ·AVX2_iv1<>(SB), Y7 - - MOVQ 0(BX), R8 - MOVQ 8(BX), R9 - MOVQ R9, 8(DX) + VMOVDQU ·AVX2_iv0<>+0(SB), Y6 + VMOVDQU ·AVX2_iv1<>+0(SB), Y7 + MOVQ (BX), R8 + MOVQ 8(BX), R9 + MOVQ R9, 8(DX) loop: - ADDQ $128, R8 - MOVQ R8, 0(DX) - CMPQ R8, $128 + ADDQ $0x80, R8 + MOVQ R8, (DX) + CMPQ R8, $0x80 JGE noinc INCQ R9 MOVQ R9, 8(DX) noinc: - VMOVDQA Y8, Y0 - VMOVDQA Y9, Y1 - VMOVDQA Y6, Y2 - VPXOR 0(DX), Y7, Y3 - - LOAD_MSG_AVX2_0_2_4_6_1_3_5_7_8_10_12_14_9_11_13_15() - VMOVDQA Y12, 32(DX) - VMOVDQA Y13, 64(DX) - VMOVDQA Y14, 96(DX) - VMOVDQA Y15, 128(DX) - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_14_4_9_13_10_8_15_6_1_0_11_5_12_2_7_3() - VMOVDQA Y12, 160(DX) - VMOVDQA Y13, 192(DX) - VMOVDQA Y14, 224(DX) - VMOVDQA Y15, 256(DX) - - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_11_12_5_15_8_0_2_13_10_3_7_9_14_6_1_4() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_7_3_13_11_9_1_12_14_2_5_4_15_6_10_0_8() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_9_5_2_10_0_7_4_15_14_11_6_3_1_12_8_13() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_2_6_0_8_12_10_11_3_4_7_15_1_13_5_14_9() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_12_1_14_4_5_15_13_10_0_6_9_8_7_3_2_11() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_13_7_12_3_11_14_1_9_5_15_8_2_0_4_6_10() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_6_14_11_0_15_9_3_8_12_13_1_10_2_7_4_5() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - LOAD_MSG_AVX2_10_8_7_1_2_4_6_5_15_9_3_13_11_14_12_0() - ROUND_AVX2(Y12, Y13, Y14, Y15, Y10, Y4, Y5) - - ROUND_AVX2(32(DX), 64(DX), 96(DX), 128(DX), Y10, Y4, Y5) - ROUND_AVX2(160(DX), 192(DX), 224(DX), 256(DX), Y10, Y4, Y5) - - VPXOR Y0, Y8, Y8 - VPXOR Y1, Y9, Y9 - VPXOR Y2, Y8, Y8 - VPXOR Y3, Y9, Y9 - - LEAQ 128(SI), SI - SUBQ $128, DI - JNE loop - - MOVQ R8, 0(BX) - MOVQ R9, 8(BX) - - VMOVDQU Y8, 0(AX) - VMOVDQU Y9, 32(AX) + VMOVDQA Y8, Y0 + VMOVDQA Y9, Y1 + VMOVDQA Y6, Y2 + VPXOR (DX), Y7, Y3 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x26 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x20 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x10 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x30 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x08 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x28 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x38 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x40 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x60 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x70 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x48 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x68 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x58 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x78 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VMOVDQA Y12, 32(DX) + VMOVDQA Y13, 64(DX) + VMOVDQA Y14, 96(DX) + VMOVDQA Y15, 128(DX) + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x70 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x48 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x20 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x68 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x50 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x78 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x40 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x30 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x58 + VPSHUFD $0x4e, (SI), X14 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x28 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x38 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x10 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x18 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VMOVDQA Y12, 160(DX) + VMOVDQA Y13, 192(DX) + VMOVDQA Y14, 224(DX) + VMOVDQA Y15, 256(DX) + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x28 + VMOVDQU 88(SI), X12 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x78 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x40 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x10 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x2e + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x68 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x50 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x38 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x48 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x70 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x08 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x30 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x20 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x38 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x68 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x58 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x48 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x60 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x08 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x70 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x10 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x20 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x28 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x78 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x30 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x1e + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x40 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x48 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x10 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x28 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x50 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x2e + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x20 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x38 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x78 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x70 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x30 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x58 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x18 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x08 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x40 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x60 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x68 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x10 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x1e + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x30 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x40 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x58 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x18 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x20 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x78 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x38 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x08 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x68 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x70 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x28 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x48 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x70 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x08 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x20 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x28 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x68 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x78 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x50 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x36 + VPSHUFD $0x4e, 64(SI), X11 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x30 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x38 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x10 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x58 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x68 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x60 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x38 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x18 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x58 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x08 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x70 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x48 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x28 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x40 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x78 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x10 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x3e + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x30 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x20 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x50 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x30 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x58 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x70 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x1e + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x78 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x18 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x48 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x40 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x08 + VMOVDQU 96(SI), X14 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x50 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x10 + VMOVDQU 32(SI), X11 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x38 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x50 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x38 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x40 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x08 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y12, Y12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x10 + VPSHUFD $0x4e, 40(SI), X11 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x20 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y13, Y13 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x78 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x18 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x48 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x5e + BYTE $0x68 + BYTE $0x01 + VINSERTI128 $0x01, X11, Y14, Y14 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x58 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x5e + BYTE $0x60 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x70 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0xa1 + BYTE $0x22 + BYTE $0x1e + BYTE $0x01 + VINSERTI128 $0x01, X11, Y15, Y15 + VPADDQ Y12, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y13, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ Y14, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ Y15, Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + VPADDQ 32(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ 64(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ 96(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ 128(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + VPADDQ 160(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ 192(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x93 + VPADDQ 224(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFD $-79, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPSHUFB Y4, Y1, Y1 + VPADDQ 256(DX), Y0, Y0 + VPADDQ Y1, Y0, Y0 + VPXOR Y0, Y3, Y3 + VPSHUFB Y5, Y3, Y3 + VPADDQ Y3, Y2, Y2 + VPXOR Y2, Y1, Y1 + VPADDQ Y1, Y1, Y10 + VPSRLQ $0x3f, Y1, Y1 + VPXOR Y10, Y1, Y1 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xdb + BYTE $0x39 + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xd2 + BYTE $0x4e + BYTE $0xc4 + BYTE $0xe3 + BYTE $0xfd + BYTE $0x00 + BYTE $0xc9 + BYTE $0x93 + VPXOR Y0, Y8, Y8 + VPXOR Y1, Y9, Y9 + VPXOR Y2, Y8, Y8 + VPXOR Y3, Y9, Y9 + LEAQ 128(SI), SI + SUBQ $0x80, DI + JNE loop + MOVQ R8, (BX) + MOVQ R9, 8(BX) + VMOVDQU Y8, (AX) + VMOVDQU Y9, 32(AX) VZEROUPPER - RET -#define VPUNPCKLQDQ_X2_X2_X15 BYTE $0xC5; BYTE $0x69; BYTE $0x6C; BYTE $0xFA -#define VPUNPCKLQDQ_X3_X3_X15 BYTE $0xC5; BYTE $0x61; BYTE $0x6C; BYTE $0xFB -#define VPUNPCKLQDQ_X7_X7_X15 BYTE $0xC5; BYTE $0x41; BYTE $0x6C; BYTE $0xFF -#define VPUNPCKLQDQ_X13_X13_X15 BYTE $0xC4; BYTE $0x41; BYTE $0x11; BYTE $0x6C; BYTE $0xFD -#define VPUNPCKLQDQ_X14_X14_X15 BYTE $0xC4; BYTE $0x41; BYTE $0x09; BYTE $0x6C; BYTE $0xFE - -#define VPUNPCKHQDQ_X15_X2_X2 BYTE $0xC4; BYTE $0xC1; BYTE $0x69; BYTE $0x6D; BYTE $0xD7 -#define VPUNPCKHQDQ_X15_X3_X3 BYTE $0xC4; BYTE $0xC1; BYTE $0x61; BYTE $0x6D; BYTE $0xDF -#define VPUNPCKHQDQ_X15_X6_X6 BYTE $0xC4; BYTE $0xC1; BYTE $0x49; BYTE $0x6D; BYTE $0xF7 -#define VPUNPCKHQDQ_X15_X7_X7 BYTE $0xC4; BYTE $0xC1; BYTE $0x41; BYTE $0x6D; BYTE $0xFF -#define VPUNPCKHQDQ_X15_X3_X2 BYTE $0xC4; BYTE $0xC1; BYTE $0x61; BYTE $0x6D; BYTE $0xD7 -#define VPUNPCKHQDQ_X15_X7_X6 BYTE $0xC4; BYTE $0xC1; BYTE $0x41; BYTE $0x6D; BYTE $0xF7 -#define VPUNPCKHQDQ_X15_X13_X3 BYTE $0xC4; BYTE $0xC1; BYTE $0x11; BYTE $0x6D; BYTE $0xDF -#define VPUNPCKHQDQ_X15_X13_X7 BYTE $0xC4; BYTE $0xC1; BYTE $0x11; BYTE $0x6D; BYTE $0xFF - -#define SHUFFLE_AVX() \ - VMOVDQA X6, X13; \ - VMOVDQA X2, X14; \ - VMOVDQA X4, X6; \ - VPUNPCKLQDQ_X13_X13_X15; \ - VMOVDQA X5, X4; \ - VMOVDQA X6, X5; \ - VPUNPCKHQDQ_X15_X7_X6; \ - VPUNPCKLQDQ_X7_X7_X15; \ - VPUNPCKHQDQ_X15_X13_X7; \ - VPUNPCKLQDQ_X3_X3_X15; \ - VPUNPCKHQDQ_X15_X2_X2; \ - VPUNPCKLQDQ_X14_X14_X15; \ - VPUNPCKHQDQ_X15_X3_X3; \ - -#define SHUFFLE_AVX_INV() \ - VMOVDQA X2, X13; \ - VMOVDQA X4, X14; \ - VPUNPCKLQDQ_X2_X2_X15; \ - VMOVDQA X5, X4; \ - VPUNPCKHQDQ_X15_X3_X2; \ - VMOVDQA X14, X5; \ - VPUNPCKLQDQ_X3_X3_X15; \ - VMOVDQA X6, X14; \ - VPUNPCKHQDQ_X15_X13_X3; \ - VPUNPCKLQDQ_X7_X7_X15; \ - VPUNPCKHQDQ_X15_X6_X6; \ - VPUNPCKLQDQ_X14_X14_X15; \ - VPUNPCKHQDQ_X15_X7_X7; \ - -#define HALF_ROUND_AVX(v0, v1, v2, v3, v4, v5, v6, v7, m0, m1, m2, m3, t0, c40, c48) \ - VPADDQ m0, v0, v0; \ - VPADDQ v2, v0, v0; \ - VPADDQ m1, v1, v1; \ - VPADDQ v3, v1, v1; \ - VPXOR v0, v6, v6; \ - VPXOR v1, v7, v7; \ - VPSHUFD $-79, v6, v6; \ - VPSHUFD $-79, v7, v7; \ - VPADDQ v6, v4, v4; \ - VPADDQ v7, v5, v5; \ - VPXOR v4, v2, v2; \ - VPXOR v5, v3, v3; \ - VPSHUFB c40, v2, v2; \ - VPSHUFB c40, v3, v3; \ - VPADDQ m2, v0, v0; \ - VPADDQ v2, v0, v0; \ - VPADDQ m3, v1, v1; \ - VPADDQ v3, v1, v1; \ - VPXOR v0, v6, v6; \ - VPXOR v1, v7, v7; \ - VPSHUFB c48, v6, v6; \ - VPSHUFB c48, v7, v7; \ - VPADDQ v6, v4, v4; \ - VPADDQ v7, v5, v5; \ - VPXOR v4, v2, v2; \ - VPXOR v5, v3, v3; \ - VPADDQ v2, v2, t0; \ - VPSRLQ $63, v2, v2; \ - VPXOR t0, v2, v2; \ - VPADDQ v3, v3, t0; \ - VPSRLQ $63, v3, v3; \ - VPXOR t0, v3, v3 - -// load msg: X12 = (i0, i1), X13 = (i2, i3), X14 = (i4, i5), X15 = (i6, i7) -// i0, i1, i2, i3, i4, i5, i6, i7 must not be 0 -#define LOAD_MSG_AVX(i0, i1, i2, i3, i4, i5, i6, i7) \ - VMOVQ_SI_X12(i0*8); \ - VMOVQ_SI_X13(i2*8); \ - VMOVQ_SI_X14(i4*8); \ - VMOVQ_SI_X15(i6*8); \ - VPINSRQ_1_SI_X12(i1*8); \ - VPINSRQ_1_SI_X13(i3*8); \ - VPINSRQ_1_SI_X14(i5*8); \ - VPINSRQ_1_SI_X15(i7*8) - -// load msg: X12 = (0, 2), X13 = (4, 6), X14 = (1, 3), X15 = (5, 7) -#define LOAD_MSG_AVX_0_2_4_6_1_3_5_7() \ - VMOVQ_SI_X12_0; \ - VMOVQ_SI_X13(4*8); \ - VMOVQ_SI_X14(1*8); \ - VMOVQ_SI_X15(5*8); \ - VPINSRQ_1_SI_X12(2*8); \ - VPINSRQ_1_SI_X13(6*8); \ - VPINSRQ_1_SI_X14(3*8); \ - VPINSRQ_1_SI_X15(7*8) - -// load msg: X12 = (1, 0), X13 = (11, 5), X14 = (12, 2), X15 = (7, 3) -#define LOAD_MSG_AVX_1_0_11_5_12_2_7_3() \ - VPSHUFD $0x4E, 0*8(SI), X12; \ - VMOVQ_SI_X13(11*8); \ - VMOVQ_SI_X14(12*8); \ - VMOVQ_SI_X15(7*8); \ - VPINSRQ_1_SI_X13(5*8); \ - VPINSRQ_1_SI_X14(2*8); \ - VPINSRQ_1_SI_X15(3*8) - -// load msg: X12 = (11, 12), X13 = (5, 15), X14 = (8, 0), X15 = (2, 13) -#define LOAD_MSG_AVX_11_12_5_15_8_0_2_13() \ - VMOVDQU 11*8(SI), X12; \ - VMOVQ_SI_X13(5*8); \ - VMOVQ_SI_X14(8*8); \ - VMOVQ_SI_X15(2*8); \ - VPINSRQ_1_SI_X13(15*8); \ - VPINSRQ_1_SI_X14_0; \ - VPINSRQ_1_SI_X15(13*8) - -// load msg: X12 = (2, 5), X13 = (4, 15), X14 = (6, 10), X15 = (0, 8) -#define LOAD_MSG_AVX_2_5_4_15_6_10_0_8() \ - VMOVQ_SI_X12(2*8); \ - VMOVQ_SI_X13(4*8); \ - VMOVQ_SI_X14(6*8); \ - VMOVQ_SI_X15_0; \ - VPINSRQ_1_SI_X12(5*8); \ - VPINSRQ_1_SI_X13(15*8); \ - VPINSRQ_1_SI_X14(10*8); \ - VPINSRQ_1_SI_X15(8*8) +DATA ·AVX2_c40<>+0(SB)/8, $0x0201000706050403 +DATA ·AVX2_c40<>+8(SB)/8, $0x0a09080f0e0d0c0b +DATA ·AVX2_c40<>+16(SB)/8, $0x0201000706050403 +DATA ·AVX2_c40<>+24(SB)/8, $0x0a09080f0e0d0c0b +GLOBL ·AVX2_c40<>(SB), RODATA|NOPTR, $32 -// load msg: X12 = (9, 5), X13 = (2, 10), X14 = (0, 7), X15 = (4, 15) -#define LOAD_MSG_AVX_9_5_2_10_0_7_4_15() \ - VMOVQ_SI_X12(9*8); \ - VMOVQ_SI_X13(2*8); \ - VMOVQ_SI_X14_0; \ - VMOVQ_SI_X15(4*8); \ - VPINSRQ_1_SI_X12(5*8); \ - VPINSRQ_1_SI_X13(10*8); \ - VPINSRQ_1_SI_X14(7*8); \ - VPINSRQ_1_SI_X15(15*8) +DATA ·AVX2_c48<>+0(SB)/8, $0x0100070605040302 +DATA ·AVX2_c48<>+8(SB)/8, $0x09080f0e0d0c0b0a +DATA ·AVX2_c48<>+16(SB)/8, $0x0100070605040302 +DATA ·AVX2_c48<>+24(SB)/8, $0x09080f0e0d0c0b0a +GLOBL ·AVX2_c48<>(SB), RODATA|NOPTR, $32 -// load msg: X12 = (2, 6), X13 = (0, 8), X14 = (12, 10), X15 = (11, 3) -#define LOAD_MSG_AVX_2_6_0_8_12_10_11_3() \ - VMOVQ_SI_X12(2*8); \ - VMOVQ_SI_X13_0; \ - VMOVQ_SI_X14(12*8); \ - VMOVQ_SI_X15(11*8); \ - VPINSRQ_1_SI_X12(6*8); \ - VPINSRQ_1_SI_X13(8*8); \ - VPINSRQ_1_SI_X14(10*8); \ - VPINSRQ_1_SI_X15(3*8) +DATA ·AVX2_iv0<>+0(SB)/8, $0x6a09e667f3bcc908 +DATA ·AVX2_iv0<>+8(SB)/8, $0xbb67ae8584caa73b +DATA ·AVX2_iv0<>+16(SB)/8, $0x3c6ef372fe94f82b +DATA ·AVX2_iv0<>+24(SB)/8, $0xa54ff53a5f1d36f1 +GLOBL ·AVX2_iv0<>(SB), RODATA|NOPTR, $32 -// load msg: X12 = (0, 6), X13 = (9, 8), X14 = (7, 3), X15 = (2, 11) -#define LOAD_MSG_AVX_0_6_9_8_7_3_2_11() \ - MOVQ 0*8(SI), X12; \ - VPSHUFD $0x4E, 8*8(SI), X13; \ - MOVQ 7*8(SI), X14; \ - MOVQ 2*8(SI), X15; \ - VPINSRQ_1_SI_X12(6*8); \ - VPINSRQ_1_SI_X14(3*8); \ - VPINSRQ_1_SI_X15(11*8) - -// load msg: X12 = (6, 14), X13 = (11, 0), X14 = (15, 9), X15 = (3, 8) -#define LOAD_MSG_AVX_6_14_11_0_15_9_3_8() \ - MOVQ 6*8(SI), X12; \ - MOVQ 11*8(SI), X13; \ - MOVQ 15*8(SI), X14; \ - MOVQ 3*8(SI), X15; \ - VPINSRQ_1_SI_X12(14*8); \ - VPINSRQ_1_SI_X13_0; \ - VPINSRQ_1_SI_X14(9*8); \ - VPINSRQ_1_SI_X15(8*8) - -// load msg: X12 = (5, 15), X13 = (8, 2), X14 = (0, 4), X15 = (6, 10) -#define LOAD_MSG_AVX_5_15_8_2_0_4_6_10() \ - MOVQ 5*8(SI), X12; \ - MOVQ 8*8(SI), X13; \ - MOVQ 0*8(SI), X14; \ - MOVQ 6*8(SI), X15; \ - VPINSRQ_1_SI_X12(15*8); \ - VPINSRQ_1_SI_X13(2*8); \ - VPINSRQ_1_SI_X14(4*8); \ - VPINSRQ_1_SI_X15(10*8) - -// load msg: X12 = (12, 13), X13 = (1, 10), X14 = (2, 7), X15 = (4, 5) -#define LOAD_MSG_AVX_12_13_1_10_2_7_4_5() \ - VMOVDQU 12*8(SI), X12; \ - MOVQ 1*8(SI), X13; \ - MOVQ 2*8(SI), X14; \ - VPINSRQ_1_SI_X13(10*8); \ - VPINSRQ_1_SI_X14(7*8); \ - VMOVDQU 4*8(SI), X15 - -// load msg: X12 = (15, 9), X13 = (3, 13), X14 = (11, 14), X15 = (12, 0) -#define LOAD_MSG_AVX_15_9_3_13_11_14_12_0() \ - MOVQ 15*8(SI), X12; \ - MOVQ 3*8(SI), X13; \ - MOVQ 11*8(SI), X14; \ - MOVQ 12*8(SI), X15; \ - VPINSRQ_1_SI_X12(9*8); \ - VPINSRQ_1_SI_X13(13*8); \ - VPINSRQ_1_SI_X14(14*8); \ - VPINSRQ_1_SI_X15_0 +DATA ·AVX2_iv1<>+0(SB)/8, $0x510e527fade682d1 +DATA ·AVX2_iv1<>+8(SB)/8, $0x9b05688c2b3e6c1f +DATA ·AVX2_iv1<>+16(SB)/8, $0x1f83d9abfb41bd6b +DATA ·AVX2_iv1<>+24(SB)/8, $0x5be0cd19137e2179 +GLOBL ·AVX2_iv1<>(SB), RODATA|NOPTR, $32 // func hashBlocksAVX(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) -TEXT ·hashBlocksAVX(SB), 4, $288-48 // frame size = 272 + 16 byte alignment - MOVQ h+0(FP), AX - MOVQ c+8(FP), BX - MOVQ flag+16(FP), CX - MOVQ blocks_base+24(FP), SI - MOVQ blocks_len+32(FP), DI - - MOVQ SP, R10 - ADDQ $15, R10 - ANDQ $~15, R10 - - VMOVDQU ·AVX_c40<>(SB), X0 - VMOVDQU ·AVX_c48<>(SB), X1 +// Requires: AVX, SSE2 +TEXT ·hashBlocksAVX(SB), NOSPLIT, $288-48 + MOVQ h+0(FP), AX + MOVQ c+8(FP), BX + MOVQ flag+16(FP), CX + MOVQ blocks_base+24(FP), SI + MOVQ blocks_len+32(FP), DI + MOVQ SP, R10 + ADDQ $0x0f, R10 + ANDQ $-16, R10 + VMOVDQU ·AVX_c40<>+0(SB), X0 + VMOVDQU ·AVX_c48<>+0(SB), X1 VMOVDQA X0, X8 VMOVDQA X1, X9 - - VMOVDQU ·AVX_iv3<>(SB), X0 - VMOVDQA X0, 0(R10) - XORQ CX, 0(R10) // 0(R10) = ·AVX_iv3 ^ (CX || 0) - - VMOVDQU 0(AX), X10 + VMOVDQU ·AVX_iv3<>+0(SB), X0 + VMOVDQA X0, (R10) + XORQ CX, (R10) + VMOVDQU (AX), X10 VMOVDQU 16(AX), X11 VMOVDQU 32(AX), X2 VMOVDQU 48(AX), X3 - - MOVQ 0(BX), R8 - MOVQ 8(BX), R9 + MOVQ (BX), R8 + MOVQ 8(BX), R9 loop: - ADDQ $128, R8 - CMPQ R8, $128 + ADDQ $0x80, R8 + CMPQ R8, $0x80 JGE noinc INCQ R9 noinc: - VMOVQ_R8_X15 - VPINSRQ_1_R9_X15 - + BYTE $0xc4 + BYTE $0x41 + BYTE $0xf9 + BYTE $0x6e + BYTE $0xf8 + BYTE $0xc4 + BYTE $0x43 + BYTE $0x81 + BYTE $0x22 + BYTE $0xf9 + BYTE $0x01 VMOVDQA X10, X0 VMOVDQA X11, X1 - VMOVDQU ·AVX_iv0<>(SB), X4 - VMOVDQU ·AVX_iv1<>(SB), X5 - VMOVDQU ·AVX_iv2<>(SB), X6 - + VMOVDQU ·AVX_iv0<>+0(SB), X4 + VMOVDQU ·AVX_iv1<>+0(SB), X5 + VMOVDQU ·AVX_iv2<>+0(SB), X6 VPXOR X15, X6, X6 - VMOVDQA 0(R10), X7 - - LOAD_MSG_AVX_0_2_4_6_1_3_5_7() + VMOVDQA (R10), X7 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x26 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x20 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x08 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x28 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x10 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x30 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x38 + BYTE $0x01 VMOVDQA X12, 16(R10) VMOVDQA X13, 32(R10) VMOVDQA X14, 48(R10) VMOVDQA X15, 64(R10) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX(8, 10, 12, 14, 9, 11, 13, 15) + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x40 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x48 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x68 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x70 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x58 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x78 + BYTE $0x01 VMOVDQA X12, 80(R10) VMOVDQA X13, 96(R10) VMOVDQA X14, 112(R10) VMOVDQA X15, 128(R10) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(14, 4, 9, 13, 10, 8, 15, 6) + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x70 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x48 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x50 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x78 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x20 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x68 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x40 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x30 + BYTE $0x01 VMOVDQA X12, 144(R10) VMOVDQA X13, 160(R10) VMOVDQA X14, 176(R10) VMOVDQA X15, 192(R10) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_1_0_11_5_12_2_7_3() + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + VPSHUFD $0x4e, (SI), X12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x58 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x38 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x28 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x10 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x18 + BYTE $0x01 VMOVDQA X12, 208(R10) VMOVDQA X13, 224(R10) VMOVDQA X14, 240(R10) VMOVDQA X15, 256(R10) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX_11_12_5_15_8_0_2_13() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX(10, 3, 7, 9, 14, 6, 1, 4) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(7, 3, 13, 11, 9, 1, 12, 14) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_2_5_4_15_6_10_0_8() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX_9_5_2_10_0_7_4_15() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX(14, 11, 6, 3, 1, 12, 8, 13) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX_2_6_0_8_12_10_11_3() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX(4, 7, 15, 1, 13, 5, 14, 9) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(12, 1, 14, 4, 5, 15, 13, 10) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_0_6_9_8_7_3_2_11() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(13, 7, 12, 3, 11, 14, 1, 9) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_5_15_8_2_0_4_6_10() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX_6_14_11_0_15_9_3_8() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_12_13_1_10_2_7_4_5() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - LOAD_MSG_AVX(10, 8, 7, 1, 2, 4, 6, 5) - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX() - LOAD_MSG_AVX_15_9_3_13_11_14_12_0() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, X12, X13, X14, X15, X15, X8, X9) - SHUFFLE_AVX_INV() - - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 16(R10), 32(R10), 48(R10), 64(R10), X15, X8, X9) - SHUFFLE_AVX() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 80(R10), 96(R10), 112(R10), 128(R10), X15, X8, X9) - SHUFFLE_AVX_INV() - - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 144(R10), 160(R10), 176(R10), 192(R10), X15, X8, X9) - SHUFFLE_AVX() - HALF_ROUND_AVX(X0, X1, X2, X3, X4, X5, X6, X7, 208(R10), 224(R10), 240(R10), 256(R10), X15, X8, X9) - SHUFFLE_AVX_INV() - + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + VMOVDQU 88(SI), X12 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x28 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x40 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x10 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x78 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x36 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x68 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x50 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x38 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x70 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x08 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x48 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x30 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x20 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x38 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x68 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x48 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x60 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x58 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x08 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x70 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x10 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x20 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x30 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x3e + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x28 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x78 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x40 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x48 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x10 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x36 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x20 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x28 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x38 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x78 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x70 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x30 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x08 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x40 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x58 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x60 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x68 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x10 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x2e + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x58 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x30 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x40 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x18 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x20 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x78 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x68 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x70 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x38 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x08 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x28 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x48 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x70 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x28 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x68 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x08 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x20 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x78 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x50 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + MOVQ (SI), X12 + VPSHUFD $0x4e, 64(SI), X13 + MOVQ 56(SI), X14 + MOVQ 16(SI), X15 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x30 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x58 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x68 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x60 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x58 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x08 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x38 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x18 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x70 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x48 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + MOVQ 40(SI), X12 + MOVQ 64(SI), X13 + MOVQ (SI), X14 + MOVQ 48(SI), X15 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x78 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x10 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x20 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x50 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + MOVQ 48(SI), X12 + MOVQ 88(SI), X13 + MOVQ 120(SI), X14 + MOVQ 24(SI), X15 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x70 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x2e + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x48 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x40 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + VMOVDQU 96(SI), X12 + MOVQ 8(SI), X13 + MOVQ 16(SI), X14 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x50 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x38 + BYTE $0x01 + VMOVDQU 32(SI), X15 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x66 + BYTE $0x50 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x6e + BYTE $0x38 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x76 + BYTE $0x10 + BYTE $0xc5 + BYTE $0x7a + BYTE $0x7e + BYTE $0x7e + BYTE $0x30 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x40 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x08 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x20 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x7e + BYTE $0x28 + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + MOVQ 120(SI), X12 + MOVQ 24(SI), X13 + MOVQ 88(SI), X14 + MOVQ 96(SI), X15 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x99 + BYTE $0x22 + BYTE $0x66 + BYTE $0x48 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x91 + BYTE $0x22 + BYTE $0x6e + BYTE $0x68 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x89 + BYTE $0x22 + BYTE $0x76 + BYTE $0x70 + BYTE $0x01 + BYTE $0xc4 + BYTE $0x63 + BYTE $0x81 + BYTE $0x22 + BYTE $0x3e + BYTE $0x01 + VPADDQ X12, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X13, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ X14, X0, X0 + VPADDQ X2, X0, X0 + VPADDQ X15, X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + VPADDQ 16(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 32(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ 48(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 64(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + VPADDQ 80(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 96(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ 112(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 128(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff + VPADDQ 144(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 160(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ 176(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 192(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X6, X13 + VMOVDQA X2, X14 + VMOVDQA X4, X6 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x11 + BYTE $0x6c + BYTE $0xfd + VMOVDQA X5, X4 + VMOVDQA X6, X5 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xff + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x69 + BYTE $0x6d + BYTE $0xd7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xdf + VPADDQ 208(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 224(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFD $-79, X6, X6 + VPSHUFD $-79, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPSHUFB X8, X2, X2 + VPSHUFB X8, X3, X3 + VPADDQ 240(R10), X0, X0 + VPADDQ X2, X0, X0 + VPADDQ 256(R10), X1, X1 + VPADDQ X3, X1, X1 + VPXOR X0, X6, X6 + VPXOR X1, X7, X7 + VPSHUFB X9, X6, X6 + VPSHUFB X9, X7, X7 + VPADDQ X6, X4, X4 + VPADDQ X7, X5, X5 + VPXOR X4, X2, X2 + VPXOR X5, X3, X3 + VPADDQ X2, X2, X15 + VPSRLQ $0x3f, X2, X2 + VPXOR X15, X2, X2 + VPADDQ X3, X3, X15 + VPSRLQ $0x3f, X3, X3 + VPXOR X15, X3, X3 + VMOVDQA X2, X13 + VMOVDQA X4, X14 + BYTE $0xc5 + BYTE $0x69 + BYTE $0x6c + BYTE $0xfa + VMOVDQA X5, X4 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x61 + BYTE $0x6d + BYTE $0xd7 + VMOVDQA X14, X5 + BYTE $0xc5 + BYTE $0x61 + BYTE $0x6c + BYTE $0xfb + VMOVDQA X6, X14 + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x11 + BYTE $0x6d + BYTE $0xdf + BYTE $0xc5 + BYTE $0x41 + BYTE $0x6c + BYTE $0xff + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x49 + BYTE $0x6d + BYTE $0xf7 + BYTE $0xc4 + BYTE $0x41 + BYTE $0x09 + BYTE $0x6c + BYTE $0xfe + BYTE $0xc4 + BYTE $0xc1 + BYTE $0x41 + BYTE $0x6d + BYTE $0xff VMOVDQU 32(AX), X14 VMOVDQU 48(AX), X15 VPXOR X0, X10, X10 @@ -729,16 +4524,36 @@ noinc: VPXOR X7, X15, X3 VMOVDQU X2, 32(AX) VMOVDQU X3, 48(AX) + LEAQ 128(SI), SI + SUBQ $0x80, DI + JNE loop + VMOVDQU X10, (AX) + VMOVDQU X11, 16(AX) + MOVQ R8, (BX) + MOVQ R9, 8(BX) + VZEROUPPER + RET - LEAQ 128(SI), SI - SUBQ $128, DI - JNE loop +DATA ·AVX_c40<>+0(SB)/8, $0x0201000706050403 +DATA ·AVX_c40<>+8(SB)/8, $0x0a09080f0e0d0c0b +GLOBL ·AVX_c40<>(SB), RODATA|NOPTR, $16 - VMOVDQU X10, 0(AX) - VMOVDQU X11, 16(AX) +DATA ·AVX_c48<>+0(SB)/8, $0x0100070605040302 +DATA ·AVX_c48<>+8(SB)/8, $0x09080f0e0d0c0b0a +GLOBL ·AVX_c48<>(SB), RODATA|NOPTR, $16 - MOVQ R8, 0(BX) - MOVQ R9, 8(BX) - VZEROUPPER +DATA ·AVX_iv3<>+0(SB)/8, $0x1f83d9abfb41bd6b +DATA ·AVX_iv3<>+8(SB)/8, $0x5be0cd19137e2179 +GLOBL ·AVX_iv3<>(SB), RODATA|NOPTR, $16 - RET +DATA ·AVX_iv0<>+0(SB)/8, $0x6a09e667f3bcc908 +DATA ·AVX_iv0<>+8(SB)/8, $0xbb67ae8584caa73b +GLOBL ·AVX_iv0<>(SB), RODATA|NOPTR, $16 + +DATA ·AVX_iv1<>+0(SB)/8, $0x3c6ef372fe94f82b +DATA ·AVX_iv1<>+8(SB)/8, $0xa54ff53a5f1d36f1 +GLOBL ·AVX_iv1<>(SB), RODATA|NOPTR, $16 + +DATA ·AVX_iv2<>+0(SB)/8, $0x510e527fade682d1 +DATA ·AVX_iv2<>+8(SB)/8, $0x9b05688c2b3e6c1f +GLOBL ·AVX_iv2<>(SB), RODATA|NOPTR, $16 diff --git a/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s b/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s index adfac00c1..9a0ce2124 100644 --- a/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s +++ b/vendor/golang.org/x/crypto/blake2b/blake2b_amd64.s @@ -1,278 +1,1441 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// Code generated by command: go run blake2b_amd64_asm.go -out ../../blake2b_amd64.s -pkg blake2b. DO NOT EDIT. //go:build amd64 && gc && !purego #include "textflag.h" -DATA ·iv0<>+0x00(SB)/8, $0x6a09e667f3bcc908 -DATA ·iv0<>+0x08(SB)/8, $0xbb67ae8584caa73b -GLOBL ·iv0<>(SB), (NOPTR+RODATA), $16 - -DATA ·iv1<>+0x00(SB)/8, $0x3c6ef372fe94f82b -DATA ·iv1<>+0x08(SB)/8, $0xa54ff53a5f1d36f1 -GLOBL ·iv1<>(SB), (NOPTR+RODATA), $16 - -DATA ·iv2<>+0x00(SB)/8, $0x510e527fade682d1 -DATA ·iv2<>+0x08(SB)/8, $0x9b05688c2b3e6c1f -GLOBL ·iv2<>(SB), (NOPTR+RODATA), $16 - -DATA ·iv3<>+0x00(SB)/8, $0x1f83d9abfb41bd6b -DATA ·iv3<>+0x08(SB)/8, $0x5be0cd19137e2179 -GLOBL ·iv3<>(SB), (NOPTR+RODATA), $16 - -DATA ·c40<>+0x00(SB)/8, $0x0201000706050403 -DATA ·c40<>+0x08(SB)/8, $0x0a09080f0e0d0c0b -GLOBL ·c40<>(SB), (NOPTR+RODATA), $16 - -DATA ·c48<>+0x00(SB)/8, $0x0100070605040302 -DATA ·c48<>+0x08(SB)/8, $0x09080f0e0d0c0b0a -GLOBL ·c48<>(SB), (NOPTR+RODATA), $16 - -#define SHUFFLE(v2, v3, v4, v5, v6, v7, t1, t2) \ - MOVO v4, t1; \ - MOVO v5, v4; \ - MOVO t1, v5; \ - MOVO v6, t1; \ - PUNPCKLQDQ v6, t2; \ - PUNPCKHQDQ v7, v6; \ - PUNPCKHQDQ t2, v6; \ - PUNPCKLQDQ v7, t2; \ - MOVO t1, v7; \ - MOVO v2, t1; \ - PUNPCKHQDQ t2, v7; \ - PUNPCKLQDQ v3, t2; \ - PUNPCKHQDQ t2, v2; \ - PUNPCKLQDQ t1, t2; \ - PUNPCKHQDQ t2, v3 - -#define SHUFFLE_INV(v2, v3, v4, v5, v6, v7, t1, t2) \ - MOVO v4, t1; \ - MOVO v5, v4; \ - MOVO t1, v5; \ - MOVO v2, t1; \ - PUNPCKLQDQ v2, t2; \ - PUNPCKHQDQ v3, v2; \ - PUNPCKHQDQ t2, v2; \ - PUNPCKLQDQ v3, t2; \ - MOVO t1, v3; \ - MOVO v6, t1; \ - PUNPCKHQDQ t2, v3; \ - PUNPCKLQDQ v7, t2; \ - PUNPCKHQDQ t2, v6; \ - PUNPCKLQDQ t1, t2; \ - PUNPCKHQDQ t2, v7 - -#define HALF_ROUND(v0, v1, v2, v3, v4, v5, v6, v7, m0, m1, m2, m3, t0, c40, c48) \ - PADDQ m0, v0; \ - PADDQ m1, v1; \ - PADDQ v2, v0; \ - PADDQ v3, v1; \ - PXOR v0, v6; \ - PXOR v1, v7; \ - PSHUFD $0xB1, v6, v6; \ - PSHUFD $0xB1, v7, v7; \ - PADDQ v6, v4; \ - PADDQ v7, v5; \ - PXOR v4, v2; \ - PXOR v5, v3; \ - PSHUFB c40, v2; \ - PSHUFB c40, v3; \ - PADDQ m2, v0; \ - PADDQ m3, v1; \ - PADDQ v2, v0; \ - PADDQ v3, v1; \ - PXOR v0, v6; \ - PXOR v1, v7; \ - PSHUFB c48, v6; \ - PSHUFB c48, v7; \ - PADDQ v6, v4; \ - PADDQ v7, v5; \ - PXOR v4, v2; \ - PXOR v5, v3; \ - MOVOU v2, t0; \ - PADDQ v2, t0; \ - PSRLQ $63, v2; \ - PXOR t0, v2; \ - MOVOU v3, t0; \ - PADDQ v3, t0; \ - PSRLQ $63, v3; \ - PXOR t0, v3 - -#define LOAD_MSG(m0, m1, m2, m3, src, i0, i1, i2, i3, i4, i5, i6, i7) \ - MOVQ i0*8(src), m0; \ - PINSRQ $1, i1*8(src), m0; \ - MOVQ i2*8(src), m1; \ - PINSRQ $1, i3*8(src), m1; \ - MOVQ i4*8(src), m2; \ - PINSRQ $1, i5*8(src), m2; \ - MOVQ i6*8(src), m3; \ - PINSRQ $1, i7*8(src), m3 - // func hashBlocksSSE4(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) -TEXT ·hashBlocksSSE4(SB), 4, $288-48 // frame size = 272 + 16 byte alignment - MOVQ h+0(FP), AX - MOVQ c+8(FP), BX - MOVQ flag+16(FP), CX - MOVQ blocks_base+24(FP), SI - MOVQ blocks_len+32(FP), DI - - MOVQ SP, R10 - ADDQ $15, R10 - ANDQ $~15, R10 - - MOVOU ·iv3<>(SB), X0 - MOVO X0, 0(R10) - XORQ CX, 0(R10) // 0(R10) = ·iv3 ^ (CX || 0) - - MOVOU ·c40<>(SB), X13 - MOVOU ·c48<>(SB), X14 - - MOVOU 0(AX), X12 +// Requires: SSE2, SSE4.1, SSSE3 +TEXT ·hashBlocksSSE4(SB), NOSPLIT, $288-48 + MOVQ h+0(FP), AX + MOVQ c+8(FP), BX + MOVQ flag+16(FP), CX + MOVQ blocks_base+24(FP), SI + MOVQ blocks_len+32(FP), DI + MOVQ SP, R10 + ADDQ $0x0f, R10 + ANDQ $-16, R10 + MOVOU ·iv3<>+0(SB), X0 + MOVO X0, (R10) + XORQ CX, (R10) + MOVOU ·c40<>+0(SB), X13 + MOVOU ·c48<>+0(SB), X14 + MOVOU (AX), X12 MOVOU 16(AX), X15 - - MOVQ 0(BX), R8 - MOVQ 8(BX), R9 + MOVQ (BX), R8 + MOVQ 8(BX), R9 loop: - ADDQ $128, R8 - CMPQ R8, $128 + ADDQ $0x80, R8 + CMPQ R8, $0x80 JGE noinc INCQ R9 noinc: - MOVQ R8, X8 - PINSRQ $1, R9, X8 - - MOVO X12, X0 - MOVO X15, X1 - MOVOU 32(AX), X2 - MOVOU 48(AX), X3 - MOVOU ·iv0<>(SB), X4 - MOVOU ·iv1<>(SB), X5 - MOVOU ·iv2<>(SB), X6 - - PXOR X8, X6 - MOVO 0(R10), X7 - - LOAD_MSG(X8, X9, X10, X11, SI, 0, 2, 4, 6, 1, 3, 5, 7) - MOVO X8, 16(R10) - MOVO X9, 32(R10) - MOVO X10, 48(R10) - MOVO X11, 64(R10) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 8, 10, 12, 14, 9, 11, 13, 15) - MOVO X8, 80(R10) - MOVO X9, 96(R10) - MOVO X10, 112(R10) - MOVO X11, 128(R10) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 14, 4, 9, 13, 10, 8, 15, 6) - MOVO X8, 144(R10) - MOVO X9, 160(R10) - MOVO X10, 176(R10) - MOVO X11, 192(R10) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 1, 0, 11, 5, 12, 2, 7, 3) - MOVO X8, 208(R10) - MOVO X9, 224(R10) - MOVO X10, 240(R10) - MOVO X11, 256(R10) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 11, 12, 5, 15, 8, 0, 2, 13) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 10, 3, 7, 9, 14, 6, 1, 4) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 7, 3, 13, 11, 9, 1, 12, 14) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 2, 5, 4, 15, 6, 10, 0, 8) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 9, 5, 2, 10, 0, 7, 4, 15) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 14, 11, 6, 3, 1, 12, 8, 13) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 2, 6, 0, 8, 12, 10, 11, 3) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 4, 7, 15, 1, 13, 5, 14, 9) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 12, 1, 14, 4, 5, 15, 13, 10) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 0, 6, 9, 8, 7, 3, 2, 11) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 13, 7, 12, 3, 11, 14, 1, 9) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 5, 15, 8, 2, 0, 4, 6, 10) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 6, 14, 11, 0, 15, 9, 3, 8) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 12, 13, 1, 10, 2, 7, 4, 5) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - LOAD_MSG(X8, X9, X10, X11, SI, 10, 8, 7, 1, 2, 4, 6, 5) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - LOAD_MSG(X8, X9, X10, X11, SI, 15, 9, 3, 13, 11, 14, 12, 0) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, X8, X9, X10, X11, X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) - - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 16(R10), 32(R10), 48(R10), 64(R10), X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 80(R10), 96(R10), 112(R10), 128(R10), X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) + MOVQ R8, X8 + PINSRQ $0x01, R9, X8 + MOVO X12, X0 + MOVO X15, X1 + MOVOU 32(AX), X2 + MOVOU 48(AX), X3 + MOVOU ·iv0<>+0(SB), X4 + MOVOU ·iv1<>+0(SB), X5 + MOVOU ·iv2<>+0(SB), X6 + PXOR X8, X6 + MOVO (R10), X7 + MOVQ (SI), X8 + PINSRQ $0x01, 16(SI), X8 + MOVQ 32(SI), X9 + PINSRQ $0x01, 48(SI), X9 + MOVQ 8(SI), X10 + PINSRQ $0x01, 24(SI), X10 + MOVQ 40(SI), X11 + PINSRQ $0x01, 56(SI), X11 + MOVO X8, 16(R10) + MOVO X9, 32(R10) + MOVO X10, 48(R10) + MOVO X11, 64(R10) + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 64(SI), X8 + PINSRQ $0x01, 80(SI), X8 + MOVQ 96(SI), X9 + PINSRQ $0x01, 112(SI), X9 + MOVQ 72(SI), X10 + PINSRQ $0x01, 88(SI), X10 + MOVQ 104(SI), X11 + PINSRQ $0x01, 120(SI), X11 + MOVO X8, 80(R10) + MOVO X9, 96(R10) + MOVO X10, 112(R10) + MOVO X11, 128(R10) + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 112(SI), X8 + PINSRQ $0x01, 32(SI), X8 + MOVQ 72(SI), X9 + PINSRQ $0x01, 104(SI), X9 + MOVQ 80(SI), X10 + PINSRQ $0x01, 64(SI), X10 + MOVQ 120(SI), X11 + PINSRQ $0x01, 48(SI), X11 + MOVO X8, 144(R10) + MOVO X9, 160(R10) + MOVO X10, 176(R10) + MOVO X11, 192(R10) + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 8(SI), X8 + PINSRQ $0x01, (SI), X8 + MOVQ 88(SI), X9 + PINSRQ $0x01, 40(SI), X9 + MOVQ 96(SI), X10 + PINSRQ $0x01, 16(SI), X10 + MOVQ 56(SI), X11 + PINSRQ $0x01, 24(SI), X11 + MOVO X8, 208(R10) + MOVO X9, 224(R10) + MOVO X10, 240(R10) + MOVO X11, 256(R10) + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 88(SI), X8 + PINSRQ $0x01, 96(SI), X8 + MOVQ 40(SI), X9 + PINSRQ $0x01, 120(SI), X9 + MOVQ 64(SI), X10 + PINSRQ $0x01, (SI), X10 + MOVQ 16(SI), X11 + PINSRQ $0x01, 104(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 80(SI), X8 + PINSRQ $0x01, 24(SI), X8 + MOVQ 56(SI), X9 + PINSRQ $0x01, 72(SI), X9 + MOVQ 112(SI), X10 + PINSRQ $0x01, 48(SI), X10 + MOVQ 8(SI), X11 + PINSRQ $0x01, 32(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 56(SI), X8 + PINSRQ $0x01, 24(SI), X8 + MOVQ 104(SI), X9 + PINSRQ $0x01, 88(SI), X9 + MOVQ 72(SI), X10 + PINSRQ $0x01, 8(SI), X10 + MOVQ 96(SI), X11 + PINSRQ $0x01, 112(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 16(SI), X8 + PINSRQ $0x01, 40(SI), X8 + MOVQ 32(SI), X9 + PINSRQ $0x01, 120(SI), X9 + MOVQ 48(SI), X10 + PINSRQ $0x01, 80(SI), X10 + MOVQ (SI), X11 + PINSRQ $0x01, 64(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 72(SI), X8 + PINSRQ $0x01, 40(SI), X8 + MOVQ 16(SI), X9 + PINSRQ $0x01, 80(SI), X9 + MOVQ (SI), X10 + PINSRQ $0x01, 56(SI), X10 + MOVQ 32(SI), X11 + PINSRQ $0x01, 120(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 112(SI), X8 + PINSRQ $0x01, 88(SI), X8 + MOVQ 48(SI), X9 + PINSRQ $0x01, 24(SI), X9 + MOVQ 8(SI), X10 + PINSRQ $0x01, 96(SI), X10 + MOVQ 64(SI), X11 + PINSRQ $0x01, 104(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 16(SI), X8 + PINSRQ $0x01, 48(SI), X8 + MOVQ (SI), X9 + PINSRQ $0x01, 64(SI), X9 + MOVQ 96(SI), X10 + PINSRQ $0x01, 80(SI), X10 + MOVQ 88(SI), X11 + PINSRQ $0x01, 24(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 32(SI), X8 + PINSRQ $0x01, 56(SI), X8 + MOVQ 120(SI), X9 + PINSRQ $0x01, 8(SI), X9 + MOVQ 104(SI), X10 + PINSRQ $0x01, 40(SI), X10 + MOVQ 112(SI), X11 + PINSRQ $0x01, 72(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 96(SI), X8 + PINSRQ $0x01, 8(SI), X8 + MOVQ 112(SI), X9 + PINSRQ $0x01, 32(SI), X9 + MOVQ 40(SI), X10 + PINSRQ $0x01, 120(SI), X10 + MOVQ 104(SI), X11 + PINSRQ $0x01, 80(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ (SI), X8 + PINSRQ $0x01, 48(SI), X8 + MOVQ 72(SI), X9 + PINSRQ $0x01, 64(SI), X9 + MOVQ 56(SI), X10 + PINSRQ $0x01, 24(SI), X10 + MOVQ 16(SI), X11 + PINSRQ $0x01, 88(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 104(SI), X8 + PINSRQ $0x01, 56(SI), X8 + MOVQ 96(SI), X9 + PINSRQ $0x01, 24(SI), X9 + MOVQ 88(SI), X10 + PINSRQ $0x01, 112(SI), X10 + MOVQ 8(SI), X11 + PINSRQ $0x01, 72(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 40(SI), X8 + PINSRQ $0x01, 120(SI), X8 + MOVQ 64(SI), X9 + PINSRQ $0x01, 16(SI), X9 + MOVQ (SI), X10 + PINSRQ $0x01, 32(SI), X10 + MOVQ 48(SI), X11 + PINSRQ $0x01, 80(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 48(SI), X8 + PINSRQ $0x01, 112(SI), X8 + MOVQ 88(SI), X9 + PINSRQ $0x01, (SI), X9 + MOVQ 120(SI), X10 + PINSRQ $0x01, 72(SI), X10 + MOVQ 24(SI), X11 + PINSRQ $0x01, 64(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 96(SI), X8 + PINSRQ $0x01, 104(SI), X8 + MOVQ 8(SI), X9 + PINSRQ $0x01, 80(SI), X9 + MOVQ 16(SI), X10 + PINSRQ $0x01, 56(SI), X10 + MOVQ 32(SI), X11 + PINSRQ $0x01, 40(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVQ 80(SI), X8 + PINSRQ $0x01, 64(SI), X8 + MOVQ 56(SI), X9 + PINSRQ $0x01, 8(SI), X9 + MOVQ 16(SI), X10 + PINSRQ $0x01, 32(SI), X10 + MOVQ 48(SI), X11 + PINSRQ $0x01, 40(SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + MOVQ 120(SI), X8 + PINSRQ $0x01, 72(SI), X8 + MOVQ 24(SI), X9 + PINSRQ $0x01, 104(SI), X9 + MOVQ 88(SI), X10 + PINSRQ $0x01, 112(SI), X10 + MOVQ 96(SI), X11 + PINSRQ $0x01, (SI), X11 + PADDQ X8, X0 + PADDQ X9, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ X10, X0 + PADDQ X11, X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + PADDQ 16(R10), X0 + PADDQ 32(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ 48(R10), X0 + PADDQ 64(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + PADDQ 80(R10), X0 + PADDQ 96(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ 112(R10), X0 + PADDQ 128(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + PADDQ 144(R10), X0 + PADDQ 160(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ 176(R10), X0 + PADDQ 192(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X6, X8 + PUNPCKLQDQ X6, X9 + PUNPCKHQDQ X7, X6 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X7, X9 + MOVO X8, X7 + MOVO X2, X8 + PUNPCKHQDQ X9, X7 + PUNPCKLQDQ X3, X9 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X3 + PADDQ 208(R10), X0 + PADDQ 224(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFD $0xb1, X6, X6 + PSHUFD $0xb1, X7, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + PSHUFB X13, X2 + PSHUFB X13, X3 + PADDQ 240(R10), X0 + PADDQ 256(R10), X1 + PADDQ X2, X0 + PADDQ X3, X1 + PXOR X0, X6 + PXOR X1, X7 + PSHUFB X14, X6 + PSHUFB X14, X7 + PADDQ X6, X4 + PADDQ X7, X5 + PXOR X4, X2 + PXOR X5, X3 + MOVOU X2, X11 + PADDQ X2, X11 + PSRLQ $0x3f, X2 + PXOR X11, X2 + MOVOU X3, X11 + PADDQ X3, X11 + PSRLQ $0x3f, X3 + PXOR X11, X3 + MOVO X4, X8 + MOVO X5, X4 + MOVO X8, X5 + MOVO X2, X8 + PUNPCKLQDQ X2, X9 + PUNPCKHQDQ X3, X2 + PUNPCKHQDQ X9, X2 + PUNPCKLQDQ X3, X9 + MOVO X8, X3 + MOVO X6, X8 + PUNPCKHQDQ X9, X3 + PUNPCKLQDQ X7, X9 + PUNPCKHQDQ X9, X6 + PUNPCKLQDQ X8, X9 + PUNPCKHQDQ X9, X7 + MOVOU 32(AX), X10 + MOVOU 48(AX), X11 + PXOR X0, X12 + PXOR X1, X15 + PXOR X2, X10 + PXOR X3, X11 + PXOR X4, X12 + PXOR X5, X15 + PXOR X6, X10 + PXOR X7, X11 + MOVOU X10, 32(AX) + MOVOU X11, 48(AX) + LEAQ 128(SI), SI + SUBQ $0x80, DI + JNE loop + MOVOU X12, (AX) + MOVOU X15, 16(AX) + MOVQ R8, (BX) + MOVQ R9, 8(BX) + RET - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 144(R10), 160(R10), 176(R10), 192(R10), X11, X13, X14) - SHUFFLE(X2, X3, X4, X5, X6, X7, X8, X9) - HALF_ROUND(X0, X1, X2, X3, X4, X5, X6, X7, 208(R10), 224(R10), 240(R10), 256(R10), X11, X13, X14) - SHUFFLE_INV(X2, X3, X4, X5, X6, X7, X8, X9) +DATA ·iv3<>+0(SB)/8, $0x1f83d9abfb41bd6b +DATA ·iv3<>+8(SB)/8, $0x5be0cd19137e2179 +GLOBL ·iv3<>(SB), RODATA|NOPTR, $16 - MOVOU 32(AX), X10 - MOVOU 48(AX), X11 - PXOR X0, X12 - PXOR X1, X15 - PXOR X2, X10 - PXOR X3, X11 - PXOR X4, X12 - PXOR X5, X15 - PXOR X6, X10 - PXOR X7, X11 - MOVOU X10, 32(AX) - MOVOU X11, 48(AX) +DATA ·c40<>+0(SB)/8, $0x0201000706050403 +DATA ·c40<>+8(SB)/8, $0x0a09080f0e0d0c0b +GLOBL ·c40<>(SB), RODATA|NOPTR, $16 - LEAQ 128(SI), SI - SUBQ $128, DI - JNE loop +DATA ·c48<>+0(SB)/8, $0x0100070605040302 +DATA ·c48<>+8(SB)/8, $0x09080f0e0d0c0b0a +GLOBL ·c48<>(SB), RODATA|NOPTR, $16 - MOVOU X12, 0(AX) - MOVOU X15, 16(AX) +DATA ·iv0<>+0(SB)/8, $0x6a09e667f3bcc908 +DATA ·iv0<>+8(SB)/8, $0xbb67ae8584caa73b +GLOBL ·iv0<>(SB), RODATA|NOPTR, $16 - MOVQ R8, 0(BX) - MOVQ R9, 8(BX) +DATA ·iv1<>+0(SB)/8, $0x3c6ef372fe94f82b +DATA ·iv1<>+8(SB)/8, $0xa54ff53a5f1d36f1 +GLOBL ·iv1<>(SB), RODATA|NOPTR, $16 - RET +DATA ·iv2<>+0(SB)/8, $0x510e527fade682d1 +DATA ·iv2<>+8(SB)/8, $0x9b05688c2b3e6c1f +GLOBL ·iv2<>(SB), RODATA|NOPTR, $16 diff --git a/vendor/golang.org/x/crypto/blowfish/cipher.go b/vendor/golang.org/x/crypto/blowfish/cipher.go index 213bf204a..089895680 100644 --- a/vendor/golang.org/x/crypto/blowfish/cipher.go +++ b/vendor/golang.org/x/crypto/blowfish/cipher.go @@ -11,7 +11,7 @@ // Deprecated: any new system should use AES (from crypto/aes, if necessary in // an AEAD mode like crypto/cipher.NewGCM) or XChaCha20-Poly1305 (from // golang.org/x/crypto/chacha20poly1305). -package blowfish // import "golang.org/x/crypto/blowfish" +package blowfish // The code is a port of Bruce Schneier's C implementation. // See https://www.schneier.com/blowfish.html. diff --git a/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go b/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go index 93da7322b..8cf5d8112 100644 --- a/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go +++ b/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305.go @@ -5,7 +5,7 @@ // Package chacha20poly1305 implements the ChaCha20-Poly1305 AEAD and its // extended nonce variant XChaCha20-Poly1305, as specified in RFC 8439 and // draft-irtf-cfrg-xchacha-01. -package chacha20poly1305 // import "golang.org/x/crypto/chacha20poly1305" +package chacha20poly1305 import ( "crypto/cipher" diff --git a/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s b/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s index 731d2ac6d..fd5ee845f 100644 --- a/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s +++ b/vendor/golang.org/x/crypto/chacha20poly1305/chacha20poly1305_amd64.s @@ -1,2715 +1,9762 @@ -// Copyright 2016 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// This file was originally from https://golang.org/cl/24717 by Vlad Krasnov of CloudFlare. +// Code generated by command: go run chacha20poly1305_amd64_asm.go -out ../chacha20poly1305_amd64.s -pkg chacha20poly1305. DO NOT EDIT. //go:build gc && !purego #include "textflag.h" -// General register allocation -#define oup DI -#define inp SI -#define inl BX -#define adp CX // free to reuse, after we hash the additional data -#define keyp R8 // free to reuse, when we copy the key to stack -#define itr2 R9 // general iterator -#define itr1 CX // general iterator -#define acc0 R10 -#define acc1 R11 -#define acc2 R12 -#define t0 R13 -#define t1 R14 -#define t2 R15 -#define t3 R8 -// Register and stack allocation for the SSE code -#define rStore (0*16)(BP) -#define sStore (1*16)(BP) -#define state1Store (2*16)(BP) -#define state2Store (3*16)(BP) -#define tmpStore (4*16)(BP) -#define ctr0Store (5*16)(BP) -#define ctr1Store (6*16)(BP) -#define ctr2Store (7*16)(BP) -#define ctr3Store (8*16)(BP) -#define A0 X0 -#define A1 X1 -#define A2 X2 -#define B0 X3 -#define B1 X4 -#define B2 X5 -#define C0 X6 -#define C1 X7 -#define C2 X8 -#define D0 X9 -#define D1 X10 -#define D2 X11 -#define T0 X12 -#define T1 X13 -#define T2 X14 -#define T3 X15 -#define A3 T0 -#define B3 T1 -#define C3 T2 -#define D3 T3 -// Register and stack allocation for the AVX2 code -#define rsStoreAVX2 (0*32)(BP) -#define state1StoreAVX2 (1*32)(BP) -#define state2StoreAVX2 (2*32)(BP) -#define ctr0StoreAVX2 (3*32)(BP) -#define ctr1StoreAVX2 (4*32)(BP) -#define ctr2StoreAVX2 (5*32)(BP) -#define ctr3StoreAVX2 (6*32)(BP) -#define tmpStoreAVX2 (7*32)(BP) // 256 bytes on stack -#define AA0 Y0 -#define AA1 Y5 -#define AA2 Y6 -#define AA3 Y7 -#define BB0 Y14 -#define BB1 Y9 -#define BB2 Y10 -#define BB3 Y11 -#define CC0 Y12 -#define CC1 Y13 -#define CC2 Y8 -#define CC3 Y15 -#define DD0 Y4 -#define DD1 Y1 -#define DD2 Y2 -#define DD3 Y3 -#define TT0 DD3 -#define TT1 AA3 -#define TT2 BB3 -#define TT3 CC3 -// ChaCha20 constants -DATA ·chacha20Constants<>+0x00(SB)/4, $0x61707865 -DATA ·chacha20Constants<>+0x04(SB)/4, $0x3320646e -DATA ·chacha20Constants<>+0x08(SB)/4, $0x79622d32 -DATA ·chacha20Constants<>+0x0c(SB)/4, $0x6b206574 -DATA ·chacha20Constants<>+0x10(SB)/4, $0x61707865 -DATA ·chacha20Constants<>+0x14(SB)/4, $0x3320646e -DATA ·chacha20Constants<>+0x18(SB)/4, $0x79622d32 -DATA ·chacha20Constants<>+0x1c(SB)/4, $0x6b206574 -// <<< 16 with PSHUFB -DATA ·rol16<>+0x00(SB)/8, $0x0504070601000302 -DATA ·rol16<>+0x08(SB)/8, $0x0D0C0F0E09080B0A -DATA ·rol16<>+0x10(SB)/8, $0x0504070601000302 -DATA ·rol16<>+0x18(SB)/8, $0x0D0C0F0E09080B0A -// <<< 8 with PSHUFB -DATA ·rol8<>+0x00(SB)/8, $0x0605040702010003 -DATA ·rol8<>+0x08(SB)/8, $0x0E0D0C0F0A09080B -DATA ·rol8<>+0x10(SB)/8, $0x0605040702010003 -DATA ·rol8<>+0x18(SB)/8, $0x0E0D0C0F0A09080B - -DATA ·avx2InitMask<>+0x00(SB)/8, $0x0 -DATA ·avx2InitMask<>+0x08(SB)/8, $0x0 -DATA ·avx2InitMask<>+0x10(SB)/8, $0x1 -DATA ·avx2InitMask<>+0x18(SB)/8, $0x0 - -DATA ·avx2IncMask<>+0x00(SB)/8, $0x2 -DATA ·avx2IncMask<>+0x08(SB)/8, $0x0 -DATA ·avx2IncMask<>+0x10(SB)/8, $0x2 -DATA ·avx2IncMask<>+0x18(SB)/8, $0x0 -// Poly1305 key clamp -DATA ·polyClampMask<>+0x00(SB)/8, $0x0FFFFFFC0FFFFFFF -DATA ·polyClampMask<>+0x08(SB)/8, $0x0FFFFFFC0FFFFFFC -DATA ·polyClampMask<>+0x10(SB)/8, $0xFFFFFFFFFFFFFFFF -DATA ·polyClampMask<>+0x18(SB)/8, $0xFFFFFFFFFFFFFFFF - -DATA ·sseIncMask<>+0x00(SB)/8, $0x1 -DATA ·sseIncMask<>+0x08(SB)/8, $0x0 -// To load/store the last < 16 bytes in a buffer -DATA ·andMask<>+0x00(SB)/8, $0x00000000000000ff -DATA ·andMask<>+0x08(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x10(SB)/8, $0x000000000000ffff -DATA ·andMask<>+0x18(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x20(SB)/8, $0x0000000000ffffff -DATA ·andMask<>+0x28(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x30(SB)/8, $0x00000000ffffffff -DATA ·andMask<>+0x38(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x40(SB)/8, $0x000000ffffffffff -DATA ·andMask<>+0x48(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x50(SB)/8, $0x0000ffffffffffff -DATA ·andMask<>+0x58(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x60(SB)/8, $0x00ffffffffffffff -DATA ·andMask<>+0x68(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x70(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0x78(SB)/8, $0x0000000000000000 -DATA ·andMask<>+0x80(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0x88(SB)/8, $0x00000000000000ff -DATA ·andMask<>+0x90(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0x98(SB)/8, $0x000000000000ffff -DATA ·andMask<>+0xa0(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0xa8(SB)/8, $0x0000000000ffffff -DATA ·andMask<>+0xb0(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0xb8(SB)/8, $0x00000000ffffffff -DATA ·andMask<>+0xc0(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0xc8(SB)/8, $0x000000ffffffffff -DATA ·andMask<>+0xd0(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0xd8(SB)/8, $0x0000ffffffffffff -DATA ·andMask<>+0xe0(SB)/8, $0xffffffffffffffff -DATA ·andMask<>+0xe8(SB)/8, $0x00ffffffffffffff - -GLOBL ·chacha20Constants<>(SB), (NOPTR+RODATA), $32 -GLOBL ·rol16<>(SB), (NOPTR+RODATA), $32 -GLOBL ·rol8<>(SB), (NOPTR+RODATA), $32 -GLOBL ·sseIncMask<>(SB), (NOPTR+RODATA), $16 -GLOBL ·avx2IncMask<>(SB), (NOPTR+RODATA), $32 -GLOBL ·avx2InitMask<>(SB), (NOPTR+RODATA), $32 -GLOBL ·polyClampMask<>(SB), (NOPTR+RODATA), $32 -GLOBL ·andMask<>(SB), (NOPTR+RODATA), $240 -// No PALIGNR in Go ASM yet (but VPALIGNR is present). -#define shiftB0Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x04 // PALIGNR $4, X3, X3 -#define shiftB1Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xe4; BYTE $0x04 // PALIGNR $4, X4, X4 -#define shiftB2Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x04 // PALIGNR $4, X5, X5 -#define shiftB3Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x04 // PALIGNR $4, X13, X13 -#define shiftC0Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xf6; BYTE $0x08 // PALIGNR $8, X6, X6 -#define shiftC1Left BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xff; BYTE $0x08 // PALIGNR $8, X7, X7 -#define shiftC2Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xc0; BYTE $0x08 // PALIGNR $8, X8, X8 -#define shiftC3Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xf6; BYTE $0x08 // PALIGNR $8, X14, X14 -#define shiftD0Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xc9; BYTE $0x0c // PALIGNR $12, X9, X9 -#define shiftD1Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xd2; BYTE $0x0c // PALIGNR $12, X10, X10 -#define shiftD2Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x0c // PALIGNR $12, X11, X11 -#define shiftD3Left BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xff; BYTE $0x0c // PALIGNR $12, X15, X15 -#define shiftB0Right BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x0c // PALIGNR $12, X3, X3 -#define shiftB1Right BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xe4; BYTE $0x0c // PALIGNR $12, X4, X4 -#define shiftB2Right BYTE $0x66; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x0c // PALIGNR $12, X5, X5 -#define shiftB3Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xed; BYTE $0x0c // PALIGNR $12, X13, X13 -#define shiftC0Right shiftC0Left -#define shiftC1Right shiftC1Left -#define shiftC2Right shiftC2Left -#define shiftC3Right shiftC3Left -#define shiftD0Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xc9; BYTE $0x04 // PALIGNR $4, X9, X9 -#define shiftD1Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xd2; BYTE $0x04 // PALIGNR $4, X10, X10 -#define shiftD2Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xdb; BYTE $0x04 // PALIGNR $4, X11, X11 -#define shiftD3Right BYTE $0x66; BYTE $0x45; BYTE $0x0f; BYTE $0x3a; BYTE $0x0f; BYTE $0xff; BYTE $0x04 // PALIGNR $4, X15, X15 - -// Some macros - -// ROL rotates the uint32s in register R left by N bits, using temporary T. -#define ROL(N, R, T) \ - MOVO R, T; PSLLL $(N), T; PSRLL $(32-(N)), R; PXOR T, R - -// ROL16 rotates the uint32s in register R left by 16, using temporary T if needed. -#ifdef GOAMD64_v2 -#define ROL16(R, T) PSHUFB ·rol16<>(SB), R -#else -#define ROL16(R, T) ROL(16, R, T) -#endif - -// ROL8 rotates the uint32s in register R left by 8, using temporary T if needed. -#ifdef GOAMD64_v2 -#define ROL8(R, T) PSHUFB ·rol8<>(SB), R -#else -#define ROL8(R, T) ROL(8, R, T) -#endif - -#define chachaQR(A, B, C, D, T) \ - PADDD B, A; PXOR A, D; ROL16(D, T) \ - PADDD D, C; PXOR C, B; MOVO B, T; PSLLL $12, T; PSRLL $20, B; PXOR T, B \ - PADDD B, A; PXOR A, D; ROL8(D, T) \ - PADDD D, C; PXOR C, B; MOVO B, T; PSLLL $7, T; PSRLL $25, B; PXOR T, B - -#define chachaQR_AVX2(A, B, C, D, T) \ - VPADDD B, A, A; VPXOR A, D, D; VPSHUFB ·rol16<>(SB), D, D \ - VPADDD D, C, C; VPXOR C, B, B; VPSLLD $12, B, T; VPSRLD $20, B, B; VPXOR T, B, B \ - VPADDD B, A, A; VPXOR A, D, D; VPSHUFB ·rol8<>(SB), D, D \ - VPADDD D, C, C; VPXOR C, B, B; VPSLLD $7, B, T; VPSRLD $25, B, B; VPXOR T, B, B - -#define polyAdd(S) ADDQ S, acc0; ADCQ 8+S, acc1; ADCQ $1, acc2 -#define polyMulStage1 MOVQ (0*8)(BP), AX; MOVQ AX, t2; MULQ acc0; MOVQ AX, t0; MOVQ DX, t1; MOVQ (0*8)(BP), AX; MULQ acc1; IMULQ acc2, t2; ADDQ AX, t1; ADCQ DX, t2 -#define polyMulStage2 MOVQ (1*8)(BP), AX; MOVQ AX, t3; MULQ acc0; ADDQ AX, t1; ADCQ $0, DX; MOVQ DX, acc0; MOVQ (1*8)(BP), AX; MULQ acc1; ADDQ AX, t2; ADCQ $0, DX -#define polyMulStage3 IMULQ acc2, t3; ADDQ acc0, t2; ADCQ DX, t3 -#define polyMulReduceStage MOVQ t0, acc0; MOVQ t1, acc1; MOVQ t2, acc2; ANDQ $3, acc2; MOVQ t2, t0; ANDQ $-4, t0; MOVQ t3, t1; SHRQ $2, t3, t2; SHRQ $2, t3; ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $0, acc2; ADDQ t2, acc0; ADCQ t3, acc1; ADCQ $0, acc2 - -#define polyMulStage1_AVX2 MOVQ (0*8)(BP), DX; MOVQ DX, t2; MULXQ acc0, t0, t1; IMULQ acc2, t2; MULXQ acc1, AX, DX; ADDQ AX, t1; ADCQ DX, t2 -#define polyMulStage2_AVX2 MOVQ (1*8)(BP), DX; MULXQ acc0, acc0, AX; ADDQ acc0, t1; MULXQ acc1, acc1, t3; ADCQ acc1, t2; ADCQ $0, t3 -#define polyMulStage3_AVX2 IMULQ acc2, DX; ADDQ AX, t2; ADCQ DX, t3 - -#define polyMul polyMulStage1; polyMulStage2; polyMulStage3; polyMulReduceStage -#define polyMulAVX2 polyMulStage1_AVX2; polyMulStage2_AVX2; polyMulStage3_AVX2; polyMulReduceStage -// ---------------------------------------------------------------------------- + +// func polyHashADInternal<>() TEXT polyHashADInternal<>(SB), NOSPLIT, $0 - // adp points to beginning of additional data - // itr2 holds ad length - XORQ acc0, acc0 - XORQ acc1, acc1 - XORQ acc2, acc2 - CMPQ itr2, $13 - JNE hashADLoop - -openFastTLSAD: - // Special treatment for the TLS case of 13 bytes - MOVQ (adp), acc0 - MOVQ 5(adp), acc1 - SHRQ $24, acc1 - MOVQ $1, acc2 - polyMul + // Hack: Must declare #define macros inside of a function due to Avo constraints + // ROL rotates the uint32s in register R left by N bits, using temporary T. + #define ROL(N, R, T) \ + MOVO R, T; \ + PSLLL $(N), T; \ + PSRLL $(32-(N)), R; \ + PXOR T, R + + // ROL8 rotates the uint32s in register R left by 8, using temporary T if needed. + #ifdef GOAMD64_v2 + #define ROL8(R, T) PSHUFB ·rol8<>(SB), R + #else + #define ROL8(R, T) ROL(8, R, T) + #endif + + // ROL16 rotates the uint32s in register R left by 16, using temporary T if needed. + #ifdef GOAMD64_v2 + #define ROL16(R, T) PSHUFB ·rol16<>(SB), R + #else + #define ROL16(R, T) ROL(16, R, T) + #endif + XORQ R10, R10 + XORQ R11, R11 + XORQ R12, R12 + CMPQ R9, $0x0d + JNE hashADLoop + MOVQ (CX), R10 + MOVQ 5(CX), R11 + SHRQ $0x18, R11 + MOVQ $0x00000001, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 RET hashADLoop: // Hash in 16 byte chunks - CMPQ itr2, $16 - JB hashADTail - polyAdd(0(adp)) - LEAQ (1*16)(adp), adp - SUBQ $16, itr2 - polyMul - JMP hashADLoop + CMPQ R9, $0x10 + JB hashADTail + ADDQ (CX), R10 + ADCQ 8(CX), R11 + ADCQ $0x01, R12 + LEAQ 16(CX), CX + SUBQ $0x10, R9 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + JMP hashADLoop hashADTail: - CMPQ itr2, $0 + CMPQ R9, $0x00 JE hashADDone // Hash last < 16 byte tail - XORQ t0, t0 - XORQ t1, t1 - XORQ t2, t2 - ADDQ itr2, adp + XORQ R13, R13 + XORQ R14, R14 + XORQ R15, R15 + ADDQ R9, CX hashADTailLoop: - SHLQ $8, t0, t1 - SHLQ $8, t0 - MOVB -1(adp), t2 - XORQ t2, t0 - DECQ adp - DECQ itr2 - JNE hashADTailLoop - -hashADTailFinish: - ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2 - polyMul - - // Finished AD + SHLQ $0x08, R13, R14 + SHLQ $0x08, R13 + MOVB -1(CX), R15 + XORQ R15, R13 + DECQ CX + DECQ R9 + JNE hashADTailLoop + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + hashADDone: RET -// ---------------------------------------------------------------------------- -// func chacha20Poly1305Open(dst, key, src, ad []byte) bool -TEXT ·chacha20Poly1305Open(SB), 0, $288-97 +// func chacha20Poly1305Open(dst []byte, key []uint32, src []byte, ad []byte) bool +// Requires: AVX, AVX2, BMI2, CMOV, SSE2 +TEXT ·chacha20Poly1305Open(SB), $288-97 // For aligned stack access MOVQ SP, BP - ADDQ $32, BP + ADDQ $0x20, BP ANDQ $-32, BP - MOVQ dst+0(FP), oup - MOVQ key+24(FP), keyp - MOVQ src+48(FP), inp - MOVQ src_len+56(FP), inl - MOVQ ad+72(FP), adp + MOVQ dst_base+0(FP), DI + MOVQ key_base+24(FP), R8 + MOVQ src_base+48(FP), SI + MOVQ src_len+56(FP), BX + MOVQ ad_base+72(FP), CX // Check for AVX2 support - CMPB ·useAVX2(SB), $1 + CMPB ·useAVX2+0(SB), $0x01 JE chacha20Poly1305Open_AVX2 // Special optimization, for very short buffers - CMPQ inl, $128 - JBE openSSE128 // About 16% faster + CMPQ BX, $0x80 + JBE openSSE128 // For long buffers, prepare the poly key first - MOVOU ·chacha20Constants<>(SB), A0 - MOVOU (1*16)(keyp), B0 - MOVOU (2*16)(keyp), C0 - MOVOU (3*16)(keyp), D0 - MOVO D0, T1 + MOVOU ·chacha20Constants<>+0(SB), X0 + MOVOU 16(R8), X3 + MOVOU 32(R8), X6 + MOVOU 48(R8), X9 + MOVO X9, X13 // Store state on stack for future use - MOVO B0, state1Store - MOVO C0, state2Store - MOVO D0, ctr3Store - MOVQ $10, itr2 + MOVO X3, 32(BP) + MOVO X6, 48(BP) + MOVO X9, 128(BP) + MOVQ $0x0000000a, R9 openSSEPreparePolyKey: - chachaQR(A0, B0, C0, D0, T0) - shiftB0Left; shiftC0Left; shiftD0Left - chachaQR(A0, B0, C0, D0, T0) - shiftB0Right; shiftC0Right; shiftD0Right - DECQ itr2 - JNE openSSEPreparePolyKey + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x0c + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x04 + DECQ R9 + JNE openSSEPreparePolyKey // A0|B0 hold the Poly1305 32-byte key, C0,D0 can be discarded - PADDL ·chacha20Constants<>(SB), A0; PADDL state1Store, B0 + PADDL ·chacha20Constants<>+0(SB), X0 + PADDL 32(BP), X3 // Clamp and store the key - PAND ·polyClampMask<>(SB), A0 - MOVO A0, rStore; MOVO B0, sStore + PAND ·polyClampMask<>+0(SB), X0 + MOVO X0, (BP) + MOVO X3, 16(BP) // Hash AAD - MOVQ ad_len+80(FP), itr2 + MOVQ ad_len+80(FP), R9 CALL polyHashADInternal<>(SB) openSSEMainLoop: - CMPQ inl, $256 + CMPQ BX, $0x00000100 JB openSSEMainLoopDone // Load state, increment counter blocks - MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0 - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1 - MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2 - MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL ·sseIncMask<>(SB), D3 + MOVO ·chacha20Constants<>+0(SB), X0 + MOVO 32(BP), X3 + MOVO 48(BP), X6 + MOVO 128(BP), X9 + PADDL ·sseIncMask<>+0(SB), X9 + MOVO X0, X1 + MOVO X3, X4 + MOVO X6, X7 + MOVO X9, X10 + PADDL ·sseIncMask<>+0(SB), X10 + MOVO X1, X2 + MOVO X4, X5 + MOVO X7, X8 + MOVO X10, X11 + PADDL ·sseIncMask<>+0(SB), X11 + MOVO X2, X12 + MOVO X5, X13 + MOVO X8, X14 + MOVO X11, X15 + PADDL ·sseIncMask<>+0(SB), X15 // Store counters - MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store + MOVO X9, 80(BP) + MOVO X10, 96(BP) + MOVO X11, 112(BP) + MOVO X15, 128(BP) - // There are 10 ChaCha20 iterations of 2QR each, so for 6 iterations we hash 2 blocks, and for the remaining 4 only 1 block - for a total of 16 - MOVQ $4, itr1 - MOVQ inp, itr2 + // There are 10 ChaCha20 iterations of 2QR each, so for 6 iterations we hash + // 2 blocks, and for the remaining 4 only 1 block - for a total of 16 + MOVQ $0x00000004, CX + MOVQ SI, R9 openSSEInternalLoop: - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - polyAdd(0(itr2)) - shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left - shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left - shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left - polyMulStage1 - polyMulStage2 - LEAQ (2*8)(itr2), itr2 - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - polyMulStage3 - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - polyMulReduceStage - shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right - shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right - shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right - DECQ itr1 - JGE openSSEInternalLoop - - polyAdd(0(itr2)) - polyMul - LEAQ (2*8)(itr2), itr2 - - CMPQ itr1, $-6 - JG openSSEInternalLoop + MOVO X14, 64(BP) + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X3 + PXOR X14, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X3 + PXOR X14, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X4 + PXOR X14, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X4 + PXOR X14, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X5 + PXOR X14, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X5 + PXOR X14, X5 + MOVO 64(BP), X14 + MOVO X7, 64(BP) + PADDD X13, X12 + PXOR X12, X15 + ROL16(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x0c, X7 + PSRLL $0x14, X13 + PXOR X7, X13 + PADDD X13, X12 + PXOR X12, X15 + ROL8(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x07, X7 + PSRLL $0x19, X13 + PXOR X7, X13 + MOVO 64(BP), X7 + ADDQ (R9), R10 + ADCQ 8(R9), R11 + ADCQ $0x01, R12 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x0c + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + LEAQ 16(R9), R9 + MOVO X14, 64(BP) + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X3 + PXOR X14, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X3 + PXOR X14, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X4 + PXOR X14, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X4 + PXOR X14, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X5 + PXOR X14, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X5 + PXOR X14, X5 + MOVO 64(BP), X14 + MOVO X7, 64(BP) + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + PADDD X13, X12 + PXOR X12, X15 + ROL16(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x0c, X7 + PSRLL $0x14, X13 + PXOR X7, X13 + PADDD X13, X12 + PXOR X12, X15 + ROL8(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x07, X7 + PSRLL $0x19, X13 + PXOR X7, X13 + MOVO 64(BP), X7 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x04 + DECQ CX + JGE openSSEInternalLoop + ADDQ (R9), R10 + ADCQ 8(R9), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(R9), R9 + CMPQ CX, $-6 + JG openSSEInternalLoop // Add in the state - PADDD ·chacha20Constants<>(SB), A0; PADDD ·chacha20Constants<>(SB), A1; PADDD ·chacha20Constants<>(SB), A2; PADDD ·chacha20Constants<>(SB), A3 - PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3 - PADDD state2Store, C0; PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3 - PADDD ctr0Store, D0; PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3 + PADDD ·chacha20Constants<>+0(SB), X0 + PADDD ·chacha20Constants<>+0(SB), X1 + PADDD ·chacha20Constants<>+0(SB), X2 + PADDD ·chacha20Constants<>+0(SB), X12 + PADDD 32(BP), X3 + PADDD 32(BP), X4 + PADDD 32(BP), X5 + PADDD 32(BP), X13 + PADDD 48(BP), X6 + PADDD 48(BP), X7 + PADDD 48(BP), X8 + PADDD 48(BP), X14 + PADDD 80(BP), X9 + PADDD 96(BP), X10 + PADDD 112(BP), X11 + PADDD 128(BP), X15 // Load - xor - store - MOVO D3, tmpStore - MOVOU (0*16)(inp), D3; PXOR D3, A0; MOVOU A0, (0*16)(oup) - MOVOU (1*16)(inp), D3; PXOR D3, B0; MOVOU B0, (1*16)(oup) - MOVOU (2*16)(inp), D3; PXOR D3, C0; MOVOU C0, (2*16)(oup) - MOVOU (3*16)(inp), D3; PXOR D3, D0; MOVOU D0, (3*16)(oup) - MOVOU (4*16)(inp), D0; PXOR D0, A1; MOVOU A1, (4*16)(oup) - MOVOU (5*16)(inp), D0; PXOR D0, B1; MOVOU B1, (5*16)(oup) - MOVOU (6*16)(inp), D0; PXOR D0, C1; MOVOU C1, (6*16)(oup) - MOVOU (7*16)(inp), D0; PXOR D0, D1; MOVOU D1, (7*16)(oup) - MOVOU (8*16)(inp), D0; PXOR D0, A2; MOVOU A2, (8*16)(oup) - MOVOU (9*16)(inp), D0; PXOR D0, B2; MOVOU B2, (9*16)(oup) - MOVOU (10*16)(inp), D0; PXOR D0, C2; MOVOU C2, (10*16)(oup) - MOVOU (11*16)(inp), D0; PXOR D0, D2; MOVOU D2, (11*16)(oup) - MOVOU (12*16)(inp), D0; PXOR D0, A3; MOVOU A3, (12*16)(oup) - MOVOU (13*16)(inp), D0; PXOR D0, B3; MOVOU B3, (13*16)(oup) - MOVOU (14*16)(inp), D0; PXOR D0, C3; MOVOU C3, (14*16)(oup) - MOVOU (15*16)(inp), D0; PXOR tmpStore, D0; MOVOU D0, (15*16)(oup) - LEAQ 256(inp), inp - LEAQ 256(oup), oup - SUBQ $256, inl + MOVO X15, 64(BP) + MOVOU (SI), X15 + PXOR X15, X0 + MOVOU X0, (DI) + MOVOU 16(SI), X15 + PXOR X15, X3 + MOVOU X3, 16(DI) + MOVOU 32(SI), X15 + PXOR X15, X6 + MOVOU X6, 32(DI) + MOVOU 48(SI), X15 + PXOR X15, X9 + MOVOU X9, 48(DI) + MOVOU 64(SI), X9 + PXOR X9, X1 + MOVOU X1, 64(DI) + MOVOU 80(SI), X9 + PXOR X9, X4 + MOVOU X4, 80(DI) + MOVOU 96(SI), X9 + PXOR X9, X7 + MOVOU X7, 96(DI) + MOVOU 112(SI), X9 + PXOR X9, X10 + MOVOU X10, 112(DI) + MOVOU 128(SI), X9 + PXOR X9, X2 + MOVOU X2, 128(DI) + MOVOU 144(SI), X9 + PXOR X9, X5 + MOVOU X5, 144(DI) + MOVOU 160(SI), X9 + PXOR X9, X8 + MOVOU X8, 160(DI) + MOVOU 176(SI), X9 + PXOR X9, X11 + MOVOU X11, 176(DI) + MOVOU 192(SI), X9 + PXOR X9, X12 + MOVOU X12, 192(DI) + MOVOU 208(SI), X9 + PXOR X9, X13 + MOVOU X13, 208(DI) + MOVOU 224(SI), X9 + PXOR X9, X14 + MOVOU X14, 224(DI) + MOVOU 240(SI), X9 + PXOR 64(BP), X9 + MOVOU X9, 240(DI) + LEAQ 256(SI), SI + LEAQ 256(DI), DI + SUBQ $0x00000100, BX JMP openSSEMainLoop openSSEMainLoopDone: // Handle the various tail sizes efficiently - TESTQ inl, inl + TESTQ BX, BX JE openSSEFinalize - CMPQ inl, $64 + CMPQ BX, $0x40 JBE openSSETail64 - CMPQ inl, $128 + CMPQ BX, $0x80 JBE openSSETail128 - CMPQ inl, $192 + CMPQ BX, $0xc0 JBE openSSETail192 JMP openSSETail256 openSSEFinalize: // Hash in the PT, AAD lengths - ADDQ ad_len+80(FP), acc0; ADCQ src_len+56(FP), acc1; ADCQ $1, acc2 - polyMul + ADDQ ad_len+80(FP), R10 + ADCQ src_len+56(FP), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 // Final reduce - MOVQ acc0, t0 - MOVQ acc1, t1 - MOVQ acc2, t2 - SUBQ $-5, acc0 - SBBQ $-1, acc1 - SBBQ $3, acc2 - CMOVQCS t0, acc0 - CMOVQCS t1, acc1 - CMOVQCS t2, acc2 + MOVQ R10, R13 + MOVQ R11, R14 + MOVQ R12, R15 + SUBQ $-5, R10 + SBBQ $-1, R11 + SBBQ $0x03, R12 + CMOVQCS R13, R10 + CMOVQCS R14, R11 + CMOVQCS R15, R12 // Add in the "s" part of the key - ADDQ 0+sStore, acc0 - ADCQ 8+sStore, acc1 + ADDQ 16(BP), R10 + ADCQ 24(BP), R11 // Finally, constant time compare to the tag at the end of the message XORQ AX, AX - MOVQ $1, DX - XORQ (0*8)(inp), acc0 - XORQ (1*8)(inp), acc1 - ORQ acc1, acc0 + MOVQ $0x00000001, DX + XORQ (SI), R10 + XORQ 8(SI), R11 + ORQ R11, R10 CMOVQEQ DX, AX // Return true iff tags are equal MOVB AX, ret+96(FP) RET -// ---------------------------------------------------------------------------- -// Special optimization for buffers smaller than 129 bytes openSSE128: - // For up to 128 bytes of ciphertext and 64 bytes for the poly key, we require to process three blocks - MOVOU ·chacha20Constants<>(SB), A0; MOVOU (1*16)(keyp), B0; MOVOU (2*16)(keyp), C0; MOVOU (3*16)(keyp), D0 - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1 - MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2 - MOVO B0, T1; MOVO C0, T2; MOVO D1, T3 - MOVQ $10, itr2 + MOVOU ·chacha20Constants<>+0(SB), X0 + MOVOU 16(R8), X3 + MOVOU 32(R8), X6 + MOVOU 48(R8), X9 + MOVO X0, X1 + MOVO X3, X4 + MOVO X6, X7 + MOVO X9, X10 + PADDL ·sseIncMask<>+0(SB), X10 + MOVO X1, X2 + MOVO X4, X5 + MOVO X7, X8 + MOVO X10, X11 + PADDL ·sseIncMask<>+0(SB), X11 + MOVO X3, X13 + MOVO X6, X14 + MOVO X10, X15 + MOVQ $0x0000000a, R9 openSSE128InnerCipherLoop: - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Left; shiftB1Left; shiftB2Left - shiftC0Left; shiftC1Left; shiftC2Left - shiftD0Left; shiftD1Left; shiftD2Left - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Right; shiftB1Right; shiftB2Right - shiftC0Right; shiftC1Right; shiftC2Right - shiftD0Right; shiftD1Right; shiftD2Right - DECQ itr2 - JNE openSSE128InnerCipherLoop + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X4 + PXOR X12, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X4 + PXOR X12, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X5 + PXOR X12, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X5 + PXOR X12, X5 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X4 + PXOR X12, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X4 + PXOR X12, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X5 + PXOR X12, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X5 + PXOR X12, X5 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + DECQ R9 + JNE openSSE128InnerCipherLoop // A0|B0 hold the Poly1305 32-byte key, C0,D0 can be discarded - PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1; PADDL ·chacha20Constants<>(SB), A2 - PADDL T1, B0; PADDL T1, B1; PADDL T1, B2 - PADDL T2, C1; PADDL T2, C2 - PADDL T3, D1; PADDL ·sseIncMask<>(SB), T3; PADDL T3, D2 + PADDL ·chacha20Constants<>+0(SB), X0 + PADDL ·chacha20Constants<>+0(SB), X1 + PADDL ·chacha20Constants<>+0(SB), X2 + PADDL X13, X3 + PADDL X13, X4 + PADDL X13, X5 + PADDL X14, X7 + PADDL X14, X8 + PADDL X15, X10 + PADDL ·sseIncMask<>+0(SB), X15 + PADDL X15, X11 // Clamp and store the key - PAND ·polyClampMask<>(SB), A0 - MOVOU A0, rStore; MOVOU B0, sStore + PAND ·polyClampMask<>+0(SB), X0 + MOVOU X0, (BP) + MOVOU X3, 16(BP) // Hash - MOVQ ad_len+80(FP), itr2 + MOVQ ad_len+80(FP), R9 CALL polyHashADInternal<>(SB) openSSE128Open: - CMPQ inl, $16 + CMPQ BX, $0x10 JB openSSETail16 - SUBQ $16, inl + SUBQ $0x10, BX // Load for hashing - polyAdd(0(inp)) + ADDQ (SI), R10 + ADCQ 8(SI), R11 + ADCQ $0x01, R12 // Load for decryption - MOVOU (inp), T0; PXOR T0, A1; MOVOU A1, (oup) - LEAQ (1*16)(inp), inp - LEAQ (1*16)(oup), oup - polyMul + MOVOU (SI), X12 + PXOR X12, X1 + MOVOU X1, (DI) + LEAQ 16(SI), SI + LEAQ 16(DI), DI + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 // Shift the stream "left" - MOVO B1, A1 - MOVO C1, B1 - MOVO D1, C1 - MOVO A2, D1 - MOVO B2, A2 - MOVO C2, B2 - MOVO D2, C2 + MOVO X4, X1 + MOVO X7, X4 + MOVO X10, X7 + MOVO X2, X10 + MOVO X5, X2 + MOVO X8, X5 + MOVO X11, X8 JMP openSSE128Open openSSETail16: - TESTQ inl, inl + TESTQ BX, BX JE openSSEFinalize // We can safely load the CT from the end, because it is padded with the MAC - MOVQ inl, itr2 - SHLQ $4, itr2 - LEAQ ·andMask<>(SB), t0 - MOVOU (inp), T0 - ADDQ inl, inp - PAND -16(t0)(itr2*1), T0 - MOVO T0, 0+tmpStore - MOVQ T0, t0 - MOVQ 8+tmpStore, t1 - PXOR A1, T0 + MOVQ BX, R9 + SHLQ $0x04, R9 + LEAQ ·andMask<>+0(SB), R13 + MOVOU (SI), X12 + ADDQ BX, SI + PAND -16(R13)(R9*1), X12 + MOVO X12, 64(BP) + MOVQ X12, R13 + MOVQ 72(BP), R14 + PXOR X1, X12 // We can only store one byte at a time, since plaintext can be shorter than 16 bytes openSSETail16Store: - MOVQ T0, t3 - MOVB t3, (oup) - PSRLDQ $1, T0 - INCQ oup - DECQ inl + MOVQ X12, R8 + MOVB R8, (DI) + PSRLDQ $0x01, X12 + INCQ DI + DECQ BX JNE openSSETail16Store - ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2 - polyMul + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 JMP openSSEFinalize -// ---------------------------------------------------------------------------- -// Special optimization for the last 64 bytes of ciphertext openSSETail64: - // Need to decrypt up to 64 bytes - prepare single block - MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr0Store - XORQ itr2, itr2 - MOVQ inl, itr1 - CMPQ itr1, $16 - JB openSSETail64LoopB + MOVO ·chacha20Constants<>+0(SB), X0 + MOVO 32(BP), X3 + MOVO 48(BP), X6 + MOVO 128(BP), X9 + PADDL ·sseIncMask<>+0(SB), X9 + MOVO X9, 80(BP) + XORQ R9, R9 + MOVQ BX, CX + CMPQ CX, $0x10 + JB openSSETail64LoopB openSSETail64LoopA: - // Perform ChaCha rounds, while hashing the remaining input - polyAdd(0(inp)(itr2*1)) - polyMul - SUBQ $16, itr1 + ADDQ (SI)(R9*1), R10 + ADCQ 8(SI)(R9*1), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + SUBQ $0x10, CX openSSETail64LoopB: - ADDQ $16, itr2 - chachaQR(A0, B0, C0, D0, T0) - shiftB0Left; shiftC0Left; shiftD0Left - chachaQR(A0, B0, C0, D0, T0) - shiftB0Right; shiftC0Right; shiftD0Right - - CMPQ itr1, $16 - JAE openSSETail64LoopA - - CMPQ itr2, $160 - JNE openSSETail64LoopB - - PADDL ·chacha20Constants<>(SB), A0; PADDL state1Store, B0; PADDL state2Store, C0; PADDL ctr0Store, D0 + ADDQ $0x10, R9 + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x0c + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x04 + CMPQ CX, $0x10 + JAE openSSETail64LoopA + CMPQ R9, $0xa0 + JNE openSSETail64LoopB + PADDL ·chacha20Constants<>+0(SB), X0 + PADDL 32(BP), X3 + PADDL 48(BP), X6 + PADDL 80(BP), X9 openSSETail64DecLoop: - CMPQ inl, $16 + CMPQ BX, $0x10 JB openSSETail64DecLoopDone - SUBQ $16, inl - MOVOU (inp), T0 - PXOR T0, A0 - MOVOU A0, (oup) - LEAQ 16(inp), inp - LEAQ 16(oup), oup - MOVO B0, A0 - MOVO C0, B0 - MOVO D0, C0 + SUBQ $0x10, BX + MOVOU (SI), X12 + PXOR X12, X0 + MOVOU X0, (DI) + LEAQ 16(SI), SI + LEAQ 16(DI), DI + MOVO X3, X0 + MOVO X6, X3 + MOVO X9, X6 JMP openSSETail64DecLoop openSSETail64DecLoopDone: - MOVO A0, A1 + MOVO X0, X1 JMP openSSETail16 -// ---------------------------------------------------------------------------- -// Special optimization for the last 128 bytes of ciphertext openSSETail128: - // Need to decrypt up to 128 bytes - prepare two blocks - MOVO ·chacha20Constants<>(SB), A1; MOVO state1Store, B1; MOVO state2Store, C1; MOVO ctr3Store, D1; PADDL ·sseIncMask<>(SB), D1; MOVO D1, ctr0Store - MOVO A1, A0; MOVO B1, B0; MOVO C1, C0; MOVO D1, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr1Store - XORQ itr2, itr2 - MOVQ inl, itr1 - ANDQ $-16, itr1 + MOVO ·chacha20Constants<>+0(SB), X1 + MOVO 32(BP), X4 + MOVO 48(BP), X7 + MOVO 128(BP), X10 + PADDL ·sseIncMask<>+0(SB), X10 + MOVO X10, 80(BP) + MOVO X1, X0 + MOVO X4, X3 + MOVO X7, X6 + MOVO X10, X9 + PADDL ·sseIncMask<>+0(SB), X9 + MOVO X9, 96(BP) + XORQ R9, R9 + MOVQ BX, CX + ANDQ $-16, CX openSSETail128LoopA: - // Perform ChaCha rounds, while hashing the remaining input - polyAdd(0(inp)(itr2*1)) - polyMul + ADDQ (SI)(R9*1), R10 + ADCQ 8(SI)(R9*1), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 openSSETail128LoopB: - ADDQ $16, itr2 - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0) - shiftB0Left; shiftC0Left; shiftD0Left - shiftB1Left; shiftC1Left; shiftD1Left - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0) - shiftB0Right; shiftC0Right; shiftD0Right - shiftB1Right; shiftC1Right; shiftD1Right - - CMPQ itr2, itr1 - JB openSSETail128LoopA - - CMPQ itr2, $160 - JNE openSSETail128LoopB - - PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1 - PADDL state1Store, B0; PADDL state1Store, B1 - PADDL state2Store, C0; PADDL state2Store, C1 - PADDL ctr1Store, D0; PADDL ctr0Store, D1 - - MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3 - PXOR T0, A1; PXOR T1, B1; PXOR T2, C1; PXOR T3, D1 - MOVOU A1, (0*16)(oup); MOVOU B1, (1*16)(oup); MOVOU C1, (2*16)(oup); MOVOU D1, (3*16)(oup) - - SUBQ $64, inl - LEAQ 64(inp), inp - LEAQ 64(oup), oup - JMP openSSETail64DecLoop - -// ---------------------------------------------------------------------------- -// Special optimization for the last 192 bytes of ciphertext + ADDQ $0x10, R9 + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X4 + PXOR X12, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X4 + PXOR X12, X4 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x0c + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X4 + PXOR X12, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X4 + PXOR X12, X4 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x04 + CMPQ R9, CX + JB openSSETail128LoopA + CMPQ R9, $0xa0 + JNE openSSETail128LoopB + PADDL ·chacha20Constants<>+0(SB), X0 + PADDL ·chacha20Constants<>+0(SB), X1 + PADDL 32(BP), X3 + PADDL 32(BP), X4 + PADDL 48(BP), X6 + PADDL 48(BP), X7 + PADDL 96(BP), X9 + PADDL 80(BP), X10 + MOVOU (SI), X12 + MOVOU 16(SI), X13 + MOVOU 32(SI), X14 + MOVOU 48(SI), X15 + PXOR X12, X1 + PXOR X13, X4 + PXOR X14, X7 + PXOR X15, X10 + MOVOU X1, (DI) + MOVOU X4, 16(DI) + MOVOU X7, 32(DI) + MOVOU X10, 48(DI) + SUBQ $0x40, BX + LEAQ 64(SI), SI + LEAQ 64(DI), DI + JMP openSSETail64DecLoop + openSSETail192: - // Need to decrypt up to 192 bytes - prepare three blocks - MOVO ·chacha20Constants<>(SB), A2; MOVO state1Store, B2; MOVO state2Store, C2; MOVO ctr3Store, D2; PADDL ·sseIncMask<>(SB), D2; MOVO D2, ctr0Store - MOVO A2, A1; MOVO B2, B1; MOVO C2, C1; MOVO D2, D1; PADDL ·sseIncMask<>(SB), D1; MOVO D1, ctr1Store - MOVO A1, A0; MOVO B1, B0; MOVO C1, C0; MOVO D1, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr2Store - - MOVQ inl, itr1 - MOVQ $160, itr2 - CMPQ itr1, $160 - CMOVQGT itr2, itr1 - ANDQ $-16, itr1 - XORQ itr2, itr2 + MOVO ·chacha20Constants<>+0(SB), X2 + MOVO 32(BP), X5 + MOVO 48(BP), X8 + MOVO 128(BP), X11 + PADDL ·sseIncMask<>+0(SB), X11 + MOVO X11, 80(BP) + MOVO X2, X1 + MOVO X5, X4 + MOVO X8, X7 + MOVO X11, X10 + PADDL ·sseIncMask<>+0(SB), X10 + MOVO X10, 96(BP) + MOVO X1, X0 + MOVO X4, X3 + MOVO X7, X6 + MOVO X10, X9 + PADDL ·sseIncMask<>+0(SB), X9 + MOVO X9, 112(BP) + MOVQ BX, CX + MOVQ $0x000000a0, R9 + CMPQ CX, $0xa0 + CMOVQGT R9, CX + ANDQ $-16, CX + XORQ R9, R9 openSSLTail192LoopA: - // Perform ChaCha rounds, while hashing the remaining input - polyAdd(0(inp)(itr2*1)) - polyMul + ADDQ (SI)(R9*1), R10 + ADCQ 8(SI)(R9*1), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 openSSLTail192LoopB: - ADDQ $16, itr2 - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Left; shiftC0Left; shiftD0Left - shiftB1Left; shiftC1Left; shiftD1Left - shiftB2Left; shiftC2Left; shiftD2Left - - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Right; shiftC0Right; shiftD0Right - shiftB1Right; shiftC1Right; shiftD1Right - shiftB2Right; shiftC2Right; shiftD2Right - - CMPQ itr2, itr1 - JB openSSLTail192LoopA - - CMPQ itr2, $160 - JNE openSSLTail192LoopB - - CMPQ inl, $176 - JB openSSLTail192Store - - polyAdd(160(inp)) - polyMul - - CMPQ inl, $192 - JB openSSLTail192Store - - polyAdd(176(inp)) - polyMul + ADDQ $0x10, R9 + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X4 + PXOR X12, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X4 + PXOR X12, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X5 + PXOR X12, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X5 + PXOR X12, X5 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X4 + PXOR X12, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X4 + PXOR X12, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X5 + PXOR X12, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X5 + PXOR X12, X5 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + CMPQ R9, CX + JB openSSLTail192LoopA + CMPQ R9, $0xa0 + JNE openSSLTail192LoopB + CMPQ BX, $0xb0 + JB openSSLTail192Store + ADDQ 160(SI), R10 + ADCQ 168(SI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + CMPQ BX, $0xc0 + JB openSSLTail192Store + ADDQ 176(SI), R10 + ADCQ 184(SI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 openSSLTail192Store: - PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1; PADDL ·chacha20Constants<>(SB), A2 - PADDL state1Store, B0; PADDL state1Store, B1; PADDL state1Store, B2 - PADDL state2Store, C0; PADDL state2Store, C1; PADDL state2Store, C2 - PADDL ctr2Store, D0; PADDL ctr1Store, D1; PADDL ctr0Store, D2 - - MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3 - PXOR T0, A2; PXOR T1, B2; PXOR T2, C2; PXOR T3, D2 - MOVOU A2, (0*16)(oup); MOVOU B2, (1*16)(oup); MOVOU C2, (2*16)(oup); MOVOU D2, (3*16)(oup) - - MOVOU (4*16)(inp), T0; MOVOU (5*16)(inp), T1; MOVOU (6*16)(inp), T2; MOVOU (7*16)(inp), T3 - PXOR T0, A1; PXOR T1, B1; PXOR T2, C1; PXOR T3, D1 - MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup) - - SUBQ $128, inl - LEAQ 128(inp), inp - LEAQ 128(oup), oup - JMP openSSETail64DecLoop - -// ---------------------------------------------------------------------------- -// Special optimization for the last 256 bytes of ciphertext + PADDL ·chacha20Constants<>+0(SB), X0 + PADDL ·chacha20Constants<>+0(SB), X1 + PADDL ·chacha20Constants<>+0(SB), X2 + PADDL 32(BP), X3 + PADDL 32(BP), X4 + PADDL 32(BP), X5 + PADDL 48(BP), X6 + PADDL 48(BP), X7 + PADDL 48(BP), X8 + PADDL 112(BP), X9 + PADDL 96(BP), X10 + PADDL 80(BP), X11 + MOVOU (SI), X12 + MOVOU 16(SI), X13 + MOVOU 32(SI), X14 + MOVOU 48(SI), X15 + PXOR X12, X2 + PXOR X13, X5 + PXOR X14, X8 + PXOR X15, X11 + MOVOU X2, (DI) + MOVOU X5, 16(DI) + MOVOU X8, 32(DI) + MOVOU X11, 48(DI) + MOVOU 64(SI), X12 + MOVOU 80(SI), X13 + MOVOU 96(SI), X14 + MOVOU 112(SI), X15 + PXOR X12, X1 + PXOR X13, X4 + PXOR X14, X7 + PXOR X15, X10 + MOVOU X1, 64(DI) + MOVOU X4, 80(DI) + MOVOU X7, 96(DI) + MOVOU X10, 112(DI) + SUBQ $0x80, BX + LEAQ 128(SI), SI + LEAQ 128(DI), DI + JMP openSSETail64DecLoop + openSSETail256: - // Need to decrypt up to 256 bytes - prepare four blocks - MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0 - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1 - MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2 - MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL ·sseIncMask<>(SB), D3 + MOVO ·chacha20Constants<>+0(SB), X0 + MOVO 32(BP), X3 + MOVO 48(BP), X6 + MOVO 128(BP), X9 + PADDL ·sseIncMask<>+0(SB), X9 + MOVO X0, X1 + MOVO X3, X4 + MOVO X6, X7 + MOVO X9, X10 + PADDL ·sseIncMask<>+0(SB), X10 + MOVO X1, X2 + MOVO X4, X5 + MOVO X7, X8 + MOVO X10, X11 + PADDL ·sseIncMask<>+0(SB), X11 + MOVO X2, X12 + MOVO X5, X13 + MOVO X8, X14 + MOVO X11, X15 + PADDL ·sseIncMask<>+0(SB), X15 // Store counters - MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store - XORQ itr2, itr2 + MOVO X9, 80(BP) + MOVO X10, 96(BP) + MOVO X11, 112(BP) + MOVO X15, 128(BP) + XORQ R9, R9 openSSETail256Loop: - // This loop inteleaves 8 ChaCha quarter rounds with 1 poly multiplication - polyAdd(0(inp)(itr2*1)) - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left - shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left - shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left - polyMulStage1 - polyMulStage2 - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - polyMulStage3 - polyMulReduceStage - shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right - shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right - shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right - ADDQ $2*8, itr2 - CMPQ itr2, $160 - JB openSSETail256Loop - MOVQ inl, itr1 - ANDQ $-16, itr1 + ADDQ (SI)(R9*1), R10 + ADCQ 8(SI)(R9*1), R11 + ADCQ $0x01, R12 + MOVO X14, 64(BP) + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X3 + PXOR X14, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X3 + PXOR X14, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X4 + PXOR X14, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X4 + PXOR X14, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X5 + PXOR X14, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X5 + PXOR X14, X5 + MOVO 64(BP), X14 + MOVO X7, 64(BP) + PADDD X13, X12 + PXOR X12, X15 + ROL16(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x0c, X7 + PSRLL $0x14, X13 + PXOR X7, X13 + PADDD X13, X12 + PXOR X12, X15 + ROL8(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x07, X7 + PSRLL $0x19, X13 + PXOR X7, X13 + MOVO 64(BP), X7 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x0c + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + MOVO X14, 64(BP) + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X3 + PXOR X14, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X3 + PXOR X14, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X4 + PXOR X14, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X4 + PXOR X14, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X5 + PXOR X14, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X5 + PXOR X14, X5 + MOVO 64(BP), X14 + MOVO X7, 64(BP) + PADDD X13, X12 + PXOR X12, X15 + ROL16(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x0c, X7 + PSRLL $0x14, X13 + PXOR X7, X13 + PADDD X13, X12 + PXOR X12, X15 + ROL8(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x07, X7 + PSRLL $0x19, X13 + PXOR X7, X13 + MOVO 64(BP), X7 + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x04 + ADDQ $0x10, R9 + CMPQ R9, $0xa0 + JB openSSETail256Loop + MOVQ BX, CX + ANDQ $-16, CX openSSETail256HashLoop: - polyAdd(0(inp)(itr2*1)) - polyMul - ADDQ $2*8, itr2 - CMPQ itr2, itr1 - JB openSSETail256HashLoop + ADDQ (SI)(R9*1), R10 + ADCQ 8(SI)(R9*1), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + ADDQ $0x10, R9 + CMPQ R9, CX + JB openSSETail256HashLoop // Add in the state - PADDD ·chacha20Constants<>(SB), A0; PADDD ·chacha20Constants<>(SB), A1; PADDD ·chacha20Constants<>(SB), A2; PADDD ·chacha20Constants<>(SB), A3 - PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3 - PADDD state2Store, C0; PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3 - PADDD ctr0Store, D0; PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3 - MOVO D3, tmpStore + PADDD ·chacha20Constants<>+0(SB), X0 + PADDD ·chacha20Constants<>+0(SB), X1 + PADDD ·chacha20Constants<>+0(SB), X2 + PADDD ·chacha20Constants<>+0(SB), X12 + PADDD 32(BP), X3 + PADDD 32(BP), X4 + PADDD 32(BP), X5 + PADDD 32(BP), X13 + PADDD 48(BP), X6 + PADDD 48(BP), X7 + PADDD 48(BP), X8 + PADDD 48(BP), X14 + PADDD 80(BP), X9 + PADDD 96(BP), X10 + PADDD 112(BP), X11 + PADDD 128(BP), X15 + MOVO X15, 64(BP) // Load - xor - store - MOVOU (0*16)(inp), D3; PXOR D3, A0 - MOVOU (1*16)(inp), D3; PXOR D3, B0 - MOVOU (2*16)(inp), D3; PXOR D3, C0 - MOVOU (3*16)(inp), D3; PXOR D3, D0 - MOVOU A0, (0*16)(oup) - MOVOU B0, (1*16)(oup) - MOVOU C0, (2*16)(oup) - MOVOU D0, (3*16)(oup) - MOVOU (4*16)(inp), A0; MOVOU (5*16)(inp), B0; MOVOU (6*16)(inp), C0; MOVOU (7*16)(inp), D0 - PXOR A0, A1; PXOR B0, B1; PXOR C0, C1; PXOR D0, D1 - MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup) - MOVOU (8*16)(inp), A0; MOVOU (9*16)(inp), B0; MOVOU (10*16)(inp), C0; MOVOU (11*16)(inp), D0 - PXOR A0, A2; PXOR B0, B2; PXOR C0, C2; PXOR D0, D2 - MOVOU A2, (8*16)(oup); MOVOU B2, (9*16)(oup); MOVOU C2, (10*16)(oup); MOVOU D2, (11*16)(oup) - LEAQ 192(inp), inp - LEAQ 192(oup), oup - SUBQ $192, inl - MOVO A3, A0 - MOVO B3, B0 - MOVO C3, C0 - MOVO tmpStore, D0 - - JMP openSSETail64DecLoop - -// ---------------------------------------------------------------------------- -// ------------------------- AVX2 Code ---------------------------------------- + MOVOU (SI), X15 + PXOR X15, X0 + MOVOU 16(SI), X15 + PXOR X15, X3 + MOVOU 32(SI), X15 + PXOR X15, X6 + MOVOU 48(SI), X15 + PXOR X15, X9 + MOVOU X0, (DI) + MOVOU X3, 16(DI) + MOVOU X6, 32(DI) + MOVOU X9, 48(DI) + MOVOU 64(SI), X0 + MOVOU 80(SI), X3 + MOVOU 96(SI), X6 + MOVOU 112(SI), X9 + PXOR X0, X1 + PXOR X3, X4 + PXOR X6, X7 + PXOR X9, X10 + MOVOU X1, 64(DI) + MOVOU X4, 80(DI) + MOVOU X7, 96(DI) + MOVOU X10, 112(DI) + MOVOU 128(SI), X0 + MOVOU 144(SI), X3 + MOVOU 160(SI), X6 + MOVOU 176(SI), X9 + PXOR X0, X2 + PXOR X3, X5 + PXOR X6, X8 + PXOR X9, X11 + MOVOU X2, 128(DI) + MOVOU X5, 144(DI) + MOVOU X8, 160(DI) + MOVOU X11, 176(DI) + LEAQ 192(SI), SI + LEAQ 192(DI), DI + SUBQ $0xc0, BX + MOVO X12, X0 + MOVO X13, X3 + MOVO X14, X6 + MOVO 64(BP), X9 + JMP openSSETail64DecLoop + chacha20Poly1305Open_AVX2: VZEROUPPER - VMOVDQU ·chacha20Constants<>(SB), AA0 - BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x70; BYTE $0x10 // broadcasti128 16(r8), ymm14 - BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x20 // broadcasti128 32(r8), ymm12 - BYTE $0xc4; BYTE $0xc2; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x30 // broadcasti128 48(r8), ymm4 - VPADDD ·avx2InitMask<>(SB), DD0, DD0 + VMOVDQU ·chacha20Constants<>+0(SB), Y0 + BYTE $0xc4 + BYTE $0x42 + BYTE $0x7d + BYTE $0x5a + BYTE $0x70 + BYTE $0x10 + BYTE $0xc4 + BYTE $0x42 + BYTE $0x7d + BYTE $0x5a + BYTE $0x60 + BYTE $0x20 + BYTE $0xc4 + BYTE $0xc2 + BYTE $0x7d + BYTE $0x5a + BYTE $0x60 + BYTE $0x30 + VPADDD ·avx2InitMask<>+0(SB), Y4, Y4 // Special optimization, for very short buffers - CMPQ inl, $192 + CMPQ BX, $0xc0 JBE openAVX2192 - CMPQ inl, $320 + CMPQ BX, $0x00000140 JBE openAVX2320 // For the general key prepare the key first - as a byproduct we have 64 bytes of cipher stream - VMOVDQA BB0, state1StoreAVX2 - VMOVDQA CC0, state2StoreAVX2 - VMOVDQA DD0, ctr3StoreAVX2 - MOVQ $10, itr2 + VMOVDQA Y14, 32(BP) + VMOVDQA Y12, 64(BP) + VMOVDQA Y4, 192(BP) + MOVQ $0x0000000a, R9 openAVX2PreparePolyKey: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0) - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $12, DD0, DD0, DD0 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0) - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $4, DD0, DD0, DD0 - DECQ itr2 - JNE openAVX2PreparePolyKey - - VPADDD ·chacha20Constants<>(SB), AA0, AA0 - VPADDD state1StoreAVX2, BB0, BB0 - VPADDD state2StoreAVX2, CC0, CC0 - VPADDD ctr3StoreAVX2, DD0, DD0 - - VPERM2I128 $0x02, AA0, BB0, TT0 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x04, Y4, Y4, Y4 + DECQ R9 + JNE openAVX2PreparePolyKey + VPADDD ·chacha20Constants<>+0(SB), Y0, Y0 + VPADDD 32(BP), Y14, Y14 + VPADDD 64(BP), Y12, Y12 + VPADDD 192(BP), Y4, Y4 + VPERM2I128 $0x02, Y0, Y14, Y3 // Clamp and store poly key - VPAND ·polyClampMask<>(SB), TT0, TT0 - VMOVDQA TT0, rsStoreAVX2 + VPAND ·polyClampMask<>+0(SB), Y3, Y3 + VMOVDQA Y3, (BP) // Stream for the first 64 bytes - VPERM2I128 $0x13, AA0, BB0, AA0 - VPERM2I128 $0x13, CC0, DD0, BB0 + VPERM2I128 $0x13, Y0, Y14, Y0 + VPERM2I128 $0x13, Y12, Y4, Y14 // Hash AD + first 64 bytes - MOVQ ad_len+80(FP), itr2 + MOVQ ad_len+80(FP), R9 CALL polyHashADInternal<>(SB) - XORQ itr1, itr1 + XORQ CX, CX openAVX2InitialHash64: - polyAdd(0(inp)(itr1*1)) - polyMulAVX2 - ADDQ $16, itr1 - CMPQ itr1, $64 - JNE openAVX2InitialHash64 + ADDQ (SI)(CX*1), R10 + ADCQ 8(SI)(CX*1), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + ADDQ $0x10, CX + CMPQ CX, $0x40 + JNE openAVX2InitialHash64 // Decrypt the first 64 bytes - VPXOR (0*32)(inp), AA0, AA0 - VPXOR (1*32)(inp), BB0, BB0 - VMOVDQU AA0, (0*32)(oup) - VMOVDQU BB0, (1*32)(oup) - LEAQ (2*32)(inp), inp - LEAQ (2*32)(oup), oup - SUBQ $64, inl + VPXOR (SI), Y0, Y0 + VPXOR 32(SI), Y14, Y14 + VMOVDQU Y0, (DI) + VMOVDQU Y14, 32(DI) + LEAQ 64(SI), SI + LEAQ 64(DI), DI + SUBQ $0x40, BX openAVX2MainLoop: - CMPQ inl, $512 + CMPQ BX, $0x00000200 JB openAVX2MainLoopDone // Load state, increment counter blocks, store the incremented counters - VMOVDQU ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3 - VMOVDQA ctr3StoreAVX2, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3 - VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2 - XORQ itr1, itr1 + VMOVDQU ·chacha20Constants<>+0(SB), Y0 + VMOVDQA Y0, Y5 + VMOVDQA Y0, Y6 + VMOVDQA Y0, Y7 + VMOVDQA 32(BP), Y14 + VMOVDQA Y14, Y9 + VMOVDQA Y14, Y10 + VMOVDQA Y14, Y11 + VMOVDQA 64(BP), Y12 + VMOVDQA Y12, Y13 + VMOVDQA Y12, Y8 + VMOVDQA Y12, Y15 + VMOVDQA 192(BP), Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y1 + VPADDD ·avx2IncMask<>+0(SB), Y1, Y2 + VPADDD ·avx2IncMask<>+0(SB), Y2, Y3 + VMOVDQA Y4, 96(BP) + VMOVDQA Y1, 128(BP) + VMOVDQA Y2, 160(BP) + VMOVDQA Y3, 192(BP) + XORQ CX, CX openAVX2InternalLoop: - // Lets just say this spaghetti loop interleaves 2 quarter rounds with 3 poly multiplications - // Effectively per 512 bytes of stream we hash 480 bytes of ciphertext - polyAdd(0*8(inp)(itr1*1)) - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - polyMulStage1_AVX2 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - polyMulStage2_AVX2 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - polyMulStage3_AVX2 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulReduceStage - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - polyAdd(2*8(inp)(itr1*1)) - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - polyMulStage1_AVX2 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulStage2_AVX2 - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - polyMulStage3_AVX2 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - polyMulReduceStage - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - polyAdd(4*8(inp)(itr1*1)) - LEAQ (6*8)(itr1), itr1 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulStage1_AVX2 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - polyMulStage2_AVX2 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - polyMulStage3_AVX2 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulReduceStage - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3 - CMPQ itr1, $480 + ADDQ (SI)(CX*1), R10 + ADCQ 8(SI)(CX*1), R11 + ADCQ $0x01, R12 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y3, Y3 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + VMOVDQA Y15, 224(BP) + VPSLLD $0x0c, Y14, Y15 + VPSRLD $0x14, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x0c, Y9, Y15 + VPSRLD $0x14, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x0c, Y10, Y15 + VPSRLD $0x14, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x0c, Y11, Y15 + VPSRLD $0x14, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y3, Y3 + ADDQ 16(SI)(CX*1), R10 + ADCQ 24(SI)(CX*1), R11 + ADCQ $0x01, R12 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + VMOVDQA Y15, 224(BP) + VPSLLD $0x07, Y14, Y15 + VPSRLD $0x19, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x07, Y9, Y15 + VPSRLD $0x19, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x07, Y10, Y15 + VPSRLD $0x19, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x07, Y11, Y15 + VPSRLD $0x19, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x04, Y10, Y10, Y10 + VPALIGNR $0x04, Y11, Y11, Y11 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x08, Y15, Y15, Y15 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPALIGNR $0x0c, Y1, Y1, Y1 + VPALIGNR $0x0c, Y2, Y2, Y2 + VPALIGNR $0x0c, Y3, Y3, Y3 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y3, Y3 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + ADDQ 32(SI)(CX*1), R10 + ADCQ 40(SI)(CX*1), R11 + ADCQ $0x01, R12 + LEAQ 48(CX), CX + VMOVDQA Y15, 224(BP) + VPSLLD $0x0c, Y14, Y15 + VPSRLD $0x14, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x0c, Y9, Y15 + VPSRLD $0x14, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x0c, Y10, Y15 + VPSRLD $0x14, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x0c, Y11, Y15 + VPSRLD $0x14, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y3, Y3 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + VMOVDQA Y15, 224(BP) + VPSLLD $0x07, Y14, Y15 + VPSRLD $0x19, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x07, Y9, Y15 + VPSRLD $0x19, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x07, Y10, Y15 + VPSRLD $0x19, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x07, Y11, Y15 + VPSRLD $0x19, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x0c, Y10, Y10, Y10 + VPALIGNR $0x0c, Y11, Y11, Y11 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x08, Y15, Y15, Y15 + VPALIGNR $0x04, Y4, Y4, Y4 + VPALIGNR $0x04, Y1, Y1, Y1 + VPALIGNR $0x04, Y2, Y2, Y2 + VPALIGNR $0x04, Y3, Y3, Y3 + CMPQ CX, $0x000001e0 JNE openAVX2InternalLoop - - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3 - VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3 - VMOVDQA CC3, tmpStoreAVX2 + VPADDD ·chacha20Constants<>+0(SB), Y0, Y0 + VPADDD ·chacha20Constants<>+0(SB), Y5, Y5 + VPADDD ·chacha20Constants<>+0(SB), Y6, Y6 + VPADDD ·chacha20Constants<>+0(SB), Y7, Y7 + VPADDD 32(BP), Y14, Y14 + VPADDD 32(BP), Y9, Y9 + VPADDD 32(BP), Y10, Y10 + VPADDD 32(BP), Y11, Y11 + VPADDD 64(BP), Y12, Y12 + VPADDD 64(BP), Y13, Y13 + VPADDD 64(BP), Y8, Y8 + VPADDD 64(BP), Y15, Y15 + VPADDD 96(BP), Y4, Y4 + VPADDD 128(BP), Y1, Y1 + VPADDD 160(BP), Y2, Y2 + VPADDD 192(BP), Y3, Y3 + VMOVDQA Y15, 224(BP) // We only hashed 480 of the 512 bytes available - hash the remaining 32 here - polyAdd(480(inp)) - polyMulAVX2 - VPERM2I128 $0x02, AA0, BB0, CC3; VPERM2I128 $0x13, AA0, BB0, BB0; VPERM2I128 $0x02, CC0, DD0, AA0; VPERM2I128 $0x13, CC0, DD0, CC0 - VPXOR (0*32)(inp), CC3, CC3; VPXOR (1*32)(inp), AA0, AA0; VPXOR (2*32)(inp), BB0, BB0; VPXOR (3*32)(inp), CC0, CC0 - VMOVDQU CC3, (0*32)(oup); VMOVDQU AA0, (1*32)(oup); VMOVDQU BB0, (2*32)(oup); VMOVDQU CC0, (3*32)(oup) - VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0 - VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0 - VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup) + ADDQ 480(SI), R10 + ADCQ 488(SI), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + VPERM2I128 $0x02, Y0, Y14, Y15 + VPERM2I128 $0x13, Y0, Y14, Y14 + VPERM2I128 $0x02, Y12, Y4, Y0 + VPERM2I128 $0x13, Y12, Y4, Y12 + VPXOR (SI), Y15, Y15 + VPXOR 32(SI), Y0, Y0 + VPXOR 64(SI), Y14, Y14 + VPXOR 96(SI), Y12, Y12 + VMOVDQU Y15, (DI) + VMOVDQU Y0, 32(DI) + VMOVDQU Y14, 64(DI) + VMOVDQU Y12, 96(DI) + VPERM2I128 $0x02, Y5, Y9, Y0 + VPERM2I128 $0x02, Y13, Y1, Y14 + VPERM2I128 $0x13, Y5, Y9, Y12 + VPERM2I128 $0x13, Y13, Y1, Y4 + VPXOR 128(SI), Y0, Y0 + VPXOR 160(SI), Y14, Y14 + VPXOR 192(SI), Y12, Y12 + VPXOR 224(SI), Y4, Y4 + VMOVDQU Y0, 128(DI) + VMOVDQU Y14, 160(DI) + VMOVDQU Y12, 192(DI) + VMOVDQU Y4, 224(DI) // and here - polyAdd(496(inp)) - polyMulAVX2 - VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0 - VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0 - VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup) - VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0 - VPXOR (12*32)(inp), AA0, AA0; VPXOR (13*32)(inp), BB0, BB0; VPXOR (14*32)(inp), CC0, CC0; VPXOR (15*32)(inp), DD0, DD0 - VMOVDQU AA0, (12*32)(oup); VMOVDQU BB0, (13*32)(oup); VMOVDQU CC0, (14*32)(oup); VMOVDQU DD0, (15*32)(oup) - LEAQ (32*16)(inp), inp - LEAQ (32*16)(oup), oup - SUBQ $(32*16), inl + ADDQ 496(SI), R10 + ADCQ 504(SI), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + VPERM2I128 $0x02, Y6, Y10, Y0 + VPERM2I128 $0x02, Y8, Y2, Y14 + VPERM2I128 $0x13, Y6, Y10, Y12 + VPERM2I128 $0x13, Y8, Y2, Y4 + VPXOR 256(SI), Y0, Y0 + VPXOR 288(SI), Y14, Y14 + VPXOR 320(SI), Y12, Y12 + VPXOR 352(SI), Y4, Y4 + VMOVDQU Y0, 256(DI) + VMOVDQU Y14, 288(DI) + VMOVDQU Y12, 320(DI) + VMOVDQU Y4, 352(DI) + VPERM2I128 $0x02, Y7, Y11, Y0 + VPERM2I128 $0x02, 224(BP), Y3, Y14 + VPERM2I128 $0x13, Y7, Y11, Y12 + VPERM2I128 $0x13, 224(BP), Y3, Y4 + VPXOR 384(SI), Y0, Y0 + VPXOR 416(SI), Y14, Y14 + VPXOR 448(SI), Y12, Y12 + VPXOR 480(SI), Y4, Y4 + VMOVDQU Y0, 384(DI) + VMOVDQU Y14, 416(DI) + VMOVDQU Y12, 448(DI) + VMOVDQU Y4, 480(DI) + LEAQ 512(SI), SI + LEAQ 512(DI), DI + SUBQ $0x00000200, BX JMP openAVX2MainLoop openAVX2MainLoopDone: // Handle the various tail sizes efficiently - TESTQ inl, inl + TESTQ BX, BX JE openSSEFinalize - CMPQ inl, $128 + CMPQ BX, $0x80 JBE openAVX2Tail128 - CMPQ inl, $256 + CMPQ BX, $0x00000100 JBE openAVX2Tail256 - CMPQ inl, $384 + CMPQ BX, $0x00000180 JBE openAVX2Tail384 JMP openAVX2Tail512 -// ---------------------------------------------------------------------------- -// Special optimization for buffers smaller than 193 bytes openAVX2192: - // For up to 192 bytes of ciphertext and 64 bytes for the poly key, we process four blocks - VMOVDQA AA0, AA1 - VMOVDQA BB0, BB1 - VMOVDQA CC0, CC1 - VPADDD ·avx2IncMask<>(SB), DD0, DD1 - VMOVDQA AA0, AA2 - VMOVDQA BB0, BB2 - VMOVDQA CC0, CC2 - VMOVDQA DD0, DD2 - VMOVDQA DD1, TT3 - MOVQ $10, itr2 + VMOVDQA Y0, Y5 + VMOVDQA Y14, Y9 + VMOVDQA Y12, Y13 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y1 + VMOVDQA Y0, Y6 + VMOVDQA Y14, Y10 + VMOVDQA Y12, Y8 + VMOVDQA Y4, Y2 + VMOVDQA Y1, Y15 + MOVQ $0x0000000a, R9 openAVX2192InnerCipherLoop: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1 - DECQ itr2 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPALIGNR $0x0c, Y1, Y1, Y1 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x04, Y4, Y4, Y4 + VPALIGNR $0x04, Y1, Y1, Y1 + DECQ R9 JNE openAVX2192InnerCipherLoop - VPADDD AA2, AA0, AA0; VPADDD AA2, AA1, AA1 - VPADDD BB2, BB0, BB0; VPADDD BB2, BB1, BB1 - VPADDD CC2, CC0, CC0; VPADDD CC2, CC1, CC1 - VPADDD DD2, DD0, DD0; VPADDD TT3, DD1, DD1 - VPERM2I128 $0x02, AA0, BB0, TT0 + VPADDD Y6, Y0, Y0 + VPADDD Y6, Y5, Y5 + VPADDD Y10, Y14, Y14 + VPADDD Y10, Y9, Y9 + VPADDD Y8, Y12, Y12 + VPADDD Y8, Y13, Y13 + VPADDD Y2, Y4, Y4 + VPADDD Y15, Y1, Y1 + VPERM2I128 $0x02, Y0, Y14, Y3 // Clamp and store poly key - VPAND ·polyClampMask<>(SB), TT0, TT0 - VMOVDQA TT0, rsStoreAVX2 + VPAND ·polyClampMask<>+0(SB), Y3, Y3 + VMOVDQA Y3, (BP) // Stream for up to 192 bytes - VPERM2I128 $0x13, AA0, BB0, AA0 - VPERM2I128 $0x13, CC0, DD0, BB0 - VPERM2I128 $0x02, AA1, BB1, CC0 - VPERM2I128 $0x02, CC1, DD1, DD0 - VPERM2I128 $0x13, AA1, BB1, AA1 - VPERM2I128 $0x13, CC1, DD1, BB1 + VPERM2I128 $0x13, Y0, Y14, Y0 + VPERM2I128 $0x13, Y12, Y4, Y14 + VPERM2I128 $0x02, Y5, Y9, Y12 + VPERM2I128 $0x02, Y13, Y1, Y4 + VPERM2I128 $0x13, Y5, Y9, Y5 + VPERM2I128 $0x13, Y13, Y1, Y9 openAVX2ShortOpen: // Hash - MOVQ ad_len+80(FP), itr2 + MOVQ ad_len+80(FP), R9 CALL polyHashADInternal<>(SB) openAVX2ShortOpenLoop: - CMPQ inl, $32 + CMPQ BX, $0x20 JB openAVX2ShortTail32 - SUBQ $32, inl + SUBQ $0x20, BX // Load for hashing - polyAdd(0*8(inp)) - polyMulAVX2 - polyAdd(2*8(inp)) - polyMulAVX2 + ADDQ (SI), R10 + ADCQ 8(SI), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + ADDQ 16(SI), R10 + ADCQ 24(SI), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 // Load for decryption - VPXOR (inp), AA0, AA0 - VMOVDQU AA0, (oup) - LEAQ (1*32)(inp), inp - LEAQ (1*32)(oup), oup + VPXOR (SI), Y0, Y0 + VMOVDQU Y0, (DI) + LEAQ 32(SI), SI + LEAQ 32(DI), DI // Shift stream left - VMOVDQA BB0, AA0 - VMOVDQA CC0, BB0 - VMOVDQA DD0, CC0 - VMOVDQA AA1, DD0 - VMOVDQA BB1, AA1 - VMOVDQA CC1, BB1 - VMOVDQA DD1, CC1 - VMOVDQA AA2, DD1 - VMOVDQA BB2, AA2 + VMOVDQA Y14, Y0 + VMOVDQA Y12, Y14 + VMOVDQA Y4, Y12 + VMOVDQA Y5, Y4 + VMOVDQA Y9, Y5 + VMOVDQA Y13, Y9 + VMOVDQA Y1, Y13 + VMOVDQA Y6, Y1 + VMOVDQA Y10, Y6 JMP openAVX2ShortOpenLoop openAVX2ShortTail32: - CMPQ inl, $16 - VMOVDQA A0, A1 + CMPQ BX, $0x10 + VMOVDQA X0, X1 JB openAVX2ShortDone - - SUBQ $16, inl + SUBQ $0x10, BX // Load for hashing - polyAdd(0*8(inp)) - polyMulAVX2 + ADDQ (SI), R10 + ADCQ 8(SI), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 // Load for decryption - VPXOR (inp), A0, T0 - VMOVDQU T0, (oup) - LEAQ (1*16)(inp), inp - LEAQ (1*16)(oup), oup - VPERM2I128 $0x11, AA0, AA0, AA0 - VMOVDQA A0, A1 + VPXOR (SI), X0, X12 + VMOVDQU X12, (DI) + LEAQ 16(SI), SI + LEAQ 16(DI), DI + VPERM2I128 $0x11, Y0, Y0, Y0 + VMOVDQA X0, X1 openAVX2ShortDone: VZEROUPPER JMP openSSETail16 -// ---------------------------------------------------------------------------- -// Special optimization for buffers smaller than 321 bytes openAVX2320: - // For up to 320 bytes of ciphertext and 64 bytes for the poly key, we process six blocks - VMOVDQA AA0, AA1; VMOVDQA BB0, BB1; VMOVDQA CC0, CC1; VPADDD ·avx2IncMask<>(SB), DD0, DD1 - VMOVDQA AA0, AA2; VMOVDQA BB0, BB2; VMOVDQA CC0, CC2; VPADDD ·avx2IncMask<>(SB), DD1, DD2 - VMOVDQA BB0, TT1; VMOVDQA CC0, TT2; VMOVDQA DD0, TT3 - MOVQ $10, itr2 + VMOVDQA Y0, Y5 + VMOVDQA Y14, Y9 + VMOVDQA Y12, Y13 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y1 + VMOVDQA Y0, Y6 + VMOVDQA Y14, Y10 + VMOVDQA Y12, Y8 + VPADDD ·avx2IncMask<>+0(SB), Y1, Y2 + VMOVDQA Y14, Y7 + VMOVDQA Y12, Y11 + VMOVDQA Y4, Y15 + MOVQ $0x0000000a, R9 openAVX2320InnerCipherLoop: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2 - DECQ itr2 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x0c, Y10, Y3 + VPSRLD $0x14, Y10, Y10 + VPXOR Y3, Y10, Y10 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x07, Y10, Y3 + VPSRLD $0x19, Y10, Y10 + VPXOR Y3, Y10, Y10 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x04, Y10, Y10, Y10 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPALIGNR $0x0c, Y1, Y1, Y1 + VPALIGNR $0x0c, Y2, Y2, Y2 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x0c, Y10, Y3 + VPSRLD $0x14, Y10, Y10 + VPXOR Y3, Y10, Y10 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x07, Y10, Y3 + VPSRLD $0x19, Y10, Y10 + VPXOR Y3, Y10, Y10 + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x0c, Y10, Y10, Y10 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x04, Y4, Y4, Y4 + VPALIGNR $0x04, Y1, Y1, Y1 + VPALIGNR $0x04, Y2, Y2, Y2 + DECQ R9 JNE openAVX2320InnerCipherLoop - - VMOVDQA ·chacha20Constants<>(SB), TT0 - VPADDD TT0, AA0, AA0; VPADDD TT0, AA1, AA1; VPADDD TT0, AA2, AA2 - VPADDD TT1, BB0, BB0; VPADDD TT1, BB1, BB1; VPADDD TT1, BB2, BB2 - VPADDD TT2, CC0, CC0; VPADDD TT2, CC1, CC1; VPADDD TT2, CC2, CC2 - VMOVDQA ·avx2IncMask<>(SB), TT0 - VPADDD TT3, DD0, DD0; VPADDD TT0, TT3, TT3 - VPADDD TT3, DD1, DD1; VPADDD TT0, TT3, TT3 - VPADDD TT3, DD2, DD2 + VMOVDQA ·chacha20Constants<>+0(SB), Y3 + VPADDD Y3, Y0, Y0 + VPADDD Y3, Y5, Y5 + VPADDD Y3, Y6, Y6 + VPADDD Y7, Y14, Y14 + VPADDD Y7, Y9, Y9 + VPADDD Y7, Y10, Y10 + VPADDD Y11, Y12, Y12 + VPADDD Y11, Y13, Y13 + VPADDD Y11, Y8, Y8 + VMOVDQA ·avx2IncMask<>+0(SB), Y3 + VPADDD Y15, Y4, Y4 + VPADDD Y3, Y15, Y15 + VPADDD Y15, Y1, Y1 + VPADDD Y3, Y15, Y15 + VPADDD Y15, Y2, Y2 // Clamp and store poly key - VPERM2I128 $0x02, AA0, BB0, TT0 - VPAND ·polyClampMask<>(SB), TT0, TT0 - VMOVDQA TT0, rsStoreAVX2 + VPERM2I128 $0x02, Y0, Y14, Y3 + VPAND ·polyClampMask<>+0(SB), Y3, Y3 + VMOVDQA Y3, (BP) // Stream for up to 320 bytes - VPERM2I128 $0x13, AA0, BB0, AA0 - VPERM2I128 $0x13, CC0, DD0, BB0 - VPERM2I128 $0x02, AA1, BB1, CC0 - VPERM2I128 $0x02, CC1, DD1, DD0 - VPERM2I128 $0x13, AA1, BB1, AA1 - VPERM2I128 $0x13, CC1, DD1, BB1 - VPERM2I128 $0x02, AA2, BB2, CC1 - VPERM2I128 $0x02, CC2, DD2, DD1 - VPERM2I128 $0x13, AA2, BB2, AA2 - VPERM2I128 $0x13, CC2, DD2, BB2 + VPERM2I128 $0x13, Y0, Y14, Y0 + VPERM2I128 $0x13, Y12, Y4, Y14 + VPERM2I128 $0x02, Y5, Y9, Y12 + VPERM2I128 $0x02, Y13, Y1, Y4 + VPERM2I128 $0x13, Y5, Y9, Y5 + VPERM2I128 $0x13, Y13, Y1, Y9 + VPERM2I128 $0x02, Y6, Y10, Y13 + VPERM2I128 $0x02, Y8, Y2, Y1 + VPERM2I128 $0x13, Y6, Y10, Y6 + VPERM2I128 $0x13, Y8, Y2, Y10 JMP openAVX2ShortOpen -// ---------------------------------------------------------------------------- -// Special optimization for the last 128 bytes of ciphertext openAVX2Tail128: // Need to decrypt up to 128 bytes - prepare two blocks - VMOVDQA ·chacha20Constants<>(SB), AA1 - VMOVDQA state1StoreAVX2, BB1 - VMOVDQA state2StoreAVX2, CC1 - VMOVDQA ctr3StoreAVX2, DD1 - VPADDD ·avx2IncMask<>(SB), DD1, DD1 - VMOVDQA DD1, DD0 - - XORQ itr2, itr2 - MOVQ inl, itr1 - ANDQ $-16, itr1 - TESTQ itr1, itr1 - JE openAVX2Tail128LoopB + VMOVDQA ·chacha20Constants<>+0(SB), Y5 + VMOVDQA 32(BP), Y9 + VMOVDQA 64(BP), Y13 + VMOVDQA 192(BP), Y1 + VPADDD ·avx2IncMask<>+0(SB), Y1, Y1 + VMOVDQA Y1, Y4 + XORQ R9, R9 + MOVQ BX, CX + ANDQ $-16, CX + TESTQ CX, CX + JE openAVX2Tail128LoopB openAVX2Tail128LoopA: - // Perform ChaCha rounds, while hashing the remaining input - polyAdd(0(inp)(itr2*1)) - polyMulAVX2 + ADDQ (SI)(R9*1), R10 + ADCQ 8(SI)(R9*1), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 openAVX2Tail128LoopB: - ADDQ $16, itr2 - chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $4, BB1, BB1, BB1 - VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $12, DD1, DD1, DD1 - chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $12, BB1, BB1, BB1 - VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $4, DD1, DD1, DD1 - CMPQ itr2, itr1 - JB openAVX2Tail128LoopA - CMPQ itr2, $160 - JNE openAVX2Tail128LoopB - - VPADDD ·chacha20Constants<>(SB), AA1, AA1 - VPADDD state1StoreAVX2, BB1, BB1 - VPADDD state2StoreAVX2, CC1, CC1 - VPADDD DD0, DD1, DD1 - VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0 + ADDQ $0x10, R9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x0c, Y1, Y1, Y1 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x04, Y1, Y1, Y1 + CMPQ R9, CX + JB openAVX2Tail128LoopA + CMPQ R9, $0xa0 + JNE openAVX2Tail128LoopB + VPADDD ·chacha20Constants<>+0(SB), Y5, Y5 + VPADDD 32(BP), Y9, Y9 + VPADDD 64(BP), Y13, Y13 + VPADDD Y4, Y1, Y1 + VPERM2I128 $0x02, Y5, Y9, Y0 + VPERM2I128 $0x02, Y13, Y1, Y14 + VPERM2I128 $0x13, Y5, Y9, Y12 + VPERM2I128 $0x13, Y13, Y1, Y4 openAVX2TailLoop: - CMPQ inl, $32 + CMPQ BX, $0x20 JB openAVX2Tail - SUBQ $32, inl + SUBQ $0x20, BX // Load for decryption - VPXOR (inp), AA0, AA0 - VMOVDQU AA0, (oup) - LEAQ (1*32)(inp), inp - LEAQ (1*32)(oup), oup - VMOVDQA BB0, AA0 - VMOVDQA CC0, BB0 - VMOVDQA DD0, CC0 + VPXOR (SI), Y0, Y0 + VMOVDQU Y0, (DI) + LEAQ 32(SI), SI + LEAQ 32(DI), DI + VMOVDQA Y14, Y0 + VMOVDQA Y12, Y14 + VMOVDQA Y4, Y12 JMP openAVX2TailLoop openAVX2Tail: - CMPQ inl, $16 - VMOVDQA A0, A1 + CMPQ BX, $0x10 + VMOVDQA X0, X1 JB openAVX2TailDone - SUBQ $16, inl + SUBQ $0x10, BX // Load for decryption - VPXOR (inp), A0, T0 - VMOVDQU T0, (oup) - LEAQ (1*16)(inp), inp - LEAQ (1*16)(oup), oup - VPERM2I128 $0x11, AA0, AA0, AA0 - VMOVDQA A0, A1 + VPXOR (SI), X0, X12 + VMOVDQU X12, (DI) + LEAQ 16(SI), SI + LEAQ 16(DI), DI + VPERM2I128 $0x11, Y0, Y0, Y0 + VMOVDQA X0, X1 openAVX2TailDone: VZEROUPPER JMP openSSETail16 -// ---------------------------------------------------------------------------- -// Special optimization for the last 256 bytes of ciphertext openAVX2Tail256: - // Need to decrypt up to 256 bytes - prepare four blocks - VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1 - VMOVDQA ctr3StoreAVX2, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD1 - VMOVDQA DD0, TT1 - VMOVDQA DD1, TT2 + VMOVDQA ·chacha20Constants<>+0(SB), Y0 + VMOVDQA Y0, Y5 + VMOVDQA 32(BP), Y14 + VMOVDQA Y14, Y9 + VMOVDQA 64(BP), Y12 + VMOVDQA Y12, Y13 + VMOVDQA 192(BP), Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y1 + VMOVDQA Y4, Y7 + VMOVDQA Y1, Y11 // Compute the number of iterations that will hash data - MOVQ inl, tmpStoreAVX2 - MOVQ inl, itr1 - SUBQ $128, itr1 - SHRQ $4, itr1 - MOVQ $10, itr2 - CMPQ itr1, $10 - CMOVQGT itr2, itr1 - MOVQ inp, inl - XORQ itr2, itr2 + MOVQ BX, 224(BP) + MOVQ BX, CX + SUBQ $0x80, CX + SHRQ $0x04, CX + MOVQ $0x0000000a, R9 + CMPQ CX, $0x0a + CMOVQGT R9, CX + MOVQ SI, BX + XORQ R9, R9 openAVX2Tail256LoopA: - polyAdd(0(inl)) - polyMulAVX2 - LEAQ 16(inl), inl + ADDQ (BX), R10 + ADCQ 8(BX), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(BX), BX - // Perform ChaCha rounds, while hashing the remaining input openAVX2Tail256LoopB: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1 - INCQ itr2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1 - CMPQ itr2, itr1 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPALIGNR $0x0c, Y1, Y1, Y1 + INCQ R9 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x04, Y4, Y4, Y4 + VPALIGNR $0x04, Y1, Y1, Y1 + CMPQ R9, CX JB openAVX2Tail256LoopA + CMPQ R9, $0x0a + JNE openAVX2Tail256LoopB + MOVQ BX, R9 + SUBQ SI, BX + MOVQ BX, CX + MOVQ 224(BP), BX - CMPQ itr2, $10 - JNE openAVX2Tail256LoopB - - MOVQ inl, itr2 - SUBQ inp, inl - MOVQ inl, itr1 - MOVQ tmpStoreAVX2, inl - - // Hash the remainder of data (if any) openAVX2Tail256Hash: - ADDQ $16, itr1 - CMPQ itr1, inl - JGT openAVX2Tail256HashEnd - polyAdd (0(itr2)) - polyMulAVX2 - LEAQ 16(itr2), itr2 - JMP openAVX2Tail256Hash - -// Store 128 bytes safely, then go to store loop + ADDQ $0x10, CX + CMPQ CX, BX + JGT openAVX2Tail256HashEnd + ADDQ (R9), R10 + ADCQ 8(R9), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(R9), R9 + JMP openAVX2Tail256Hash + openAVX2Tail256HashEnd: - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1 - VPADDD TT1, DD0, DD0; VPADDD TT2, DD1, DD1 - VPERM2I128 $0x02, AA0, BB0, AA2; VPERM2I128 $0x02, CC0, DD0, BB2; VPERM2I128 $0x13, AA0, BB0, CC2; VPERM2I128 $0x13, CC0, DD0, DD2 - VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0 - - VPXOR (0*32)(inp), AA2, AA2; VPXOR (1*32)(inp), BB2, BB2; VPXOR (2*32)(inp), CC2, CC2; VPXOR (3*32)(inp), DD2, DD2 - VMOVDQU AA2, (0*32)(oup); VMOVDQU BB2, (1*32)(oup); VMOVDQU CC2, (2*32)(oup); VMOVDQU DD2, (3*32)(oup) - LEAQ (4*32)(inp), inp - LEAQ (4*32)(oup), oup - SUBQ $4*32, inl - - JMP openAVX2TailLoop - -// ---------------------------------------------------------------------------- -// Special optimization for the last 384 bytes of ciphertext + VPADDD ·chacha20Constants<>+0(SB), Y0, Y0 + VPADDD ·chacha20Constants<>+0(SB), Y5, Y5 + VPADDD 32(BP), Y14, Y14 + VPADDD 32(BP), Y9, Y9 + VPADDD 64(BP), Y12, Y12 + VPADDD 64(BP), Y13, Y13 + VPADDD Y7, Y4, Y4 + VPADDD Y11, Y1, Y1 + VPERM2I128 $0x02, Y0, Y14, Y6 + VPERM2I128 $0x02, Y12, Y4, Y10 + VPERM2I128 $0x13, Y0, Y14, Y8 + VPERM2I128 $0x13, Y12, Y4, Y2 + VPERM2I128 $0x02, Y5, Y9, Y0 + VPERM2I128 $0x02, Y13, Y1, Y14 + VPERM2I128 $0x13, Y5, Y9, Y12 + VPERM2I128 $0x13, Y13, Y1, Y4 + VPXOR (SI), Y6, Y6 + VPXOR 32(SI), Y10, Y10 + VPXOR 64(SI), Y8, Y8 + VPXOR 96(SI), Y2, Y2 + VMOVDQU Y6, (DI) + VMOVDQU Y10, 32(DI) + VMOVDQU Y8, 64(DI) + VMOVDQU Y2, 96(DI) + LEAQ 128(SI), SI + LEAQ 128(DI), DI + SUBQ $0x80, BX + JMP openAVX2TailLoop + openAVX2Tail384: // Need to decrypt up to 384 bytes - prepare six blocks - VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2 - VMOVDQA ctr3StoreAVX2, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD1 - VPADDD ·avx2IncMask<>(SB), DD1, DD2 - VMOVDQA DD0, ctr0StoreAVX2 - VMOVDQA DD1, ctr1StoreAVX2 - VMOVDQA DD2, ctr2StoreAVX2 + VMOVDQA ·chacha20Constants<>+0(SB), Y0 + VMOVDQA Y0, Y5 + VMOVDQA Y0, Y6 + VMOVDQA 32(BP), Y14 + VMOVDQA Y14, Y9 + VMOVDQA Y14, Y10 + VMOVDQA 64(BP), Y12 + VMOVDQA Y12, Y13 + VMOVDQA Y12, Y8 + VMOVDQA 192(BP), Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y1 + VPADDD ·avx2IncMask<>+0(SB), Y1, Y2 + VMOVDQA Y4, 96(BP) + VMOVDQA Y1, 128(BP) + VMOVDQA Y2, 160(BP) // Compute the number of iterations that will hash two blocks of data - MOVQ inl, tmpStoreAVX2 - MOVQ inl, itr1 - SUBQ $256, itr1 - SHRQ $4, itr1 - ADDQ $6, itr1 - MOVQ $10, itr2 - CMPQ itr1, $10 - CMOVQGT itr2, itr1 - MOVQ inp, inl - XORQ itr2, itr2 - - // Perform ChaCha rounds, while hashing the remaining input + MOVQ BX, 224(BP) + MOVQ BX, CX + SUBQ $0x00000100, CX + SHRQ $0x04, CX + ADDQ $0x06, CX + MOVQ $0x0000000a, R9 + CMPQ CX, $0x0a + CMOVQGT R9, CX + MOVQ SI, BX + XORQ R9, R9 + openAVX2Tail384LoopB: - polyAdd(0(inl)) - polyMulAVX2 - LEAQ 16(inl), inl + ADDQ (BX), R10 + ADCQ 8(BX), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(BX), BX openAVX2Tail384LoopA: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2 - polyAdd(0(inl)) - polyMulAVX2 - LEAQ 16(inl), inl - INCQ itr2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2 - - CMPQ itr2, itr1 - JB openAVX2Tail384LoopB - - CMPQ itr2, $10 - JNE openAVX2Tail384LoopA - - MOVQ inl, itr2 - SUBQ inp, inl - MOVQ inl, itr1 - MOVQ tmpStoreAVX2, inl + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x0c, Y10, Y3 + VPSRLD $0x14, Y10, Y10 + VPXOR Y3, Y10, Y10 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x07, Y10, Y3 + VPSRLD $0x19, Y10, Y10 + VPXOR Y3, Y10, Y10 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x04, Y10, Y10, Y10 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPALIGNR $0x0c, Y1, Y1, Y1 + VPALIGNR $0x0c, Y2, Y2, Y2 + ADDQ (BX), R10 + ADCQ 8(BX), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(BX), BX + INCQ R9 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x0c, Y10, Y3 + VPSRLD $0x14, Y10, Y10 + VPXOR Y3, Y10, Y10 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x07, Y10, Y3 + VPSRLD $0x19, Y10, Y10 + VPXOR Y3, Y10, Y10 + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x0c, Y10, Y10, Y10 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x04, Y4, Y4, Y4 + VPALIGNR $0x04, Y1, Y1, Y1 + VPALIGNR $0x04, Y2, Y2, Y2 + CMPQ R9, CX + JB openAVX2Tail384LoopB + CMPQ R9, $0x0a + JNE openAVX2Tail384LoopA + MOVQ BX, R9 + SUBQ SI, BX + MOVQ BX, CX + MOVQ 224(BP), BX openAVX2Tail384Hash: - ADDQ $16, itr1 - CMPQ itr1, inl - JGT openAVX2Tail384HashEnd - polyAdd(0(itr2)) - polyMulAVX2 - LEAQ 16(itr2), itr2 - JMP openAVX2Tail384Hash - -// Store 256 bytes safely, then go to store loop + ADDQ $0x10, CX + CMPQ CX, BX + JGT openAVX2Tail384HashEnd + ADDQ (R9), R10 + ADCQ 8(R9), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(R9), R9 + JMP openAVX2Tail384Hash + openAVX2Tail384HashEnd: - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2 - VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2 - VPERM2I128 $0x02, AA0, BB0, TT0; VPERM2I128 $0x02, CC0, DD0, TT1; VPERM2I128 $0x13, AA0, BB0, TT2; VPERM2I128 $0x13, CC0, DD0, TT3 - VPXOR (0*32)(inp), TT0, TT0; VPXOR (1*32)(inp), TT1, TT1; VPXOR (2*32)(inp), TT2, TT2; VPXOR (3*32)(inp), TT3, TT3 - VMOVDQU TT0, (0*32)(oup); VMOVDQU TT1, (1*32)(oup); VMOVDQU TT2, (2*32)(oup); VMOVDQU TT3, (3*32)(oup) - VPERM2I128 $0x02, AA1, BB1, TT0; VPERM2I128 $0x02, CC1, DD1, TT1; VPERM2I128 $0x13, AA1, BB1, TT2; VPERM2I128 $0x13, CC1, DD1, TT3 - VPXOR (4*32)(inp), TT0, TT0; VPXOR (5*32)(inp), TT1, TT1; VPXOR (6*32)(inp), TT2, TT2; VPXOR (7*32)(inp), TT3, TT3 - VMOVDQU TT0, (4*32)(oup); VMOVDQU TT1, (5*32)(oup); VMOVDQU TT2, (6*32)(oup); VMOVDQU TT3, (7*32)(oup) - VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0 - LEAQ (8*32)(inp), inp - LEAQ (8*32)(oup), oup - SUBQ $8*32, inl + VPADDD ·chacha20Constants<>+0(SB), Y0, Y0 + VPADDD ·chacha20Constants<>+0(SB), Y5, Y5 + VPADDD ·chacha20Constants<>+0(SB), Y6, Y6 + VPADDD 32(BP), Y14, Y14 + VPADDD 32(BP), Y9, Y9 + VPADDD 32(BP), Y10, Y10 + VPADDD 64(BP), Y12, Y12 + VPADDD 64(BP), Y13, Y13 + VPADDD 64(BP), Y8, Y8 + VPADDD 96(BP), Y4, Y4 + VPADDD 128(BP), Y1, Y1 + VPADDD 160(BP), Y2, Y2 + VPERM2I128 $0x02, Y0, Y14, Y3 + VPERM2I128 $0x02, Y12, Y4, Y7 + VPERM2I128 $0x13, Y0, Y14, Y11 + VPERM2I128 $0x13, Y12, Y4, Y15 + VPXOR (SI), Y3, Y3 + VPXOR 32(SI), Y7, Y7 + VPXOR 64(SI), Y11, Y11 + VPXOR 96(SI), Y15, Y15 + VMOVDQU Y3, (DI) + VMOVDQU Y7, 32(DI) + VMOVDQU Y11, 64(DI) + VMOVDQU Y15, 96(DI) + VPERM2I128 $0x02, Y5, Y9, Y3 + VPERM2I128 $0x02, Y13, Y1, Y7 + VPERM2I128 $0x13, Y5, Y9, Y11 + VPERM2I128 $0x13, Y13, Y1, Y15 + VPXOR 128(SI), Y3, Y3 + VPXOR 160(SI), Y7, Y7 + VPXOR 192(SI), Y11, Y11 + VPXOR 224(SI), Y15, Y15 + VMOVDQU Y3, 128(DI) + VMOVDQU Y7, 160(DI) + VMOVDQU Y11, 192(DI) + VMOVDQU Y15, 224(DI) + VPERM2I128 $0x02, Y6, Y10, Y0 + VPERM2I128 $0x02, Y8, Y2, Y14 + VPERM2I128 $0x13, Y6, Y10, Y12 + VPERM2I128 $0x13, Y8, Y2, Y4 + LEAQ 256(SI), SI + LEAQ 256(DI), DI + SUBQ $0x00000100, BX JMP openAVX2TailLoop -// ---------------------------------------------------------------------------- -// Special optimization for the last 512 bytes of ciphertext openAVX2Tail512: - VMOVDQU ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3 - VMOVDQA ctr3StoreAVX2, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3 - VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2 - XORQ itr1, itr1 - MOVQ inp, itr2 + VMOVDQU ·chacha20Constants<>+0(SB), Y0 + VMOVDQA Y0, Y5 + VMOVDQA Y0, Y6 + VMOVDQA Y0, Y7 + VMOVDQA 32(BP), Y14 + VMOVDQA Y14, Y9 + VMOVDQA Y14, Y10 + VMOVDQA Y14, Y11 + VMOVDQA 64(BP), Y12 + VMOVDQA Y12, Y13 + VMOVDQA Y12, Y8 + VMOVDQA Y12, Y15 + VMOVDQA 192(BP), Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y1 + VPADDD ·avx2IncMask<>+0(SB), Y1, Y2 + VPADDD ·avx2IncMask<>+0(SB), Y2, Y3 + VMOVDQA Y4, 96(BP) + VMOVDQA Y1, 128(BP) + VMOVDQA Y2, 160(BP) + VMOVDQA Y3, 192(BP) + XORQ CX, CX + MOVQ SI, R9 openAVX2Tail512LoopB: - polyAdd(0(itr2)) - polyMulAVX2 - LEAQ (2*8)(itr2), itr2 + ADDQ (R9), R10 + ADCQ 8(R9), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(R9), R9 openAVX2Tail512LoopA: - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyAdd(0*8(itr2)) - polyMulAVX2 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - polyAdd(2*8(itr2)) - polyMulAVX2 - LEAQ (4*8)(itr2), itr2 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3 - INCQ itr1 - CMPQ itr1, $4 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y3, Y3 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + VMOVDQA Y15, 224(BP) + VPSLLD $0x0c, Y14, Y15 + VPSRLD $0x14, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x0c, Y9, Y15 + VPSRLD $0x14, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x0c, Y10, Y15 + VPSRLD $0x14, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x0c, Y11, Y15 + VPSRLD $0x14, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + ADDQ (R9), R10 + ADCQ 8(R9), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y3, Y3 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + VMOVDQA Y15, 224(BP) + VPSLLD $0x07, Y14, Y15 + VPSRLD $0x19, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x07, Y9, Y15 + VPSRLD $0x19, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x07, Y10, Y15 + VPSRLD $0x19, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x07, Y11, Y15 + VPSRLD $0x19, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x04, Y10, Y10, Y10 + VPALIGNR $0x04, Y11, Y11, Y11 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x08, Y15, Y15, Y15 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPALIGNR $0x0c, Y1, Y1, Y1 + VPALIGNR $0x0c, Y2, Y2, Y2 + VPALIGNR $0x0c, Y3, Y3, Y3 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y3, Y3 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + ADDQ 16(R9), R10 + ADCQ 24(R9), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 32(R9), R9 + VMOVDQA Y15, 224(BP) + VPSLLD $0x0c, Y14, Y15 + VPSRLD $0x14, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x0c, Y9, Y15 + VPSRLD $0x14, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x0c, Y10, Y15 + VPSRLD $0x14, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x0c, Y11, Y15 + VPSRLD $0x14, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y3, Y3 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + VMOVDQA Y15, 224(BP) + VPSLLD $0x07, Y14, Y15 + VPSRLD $0x19, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x07, Y9, Y15 + VPSRLD $0x19, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x07, Y10, Y15 + VPSRLD $0x19, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x07, Y11, Y15 + VPSRLD $0x19, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x0c, Y10, Y10, Y10 + VPALIGNR $0x0c, Y11, Y11, Y11 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x08, Y15, Y15, Y15 + VPALIGNR $0x04, Y4, Y4, Y4 + VPALIGNR $0x04, Y1, Y1, Y1 + VPALIGNR $0x04, Y2, Y2, Y2 + VPALIGNR $0x04, Y3, Y3, Y3 + INCQ CX + CMPQ CX, $0x04 JLT openAVX2Tail512LoopB - - CMPQ itr1, $10 - JNE openAVX2Tail512LoopA - - MOVQ inl, itr1 - SUBQ $384, itr1 - ANDQ $-16, itr1 + CMPQ CX, $0x0a + JNE openAVX2Tail512LoopA + MOVQ BX, CX + SUBQ $0x00000180, CX + ANDQ $-16, CX openAVX2Tail512HashLoop: - TESTQ itr1, itr1 + TESTQ CX, CX JE openAVX2Tail512HashEnd - polyAdd(0(itr2)) - polyMulAVX2 - LEAQ 16(itr2), itr2 - SUBQ $16, itr1 + ADDQ (R9), R10 + ADCQ 8(R9), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(R9), R9 + SUBQ $0x10, CX JMP openAVX2Tail512HashLoop openAVX2Tail512HashEnd: - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3 - VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3 - VMOVDQA CC3, tmpStoreAVX2 - VPERM2I128 $0x02, AA0, BB0, CC3; VPERM2I128 $0x13, AA0, BB0, BB0; VPERM2I128 $0x02, CC0, DD0, AA0; VPERM2I128 $0x13, CC0, DD0, CC0 - VPXOR (0*32)(inp), CC3, CC3; VPXOR (1*32)(inp), AA0, AA0; VPXOR (2*32)(inp), BB0, BB0; VPXOR (3*32)(inp), CC0, CC0 - VMOVDQU CC3, (0*32)(oup); VMOVDQU AA0, (1*32)(oup); VMOVDQU BB0, (2*32)(oup); VMOVDQU CC0, (3*32)(oup) - VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0 - VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0 - VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup) - VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0 - VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0 - VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup) - VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0 - - LEAQ (12*32)(inp), inp - LEAQ (12*32)(oup), oup - SUBQ $12*32, inl - - JMP openAVX2TailLoop - -// ---------------------------------------------------------------------------- -// ---------------------------------------------------------------------------- -// func chacha20Poly1305Seal(dst, key, src, ad []byte) -TEXT ·chacha20Poly1305Seal(SB), 0, $288-96 - // For aligned stack access + VPADDD ·chacha20Constants<>+0(SB), Y0, Y0 + VPADDD ·chacha20Constants<>+0(SB), Y5, Y5 + VPADDD ·chacha20Constants<>+0(SB), Y6, Y6 + VPADDD ·chacha20Constants<>+0(SB), Y7, Y7 + VPADDD 32(BP), Y14, Y14 + VPADDD 32(BP), Y9, Y9 + VPADDD 32(BP), Y10, Y10 + VPADDD 32(BP), Y11, Y11 + VPADDD 64(BP), Y12, Y12 + VPADDD 64(BP), Y13, Y13 + VPADDD 64(BP), Y8, Y8 + VPADDD 64(BP), Y15, Y15 + VPADDD 96(BP), Y4, Y4 + VPADDD 128(BP), Y1, Y1 + VPADDD 160(BP), Y2, Y2 + VPADDD 192(BP), Y3, Y3 + VMOVDQA Y15, 224(BP) + VPERM2I128 $0x02, Y0, Y14, Y15 + VPERM2I128 $0x13, Y0, Y14, Y14 + VPERM2I128 $0x02, Y12, Y4, Y0 + VPERM2I128 $0x13, Y12, Y4, Y12 + VPXOR (SI), Y15, Y15 + VPXOR 32(SI), Y0, Y0 + VPXOR 64(SI), Y14, Y14 + VPXOR 96(SI), Y12, Y12 + VMOVDQU Y15, (DI) + VMOVDQU Y0, 32(DI) + VMOVDQU Y14, 64(DI) + VMOVDQU Y12, 96(DI) + VPERM2I128 $0x02, Y5, Y9, Y0 + VPERM2I128 $0x02, Y13, Y1, Y14 + VPERM2I128 $0x13, Y5, Y9, Y12 + VPERM2I128 $0x13, Y13, Y1, Y4 + VPXOR 128(SI), Y0, Y0 + VPXOR 160(SI), Y14, Y14 + VPXOR 192(SI), Y12, Y12 + VPXOR 224(SI), Y4, Y4 + VMOVDQU Y0, 128(DI) + VMOVDQU Y14, 160(DI) + VMOVDQU Y12, 192(DI) + VMOVDQU Y4, 224(DI) + VPERM2I128 $0x02, Y6, Y10, Y0 + VPERM2I128 $0x02, Y8, Y2, Y14 + VPERM2I128 $0x13, Y6, Y10, Y12 + VPERM2I128 $0x13, Y8, Y2, Y4 + VPXOR 256(SI), Y0, Y0 + VPXOR 288(SI), Y14, Y14 + VPXOR 320(SI), Y12, Y12 + VPXOR 352(SI), Y4, Y4 + VMOVDQU Y0, 256(DI) + VMOVDQU Y14, 288(DI) + VMOVDQU Y12, 320(DI) + VMOVDQU Y4, 352(DI) + VPERM2I128 $0x02, Y7, Y11, Y0 + VPERM2I128 $0x02, 224(BP), Y3, Y14 + VPERM2I128 $0x13, Y7, Y11, Y12 + VPERM2I128 $0x13, 224(BP), Y3, Y4 + LEAQ 384(SI), SI + LEAQ 384(DI), DI + SUBQ $0x00000180, BX + JMP openAVX2TailLoop + +DATA ·chacha20Constants<>+0(SB)/4, $0x61707865 +DATA ·chacha20Constants<>+4(SB)/4, $0x3320646e +DATA ·chacha20Constants<>+8(SB)/4, $0x79622d32 +DATA ·chacha20Constants<>+12(SB)/4, $0x6b206574 +DATA ·chacha20Constants<>+16(SB)/4, $0x61707865 +DATA ·chacha20Constants<>+20(SB)/4, $0x3320646e +DATA ·chacha20Constants<>+24(SB)/4, $0x79622d32 +DATA ·chacha20Constants<>+28(SB)/4, $0x6b206574 +GLOBL ·chacha20Constants<>(SB), RODATA|NOPTR, $32 + +DATA ·polyClampMask<>+0(SB)/8, $0x0ffffffc0fffffff +DATA ·polyClampMask<>+8(SB)/8, $0x0ffffffc0ffffffc +DATA ·polyClampMask<>+16(SB)/8, $0xffffffffffffffff +DATA ·polyClampMask<>+24(SB)/8, $0xffffffffffffffff +GLOBL ·polyClampMask<>(SB), RODATA|NOPTR, $32 + +DATA ·sseIncMask<>+0(SB)/8, $0x0000000000000001 +DATA ·sseIncMask<>+8(SB)/8, $0x0000000000000000 +GLOBL ·sseIncMask<>(SB), RODATA|NOPTR, $16 + +DATA ·andMask<>+0(SB)/8, $0x00000000000000ff +DATA ·andMask<>+8(SB)/8, $0x0000000000000000 +DATA ·andMask<>+16(SB)/8, $0x000000000000ffff +DATA ·andMask<>+24(SB)/8, $0x0000000000000000 +DATA ·andMask<>+32(SB)/8, $0x0000000000ffffff +DATA ·andMask<>+40(SB)/8, $0x0000000000000000 +DATA ·andMask<>+48(SB)/8, $0x00000000ffffffff +DATA ·andMask<>+56(SB)/8, $0x0000000000000000 +DATA ·andMask<>+64(SB)/8, $0x000000ffffffffff +DATA ·andMask<>+72(SB)/8, $0x0000000000000000 +DATA ·andMask<>+80(SB)/8, $0x0000ffffffffffff +DATA ·andMask<>+88(SB)/8, $0x0000000000000000 +DATA ·andMask<>+96(SB)/8, $0x00ffffffffffffff +DATA ·andMask<>+104(SB)/8, $0x0000000000000000 +DATA ·andMask<>+112(SB)/8, $0xffffffffffffffff +DATA ·andMask<>+120(SB)/8, $0x0000000000000000 +DATA ·andMask<>+128(SB)/8, $0xffffffffffffffff +DATA ·andMask<>+136(SB)/8, $0x00000000000000ff +DATA ·andMask<>+144(SB)/8, $0xffffffffffffffff +DATA ·andMask<>+152(SB)/8, $0x000000000000ffff +DATA ·andMask<>+160(SB)/8, $0xffffffffffffffff +DATA ·andMask<>+168(SB)/8, $0x0000000000ffffff +DATA ·andMask<>+176(SB)/8, $0xffffffffffffffff +DATA ·andMask<>+184(SB)/8, $0x00000000ffffffff +DATA ·andMask<>+192(SB)/8, $0xffffffffffffffff +DATA ·andMask<>+200(SB)/8, $0x000000ffffffffff +DATA ·andMask<>+208(SB)/8, $0xffffffffffffffff +DATA ·andMask<>+216(SB)/8, $0x0000ffffffffffff +DATA ·andMask<>+224(SB)/8, $0xffffffffffffffff +DATA ·andMask<>+232(SB)/8, $0x00ffffffffffffff +GLOBL ·andMask<>(SB), RODATA|NOPTR, $240 + +DATA ·avx2InitMask<>+0(SB)/8, $0x0000000000000000 +DATA ·avx2InitMask<>+8(SB)/8, $0x0000000000000000 +DATA ·avx2InitMask<>+16(SB)/8, $0x0000000000000001 +DATA ·avx2InitMask<>+24(SB)/8, $0x0000000000000000 +GLOBL ·avx2InitMask<>(SB), RODATA|NOPTR, $32 + +DATA ·rol16<>+0(SB)/8, $0x0504070601000302 +DATA ·rol16<>+8(SB)/8, $0x0d0c0f0e09080b0a +DATA ·rol16<>+16(SB)/8, $0x0504070601000302 +DATA ·rol16<>+24(SB)/8, $0x0d0c0f0e09080b0a +GLOBL ·rol16<>(SB), RODATA|NOPTR, $32 + +DATA ·rol8<>+0(SB)/8, $0x0605040702010003 +DATA ·rol8<>+8(SB)/8, $0x0e0d0c0f0a09080b +DATA ·rol8<>+16(SB)/8, $0x0605040702010003 +DATA ·rol8<>+24(SB)/8, $0x0e0d0c0f0a09080b +GLOBL ·rol8<>(SB), RODATA|NOPTR, $32 + +DATA ·avx2IncMask<>+0(SB)/8, $0x0000000000000002 +DATA ·avx2IncMask<>+8(SB)/8, $0x0000000000000000 +DATA ·avx2IncMask<>+16(SB)/8, $0x0000000000000002 +DATA ·avx2IncMask<>+24(SB)/8, $0x0000000000000000 +GLOBL ·avx2IncMask<>(SB), RODATA|NOPTR, $32 + +// func chacha20Poly1305Seal(dst []byte, key []uint32, src []byte, ad []byte) +// Requires: AVX, AVX2, BMI2, CMOV, SSE2 +TEXT ·chacha20Poly1305Seal(SB), $288-96 MOVQ SP, BP - ADDQ $32, BP + ADDQ $0x20, BP ANDQ $-32, BP - MOVQ dst+0(FP), oup - MOVQ key+24(FP), keyp - MOVQ src+48(FP), inp - MOVQ src_len+56(FP), inl - MOVQ ad+72(FP), adp - - CMPB ·useAVX2(SB), $1 + MOVQ dst_base+0(FP), DI + MOVQ key_base+24(FP), R8 + MOVQ src_base+48(FP), SI + MOVQ src_len+56(FP), BX + MOVQ ad_base+72(FP), CX + CMPB ·useAVX2+0(SB), $0x01 JE chacha20Poly1305Seal_AVX2 // Special optimization, for very short buffers - CMPQ inl, $128 - JBE sealSSE128 // About 15% faster + CMPQ BX, $0x80 + JBE sealSSE128 // In the seal case - prepare the poly key + 3 blocks of stream in the first iteration - MOVOU ·chacha20Constants<>(SB), A0 - MOVOU (1*16)(keyp), B0 - MOVOU (2*16)(keyp), C0 - MOVOU (3*16)(keyp), D0 + MOVOU ·chacha20Constants<>+0(SB), X0 + MOVOU 16(R8), X3 + MOVOU 32(R8), X6 + MOVOU 48(R8), X9 // Store state on stack for future use - MOVO B0, state1Store - MOVO C0, state2Store + MOVO X3, 32(BP) + MOVO X6, 48(BP) // Load state, increment counter blocks - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1 - MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2 - MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL ·sseIncMask<>(SB), D3 + MOVO X0, X1 + MOVO X3, X4 + MOVO X6, X7 + MOVO X9, X10 + PADDL ·sseIncMask<>+0(SB), X10 + MOVO X1, X2 + MOVO X4, X5 + MOVO X7, X8 + MOVO X10, X11 + PADDL ·sseIncMask<>+0(SB), X11 + MOVO X2, X12 + MOVO X5, X13 + MOVO X8, X14 + MOVO X11, X15 + PADDL ·sseIncMask<>+0(SB), X15 // Store counters - MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store - MOVQ $10, itr2 + MOVO X9, 80(BP) + MOVO X10, 96(BP) + MOVO X11, 112(BP) + MOVO X15, 128(BP) + MOVQ $0x0000000a, R9 sealSSEIntroLoop: - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left - shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left - shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left - - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right - shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right - shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right - DECQ itr2 - JNE sealSSEIntroLoop + MOVO X14, 64(BP) + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X3 + PXOR X14, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X3 + PXOR X14, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X4 + PXOR X14, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X4 + PXOR X14, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X5 + PXOR X14, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X5 + PXOR X14, X5 + MOVO 64(BP), X14 + MOVO X7, 64(BP) + PADDD X13, X12 + PXOR X12, X15 + ROL16(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x0c, X7 + PSRLL $0x14, X13 + PXOR X7, X13 + PADDD X13, X12 + PXOR X12, X15 + ROL8(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x07, X7 + PSRLL $0x19, X13 + PXOR X7, X13 + MOVO 64(BP), X7 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x0c + MOVO X14, 64(BP) + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X3 + PXOR X14, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X3 + PXOR X14, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X4 + PXOR X14, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X4 + PXOR X14, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X5 + PXOR X14, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X5 + PXOR X14, X5 + MOVO 64(BP), X14 + MOVO X7, 64(BP) + PADDD X13, X12 + PXOR X12, X15 + ROL16(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x0c, X7 + PSRLL $0x14, X13 + PXOR X7, X13 + PADDD X13, X12 + PXOR X12, X15 + ROL8(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x07, X7 + PSRLL $0x19, X13 + PXOR X7, X13 + MOVO 64(BP), X7 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x04 + DECQ R9 + JNE sealSSEIntroLoop // Add in the state - PADDD ·chacha20Constants<>(SB), A0; PADDD ·chacha20Constants<>(SB), A1; PADDD ·chacha20Constants<>(SB), A2; PADDD ·chacha20Constants<>(SB), A3 - PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3 - PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3 - PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3 + PADDD ·chacha20Constants<>+0(SB), X0 + PADDD ·chacha20Constants<>+0(SB), X1 + PADDD ·chacha20Constants<>+0(SB), X2 + PADDD ·chacha20Constants<>+0(SB), X12 + PADDD 32(BP), X3 + PADDD 32(BP), X4 + PADDD 32(BP), X5 + PADDD 32(BP), X13 + PADDD 48(BP), X7 + PADDD 48(BP), X8 + PADDD 48(BP), X14 + PADDD 96(BP), X10 + PADDD 112(BP), X11 + PADDD 128(BP), X15 // Clamp and store the key - PAND ·polyClampMask<>(SB), A0 - MOVO A0, rStore - MOVO B0, sStore + PAND ·polyClampMask<>+0(SB), X0 + MOVO X0, (BP) + MOVO X3, 16(BP) // Hash AAD - MOVQ ad_len+80(FP), itr2 - CALL polyHashADInternal<>(SB) - - MOVOU (0*16)(inp), A0; MOVOU (1*16)(inp), B0; MOVOU (2*16)(inp), C0; MOVOU (3*16)(inp), D0 - PXOR A0, A1; PXOR B0, B1; PXOR C0, C1; PXOR D0, D1 - MOVOU A1, (0*16)(oup); MOVOU B1, (1*16)(oup); MOVOU C1, (2*16)(oup); MOVOU D1, (3*16)(oup) - MOVOU (4*16)(inp), A0; MOVOU (5*16)(inp), B0; MOVOU (6*16)(inp), C0; MOVOU (7*16)(inp), D0 - PXOR A0, A2; PXOR B0, B2; PXOR C0, C2; PXOR D0, D2 - MOVOU A2, (4*16)(oup); MOVOU B2, (5*16)(oup); MOVOU C2, (6*16)(oup); MOVOU D2, (7*16)(oup) - - MOVQ $128, itr1 - SUBQ $128, inl - LEAQ 128(inp), inp - - MOVO A3, A1; MOVO B3, B1; MOVO C3, C1; MOVO D3, D1 - - CMPQ inl, $64 - JBE sealSSE128SealHash - - MOVOU (0*16)(inp), A0; MOVOU (1*16)(inp), B0; MOVOU (2*16)(inp), C0; MOVOU (3*16)(inp), D0 - PXOR A0, A3; PXOR B0, B3; PXOR C0, C3; PXOR D0, D3 - MOVOU A3, (8*16)(oup); MOVOU B3, (9*16)(oup); MOVOU C3, (10*16)(oup); MOVOU D3, (11*16)(oup) - - ADDQ $64, itr1 - SUBQ $64, inl - LEAQ 64(inp), inp - - MOVQ $2, itr1 - MOVQ $8, itr2 - - CMPQ inl, $64 - JBE sealSSETail64 - CMPQ inl, $128 - JBE sealSSETail128 - CMPQ inl, $192 - JBE sealSSETail192 + MOVQ ad_len+80(FP), R9 + CALL polyHashADInternal<>(SB) + MOVOU (SI), X0 + MOVOU 16(SI), X3 + MOVOU 32(SI), X6 + MOVOU 48(SI), X9 + PXOR X0, X1 + PXOR X3, X4 + PXOR X6, X7 + PXOR X9, X10 + MOVOU X1, (DI) + MOVOU X4, 16(DI) + MOVOU X7, 32(DI) + MOVOU X10, 48(DI) + MOVOU 64(SI), X0 + MOVOU 80(SI), X3 + MOVOU 96(SI), X6 + MOVOU 112(SI), X9 + PXOR X0, X2 + PXOR X3, X5 + PXOR X6, X8 + PXOR X9, X11 + MOVOU X2, 64(DI) + MOVOU X5, 80(DI) + MOVOU X8, 96(DI) + MOVOU X11, 112(DI) + MOVQ $0x00000080, CX + SUBQ $0x80, BX + LEAQ 128(SI), SI + MOVO X12, X1 + MOVO X13, X4 + MOVO X14, X7 + MOVO X15, X10 + CMPQ BX, $0x40 + JBE sealSSE128SealHash + MOVOU (SI), X0 + MOVOU 16(SI), X3 + MOVOU 32(SI), X6 + MOVOU 48(SI), X9 + PXOR X0, X12 + PXOR X3, X13 + PXOR X6, X14 + PXOR X9, X15 + MOVOU X12, 128(DI) + MOVOU X13, 144(DI) + MOVOU X14, 160(DI) + MOVOU X15, 176(DI) + ADDQ $0x40, CX + SUBQ $0x40, BX + LEAQ 64(SI), SI + MOVQ $0x00000002, CX + MOVQ $0x00000008, R9 + CMPQ BX, $0x40 + JBE sealSSETail64 + CMPQ BX, $0x80 + JBE sealSSETail128 + CMPQ BX, $0xc0 + JBE sealSSETail192 sealSSEMainLoop: // Load state, increment counter blocks - MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0 - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1 - MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2 - MOVO A2, A3; MOVO B2, B3; MOVO C2, C3; MOVO D2, D3; PADDL ·sseIncMask<>(SB), D3 + MOVO ·chacha20Constants<>+0(SB), X0 + MOVO 32(BP), X3 + MOVO 48(BP), X6 + MOVO 128(BP), X9 + PADDL ·sseIncMask<>+0(SB), X9 + MOVO X0, X1 + MOVO X3, X4 + MOVO X6, X7 + MOVO X9, X10 + PADDL ·sseIncMask<>+0(SB), X10 + MOVO X1, X2 + MOVO X4, X5 + MOVO X7, X8 + MOVO X10, X11 + PADDL ·sseIncMask<>+0(SB), X11 + MOVO X2, X12 + MOVO X5, X13 + MOVO X8, X14 + MOVO X11, X15 + PADDL ·sseIncMask<>+0(SB), X15 // Store counters - MOVO D0, ctr0Store; MOVO D1, ctr1Store; MOVO D2, ctr2Store; MOVO D3, ctr3Store + MOVO X9, 80(BP) + MOVO X10, 96(BP) + MOVO X11, 112(BP) + MOVO X15, 128(BP) sealSSEInnerLoop: - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - polyAdd(0(oup)) - shiftB0Left; shiftB1Left; shiftB2Left; shiftB3Left - shiftC0Left; shiftC1Left; shiftC2Left; shiftC3Left - shiftD0Left; shiftD1Left; shiftD2Left; shiftD3Left - polyMulStage1 - polyMulStage2 - LEAQ (2*8)(oup), oup - MOVO C3, tmpStore - chachaQR(A0, B0, C0, D0, C3); chachaQR(A1, B1, C1, D1, C3); chachaQR(A2, B2, C2, D2, C3) - MOVO tmpStore, C3 - MOVO C1, tmpStore - polyMulStage3 - chachaQR(A3, B3, C3, D3, C1) - MOVO tmpStore, C1 - polyMulReduceStage - shiftB0Right; shiftB1Right; shiftB2Right; shiftB3Right - shiftC0Right; shiftC1Right; shiftC2Right; shiftC3Right - shiftD0Right; shiftD1Right; shiftD2Right; shiftD3Right - DECQ itr2 - JGE sealSSEInnerLoop - polyAdd(0(oup)) - polyMul - LEAQ (2*8)(oup), oup - DECQ itr1 - JG sealSSEInnerLoop + MOVO X14, 64(BP) + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X3 + PXOR X14, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X3 + PXOR X14, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X4 + PXOR X14, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X4 + PXOR X14, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X5 + PXOR X14, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X5 + PXOR X14, X5 + MOVO 64(BP), X14 + MOVO X7, 64(BP) + PADDD X13, X12 + PXOR X12, X15 + ROL16(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x0c, X7 + PSRLL $0x14, X13 + PXOR X7, X13 + PADDD X13, X12 + PXOR X12, X15 + ROL8(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x07, X7 + PSRLL $0x19, X13 + PXOR X7, X13 + MOVO 64(BP), X7 + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x0c + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + LEAQ 16(DI), DI + MOVO X14, 64(BP) + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X3 + PXOR X14, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X14) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X3 + PXOR X14, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X4 + PXOR X14, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X14) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X4 + PXOR X14, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x0c, X14 + PSRLL $0x14, X5 + PXOR X14, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X14) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X14 + PSLLL $0x07, X14 + PSRLL $0x19, X5 + PXOR X14, X5 + MOVO 64(BP), X14 + MOVO X7, 64(BP) + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + PADDD X13, X12 + PXOR X12, X15 + ROL16(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x0c, X7 + PSRLL $0x14, X13 + PXOR X7, X13 + PADDD X13, X12 + PXOR X12, X15 + ROL8(X15, X7) + PADDD X15, X14 + PXOR X14, X13 + MOVO X13, X7 + PSLLL $0x07, X7 + PSRLL $0x19, X13 + PXOR X7, X13 + MOVO 64(BP), X7 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x04 + DECQ R9 + JGE sealSSEInnerLoop + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(DI), DI + DECQ CX + JG sealSSEInnerLoop // Add in the state - PADDD ·chacha20Constants<>(SB), A0; PADDD ·chacha20Constants<>(SB), A1; PADDD ·chacha20Constants<>(SB), A2; PADDD ·chacha20Constants<>(SB), A3 - PADDD state1Store, B0; PADDD state1Store, B1; PADDD state1Store, B2; PADDD state1Store, B3 - PADDD state2Store, C0; PADDD state2Store, C1; PADDD state2Store, C2; PADDD state2Store, C3 - PADDD ctr0Store, D0; PADDD ctr1Store, D1; PADDD ctr2Store, D2; PADDD ctr3Store, D3 - MOVO D3, tmpStore + PADDD ·chacha20Constants<>+0(SB), X0 + PADDD ·chacha20Constants<>+0(SB), X1 + PADDD ·chacha20Constants<>+0(SB), X2 + PADDD ·chacha20Constants<>+0(SB), X12 + PADDD 32(BP), X3 + PADDD 32(BP), X4 + PADDD 32(BP), X5 + PADDD 32(BP), X13 + PADDD 48(BP), X6 + PADDD 48(BP), X7 + PADDD 48(BP), X8 + PADDD 48(BP), X14 + PADDD 80(BP), X9 + PADDD 96(BP), X10 + PADDD 112(BP), X11 + PADDD 128(BP), X15 + MOVO X15, 64(BP) // Load - xor - store - MOVOU (0*16)(inp), D3; PXOR D3, A0 - MOVOU (1*16)(inp), D3; PXOR D3, B0 - MOVOU (2*16)(inp), D3; PXOR D3, C0 - MOVOU (3*16)(inp), D3; PXOR D3, D0 - MOVOU A0, (0*16)(oup) - MOVOU B0, (1*16)(oup) - MOVOU C0, (2*16)(oup) - MOVOU D0, (3*16)(oup) - MOVO tmpStore, D3 - - MOVOU (4*16)(inp), A0; MOVOU (5*16)(inp), B0; MOVOU (6*16)(inp), C0; MOVOU (7*16)(inp), D0 - PXOR A0, A1; PXOR B0, B1; PXOR C0, C1; PXOR D0, D1 - MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup) - MOVOU (8*16)(inp), A0; MOVOU (9*16)(inp), B0; MOVOU (10*16)(inp), C0; MOVOU (11*16)(inp), D0 - PXOR A0, A2; PXOR B0, B2; PXOR C0, C2; PXOR D0, D2 - MOVOU A2, (8*16)(oup); MOVOU B2, (9*16)(oup); MOVOU C2, (10*16)(oup); MOVOU D2, (11*16)(oup) - ADDQ $192, inp - MOVQ $192, itr1 - SUBQ $192, inl - MOVO A3, A1 - MOVO B3, B1 - MOVO C3, C1 - MOVO D3, D1 - CMPQ inl, $64 + MOVOU (SI), X15 + PXOR X15, X0 + MOVOU 16(SI), X15 + PXOR X15, X3 + MOVOU 32(SI), X15 + PXOR X15, X6 + MOVOU 48(SI), X15 + PXOR X15, X9 + MOVOU X0, (DI) + MOVOU X3, 16(DI) + MOVOU X6, 32(DI) + MOVOU X9, 48(DI) + MOVO 64(BP), X15 + MOVOU 64(SI), X0 + MOVOU 80(SI), X3 + MOVOU 96(SI), X6 + MOVOU 112(SI), X9 + PXOR X0, X1 + PXOR X3, X4 + PXOR X6, X7 + PXOR X9, X10 + MOVOU X1, 64(DI) + MOVOU X4, 80(DI) + MOVOU X7, 96(DI) + MOVOU X10, 112(DI) + MOVOU 128(SI), X0 + MOVOU 144(SI), X3 + MOVOU 160(SI), X6 + MOVOU 176(SI), X9 + PXOR X0, X2 + PXOR X3, X5 + PXOR X6, X8 + PXOR X9, X11 + MOVOU X2, 128(DI) + MOVOU X5, 144(DI) + MOVOU X8, 160(DI) + MOVOU X11, 176(DI) + ADDQ $0xc0, SI + MOVQ $0x000000c0, CX + SUBQ $0xc0, BX + MOVO X12, X1 + MOVO X13, X4 + MOVO X14, X7 + MOVO X15, X10 + CMPQ BX, $0x40 JBE sealSSE128SealHash - MOVOU (0*16)(inp), A0; MOVOU (1*16)(inp), B0; MOVOU (2*16)(inp), C0; MOVOU (3*16)(inp), D0 - PXOR A0, A3; PXOR B0, B3; PXOR C0, C3; PXOR D0, D3 - MOVOU A3, (12*16)(oup); MOVOU B3, (13*16)(oup); MOVOU C3, (14*16)(oup); MOVOU D3, (15*16)(oup) - LEAQ 64(inp), inp - SUBQ $64, inl - MOVQ $6, itr1 - MOVQ $4, itr2 - CMPQ inl, $192 + MOVOU (SI), X0 + MOVOU 16(SI), X3 + MOVOU 32(SI), X6 + MOVOU 48(SI), X9 + PXOR X0, X12 + PXOR X3, X13 + PXOR X6, X14 + PXOR X9, X15 + MOVOU X12, 192(DI) + MOVOU X13, 208(DI) + MOVOU X14, 224(DI) + MOVOU X15, 240(DI) + LEAQ 64(SI), SI + SUBQ $0x40, BX + MOVQ $0x00000006, CX + MOVQ $0x00000004, R9 + CMPQ BX, $0xc0 JG sealSSEMainLoop - - MOVQ inl, itr1 - TESTQ inl, inl + MOVQ BX, CX + TESTQ BX, BX JE sealSSE128SealHash - MOVQ $6, itr1 - CMPQ inl, $64 + MOVQ $0x00000006, CX + CMPQ BX, $0x40 JBE sealSSETail64 - CMPQ inl, $128 + CMPQ BX, $0x80 JBE sealSSETail128 JMP sealSSETail192 -// ---------------------------------------------------------------------------- -// Special optimization for the last 64 bytes of plaintext sealSSETail64: - // Need to encrypt up to 64 bytes - prepare single block, hash 192 or 256 bytes - MOVO ·chacha20Constants<>(SB), A1 - MOVO state1Store, B1 - MOVO state2Store, C1 - MOVO ctr3Store, D1 - PADDL ·sseIncMask<>(SB), D1 - MOVO D1, ctr0Store + MOVO ·chacha20Constants<>+0(SB), X1 + MOVO 32(BP), X4 + MOVO 48(BP), X7 + MOVO 128(BP), X10 + PADDL ·sseIncMask<>+0(SB), X10 + MOVO X10, 80(BP) sealSSETail64LoopA: - // Perform ChaCha rounds, while hashing the previously encrypted ciphertext - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(DI), DI sealSSETail64LoopB: - chachaQR(A1, B1, C1, D1, T1) - shiftB1Left; shiftC1Left; shiftD1Left - chachaQR(A1, B1, C1, D1, T1) - shiftB1Right; shiftC1Right; shiftD1Right - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup - - DECQ itr1 - JG sealSSETail64LoopA - - DECQ itr2 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X13) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X13 + PSLLL $0x0c, X13 + PSRLL $0x14, X4 + PXOR X13, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X13) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X13 + PSLLL $0x07, X13 + PSRLL $0x19, X4 + PXOR X13, X4 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x0c + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X13) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X13 + PSLLL $0x0c, X13 + PSRLL $0x14, X4 + PXOR X13, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X13) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X13 + PSLLL $0x07, X13 + PSRLL $0x19, X4 + PXOR X13, X4 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x04 + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(DI), DI + DECQ CX + JG sealSSETail64LoopA + DECQ R9 JGE sealSSETail64LoopB - PADDL ·chacha20Constants<>(SB), A1 - PADDL state1Store, B1 - PADDL state2Store, C1 - PADDL ctr0Store, D1 + PADDL ·chacha20Constants<>+0(SB), X1 + PADDL 32(BP), X4 + PADDL 48(BP), X7 + PADDL 80(BP), X10 + JMP sealSSE128Seal - JMP sealSSE128Seal - -// ---------------------------------------------------------------------------- -// Special optimization for the last 128 bytes of plaintext sealSSETail128: - // Need to encrypt up to 128 bytes - prepare two blocks, hash 192 or 256 bytes - MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr0Store - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1; MOVO D1, ctr1Store + MOVO ·chacha20Constants<>+0(SB), X0 + MOVO 32(BP), X3 + MOVO 48(BP), X6 + MOVO 128(BP), X9 + PADDL ·sseIncMask<>+0(SB), X9 + MOVO X9, 80(BP) + MOVO X0, X1 + MOVO X3, X4 + MOVO X6, X7 + MOVO X9, X10 + PADDL ·sseIncMask<>+0(SB), X10 + MOVO X10, 96(BP) sealSSETail128LoopA: - // Perform ChaCha rounds, while hashing the previously encrypted ciphertext - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(DI), DI sealSSETail128LoopB: - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0) - shiftB0Left; shiftC0Left; shiftD0Left - shiftB1Left; shiftC1Left; shiftD1Left - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0) - shiftB0Right; shiftC0Right; shiftD0Right - shiftB1Right; shiftC1Right; shiftD1Right - - DECQ itr1 - JG sealSSETail128LoopA - - DECQ itr2 - JGE sealSSETail128LoopB - - PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1 - PADDL state1Store, B0; PADDL state1Store, B1 - PADDL state2Store, C0; PADDL state2Store, C1 - PADDL ctr0Store, D0; PADDL ctr1Store, D1 - - MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3 - PXOR T0, A0; PXOR T1, B0; PXOR T2, C0; PXOR T3, D0 - MOVOU A0, (0*16)(oup); MOVOU B0, (1*16)(oup); MOVOU C0, (2*16)(oup); MOVOU D0, (3*16)(oup) - - MOVQ $64, itr1 - LEAQ 64(inp), inp - SUBQ $64, inl - - JMP sealSSE128SealHash - -// ---------------------------------------------------------------------------- -// Special optimization for the last 192 bytes of plaintext + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X4 + PXOR X12, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X4 + PXOR X12, X4 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x0c + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(DI), DI + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X4 + PXOR X12, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X4 + PXOR X12, X4 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x04 + DECQ CX + JG sealSSETail128LoopA + DECQ R9 + JGE sealSSETail128LoopB + PADDL ·chacha20Constants<>+0(SB), X0 + PADDL ·chacha20Constants<>+0(SB), X1 + PADDL 32(BP), X3 + PADDL 32(BP), X4 + PADDL 48(BP), X6 + PADDL 48(BP), X7 + PADDL 80(BP), X9 + PADDL 96(BP), X10 + MOVOU (SI), X12 + MOVOU 16(SI), X13 + MOVOU 32(SI), X14 + MOVOU 48(SI), X15 + PXOR X12, X0 + PXOR X13, X3 + PXOR X14, X6 + PXOR X15, X9 + MOVOU X0, (DI) + MOVOU X3, 16(DI) + MOVOU X6, 32(DI) + MOVOU X9, 48(DI) + MOVQ $0x00000040, CX + LEAQ 64(SI), SI + SUBQ $0x40, BX + JMP sealSSE128SealHash + sealSSETail192: - // Need to encrypt up to 192 bytes - prepare three blocks, hash 192 or 256 bytes - MOVO ·chacha20Constants<>(SB), A0; MOVO state1Store, B0; MOVO state2Store, C0; MOVO ctr3Store, D0; PADDL ·sseIncMask<>(SB), D0; MOVO D0, ctr0Store - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1; MOVO D1, ctr1Store - MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2; MOVO D2, ctr2Store + MOVO ·chacha20Constants<>+0(SB), X0 + MOVO 32(BP), X3 + MOVO 48(BP), X6 + MOVO 128(BP), X9 + PADDL ·sseIncMask<>+0(SB), X9 + MOVO X9, 80(BP) + MOVO X0, X1 + MOVO X3, X4 + MOVO X6, X7 + MOVO X9, X10 + PADDL ·sseIncMask<>+0(SB), X10 + MOVO X10, 96(BP) + MOVO X1, X2 + MOVO X4, X5 + MOVO X7, X8 + MOVO X10, X11 + PADDL ·sseIncMask<>+0(SB), X11 + MOVO X11, 112(BP) sealSSETail192LoopA: - // Perform ChaCha rounds, while hashing the previously encrypted ciphertext - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(DI), DI sealSSETail192LoopB: - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Left; shiftC0Left; shiftD0Left - shiftB1Left; shiftC1Left; shiftD1Left - shiftB2Left; shiftC2Left; shiftD2Left - - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup - - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Right; shiftC0Right; shiftD0Right - shiftB1Right; shiftC1Right; shiftD1Right - shiftB2Right; shiftC2Right; shiftD2Right - - DECQ itr1 - JG sealSSETail192LoopA - - DECQ itr2 - JGE sealSSETail192LoopB - - PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1; PADDL ·chacha20Constants<>(SB), A2 - PADDL state1Store, B0; PADDL state1Store, B1; PADDL state1Store, B2 - PADDL state2Store, C0; PADDL state2Store, C1; PADDL state2Store, C2 - PADDL ctr0Store, D0; PADDL ctr1Store, D1; PADDL ctr2Store, D2 - - MOVOU (0*16)(inp), T0; MOVOU (1*16)(inp), T1; MOVOU (2*16)(inp), T2; MOVOU (3*16)(inp), T3 - PXOR T0, A0; PXOR T1, B0; PXOR T2, C0; PXOR T3, D0 - MOVOU A0, (0*16)(oup); MOVOU B0, (1*16)(oup); MOVOU C0, (2*16)(oup); MOVOU D0, (3*16)(oup) - MOVOU (4*16)(inp), T0; MOVOU (5*16)(inp), T1; MOVOU (6*16)(inp), T2; MOVOU (7*16)(inp), T3 - PXOR T0, A1; PXOR T1, B1; PXOR T2, C1; PXOR T3, D1 - MOVOU A1, (4*16)(oup); MOVOU B1, (5*16)(oup); MOVOU C1, (6*16)(oup); MOVOU D1, (7*16)(oup) - - MOVO A2, A1 - MOVO B2, B1 - MOVO C2, C1 - MOVO D2, D1 - MOVQ $128, itr1 - LEAQ 128(inp), inp - SUBQ $128, inl - - JMP sealSSE128SealHash - -// ---------------------------------------------------------------------------- -// Special seal optimization for buffers smaller than 129 bytes + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X4 + PXOR X12, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X4 + PXOR X12, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X5 + PXOR X12, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X5 + PXOR X12, X5 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(DI), DI + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X4 + PXOR X12, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X4 + PXOR X12, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X5 + PXOR X12, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X5 + PXOR X12, X5 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + DECQ CX + JG sealSSETail192LoopA + DECQ R9 + JGE sealSSETail192LoopB + PADDL ·chacha20Constants<>+0(SB), X0 + PADDL ·chacha20Constants<>+0(SB), X1 + PADDL ·chacha20Constants<>+0(SB), X2 + PADDL 32(BP), X3 + PADDL 32(BP), X4 + PADDL 32(BP), X5 + PADDL 48(BP), X6 + PADDL 48(BP), X7 + PADDL 48(BP), X8 + PADDL 80(BP), X9 + PADDL 96(BP), X10 + PADDL 112(BP), X11 + MOVOU (SI), X12 + MOVOU 16(SI), X13 + MOVOU 32(SI), X14 + MOVOU 48(SI), X15 + PXOR X12, X0 + PXOR X13, X3 + PXOR X14, X6 + PXOR X15, X9 + MOVOU X0, (DI) + MOVOU X3, 16(DI) + MOVOU X6, 32(DI) + MOVOU X9, 48(DI) + MOVOU 64(SI), X12 + MOVOU 80(SI), X13 + MOVOU 96(SI), X14 + MOVOU 112(SI), X15 + PXOR X12, X1 + PXOR X13, X4 + PXOR X14, X7 + PXOR X15, X10 + MOVOU X1, 64(DI) + MOVOU X4, 80(DI) + MOVOU X7, 96(DI) + MOVOU X10, 112(DI) + MOVO X2, X1 + MOVO X5, X4 + MOVO X8, X7 + MOVO X11, X10 + MOVQ $0x00000080, CX + LEAQ 128(SI), SI + SUBQ $0x80, BX + JMP sealSSE128SealHash + sealSSE128: - // For up to 128 bytes of ciphertext and 64 bytes for the poly key, we require to process three blocks - MOVOU ·chacha20Constants<>(SB), A0; MOVOU (1*16)(keyp), B0; MOVOU (2*16)(keyp), C0; MOVOU (3*16)(keyp), D0 - MOVO A0, A1; MOVO B0, B1; MOVO C0, C1; MOVO D0, D1; PADDL ·sseIncMask<>(SB), D1 - MOVO A1, A2; MOVO B1, B2; MOVO C1, C2; MOVO D1, D2; PADDL ·sseIncMask<>(SB), D2 - MOVO B0, T1; MOVO C0, T2; MOVO D1, T3 - MOVQ $10, itr2 + MOVOU ·chacha20Constants<>+0(SB), X0 + MOVOU 16(R8), X3 + MOVOU 32(R8), X6 + MOVOU 48(R8), X9 + MOVO X0, X1 + MOVO X3, X4 + MOVO X6, X7 + MOVO X9, X10 + PADDL ·sseIncMask<>+0(SB), X10 + MOVO X1, X2 + MOVO X4, X5 + MOVO X7, X8 + MOVO X10, X11 + PADDL ·sseIncMask<>+0(SB), X11 + MOVO X3, X13 + MOVO X6, X14 + MOVO X10, X15 + MOVQ $0x0000000a, R9 sealSSE128InnerCipherLoop: - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Left; shiftB1Left; shiftB2Left - shiftC0Left; shiftC1Left; shiftC2Left - shiftD0Left; shiftD1Left; shiftD2Left - chachaQR(A0, B0, C0, D0, T0); chachaQR(A1, B1, C1, D1, T0); chachaQR(A2, B2, C2, D2, T0) - shiftB0Right; shiftB1Right; shiftB2Right - shiftC0Right; shiftC1Right; shiftC2Right - shiftD0Right; shiftD1Right; shiftD2Right - DECQ itr2 - JNE sealSSE128InnerCipherLoop + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X4 + PXOR X12, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X4 + PXOR X12, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X5 + PXOR X12, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X5 + PXOR X12, X5 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x04 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x0c + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + PADDD X3, X0 + PXOR X0, X9 + ROL16(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X3 + PXOR X12, X3 + PADDD X3, X0 + PXOR X0, X9 + ROL8(X9, X12) + PADDD X9, X6 + PXOR X6, X3 + MOVO X3, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X3 + PXOR X12, X3 + PADDD X4, X1 + PXOR X1, X10 + ROL16(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X4 + PXOR X12, X4 + PADDD X4, X1 + PXOR X1, X10 + ROL8(X10, X12) + PADDD X10, X7 + PXOR X7, X4 + MOVO X4, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X4 + PXOR X12, X4 + PADDD X5, X2 + PXOR X2, X11 + ROL16(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x0c, X12 + PSRLL $0x14, X5 + PXOR X12, X5 + PADDD X5, X2 + PXOR X2, X11 + ROL8(X11, X12) + PADDD X11, X8 + PXOR X8, X5 + MOVO X5, X12 + PSLLL $0x07, X12 + PSRLL $0x19, X5 + PXOR X12, X5 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xe4 + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xed + BYTE $0x0c + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xf6 + BYTE $0x08 + BYTE $0x66 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xff + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc0 + BYTE $0x08 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xc9 + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xd2 + BYTE $0x04 + BYTE $0x66 + BYTE $0x45 + BYTE $0x0f + BYTE $0x3a + BYTE $0x0f + BYTE $0xdb + BYTE $0x04 + DECQ R9 + JNE sealSSE128InnerCipherLoop // A0|B0 hold the Poly1305 32-byte key, C0,D0 can be discarded - PADDL ·chacha20Constants<>(SB), A0; PADDL ·chacha20Constants<>(SB), A1; PADDL ·chacha20Constants<>(SB), A2 - PADDL T1, B0; PADDL T1, B1; PADDL T1, B2 - PADDL T2, C1; PADDL T2, C2 - PADDL T3, D1; PADDL ·sseIncMask<>(SB), T3; PADDL T3, D2 - PAND ·polyClampMask<>(SB), A0 - MOVOU A0, rStore - MOVOU B0, sStore + PADDL ·chacha20Constants<>+0(SB), X0 + PADDL ·chacha20Constants<>+0(SB), X1 + PADDL ·chacha20Constants<>+0(SB), X2 + PADDL X13, X3 + PADDL X13, X4 + PADDL X13, X5 + PADDL X14, X7 + PADDL X14, X8 + PADDL X15, X10 + PADDL ·sseIncMask<>+0(SB), X15 + PADDL X15, X11 + PAND ·polyClampMask<>+0(SB), X0 + MOVOU X0, (BP) + MOVOU X3, 16(BP) // Hash - MOVQ ad_len+80(FP), itr2 + MOVQ ad_len+80(FP), R9 CALL polyHashADInternal<>(SB) - XORQ itr1, itr1 + XORQ CX, CX sealSSE128SealHash: - // itr1 holds the number of bytes encrypted but not yet hashed - CMPQ itr1, $16 - JB sealSSE128Seal - polyAdd(0(oup)) - polyMul - - SUBQ $16, itr1 - ADDQ $16, oup - - JMP sealSSE128SealHash + CMPQ CX, $0x10 + JB sealSSE128Seal + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + SUBQ $0x10, CX + ADDQ $0x10, DI + JMP sealSSE128SealHash sealSSE128Seal: - CMPQ inl, $16 + CMPQ BX, $0x10 JB sealSSETail - SUBQ $16, inl + SUBQ $0x10, BX // Load for decryption - MOVOU (inp), T0 - PXOR T0, A1 - MOVOU A1, (oup) - LEAQ (1*16)(inp), inp - LEAQ (1*16)(oup), oup + MOVOU (SI), X12 + PXOR X12, X1 + MOVOU X1, (DI) + LEAQ 16(SI), SI + LEAQ 16(DI), DI // Extract for hashing - MOVQ A1, t0 - PSRLDQ $8, A1 - MOVQ A1, t1 - ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2 - polyMul + MOVQ X1, R13 + PSRLDQ $0x08, X1 + MOVQ X1, R14 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 // Shift the stream "left" - MOVO B1, A1 - MOVO C1, B1 - MOVO D1, C1 - MOVO A2, D1 - MOVO B2, A2 - MOVO C2, B2 - MOVO D2, C2 + MOVO X4, X1 + MOVO X7, X4 + MOVO X10, X7 + MOVO X2, X10 + MOVO X5, X2 + MOVO X8, X5 + MOVO X11, X8 JMP sealSSE128Seal sealSSETail: - TESTQ inl, inl + TESTQ BX, BX JE sealSSEFinalize // We can only load the PT one byte at a time to avoid read after end of buffer - MOVQ inl, itr2 - SHLQ $4, itr2 - LEAQ ·andMask<>(SB), t0 - MOVQ inl, itr1 - LEAQ -1(inp)(inl*1), inp - XORQ t2, t2 - XORQ t3, t3 + MOVQ BX, R9 + SHLQ $0x04, R9 + LEAQ ·andMask<>+0(SB), R13 + MOVQ BX, CX + LEAQ -1(SI)(BX*1), SI + XORQ R15, R15 + XORQ R8, R8 XORQ AX, AX sealSSETailLoadLoop: - SHLQ $8, t2, t3 - SHLQ $8, t2 - MOVB (inp), AX - XORQ AX, t2 - LEAQ -1(inp), inp - DECQ itr1 + SHLQ $0x08, R15, R8 + SHLQ $0x08, R15 + MOVB (SI), AX + XORQ AX, R15 + LEAQ -1(SI), SI + DECQ CX JNE sealSSETailLoadLoop - MOVQ t2, 0+tmpStore - MOVQ t3, 8+tmpStore - PXOR 0+tmpStore, A1 - MOVOU A1, (oup) - MOVOU -16(t0)(itr2*1), T0 - PAND T0, A1 - MOVQ A1, t0 - PSRLDQ $8, A1 - MOVQ A1, t1 - ADDQ t0, acc0; ADCQ t1, acc1; ADCQ $1, acc2 - polyMul - - ADDQ inl, oup + MOVQ R15, 64(BP) + MOVQ R8, 72(BP) + PXOR 64(BP), X1 + MOVOU X1, (DI) + MOVOU -16(R13)(R9*1), X12 + PAND X12, X1 + MOVQ X1, R13 + PSRLDQ $0x08, X1 + MOVQ X1, R14 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + ADDQ BX, DI sealSSEFinalize: // Hash in the buffer lengths - ADDQ ad_len+80(FP), acc0 - ADCQ src_len+56(FP), acc1 - ADCQ $1, acc2 - polyMul + ADDQ ad_len+80(FP), R10 + ADCQ src_len+56(FP), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 // Final reduce - MOVQ acc0, t0 - MOVQ acc1, t1 - MOVQ acc2, t2 - SUBQ $-5, acc0 - SBBQ $-1, acc1 - SBBQ $3, acc2 - CMOVQCS t0, acc0 - CMOVQCS t1, acc1 - CMOVQCS t2, acc2 + MOVQ R10, R13 + MOVQ R11, R14 + MOVQ R12, R15 + SUBQ $-5, R10 + SBBQ $-1, R11 + SBBQ $0x03, R12 + CMOVQCS R13, R10 + CMOVQCS R14, R11 + CMOVQCS R15, R12 // Add in the "s" part of the key - ADDQ 0+sStore, acc0 - ADCQ 8+sStore, acc1 + ADDQ 16(BP), R10 + ADCQ 24(BP), R11 // Finally store the tag at the end of the message - MOVQ acc0, (0*8)(oup) - MOVQ acc1, (1*8)(oup) + MOVQ R10, (DI) + MOVQ R11, 8(DI) RET -// ---------------------------------------------------------------------------- -// ------------------------- AVX2 Code ---------------------------------------- chacha20Poly1305Seal_AVX2: VZEROUPPER - VMOVDQU ·chacha20Constants<>(SB), AA0 - BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x70; BYTE $0x10 // broadcasti128 16(r8), ymm14 - BYTE $0xc4; BYTE $0x42; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x20 // broadcasti128 32(r8), ymm12 - BYTE $0xc4; BYTE $0xc2; BYTE $0x7d; BYTE $0x5a; BYTE $0x60; BYTE $0x30 // broadcasti128 48(r8), ymm4 - VPADDD ·avx2InitMask<>(SB), DD0, DD0 + VMOVDQU ·chacha20Constants<>+0(SB), Y0 + BYTE $0xc4 + BYTE $0x42 + BYTE $0x7d + BYTE $0x5a + BYTE $0x70 + BYTE $0x10 + BYTE $0xc4 + BYTE $0x42 + BYTE $0x7d + BYTE $0x5a + BYTE $0x60 + BYTE $0x20 + BYTE $0xc4 + BYTE $0xc2 + BYTE $0x7d + BYTE $0x5a + BYTE $0x60 + BYTE $0x30 + VPADDD ·avx2InitMask<>+0(SB), Y4, Y4 // Special optimizations, for very short buffers - CMPQ inl, $192 - JBE seal192AVX2 // 33% faster - CMPQ inl, $320 - JBE seal320AVX2 // 17% faster + CMPQ BX, $0x000000c0 + JBE seal192AVX2 + CMPQ BX, $0x00000140 + JBE seal320AVX2 // For the general key prepare the key first - as a byproduct we have 64 bytes of cipher stream - VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3 - VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3; VMOVDQA BB0, state1StoreAVX2 - VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3; VMOVDQA CC0, state2StoreAVX2 - VPADDD ·avx2IncMask<>(SB), DD0, DD1; VMOVDQA DD0, ctr0StoreAVX2 - VPADDD ·avx2IncMask<>(SB), DD1, DD2; VMOVDQA DD1, ctr1StoreAVX2 - VPADDD ·avx2IncMask<>(SB), DD2, DD3; VMOVDQA DD2, ctr2StoreAVX2 - VMOVDQA DD3, ctr3StoreAVX2 - MOVQ $10, itr2 + VMOVDQA Y0, Y5 + VMOVDQA Y0, Y6 + VMOVDQA Y0, Y7 + VMOVDQA Y14, Y9 + VMOVDQA Y14, Y10 + VMOVDQA Y14, Y11 + VMOVDQA Y14, 32(BP) + VMOVDQA Y12, Y13 + VMOVDQA Y12, Y8 + VMOVDQA Y12, Y15 + VMOVDQA Y12, 64(BP) + VPADDD ·avx2IncMask<>+0(SB), Y4, Y1 + VMOVDQA Y4, 96(BP) + VPADDD ·avx2IncMask<>+0(SB), Y1, Y2 + VMOVDQA Y1, 128(BP) + VPADDD ·avx2IncMask<>+0(SB), Y2, Y3 + VMOVDQA Y2, 160(BP) + VMOVDQA Y3, 192(BP) + MOVQ $0x0000000a, R9 sealAVX2IntroLoop: - VMOVDQA CC3, tmpStoreAVX2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3) - VMOVDQA tmpStoreAVX2, CC3 - VMOVDQA CC1, tmpStoreAVX2 - chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1) - VMOVDQA tmpStoreAVX2, CC1 - - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $12, DD0, DD0, DD0 - VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $12, DD1, DD1, DD1 - VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $12, DD2, DD2, DD2 - VPALIGNR $4, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $12, DD3, DD3, DD3 - - VMOVDQA CC3, tmpStoreAVX2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3) - VMOVDQA tmpStoreAVX2, CC3 - VMOVDQA CC1, tmpStoreAVX2 - chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1) - VMOVDQA tmpStoreAVX2, CC1 - - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $4, DD0, DD0, DD0 - VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $4, DD1, DD1, DD1 - VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $4, DD2, DD2, DD2 - VPALIGNR $12, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $4, DD3, DD3, DD3 - DECQ itr2 - JNE sealAVX2IntroLoop - - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3 - VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3 - - VPERM2I128 $0x13, CC0, DD0, CC0 // Stream bytes 96 - 127 - VPERM2I128 $0x02, AA0, BB0, DD0 // The Poly1305 key - VPERM2I128 $0x13, AA0, BB0, AA0 // Stream bytes 64 - 95 + VMOVDQA Y15, 224(BP) + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y15 + VPSRLD $0x14, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y15 + VPSRLD $0x19, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y15 + VPSRLD $0x14, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y15 + VPSRLD $0x19, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x0c, Y10, Y15 + VPSRLD $0x14, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x07, Y10, Y15 + VPSRLD $0x19, Y10, Y10 + VPXOR Y15, Y10, Y10 + VMOVDQA 224(BP), Y15 + VMOVDQA Y13, 224(BP) + VPADDD Y11, Y7, Y7 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol16<>+0(SB), Y3, Y3 + VPADDD Y3, Y15, Y15 + VPXOR Y15, Y11, Y11 + VPSLLD $0x0c, Y11, Y13 + VPSRLD $0x14, Y11, Y11 + VPXOR Y13, Y11, Y11 + VPADDD Y11, Y7, Y7 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol8<>+0(SB), Y3, Y3 + VPADDD Y3, Y15, Y15 + VPXOR Y15, Y11, Y11 + VPSLLD $0x07, Y11, Y13 + VPSRLD $0x19, Y11, Y11 + VPXOR Y13, Y11, Y11 + VMOVDQA 224(BP), Y13 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x0c, Y1, Y1, Y1 + VPALIGNR $0x04, Y10, Y10, Y10 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x0c, Y2, Y2, Y2 + VPALIGNR $0x04, Y11, Y11, Y11 + VPALIGNR $0x08, Y15, Y15, Y15 + VPALIGNR $0x0c, Y3, Y3, Y3 + VMOVDQA Y15, 224(BP) + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y15 + VPSRLD $0x14, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y15 + VPSRLD $0x19, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y15 + VPSRLD $0x14, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y15 + VPSRLD $0x19, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x0c, Y10, Y15 + VPSRLD $0x14, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x07, Y10, Y15 + VPSRLD $0x19, Y10, Y10 + VPXOR Y15, Y10, Y10 + VMOVDQA 224(BP), Y15 + VMOVDQA Y13, 224(BP) + VPADDD Y11, Y7, Y7 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol16<>+0(SB), Y3, Y3 + VPADDD Y3, Y15, Y15 + VPXOR Y15, Y11, Y11 + VPSLLD $0x0c, Y11, Y13 + VPSRLD $0x14, Y11, Y11 + VPXOR Y13, Y11, Y11 + VPADDD Y11, Y7, Y7 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol8<>+0(SB), Y3, Y3 + VPADDD Y3, Y15, Y15 + VPXOR Y15, Y11, Y11 + VPSLLD $0x07, Y11, Y13 + VPSRLD $0x19, Y11, Y11 + VPXOR Y13, Y11, Y11 + VMOVDQA 224(BP), Y13 + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x04, Y4, Y4, Y4 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x04, Y1, Y1, Y1 + VPALIGNR $0x0c, Y10, Y10, Y10 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x04, Y2, Y2, Y2 + VPALIGNR $0x0c, Y11, Y11, Y11 + VPALIGNR $0x08, Y15, Y15, Y15 + VPALIGNR $0x04, Y3, Y3, Y3 + DECQ R9 + JNE sealAVX2IntroLoop + VPADDD ·chacha20Constants<>+0(SB), Y0, Y0 + VPADDD ·chacha20Constants<>+0(SB), Y5, Y5 + VPADDD ·chacha20Constants<>+0(SB), Y6, Y6 + VPADDD ·chacha20Constants<>+0(SB), Y7, Y7 + VPADDD 32(BP), Y14, Y14 + VPADDD 32(BP), Y9, Y9 + VPADDD 32(BP), Y10, Y10 + VPADDD 32(BP), Y11, Y11 + VPADDD 64(BP), Y12, Y12 + VPADDD 64(BP), Y13, Y13 + VPADDD 64(BP), Y8, Y8 + VPADDD 64(BP), Y15, Y15 + VPADDD 96(BP), Y4, Y4 + VPADDD 128(BP), Y1, Y1 + VPADDD 160(BP), Y2, Y2 + VPADDD 192(BP), Y3, Y3 + VPERM2I128 $0x13, Y12, Y4, Y12 + VPERM2I128 $0x02, Y0, Y14, Y4 + VPERM2I128 $0x13, Y0, Y14, Y0 // Clamp and store poly key - VPAND ·polyClampMask<>(SB), DD0, DD0 - VMOVDQA DD0, rsStoreAVX2 + VPAND ·polyClampMask<>+0(SB), Y4, Y4 + VMOVDQA Y4, (BP) // Hash AD - MOVQ ad_len+80(FP), itr2 + MOVQ ad_len+80(FP), R9 CALL polyHashADInternal<>(SB) // Can store at least 320 bytes - VPXOR (0*32)(inp), AA0, AA0 - VPXOR (1*32)(inp), CC0, CC0 - VMOVDQU AA0, (0*32)(oup) - VMOVDQU CC0, (1*32)(oup) - - VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0 - VPXOR (2*32)(inp), AA0, AA0; VPXOR (3*32)(inp), BB0, BB0; VPXOR (4*32)(inp), CC0, CC0; VPXOR (5*32)(inp), DD0, DD0 - VMOVDQU AA0, (2*32)(oup); VMOVDQU BB0, (3*32)(oup); VMOVDQU CC0, (4*32)(oup); VMOVDQU DD0, (5*32)(oup) - VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0 - VPXOR (6*32)(inp), AA0, AA0; VPXOR (7*32)(inp), BB0, BB0; VPXOR (8*32)(inp), CC0, CC0; VPXOR (9*32)(inp), DD0, DD0 - VMOVDQU AA0, (6*32)(oup); VMOVDQU BB0, (7*32)(oup); VMOVDQU CC0, (8*32)(oup); VMOVDQU DD0, (9*32)(oup) - - MOVQ $320, itr1 - SUBQ $320, inl - LEAQ 320(inp), inp - - VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, CC3, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, CC3, DD3, DD0 - CMPQ inl, $128 + VPXOR (SI), Y0, Y0 + VPXOR 32(SI), Y12, Y12 + VMOVDQU Y0, (DI) + VMOVDQU Y12, 32(DI) + VPERM2I128 $0x02, Y5, Y9, Y0 + VPERM2I128 $0x02, Y13, Y1, Y14 + VPERM2I128 $0x13, Y5, Y9, Y12 + VPERM2I128 $0x13, Y13, Y1, Y4 + VPXOR 64(SI), Y0, Y0 + VPXOR 96(SI), Y14, Y14 + VPXOR 128(SI), Y12, Y12 + VPXOR 160(SI), Y4, Y4 + VMOVDQU Y0, 64(DI) + VMOVDQU Y14, 96(DI) + VMOVDQU Y12, 128(DI) + VMOVDQU Y4, 160(DI) + VPERM2I128 $0x02, Y6, Y10, Y0 + VPERM2I128 $0x02, Y8, Y2, Y14 + VPERM2I128 $0x13, Y6, Y10, Y12 + VPERM2I128 $0x13, Y8, Y2, Y4 + VPXOR 192(SI), Y0, Y0 + VPXOR 224(SI), Y14, Y14 + VPXOR 256(SI), Y12, Y12 + VPXOR 288(SI), Y4, Y4 + VMOVDQU Y0, 192(DI) + VMOVDQU Y14, 224(DI) + VMOVDQU Y12, 256(DI) + VMOVDQU Y4, 288(DI) + MOVQ $0x00000140, CX + SUBQ $0x00000140, BX + LEAQ 320(SI), SI + VPERM2I128 $0x02, Y7, Y11, Y0 + VPERM2I128 $0x02, Y15, Y3, Y14 + VPERM2I128 $0x13, Y7, Y11, Y12 + VPERM2I128 $0x13, Y15, Y3, Y4 + CMPQ BX, $0x80 JBE sealAVX2SealHash - - VPXOR (0*32)(inp), AA0, AA0; VPXOR (1*32)(inp), BB0, BB0; VPXOR (2*32)(inp), CC0, CC0; VPXOR (3*32)(inp), DD0, DD0 - VMOVDQU AA0, (10*32)(oup); VMOVDQU BB0, (11*32)(oup); VMOVDQU CC0, (12*32)(oup); VMOVDQU DD0, (13*32)(oup) - SUBQ $128, inl - LEAQ 128(inp), inp - - MOVQ $8, itr1 - MOVQ $2, itr2 - - CMPQ inl, $128 - JBE sealAVX2Tail128 - CMPQ inl, $256 - JBE sealAVX2Tail256 - CMPQ inl, $384 - JBE sealAVX2Tail384 - CMPQ inl, $512 - JBE sealAVX2Tail512 + VPXOR (SI), Y0, Y0 + VPXOR 32(SI), Y14, Y14 + VPXOR 64(SI), Y12, Y12 + VPXOR 96(SI), Y4, Y4 + VMOVDQU Y0, 320(DI) + VMOVDQU Y14, 352(DI) + VMOVDQU Y12, 384(DI) + VMOVDQU Y4, 416(DI) + SUBQ $0x80, BX + LEAQ 128(SI), SI + MOVQ $0x00000008, CX + MOVQ $0x00000002, R9 + CMPQ BX, $0x80 + JBE sealAVX2Tail128 + CMPQ BX, $0x00000100 + JBE sealAVX2Tail256 + CMPQ BX, $0x00000180 + JBE sealAVX2Tail384 + CMPQ BX, $0x00000200 + JBE sealAVX2Tail512 // We have 448 bytes to hash, but main loop hashes 512 bytes at a time - perform some rounds, before the main loop - VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3 - VMOVDQA ctr3StoreAVX2, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3 - VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2 - - VMOVDQA CC3, tmpStoreAVX2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3) - VMOVDQA tmpStoreAVX2, CC3 - VMOVDQA CC1, tmpStoreAVX2 - chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1) - VMOVDQA tmpStoreAVX2, CC1 - - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $12, DD0, DD0, DD0 - VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $12, DD1, DD1, DD1 - VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $12, DD2, DD2, DD2 - VPALIGNR $4, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $12, DD3, DD3, DD3 - - VMOVDQA CC3, tmpStoreAVX2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, CC3); chachaQR_AVX2(AA1, BB1, CC1, DD1, CC3); chachaQR_AVX2(AA2, BB2, CC2, DD2, CC3) - VMOVDQA tmpStoreAVX2, CC3 - VMOVDQA CC1, tmpStoreAVX2 - chachaQR_AVX2(AA3, BB3, CC3, DD3, CC1) - VMOVDQA tmpStoreAVX2, CC1 - - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $4, DD0, DD0, DD0 - VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $4, DD1, DD1, DD1 - VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $4, DD2, DD2, DD2 - VPALIGNR $12, BB3, BB3, BB3; VPALIGNR $8, CC3, CC3, CC3; VPALIGNR $4, DD3, DD3, DD3 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - - SUBQ $16, oup // Adjust the pointer - MOVQ $9, itr1 - JMP sealAVX2InternalLoopStart + VMOVDQA ·chacha20Constants<>+0(SB), Y0 + VMOVDQA Y0, Y5 + VMOVDQA Y0, Y6 + VMOVDQA Y0, Y7 + VMOVDQA 32(BP), Y14 + VMOVDQA Y14, Y9 + VMOVDQA Y14, Y10 + VMOVDQA Y14, Y11 + VMOVDQA 64(BP), Y12 + VMOVDQA Y12, Y13 + VMOVDQA Y12, Y8 + VMOVDQA Y12, Y15 + VMOVDQA 192(BP), Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y1 + VPADDD ·avx2IncMask<>+0(SB), Y1, Y2 + VPADDD ·avx2IncMask<>+0(SB), Y2, Y3 + VMOVDQA Y4, 96(BP) + VMOVDQA Y1, 128(BP) + VMOVDQA Y2, 160(BP) + VMOVDQA Y3, 192(BP) + VMOVDQA Y15, 224(BP) + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y15 + VPSRLD $0x14, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y15 + VPSRLD $0x19, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y15 + VPSRLD $0x14, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y15 + VPSRLD $0x19, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x0c, Y10, Y15 + VPSRLD $0x14, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x07, Y10, Y15 + VPSRLD $0x19, Y10, Y10 + VPXOR Y15, Y10, Y10 + VMOVDQA 224(BP), Y15 + VMOVDQA Y13, 224(BP) + VPADDD Y11, Y7, Y7 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol16<>+0(SB), Y3, Y3 + VPADDD Y3, Y15, Y15 + VPXOR Y15, Y11, Y11 + VPSLLD $0x0c, Y11, Y13 + VPSRLD $0x14, Y11, Y11 + VPXOR Y13, Y11, Y11 + VPADDD Y11, Y7, Y7 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol8<>+0(SB), Y3, Y3 + VPADDD Y3, Y15, Y15 + VPXOR Y15, Y11, Y11 + VPSLLD $0x07, Y11, Y13 + VPSRLD $0x19, Y11, Y11 + VPXOR Y13, Y11, Y11 + VMOVDQA 224(BP), Y13 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x0c, Y1, Y1, Y1 + VPALIGNR $0x04, Y10, Y10, Y10 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x0c, Y2, Y2, Y2 + VPALIGNR $0x04, Y11, Y11, Y11 + VPALIGNR $0x08, Y15, Y15, Y15 + VPALIGNR $0x0c, Y3, Y3, Y3 + VMOVDQA Y15, 224(BP) + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y15 + VPSRLD $0x14, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y15 + VPSRLD $0x19, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y15 + VPSRLD $0x14, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y15 + VPSRLD $0x19, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x0c, Y10, Y15 + VPSRLD $0x14, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x07, Y10, Y15 + VPSRLD $0x19, Y10, Y10 + VPXOR Y15, Y10, Y10 + VMOVDQA 224(BP), Y15 + VMOVDQA Y13, 224(BP) + VPADDD Y11, Y7, Y7 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol16<>+0(SB), Y3, Y3 + VPADDD Y3, Y15, Y15 + VPXOR Y15, Y11, Y11 + VPSLLD $0x0c, Y11, Y13 + VPSRLD $0x14, Y11, Y11 + VPXOR Y13, Y11, Y11 + VPADDD Y11, Y7, Y7 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol8<>+0(SB), Y3, Y3 + VPADDD Y3, Y15, Y15 + VPXOR Y15, Y11, Y11 + VPSLLD $0x07, Y11, Y13 + VPSRLD $0x19, Y11, Y11 + VPXOR Y13, Y11, Y11 + VMOVDQA 224(BP), Y13 + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x04, Y4, Y4, Y4 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x04, Y1, Y1, Y1 + VPALIGNR $0x0c, Y10, Y10, Y10 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x04, Y2, Y2, Y2 + VPALIGNR $0x0c, Y11, Y11, Y11 + VPALIGNR $0x08, Y15, Y15, Y15 + VPALIGNR $0x04, Y3, Y3, Y3 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y3, Y3 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + VMOVDQA Y15, 224(BP) + VPSLLD $0x0c, Y14, Y15 + VPSRLD $0x14, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x0c, Y9, Y15 + VPSRLD $0x14, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x0c, Y10, Y15 + VPSRLD $0x14, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x0c, Y11, Y15 + VPSRLD $0x14, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + SUBQ $0x10, DI + MOVQ $0x00000009, CX + JMP sealAVX2InternalLoopStart sealAVX2MainLoop: - // Load state, increment counter blocks, store the incremented counters - VMOVDQU ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3 - VMOVDQA ctr3StoreAVX2, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3 - VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2 - MOVQ $10, itr1 + VMOVDQU ·chacha20Constants<>+0(SB), Y0 + VMOVDQA Y0, Y5 + VMOVDQA Y0, Y6 + VMOVDQA Y0, Y7 + VMOVDQA 32(BP), Y14 + VMOVDQA Y14, Y9 + VMOVDQA Y14, Y10 + VMOVDQA Y14, Y11 + VMOVDQA 64(BP), Y12 + VMOVDQA Y12, Y13 + VMOVDQA Y12, Y8 + VMOVDQA Y12, Y15 + VMOVDQA 192(BP), Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y1 + VPADDD ·avx2IncMask<>+0(SB), Y1, Y2 + VPADDD ·avx2IncMask<>+0(SB), Y2, Y3 + VMOVDQA Y4, 96(BP) + VMOVDQA Y1, 128(BP) + VMOVDQA Y2, 160(BP) + VMOVDQA Y3, 192(BP) + MOVQ $0x0000000a, CX sealAVX2InternalLoop: - polyAdd(0*8(oup)) - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - polyMulStage1_AVX2 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - polyMulStage2_AVX2 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - polyMulStage3_AVX2 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulReduceStage + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y3, Y3 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + VMOVDQA Y15, 224(BP) + VPSLLD $0x0c, Y14, Y15 + VPSRLD $0x14, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x0c, Y9, Y15 + VPSRLD $0x14, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x0c, Y10, Y15 + VPSRLD $0x14, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x0c, Y11, Y15 + VPSRLD $0x14, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 sealAVX2InternalLoopStart: - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - polyAdd(2*8(oup)) - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - polyMulStage1_AVX2 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulStage2_AVX2 - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - polyMulStage3_AVX2 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - polyMulReduceStage - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - polyAdd(4*8(oup)) - LEAQ (6*8)(oup), oup - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulStage1_AVX2 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - polyMulStage2_AVX2 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - polyMulStage3_AVX2 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyMulReduceStage - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3 - DECQ itr1 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y3, Y3 + ADDQ 16(DI), R10 + ADCQ 24(DI), R11 + ADCQ $0x01, R12 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + VMOVDQA Y15, 224(BP) + VPSLLD $0x07, Y14, Y15 + VPSRLD $0x19, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x07, Y9, Y15 + VPSRLD $0x19, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x07, Y10, Y15 + VPSRLD $0x19, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x07, Y11, Y15 + VPSRLD $0x19, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x04, Y10, Y10, Y10 + VPALIGNR $0x04, Y11, Y11, Y11 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x08, Y15, Y15, Y15 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPALIGNR $0x0c, Y1, Y1, Y1 + VPALIGNR $0x0c, Y2, Y2, Y2 + VPALIGNR $0x0c, Y3, Y3, Y3 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y3, Y3 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + ADDQ 32(DI), R10 + ADCQ 40(DI), R11 + ADCQ $0x01, R12 + LEAQ 48(DI), DI + VMOVDQA Y15, 224(BP) + VPSLLD $0x0c, Y14, Y15 + VPSRLD $0x14, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x0c, Y9, Y15 + VPSRLD $0x14, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x0c, Y10, Y15 + VPSRLD $0x14, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x0c, Y11, Y15 + VPSRLD $0x14, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y3, Y3 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + VMOVDQA Y15, 224(BP) + VPSLLD $0x07, Y14, Y15 + VPSRLD $0x19, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x07, Y9, Y15 + VPSRLD $0x19, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x07, Y10, Y15 + VPSRLD $0x19, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x07, Y11, Y15 + VPSRLD $0x19, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x0c, Y10, Y10, Y10 + VPALIGNR $0x0c, Y11, Y11, Y11 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x08, Y15, Y15, Y15 + VPALIGNR $0x04, Y4, Y4, Y4 + VPALIGNR $0x04, Y1, Y1, Y1 + VPALIGNR $0x04, Y2, Y2, Y2 + VPALIGNR $0x04, Y3, Y3, Y3 + DECQ CX JNE sealAVX2InternalLoop - - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3 - VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3 - VMOVDQA CC3, tmpStoreAVX2 + VPADDD ·chacha20Constants<>+0(SB), Y0, Y0 + VPADDD ·chacha20Constants<>+0(SB), Y5, Y5 + VPADDD ·chacha20Constants<>+0(SB), Y6, Y6 + VPADDD ·chacha20Constants<>+0(SB), Y7, Y7 + VPADDD 32(BP), Y14, Y14 + VPADDD 32(BP), Y9, Y9 + VPADDD 32(BP), Y10, Y10 + VPADDD 32(BP), Y11, Y11 + VPADDD 64(BP), Y12, Y12 + VPADDD 64(BP), Y13, Y13 + VPADDD 64(BP), Y8, Y8 + VPADDD 64(BP), Y15, Y15 + VPADDD 96(BP), Y4, Y4 + VPADDD 128(BP), Y1, Y1 + VPADDD 160(BP), Y2, Y2 + VPADDD 192(BP), Y3, Y3 + VMOVDQA Y15, 224(BP) // We only hashed 480 of the 512 bytes available - hash the remaining 32 here - polyAdd(0*8(oup)) - polyMulAVX2 - LEAQ (4*8)(oup), oup - VPERM2I128 $0x02, AA0, BB0, CC3; VPERM2I128 $0x13, AA0, BB0, BB0; VPERM2I128 $0x02, CC0, DD0, AA0; VPERM2I128 $0x13, CC0, DD0, CC0 - VPXOR (0*32)(inp), CC3, CC3; VPXOR (1*32)(inp), AA0, AA0; VPXOR (2*32)(inp), BB0, BB0; VPXOR (3*32)(inp), CC0, CC0 - VMOVDQU CC3, (0*32)(oup); VMOVDQU AA0, (1*32)(oup); VMOVDQU BB0, (2*32)(oup); VMOVDQU CC0, (3*32)(oup) - VPERM2I128 $0x02, AA1, BB1, AA0; VPERM2I128 $0x02, CC1, DD1, BB0; VPERM2I128 $0x13, AA1, BB1, CC0; VPERM2I128 $0x13, CC1, DD1, DD0 - VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0 - VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup) + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 32(DI), DI + VPERM2I128 $0x02, Y0, Y14, Y15 + VPERM2I128 $0x13, Y0, Y14, Y14 + VPERM2I128 $0x02, Y12, Y4, Y0 + VPERM2I128 $0x13, Y12, Y4, Y12 + VPXOR (SI), Y15, Y15 + VPXOR 32(SI), Y0, Y0 + VPXOR 64(SI), Y14, Y14 + VPXOR 96(SI), Y12, Y12 + VMOVDQU Y15, (DI) + VMOVDQU Y0, 32(DI) + VMOVDQU Y14, 64(DI) + VMOVDQU Y12, 96(DI) + VPERM2I128 $0x02, Y5, Y9, Y0 + VPERM2I128 $0x02, Y13, Y1, Y14 + VPERM2I128 $0x13, Y5, Y9, Y12 + VPERM2I128 $0x13, Y13, Y1, Y4 + VPXOR 128(SI), Y0, Y0 + VPXOR 160(SI), Y14, Y14 + VPXOR 192(SI), Y12, Y12 + VPXOR 224(SI), Y4, Y4 + VMOVDQU Y0, 128(DI) + VMOVDQU Y14, 160(DI) + VMOVDQU Y12, 192(DI) + VMOVDQU Y4, 224(DI) // and here - polyAdd(-2*8(oup)) - polyMulAVX2 - VPERM2I128 $0x02, AA2, BB2, AA0; VPERM2I128 $0x02, CC2, DD2, BB0; VPERM2I128 $0x13, AA2, BB2, CC0; VPERM2I128 $0x13, CC2, DD2, DD0 - VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0 - VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup) - VPERM2I128 $0x02, AA3, BB3, AA0; VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0; VPERM2I128 $0x13, AA3, BB3, CC0; VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0 - VPXOR (12*32)(inp), AA0, AA0; VPXOR (13*32)(inp), BB0, BB0; VPXOR (14*32)(inp), CC0, CC0; VPXOR (15*32)(inp), DD0, DD0 - VMOVDQU AA0, (12*32)(oup); VMOVDQU BB0, (13*32)(oup); VMOVDQU CC0, (14*32)(oup); VMOVDQU DD0, (15*32)(oup) - LEAQ (32*16)(inp), inp - SUBQ $(32*16), inl - CMPQ inl, $512 + ADDQ -16(DI), R10 + ADCQ -8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + VPERM2I128 $0x02, Y6, Y10, Y0 + VPERM2I128 $0x02, Y8, Y2, Y14 + VPERM2I128 $0x13, Y6, Y10, Y12 + VPERM2I128 $0x13, Y8, Y2, Y4 + VPXOR 256(SI), Y0, Y0 + VPXOR 288(SI), Y14, Y14 + VPXOR 320(SI), Y12, Y12 + VPXOR 352(SI), Y4, Y4 + VMOVDQU Y0, 256(DI) + VMOVDQU Y14, 288(DI) + VMOVDQU Y12, 320(DI) + VMOVDQU Y4, 352(DI) + VPERM2I128 $0x02, Y7, Y11, Y0 + VPERM2I128 $0x02, 224(BP), Y3, Y14 + VPERM2I128 $0x13, Y7, Y11, Y12 + VPERM2I128 $0x13, 224(BP), Y3, Y4 + VPXOR 384(SI), Y0, Y0 + VPXOR 416(SI), Y14, Y14 + VPXOR 448(SI), Y12, Y12 + VPXOR 480(SI), Y4, Y4 + VMOVDQU Y0, 384(DI) + VMOVDQU Y14, 416(DI) + VMOVDQU Y12, 448(DI) + VMOVDQU Y4, 480(DI) + LEAQ 512(SI), SI + SUBQ $0x00000200, BX + CMPQ BX, $0x00000200 JG sealAVX2MainLoop // Tail can only hash 480 bytes - polyAdd(0*8(oup)) - polyMulAVX2 - polyAdd(2*8(oup)) - polyMulAVX2 - LEAQ 32(oup), oup - - MOVQ $10, itr1 - MOVQ $0, itr2 - CMPQ inl, $128 - JBE sealAVX2Tail128 - CMPQ inl, $256 - JBE sealAVX2Tail256 - CMPQ inl, $384 - JBE sealAVX2Tail384 - JMP sealAVX2Tail512 - -// ---------------------------------------------------------------------------- -// Special optimization for buffers smaller than 193 bytes + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + ADDQ 16(DI), R10 + ADCQ 24(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 32(DI), DI + MOVQ $0x0000000a, CX + MOVQ $0x00000000, R9 + CMPQ BX, $0x80 + JBE sealAVX2Tail128 + CMPQ BX, $0x00000100 + JBE sealAVX2Tail256 + CMPQ BX, $0x00000180 + JBE sealAVX2Tail384 + JMP sealAVX2Tail512 + seal192AVX2: - // For up to 192 bytes of ciphertext and 64 bytes for the poly key, we process four blocks - VMOVDQA AA0, AA1 - VMOVDQA BB0, BB1 - VMOVDQA CC0, CC1 - VPADDD ·avx2IncMask<>(SB), DD0, DD1 - VMOVDQA AA0, AA2 - VMOVDQA BB0, BB2 - VMOVDQA CC0, CC2 - VMOVDQA DD0, DD2 - VMOVDQA DD1, TT3 - MOVQ $10, itr2 + VMOVDQA Y0, Y5 + VMOVDQA Y14, Y9 + VMOVDQA Y12, Y13 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y1 + VMOVDQA Y0, Y6 + VMOVDQA Y14, Y10 + VMOVDQA Y12, Y8 + VMOVDQA Y4, Y2 + VMOVDQA Y1, Y15 + MOVQ $0x0000000a, R9 sealAVX2192InnerCipherLoop: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1 - DECQ itr2 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPALIGNR $0x0c, Y1, Y1, Y1 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x04, Y4, Y4, Y4 + VPALIGNR $0x04, Y1, Y1, Y1 + DECQ R9 JNE sealAVX2192InnerCipherLoop - VPADDD AA2, AA0, AA0; VPADDD AA2, AA1, AA1 - VPADDD BB2, BB0, BB0; VPADDD BB2, BB1, BB1 - VPADDD CC2, CC0, CC0; VPADDD CC2, CC1, CC1 - VPADDD DD2, DD0, DD0; VPADDD TT3, DD1, DD1 - VPERM2I128 $0x02, AA0, BB0, TT0 + VPADDD Y6, Y0, Y0 + VPADDD Y6, Y5, Y5 + VPADDD Y10, Y14, Y14 + VPADDD Y10, Y9, Y9 + VPADDD Y8, Y12, Y12 + VPADDD Y8, Y13, Y13 + VPADDD Y2, Y4, Y4 + VPADDD Y15, Y1, Y1 + VPERM2I128 $0x02, Y0, Y14, Y3 // Clamp and store poly key - VPAND ·polyClampMask<>(SB), TT0, TT0 - VMOVDQA TT0, rsStoreAVX2 + VPAND ·polyClampMask<>+0(SB), Y3, Y3 + VMOVDQA Y3, (BP) // Stream for up to 192 bytes - VPERM2I128 $0x13, AA0, BB0, AA0 - VPERM2I128 $0x13, CC0, DD0, BB0 - VPERM2I128 $0x02, AA1, BB1, CC0 - VPERM2I128 $0x02, CC1, DD1, DD0 - VPERM2I128 $0x13, AA1, BB1, AA1 - VPERM2I128 $0x13, CC1, DD1, BB1 + VPERM2I128 $0x13, Y0, Y14, Y0 + VPERM2I128 $0x13, Y12, Y4, Y14 + VPERM2I128 $0x02, Y5, Y9, Y12 + VPERM2I128 $0x02, Y13, Y1, Y4 + VPERM2I128 $0x13, Y5, Y9, Y5 + VPERM2I128 $0x13, Y13, Y1, Y9 sealAVX2ShortSeal: // Hash aad - MOVQ ad_len+80(FP), itr2 + MOVQ ad_len+80(FP), R9 CALL polyHashADInternal<>(SB) - XORQ itr1, itr1 + XORQ CX, CX sealAVX2SealHash: // itr1 holds the number of bytes encrypted but not yet hashed - CMPQ itr1, $16 - JB sealAVX2ShortSealLoop - polyAdd(0(oup)) - polyMul - SUBQ $16, itr1 - ADDQ $16, oup - JMP sealAVX2SealHash + CMPQ CX, $0x10 + JB sealAVX2ShortSealLoop + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + SUBQ $0x10, CX + ADDQ $0x10, DI + JMP sealAVX2SealHash sealAVX2ShortSealLoop: - CMPQ inl, $32 + CMPQ BX, $0x20 JB sealAVX2ShortTail32 - SUBQ $32, inl + SUBQ $0x20, BX // Load for encryption - VPXOR (inp), AA0, AA0 - VMOVDQU AA0, (oup) - LEAQ (1*32)(inp), inp + VPXOR (SI), Y0, Y0 + VMOVDQU Y0, (DI) + LEAQ 32(SI), SI // Now can hash - polyAdd(0*8(oup)) - polyMulAVX2 - polyAdd(2*8(oup)) - polyMulAVX2 - LEAQ (1*32)(oup), oup + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + ADDQ 16(DI), R10 + ADCQ 24(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 32(DI), DI // Shift stream left - VMOVDQA BB0, AA0 - VMOVDQA CC0, BB0 - VMOVDQA DD0, CC0 - VMOVDQA AA1, DD0 - VMOVDQA BB1, AA1 - VMOVDQA CC1, BB1 - VMOVDQA DD1, CC1 - VMOVDQA AA2, DD1 - VMOVDQA BB2, AA2 + VMOVDQA Y14, Y0 + VMOVDQA Y12, Y14 + VMOVDQA Y4, Y12 + VMOVDQA Y5, Y4 + VMOVDQA Y9, Y5 + VMOVDQA Y13, Y9 + VMOVDQA Y1, Y13 + VMOVDQA Y6, Y1 + VMOVDQA Y10, Y6 JMP sealAVX2ShortSealLoop sealAVX2ShortTail32: - CMPQ inl, $16 - VMOVDQA A0, A1 + CMPQ BX, $0x10 + VMOVDQA X0, X1 JB sealAVX2ShortDone - - SUBQ $16, inl + SUBQ $0x10, BX // Load for encryption - VPXOR (inp), A0, T0 - VMOVDQU T0, (oup) - LEAQ (1*16)(inp), inp + VPXOR (SI), X0, X12 + VMOVDQU X12, (DI) + LEAQ 16(SI), SI // Hash - polyAdd(0*8(oup)) - polyMulAVX2 - LEAQ (1*16)(oup), oup - VPERM2I128 $0x11, AA0, AA0, AA0 - VMOVDQA A0, A1 + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(DI), DI + VPERM2I128 $0x11, Y0, Y0, Y0 + VMOVDQA X0, X1 sealAVX2ShortDone: VZEROUPPER JMP sealSSETail -// ---------------------------------------------------------------------------- -// Special optimization for buffers smaller than 321 bytes seal320AVX2: - // For up to 320 bytes of ciphertext and 64 bytes for the poly key, we process six blocks - VMOVDQA AA0, AA1; VMOVDQA BB0, BB1; VMOVDQA CC0, CC1; VPADDD ·avx2IncMask<>(SB), DD0, DD1 - VMOVDQA AA0, AA2; VMOVDQA BB0, BB2; VMOVDQA CC0, CC2; VPADDD ·avx2IncMask<>(SB), DD1, DD2 - VMOVDQA BB0, TT1; VMOVDQA CC0, TT2; VMOVDQA DD0, TT3 - MOVQ $10, itr2 + VMOVDQA Y0, Y5 + VMOVDQA Y14, Y9 + VMOVDQA Y12, Y13 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y1 + VMOVDQA Y0, Y6 + VMOVDQA Y14, Y10 + VMOVDQA Y12, Y8 + VPADDD ·avx2IncMask<>+0(SB), Y1, Y2 + VMOVDQA Y14, Y7 + VMOVDQA Y12, Y11 + VMOVDQA Y4, Y15 + MOVQ $0x0000000a, R9 sealAVX2320InnerCipherLoop: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2 - DECQ itr2 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x0c, Y10, Y3 + VPSRLD $0x14, Y10, Y10 + VPXOR Y3, Y10, Y10 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x07, Y10, Y3 + VPSRLD $0x19, Y10, Y10 + VPXOR Y3, Y10, Y10 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x04, Y10, Y10, Y10 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPALIGNR $0x0c, Y1, Y1, Y1 + VPALIGNR $0x0c, Y2, Y2, Y2 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x0c, Y10, Y3 + VPSRLD $0x14, Y10, Y10 + VPXOR Y3, Y10, Y10 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x07, Y10, Y3 + VPSRLD $0x19, Y10, Y10 + VPXOR Y3, Y10, Y10 + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x0c, Y10, Y10, Y10 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x04, Y4, Y4, Y4 + VPALIGNR $0x04, Y1, Y1, Y1 + VPALIGNR $0x04, Y2, Y2, Y2 + DECQ R9 JNE sealAVX2320InnerCipherLoop - - VMOVDQA ·chacha20Constants<>(SB), TT0 - VPADDD TT0, AA0, AA0; VPADDD TT0, AA1, AA1; VPADDD TT0, AA2, AA2 - VPADDD TT1, BB0, BB0; VPADDD TT1, BB1, BB1; VPADDD TT1, BB2, BB2 - VPADDD TT2, CC0, CC0; VPADDD TT2, CC1, CC1; VPADDD TT2, CC2, CC2 - VMOVDQA ·avx2IncMask<>(SB), TT0 - VPADDD TT3, DD0, DD0; VPADDD TT0, TT3, TT3 - VPADDD TT3, DD1, DD1; VPADDD TT0, TT3, TT3 - VPADDD TT3, DD2, DD2 + VMOVDQA ·chacha20Constants<>+0(SB), Y3 + VPADDD Y3, Y0, Y0 + VPADDD Y3, Y5, Y5 + VPADDD Y3, Y6, Y6 + VPADDD Y7, Y14, Y14 + VPADDD Y7, Y9, Y9 + VPADDD Y7, Y10, Y10 + VPADDD Y11, Y12, Y12 + VPADDD Y11, Y13, Y13 + VPADDD Y11, Y8, Y8 + VMOVDQA ·avx2IncMask<>+0(SB), Y3 + VPADDD Y15, Y4, Y4 + VPADDD Y3, Y15, Y15 + VPADDD Y15, Y1, Y1 + VPADDD Y3, Y15, Y15 + VPADDD Y15, Y2, Y2 // Clamp and store poly key - VPERM2I128 $0x02, AA0, BB0, TT0 - VPAND ·polyClampMask<>(SB), TT0, TT0 - VMOVDQA TT0, rsStoreAVX2 + VPERM2I128 $0x02, Y0, Y14, Y3 + VPAND ·polyClampMask<>+0(SB), Y3, Y3 + VMOVDQA Y3, (BP) // Stream for up to 320 bytes - VPERM2I128 $0x13, AA0, BB0, AA0 - VPERM2I128 $0x13, CC0, DD0, BB0 - VPERM2I128 $0x02, AA1, BB1, CC0 - VPERM2I128 $0x02, CC1, DD1, DD0 - VPERM2I128 $0x13, AA1, BB1, AA1 - VPERM2I128 $0x13, CC1, DD1, BB1 - VPERM2I128 $0x02, AA2, BB2, CC1 - VPERM2I128 $0x02, CC2, DD2, DD1 - VPERM2I128 $0x13, AA2, BB2, AA2 - VPERM2I128 $0x13, CC2, DD2, BB2 + VPERM2I128 $0x13, Y0, Y14, Y0 + VPERM2I128 $0x13, Y12, Y4, Y14 + VPERM2I128 $0x02, Y5, Y9, Y12 + VPERM2I128 $0x02, Y13, Y1, Y4 + VPERM2I128 $0x13, Y5, Y9, Y5 + VPERM2I128 $0x13, Y13, Y1, Y9 + VPERM2I128 $0x02, Y6, Y10, Y13 + VPERM2I128 $0x02, Y8, Y2, Y1 + VPERM2I128 $0x13, Y6, Y10, Y6 + VPERM2I128 $0x13, Y8, Y2, Y10 JMP sealAVX2ShortSeal -// ---------------------------------------------------------------------------- -// Special optimization for the last 128 bytes of ciphertext sealAVX2Tail128: - // Need to decrypt up to 128 bytes - prepare two blocks - // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed - // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed - VMOVDQA ·chacha20Constants<>(SB), AA0 - VMOVDQA state1StoreAVX2, BB0 - VMOVDQA state2StoreAVX2, CC0 - VMOVDQA ctr3StoreAVX2, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD0 - VMOVDQA DD0, DD1 + VMOVDQA ·chacha20Constants<>+0(SB), Y0 + VMOVDQA 32(BP), Y14 + VMOVDQA 64(BP), Y12 + VMOVDQA 192(BP), Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y4 + VMOVDQA Y4, Y1 sealAVX2Tail128LoopA: - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(DI), DI sealAVX2Tail128LoopB: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0) - polyAdd(0(oup)) - polyMul - VPALIGNR $4, BB0, BB0, BB0 - VPALIGNR $8, CC0, CC0, CC0 - VPALIGNR $12, DD0, DD0, DD0 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0) - polyAdd(16(oup)) - polyMul - LEAQ 32(oup), oup - VPALIGNR $12, BB0, BB0, BB0 - VPALIGNR $8, CC0, CC0, CC0 - VPALIGNR $4, DD0, DD0, DD0 - DECQ itr1 - JG sealAVX2Tail128LoopA - DECQ itr2 - JGE sealAVX2Tail128LoopB - - VPADDD ·chacha20Constants<>(SB), AA0, AA1 - VPADDD state1StoreAVX2, BB0, BB1 - VPADDD state2StoreAVX2, CC0, CC1 - VPADDD DD1, DD0, DD1 - - VPERM2I128 $0x02, AA1, BB1, AA0 - VPERM2I128 $0x02, CC1, DD1, BB0 - VPERM2I128 $0x13, AA1, BB1, CC0 - VPERM2I128 $0x13, CC1, DD1, DD0 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + ADDQ 16(DI), R10 + ADCQ 24(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 32(DI), DI + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x04, Y4, Y4, Y4 + DECQ CX + JG sealAVX2Tail128LoopA + DECQ R9 + JGE sealAVX2Tail128LoopB + VPADDD ·chacha20Constants<>+0(SB), Y0, Y5 + VPADDD 32(BP), Y14, Y9 + VPADDD 64(BP), Y12, Y13 + VPADDD Y1, Y4, Y1 + VPERM2I128 $0x02, Y5, Y9, Y0 + VPERM2I128 $0x02, Y13, Y1, Y14 + VPERM2I128 $0x13, Y5, Y9, Y12 + VPERM2I128 $0x13, Y13, Y1, Y4 JMP sealAVX2ShortSealLoop -// ---------------------------------------------------------------------------- -// Special optimization for the last 256 bytes of ciphertext sealAVX2Tail256: - // Need to decrypt up to 256 bytes - prepare two blocks - // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed - // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed - VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA ·chacha20Constants<>(SB), AA1 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA state1StoreAVX2, BB1 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA state2StoreAVX2, CC1 - VMOVDQA ctr3StoreAVX2, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD1 - VMOVDQA DD0, TT1 - VMOVDQA DD1, TT2 + VMOVDQA ·chacha20Constants<>+0(SB), Y0 + VMOVDQA ·chacha20Constants<>+0(SB), Y5 + VMOVDQA 32(BP), Y14 + VMOVDQA 32(BP), Y9 + VMOVDQA 64(BP), Y12 + VMOVDQA 64(BP), Y13 + VMOVDQA 192(BP), Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y1 + VMOVDQA Y4, Y7 + VMOVDQA Y1, Y11 sealAVX2Tail256LoopA: - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(DI), DI sealAVX2Tail256LoopB: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - polyAdd(0(oup)) - polyMul - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0) - polyAdd(16(oup)) - polyMul - LEAQ 32(oup), oup - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1 - DECQ itr1 - JG sealAVX2Tail256LoopA - DECQ itr2 - JGE sealAVX2Tail256LoopB - - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1 - VPADDD TT1, DD0, DD0; VPADDD TT2, DD1, DD1 - VPERM2I128 $0x02, AA0, BB0, TT0 - VPERM2I128 $0x02, CC0, DD0, TT1 - VPERM2I128 $0x13, AA0, BB0, TT2 - VPERM2I128 $0x13, CC0, DD0, TT3 - VPXOR (0*32)(inp), TT0, TT0; VPXOR (1*32)(inp), TT1, TT1; VPXOR (2*32)(inp), TT2, TT2; VPXOR (3*32)(inp), TT3, TT3 - VMOVDQU TT0, (0*32)(oup); VMOVDQU TT1, (1*32)(oup); VMOVDQU TT2, (2*32)(oup); VMOVDQU TT3, (3*32)(oup) - MOVQ $128, itr1 - LEAQ 128(inp), inp - SUBQ $128, inl - VPERM2I128 $0x02, AA1, BB1, AA0 - VPERM2I128 $0x02, CC1, DD1, BB0 - VPERM2I128 $0x13, AA1, BB1, CC0 - VPERM2I128 $0x13, CC1, DD1, DD0 - - JMP sealAVX2SealHash - -// ---------------------------------------------------------------------------- -// Special optimization for the last 384 bytes of ciphertext + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPALIGNR $0x0c, Y1, Y1, Y1 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + ADDQ 16(DI), R10 + ADCQ 24(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 32(DI), DI + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x04, Y4, Y4, Y4 + VPALIGNR $0x04, Y1, Y1, Y1 + DECQ CX + JG sealAVX2Tail256LoopA + DECQ R9 + JGE sealAVX2Tail256LoopB + VPADDD ·chacha20Constants<>+0(SB), Y0, Y0 + VPADDD ·chacha20Constants<>+0(SB), Y5, Y5 + VPADDD 32(BP), Y14, Y14 + VPADDD 32(BP), Y9, Y9 + VPADDD 64(BP), Y12, Y12 + VPADDD 64(BP), Y13, Y13 + VPADDD Y7, Y4, Y4 + VPADDD Y11, Y1, Y1 + VPERM2I128 $0x02, Y0, Y14, Y3 + VPERM2I128 $0x02, Y12, Y4, Y7 + VPERM2I128 $0x13, Y0, Y14, Y11 + VPERM2I128 $0x13, Y12, Y4, Y15 + VPXOR (SI), Y3, Y3 + VPXOR 32(SI), Y7, Y7 + VPXOR 64(SI), Y11, Y11 + VPXOR 96(SI), Y15, Y15 + VMOVDQU Y3, (DI) + VMOVDQU Y7, 32(DI) + VMOVDQU Y11, 64(DI) + VMOVDQU Y15, 96(DI) + MOVQ $0x00000080, CX + LEAQ 128(SI), SI + SUBQ $0x80, BX + VPERM2I128 $0x02, Y5, Y9, Y0 + VPERM2I128 $0x02, Y13, Y1, Y14 + VPERM2I128 $0x13, Y5, Y9, Y12 + VPERM2I128 $0x13, Y13, Y1, Y4 + JMP sealAVX2SealHash + sealAVX2Tail384: - // Need to decrypt up to 384 bytes - prepare two blocks - // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed - // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed - VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2 - VMOVDQA ctr3StoreAVX2, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2 - VMOVDQA DD0, TT1; VMOVDQA DD1, TT2; VMOVDQA DD2, TT3 + VMOVDQA ·chacha20Constants<>+0(SB), Y0 + VMOVDQA Y0, Y5 + VMOVDQA Y0, Y6 + VMOVDQA 32(BP), Y14 + VMOVDQA Y14, Y9 + VMOVDQA Y14, Y10 + VMOVDQA 64(BP), Y12 + VMOVDQA Y12, Y13 + VMOVDQA Y12, Y8 + VMOVDQA 192(BP), Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y1 + VPADDD ·avx2IncMask<>+0(SB), Y1, Y2 + VMOVDQA Y4, Y7 + VMOVDQA Y1, Y11 + VMOVDQA Y2, Y15 sealAVX2Tail384LoopA: - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(DI), DI sealAVX2Tail384LoopB: - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - polyAdd(0(oup)) - polyMul - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2 - chachaQR_AVX2(AA0, BB0, CC0, DD0, TT0); chachaQR_AVX2(AA1, BB1, CC1, DD1, TT0); chachaQR_AVX2(AA2, BB2, CC2, DD2, TT0) - polyAdd(16(oup)) - polyMul - LEAQ 32(oup), oup - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2 - DECQ itr1 - JG sealAVX2Tail384LoopA - DECQ itr2 - JGE sealAVX2Tail384LoopB - - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2 - VPADDD TT1, DD0, DD0; VPADDD TT2, DD1, DD1; VPADDD TT3, DD2, DD2 - VPERM2I128 $0x02, AA0, BB0, TT0 - VPERM2I128 $0x02, CC0, DD0, TT1 - VPERM2I128 $0x13, AA0, BB0, TT2 - VPERM2I128 $0x13, CC0, DD0, TT3 - VPXOR (0*32)(inp), TT0, TT0; VPXOR (1*32)(inp), TT1, TT1; VPXOR (2*32)(inp), TT2, TT2; VPXOR (3*32)(inp), TT3, TT3 - VMOVDQU TT0, (0*32)(oup); VMOVDQU TT1, (1*32)(oup); VMOVDQU TT2, (2*32)(oup); VMOVDQU TT3, (3*32)(oup) - VPERM2I128 $0x02, AA1, BB1, TT0 - VPERM2I128 $0x02, CC1, DD1, TT1 - VPERM2I128 $0x13, AA1, BB1, TT2 - VPERM2I128 $0x13, CC1, DD1, TT3 - VPXOR (4*32)(inp), TT0, TT0; VPXOR (5*32)(inp), TT1, TT1; VPXOR (6*32)(inp), TT2, TT2; VPXOR (7*32)(inp), TT3, TT3 - VMOVDQU TT0, (4*32)(oup); VMOVDQU TT1, (5*32)(oup); VMOVDQU TT2, (6*32)(oup); VMOVDQU TT3, (7*32)(oup) - MOVQ $256, itr1 - LEAQ 256(inp), inp - SUBQ $256, inl - VPERM2I128 $0x02, AA2, BB2, AA0 - VPERM2I128 $0x02, CC2, DD2, BB0 - VPERM2I128 $0x13, AA2, BB2, CC0 - VPERM2I128 $0x13, CC2, DD2, DD0 - - JMP sealAVX2SealHash - -// ---------------------------------------------------------------------------- -// Special optimization for the last 512 bytes of ciphertext + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x0c, Y10, Y3 + VPSRLD $0x14, Y10, Y10 + VPXOR Y3, Y10, Y10 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x07, Y10, Y3 + VPSRLD $0x19, Y10, Y10 + VPXOR Y3, Y10, Y10 + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x04, Y10, Y10, Y10 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPALIGNR $0x0c, Y1, Y1, Y1 + VPALIGNR $0x0c, Y2, Y2, Y2 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x0c, Y14, Y3 + VPSRLD $0x14, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y14, Y0, Y0 + VPXOR Y0, Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPADDD Y4, Y12, Y12 + VPXOR Y12, Y14, Y14 + VPSLLD $0x07, Y14, Y3 + VPSRLD $0x19, Y14, Y14 + VPXOR Y3, Y14, Y14 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x0c, Y9, Y3 + VPSRLD $0x14, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y9, Y5, Y5 + VPXOR Y5, Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPADDD Y1, Y13, Y13 + VPXOR Y13, Y9, Y9 + VPSLLD $0x07, Y9, Y3 + VPSRLD $0x19, Y9, Y9 + VPXOR Y3, Y9, Y9 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x0c, Y10, Y3 + VPSRLD $0x14, Y10, Y10 + VPXOR Y3, Y10, Y10 + VPADDD Y10, Y6, Y6 + VPXOR Y6, Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPADDD Y2, Y8, Y8 + VPXOR Y8, Y10, Y10 + VPSLLD $0x07, Y10, Y3 + VPSRLD $0x19, Y10, Y10 + VPXOR Y3, Y10, Y10 + ADDQ 16(DI), R10 + ADCQ 24(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 32(DI), DI + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x0c, Y10, Y10, Y10 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x04, Y4, Y4, Y4 + VPALIGNR $0x04, Y1, Y1, Y1 + VPALIGNR $0x04, Y2, Y2, Y2 + DECQ CX + JG sealAVX2Tail384LoopA + DECQ R9 + JGE sealAVX2Tail384LoopB + VPADDD ·chacha20Constants<>+0(SB), Y0, Y0 + VPADDD ·chacha20Constants<>+0(SB), Y5, Y5 + VPADDD ·chacha20Constants<>+0(SB), Y6, Y6 + VPADDD 32(BP), Y14, Y14 + VPADDD 32(BP), Y9, Y9 + VPADDD 32(BP), Y10, Y10 + VPADDD 64(BP), Y12, Y12 + VPADDD 64(BP), Y13, Y13 + VPADDD 64(BP), Y8, Y8 + VPADDD Y7, Y4, Y4 + VPADDD Y11, Y1, Y1 + VPADDD Y15, Y2, Y2 + VPERM2I128 $0x02, Y0, Y14, Y3 + VPERM2I128 $0x02, Y12, Y4, Y7 + VPERM2I128 $0x13, Y0, Y14, Y11 + VPERM2I128 $0x13, Y12, Y4, Y15 + VPXOR (SI), Y3, Y3 + VPXOR 32(SI), Y7, Y7 + VPXOR 64(SI), Y11, Y11 + VPXOR 96(SI), Y15, Y15 + VMOVDQU Y3, (DI) + VMOVDQU Y7, 32(DI) + VMOVDQU Y11, 64(DI) + VMOVDQU Y15, 96(DI) + VPERM2I128 $0x02, Y5, Y9, Y3 + VPERM2I128 $0x02, Y13, Y1, Y7 + VPERM2I128 $0x13, Y5, Y9, Y11 + VPERM2I128 $0x13, Y13, Y1, Y15 + VPXOR 128(SI), Y3, Y3 + VPXOR 160(SI), Y7, Y7 + VPXOR 192(SI), Y11, Y11 + VPXOR 224(SI), Y15, Y15 + VMOVDQU Y3, 128(DI) + VMOVDQU Y7, 160(DI) + VMOVDQU Y11, 192(DI) + VMOVDQU Y15, 224(DI) + MOVQ $0x00000100, CX + LEAQ 256(SI), SI + SUBQ $0x00000100, BX + VPERM2I128 $0x02, Y6, Y10, Y0 + VPERM2I128 $0x02, Y8, Y2, Y14 + VPERM2I128 $0x13, Y6, Y10, Y12 + VPERM2I128 $0x13, Y8, Y2, Y4 + JMP sealAVX2SealHash + sealAVX2Tail512: - // Need to decrypt up to 512 bytes - prepare two blocks - // If we got here after the main loop - there are 512 encrypted bytes waiting to be hashed - // If we got here before the main loop - there are 448 encrpyred bytes waiting to be hashed - VMOVDQA ·chacha20Constants<>(SB), AA0; VMOVDQA AA0, AA1; VMOVDQA AA0, AA2; VMOVDQA AA0, AA3 - VMOVDQA state1StoreAVX2, BB0; VMOVDQA BB0, BB1; VMOVDQA BB0, BB2; VMOVDQA BB0, BB3 - VMOVDQA state2StoreAVX2, CC0; VMOVDQA CC0, CC1; VMOVDQA CC0, CC2; VMOVDQA CC0, CC3 - VMOVDQA ctr3StoreAVX2, DD0 - VPADDD ·avx2IncMask<>(SB), DD0, DD0; VPADDD ·avx2IncMask<>(SB), DD0, DD1; VPADDD ·avx2IncMask<>(SB), DD1, DD2; VPADDD ·avx2IncMask<>(SB), DD2, DD3 - VMOVDQA DD0, ctr0StoreAVX2; VMOVDQA DD1, ctr1StoreAVX2; VMOVDQA DD2, ctr2StoreAVX2; VMOVDQA DD3, ctr3StoreAVX2 + VMOVDQA ·chacha20Constants<>+0(SB), Y0 + VMOVDQA Y0, Y5 + VMOVDQA Y0, Y6 + VMOVDQA Y0, Y7 + VMOVDQA 32(BP), Y14 + VMOVDQA Y14, Y9 + VMOVDQA Y14, Y10 + VMOVDQA Y14, Y11 + VMOVDQA 64(BP), Y12 + VMOVDQA Y12, Y13 + VMOVDQA Y12, Y8 + VMOVDQA Y12, Y15 + VMOVDQA 192(BP), Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y4 + VPADDD ·avx2IncMask<>+0(SB), Y4, Y1 + VPADDD ·avx2IncMask<>+0(SB), Y1, Y2 + VPADDD ·avx2IncMask<>+0(SB), Y2, Y3 + VMOVDQA Y4, 96(BP) + VMOVDQA Y1, 128(BP) + VMOVDQA Y2, 160(BP) + VMOVDQA Y3, 192(BP) sealAVX2Tail512LoopA: - polyAdd(0(oup)) - polyMul - LEAQ 16(oup), oup + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), AX + MOVQ AX, R15 + MULQ R10 + MOVQ AX, R13 + MOVQ DX, R14 + MOVQ (BP), AX + MULQ R11 + IMULQ R12, R15 + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), AX + MOVQ AX, R8 + MULQ R10 + ADDQ AX, R14 + ADCQ $0x00, DX + MOVQ DX, R10 + MOVQ 8(BP), AX + MULQ R11 + ADDQ AX, R15 + ADCQ $0x00, DX + IMULQ R12, R8 + ADDQ R10, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 16(DI), DI sealAVX2Tail512LoopB: - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - polyAdd(0*8(oup)) - polyMulAVX2 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - VPALIGNR $4, BB0, BB0, BB0; VPALIGNR $4, BB1, BB1, BB1; VPALIGNR $4, BB2, BB2, BB2; VPALIGNR $4, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $12, DD0, DD0, DD0; VPALIGNR $12, DD1, DD1, DD1; VPALIGNR $12, DD2, DD2, DD2; VPALIGNR $12, DD3, DD3, DD3 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol16<>(SB), DD0, DD0; VPSHUFB ·rol16<>(SB), DD1, DD1; VPSHUFB ·rol16<>(SB), DD2, DD2; VPSHUFB ·rol16<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - polyAdd(2*8(oup)) - polyMulAVX2 - LEAQ (4*8)(oup), oup - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $12, BB0, CC3; VPSRLD $20, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $12, BB1, CC3; VPSRLD $20, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $12, BB2, CC3; VPSRLD $20, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $12, BB3, CC3; VPSRLD $20, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - VPADDD BB0, AA0, AA0; VPADDD BB1, AA1, AA1; VPADDD BB2, AA2, AA2; VPADDD BB3, AA3, AA3 - VPXOR AA0, DD0, DD0; VPXOR AA1, DD1, DD1; VPXOR AA2, DD2, DD2; VPXOR AA3, DD3, DD3 - VPSHUFB ·rol8<>(SB), DD0, DD0; VPSHUFB ·rol8<>(SB), DD1, DD1; VPSHUFB ·rol8<>(SB), DD2, DD2; VPSHUFB ·rol8<>(SB), DD3, DD3 - VPADDD DD0, CC0, CC0; VPADDD DD1, CC1, CC1; VPADDD DD2, CC2, CC2; VPADDD DD3, CC3, CC3 - VPXOR CC0, BB0, BB0; VPXOR CC1, BB1, BB1; VPXOR CC2, BB2, BB2; VPXOR CC3, BB3, BB3 - VMOVDQA CC3, tmpStoreAVX2 - VPSLLD $7, BB0, CC3; VPSRLD $25, BB0, BB0; VPXOR CC3, BB0, BB0 - VPSLLD $7, BB1, CC3; VPSRLD $25, BB1, BB1; VPXOR CC3, BB1, BB1 - VPSLLD $7, BB2, CC3; VPSRLD $25, BB2, BB2; VPXOR CC3, BB2, BB2 - VPSLLD $7, BB3, CC3; VPSRLD $25, BB3, BB3; VPXOR CC3, BB3, BB3 - VMOVDQA tmpStoreAVX2, CC3 - VPALIGNR $12, BB0, BB0, BB0; VPALIGNR $12, BB1, BB1, BB1; VPALIGNR $12, BB2, BB2, BB2; VPALIGNR $12, BB3, BB3, BB3 - VPALIGNR $8, CC0, CC0, CC0; VPALIGNR $8, CC1, CC1, CC1; VPALIGNR $8, CC2, CC2, CC2; VPALIGNR $8, CC3, CC3, CC3 - VPALIGNR $4, DD0, DD0, DD0; VPALIGNR $4, DD1, DD1, DD1; VPALIGNR $4, DD2, DD2, DD2; VPALIGNR $4, DD3, DD3, DD3 - - DECQ itr1 - JG sealAVX2Tail512LoopA - DECQ itr2 - JGE sealAVX2Tail512LoopB - - VPADDD ·chacha20Constants<>(SB), AA0, AA0; VPADDD ·chacha20Constants<>(SB), AA1, AA1; VPADDD ·chacha20Constants<>(SB), AA2, AA2; VPADDD ·chacha20Constants<>(SB), AA3, AA3 - VPADDD state1StoreAVX2, BB0, BB0; VPADDD state1StoreAVX2, BB1, BB1; VPADDD state1StoreAVX2, BB2, BB2; VPADDD state1StoreAVX2, BB3, BB3 - VPADDD state2StoreAVX2, CC0, CC0; VPADDD state2StoreAVX2, CC1, CC1; VPADDD state2StoreAVX2, CC2, CC2; VPADDD state2StoreAVX2, CC3, CC3 - VPADDD ctr0StoreAVX2, DD0, DD0; VPADDD ctr1StoreAVX2, DD1, DD1; VPADDD ctr2StoreAVX2, DD2, DD2; VPADDD ctr3StoreAVX2, DD3, DD3 - VMOVDQA CC3, tmpStoreAVX2 - VPERM2I128 $0x02, AA0, BB0, CC3 - VPXOR (0*32)(inp), CC3, CC3 - VMOVDQU CC3, (0*32)(oup) - VPERM2I128 $0x02, CC0, DD0, CC3 - VPXOR (1*32)(inp), CC3, CC3 - VMOVDQU CC3, (1*32)(oup) - VPERM2I128 $0x13, AA0, BB0, CC3 - VPXOR (2*32)(inp), CC3, CC3 - VMOVDQU CC3, (2*32)(oup) - VPERM2I128 $0x13, CC0, DD0, CC3 - VPXOR (3*32)(inp), CC3, CC3 - VMOVDQU CC3, (3*32)(oup) - - VPERM2I128 $0x02, AA1, BB1, AA0 - VPERM2I128 $0x02, CC1, DD1, BB0 - VPERM2I128 $0x13, AA1, BB1, CC0 - VPERM2I128 $0x13, CC1, DD1, DD0 - VPXOR (4*32)(inp), AA0, AA0; VPXOR (5*32)(inp), BB0, BB0; VPXOR (6*32)(inp), CC0, CC0; VPXOR (7*32)(inp), DD0, DD0 - VMOVDQU AA0, (4*32)(oup); VMOVDQU BB0, (5*32)(oup); VMOVDQU CC0, (6*32)(oup); VMOVDQU DD0, (7*32)(oup) - - VPERM2I128 $0x02, AA2, BB2, AA0 - VPERM2I128 $0x02, CC2, DD2, BB0 - VPERM2I128 $0x13, AA2, BB2, CC0 - VPERM2I128 $0x13, CC2, DD2, DD0 - VPXOR (8*32)(inp), AA0, AA0; VPXOR (9*32)(inp), BB0, BB0; VPXOR (10*32)(inp), CC0, CC0; VPXOR (11*32)(inp), DD0, DD0 - VMOVDQU AA0, (8*32)(oup); VMOVDQU BB0, (9*32)(oup); VMOVDQU CC0, (10*32)(oup); VMOVDQU DD0, (11*32)(oup) - - MOVQ $384, itr1 - LEAQ 384(inp), inp - SUBQ $384, inl - VPERM2I128 $0x02, AA3, BB3, AA0 - VPERM2I128 $0x02, tmpStoreAVX2, DD3, BB0 - VPERM2I128 $0x13, AA3, BB3, CC0 - VPERM2I128 $0x13, tmpStoreAVX2, DD3, DD0 - - JMP sealAVX2SealHash + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y3, Y3 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + VMOVDQA Y15, 224(BP) + VPSLLD $0x0c, Y14, Y15 + VPSRLD $0x14, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x0c, Y9, Y15 + VPSRLD $0x14, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x0c, Y10, Y15 + VPSRLD $0x14, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x0c, Y11, Y15 + VPSRLD $0x14, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + ADDQ (DI), R10 + ADCQ 8(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y3, Y3 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + VMOVDQA Y15, 224(BP) + VPSLLD $0x07, Y14, Y15 + VPSRLD $0x19, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x07, Y9, Y15 + VPSRLD $0x19, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x07, Y10, Y15 + VPSRLD $0x19, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x07, Y11, Y15 + VPSRLD $0x19, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + VPALIGNR $0x04, Y14, Y14, Y14 + VPALIGNR $0x04, Y9, Y9, Y9 + VPALIGNR $0x04, Y10, Y10, Y10 + VPALIGNR $0x04, Y11, Y11, Y11 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x08, Y15, Y15, Y15 + VPALIGNR $0x0c, Y4, Y4, Y4 + VPALIGNR $0x0c, Y1, Y1, Y1 + VPALIGNR $0x0c, Y2, Y2, Y2 + VPALIGNR $0x0c, Y3, Y3, Y3 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol16<>+0(SB), Y4, Y4 + VPSHUFB ·rol16<>+0(SB), Y1, Y1 + VPSHUFB ·rol16<>+0(SB), Y2, Y2 + VPSHUFB ·rol16<>+0(SB), Y3, Y3 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + ADDQ 16(DI), R10 + ADCQ 24(DI), R11 + ADCQ $0x01, R12 + MOVQ (BP), DX + MOVQ DX, R15 + MULXQ R10, R13, R14 + IMULQ R12, R15 + MULXQ R11, AX, DX + ADDQ AX, R14 + ADCQ DX, R15 + MOVQ 8(BP), DX + MULXQ R10, R10, AX + ADDQ R10, R14 + MULXQ R11, R11, R8 + ADCQ R11, R15 + ADCQ $0x00, R8 + IMULQ R12, DX + ADDQ AX, R15 + ADCQ DX, R8 + MOVQ R13, R10 + MOVQ R14, R11 + MOVQ R15, R12 + ANDQ $0x03, R12 + MOVQ R15, R13 + ANDQ $-4, R13 + MOVQ R8, R14 + SHRQ $0x02, R8, R15 + SHRQ $0x02, R8 + ADDQ R13, R10 + ADCQ R14, R11 + ADCQ $0x00, R12 + ADDQ R15, R10 + ADCQ R8, R11 + ADCQ $0x00, R12 + LEAQ 32(DI), DI + VMOVDQA Y15, 224(BP) + VPSLLD $0x0c, Y14, Y15 + VPSRLD $0x14, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x0c, Y9, Y15 + VPSRLD $0x14, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x0c, Y10, Y15 + VPSRLD $0x14, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x0c, Y11, Y15 + VPSRLD $0x14, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + VPADDD Y14, Y0, Y0 + VPADDD Y9, Y5, Y5 + VPADDD Y10, Y6, Y6 + VPADDD Y11, Y7, Y7 + VPXOR Y0, Y4, Y4 + VPXOR Y5, Y1, Y1 + VPXOR Y6, Y2, Y2 + VPXOR Y7, Y3, Y3 + VPSHUFB ·rol8<>+0(SB), Y4, Y4 + VPSHUFB ·rol8<>+0(SB), Y1, Y1 + VPSHUFB ·rol8<>+0(SB), Y2, Y2 + VPSHUFB ·rol8<>+0(SB), Y3, Y3 + VPADDD Y4, Y12, Y12 + VPADDD Y1, Y13, Y13 + VPADDD Y2, Y8, Y8 + VPADDD Y3, Y15, Y15 + VPXOR Y12, Y14, Y14 + VPXOR Y13, Y9, Y9 + VPXOR Y8, Y10, Y10 + VPXOR Y15, Y11, Y11 + VMOVDQA Y15, 224(BP) + VPSLLD $0x07, Y14, Y15 + VPSRLD $0x19, Y14, Y14 + VPXOR Y15, Y14, Y14 + VPSLLD $0x07, Y9, Y15 + VPSRLD $0x19, Y9, Y9 + VPXOR Y15, Y9, Y9 + VPSLLD $0x07, Y10, Y15 + VPSRLD $0x19, Y10, Y10 + VPXOR Y15, Y10, Y10 + VPSLLD $0x07, Y11, Y15 + VPSRLD $0x19, Y11, Y11 + VPXOR Y15, Y11, Y11 + VMOVDQA 224(BP), Y15 + VPALIGNR $0x0c, Y14, Y14, Y14 + VPALIGNR $0x0c, Y9, Y9, Y9 + VPALIGNR $0x0c, Y10, Y10, Y10 + VPALIGNR $0x0c, Y11, Y11, Y11 + VPALIGNR $0x08, Y12, Y12, Y12 + VPALIGNR $0x08, Y13, Y13, Y13 + VPALIGNR $0x08, Y8, Y8, Y8 + VPALIGNR $0x08, Y15, Y15, Y15 + VPALIGNR $0x04, Y4, Y4, Y4 + VPALIGNR $0x04, Y1, Y1, Y1 + VPALIGNR $0x04, Y2, Y2, Y2 + VPALIGNR $0x04, Y3, Y3, Y3 + DECQ CX + JG sealAVX2Tail512LoopA + DECQ R9 + JGE sealAVX2Tail512LoopB + VPADDD ·chacha20Constants<>+0(SB), Y0, Y0 + VPADDD ·chacha20Constants<>+0(SB), Y5, Y5 + VPADDD ·chacha20Constants<>+0(SB), Y6, Y6 + VPADDD ·chacha20Constants<>+0(SB), Y7, Y7 + VPADDD 32(BP), Y14, Y14 + VPADDD 32(BP), Y9, Y9 + VPADDD 32(BP), Y10, Y10 + VPADDD 32(BP), Y11, Y11 + VPADDD 64(BP), Y12, Y12 + VPADDD 64(BP), Y13, Y13 + VPADDD 64(BP), Y8, Y8 + VPADDD 64(BP), Y15, Y15 + VPADDD 96(BP), Y4, Y4 + VPADDD 128(BP), Y1, Y1 + VPADDD 160(BP), Y2, Y2 + VPADDD 192(BP), Y3, Y3 + VMOVDQA Y15, 224(BP) + VPERM2I128 $0x02, Y0, Y14, Y15 + VPXOR (SI), Y15, Y15 + VMOVDQU Y15, (DI) + VPERM2I128 $0x02, Y12, Y4, Y15 + VPXOR 32(SI), Y15, Y15 + VMOVDQU Y15, 32(DI) + VPERM2I128 $0x13, Y0, Y14, Y15 + VPXOR 64(SI), Y15, Y15 + VMOVDQU Y15, 64(DI) + VPERM2I128 $0x13, Y12, Y4, Y15 + VPXOR 96(SI), Y15, Y15 + VMOVDQU Y15, 96(DI) + VPERM2I128 $0x02, Y5, Y9, Y0 + VPERM2I128 $0x02, Y13, Y1, Y14 + VPERM2I128 $0x13, Y5, Y9, Y12 + VPERM2I128 $0x13, Y13, Y1, Y4 + VPXOR 128(SI), Y0, Y0 + VPXOR 160(SI), Y14, Y14 + VPXOR 192(SI), Y12, Y12 + VPXOR 224(SI), Y4, Y4 + VMOVDQU Y0, 128(DI) + VMOVDQU Y14, 160(DI) + VMOVDQU Y12, 192(DI) + VMOVDQU Y4, 224(DI) + VPERM2I128 $0x02, Y6, Y10, Y0 + VPERM2I128 $0x02, Y8, Y2, Y14 + VPERM2I128 $0x13, Y6, Y10, Y12 + VPERM2I128 $0x13, Y8, Y2, Y4 + VPXOR 256(SI), Y0, Y0 + VPXOR 288(SI), Y14, Y14 + VPXOR 320(SI), Y12, Y12 + VPXOR 352(SI), Y4, Y4 + VMOVDQU Y0, 256(DI) + VMOVDQU Y14, 288(DI) + VMOVDQU Y12, 320(DI) + VMOVDQU Y4, 352(DI) + MOVQ $0x00000180, CX + LEAQ 384(SI), SI + SUBQ $0x00000180, BX + VPERM2I128 $0x02, Y7, Y11, Y0 + VPERM2I128 $0x02, 224(BP), Y3, Y14 + VPERM2I128 $0x13, Y7, Y11, Y12 + VPERM2I128 $0x13, 224(BP), Y3, Y4 + JMP sealAVX2SealHash diff --git a/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go index cda8e3edf..90ef6a241 100644 --- a/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go +++ b/vendor/golang.org/x/crypto/cryptobyte/asn1/asn1.go @@ -4,7 +4,7 @@ // Package asn1 contains supporting types for parsing and building ASN.1 // messages with the cryptobyte package. -package asn1 // import "golang.org/x/crypto/cryptobyte/asn1" +package asn1 // Tag represents an ASN.1 identifier octet, consisting of a tag number // (indicating a type) and class (such as context-specific or constructed). diff --git a/vendor/golang.org/x/crypto/cryptobyte/string.go b/vendor/golang.org/x/crypto/cryptobyte/string.go index 10692a8a3..4b0f8097f 100644 --- a/vendor/golang.org/x/crypto/cryptobyte/string.go +++ b/vendor/golang.org/x/crypto/cryptobyte/string.go @@ -15,7 +15,7 @@ // // See the documentation and examples for the Builder and String types to get // started. -package cryptobyte // import "golang.org/x/crypto/cryptobyte" +package cryptobyte // String represents a string of bytes. It provides methods for parsing // fixed-length and length-prefixed values from it. diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519.go b/vendor/golang.org/x/crypto/curve25519/curve25519.go index 00f963ea2..21ca3b2ee 100644 --- a/vendor/golang.org/x/crypto/curve25519/curve25519.go +++ b/vendor/golang.org/x/crypto/curve25519/curve25519.go @@ -6,9 +6,11 @@ // performs scalar multiplication on the elliptic curve known as Curve25519. // See RFC 7748. // -// Starting in Go 1.20, this package is a wrapper for the X25519 implementation +// This package is a wrapper for the X25519 implementation // in the crypto/ecdh package. -package curve25519 // import "golang.org/x/crypto/curve25519" +package curve25519 + +import "crypto/ecdh" // ScalarMult sets dst to the product scalar * point. // @@ -16,7 +18,13 @@ package curve25519 // import "golang.org/x/crypto/curve25519" // zeroes, irrespective of the scalar. Instead, use the X25519 function, which // will return an error. func ScalarMult(dst, scalar, point *[32]byte) { - scalarMult(dst, scalar, point) + if _, err := x25519(dst, scalar[:], point[:]); err != nil { + // The only error condition for x25519 when the inputs are 32 bytes long + // is if the output would have been the all-zero value. + for i := range dst { + dst[i] = 0 + } + } } // ScalarBaseMult sets dst to the product scalar * base where base is the @@ -25,7 +33,12 @@ func ScalarMult(dst, scalar, point *[32]byte) { // It is recommended to use the X25519 function with Basepoint instead, as // copying into fixed size arrays can lead to unexpected bugs. func ScalarBaseMult(dst, scalar *[32]byte) { - scalarBaseMult(dst, scalar) + curve := ecdh.X25519() + priv, err := curve.NewPrivateKey(scalar[:]) + if err != nil { + panic("curve25519: internal error: scalarBaseMult was not 32 bytes") + } + copy(dst[:], priv.PublicKey().Bytes()) } const ( @@ -57,3 +70,21 @@ func X25519(scalar, point []byte) ([]byte, error) { var dst [32]byte return x25519(&dst, scalar, point) } + +func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) { + curve := ecdh.X25519() + pub, err := curve.NewPublicKey(point) + if err != nil { + return nil, err + } + priv, err := curve.NewPrivateKey(scalar) + if err != nil { + return nil, err + } + out, err := priv.ECDH(pub) + if err != nil { + return nil, err + } + copy(dst[:], out) + return dst[:], nil +} diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go b/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go deleted file mode 100644 index ba647e8d7..000000000 --- a/vendor/golang.org/x/crypto/curve25519/curve25519_compat.go +++ /dev/null @@ -1,105 +0,0 @@ -// Copyright 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !go1.20 - -package curve25519 - -import ( - "crypto/subtle" - "errors" - "strconv" - - "golang.org/x/crypto/curve25519/internal/field" -) - -func scalarMult(dst, scalar, point *[32]byte) { - var e [32]byte - - copy(e[:], scalar[:]) - e[0] &= 248 - e[31] &= 127 - e[31] |= 64 - - var x1, x2, z2, x3, z3, tmp0, tmp1 field.Element - x1.SetBytes(point[:]) - x2.One() - x3.Set(&x1) - z3.One() - - swap := 0 - for pos := 254; pos >= 0; pos-- { - b := e[pos/8] >> uint(pos&7) - b &= 1 - swap ^= int(b) - x2.Swap(&x3, swap) - z2.Swap(&z3, swap) - swap = int(b) - - tmp0.Subtract(&x3, &z3) - tmp1.Subtract(&x2, &z2) - x2.Add(&x2, &z2) - z2.Add(&x3, &z3) - z3.Multiply(&tmp0, &x2) - z2.Multiply(&z2, &tmp1) - tmp0.Square(&tmp1) - tmp1.Square(&x2) - x3.Add(&z3, &z2) - z2.Subtract(&z3, &z2) - x2.Multiply(&tmp1, &tmp0) - tmp1.Subtract(&tmp1, &tmp0) - z2.Square(&z2) - - z3.Mult32(&tmp1, 121666) - x3.Square(&x3) - tmp0.Add(&tmp0, &z3) - z3.Multiply(&x1, &z2) - z2.Multiply(&tmp1, &tmp0) - } - - x2.Swap(&x3, swap) - z2.Swap(&z3, swap) - - z2.Invert(&z2) - x2.Multiply(&x2, &z2) - copy(dst[:], x2.Bytes()) -} - -func scalarBaseMult(dst, scalar *[32]byte) { - checkBasepoint() - scalarMult(dst, scalar, &basePoint) -} - -func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) { - var in [32]byte - if l := len(scalar); l != 32 { - return nil, errors.New("bad scalar length: " + strconv.Itoa(l) + ", expected 32") - } - if l := len(point); l != 32 { - return nil, errors.New("bad point length: " + strconv.Itoa(l) + ", expected 32") - } - copy(in[:], scalar) - if &point[0] == &Basepoint[0] { - scalarBaseMult(dst, &in) - } else { - var base, zero [32]byte - copy(base[:], point) - scalarMult(dst, &in, &base) - if subtle.ConstantTimeCompare(dst[:], zero[:]) == 1 { - return nil, errors.New("bad input point: low order point") - } - } - return dst[:], nil -} - -func checkBasepoint() { - if subtle.ConstantTimeCompare(Basepoint, []byte{ - 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - }) != 1 { - panic("curve25519: global Basepoint value was modified") - } -} diff --git a/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go b/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go deleted file mode 100644 index 627df4972..000000000 --- a/vendor/golang.org/x/crypto/curve25519/curve25519_go120.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2022 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.20 - -package curve25519 - -import "crypto/ecdh" - -func x25519(dst *[32]byte, scalar, point []byte) ([]byte, error) { - curve := ecdh.X25519() - pub, err := curve.NewPublicKey(point) - if err != nil { - return nil, err - } - priv, err := curve.NewPrivateKey(scalar) - if err != nil { - return nil, err - } - out, err := priv.ECDH(pub) - if err != nil { - return nil, err - } - copy(dst[:], out) - return dst[:], nil -} - -func scalarMult(dst, scalar, point *[32]byte) { - if _, err := x25519(dst, scalar[:], point[:]); err != nil { - // The only error condition for x25519 when the inputs are 32 bytes long - // is if the output would have been the all-zero value. - for i := range dst { - dst[i] = 0 - } - } -} - -func scalarBaseMult(dst, scalar *[32]byte) { - curve := ecdh.X25519() - priv, err := curve.NewPrivateKey(scalar[:]) - if err != nil { - panic("curve25519: internal error: scalarBaseMult was not 32 bytes") - } - copy(dst[:], priv.PublicKey().Bytes()) -} diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/README b/vendor/golang.org/x/crypto/curve25519/internal/field/README deleted file mode 100644 index e25bca7dc..000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/README +++ /dev/null @@ -1,7 +0,0 @@ -This package is kept in sync with crypto/ed25519/internal/edwards25519/field in -the standard library. - -If there are any changes in the standard library that need to be synced to this -package, run sync.sh. It will not overwrite any local changes made since the -previous sync, so it's ok to land changes in this package first, and then sync -to the standard library later. diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go deleted file mode 100644 index ca841ad99..000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe.go +++ /dev/null @@ -1,416 +0,0 @@ -// Copyright (c) 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -// Package field implements fast arithmetic modulo 2^255-19. -package field - -import ( - "crypto/subtle" - "encoding/binary" - "math/bits" -) - -// Element represents an element of the field GF(2^255-19). Note that this -// is not a cryptographically secure group, and should only be used to interact -// with edwards25519.Point coordinates. -// -// This type works similarly to math/big.Int, and all arguments and receivers -// are allowed to alias. -// -// The zero value is a valid zero element. -type Element struct { - // An element t represents the integer - // t.l0 + t.l1*2^51 + t.l2*2^102 + t.l3*2^153 + t.l4*2^204 - // - // Between operations, all limbs are expected to be lower than 2^52. - l0 uint64 - l1 uint64 - l2 uint64 - l3 uint64 - l4 uint64 -} - -const maskLow51Bits uint64 = (1 << 51) - 1 - -var feZero = &Element{0, 0, 0, 0, 0} - -// Zero sets v = 0, and returns v. -func (v *Element) Zero() *Element { - *v = *feZero - return v -} - -var feOne = &Element{1, 0, 0, 0, 0} - -// One sets v = 1, and returns v. -func (v *Element) One() *Element { - *v = *feOne - return v -} - -// reduce reduces v modulo 2^255 - 19 and returns it. -func (v *Element) reduce() *Element { - v.carryPropagate() - - // After the light reduction we now have a field element representation - // v < 2^255 + 2^13 * 19, but need v < 2^255 - 19. - - // If v >= 2^255 - 19, then v + 19 >= 2^255, which would overflow 2^255 - 1, - // generating a carry. That is, c will be 0 if v < 2^255 - 19, and 1 otherwise. - c := (v.l0 + 19) >> 51 - c = (v.l1 + c) >> 51 - c = (v.l2 + c) >> 51 - c = (v.l3 + c) >> 51 - c = (v.l4 + c) >> 51 - - // If v < 2^255 - 19 and c = 0, this will be a no-op. Otherwise, it's - // effectively applying the reduction identity to the carry. - v.l0 += 19 * c - - v.l1 += v.l0 >> 51 - v.l0 = v.l0 & maskLow51Bits - v.l2 += v.l1 >> 51 - v.l1 = v.l1 & maskLow51Bits - v.l3 += v.l2 >> 51 - v.l2 = v.l2 & maskLow51Bits - v.l4 += v.l3 >> 51 - v.l3 = v.l3 & maskLow51Bits - // no additional carry - v.l4 = v.l4 & maskLow51Bits - - return v -} - -// Add sets v = a + b, and returns v. -func (v *Element) Add(a, b *Element) *Element { - v.l0 = a.l0 + b.l0 - v.l1 = a.l1 + b.l1 - v.l2 = a.l2 + b.l2 - v.l3 = a.l3 + b.l3 - v.l4 = a.l4 + b.l4 - // Using the generic implementation here is actually faster than the - // assembly. Probably because the body of this function is so simple that - // the compiler can figure out better optimizations by inlining the carry - // propagation. TODO - return v.carryPropagateGeneric() -} - -// Subtract sets v = a - b, and returns v. -func (v *Element) Subtract(a, b *Element) *Element { - // We first add 2 * p, to guarantee the subtraction won't underflow, and - // then subtract b (which can be up to 2^255 + 2^13 * 19). - v.l0 = (a.l0 + 0xFFFFFFFFFFFDA) - b.l0 - v.l1 = (a.l1 + 0xFFFFFFFFFFFFE) - b.l1 - v.l2 = (a.l2 + 0xFFFFFFFFFFFFE) - b.l2 - v.l3 = (a.l3 + 0xFFFFFFFFFFFFE) - b.l3 - v.l4 = (a.l4 + 0xFFFFFFFFFFFFE) - b.l4 - return v.carryPropagate() -} - -// Negate sets v = -a, and returns v. -func (v *Element) Negate(a *Element) *Element { - return v.Subtract(feZero, a) -} - -// Invert sets v = 1/z mod p, and returns v. -// -// If z == 0, Invert returns v = 0. -func (v *Element) Invert(z *Element) *Element { - // Inversion is implemented as exponentiation with exponent p − 2. It uses the - // same sequence of 255 squarings and 11 multiplications as [Curve25519]. - var z2, z9, z11, z2_5_0, z2_10_0, z2_20_0, z2_50_0, z2_100_0, t Element - - z2.Square(z) // 2 - t.Square(&z2) // 4 - t.Square(&t) // 8 - z9.Multiply(&t, z) // 9 - z11.Multiply(&z9, &z2) // 11 - t.Square(&z11) // 22 - z2_5_0.Multiply(&t, &z9) // 31 = 2^5 - 2^0 - - t.Square(&z2_5_0) // 2^6 - 2^1 - for i := 0; i < 4; i++ { - t.Square(&t) // 2^10 - 2^5 - } - z2_10_0.Multiply(&t, &z2_5_0) // 2^10 - 2^0 - - t.Square(&z2_10_0) // 2^11 - 2^1 - for i := 0; i < 9; i++ { - t.Square(&t) // 2^20 - 2^10 - } - z2_20_0.Multiply(&t, &z2_10_0) // 2^20 - 2^0 - - t.Square(&z2_20_0) // 2^21 - 2^1 - for i := 0; i < 19; i++ { - t.Square(&t) // 2^40 - 2^20 - } - t.Multiply(&t, &z2_20_0) // 2^40 - 2^0 - - t.Square(&t) // 2^41 - 2^1 - for i := 0; i < 9; i++ { - t.Square(&t) // 2^50 - 2^10 - } - z2_50_0.Multiply(&t, &z2_10_0) // 2^50 - 2^0 - - t.Square(&z2_50_0) // 2^51 - 2^1 - for i := 0; i < 49; i++ { - t.Square(&t) // 2^100 - 2^50 - } - z2_100_0.Multiply(&t, &z2_50_0) // 2^100 - 2^0 - - t.Square(&z2_100_0) // 2^101 - 2^1 - for i := 0; i < 99; i++ { - t.Square(&t) // 2^200 - 2^100 - } - t.Multiply(&t, &z2_100_0) // 2^200 - 2^0 - - t.Square(&t) // 2^201 - 2^1 - for i := 0; i < 49; i++ { - t.Square(&t) // 2^250 - 2^50 - } - t.Multiply(&t, &z2_50_0) // 2^250 - 2^0 - - t.Square(&t) // 2^251 - 2^1 - t.Square(&t) // 2^252 - 2^2 - t.Square(&t) // 2^253 - 2^3 - t.Square(&t) // 2^254 - 2^4 - t.Square(&t) // 2^255 - 2^5 - - return v.Multiply(&t, &z11) // 2^255 - 21 -} - -// Set sets v = a, and returns v. -func (v *Element) Set(a *Element) *Element { - *v = *a - return v -} - -// SetBytes sets v to x, which must be a 32-byte little-endian encoding. -// -// Consistent with RFC 7748, the most significant bit (the high bit of the -// last byte) is ignored, and non-canonical values (2^255-19 through 2^255-1) -// are accepted. Note that this is laxer than specified by RFC 8032. -func (v *Element) SetBytes(x []byte) *Element { - if len(x) != 32 { - panic("edwards25519: invalid field element input size") - } - - // Bits 0:51 (bytes 0:8, bits 0:64, shift 0, mask 51). - v.l0 = binary.LittleEndian.Uint64(x[0:8]) - v.l0 &= maskLow51Bits - // Bits 51:102 (bytes 6:14, bits 48:112, shift 3, mask 51). - v.l1 = binary.LittleEndian.Uint64(x[6:14]) >> 3 - v.l1 &= maskLow51Bits - // Bits 102:153 (bytes 12:20, bits 96:160, shift 6, mask 51). - v.l2 = binary.LittleEndian.Uint64(x[12:20]) >> 6 - v.l2 &= maskLow51Bits - // Bits 153:204 (bytes 19:27, bits 152:216, shift 1, mask 51). - v.l3 = binary.LittleEndian.Uint64(x[19:27]) >> 1 - v.l3 &= maskLow51Bits - // Bits 204:251 (bytes 24:32, bits 192:256, shift 12, mask 51). - // Note: not bytes 25:33, shift 4, to avoid overread. - v.l4 = binary.LittleEndian.Uint64(x[24:32]) >> 12 - v.l4 &= maskLow51Bits - - return v -} - -// Bytes returns the canonical 32-byte little-endian encoding of v. -func (v *Element) Bytes() []byte { - // This function is outlined to make the allocations inline in the caller - // rather than happen on the heap. - var out [32]byte - return v.bytes(&out) -} - -func (v *Element) bytes(out *[32]byte) []byte { - t := *v - t.reduce() - - var buf [8]byte - for i, l := range [5]uint64{t.l0, t.l1, t.l2, t.l3, t.l4} { - bitsOffset := i * 51 - binary.LittleEndian.PutUint64(buf[:], l<= len(out) { - break - } - out[off] |= bb - } - } - - return out[:] -} - -// Equal returns 1 if v and u are equal, and 0 otherwise. -func (v *Element) Equal(u *Element) int { - sa, sv := u.Bytes(), v.Bytes() - return subtle.ConstantTimeCompare(sa, sv) -} - -// mask64Bits returns 0xffffffff if cond is 1, and 0 otherwise. -func mask64Bits(cond int) uint64 { return ^(uint64(cond) - 1) } - -// Select sets v to a if cond == 1, and to b if cond == 0. -func (v *Element) Select(a, b *Element, cond int) *Element { - m := mask64Bits(cond) - v.l0 = (m & a.l0) | (^m & b.l0) - v.l1 = (m & a.l1) | (^m & b.l1) - v.l2 = (m & a.l2) | (^m & b.l2) - v.l3 = (m & a.l3) | (^m & b.l3) - v.l4 = (m & a.l4) | (^m & b.l4) - return v -} - -// Swap swaps v and u if cond == 1 or leaves them unchanged if cond == 0, and returns v. -func (v *Element) Swap(u *Element, cond int) { - m := mask64Bits(cond) - t := m & (v.l0 ^ u.l0) - v.l0 ^= t - u.l0 ^= t - t = m & (v.l1 ^ u.l1) - v.l1 ^= t - u.l1 ^= t - t = m & (v.l2 ^ u.l2) - v.l2 ^= t - u.l2 ^= t - t = m & (v.l3 ^ u.l3) - v.l3 ^= t - u.l3 ^= t - t = m & (v.l4 ^ u.l4) - v.l4 ^= t - u.l4 ^= t -} - -// IsNegative returns 1 if v is negative, and 0 otherwise. -func (v *Element) IsNegative() int { - return int(v.Bytes()[0] & 1) -} - -// Absolute sets v to |u|, and returns v. -func (v *Element) Absolute(u *Element) *Element { - return v.Select(new(Element).Negate(u), u, u.IsNegative()) -} - -// Multiply sets v = x * y, and returns v. -func (v *Element) Multiply(x, y *Element) *Element { - feMul(v, x, y) - return v -} - -// Square sets v = x * x, and returns v. -func (v *Element) Square(x *Element) *Element { - feSquare(v, x) - return v -} - -// Mult32 sets v = x * y, and returns v. -func (v *Element) Mult32(x *Element, y uint32) *Element { - x0lo, x0hi := mul51(x.l0, y) - x1lo, x1hi := mul51(x.l1, y) - x2lo, x2hi := mul51(x.l2, y) - x3lo, x3hi := mul51(x.l3, y) - x4lo, x4hi := mul51(x.l4, y) - v.l0 = x0lo + 19*x4hi // carried over per the reduction identity - v.l1 = x1lo + x0hi - v.l2 = x2lo + x1hi - v.l3 = x3lo + x2hi - v.l4 = x4lo + x3hi - // The hi portions are going to be only 32 bits, plus any previous excess, - // so we can skip the carry propagation. - return v -} - -// mul51 returns lo + hi * 2⁵¹ = a * b. -func mul51(a uint64, b uint32) (lo uint64, hi uint64) { - mh, ml := bits.Mul64(a, uint64(b)) - lo = ml & maskLow51Bits - hi = (mh << 13) | (ml >> 51) - return -} - -// Pow22523 set v = x^((p-5)/8), and returns v. (p-5)/8 is 2^252-3. -func (v *Element) Pow22523(x *Element) *Element { - var t0, t1, t2 Element - - t0.Square(x) // x^2 - t1.Square(&t0) // x^4 - t1.Square(&t1) // x^8 - t1.Multiply(x, &t1) // x^9 - t0.Multiply(&t0, &t1) // x^11 - t0.Square(&t0) // x^22 - t0.Multiply(&t1, &t0) // x^31 - t1.Square(&t0) // x^62 - for i := 1; i < 5; i++ { // x^992 - t1.Square(&t1) - } - t0.Multiply(&t1, &t0) // x^1023 -> 1023 = 2^10 - 1 - t1.Square(&t0) // 2^11 - 2 - for i := 1; i < 10; i++ { // 2^20 - 2^10 - t1.Square(&t1) - } - t1.Multiply(&t1, &t0) // 2^20 - 1 - t2.Square(&t1) // 2^21 - 2 - for i := 1; i < 20; i++ { // 2^40 - 2^20 - t2.Square(&t2) - } - t1.Multiply(&t2, &t1) // 2^40 - 1 - t1.Square(&t1) // 2^41 - 2 - for i := 1; i < 10; i++ { // 2^50 - 2^10 - t1.Square(&t1) - } - t0.Multiply(&t1, &t0) // 2^50 - 1 - t1.Square(&t0) // 2^51 - 2 - for i := 1; i < 50; i++ { // 2^100 - 2^50 - t1.Square(&t1) - } - t1.Multiply(&t1, &t0) // 2^100 - 1 - t2.Square(&t1) // 2^101 - 2 - for i := 1; i < 100; i++ { // 2^200 - 2^100 - t2.Square(&t2) - } - t1.Multiply(&t2, &t1) // 2^200 - 1 - t1.Square(&t1) // 2^201 - 2 - for i := 1; i < 50; i++ { // 2^250 - 2^50 - t1.Square(&t1) - } - t0.Multiply(&t1, &t0) // 2^250 - 1 - t0.Square(&t0) // 2^251 - 2 - t0.Square(&t0) // 2^252 - 4 - return v.Multiply(&t0, x) // 2^252 - 3 -> x^(2^252-3) -} - -// sqrtM1 is 2^((p-1)/4), which squared is equal to -1 by Euler's Criterion. -var sqrtM1 = &Element{1718705420411056, 234908883556509, - 2233514472574048, 2117202627021982, 765476049583133} - -// SqrtRatio sets r to the non-negative square root of the ratio of u and v. -// -// If u/v is square, SqrtRatio returns r and 1. If u/v is not square, SqrtRatio -// sets r according to Section 4.3 of draft-irtf-cfrg-ristretto255-decaf448-00, -// and returns r and 0. -func (r *Element) SqrtRatio(u, v *Element) (rr *Element, wasSquare int) { - var a, b Element - - // r = (u * v3) * (u * v7)^((p-5)/8) - v2 := a.Square(v) - uv3 := b.Multiply(u, b.Multiply(v2, v)) - uv7 := a.Multiply(uv3, a.Square(v2)) - r.Multiply(uv3, r.Pow22523(uv7)) - - check := a.Multiply(v, a.Square(r)) // check = v * r^2 - - uNeg := b.Negate(u) - correctSignSqrt := check.Equal(u) - flippedSignSqrt := check.Equal(uNeg) - flippedSignSqrtI := check.Equal(uNeg.Multiply(uNeg, sqrtM1)) - - rPrime := b.Multiply(r, sqrtM1) // r_prime = SQRT_M1 * r - // r = CT_SELECT(r_prime IF flipped_sign_sqrt | flipped_sign_sqrt_i ELSE r) - r.Select(rPrime, r, flippedSignSqrt|flippedSignSqrtI) - - r.Absolute(r) // Choose the nonnegative square root. - return r, correctSignSqrt | flippedSignSqrt -} diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go deleted file mode 100644 index 70c541692..000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.go +++ /dev/null @@ -1,15 +0,0 @@ -// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT. - -//go:build amd64 && gc && !purego - -package field - -// feMul sets out = a * b. It works like feMulGeneric. -// -//go:noescape -func feMul(out *Element, a *Element, b *Element) - -// feSquare sets out = a * a. It works like feSquareGeneric. -// -//go:noescape -func feSquare(out *Element, a *Element) diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s deleted file mode 100644 index 60817acc4..000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64.s +++ /dev/null @@ -1,378 +0,0 @@ -// Code generated by command: go run fe_amd64_asm.go -out ../fe_amd64.s -stubs ../fe_amd64.go -pkg field. DO NOT EDIT. - -//go:build amd64 && gc && !purego - -#include "textflag.h" - -// func feMul(out *Element, a *Element, b *Element) -TEXT ·feMul(SB), NOSPLIT, $0-24 - MOVQ a+8(FP), CX - MOVQ b+16(FP), BX - - // r0 = a0×b0 - MOVQ (CX), AX - MULQ (BX) - MOVQ AX, DI - MOVQ DX, SI - - // r0 += 19×a1×b4 - MOVQ 8(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 32(BX) - ADDQ AX, DI - ADCQ DX, SI - - // r0 += 19×a2×b3 - MOVQ 16(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 24(BX) - ADDQ AX, DI - ADCQ DX, SI - - // r0 += 19×a3×b2 - MOVQ 24(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 16(BX) - ADDQ AX, DI - ADCQ DX, SI - - // r0 += 19×a4×b1 - MOVQ 32(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 8(BX) - ADDQ AX, DI - ADCQ DX, SI - - // r1 = a0×b1 - MOVQ (CX), AX - MULQ 8(BX) - MOVQ AX, R9 - MOVQ DX, R8 - - // r1 += a1×b0 - MOVQ 8(CX), AX - MULQ (BX) - ADDQ AX, R9 - ADCQ DX, R8 - - // r1 += 19×a2×b4 - MOVQ 16(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 32(BX) - ADDQ AX, R9 - ADCQ DX, R8 - - // r1 += 19×a3×b3 - MOVQ 24(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 24(BX) - ADDQ AX, R9 - ADCQ DX, R8 - - // r1 += 19×a4×b2 - MOVQ 32(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 16(BX) - ADDQ AX, R9 - ADCQ DX, R8 - - // r2 = a0×b2 - MOVQ (CX), AX - MULQ 16(BX) - MOVQ AX, R11 - MOVQ DX, R10 - - // r2 += a1×b1 - MOVQ 8(CX), AX - MULQ 8(BX) - ADDQ AX, R11 - ADCQ DX, R10 - - // r2 += a2×b0 - MOVQ 16(CX), AX - MULQ (BX) - ADDQ AX, R11 - ADCQ DX, R10 - - // r2 += 19×a3×b4 - MOVQ 24(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 32(BX) - ADDQ AX, R11 - ADCQ DX, R10 - - // r2 += 19×a4×b3 - MOVQ 32(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 24(BX) - ADDQ AX, R11 - ADCQ DX, R10 - - // r3 = a0×b3 - MOVQ (CX), AX - MULQ 24(BX) - MOVQ AX, R13 - MOVQ DX, R12 - - // r3 += a1×b2 - MOVQ 8(CX), AX - MULQ 16(BX) - ADDQ AX, R13 - ADCQ DX, R12 - - // r3 += a2×b1 - MOVQ 16(CX), AX - MULQ 8(BX) - ADDQ AX, R13 - ADCQ DX, R12 - - // r3 += a3×b0 - MOVQ 24(CX), AX - MULQ (BX) - ADDQ AX, R13 - ADCQ DX, R12 - - // r3 += 19×a4×b4 - MOVQ 32(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 32(BX) - ADDQ AX, R13 - ADCQ DX, R12 - - // r4 = a0×b4 - MOVQ (CX), AX - MULQ 32(BX) - MOVQ AX, R15 - MOVQ DX, R14 - - // r4 += a1×b3 - MOVQ 8(CX), AX - MULQ 24(BX) - ADDQ AX, R15 - ADCQ DX, R14 - - // r4 += a2×b2 - MOVQ 16(CX), AX - MULQ 16(BX) - ADDQ AX, R15 - ADCQ DX, R14 - - // r4 += a3×b1 - MOVQ 24(CX), AX - MULQ 8(BX) - ADDQ AX, R15 - ADCQ DX, R14 - - // r4 += a4×b0 - MOVQ 32(CX), AX - MULQ (BX) - ADDQ AX, R15 - ADCQ DX, R14 - - // First reduction chain - MOVQ $0x0007ffffffffffff, AX - SHLQ $0x0d, DI, SI - SHLQ $0x0d, R9, R8 - SHLQ $0x0d, R11, R10 - SHLQ $0x0d, R13, R12 - SHLQ $0x0d, R15, R14 - ANDQ AX, DI - IMUL3Q $0x13, R14, R14 - ADDQ R14, DI - ANDQ AX, R9 - ADDQ SI, R9 - ANDQ AX, R11 - ADDQ R8, R11 - ANDQ AX, R13 - ADDQ R10, R13 - ANDQ AX, R15 - ADDQ R12, R15 - - // Second reduction chain (carryPropagate) - MOVQ DI, SI - SHRQ $0x33, SI - MOVQ R9, R8 - SHRQ $0x33, R8 - MOVQ R11, R10 - SHRQ $0x33, R10 - MOVQ R13, R12 - SHRQ $0x33, R12 - MOVQ R15, R14 - SHRQ $0x33, R14 - ANDQ AX, DI - IMUL3Q $0x13, R14, R14 - ADDQ R14, DI - ANDQ AX, R9 - ADDQ SI, R9 - ANDQ AX, R11 - ADDQ R8, R11 - ANDQ AX, R13 - ADDQ R10, R13 - ANDQ AX, R15 - ADDQ R12, R15 - - // Store output - MOVQ out+0(FP), AX - MOVQ DI, (AX) - MOVQ R9, 8(AX) - MOVQ R11, 16(AX) - MOVQ R13, 24(AX) - MOVQ R15, 32(AX) - RET - -// func feSquare(out *Element, a *Element) -TEXT ·feSquare(SB), NOSPLIT, $0-16 - MOVQ a+8(FP), CX - - // r0 = l0×l0 - MOVQ (CX), AX - MULQ (CX) - MOVQ AX, SI - MOVQ DX, BX - - // r0 += 38×l1×l4 - MOVQ 8(CX), AX - IMUL3Q $0x26, AX, AX - MULQ 32(CX) - ADDQ AX, SI - ADCQ DX, BX - - // r0 += 38×l2×l3 - MOVQ 16(CX), AX - IMUL3Q $0x26, AX, AX - MULQ 24(CX) - ADDQ AX, SI - ADCQ DX, BX - - // r1 = 2×l0×l1 - MOVQ (CX), AX - SHLQ $0x01, AX - MULQ 8(CX) - MOVQ AX, R8 - MOVQ DX, DI - - // r1 += 38×l2×l4 - MOVQ 16(CX), AX - IMUL3Q $0x26, AX, AX - MULQ 32(CX) - ADDQ AX, R8 - ADCQ DX, DI - - // r1 += 19×l3×l3 - MOVQ 24(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 24(CX) - ADDQ AX, R8 - ADCQ DX, DI - - // r2 = 2×l0×l2 - MOVQ (CX), AX - SHLQ $0x01, AX - MULQ 16(CX) - MOVQ AX, R10 - MOVQ DX, R9 - - // r2 += l1×l1 - MOVQ 8(CX), AX - MULQ 8(CX) - ADDQ AX, R10 - ADCQ DX, R9 - - // r2 += 38×l3×l4 - MOVQ 24(CX), AX - IMUL3Q $0x26, AX, AX - MULQ 32(CX) - ADDQ AX, R10 - ADCQ DX, R9 - - // r3 = 2×l0×l3 - MOVQ (CX), AX - SHLQ $0x01, AX - MULQ 24(CX) - MOVQ AX, R12 - MOVQ DX, R11 - - // r3 += 2×l1×l2 - MOVQ 8(CX), AX - IMUL3Q $0x02, AX, AX - MULQ 16(CX) - ADDQ AX, R12 - ADCQ DX, R11 - - // r3 += 19×l4×l4 - MOVQ 32(CX), AX - IMUL3Q $0x13, AX, AX - MULQ 32(CX) - ADDQ AX, R12 - ADCQ DX, R11 - - // r4 = 2×l0×l4 - MOVQ (CX), AX - SHLQ $0x01, AX - MULQ 32(CX) - MOVQ AX, R14 - MOVQ DX, R13 - - // r4 += 2×l1×l3 - MOVQ 8(CX), AX - IMUL3Q $0x02, AX, AX - MULQ 24(CX) - ADDQ AX, R14 - ADCQ DX, R13 - - // r4 += l2×l2 - MOVQ 16(CX), AX - MULQ 16(CX) - ADDQ AX, R14 - ADCQ DX, R13 - - // First reduction chain - MOVQ $0x0007ffffffffffff, AX - SHLQ $0x0d, SI, BX - SHLQ $0x0d, R8, DI - SHLQ $0x0d, R10, R9 - SHLQ $0x0d, R12, R11 - SHLQ $0x0d, R14, R13 - ANDQ AX, SI - IMUL3Q $0x13, R13, R13 - ADDQ R13, SI - ANDQ AX, R8 - ADDQ BX, R8 - ANDQ AX, R10 - ADDQ DI, R10 - ANDQ AX, R12 - ADDQ R9, R12 - ANDQ AX, R14 - ADDQ R11, R14 - - // Second reduction chain (carryPropagate) - MOVQ SI, BX - SHRQ $0x33, BX - MOVQ R8, DI - SHRQ $0x33, DI - MOVQ R10, R9 - SHRQ $0x33, R9 - MOVQ R12, R11 - SHRQ $0x33, R11 - MOVQ R14, R13 - SHRQ $0x33, R13 - ANDQ AX, SI - IMUL3Q $0x13, R13, R13 - ADDQ R13, SI - ANDQ AX, R8 - ADDQ BX, R8 - ANDQ AX, R10 - ADDQ DI, R10 - ANDQ AX, R12 - ADDQ R9, R12 - ANDQ AX, R14 - ADDQ R11, R14 - - // Store output - MOVQ out+0(FP), AX - MOVQ SI, (AX) - MOVQ R8, 8(AX) - MOVQ R10, 16(AX) - MOVQ R12, 24(AX) - MOVQ R14, 32(AX) - RET diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go deleted file mode 100644 index 9da280d1d..000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_amd64_noasm.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2019 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !amd64 || !gc || purego - -package field - -func feMul(v, x, y *Element) { feMulGeneric(v, x, y) } - -func feSquare(v, x *Element) { feSquareGeneric(v, x) } diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go deleted file mode 100644 index 075fe9b92..000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.go +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build arm64 && gc && !purego - -package field - -//go:noescape -func carryPropagate(v *Element) - -func (v *Element) carryPropagate() *Element { - carryPropagate(v) - return v -} diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s deleted file mode 100644 index 3126a4341..000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64.s +++ /dev/null @@ -1,42 +0,0 @@ -// Copyright (c) 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build arm64 && gc && !purego - -#include "textflag.h" - -// carryPropagate works exactly like carryPropagateGeneric and uses the -// same AND, ADD, and LSR+MADD instructions emitted by the compiler, but -// avoids loading R0-R4 twice and uses LDP and STP. -// -// See https://golang.org/issues/43145 for the main compiler issue. -// -// func carryPropagate(v *Element) -TEXT ·carryPropagate(SB),NOFRAME|NOSPLIT,$0-8 - MOVD v+0(FP), R20 - - LDP 0(R20), (R0, R1) - LDP 16(R20), (R2, R3) - MOVD 32(R20), R4 - - AND $0x7ffffffffffff, R0, R10 - AND $0x7ffffffffffff, R1, R11 - AND $0x7ffffffffffff, R2, R12 - AND $0x7ffffffffffff, R3, R13 - AND $0x7ffffffffffff, R4, R14 - - ADD R0>>51, R11, R11 - ADD R1>>51, R12, R12 - ADD R2>>51, R13, R13 - ADD R3>>51, R14, R14 - // R4>>51 * 19 + R10 -> R10 - LSR $51, R4, R21 - MOVD $19, R22 - MADD R22, R10, R21, R10 - - STP (R10, R11), 0(R20) - STP (R12, R13), 16(R20) - MOVD R14, 32(R20) - - RET diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go deleted file mode 100644 index fc029ac12..000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_arm64_noasm.go +++ /dev/null @@ -1,11 +0,0 @@ -// Copyright (c) 2021 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !arm64 || !gc || purego - -package field - -func (v *Element) carryPropagate() *Element { - return v.carryPropagateGeneric() -} diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go b/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go deleted file mode 100644 index 2671217da..000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/fe_generic.go +++ /dev/null @@ -1,264 +0,0 @@ -// Copyright (c) 2017 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package field - -import "math/bits" - -// uint128 holds a 128-bit number as two 64-bit limbs, for use with the -// bits.Mul64 and bits.Add64 intrinsics. -type uint128 struct { - lo, hi uint64 -} - -// mul64 returns a * b. -func mul64(a, b uint64) uint128 { - hi, lo := bits.Mul64(a, b) - return uint128{lo, hi} -} - -// addMul64 returns v + a * b. -func addMul64(v uint128, a, b uint64) uint128 { - hi, lo := bits.Mul64(a, b) - lo, c := bits.Add64(lo, v.lo, 0) - hi, _ = bits.Add64(hi, v.hi, c) - return uint128{lo, hi} -} - -// shiftRightBy51 returns a >> 51. a is assumed to be at most 115 bits. -func shiftRightBy51(a uint128) uint64 { - return (a.hi << (64 - 51)) | (a.lo >> 51) -} - -func feMulGeneric(v, a, b *Element) { - a0 := a.l0 - a1 := a.l1 - a2 := a.l2 - a3 := a.l3 - a4 := a.l4 - - b0 := b.l0 - b1 := b.l1 - b2 := b.l2 - b3 := b.l3 - b4 := b.l4 - - // Limb multiplication works like pen-and-paper columnar multiplication, but - // with 51-bit limbs instead of digits. - // - // a4 a3 a2 a1 a0 x - // b4 b3 b2 b1 b0 = - // ------------------------ - // a4b0 a3b0 a2b0 a1b0 a0b0 + - // a4b1 a3b1 a2b1 a1b1 a0b1 + - // a4b2 a3b2 a2b2 a1b2 a0b2 + - // a4b3 a3b3 a2b3 a1b3 a0b3 + - // a4b4 a3b4 a2b4 a1b4 a0b4 = - // ---------------------------------------------- - // r8 r7 r6 r5 r4 r3 r2 r1 r0 - // - // We can then use the reduction identity (a * 2²⁵⁵ + b = a * 19 + b) to - // reduce the limbs that would overflow 255 bits. r5 * 2²⁵⁵ becomes 19 * r5, - // r6 * 2³⁰⁶ becomes 19 * r6 * 2⁵¹, etc. - // - // Reduction can be carried out simultaneously to multiplication. For - // example, we do not compute r5: whenever the result of a multiplication - // belongs to r5, like a1b4, we multiply it by 19 and add the result to r0. - // - // a4b0 a3b0 a2b0 a1b0 a0b0 + - // a3b1 a2b1 a1b1 a0b1 19×a4b1 + - // a2b2 a1b2 a0b2 19×a4b2 19×a3b2 + - // a1b3 a0b3 19×a4b3 19×a3b3 19×a2b3 + - // a0b4 19×a4b4 19×a3b4 19×a2b4 19×a1b4 = - // -------------------------------------- - // r4 r3 r2 r1 r0 - // - // Finally we add up the columns into wide, overlapping limbs. - - a1_19 := a1 * 19 - a2_19 := a2 * 19 - a3_19 := a3 * 19 - a4_19 := a4 * 19 - - // r0 = a0×b0 + 19×(a1×b4 + a2×b3 + a3×b2 + a4×b1) - r0 := mul64(a0, b0) - r0 = addMul64(r0, a1_19, b4) - r0 = addMul64(r0, a2_19, b3) - r0 = addMul64(r0, a3_19, b2) - r0 = addMul64(r0, a4_19, b1) - - // r1 = a0×b1 + a1×b0 + 19×(a2×b4 + a3×b3 + a4×b2) - r1 := mul64(a0, b1) - r1 = addMul64(r1, a1, b0) - r1 = addMul64(r1, a2_19, b4) - r1 = addMul64(r1, a3_19, b3) - r1 = addMul64(r1, a4_19, b2) - - // r2 = a0×b2 + a1×b1 + a2×b0 + 19×(a3×b4 + a4×b3) - r2 := mul64(a0, b2) - r2 = addMul64(r2, a1, b1) - r2 = addMul64(r2, a2, b0) - r2 = addMul64(r2, a3_19, b4) - r2 = addMul64(r2, a4_19, b3) - - // r3 = a0×b3 + a1×b2 + a2×b1 + a3×b0 + 19×a4×b4 - r3 := mul64(a0, b3) - r3 = addMul64(r3, a1, b2) - r3 = addMul64(r3, a2, b1) - r3 = addMul64(r3, a3, b0) - r3 = addMul64(r3, a4_19, b4) - - // r4 = a0×b4 + a1×b3 + a2×b2 + a3×b1 + a4×b0 - r4 := mul64(a0, b4) - r4 = addMul64(r4, a1, b3) - r4 = addMul64(r4, a2, b2) - r4 = addMul64(r4, a3, b1) - r4 = addMul64(r4, a4, b0) - - // After the multiplication, we need to reduce (carry) the five coefficients - // to obtain a result with limbs that are at most slightly larger than 2⁵¹, - // to respect the Element invariant. - // - // Overall, the reduction works the same as carryPropagate, except with - // wider inputs: we take the carry for each coefficient by shifting it right - // by 51, and add it to the limb above it. The top carry is multiplied by 19 - // according to the reduction identity and added to the lowest limb. - // - // The largest coefficient (r0) will be at most 111 bits, which guarantees - // that all carries are at most 111 - 51 = 60 bits, which fits in a uint64. - // - // r0 = a0×b0 + 19×(a1×b4 + a2×b3 + a3×b2 + a4×b1) - // r0 < 2⁵²×2⁵² + 19×(2⁵²×2⁵² + 2⁵²×2⁵² + 2⁵²×2⁵² + 2⁵²×2⁵²) - // r0 < (1 + 19 × 4) × 2⁵² × 2⁵² - // r0 < 2⁷ × 2⁵² × 2⁵² - // r0 < 2¹¹¹ - // - // Moreover, the top coefficient (r4) is at most 107 bits, so c4 is at most - // 56 bits, and c4 * 19 is at most 61 bits, which again fits in a uint64 and - // allows us to easily apply the reduction identity. - // - // r4 = a0×b4 + a1×b3 + a2×b2 + a3×b1 + a4×b0 - // r4 < 5 × 2⁵² × 2⁵² - // r4 < 2¹⁰⁷ - // - - c0 := shiftRightBy51(r0) - c1 := shiftRightBy51(r1) - c2 := shiftRightBy51(r2) - c3 := shiftRightBy51(r3) - c4 := shiftRightBy51(r4) - - rr0 := r0.lo&maskLow51Bits + c4*19 - rr1 := r1.lo&maskLow51Bits + c0 - rr2 := r2.lo&maskLow51Bits + c1 - rr3 := r3.lo&maskLow51Bits + c2 - rr4 := r4.lo&maskLow51Bits + c3 - - // Now all coefficients fit into 64-bit registers but are still too large to - // be passed around as a Element. We therefore do one last carry chain, - // where the carries will be small enough to fit in the wiggle room above 2⁵¹. - *v = Element{rr0, rr1, rr2, rr3, rr4} - v.carryPropagate() -} - -func feSquareGeneric(v, a *Element) { - l0 := a.l0 - l1 := a.l1 - l2 := a.l2 - l3 := a.l3 - l4 := a.l4 - - // Squaring works precisely like multiplication above, but thanks to its - // symmetry we get to group a few terms together. - // - // l4 l3 l2 l1 l0 x - // l4 l3 l2 l1 l0 = - // ------------------------ - // l4l0 l3l0 l2l0 l1l0 l0l0 + - // l4l1 l3l1 l2l1 l1l1 l0l1 + - // l4l2 l3l2 l2l2 l1l2 l0l2 + - // l4l3 l3l3 l2l3 l1l3 l0l3 + - // l4l4 l3l4 l2l4 l1l4 l0l4 = - // ---------------------------------------------- - // r8 r7 r6 r5 r4 r3 r2 r1 r0 - // - // l4l0 l3l0 l2l0 l1l0 l0l0 + - // l3l1 l2l1 l1l1 l0l1 19×l4l1 + - // l2l2 l1l2 l0l2 19×l4l2 19×l3l2 + - // l1l3 l0l3 19×l4l3 19×l3l3 19×l2l3 + - // l0l4 19×l4l4 19×l3l4 19×l2l4 19×l1l4 = - // -------------------------------------- - // r4 r3 r2 r1 r0 - // - // With precomputed 2×, 19×, and 2×19× terms, we can compute each limb with - // only three Mul64 and four Add64, instead of five and eight. - - l0_2 := l0 * 2 - l1_2 := l1 * 2 - - l1_38 := l1 * 38 - l2_38 := l2 * 38 - l3_38 := l3 * 38 - - l3_19 := l3 * 19 - l4_19 := l4 * 19 - - // r0 = l0×l0 + 19×(l1×l4 + l2×l3 + l3×l2 + l4×l1) = l0×l0 + 19×2×(l1×l4 + l2×l3) - r0 := mul64(l0, l0) - r0 = addMul64(r0, l1_38, l4) - r0 = addMul64(r0, l2_38, l3) - - // r1 = l0×l1 + l1×l0 + 19×(l2×l4 + l3×l3 + l4×l2) = 2×l0×l1 + 19×2×l2×l4 + 19×l3×l3 - r1 := mul64(l0_2, l1) - r1 = addMul64(r1, l2_38, l4) - r1 = addMul64(r1, l3_19, l3) - - // r2 = l0×l2 + l1×l1 + l2×l0 + 19×(l3×l4 + l4×l3) = 2×l0×l2 + l1×l1 + 19×2×l3×l4 - r2 := mul64(l0_2, l2) - r2 = addMul64(r2, l1, l1) - r2 = addMul64(r2, l3_38, l4) - - // r3 = l0×l3 + l1×l2 + l2×l1 + l3×l0 + 19×l4×l4 = 2×l0×l3 + 2×l1×l2 + 19×l4×l4 - r3 := mul64(l0_2, l3) - r3 = addMul64(r3, l1_2, l2) - r3 = addMul64(r3, l4_19, l4) - - // r4 = l0×l4 + l1×l3 + l2×l2 + l3×l1 + l4×l0 = 2×l0×l4 + 2×l1×l3 + l2×l2 - r4 := mul64(l0_2, l4) - r4 = addMul64(r4, l1_2, l3) - r4 = addMul64(r4, l2, l2) - - c0 := shiftRightBy51(r0) - c1 := shiftRightBy51(r1) - c2 := shiftRightBy51(r2) - c3 := shiftRightBy51(r3) - c4 := shiftRightBy51(r4) - - rr0 := r0.lo&maskLow51Bits + c4*19 - rr1 := r1.lo&maskLow51Bits + c0 - rr2 := r2.lo&maskLow51Bits + c1 - rr3 := r3.lo&maskLow51Bits + c2 - rr4 := r4.lo&maskLow51Bits + c3 - - *v = Element{rr0, rr1, rr2, rr3, rr4} - v.carryPropagate() -} - -// carryPropagateGeneric brings the limbs below 52 bits by applying the reduction -// identity (a * 2²⁵⁵ + b = a * 19 + b) to the l4 carry. TODO inline -func (v *Element) carryPropagateGeneric() *Element { - c0 := v.l0 >> 51 - c1 := v.l1 >> 51 - c2 := v.l2 >> 51 - c3 := v.l3 >> 51 - c4 := v.l4 >> 51 - - v.l0 = v.l0&maskLow51Bits + c4*19 - v.l1 = v.l1&maskLow51Bits + c0 - v.l2 = v.l2&maskLow51Bits + c1 - v.l3 = v.l3&maskLow51Bits + c2 - v.l4 = v.l4&maskLow51Bits + c3 - - return v -} diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint b/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint deleted file mode 100644 index e3685f95c..000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.checkpoint +++ /dev/null @@ -1 +0,0 @@ -b0c49ae9f59d233526f8934262c5bbbe14d4358d diff --git a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh b/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh deleted file mode 100644 index 1ba22a8b4..000000000 --- a/vendor/golang.org/x/crypto/curve25519/internal/field/sync.sh +++ /dev/null @@ -1,19 +0,0 @@ -#! /bin/bash -set -euo pipefail - -cd "$(git rev-parse --show-toplevel)" - -STD_PATH=src/crypto/ed25519/internal/edwards25519/field -LOCAL_PATH=curve25519/internal/field -LAST_SYNC_REF=$(cat $LOCAL_PATH/sync.checkpoint) - -git fetch https://go.googlesource.com/go master - -if git diff --quiet $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH; then - echo "No changes." -else - NEW_REF=$(git rev-parse FETCH_HEAD | tee $LOCAL_PATH/sync.checkpoint) - echo "Applying changes from $LAST_SYNC_REF to $NEW_REF..." - git diff $LAST_SYNC_REF:$STD_PATH FETCH_HEAD:$STD_PATH | \ - git apply -3 --directory=$LOCAL_PATH -fi diff --git a/vendor/golang.org/x/crypto/ed25519/ed25519.go b/vendor/golang.org/x/crypto/ed25519/ed25519.go index a7828345f..59b3a95a7 100644 --- a/vendor/golang.org/x/crypto/ed25519/ed25519.go +++ b/vendor/golang.org/x/crypto/ed25519/ed25519.go @@ -11,9 +11,7 @@ // operations with the same key more efficient. This package refers to the RFC // 8032 private key as the “seed”. // -// Beginning with Go 1.13, the functionality of this package was moved to the -// standard library as crypto/ed25519. This package only acts as a compatibility -// wrapper. +// This package is a wrapper around the standard library crypto/ed25519 package. package ed25519 import ( diff --git a/vendor/golang.org/x/crypto/hkdf/hkdf.go b/vendor/golang.org/x/crypto/hkdf/hkdf.go index f4ded5fee..3bee66294 100644 --- a/vendor/golang.org/x/crypto/hkdf/hkdf.go +++ b/vendor/golang.org/x/crypto/hkdf/hkdf.go @@ -8,7 +8,7 @@ // HKDF is a cryptographic key derivation function (KDF) with the goal of // expanding limited input keying material into one or more cryptographically // strong secret keys. -package hkdf // import "golang.org/x/crypto/hkdf" +package hkdf import ( "crypto/hmac" diff --git a/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s index e0d3c6475..133757384 100644 --- a/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s +++ b/vendor/golang.org/x/crypto/internal/poly1305/sum_amd64.s @@ -1,108 +1,93 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// Code generated by command: go run sum_amd64_asm.go -out ../sum_amd64.s -pkg poly1305. DO NOT EDIT. //go:build gc && !purego -#include "textflag.h" - -#define POLY1305_ADD(msg, h0, h1, h2) \ - ADDQ 0(msg), h0; \ - ADCQ 8(msg), h1; \ - ADCQ $1, h2; \ - LEAQ 16(msg), msg - -#define POLY1305_MUL(h0, h1, h2, r0, r1, t0, t1, t2, t3) \ - MOVQ r0, AX; \ - MULQ h0; \ - MOVQ AX, t0; \ - MOVQ DX, t1; \ - MOVQ r0, AX; \ - MULQ h1; \ - ADDQ AX, t1; \ - ADCQ $0, DX; \ - MOVQ r0, t2; \ - IMULQ h2, t2; \ - ADDQ DX, t2; \ - \ - MOVQ r1, AX; \ - MULQ h0; \ - ADDQ AX, t1; \ - ADCQ $0, DX; \ - MOVQ DX, h0; \ - MOVQ r1, t3; \ - IMULQ h2, t3; \ - MOVQ r1, AX; \ - MULQ h1; \ - ADDQ AX, t2; \ - ADCQ DX, t3; \ - ADDQ h0, t2; \ - ADCQ $0, t3; \ - \ - MOVQ t0, h0; \ - MOVQ t1, h1; \ - MOVQ t2, h2; \ - ANDQ $3, h2; \ - MOVQ t2, t0; \ - ANDQ $0xFFFFFFFFFFFFFFFC, t0; \ - ADDQ t0, h0; \ - ADCQ t3, h1; \ - ADCQ $0, h2; \ - SHRQ $2, t3, t2; \ - SHRQ $2, t3; \ - ADDQ t2, h0; \ - ADCQ t3, h1; \ - ADCQ $0, h2 - -// func update(state *[7]uint64, msg []byte) +// func update(state *macState, msg []byte) TEXT ·update(SB), $0-32 MOVQ state+0(FP), DI MOVQ msg_base+8(FP), SI MOVQ msg_len+16(FP), R15 - - MOVQ 0(DI), R8 // h0 - MOVQ 8(DI), R9 // h1 - MOVQ 16(DI), R10 // h2 - MOVQ 24(DI), R11 // r0 - MOVQ 32(DI), R12 // r1 - - CMPQ R15, $16 + MOVQ (DI), R8 + MOVQ 8(DI), R9 + MOVQ 16(DI), R10 + MOVQ 24(DI), R11 + MOVQ 32(DI), R12 + CMPQ R15, $0x10 JB bytes_between_0_and_15 loop: - POLY1305_ADD(SI, R8, R9, R10) + ADDQ (SI), R8 + ADCQ 8(SI), R9 + ADCQ $0x01, R10 + LEAQ 16(SI), SI multiply: - POLY1305_MUL(R8, R9, R10, R11, R12, BX, CX, R13, R14) - SUBQ $16, R15 - CMPQ R15, $16 - JAE loop + MOVQ R11, AX + MULQ R8 + MOVQ AX, BX + MOVQ DX, CX + MOVQ R11, AX + MULQ R9 + ADDQ AX, CX + ADCQ $0x00, DX + MOVQ R11, R13 + IMULQ R10, R13 + ADDQ DX, R13 + MOVQ R12, AX + MULQ R8 + ADDQ AX, CX + ADCQ $0x00, DX + MOVQ DX, R8 + MOVQ R12, R14 + IMULQ R10, R14 + MOVQ R12, AX + MULQ R9 + ADDQ AX, R13 + ADCQ DX, R14 + ADDQ R8, R13 + ADCQ $0x00, R14 + MOVQ BX, R8 + MOVQ CX, R9 + MOVQ R13, R10 + ANDQ $0x03, R10 + MOVQ R13, BX + ANDQ $-4, BX + ADDQ BX, R8 + ADCQ R14, R9 + ADCQ $0x00, R10 + SHRQ $0x02, R14, R13 + SHRQ $0x02, R14 + ADDQ R13, R8 + ADCQ R14, R9 + ADCQ $0x00, R10 + SUBQ $0x10, R15 + CMPQ R15, $0x10 + JAE loop bytes_between_0_and_15: TESTQ R15, R15 JZ done - MOVQ $1, BX + MOVQ $0x00000001, BX XORQ CX, CX XORQ R13, R13 ADDQ R15, SI flush_buffer: - SHLQ $8, BX, CX - SHLQ $8, BX + SHLQ $0x08, BX, CX + SHLQ $0x08, BX MOVB -1(SI), R13 XORQ R13, BX DECQ SI DECQ R15 JNZ flush_buffer - ADDQ BX, R8 ADCQ CX, R9 - ADCQ $0, R10 - MOVQ $16, R15 + ADCQ $0x00, R10 + MOVQ $0x00000010, R15 JMP multiply done: - MOVQ R8, 0(DI) + MOVQ R8, (DI) MOVQ R9, 8(DI) MOVQ R10, 16(DI) RET diff --git a/vendor/golang.org/x/crypto/nacl/box/box.go b/vendor/golang.org/x/crypto/nacl/box/box.go index 7f3b830ee..357bdc773 100644 --- a/vendor/golang.org/x/crypto/nacl/box/box.go +++ b/vendor/golang.org/x/crypto/nacl/box/box.go @@ -35,7 +35,7 @@ Anonymous sealing/opening is an extension of NaCl defined by and interoperable with libsodium: https://libsodium.gitbook.io/doc/public-key_cryptography/sealed_boxes. */ -package box // import "golang.org/x/crypto/nacl/box" +package box import ( cryptorand "crypto/rand" diff --git a/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go b/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go index f3c3242a0..1fe600ad0 100644 --- a/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go +++ b/vendor/golang.org/x/crypto/nacl/secretbox/secretbox.go @@ -32,7 +32,7 @@ chunk size. This package is interoperable with NaCl: https://nacl.cr.yp.to/secretbox.html. */ -package secretbox // import "golang.org/x/crypto/nacl/secretbox" +package secretbox import ( "golang.org/x/crypto/internal/alias" diff --git a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go index 904b57e01..28cd99c7f 100644 --- a/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go +++ b/vendor/golang.org/x/crypto/pbkdf2/pbkdf2.go @@ -16,7 +16,7 @@ Hash Functions SHA-1, SHA-224, SHA-256, SHA-384 and SHA-512 for HMAC. To choose, you can pass the `New` functions from the different SHA packages to pbkdf2.Key. */ -package pbkdf2 // import "golang.org/x/crypto/pbkdf2" +package pbkdf2 import ( "crypto/hmac" diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go b/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go index 3fd05b275..3685b3445 100644 --- a/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go +++ b/vendor/golang.org/x/crypto/salsa20/salsa/hsalsa20.go @@ -3,7 +3,7 @@ // license that can be found in the LICENSE file. // Package salsa provides low-level access to functions in the Salsa family. -package salsa // import "golang.org/x/crypto/salsa20/salsa" +package salsa import "math/bits" diff --git a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s index fcce0234b..3883e0ec2 100644 --- a/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s +++ b/vendor/golang.org/x/crypto/salsa20/salsa/salsa20_amd64.s @@ -1,880 +1,880 @@ -// Copyright 2012 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. +// Code generated by command: go run salsa20_amd64_asm.go -out ../salsa20_amd64.s -pkg salsa. DO NOT EDIT. //go:build amd64 && !purego && gc -// This code was translated into a form compatible with 6a from the public -// domain sources in SUPERCOP: https://bench.cr.yp.to/supercop.html +// func salsa2020XORKeyStream(out *byte, in *byte, n uint64, nonce *byte, key *byte) +// Requires: SSE2 +TEXT ·salsa2020XORKeyStream(SB), $456-40 + // This needs up to 64 bytes at 360(R12); hence the non-obvious frame size. + MOVQ out+0(FP), DI + MOVQ in+8(FP), SI + MOVQ n+16(FP), DX + MOVQ nonce+24(FP), CX + MOVQ key+32(FP), R8 + MOVQ SP, R12 + ADDQ $0x1f, R12 + ANDQ $-32, R12 + MOVQ DX, R9 + MOVQ CX, DX + MOVQ R8, R10 + CMPQ R9, $0x00 + JBE DONE + MOVL 20(R10), CX + MOVL (R10), R8 + MOVL (DX), AX + MOVL 16(R10), R11 + MOVL CX, (R12) + MOVL R8, 4(R12) + MOVL AX, 8(R12) + MOVL R11, 12(R12) + MOVL 8(DX), CX + MOVL 24(R10), R8 + MOVL 4(R10), AX + MOVL 4(DX), R11 + MOVL CX, 16(R12) + MOVL R8, 20(R12) + MOVL AX, 24(R12) + MOVL R11, 28(R12) + MOVL 12(DX), CX + MOVL 12(R10), DX + MOVL 28(R10), R8 + MOVL 8(R10), AX + MOVL DX, 32(R12) + MOVL CX, 36(R12) + MOVL R8, 40(R12) + MOVL AX, 44(R12) + MOVQ $0x61707865, DX + MOVQ $0x3320646e, CX + MOVQ $0x79622d32, R8 + MOVQ $0x6b206574, AX + MOVL DX, 48(R12) + MOVL CX, 52(R12) + MOVL R8, 56(R12) + MOVL AX, 60(R12) + CMPQ R9, $0x00000100 + JB BYTESBETWEEN1AND255 + MOVOA 48(R12), X0 + PSHUFL $0x55, X0, X1 + PSHUFL $0xaa, X0, X2 + PSHUFL $0xff, X0, X3 + PSHUFL $0x00, X0, X0 + MOVOA X1, 64(R12) + MOVOA X2, 80(R12) + MOVOA X3, 96(R12) + MOVOA X0, 112(R12) + MOVOA (R12), X0 + PSHUFL $0xaa, X0, X1 + PSHUFL $0xff, X0, X2 + PSHUFL $0x00, X0, X3 + PSHUFL $0x55, X0, X0 + MOVOA X1, 128(R12) + MOVOA X2, 144(R12) + MOVOA X3, 160(R12) + MOVOA X0, 176(R12) + MOVOA 16(R12), X0 + PSHUFL $0xff, X0, X1 + PSHUFL $0x55, X0, X2 + PSHUFL $0xaa, X0, X0 + MOVOA X1, 192(R12) + MOVOA X2, 208(R12) + MOVOA X0, 224(R12) + MOVOA 32(R12), X0 + PSHUFL $0x00, X0, X1 + PSHUFL $0xaa, X0, X2 + PSHUFL $0xff, X0, X0 + MOVOA X1, 240(R12) + MOVOA X2, 256(R12) + MOVOA X0, 272(R12) -// func salsa2020XORKeyStream(out, in *byte, n uint64, nonce, key *byte) -// This needs up to 64 bytes at 360(R12); hence the non-obvious frame size. -TEXT ·salsa2020XORKeyStream(SB),0,$456-40 // frame = 424 + 32 byte alignment - MOVQ out+0(FP),DI - MOVQ in+8(FP),SI - MOVQ n+16(FP),DX - MOVQ nonce+24(FP),CX - MOVQ key+32(FP),R8 +BYTESATLEAST256: + MOVL 16(R12), DX + MOVL 36(R12), CX + MOVL DX, 288(R12) + MOVL CX, 304(R12) + SHLQ $0x20, CX + ADDQ CX, DX + ADDQ $0x01, DX + MOVQ DX, CX + SHRQ $0x20, CX + MOVL DX, 292(R12) + MOVL CX, 308(R12) + ADDQ $0x01, DX + MOVQ DX, CX + SHRQ $0x20, CX + MOVL DX, 296(R12) + MOVL CX, 312(R12) + ADDQ $0x01, DX + MOVQ DX, CX + SHRQ $0x20, CX + MOVL DX, 300(R12) + MOVL CX, 316(R12) + ADDQ $0x01, DX + MOVQ DX, CX + SHRQ $0x20, CX + MOVL DX, 16(R12) + MOVL CX, 36(R12) + MOVQ R9, 352(R12) + MOVQ $0x00000014, DX + MOVOA 64(R12), X0 + MOVOA 80(R12), X1 + MOVOA 96(R12), X2 + MOVOA 256(R12), X3 + MOVOA 272(R12), X4 + MOVOA 128(R12), X5 + MOVOA 144(R12), X6 + MOVOA 176(R12), X7 + MOVOA 192(R12), X8 + MOVOA 208(R12), X9 + MOVOA 224(R12), X10 + MOVOA 304(R12), X11 + MOVOA 112(R12), X12 + MOVOA 160(R12), X13 + MOVOA 240(R12), X14 + MOVOA 288(R12), X15 - MOVQ SP,R12 - ADDQ $31, R12 - ANDQ $~31, R12 +MAINLOOP1: + MOVOA X1, 320(R12) + MOVOA X2, 336(R12) + MOVOA X13, X1 + PADDL X12, X1 + MOVOA X1, X2 + PSLLL $0x07, X1 + PXOR X1, X14 + PSRLL $0x19, X2 + PXOR X2, X14 + MOVOA X7, X1 + PADDL X0, X1 + MOVOA X1, X2 + PSLLL $0x07, X1 + PXOR X1, X11 + PSRLL $0x19, X2 + PXOR X2, X11 + MOVOA X12, X1 + PADDL X14, X1 + MOVOA X1, X2 + PSLLL $0x09, X1 + PXOR X1, X15 + PSRLL $0x17, X2 + PXOR X2, X15 + MOVOA X0, X1 + PADDL X11, X1 + MOVOA X1, X2 + PSLLL $0x09, X1 + PXOR X1, X9 + PSRLL $0x17, X2 + PXOR X2, X9 + MOVOA X14, X1 + PADDL X15, X1 + MOVOA X1, X2 + PSLLL $0x0d, X1 + PXOR X1, X13 + PSRLL $0x13, X2 + PXOR X2, X13 + MOVOA X11, X1 + PADDL X9, X1 + MOVOA X1, X2 + PSLLL $0x0d, X1 + PXOR X1, X7 + PSRLL $0x13, X2 + PXOR X2, X7 + MOVOA X15, X1 + PADDL X13, X1 + MOVOA X1, X2 + PSLLL $0x12, X1 + PXOR X1, X12 + PSRLL $0x0e, X2 + PXOR X2, X12 + MOVOA 320(R12), X1 + MOVOA X12, 320(R12) + MOVOA X9, X2 + PADDL X7, X2 + MOVOA X2, X12 + PSLLL $0x12, X2 + PXOR X2, X0 + PSRLL $0x0e, X12 + PXOR X12, X0 + MOVOA X5, X2 + PADDL X1, X2 + MOVOA X2, X12 + PSLLL $0x07, X2 + PXOR X2, X3 + PSRLL $0x19, X12 + PXOR X12, X3 + MOVOA 336(R12), X2 + MOVOA X0, 336(R12) + MOVOA X6, X0 + PADDL X2, X0 + MOVOA X0, X12 + PSLLL $0x07, X0 + PXOR X0, X4 + PSRLL $0x19, X12 + PXOR X12, X4 + MOVOA X1, X0 + PADDL X3, X0 + MOVOA X0, X12 + PSLLL $0x09, X0 + PXOR X0, X10 + PSRLL $0x17, X12 + PXOR X12, X10 + MOVOA X2, X0 + PADDL X4, X0 + MOVOA X0, X12 + PSLLL $0x09, X0 + PXOR X0, X8 + PSRLL $0x17, X12 + PXOR X12, X8 + MOVOA X3, X0 + PADDL X10, X0 + MOVOA X0, X12 + PSLLL $0x0d, X0 + PXOR X0, X5 + PSRLL $0x13, X12 + PXOR X12, X5 + MOVOA X4, X0 + PADDL X8, X0 + MOVOA X0, X12 + PSLLL $0x0d, X0 + PXOR X0, X6 + PSRLL $0x13, X12 + PXOR X12, X6 + MOVOA X10, X0 + PADDL X5, X0 + MOVOA X0, X12 + PSLLL $0x12, X0 + PXOR X0, X1 + PSRLL $0x0e, X12 + PXOR X12, X1 + MOVOA 320(R12), X0 + MOVOA X1, 320(R12) + MOVOA X4, X1 + PADDL X0, X1 + MOVOA X1, X12 + PSLLL $0x07, X1 + PXOR X1, X7 + PSRLL $0x19, X12 + PXOR X12, X7 + MOVOA X8, X1 + PADDL X6, X1 + MOVOA X1, X12 + PSLLL $0x12, X1 + PXOR X1, X2 + PSRLL $0x0e, X12 + PXOR X12, X2 + MOVOA 336(R12), X12 + MOVOA X2, 336(R12) + MOVOA X14, X1 + PADDL X12, X1 + MOVOA X1, X2 + PSLLL $0x07, X1 + PXOR X1, X5 + PSRLL $0x19, X2 + PXOR X2, X5 + MOVOA X0, X1 + PADDL X7, X1 + MOVOA X1, X2 + PSLLL $0x09, X1 + PXOR X1, X10 + PSRLL $0x17, X2 + PXOR X2, X10 + MOVOA X12, X1 + PADDL X5, X1 + MOVOA X1, X2 + PSLLL $0x09, X1 + PXOR X1, X8 + PSRLL $0x17, X2 + PXOR X2, X8 + MOVOA X7, X1 + PADDL X10, X1 + MOVOA X1, X2 + PSLLL $0x0d, X1 + PXOR X1, X4 + PSRLL $0x13, X2 + PXOR X2, X4 + MOVOA X5, X1 + PADDL X8, X1 + MOVOA X1, X2 + PSLLL $0x0d, X1 + PXOR X1, X14 + PSRLL $0x13, X2 + PXOR X2, X14 + MOVOA X10, X1 + PADDL X4, X1 + MOVOA X1, X2 + PSLLL $0x12, X1 + PXOR X1, X0 + PSRLL $0x0e, X2 + PXOR X2, X0 + MOVOA 320(R12), X1 + MOVOA X0, 320(R12) + MOVOA X8, X0 + PADDL X14, X0 + MOVOA X0, X2 + PSLLL $0x12, X0 + PXOR X0, X12 + PSRLL $0x0e, X2 + PXOR X2, X12 + MOVOA X11, X0 + PADDL X1, X0 + MOVOA X0, X2 + PSLLL $0x07, X0 + PXOR X0, X6 + PSRLL $0x19, X2 + PXOR X2, X6 + MOVOA 336(R12), X2 + MOVOA X12, 336(R12) + MOVOA X3, X0 + PADDL X2, X0 + MOVOA X0, X12 + PSLLL $0x07, X0 + PXOR X0, X13 + PSRLL $0x19, X12 + PXOR X12, X13 + MOVOA X1, X0 + PADDL X6, X0 + MOVOA X0, X12 + PSLLL $0x09, X0 + PXOR X0, X15 + PSRLL $0x17, X12 + PXOR X12, X15 + MOVOA X2, X0 + PADDL X13, X0 + MOVOA X0, X12 + PSLLL $0x09, X0 + PXOR X0, X9 + PSRLL $0x17, X12 + PXOR X12, X9 + MOVOA X6, X0 + PADDL X15, X0 + MOVOA X0, X12 + PSLLL $0x0d, X0 + PXOR X0, X11 + PSRLL $0x13, X12 + PXOR X12, X11 + MOVOA X13, X0 + PADDL X9, X0 + MOVOA X0, X12 + PSLLL $0x0d, X0 + PXOR X0, X3 + PSRLL $0x13, X12 + PXOR X12, X3 + MOVOA X15, X0 + PADDL X11, X0 + MOVOA X0, X12 + PSLLL $0x12, X0 + PXOR X0, X1 + PSRLL $0x0e, X12 + PXOR X12, X1 + MOVOA X9, X0 + PADDL X3, X0 + MOVOA X0, X12 + PSLLL $0x12, X0 + PXOR X0, X2 + PSRLL $0x0e, X12 + PXOR X12, X2 + MOVOA 320(R12), X12 + MOVOA 336(R12), X0 + SUBQ $0x02, DX + JA MAINLOOP1 + PADDL 112(R12), X12 + PADDL 176(R12), X7 + PADDL 224(R12), X10 + PADDL 272(R12), X4 + MOVD X12, DX + MOVD X7, CX + MOVD X10, R8 + MOVD X4, R9 + PSHUFL $0x39, X12, X12 + PSHUFL $0x39, X7, X7 + PSHUFL $0x39, X10, X10 + PSHUFL $0x39, X4, X4 + XORL (SI), DX + XORL 4(SI), CX + XORL 8(SI), R8 + XORL 12(SI), R9 + MOVL DX, (DI) + MOVL CX, 4(DI) + MOVL R8, 8(DI) + MOVL R9, 12(DI) + MOVD X12, DX + MOVD X7, CX + MOVD X10, R8 + MOVD X4, R9 + PSHUFL $0x39, X12, X12 + PSHUFL $0x39, X7, X7 + PSHUFL $0x39, X10, X10 + PSHUFL $0x39, X4, X4 + XORL 64(SI), DX + XORL 68(SI), CX + XORL 72(SI), R8 + XORL 76(SI), R9 + MOVL DX, 64(DI) + MOVL CX, 68(DI) + MOVL R8, 72(DI) + MOVL R9, 76(DI) + MOVD X12, DX + MOVD X7, CX + MOVD X10, R8 + MOVD X4, R9 + PSHUFL $0x39, X12, X12 + PSHUFL $0x39, X7, X7 + PSHUFL $0x39, X10, X10 + PSHUFL $0x39, X4, X4 + XORL 128(SI), DX + XORL 132(SI), CX + XORL 136(SI), R8 + XORL 140(SI), R9 + MOVL DX, 128(DI) + MOVL CX, 132(DI) + MOVL R8, 136(DI) + MOVL R9, 140(DI) + MOVD X12, DX + MOVD X7, CX + MOVD X10, R8 + MOVD X4, R9 + XORL 192(SI), DX + XORL 196(SI), CX + XORL 200(SI), R8 + XORL 204(SI), R9 + MOVL DX, 192(DI) + MOVL CX, 196(DI) + MOVL R8, 200(DI) + MOVL R9, 204(DI) + PADDL 240(R12), X14 + PADDL 64(R12), X0 + PADDL 128(R12), X5 + PADDL 192(R12), X8 + MOVD X14, DX + MOVD X0, CX + MOVD X5, R8 + MOVD X8, R9 + PSHUFL $0x39, X14, X14 + PSHUFL $0x39, X0, X0 + PSHUFL $0x39, X5, X5 + PSHUFL $0x39, X8, X8 + XORL 16(SI), DX + XORL 20(SI), CX + XORL 24(SI), R8 + XORL 28(SI), R9 + MOVL DX, 16(DI) + MOVL CX, 20(DI) + MOVL R8, 24(DI) + MOVL R9, 28(DI) + MOVD X14, DX + MOVD X0, CX + MOVD X5, R8 + MOVD X8, R9 + PSHUFL $0x39, X14, X14 + PSHUFL $0x39, X0, X0 + PSHUFL $0x39, X5, X5 + PSHUFL $0x39, X8, X8 + XORL 80(SI), DX + XORL 84(SI), CX + XORL 88(SI), R8 + XORL 92(SI), R9 + MOVL DX, 80(DI) + MOVL CX, 84(DI) + MOVL R8, 88(DI) + MOVL R9, 92(DI) + MOVD X14, DX + MOVD X0, CX + MOVD X5, R8 + MOVD X8, R9 + PSHUFL $0x39, X14, X14 + PSHUFL $0x39, X0, X0 + PSHUFL $0x39, X5, X5 + PSHUFL $0x39, X8, X8 + XORL 144(SI), DX + XORL 148(SI), CX + XORL 152(SI), R8 + XORL 156(SI), R9 + MOVL DX, 144(DI) + MOVL CX, 148(DI) + MOVL R8, 152(DI) + MOVL R9, 156(DI) + MOVD X14, DX + MOVD X0, CX + MOVD X5, R8 + MOVD X8, R9 + XORL 208(SI), DX + XORL 212(SI), CX + XORL 216(SI), R8 + XORL 220(SI), R9 + MOVL DX, 208(DI) + MOVL CX, 212(DI) + MOVL R8, 216(DI) + MOVL R9, 220(DI) + PADDL 288(R12), X15 + PADDL 304(R12), X11 + PADDL 80(R12), X1 + PADDL 144(R12), X6 + MOVD X15, DX + MOVD X11, CX + MOVD X1, R8 + MOVD X6, R9 + PSHUFL $0x39, X15, X15 + PSHUFL $0x39, X11, X11 + PSHUFL $0x39, X1, X1 + PSHUFL $0x39, X6, X6 + XORL 32(SI), DX + XORL 36(SI), CX + XORL 40(SI), R8 + XORL 44(SI), R9 + MOVL DX, 32(DI) + MOVL CX, 36(DI) + MOVL R8, 40(DI) + MOVL R9, 44(DI) + MOVD X15, DX + MOVD X11, CX + MOVD X1, R8 + MOVD X6, R9 + PSHUFL $0x39, X15, X15 + PSHUFL $0x39, X11, X11 + PSHUFL $0x39, X1, X1 + PSHUFL $0x39, X6, X6 + XORL 96(SI), DX + XORL 100(SI), CX + XORL 104(SI), R8 + XORL 108(SI), R9 + MOVL DX, 96(DI) + MOVL CX, 100(DI) + MOVL R8, 104(DI) + MOVL R9, 108(DI) + MOVD X15, DX + MOVD X11, CX + MOVD X1, R8 + MOVD X6, R9 + PSHUFL $0x39, X15, X15 + PSHUFL $0x39, X11, X11 + PSHUFL $0x39, X1, X1 + PSHUFL $0x39, X6, X6 + XORL 160(SI), DX + XORL 164(SI), CX + XORL 168(SI), R8 + XORL 172(SI), R9 + MOVL DX, 160(DI) + MOVL CX, 164(DI) + MOVL R8, 168(DI) + MOVL R9, 172(DI) + MOVD X15, DX + MOVD X11, CX + MOVD X1, R8 + MOVD X6, R9 + XORL 224(SI), DX + XORL 228(SI), CX + XORL 232(SI), R8 + XORL 236(SI), R9 + MOVL DX, 224(DI) + MOVL CX, 228(DI) + MOVL R8, 232(DI) + MOVL R9, 236(DI) + PADDL 160(R12), X13 + PADDL 208(R12), X9 + PADDL 256(R12), X3 + PADDL 96(R12), X2 + MOVD X13, DX + MOVD X9, CX + MOVD X3, R8 + MOVD X2, R9 + PSHUFL $0x39, X13, X13 + PSHUFL $0x39, X9, X9 + PSHUFL $0x39, X3, X3 + PSHUFL $0x39, X2, X2 + XORL 48(SI), DX + XORL 52(SI), CX + XORL 56(SI), R8 + XORL 60(SI), R9 + MOVL DX, 48(DI) + MOVL CX, 52(DI) + MOVL R8, 56(DI) + MOVL R9, 60(DI) + MOVD X13, DX + MOVD X9, CX + MOVD X3, R8 + MOVD X2, R9 + PSHUFL $0x39, X13, X13 + PSHUFL $0x39, X9, X9 + PSHUFL $0x39, X3, X3 + PSHUFL $0x39, X2, X2 + XORL 112(SI), DX + XORL 116(SI), CX + XORL 120(SI), R8 + XORL 124(SI), R9 + MOVL DX, 112(DI) + MOVL CX, 116(DI) + MOVL R8, 120(DI) + MOVL R9, 124(DI) + MOVD X13, DX + MOVD X9, CX + MOVD X3, R8 + MOVD X2, R9 + PSHUFL $0x39, X13, X13 + PSHUFL $0x39, X9, X9 + PSHUFL $0x39, X3, X3 + PSHUFL $0x39, X2, X2 + XORL 176(SI), DX + XORL 180(SI), CX + XORL 184(SI), R8 + XORL 188(SI), R9 + MOVL DX, 176(DI) + MOVL CX, 180(DI) + MOVL R8, 184(DI) + MOVL R9, 188(DI) + MOVD X13, DX + MOVD X9, CX + MOVD X3, R8 + MOVD X2, R9 + XORL 240(SI), DX + XORL 244(SI), CX + XORL 248(SI), R8 + XORL 252(SI), R9 + MOVL DX, 240(DI) + MOVL CX, 244(DI) + MOVL R8, 248(DI) + MOVL R9, 252(DI) + MOVQ 352(R12), R9 + SUBQ $0x00000100, R9 + ADDQ $0x00000100, SI + ADDQ $0x00000100, DI + CMPQ R9, $0x00000100 + JAE BYTESATLEAST256 + CMPQ R9, $0x00 + JBE DONE - MOVQ DX,R9 - MOVQ CX,DX - MOVQ R8,R10 - CMPQ R9,$0 - JBE DONE - START: - MOVL 20(R10),CX - MOVL 0(R10),R8 - MOVL 0(DX),AX - MOVL 16(R10),R11 - MOVL CX,0(R12) - MOVL R8, 4 (R12) - MOVL AX, 8 (R12) - MOVL R11, 12 (R12) - MOVL 8(DX),CX - MOVL 24(R10),R8 - MOVL 4(R10),AX - MOVL 4(DX),R11 - MOVL CX,16(R12) - MOVL R8, 20 (R12) - MOVL AX, 24 (R12) - MOVL R11, 28 (R12) - MOVL 12(DX),CX - MOVL 12(R10),DX - MOVL 28(R10),R8 - MOVL 8(R10),AX - MOVL DX,32(R12) - MOVL CX, 36 (R12) - MOVL R8, 40 (R12) - MOVL AX, 44 (R12) - MOVQ $1634760805,DX - MOVQ $857760878,CX - MOVQ $2036477234,R8 - MOVQ $1797285236,AX - MOVL DX,48(R12) - MOVL CX, 52 (R12) - MOVL R8, 56 (R12) - MOVL AX, 60 (R12) - CMPQ R9,$256 - JB BYTESBETWEEN1AND255 - MOVOA 48(R12),X0 - PSHUFL $0X55,X0,X1 - PSHUFL $0XAA,X0,X2 - PSHUFL $0XFF,X0,X3 - PSHUFL $0X00,X0,X0 - MOVOA X1,64(R12) - MOVOA X2,80(R12) - MOVOA X3,96(R12) - MOVOA X0,112(R12) - MOVOA 0(R12),X0 - PSHUFL $0XAA,X0,X1 - PSHUFL $0XFF,X0,X2 - PSHUFL $0X00,X0,X3 - PSHUFL $0X55,X0,X0 - MOVOA X1,128(R12) - MOVOA X2,144(R12) - MOVOA X3,160(R12) - MOVOA X0,176(R12) - MOVOA 16(R12),X0 - PSHUFL $0XFF,X0,X1 - PSHUFL $0X55,X0,X2 - PSHUFL $0XAA,X0,X0 - MOVOA X1,192(R12) - MOVOA X2,208(R12) - MOVOA X0,224(R12) - MOVOA 32(R12),X0 - PSHUFL $0X00,X0,X1 - PSHUFL $0XAA,X0,X2 - PSHUFL $0XFF,X0,X0 - MOVOA X1,240(R12) - MOVOA X2,256(R12) - MOVOA X0,272(R12) - BYTESATLEAST256: - MOVL 16(R12),DX - MOVL 36 (R12),CX - MOVL DX,288(R12) - MOVL CX,304(R12) - SHLQ $32,CX - ADDQ CX,DX - ADDQ $1,DX - MOVQ DX,CX - SHRQ $32,CX - MOVL DX, 292 (R12) - MOVL CX, 308 (R12) - ADDQ $1,DX - MOVQ DX,CX - SHRQ $32,CX - MOVL DX, 296 (R12) - MOVL CX, 312 (R12) - ADDQ $1,DX - MOVQ DX,CX - SHRQ $32,CX - MOVL DX, 300 (R12) - MOVL CX, 316 (R12) - ADDQ $1,DX - MOVQ DX,CX - SHRQ $32,CX - MOVL DX,16(R12) - MOVL CX, 36 (R12) - MOVQ R9,352(R12) - MOVQ $20,DX - MOVOA 64(R12),X0 - MOVOA 80(R12),X1 - MOVOA 96(R12),X2 - MOVOA 256(R12),X3 - MOVOA 272(R12),X4 - MOVOA 128(R12),X5 - MOVOA 144(R12),X6 - MOVOA 176(R12),X7 - MOVOA 192(R12),X8 - MOVOA 208(R12),X9 - MOVOA 224(R12),X10 - MOVOA 304(R12),X11 - MOVOA 112(R12),X12 - MOVOA 160(R12),X13 - MOVOA 240(R12),X14 - MOVOA 288(R12),X15 - MAINLOOP1: - MOVOA X1,320(R12) - MOVOA X2,336(R12) - MOVOA X13,X1 - PADDL X12,X1 - MOVOA X1,X2 - PSLLL $7,X1 - PXOR X1,X14 - PSRLL $25,X2 - PXOR X2,X14 - MOVOA X7,X1 - PADDL X0,X1 - MOVOA X1,X2 - PSLLL $7,X1 - PXOR X1,X11 - PSRLL $25,X2 - PXOR X2,X11 - MOVOA X12,X1 - PADDL X14,X1 - MOVOA X1,X2 - PSLLL $9,X1 - PXOR X1,X15 - PSRLL $23,X2 - PXOR X2,X15 - MOVOA X0,X1 - PADDL X11,X1 - MOVOA X1,X2 - PSLLL $9,X1 - PXOR X1,X9 - PSRLL $23,X2 - PXOR X2,X9 - MOVOA X14,X1 - PADDL X15,X1 - MOVOA X1,X2 - PSLLL $13,X1 - PXOR X1,X13 - PSRLL $19,X2 - PXOR X2,X13 - MOVOA X11,X1 - PADDL X9,X1 - MOVOA X1,X2 - PSLLL $13,X1 - PXOR X1,X7 - PSRLL $19,X2 - PXOR X2,X7 - MOVOA X15,X1 - PADDL X13,X1 - MOVOA X1,X2 - PSLLL $18,X1 - PXOR X1,X12 - PSRLL $14,X2 - PXOR X2,X12 - MOVOA 320(R12),X1 - MOVOA X12,320(R12) - MOVOA X9,X2 - PADDL X7,X2 - MOVOA X2,X12 - PSLLL $18,X2 - PXOR X2,X0 - PSRLL $14,X12 - PXOR X12,X0 - MOVOA X5,X2 - PADDL X1,X2 - MOVOA X2,X12 - PSLLL $7,X2 - PXOR X2,X3 - PSRLL $25,X12 - PXOR X12,X3 - MOVOA 336(R12),X2 - MOVOA X0,336(R12) - MOVOA X6,X0 - PADDL X2,X0 - MOVOA X0,X12 - PSLLL $7,X0 - PXOR X0,X4 - PSRLL $25,X12 - PXOR X12,X4 - MOVOA X1,X0 - PADDL X3,X0 - MOVOA X0,X12 - PSLLL $9,X0 - PXOR X0,X10 - PSRLL $23,X12 - PXOR X12,X10 - MOVOA X2,X0 - PADDL X4,X0 - MOVOA X0,X12 - PSLLL $9,X0 - PXOR X0,X8 - PSRLL $23,X12 - PXOR X12,X8 - MOVOA X3,X0 - PADDL X10,X0 - MOVOA X0,X12 - PSLLL $13,X0 - PXOR X0,X5 - PSRLL $19,X12 - PXOR X12,X5 - MOVOA X4,X0 - PADDL X8,X0 - MOVOA X0,X12 - PSLLL $13,X0 - PXOR X0,X6 - PSRLL $19,X12 - PXOR X12,X6 - MOVOA X10,X0 - PADDL X5,X0 - MOVOA X0,X12 - PSLLL $18,X0 - PXOR X0,X1 - PSRLL $14,X12 - PXOR X12,X1 - MOVOA 320(R12),X0 - MOVOA X1,320(R12) - MOVOA X4,X1 - PADDL X0,X1 - MOVOA X1,X12 - PSLLL $7,X1 - PXOR X1,X7 - PSRLL $25,X12 - PXOR X12,X7 - MOVOA X8,X1 - PADDL X6,X1 - MOVOA X1,X12 - PSLLL $18,X1 - PXOR X1,X2 - PSRLL $14,X12 - PXOR X12,X2 - MOVOA 336(R12),X12 - MOVOA X2,336(R12) - MOVOA X14,X1 - PADDL X12,X1 - MOVOA X1,X2 - PSLLL $7,X1 - PXOR X1,X5 - PSRLL $25,X2 - PXOR X2,X5 - MOVOA X0,X1 - PADDL X7,X1 - MOVOA X1,X2 - PSLLL $9,X1 - PXOR X1,X10 - PSRLL $23,X2 - PXOR X2,X10 - MOVOA X12,X1 - PADDL X5,X1 - MOVOA X1,X2 - PSLLL $9,X1 - PXOR X1,X8 - PSRLL $23,X2 - PXOR X2,X8 - MOVOA X7,X1 - PADDL X10,X1 - MOVOA X1,X2 - PSLLL $13,X1 - PXOR X1,X4 - PSRLL $19,X2 - PXOR X2,X4 - MOVOA X5,X1 - PADDL X8,X1 - MOVOA X1,X2 - PSLLL $13,X1 - PXOR X1,X14 - PSRLL $19,X2 - PXOR X2,X14 - MOVOA X10,X1 - PADDL X4,X1 - MOVOA X1,X2 - PSLLL $18,X1 - PXOR X1,X0 - PSRLL $14,X2 - PXOR X2,X0 - MOVOA 320(R12),X1 - MOVOA X0,320(R12) - MOVOA X8,X0 - PADDL X14,X0 - MOVOA X0,X2 - PSLLL $18,X0 - PXOR X0,X12 - PSRLL $14,X2 - PXOR X2,X12 - MOVOA X11,X0 - PADDL X1,X0 - MOVOA X0,X2 - PSLLL $7,X0 - PXOR X0,X6 - PSRLL $25,X2 - PXOR X2,X6 - MOVOA 336(R12),X2 - MOVOA X12,336(R12) - MOVOA X3,X0 - PADDL X2,X0 - MOVOA X0,X12 - PSLLL $7,X0 - PXOR X0,X13 - PSRLL $25,X12 - PXOR X12,X13 - MOVOA X1,X0 - PADDL X6,X0 - MOVOA X0,X12 - PSLLL $9,X0 - PXOR X0,X15 - PSRLL $23,X12 - PXOR X12,X15 - MOVOA X2,X0 - PADDL X13,X0 - MOVOA X0,X12 - PSLLL $9,X0 - PXOR X0,X9 - PSRLL $23,X12 - PXOR X12,X9 - MOVOA X6,X0 - PADDL X15,X0 - MOVOA X0,X12 - PSLLL $13,X0 - PXOR X0,X11 - PSRLL $19,X12 - PXOR X12,X11 - MOVOA X13,X0 - PADDL X9,X0 - MOVOA X0,X12 - PSLLL $13,X0 - PXOR X0,X3 - PSRLL $19,X12 - PXOR X12,X3 - MOVOA X15,X0 - PADDL X11,X0 - MOVOA X0,X12 - PSLLL $18,X0 - PXOR X0,X1 - PSRLL $14,X12 - PXOR X12,X1 - MOVOA X9,X0 - PADDL X3,X0 - MOVOA X0,X12 - PSLLL $18,X0 - PXOR X0,X2 - PSRLL $14,X12 - PXOR X12,X2 - MOVOA 320(R12),X12 - MOVOA 336(R12),X0 - SUBQ $2,DX - JA MAINLOOP1 - PADDL 112(R12),X12 - PADDL 176(R12),X7 - PADDL 224(R12),X10 - PADDL 272(R12),X4 - MOVD X12,DX - MOVD X7,CX - MOVD X10,R8 - MOVD X4,R9 - PSHUFL $0X39,X12,X12 - PSHUFL $0X39,X7,X7 - PSHUFL $0X39,X10,X10 - PSHUFL $0X39,X4,X4 - XORL 0(SI),DX - XORL 4(SI),CX - XORL 8(SI),R8 - XORL 12(SI),R9 - MOVL DX,0(DI) - MOVL CX,4(DI) - MOVL R8,8(DI) - MOVL R9,12(DI) - MOVD X12,DX - MOVD X7,CX - MOVD X10,R8 - MOVD X4,R9 - PSHUFL $0X39,X12,X12 - PSHUFL $0X39,X7,X7 - PSHUFL $0X39,X10,X10 - PSHUFL $0X39,X4,X4 - XORL 64(SI),DX - XORL 68(SI),CX - XORL 72(SI),R8 - XORL 76(SI),R9 - MOVL DX,64(DI) - MOVL CX,68(DI) - MOVL R8,72(DI) - MOVL R9,76(DI) - MOVD X12,DX - MOVD X7,CX - MOVD X10,R8 - MOVD X4,R9 - PSHUFL $0X39,X12,X12 - PSHUFL $0X39,X7,X7 - PSHUFL $0X39,X10,X10 - PSHUFL $0X39,X4,X4 - XORL 128(SI),DX - XORL 132(SI),CX - XORL 136(SI),R8 - XORL 140(SI),R9 - MOVL DX,128(DI) - MOVL CX,132(DI) - MOVL R8,136(DI) - MOVL R9,140(DI) - MOVD X12,DX - MOVD X7,CX - MOVD X10,R8 - MOVD X4,R9 - XORL 192(SI),DX - XORL 196(SI),CX - XORL 200(SI),R8 - XORL 204(SI),R9 - MOVL DX,192(DI) - MOVL CX,196(DI) - MOVL R8,200(DI) - MOVL R9,204(DI) - PADDL 240(R12),X14 - PADDL 64(R12),X0 - PADDL 128(R12),X5 - PADDL 192(R12),X8 - MOVD X14,DX - MOVD X0,CX - MOVD X5,R8 - MOVD X8,R9 - PSHUFL $0X39,X14,X14 - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X5,X5 - PSHUFL $0X39,X8,X8 - XORL 16(SI),DX - XORL 20(SI),CX - XORL 24(SI),R8 - XORL 28(SI),R9 - MOVL DX,16(DI) - MOVL CX,20(DI) - MOVL R8,24(DI) - MOVL R9,28(DI) - MOVD X14,DX - MOVD X0,CX - MOVD X5,R8 - MOVD X8,R9 - PSHUFL $0X39,X14,X14 - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X5,X5 - PSHUFL $0X39,X8,X8 - XORL 80(SI),DX - XORL 84(SI),CX - XORL 88(SI),R8 - XORL 92(SI),R9 - MOVL DX,80(DI) - MOVL CX,84(DI) - MOVL R8,88(DI) - MOVL R9,92(DI) - MOVD X14,DX - MOVD X0,CX - MOVD X5,R8 - MOVD X8,R9 - PSHUFL $0X39,X14,X14 - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X5,X5 - PSHUFL $0X39,X8,X8 - XORL 144(SI),DX - XORL 148(SI),CX - XORL 152(SI),R8 - XORL 156(SI),R9 - MOVL DX,144(DI) - MOVL CX,148(DI) - MOVL R8,152(DI) - MOVL R9,156(DI) - MOVD X14,DX - MOVD X0,CX - MOVD X5,R8 - MOVD X8,R9 - XORL 208(SI),DX - XORL 212(SI),CX - XORL 216(SI),R8 - XORL 220(SI),R9 - MOVL DX,208(DI) - MOVL CX,212(DI) - MOVL R8,216(DI) - MOVL R9,220(DI) - PADDL 288(R12),X15 - PADDL 304(R12),X11 - PADDL 80(R12),X1 - PADDL 144(R12),X6 - MOVD X15,DX - MOVD X11,CX - MOVD X1,R8 - MOVD X6,R9 - PSHUFL $0X39,X15,X15 - PSHUFL $0X39,X11,X11 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X6,X6 - XORL 32(SI),DX - XORL 36(SI),CX - XORL 40(SI),R8 - XORL 44(SI),R9 - MOVL DX,32(DI) - MOVL CX,36(DI) - MOVL R8,40(DI) - MOVL R9,44(DI) - MOVD X15,DX - MOVD X11,CX - MOVD X1,R8 - MOVD X6,R9 - PSHUFL $0X39,X15,X15 - PSHUFL $0X39,X11,X11 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X6,X6 - XORL 96(SI),DX - XORL 100(SI),CX - XORL 104(SI),R8 - XORL 108(SI),R9 - MOVL DX,96(DI) - MOVL CX,100(DI) - MOVL R8,104(DI) - MOVL R9,108(DI) - MOVD X15,DX - MOVD X11,CX - MOVD X1,R8 - MOVD X6,R9 - PSHUFL $0X39,X15,X15 - PSHUFL $0X39,X11,X11 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X6,X6 - XORL 160(SI),DX - XORL 164(SI),CX - XORL 168(SI),R8 - XORL 172(SI),R9 - MOVL DX,160(DI) - MOVL CX,164(DI) - MOVL R8,168(DI) - MOVL R9,172(DI) - MOVD X15,DX - MOVD X11,CX - MOVD X1,R8 - MOVD X6,R9 - XORL 224(SI),DX - XORL 228(SI),CX - XORL 232(SI),R8 - XORL 236(SI),R9 - MOVL DX,224(DI) - MOVL CX,228(DI) - MOVL R8,232(DI) - MOVL R9,236(DI) - PADDL 160(R12),X13 - PADDL 208(R12),X9 - PADDL 256(R12),X3 - PADDL 96(R12),X2 - MOVD X13,DX - MOVD X9,CX - MOVD X3,R8 - MOVD X2,R9 - PSHUFL $0X39,X13,X13 - PSHUFL $0X39,X9,X9 - PSHUFL $0X39,X3,X3 - PSHUFL $0X39,X2,X2 - XORL 48(SI),DX - XORL 52(SI),CX - XORL 56(SI),R8 - XORL 60(SI),R9 - MOVL DX,48(DI) - MOVL CX,52(DI) - MOVL R8,56(DI) - MOVL R9,60(DI) - MOVD X13,DX - MOVD X9,CX - MOVD X3,R8 - MOVD X2,R9 - PSHUFL $0X39,X13,X13 - PSHUFL $0X39,X9,X9 - PSHUFL $0X39,X3,X3 - PSHUFL $0X39,X2,X2 - XORL 112(SI),DX - XORL 116(SI),CX - XORL 120(SI),R8 - XORL 124(SI),R9 - MOVL DX,112(DI) - MOVL CX,116(DI) - MOVL R8,120(DI) - MOVL R9,124(DI) - MOVD X13,DX - MOVD X9,CX - MOVD X3,R8 - MOVD X2,R9 - PSHUFL $0X39,X13,X13 - PSHUFL $0X39,X9,X9 - PSHUFL $0X39,X3,X3 - PSHUFL $0X39,X2,X2 - XORL 176(SI),DX - XORL 180(SI),CX - XORL 184(SI),R8 - XORL 188(SI),R9 - MOVL DX,176(DI) - MOVL CX,180(DI) - MOVL R8,184(DI) - MOVL R9,188(DI) - MOVD X13,DX - MOVD X9,CX - MOVD X3,R8 - MOVD X2,R9 - XORL 240(SI),DX - XORL 244(SI),CX - XORL 248(SI),R8 - XORL 252(SI),R9 - MOVL DX,240(DI) - MOVL CX,244(DI) - MOVL R8,248(DI) - MOVL R9,252(DI) - MOVQ 352(R12),R9 - SUBQ $256,R9 - ADDQ $256,SI - ADDQ $256,DI - CMPQ R9,$256 - JAE BYTESATLEAST256 - CMPQ R9,$0 - JBE DONE - BYTESBETWEEN1AND255: - CMPQ R9,$64 - JAE NOCOPY - MOVQ DI,DX - LEAQ 360(R12),DI - MOVQ R9,CX +BYTESBETWEEN1AND255: + CMPQ R9, $0x40 + JAE NOCOPY + MOVQ DI, DX + LEAQ 360(R12), DI + MOVQ R9, CX REP; MOVSB - LEAQ 360(R12),DI - LEAQ 360(R12),SI - NOCOPY: - MOVQ R9,352(R12) - MOVOA 48(R12),X0 - MOVOA 0(R12),X1 - MOVOA 16(R12),X2 - MOVOA 32(R12),X3 - MOVOA X1,X4 - MOVQ $20,CX - MAINLOOP2: - PADDL X0,X4 - MOVOA X0,X5 - MOVOA X4,X6 - PSLLL $7,X4 - PSRLL $25,X6 - PXOR X4,X3 - PXOR X6,X3 - PADDL X3,X5 - MOVOA X3,X4 - MOVOA X5,X6 - PSLLL $9,X5 - PSRLL $23,X6 - PXOR X5,X2 - PSHUFL $0X93,X3,X3 - PXOR X6,X2 - PADDL X2,X4 - MOVOA X2,X5 - MOVOA X4,X6 - PSLLL $13,X4 - PSRLL $19,X6 - PXOR X4,X1 - PSHUFL $0X4E,X2,X2 - PXOR X6,X1 - PADDL X1,X5 - MOVOA X3,X4 - MOVOA X5,X6 - PSLLL $18,X5 - PSRLL $14,X6 - PXOR X5,X0 - PSHUFL $0X39,X1,X1 - PXOR X6,X0 - PADDL X0,X4 - MOVOA X0,X5 - MOVOA X4,X6 - PSLLL $7,X4 - PSRLL $25,X6 - PXOR X4,X1 - PXOR X6,X1 - PADDL X1,X5 - MOVOA X1,X4 - MOVOA X5,X6 - PSLLL $9,X5 - PSRLL $23,X6 - PXOR X5,X2 - PSHUFL $0X93,X1,X1 - PXOR X6,X2 - PADDL X2,X4 - MOVOA X2,X5 - MOVOA X4,X6 - PSLLL $13,X4 - PSRLL $19,X6 - PXOR X4,X3 - PSHUFL $0X4E,X2,X2 - PXOR X6,X3 - PADDL X3,X5 - MOVOA X1,X4 - MOVOA X5,X6 - PSLLL $18,X5 - PSRLL $14,X6 - PXOR X5,X0 - PSHUFL $0X39,X3,X3 - PXOR X6,X0 - PADDL X0,X4 - MOVOA X0,X5 - MOVOA X4,X6 - PSLLL $7,X4 - PSRLL $25,X6 - PXOR X4,X3 - PXOR X6,X3 - PADDL X3,X5 - MOVOA X3,X4 - MOVOA X5,X6 - PSLLL $9,X5 - PSRLL $23,X6 - PXOR X5,X2 - PSHUFL $0X93,X3,X3 - PXOR X6,X2 - PADDL X2,X4 - MOVOA X2,X5 - MOVOA X4,X6 - PSLLL $13,X4 - PSRLL $19,X6 - PXOR X4,X1 - PSHUFL $0X4E,X2,X2 - PXOR X6,X1 - PADDL X1,X5 - MOVOA X3,X4 - MOVOA X5,X6 - PSLLL $18,X5 - PSRLL $14,X6 - PXOR X5,X0 - PSHUFL $0X39,X1,X1 - PXOR X6,X0 - PADDL X0,X4 - MOVOA X0,X5 - MOVOA X4,X6 - PSLLL $7,X4 - PSRLL $25,X6 - PXOR X4,X1 - PXOR X6,X1 - PADDL X1,X5 - MOVOA X1,X4 - MOVOA X5,X6 - PSLLL $9,X5 - PSRLL $23,X6 - PXOR X5,X2 - PSHUFL $0X93,X1,X1 - PXOR X6,X2 - PADDL X2,X4 - MOVOA X2,X5 - MOVOA X4,X6 - PSLLL $13,X4 - PSRLL $19,X6 - PXOR X4,X3 - PSHUFL $0X4E,X2,X2 - PXOR X6,X3 - SUBQ $4,CX - PADDL X3,X5 - MOVOA X1,X4 - MOVOA X5,X6 - PSLLL $18,X5 - PXOR X7,X7 - PSRLL $14,X6 - PXOR X5,X0 - PSHUFL $0X39,X3,X3 - PXOR X6,X0 - JA MAINLOOP2 - PADDL 48(R12),X0 - PADDL 0(R12),X1 - PADDL 16(R12),X2 - PADDL 32(R12),X3 - MOVD X0,CX - MOVD X1,R8 - MOVD X2,R9 - MOVD X3,AX - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X2,X2 - PSHUFL $0X39,X3,X3 - XORL 0(SI),CX - XORL 48(SI),R8 - XORL 32(SI),R9 - XORL 16(SI),AX - MOVL CX,0(DI) - MOVL R8,48(DI) - MOVL R9,32(DI) - MOVL AX,16(DI) - MOVD X0,CX - MOVD X1,R8 - MOVD X2,R9 - MOVD X3,AX - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X2,X2 - PSHUFL $0X39,X3,X3 - XORL 20(SI),CX - XORL 4(SI),R8 - XORL 52(SI),R9 - XORL 36(SI),AX - MOVL CX,20(DI) - MOVL R8,4(DI) - MOVL R9,52(DI) - MOVL AX,36(DI) - MOVD X0,CX - MOVD X1,R8 - MOVD X2,R9 - MOVD X3,AX - PSHUFL $0X39,X0,X0 - PSHUFL $0X39,X1,X1 - PSHUFL $0X39,X2,X2 - PSHUFL $0X39,X3,X3 - XORL 40(SI),CX - XORL 24(SI),R8 - XORL 8(SI),R9 - XORL 56(SI),AX - MOVL CX,40(DI) - MOVL R8,24(DI) - MOVL R9,8(DI) - MOVL AX,56(DI) - MOVD X0,CX - MOVD X1,R8 - MOVD X2,R9 - MOVD X3,AX - XORL 60(SI),CX - XORL 44(SI),R8 - XORL 28(SI),R9 - XORL 12(SI),AX - MOVL CX,60(DI) - MOVL R8,44(DI) - MOVL R9,28(DI) - MOVL AX,12(DI) - MOVQ 352(R12),R9 - MOVL 16(R12),CX - MOVL 36 (R12),R8 - ADDQ $1,CX - SHLQ $32,R8 - ADDQ R8,CX - MOVQ CX,R8 - SHRQ $32,R8 - MOVL CX,16(R12) - MOVL R8, 36 (R12) - CMPQ R9,$64 - JA BYTESATLEAST65 - JAE BYTESATLEAST64 - MOVQ DI,SI - MOVQ DX,DI - MOVQ R9,CX + LEAQ 360(R12), DI + LEAQ 360(R12), SI + +NOCOPY: + MOVQ R9, 352(R12) + MOVOA 48(R12), X0 + MOVOA (R12), X1 + MOVOA 16(R12), X2 + MOVOA 32(R12), X3 + MOVOA X1, X4 + MOVQ $0x00000014, CX + +MAINLOOP2: + PADDL X0, X4 + MOVOA X0, X5 + MOVOA X4, X6 + PSLLL $0x07, X4 + PSRLL $0x19, X6 + PXOR X4, X3 + PXOR X6, X3 + PADDL X3, X5 + MOVOA X3, X4 + MOVOA X5, X6 + PSLLL $0x09, X5 + PSRLL $0x17, X6 + PXOR X5, X2 + PSHUFL $0x93, X3, X3 + PXOR X6, X2 + PADDL X2, X4 + MOVOA X2, X5 + MOVOA X4, X6 + PSLLL $0x0d, X4 + PSRLL $0x13, X6 + PXOR X4, X1 + PSHUFL $0x4e, X2, X2 + PXOR X6, X1 + PADDL X1, X5 + MOVOA X3, X4 + MOVOA X5, X6 + PSLLL $0x12, X5 + PSRLL $0x0e, X6 + PXOR X5, X0 + PSHUFL $0x39, X1, X1 + PXOR X6, X0 + PADDL X0, X4 + MOVOA X0, X5 + MOVOA X4, X6 + PSLLL $0x07, X4 + PSRLL $0x19, X6 + PXOR X4, X1 + PXOR X6, X1 + PADDL X1, X5 + MOVOA X1, X4 + MOVOA X5, X6 + PSLLL $0x09, X5 + PSRLL $0x17, X6 + PXOR X5, X2 + PSHUFL $0x93, X1, X1 + PXOR X6, X2 + PADDL X2, X4 + MOVOA X2, X5 + MOVOA X4, X6 + PSLLL $0x0d, X4 + PSRLL $0x13, X6 + PXOR X4, X3 + PSHUFL $0x4e, X2, X2 + PXOR X6, X3 + PADDL X3, X5 + MOVOA X1, X4 + MOVOA X5, X6 + PSLLL $0x12, X5 + PSRLL $0x0e, X6 + PXOR X5, X0 + PSHUFL $0x39, X3, X3 + PXOR X6, X0 + PADDL X0, X4 + MOVOA X0, X5 + MOVOA X4, X6 + PSLLL $0x07, X4 + PSRLL $0x19, X6 + PXOR X4, X3 + PXOR X6, X3 + PADDL X3, X5 + MOVOA X3, X4 + MOVOA X5, X6 + PSLLL $0x09, X5 + PSRLL $0x17, X6 + PXOR X5, X2 + PSHUFL $0x93, X3, X3 + PXOR X6, X2 + PADDL X2, X4 + MOVOA X2, X5 + MOVOA X4, X6 + PSLLL $0x0d, X4 + PSRLL $0x13, X6 + PXOR X4, X1 + PSHUFL $0x4e, X2, X2 + PXOR X6, X1 + PADDL X1, X5 + MOVOA X3, X4 + MOVOA X5, X6 + PSLLL $0x12, X5 + PSRLL $0x0e, X6 + PXOR X5, X0 + PSHUFL $0x39, X1, X1 + PXOR X6, X0 + PADDL X0, X4 + MOVOA X0, X5 + MOVOA X4, X6 + PSLLL $0x07, X4 + PSRLL $0x19, X6 + PXOR X4, X1 + PXOR X6, X1 + PADDL X1, X5 + MOVOA X1, X4 + MOVOA X5, X6 + PSLLL $0x09, X5 + PSRLL $0x17, X6 + PXOR X5, X2 + PSHUFL $0x93, X1, X1 + PXOR X6, X2 + PADDL X2, X4 + MOVOA X2, X5 + MOVOA X4, X6 + PSLLL $0x0d, X4 + PSRLL $0x13, X6 + PXOR X4, X3 + PSHUFL $0x4e, X2, X2 + PXOR X6, X3 + SUBQ $0x04, CX + PADDL X3, X5 + MOVOA X1, X4 + MOVOA X5, X6 + PSLLL $0x12, X5 + PXOR X7, X7 + PSRLL $0x0e, X6 + PXOR X5, X0 + PSHUFL $0x39, X3, X3 + PXOR X6, X0 + JA MAINLOOP2 + PADDL 48(R12), X0 + PADDL (R12), X1 + PADDL 16(R12), X2 + PADDL 32(R12), X3 + MOVD X0, CX + MOVD X1, R8 + MOVD X2, R9 + MOVD X3, AX + PSHUFL $0x39, X0, X0 + PSHUFL $0x39, X1, X1 + PSHUFL $0x39, X2, X2 + PSHUFL $0x39, X3, X3 + XORL (SI), CX + XORL 48(SI), R8 + XORL 32(SI), R9 + XORL 16(SI), AX + MOVL CX, (DI) + MOVL R8, 48(DI) + MOVL R9, 32(DI) + MOVL AX, 16(DI) + MOVD X0, CX + MOVD X1, R8 + MOVD X2, R9 + MOVD X3, AX + PSHUFL $0x39, X0, X0 + PSHUFL $0x39, X1, X1 + PSHUFL $0x39, X2, X2 + PSHUFL $0x39, X3, X3 + XORL 20(SI), CX + XORL 4(SI), R8 + XORL 52(SI), R9 + XORL 36(SI), AX + MOVL CX, 20(DI) + MOVL R8, 4(DI) + MOVL R9, 52(DI) + MOVL AX, 36(DI) + MOVD X0, CX + MOVD X1, R8 + MOVD X2, R9 + MOVD X3, AX + PSHUFL $0x39, X0, X0 + PSHUFL $0x39, X1, X1 + PSHUFL $0x39, X2, X2 + PSHUFL $0x39, X3, X3 + XORL 40(SI), CX + XORL 24(SI), R8 + XORL 8(SI), R9 + XORL 56(SI), AX + MOVL CX, 40(DI) + MOVL R8, 24(DI) + MOVL R9, 8(DI) + MOVL AX, 56(DI) + MOVD X0, CX + MOVD X1, R8 + MOVD X2, R9 + MOVD X3, AX + XORL 60(SI), CX + XORL 44(SI), R8 + XORL 28(SI), R9 + XORL 12(SI), AX + MOVL CX, 60(DI) + MOVL R8, 44(DI) + MOVL R9, 28(DI) + MOVL AX, 12(DI) + MOVQ 352(R12), R9 + MOVL 16(R12), CX + MOVL 36(R12), R8 + ADDQ $0x01, CX + SHLQ $0x20, R8 + ADDQ R8, CX + MOVQ CX, R8 + SHRQ $0x20, R8 + MOVL CX, 16(R12) + MOVL R8, 36(R12) + CMPQ R9, $0x40 + JA BYTESATLEAST65 + JAE BYTESATLEAST64 + MOVQ DI, SI + MOVQ DX, DI + MOVQ R9, CX REP; MOVSB - BYTESATLEAST64: - DONE: + +BYTESATLEAST64: +DONE: RET - BYTESATLEAST65: - SUBQ $64,R9 - ADDQ $64,DI - ADDQ $64,SI - JMP BYTESBETWEEN1AND255 + +BYTESATLEAST65: + SUBQ $0x40, R9 + ADDQ $0x40, DI + ADDQ $0x40, SI + JMP BYTESBETWEEN1AND255 diff --git a/vendor/golang.org/x/crypto/scrypt/scrypt.go b/vendor/golang.org/x/crypto/scrypt/scrypt.go index c971a99fa..76fa40fb2 100644 --- a/vendor/golang.org/x/crypto/scrypt/scrypt.go +++ b/vendor/golang.org/x/crypto/scrypt/scrypt.go @@ -5,7 +5,7 @@ // Package scrypt implements the scrypt key derivation function as defined in // Colin Percival's paper "Stronger Key Derivation via Sequential Memory-Hard // Functions" (https://www.tarsnap.com/scrypt/scrypt.pdf). -package scrypt // import "golang.org/x/crypto/scrypt" +package scrypt import ( "crypto/sha256" diff --git a/vendor/golang.org/x/net/LICENSE b/vendor/golang.org/x/net/LICENSE index 6a66aea5e..2a7cf70da 100644 --- a/vendor/golang.org/x/net/LICENSE +++ b/vendor/golang.org/x/net/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/net/http2/transport.go b/vendor/golang.org/x/net/http2/transport.go index 98a49c6b6..61f511f97 100644 --- a/vendor/golang.org/x/net/http2/transport.go +++ b/vendor/golang.org/x/net/http2/transport.go @@ -827,10 +827,6 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro cc.henc.SetMaxDynamicTableSizeLimit(t.maxEncoderHeaderTableSize()) cc.peerMaxHeaderTableSize = initialHeaderTableSize - if t.AllowHTTP { - cc.nextStreamID = 3 - } - if cs, ok := c.(connectionStater); ok { state := cs.ConnectionState() cc.tlsState = &state diff --git a/vendor/golang.org/x/oauth2/LICENSE b/vendor/golang.org/x/oauth2/LICENSE index 6a66aea5e..2a7cf70da 100644 --- a/vendor/golang.org/x/oauth2/LICENSE +++ b/vendor/golang.org/x/oauth2/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/oauth2/google/appengine.go b/vendor/golang.org/x/oauth2/google/appengine.go index feb1157b1..564920bd4 100644 --- a/vendor/golang.org/x/oauth2/google/appengine.go +++ b/vendor/golang.org/x/oauth2/google/appengine.go @@ -6,16 +6,13 @@ package google import ( "context" - "time" + "log" + "sync" "golang.org/x/oauth2" ) -// Set at init time by appengine_gen1.go. If nil, we're not on App Engine standard first generation (<= Go 1.9) or App Engine flexible. -var appengineTokenFunc func(c context.Context, scopes ...string) (token string, expiry time.Time, err error) - -// Set at init time by appengine_gen1.go. If nil, we're not on App Engine standard first generation (<= Go 1.9) or App Engine flexible. -var appengineAppIDFunc func(c context.Context) string +var logOnce sync.Once // only spam about deprecation once // AppEngineTokenSource returns a token source that fetches tokens from either // the current application's service account or from the metadata server, @@ -23,8 +20,10 @@ var appengineAppIDFunc func(c context.Context) string // details. If you are implementing a 3-legged OAuth 2.0 flow on App Engine that // involves user accounts, see oauth2.Config instead. // -// First generation App Engine runtimes (<= Go 1.9): -// AppEngineTokenSource returns a token source that fetches tokens issued to the +// The current version of this library requires at least Go 1.17 to build, +// so first generation App Engine runtimes (<= Go 1.9) are unsupported. +// Previously, on first generation App Engine runtimes, AppEngineTokenSource +// returned a token source that fetches tokens issued to the // current App Engine application's service account. The provided context must have // come from appengine.NewContext. // @@ -34,5 +33,8 @@ var appengineAppIDFunc func(c context.Context) string // context and scopes are not used. Please use DefaultTokenSource (or ComputeTokenSource, // which DefaultTokenSource will use in this case) instead. func AppEngineTokenSource(ctx context.Context, scope ...string) oauth2.TokenSource { - return appEngineTokenSource(ctx, scope...) + logOnce.Do(func() { + log.Print("google: AppEngineTokenSource is deprecated on App Engine standard second generation runtimes (>= Go 1.11) and App Engine flexible. Please use DefaultTokenSource or ComputeTokenSource.") + }) + return ComputeTokenSource("") } diff --git a/vendor/golang.org/x/oauth2/google/appengine_gen1.go b/vendor/golang.org/x/oauth2/google/appengine_gen1.go deleted file mode 100644 index e61587945..000000000 --- a/vendor/golang.org/x/oauth2/google/appengine_gen1.go +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build appengine - -// This file applies to App Engine first generation runtimes (<= Go 1.9). - -package google - -import ( - "context" - "sort" - "strings" - "sync" - - "golang.org/x/oauth2" - "google.golang.org/appengine" -) - -func init() { - appengineTokenFunc = appengine.AccessToken - appengineAppIDFunc = appengine.AppID -} - -// See comment on AppEngineTokenSource in appengine.go. -func appEngineTokenSource(ctx context.Context, scope ...string) oauth2.TokenSource { - scopes := append([]string{}, scope...) - sort.Strings(scopes) - return &gaeTokenSource{ - ctx: ctx, - scopes: scopes, - key: strings.Join(scopes, " "), - } -} - -// aeTokens helps the fetched tokens to be reused until their expiration. -var ( - aeTokensMu sync.Mutex - aeTokens = make(map[string]*tokenLock) // key is space-separated scopes -) - -type tokenLock struct { - mu sync.Mutex // guards t; held while fetching or updating t - t *oauth2.Token -} - -type gaeTokenSource struct { - ctx context.Context - scopes []string - key string // to aeTokens map; space-separated scopes -} - -func (ts *gaeTokenSource) Token() (*oauth2.Token, error) { - aeTokensMu.Lock() - tok, ok := aeTokens[ts.key] - if !ok { - tok = &tokenLock{} - aeTokens[ts.key] = tok - } - aeTokensMu.Unlock() - - tok.mu.Lock() - defer tok.mu.Unlock() - if tok.t.Valid() { - return tok.t, nil - } - access, exp, err := appengineTokenFunc(ts.ctx, ts.scopes...) - if err != nil { - return nil, err - } - tok.t = &oauth2.Token{ - AccessToken: access, - Expiry: exp, - } - return tok.t, nil -} diff --git a/vendor/golang.org/x/oauth2/google/appengine_gen2_flex.go b/vendor/golang.org/x/oauth2/google/appengine_gen2_flex.go deleted file mode 100644 index 9c79aa0a0..000000000 --- a/vendor/golang.org/x/oauth2/google/appengine_gen2_flex.go +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build !appengine - -// This file applies to App Engine second generation runtimes (>= Go 1.11) and App Engine flexible. - -package google - -import ( - "context" - "log" - "sync" - - "golang.org/x/oauth2" -) - -var logOnce sync.Once // only spam about deprecation once - -// See comment on AppEngineTokenSource in appengine.go. -func appEngineTokenSource(ctx context.Context, scope ...string) oauth2.TokenSource { - logOnce.Do(func() { - log.Print("google: AppEngineTokenSource is deprecated on App Engine standard second generation runtimes (>= Go 1.11) and App Engine flexible. Please use DefaultTokenSource or ComputeTokenSource.") - }) - return ComputeTokenSource("") -} diff --git a/vendor/golang.org/x/oauth2/google/default.go b/vendor/golang.org/x/oauth2/google/default.go index 12b12a30c..df958359a 100644 --- a/vendor/golang.org/x/oauth2/google/default.go +++ b/vendor/golang.org/x/oauth2/google/default.go @@ -12,6 +12,7 @@ import ( "os" "path/filepath" "runtime" + "sync" "time" "cloud.google.com/go/compute/metadata" @@ -21,7 +22,7 @@ import ( const ( adcSetupURL = "https://cloud.google.com/docs/authentication/external/set-up-adc" - universeDomainDefault = "googleapis.com" + defaultUniverseDomain = "googleapis.com" ) // Credentials holds Google credentials, including "Application Default Credentials". @@ -41,19 +42,65 @@ type Credentials struct { // running on Google Cloud Platform. JSON []byte + // UniverseDomainProvider returns the default service domain for a given + // Cloud universe. Optional. + // + // On GCE, UniverseDomainProvider should return the universe domain value + // from Google Compute Engine (GCE)'s metadata server. See also [The attached service + // account](https://cloud.google.com/docs/authentication/application-default-credentials#attached-sa). + // If the GCE metadata server returns a 404 error, the default universe + // domain value should be returned. If the GCE metadata server returns an + // error other than 404, the error should be returned. + UniverseDomainProvider func() (string, error) + + udMu sync.Mutex // guards universeDomain // universeDomain is the default service domain for a given Cloud universe. universeDomain string } // UniverseDomain returns the default service domain for a given Cloud universe. +// // The default value is "googleapis.com". +// +// Deprecated: Use instead (*Credentials).GetUniverseDomain(), which supports +// obtaining the universe domain when authenticating via the GCE metadata server. +// Unlike GetUniverseDomain, this method, UniverseDomain, will always return the +// default value when authenticating via the GCE metadata server. +// See also [The attached service account](https://cloud.google.com/docs/authentication/application-default-credentials#attached-sa). func (c *Credentials) UniverseDomain() string { if c.universeDomain == "" { - return universeDomainDefault + return defaultUniverseDomain } return c.universeDomain } +// GetUniverseDomain returns the default service domain for a given Cloud +// universe. If present, UniverseDomainProvider will be invoked and its return +// value will be cached. +// +// The default value is "googleapis.com". +func (c *Credentials) GetUniverseDomain() (string, error) { + c.udMu.Lock() + defer c.udMu.Unlock() + if c.universeDomain == "" && c.UniverseDomainProvider != nil { + // On Google Compute Engine, an App Engine standard second generation + // runtime, or App Engine flexible, use an externally provided function + // to request the universe domain from the metadata server. + ud, err := c.UniverseDomainProvider() + if err != nil { + return "", err + } + c.universeDomain = ud + } + // If no UniverseDomainProvider (meaning not on Google Compute Engine), or + // in case of any (non-error) empty return value from + // UniverseDomainProvider, set the default universe domain. + if c.universeDomain == "" { + c.universeDomain = defaultUniverseDomain + } + return c.universeDomain, nil +} + // DefaultCredentials is the old name of Credentials. // // Deprecated: use Credentials instead. @@ -91,6 +138,12 @@ type CredentialsParams struct { // Note: This option is currently only respected when using credentials // fetched from the GCE metadata server. EarlyTokenRefresh time.Duration + + // UniverseDomain is the default service domain for a given Cloud universe. + // Only supported in authentication flows that support universe domains. + // This value takes precedence over a universe domain explicitly specified + // in a credentials config file or by the GCE metadata server. Optional. + UniverseDomain string } func (params CredentialsParams) deepCopy() CredentialsParams { @@ -135,9 +188,7 @@ func DefaultTokenSource(ctx context.Context, scope ...string) (oauth2.TokenSourc // 2. A JSON file in a location known to the gcloud command-line tool. // On Windows, this is %APPDATA%/gcloud/application_default_credentials.json. // On other systems, $HOME/.config/gcloud/application_default_credentials.json. -// 3. On Google App Engine standard first generation runtimes (<= Go 1.9) it uses -// the appengine.AccessToken function. -// 4. On Google Compute Engine, Google App Engine standard second generation runtimes +// 3. On Google Compute Engine, Google App Engine standard second generation runtimes // (>= Go 1.11), and Google App Engine flexible environment, it fetches // credentials from the metadata server. func FindDefaultCredentialsWithParams(ctx context.Context, params CredentialsParams) (*Credentials, error) { @@ -160,23 +211,27 @@ func FindDefaultCredentialsWithParams(ctx context.Context, params CredentialsPar return CredentialsFromJSONWithParams(ctx, b, params) } - // Third, if we're on a Google App Engine standard first generation runtime (<= Go 1.9) - // use those credentials. App Engine standard second generation runtimes (>= Go 1.11) - // and App Engine flexible use ComputeTokenSource and the metadata server. - if appengineTokenFunc != nil { - return &Credentials{ - ProjectID: appengineAppIDFunc(ctx), - TokenSource: AppEngineTokenSource(ctx, params.Scopes...), - }, nil - } - - // Fourth, if we're on Google Compute Engine, an App Engine standard second generation runtime, + // Third, if we're on Google Compute Engine, an App Engine standard second generation runtime, // or App Engine flexible, use the metadata server. if metadata.OnGCE() { id, _ := metadata.ProjectID() + universeDomainProvider := func() (string, error) { + universeDomain, err := metadata.Get("universe/universe_domain") + if err != nil { + if _, ok := err.(metadata.NotDefinedError); ok { + // http.StatusNotFound (404) + return defaultUniverseDomain, nil + } else { + return "", err + } + } + return universeDomain, nil + } return &Credentials{ - ProjectID: id, - TokenSource: computeTokenSource("", params.EarlyTokenRefresh, params.Scopes...), + ProjectID: id, + TokenSource: computeTokenSource("", params.EarlyTokenRefresh, params.Scopes...), + UniverseDomainProvider: universeDomainProvider, + universeDomain: params.UniverseDomain, }, nil } @@ -217,9 +272,12 @@ func CredentialsFromJSONWithParams(ctx context.Context, jsonData []byte, params } universeDomain := f.UniverseDomain + if params.UniverseDomain != "" { + universeDomain = params.UniverseDomain + } // Authorized user credentials are only supported in the googleapis.com universe. if f.Type == userCredentialsKey { - universeDomain = universeDomainDefault + universeDomain = defaultUniverseDomain } ts, err := f.tokenSource(ctx, params) diff --git a/vendor/golang.org/x/oauth2/google/doc.go b/vendor/golang.org/x/oauth2/google/doc.go index 03c42c6f8..830d268c1 100644 --- a/vendor/golang.org/x/oauth2/google/doc.go +++ b/vendor/golang.org/x/oauth2/google/doc.go @@ -22,91 +22,9 @@ // the other by JWTConfigFromJSON. The returned Config can be used to obtain a TokenSource or // create an http.Client. // -// # Workload Identity Federation +// # Workload and Workforce Identity Federation // -// Using workload identity federation, your application can access Google Cloud -// resources from Amazon Web Services (AWS), Microsoft Azure or any identity -// provider that supports OpenID Connect (OIDC) or SAML 2.0. -// Traditionally, applications running outside Google Cloud have used service -// account keys to access Google Cloud resources. Using identity federation, -// you can allow your workload to impersonate a service account. -// This lets you access Google Cloud resources directly, eliminating the -// maintenance and security burden associated with service account keys. -// -// Follow the detailed instructions on how to configure Workload Identity Federation -// in various platforms: -// -// Amazon Web Services (AWS): https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#aws -// Microsoft Azure: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#azure -// OIDC identity provider: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#oidc -// SAML 2.0 identity provider: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#saml -// -// For OIDC and SAML providers, the library can retrieve tokens in three ways: -// from a local file location (file-sourced credentials), from a server -// (URL-sourced credentials), or from a local executable (executable-sourced -// credentials). -// For file-sourced credentials, a background process needs to be continuously -// refreshing the file location with a new OIDC/SAML token prior to expiration. -// For tokens with one hour lifetimes, the token needs to be updated in the file -// every hour. The token can be stored directly as plain text or in JSON format. -// For URL-sourced credentials, a local server needs to host a GET endpoint to -// return the OIDC/SAML token. The response can be in plain text or JSON. -// Additional required request headers can also be specified. -// For executable-sourced credentials, an application needs to be available to -// output the OIDC/SAML token and other information in a JSON format. -// For more information on how these work (and how to implement -// executable-sourced credentials), please check out: -// https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#create_a_credential_configuration -// -// Note that this library does not perform any validation on the token_url, token_info_url, -// or service_account_impersonation_url fields of the credential configuration. -// It is not recommended to use a credential configuration that you did not generate with -// the gcloud CLI unless you verify that the URL fields point to a googleapis.com domain. -// -// # Workforce Identity Federation -// -// Workforce identity federation lets you use an external identity provider (IdP) to -// authenticate and authorize a workforce—a group of users, such as employees, partners, -// and contractors—using IAM, so that the users can access Google Cloud services. -// Workforce identity federation extends Google Cloud's identity capabilities to support -// syncless, attribute-based single sign on. -// -// With workforce identity federation, your workforce can access Google Cloud resources -// using an external identity provider (IdP) that supports OpenID Connect (OIDC) or -// SAML 2.0 such as Azure Active Directory (Azure AD), Active Directory Federation -// Services (AD FS), Okta, and others. -// -// Follow the detailed instructions on how to configure Workload Identity Federation -// in various platforms: -// -// Azure AD: https://cloud.google.com/iam/docs/workforce-sign-in-azure-ad -// Okta: https://cloud.google.com/iam/docs/workforce-sign-in-okta -// OIDC identity provider: https://cloud.google.com/iam/docs/configuring-workforce-identity-federation#oidc -// SAML 2.0 identity provider: https://cloud.google.com/iam/docs/configuring-workforce-identity-federation#saml -// -// For workforce identity federation, the library can retrieve tokens in three ways: -// from a local file location (file-sourced credentials), from a server -// (URL-sourced credentials), or from a local executable (executable-sourced -// credentials). -// For file-sourced credentials, a background process needs to be continuously -// refreshing the file location with a new OIDC/SAML token prior to expiration. -// For tokens with one hour lifetimes, the token needs to be updated in the file -// every hour. The token can be stored directly as plain text or in JSON format. -// For URL-sourced credentials, a local server needs to host a GET endpoint to -// return the OIDC/SAML token. The response can be in plain text or JSON. -// Additional required request headers can also be specified. -// For executable-sourced credentials, an application needs to be available to -// output the OIDC/SAML token and other information in a JSON format. -// For more information on how these work (and how to implement -// executable-sourced credentials), please check out: -// https://cloud.google.com/iam/docs/workforce-obtaining-short-lived-credentials#generate_a_configuration_file_for_non-interactive_sign-in -// -// # Security considerations -// -// Note that this library does not perform any validation on the token_url, token_info_url, -// or service_account_impersonation_url fields of the credential configuration. -// It is not recommended to use a credential configuration that you did not generate with -// the gcloud CLI unless you verify that the URL fields point to a googleapis.com domain. +// For information on how to use Workload and Workforce Identity Federation, see [golang.org/x/oauth2/google/externalaccount]. // // # Credentials // diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/aws.go b/vendor/golang.org/x/oauth2/google/externalaccount/aws.go similarity index 77% rename from vendor/golang.org/x/oauth2/google/internal/externalaccount/aws.go rename to vendor/golang.org/x/oauth2/google/externalaccount/aws.go index bd4efd19b..ca27c2e98 100644 --- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/aws.go +++ b/vendor/golang.org/x/oauth2/google/externalaccount/aws.go @@ -26,22 +26,28 @@ import ( "golang.org/x/oauth2" ) -type awsSecurityCredentials struct { - AccessKeyID string `json:"AccessKeyID"` +// AwsSecurityCredentials models AWS security credentials. +type AwsSecurityCredentials struct { + // AccessKeyId is the AWS Access Key ID - Required. + AccessKeyID string `json:"AccessKeyID"` + // SecretAccessKey is the AWS Secret Access Key - Required. SecretAccessKey string `json:"SecretAccessKey"` - SecurityToken string `json:"Token"` + // SessionToken is the AWS Session token. This should be provided for temporary AWS security credentials - Optional. + SessionToken string `json:"Token"` } // awsRequestSigner is a utility class to sign http requests using a AWS V4 signature. type awsRequestSigner struct { RegionName string - AwsSecurityCredentials awsSecurityCredentials + AwsSecurityCredentials *AwsSecurityCredentials } // getenv aliases os.Getenv for testing var getenv = os.Getenv const ( + defaultRegionalCredentialVerificationUrl = "https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15" + // AWS Signature Version 4 signing algorithm identifier. awsAlgorithm = "AWS4-HMAC-SHA256" @@ -197,8 +203,8 @@ func (rs *awsRequestSigner) SignRequest(req *http.Request) error { signedRequest.Header.Add("host", requestHost(req)) - if rs.AwsSecurityCredentials.SecurityToken != "" { - signedRequest.Header.Add(awsSecurityTokenHeader, rs.AwsSecurityCredentials.SecurityToken) + if rs.AwsSecurityCredentials.SessionToken != "" { + signedRequest.Header.Add(awsSecurityTokenHeader, rs.AwsSecurityCredentials.SessionToken) } if signedRequest.Header.Get("date") == "" { @@ -251,16 +257,18 @@ func (rs *awsRequestSigner) generateAuthentication(req *http.Request, timestamp } type awsCredentialSource struct { - EnvironmentID string - RegionURL string - RegionalCredVerificationURL string - CredVerificationURL string - IMDSv2SessionTokenURL string - TargetResource string - requestSigner *awsRequestSigner - region string - ctx context.Context - client *http.Client + environmentID string + regionURL string + regionalCredVerificationURL string + credVerificationURL string + imdsv2SessionTokenURL string + targetResource string + requestSigner *awsRequestSigner + region string + ctx context.Context + client *http.Client + awsSecurityCredentialsSupplier AwsSecurityCredentialsSupplier + supplierOptions SupplierOptions } type awsRequestHeader struct { @@ -292,18 +300,25 @@ func canRetrieveSecurityCredentialFromEnvironment() bool { return getenv(awsAccessKeyId) != "" && getenv(awsSecretAccessKey) != "" } -func shouldUseMetadataServer() bool { - return !canRetrieveRegionFromEnvironment() || !canRetrieveSecurityCredentialFromEnvironment() +func (cs awsCredentialSource) shouldUseMetadataServer() bool { + return cs.awsSecurityCredentialsSupplier == nil && (!canRetrieveRegionFromEnvironment() || !canRetrieveSecurityCredentialFromEnvironment()) } func (cs awsCredentialSource) credentialSourceType() string { + if cs.awsSecurityCredentialsSupplier != nil { + return "programmatic" + } return "aws" } func (cs awsCredentialSource) subjectToken() (string, error) { + // Set Defaults + if cs.regionalCredVerificationURL == "" { + cs.regionalCredVerificationURL = defaultRegionalCredentialVerificationUrl + } if cs.requestSigner == nil { headers := make(map[string]string) - if shouldUseMetadataServer() { + if cs.shouldUseMetadataServer() { awsSessionToken, err := cs.getAWSSessionToken() if err != nil { return "", err @@ -318,8 +333,8 @@ func (cs awsCredentialSource) subjectToken() (string, error) { if err != nil { return "", err } - - if cs.region, err = cs.getRegion(headers); err != nil { + cs.region, err = cs.getRegion(headers) + if err != nil { return "", err } @@ -331,7 +346,7 @@ func (cs awsCredentialSource) subjectToken() (string, error) { // Generate the signed request to AWS STS GetCallerIdentity API. // Use the required regional endpoint. Otherwise, the request will fail. - req, err := http.NewRequest("POST", strings.Replace(cs.RegionalCredVerificationURL, "{region}", cs.region, 1), nil) + req, err := http.NewRequest("POST", strings.Replace(cs.regionalCredVerificationURL, "{region}", cs.region, 1), nil) if err != nil { return "", err } @@ -339,8 +354,8 @@ func (cs awsCredentialSource) subjectToken() (string, error) { // provider, with or without the HTTPS prefix. // Including this header as part of the signature is recommended to // ensure data integrity. - if cs.TargetResource != "" { - req.Header.Add("x-goog-cloud-target-resource", cs.TargetResource) + if cs.targetResource != "" { + req.Header.Add("x-goog-cloud-target-resource", cs.targetResource) } cs.requestSigner.SignRequest(req) @@ -387,11 +402,11 @@ func (cs awsCredentialSource) subjectToken() (string, error) { } func (cs *awsCredentialSource) getAWSSessionToken() (string, error) { - if cs.IMDSv2SessionTokenURL == "" { + if cs.imdsv2SessionTokenURL == "" { return "", nil } - req, err := http.NewRequest("PUT", cs.IMDSv2SessionTokenURL, nil) + req, err := http.NewRequest("PUT", cs.imdsv2SessionTokenURL, nil) if err != nil { return "", err } @@ -410,25 +425,29 @@ func (cs *awsCredentialSource) getAWSSessionToken() (string, error) { } if resp.StatusCode != 200 { - return "", fmt.Errorf("oauth2/google: unable to retrieve AWS session token - %s", string(respBody)) + return "", fmt.Errorf("oauth2/google/externalaccount: unable to retrieve AWS session token - %s", string(respBody)) } return string(respBody), nil } func (cs *awsCredentialSource) getRegion(headers map[string]string) (string, error) { + if cs.awsSecurityCredentialsSupplier != nil { + return cs.awsSecurityCredentialsSupplier.AwsRegion(cs.ctx, cs.supplierOptions) + } if canRetrieveRegionFromEnvironment() { if envAwsRegion := getenv(awsRegion); envAwsRegion != "" { + cs.region = envAwsRegion return envAwsRegion, nil } return getenv("AWS_DEFAULT_REGION"), nil } - if cs.RegionURL == "" { - return "", errors.New("oauth2/google: unable to determine AWS region") + if cs.regionURL == "" { + return "", errors.New("oauth2/google/externalaccount: unable to determine AWS region") } - req, err := http.NewRequest("GET", cs.RegionURL, nil) + req, err := http.NewRequest("GET", cs.regionURL, nil) if err != nil { return "", err } @@ -449,7 +468,7 @@ func (cs *awsCredentialSource) getRegion(headers map[string]string) (string, err } if resp.StatusCode != 200 { - return "", fmt.Errorf("oauth2/google: unable to retrieve AWS region - %s", string(respBody)) + return "", fmt.Errorf("oauth2/google/externalaccount: unable to retrieve AWS region - %s", string(respBody)) } // This endpoint will return the region in format: us-east-2b. @@ -461,12 +480,15 @@ func (cs *awsCredentialSource) getRegion(headers map[string]string) (string, err return string(respBody[:respBodyEnd]), nil } -func (cs *awsCredentialSource) getSecurityCredentials(headers map[string]string) (result awsSecurityCredentials, err error) { +func (cs *awsCredentialSource) getSecurityCredentials(headers map[string]string) (result *AwsSecurityCredentials, err error) { + if cs.awsSecurityCredentialsSupplier != nil { + return cs.awsSecurityCredentialsSupplier.AwsSecurityCredentials(cs.ctx, cs.supplierOptions) + } if canRetrieveSecurityCredentialFromEnvironment() { - return awsSecurityCredentials{ + return &AwsSecurityCredentials{ AccessKeyID: getenv(awsAccessKeyId), SecretAccessKey: getenv(awsSecretAccessKey), - SecurityToken: getenv(awsSessionToken), + SessionToken: getenv(awsSessionToken), }, nil } @@ -481,24 +503,23 @@ func (cs *awsCredentialSource) getSecurityCredentials(headers map[string]string) } if credentials.AccessKeyID == "" { - return result, errors.New("oauth2/google: missing AccessKeyId credential") + return result, errors.New("oauth2/google/externalaccount: missing AccessKeyId credential") } if credentials.SecretAccessKey == "" { - return result, errors.New("oauth2/google: missing SecretAccessKey credential") + return result, errors.New("oauth2/google/externalaccount: missing SecretAccessKey credential") } - return credentials, nil + return &credentials, nil } -func (cs *awsCredentialSource) getMetadataSecurityCredentials(roleName string, headers map[string]string) (awsSecurityCredentials, error) { - var result awsSecurityCredentials +func (cs *awsCredentialSource) getMetadataSecurityCredentials(roleName string, headers map[string]string) (AwsSecurityCredentials, error) { + var result AwsSecurityCredentials - req, err := http.NewRequest("GET", fmt.Sprintf("%s/%s", cs.CredVerificationURL, roleName), nil) + req, err := http.NewRequest("GET", fmt.Sprintf("%s/%s", cs.credVerificationURL, roleName), nil) if err != nil { return result, err } - req.Header.Add("Content-Type", "application/json") for name, value := range headers { req.Header.Add(name, value) @@ -516,7 +537,7 @@ func (cs *awsCredentialSource) getMetadataSecurityCredentials(roleName string, h } if resp.StatusCode != 200 { - return result, fmt.Errorf("oauth2/google: unable to retrieve AWS security credentials - %s", string(respBody)) + return result, fmt.Errorf("oauth2/google/externalaccount: unable to retrieve AWS security credentials - %s", string(respBody)) } err = json.Unmarshal(respBody, &result) @@ -524,11 +545,11 @@ func (cs *awsCredentialSource) getMetadataSecurityCredentials(roleName string, h } func (cs *awsCredentialSource) getMetadataRoleName(headers map[string]string) (string, error) { - if cs.CredVerificationURL == "" { - return "", errors.New("oauth2/google: unable to determine the AWS metadata server security credentials endpoint") + if cs.credVerificationURL == "" { + return "", errors.New("oauth2/google/externalaccount: unable to determine the AWS metadata server security credentials endpoint") } - req, err := http.NewRequest("GET", cs.CredVerificationURL, nil) + req, err := http.NewRequest("GET", cs.credVerificationURL, nil) if err != nil { return "", err } @@ -549,7 +570,7 @@ func (cs *awsCredentialSource) getMetadataRoleName(headers map[string]string) (s } if resp.StatusCode != 200 { - return "", fmt.Errorf("oauth2/google: unable to retrieve AWS role name - %s", string(respBody)) + return "", fmt.Errorf("oauth2/google/externalaccount: unable to retrieve AWS role name - %s", string(respBody)) } return string(respBody), nil diff --git a/vendor/golang.org/x/oauth2/google/externalaccount/basecredentials.go b/vendor/golang.org/x/oauth2/google/externalaccount/basecredentials.go new file mode 100644 index 000000000..6c81a6872 --- /dev/null +++ b/vendor/golang.org/x/oauth2/google/externalaccount/basecredentials.go @@ -0,0 +1,485 @@ +// Copyright 2020 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +/* +Package externalaccount provides support for creating workload identity +federation and workforce identity federation token sources that can be +used to access Google Cloud resources from external identity providers. + +# Workload Identity Federation + +Using workload identity federation, your application can access Google Cloud +resources from Amazon Web Services (AWS), Microsoft Azure or any identity +provider that supports OpenID Connect (OIDC) or SAML 2.0. +Traditionally, applications running outside Google Cloud have used service +account keys to access Google Cloud resources. Using identity federation, +you can allow your workload to impersonate a service account. +This lets you access Google Cloud resources directly, eliminating the +maintenance and security burden associated with service account keys. + +Follow the detailed instructions on how to configure Workload Identity Federation +in various platforms: + +Amazon Web Services (AWS): https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#aws +Microsoft Azure: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-clouds#azure +OIDC identity provider: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#oidc +SAML 2.0 identity provider: https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#saml + +For OIDC and SAML providers, the library can retrieve tokens in fours ways: +from a local file location (file-sourced credentials), from a server +(URL-sourced credentials), from a local executable (executable-sourced +credentials), or from a user defined function that returns an OIDC or SAML token. +For file-sourced credentials, a background process needs to be continuously +refreshing the file location with a new OIDC/SAML token prior to expiration. +For tokens with one hour lifetimes, the token needs to be updated in the file +every hour. The token can be stored directly as plain text or in JSON format. +For URL-sourced credentials, a local server needs to host a GET endpoint to +return the OIDC/SAML token. The response can be in plain text or JSON. +Additional required request headers can also be specified. +For executable-sourced credentials, an application needs to be available to +output the OIDC/SAML token and other information in a JSON format. +For more information on how these work (and how to implement +executable-sourced credentials), please check out: +https://cloud.google.com/iam/docs/workload-identity-federation-with-other-providers#create_a_credential_configuration + +To use a custom function to supply the token, define a struct that implements the [SubjectTokenSupplier] interface for OIDC/SAML providers, +or one that implements [AwsSecurityCredentialsSupplier] for AWS providers. This can then be used when building a [Config]. +The [golang.org/x/oauth2.TokenSource] created from the config using [NewTokenSource] can then be used to access Google +Cloud resources. For instance, you can create a new client from the +[cloud.google.com/go/storage] package and pass in option.WithTokenSource(yourTokenSource)) + +Note that this library does not perform any validation on the token_url, token_info_url, +or service_account_impersonation_url fields of the credential configuration. +It is not recommended to use a credential configuration that you did not generate with +the gcloud CLI unless you verify that the URL fields point to a googleapis.com domain. + +# Workforce Identity Federation + +Workforce identity federation lets you use an external identity provider (IdP) to +authenticate and authorize a workforce—a group of users, such as employees, partners, +and contractors—using IAM, so that the users can access Google Cloud services. +Workforce identity federation extends Google Cloud's identity capabilities to support +syncless, attribute-based single sign on. + +With workforce identity federation, your workforce can access Google Cloud resources +using an external identity provider (IdP) that supports OpenID Connect (OIDC) or +SAML 2.0 such as Azure Active Directory (Azure AD), Active Directory Federation +Services (AD FS), Okta, and others. + +Follow the detailed instructions on how to configure Workload Identity Federation +in various platforms: + +Azure AD: https://cloud.google.com/iam/docs/workforce-sign-in-azure-ad +Okta: https://cloud.google.com/iam/docs/workforce-sign-in-okta +OIDC identity provider: https://cloud.google.com/iam/docs/configuring-workforce-identity-federation#oidc +SAML 2.0 identity provider: https://cloud.google.com/iam/docs/configuring-workforce-identity-federation#saml + +For workforce identity federation, the library can retrieve tokens in four ways: +from a local file location (file-sourced credentials), from a server +(URL-sourced credentials), from a local executable (executable-sourced +credentials), or from a user supplied function that returns an OIDC or SAML token. +For file-sourced credentials, a background process needs to be continuously +refreshing the file location with a new OIDC/SAML token prior to expiration. +For tokens with one hour lifetimes, the token needs to be updated in the file +every hour. The token can be stored directly as plain text or in JSON format. +For URL-sourced credentials, a local server needs to host a GET endpoint to +return the OIDC/SAML token. The response can be in plain text or JSON. +Additional required request headers can also be specified. +For executable-sourced credentials, an application needs to be available to +output the OIDC/SAML token and other information in a JSON format. +For more information on how these work (and how to implement +executable-sourced credentials), please check out: +https://cloud.google.com/iam/docs/workforce-obtaining-short-lived-credentials#generate_a_configuration_file_for_non-interactive_sign-in + +To use a custom function to supply the token, define a struct that implements the [SubjectTokenSupplier] interface for OIDC/SAML providers. +This can then be used when building a [Config]. +The [golang.org/x/oauth2.TokenSource] created from the config using [NewTokenSource] can then be used access Google +Cloud resources. For instance, you can create a new client from the +[cloud.google.com/go/storage] package and pass in option.WithTokenSource(yourTokenSource)) + +# Security considerations + +Note that this library does not perform any validation on the token_url, token_info_url, +or service_account_impersonation_url fields of the credential configuration. +It is not recommended to use a credential configuration that you did not generate with +the gcloud CLI unless you verify that the URL fields point to a googleapis.com domain. +*/ +package externalaccount + +import ( + "context" + "fmt" + "net/http" + "regexp" + "strconv" + "strings" + "time" + + "golang.org/x/oauth2" + "golang.org/x/oauth2/google/internal/impersonate" + "golang.org/x/oauth2/google/internal/stsexchange" +) + +const ( + universeDomainPlaceholder = "UNIVERSE_DOMAIN" + defaultTokenURL = "https://sts.UNIVERSE_DOMAIN/v1/token" + defaultUniverseDomain = "googleapis.com" +) + +// now aliases time.Now for testing +var now = func() time.Time { + return time.Now().UTC() +} + +// Config stores the configuration for fetching tokens with external credentials. +type Config struct { + // Audience is the Secure Token Service (STS) audience which contains the resource name for the workload + // identity pool or the workforce pool and the provider identifier in that pool. Required. + Audience string + // SubjectTokenType is the STS token type based on the Oauth2.0 token exchange spec. + // Expected values include: + // “urn:ietf:params:oauth:token-type:jwt” + // “urn:ietf:params:oauth:token-type:id-token” + // “urn:ietf:params:oauth:token-type:saml2” + // “urn:ietf:params:aws:token-type:aws4_request” + // Required. + SubjectTokenType string + // TokenURL is the STS token exchange endpoint. If not provided, will default to + // https://sts.UNIVERSE_DOMAIN/v1/token, with UNIVERSE_DOMAIN set to the + // default service domain googleapis.com unless UniverseDomain is set. + // Optional. + TokenURL string + // TokenInfoURL is the token_info endpoint used to retrieve the account related information ( + // user attributes like account identifier, eg. email, username, uid, etc). This is + // needed for gCloud session account identification. Optional. + TokenInfoURL string + // ServiceAccountImpersonationURL is the URL for the service account impersonation request. This is only + // required for workload identity pools when APIs to be accessed have not integrated with UberMint. Optional. + ServiceAccountImpersonationURL string + // ServiceAccountImpersonationLifetimeSeconds is the number of seconds the service account impersonation + // token will be valid for. If not provided, it will default to 3600. Optional. + ServiceAccountImpersonationLifetimeSeconds int + // ClientSecret is currently only required if token_info endpoint also + // needs to be called with the generated GCP access token. When provided, STS will be + // called with additional basic authentication using ClientId as username and ClientSecret as password. Optional. + ClientSecret string + // ClientID is only required in conjunction with ClientSecret, as described above. Optional. + ClientID string + // CredentialSource contains the necessary information to retrieve the token itself, as well + // as some environmental information. One of SubjectTokenSupplier, AWSSecurityCredentialSupplier or + // CredentialSource must be provided. Optional. + CredentialSource *CredentialSource + // QuotaProjectID is injected by gCloud. If the value is non-empty, the Auth libraries + // will set the x-goog-user-project header which overrides the project associated with the credentials. Optional. + QuotaProjectID string + // Scopes contains the desired scopes for the returned access token. Optional. + Scopes []string + // WorkforcePoolUserProject is the workforce pool user project number when the credential + // corresponds to a workforce pool and not a workload identity pool. + // The underlying principal must still have serviceusage.services.use IAM + // permission to use the project for billing/quota. Optional. + WorkforcePoolUserProject string + // SubjectTokenSupplier is an optional token supplier for OIDC/SAML credentials. + // One of SubjectTokenSupplier, AWSSecurityCredentialSupplier or CredentialSource must be provided. Optional. + SubjectTokenSupplier SubjectTokenSupplier + // AwsSecurityCredentialsSupplier is an AWS Security Credential supplier for AWS credentials. + // One of SubjectTokenSupplier, AWSSecurityCredentialSupplier or CredentialSource must be provided. Optional. + AwsSecurityCredentialsSupplier AwsSecurityCredentialsSupplier + // UniverseDomain is the default service domain for a given Cloud universe. + // This value will be used in the default STS token URL. The default value + // is "googleapis.com". It will not be used if TokenURL is set. Optional. + UniverseDomain string +} + +var ( + validWorkforceAudiencePattern *regexp.Regexp = regexp.MustCompile(`//iam\.googleapis\.com/locations/[^/]+/workforcePools/`) +) + +func validateWorkforceAudience(input string) bool { + return validWorkforceAudiencePattern.MatchString(input) +} + +// NewTokenSource Returns an external account TokenSource using the provided external account config. +func NewTokenSource(ctx context.Context, conf Config) (oauth2.TokenSource, error) { + if conf.Audience == "" { + return nil, fmt.Errorf("oauth2/google/externalaccount: Audience must be set") + } + if conf.SubjectTokenType == "" { + return nil, fmt.Errorf("oauth2/google/externalaccount: Subject token type must be set") + } + if conf.WorkforcePoolUserProject != "" { + valid := validateWorkforceAudience(conf.Audience) + if !valid { + return nil, fmt.Errorf("oauth2/google/externalaccount: Workforce pool user project should not be set for non-workforce pool credentials") + } + } + count := 0 + if conf.CredentialSource != nil { + count++ + } + if conf.SubjectTokenSupplier != nil { + count++ + } + if conf.AwsSecurityCredentialsSupplier != nil { + count++ + } + if count == 0 { + return nil, fmt.Errorf("oauth2/google/externalaccount: One of CredentialSource, SubjectTokenSupplier, or AwsSecurityCredentialsSupplier must be set") + } + if count > 1 { + return nil, fmt.Errorf("oauth2/google/externalaccount: Only one of CredentialSource, SubjectTokenSupplier, or AwsSecurityCredentialsSupplier must be set") + } + return conf.tokenSource(ctx, "https") +} + +// tokenSource is a private function that's directly called by some of the tests, +// because the unit test URLs are mocked, and would otherwise fail the +// validity check. +func (c *Config) tokenSource(ctx context.Context, scheme string) (oauth2.TokenSource, error) { + + ts := tokenSource{ + ctx: ctx, + conf: c, + } + if c.ServiceAccountImpersonationURL == "" { + return oauth2.ReuseTokenSource(nil, ts), nil + } + scopes := c.Scopes + ts.conf.Scopes = []string{"https://www.googleapis.com/auth/cloud-platform"} + imp := impersonate.ImpersonateTokenSource{ + Ctx: ctx, + URL: c.ServiceAccountImpersonationURL, + Scopes: scopes, + Ts: oauth2.ReuseTokenSource(nil, ts), + TokenLifetimeSeconds: c.ServiceAccountImpersonationLifetimeSeconds, + } + return oauth2.ReuseTokenSource(nil, imp), nil +} + +// Subject token file types. +const ( + fileTypeText = "text" + fileTypeJSON = "json" +) + +// Format contains information needed to retireve a subject token for URL or File sourced credentials. +type Format struct { + // Type should be either "text" or "json". This determines whether the file or URL sourced credentials + // expect a simple text subject token or if the subject token will be contained in a JSON object. + // When not provided "text" type is assumed. + Type string `json:"type"` + // SubjectTokenFieldName is only required for JSON format. This is the field name that the credentials will check + // for the subject token in the file or URL response. This would be "access_token" for azure. + SubjectTokenFieldName string `json:"subject_token_field_name"` +} + +// CredentialSource stores the information necessary to retrieve the credentials for the STS exchange. +type CredentialSource struct { + // File is the location for file sourced credentials. + // One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question. + File string `json:"file"` + + // Url is the URL to call for URL sourced credentials. + // One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question. + URL string `json:"url"` + // Headers are the headers to attach to the request for URL sourced credentials. + Headers map[string]string `json:"headers"` + + // Executable is the configuration object for executable sourced credentials. + // One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question. + Executable *ExecutableConfig `json:"executable"` + + // EnvironmentID is the EnvironmentID used for AWS sourced credentials. This should start with "AWS". + // One field amongst File, URL, Executable, or EnvironmentID should be provided, depending on the kind of credential in question. + EnvironmentID string `json:"environment_id"` + // RegionURL is the metadata URL to retrieve the region from for EC2 AWS credentials. + RegionURL string `json:"region_url"` + // RegionalCredVerificationURL is the AWS regional credential verification URL, will default to + // "https://sts.{region}.amazonaws.com?Action=GetCallerIdentity&Version=2011-06-15" if not provided." + RegionalCredVerificationURL string `json:"regional_cred_verification_url"` + // IMDSv2SessionTokenURL is the URL to retrieve the session token when using IMDSv2 in AWS. + IMDSv2SessionTokenURL string `json:"imdsv2_session_token_url"` + // Format is the format type for the subject token. Used for File and URL sourced credentials. Expected values are "text" or "json". + Format Format `json:"format"` +} + +// ExecutableConfig contains information needed for executable sourced credentials. +type ExecutableConfig struct { + // Command is the the full command to run to retrieve the subject token. + // This can include arguments. Must be an absolute path for the program. Required. + Command string `json:"command"` + // TimeoutMillis is the timeout duration, in milliseconds. Defaults to 30000 milliseconds when not provided. Optional. + TimeoutMillis *int `json:"timeout_millis"` + // OutputFile is the absolute path to the output file where the executable will cache the response. + // If specified the auth libraries will first check this location before running the executable. Optional. + OutputFile string `json:"output_file"` +} + +// SubjectTokenSupplier can be used to supply a subject token to exchange for a GCP access token. +type SubjectTokenSupplier interface { + // SubjectToken should return a valid subject token or an error. + // The external account token source does not cache the returned subject token, so caching + // logic should be implemented in the supplier to prevent multiple requests for the same subject token. + SubjectToken(ctx context.Context, options SupplierOptions) (string, error) +} + +// AWSSecurityCredentialsSupplier can be used to supply AwsSecurityCredentials and an AWS Region to +// exchange for a GCP access token. +type AwsSecurityCredentialsSupplier interface { + // AwsRegion should return the AWS region or an error. + AwsRegion(ctx context.Context, options SupplierOptions) (string, error) + // GetAwsSecurityCredentials should return a valid set of AwsSecurityCredentials or an error. + // The external account token source does not cache the returned security credentials, so caching + // logic should be implemented in the supplier to prevent multiple requests for the same security credentials. + AwsSecurityCredentials(ctx context.Context, options SupplierOptions) (*AwsSecurityCredentials, error) +} + +// SupplierOptions contains information about the requested subject token or AWS security credentials from the +// Google external account credential. +type SupplierOptions struct { + // Audience is the requested audience for the external account credential. + Audience string + // Subject token type is the requested subject token type for the external account credential. Expected values include: + // “urn:ietf:params:oauth:token-type:jwt” + // “urn:ietf:params:oauth:token-type:id-token” + // “urn:ietf:params:oauth:token-type:saml2” + // “urn:ietf:params:aws:token-type:aws4_request” + SubjectTokenType string +} + +// tokenURL returns the default STS token endpoint with the configured universe +// domain. +func (c *Config) tokenURL() string { + if c.UniverseDomain == "" { + return strings.Replace(defaultTokenURL, universeDomainPlaceholder, defaultUniverseDomain, 1) + } + return strings.Replace(defaultTokenURL, universeDomainPlaceholder, c.UniverseDomain, 1) +} + +// parse determines the type of CredentialSource needed. +func (c *Config) parse(ctx context.Context) (baseCredentialSource, error) { + //set Defaults + if c.TokenURL == "" { + c.TokenURL = c.tokenURL() + } + supplierOptions := SupplierOptions{Audience: c.Audience, SubjectTokenType: c.SubjectTokenType} + + if c.AwsSecurityCredentialsSupplier != nil { + awsCredSource := awsCredentialSource{ + awsSecurityCredentialsSupplier: c.AwsSecurityCredentialsSupplier, + targetResource: c.Audience, + supplierOptions: supplierOptions, + ctx: ctx, + } + return awsCredSource, nil + } else if c.SubjectTokenSupplier != nil { + return programmaticRefreshCredentialSource{subjectTokenSupplier: c.SubjectTokenSupplier, supplierOptions: supplierOptions, ctx: ctx}, nil + } else if len(c.CredentialSource.EnvironmentID) > 3 && c.CredentialSource.EnvironmentID[:3] == "aws" { + if awsVersion, err := strconv.Atoi(c.CredentialSource.EnvironmentID[3:]); err == nil { + if awsVersion != 1 { + return nil, fmt.Errorf("oauth2/google/externalaccount: aws version '%d' is not supported in the current build", awsVersion) + } + + awsCredSource := awsCredentialSource{ + environmentID: c.CredentialSource.EnvironmentID, + regionURL: c.CredentialSource.RegionURL, + regionalCredVerificationURL: c.CredentialSource.RegionalCredVerificationURL, + credVerificationURL: c.CredentialSource.URL, + targetResource: c.Audience, + ctx: ctx, + } + if c.CredentialSource.IMDSv2SessionTokenURL != "" { + awsCredSource.imdsv2SessionTokenURL = c.CredentialSource.IMDSv2SessionTokenURL + } + + return awsCredSource, nil + } + } else if c.CredentialSource.File != "" { + return fileCredentialSource{File: c.CredentialSource.File, Format: c.CredentialSource.Format}, nil + } else if c.CredentialSource.URL != "" { + return urlCredentialSource{URL: c.CredentialSource.URL, Headers: c.CredentialSource.Headers, Format: c.CredentialSource.Format, ctx: ctx}, nil + } else if c.CredentialSource.Executable != nil { + return createExecutableCredential(ctx, c.CredentialSource.Executable, c) + } + return nil, fmt.Errorf("oauth2/google/externalaccount: unable to parse credential source") +} + +type baseCredentialSource interface { + credentialSourceType() string + subjectToken() (string, error) +} + +// tokenSource is the source that handles external credentials. It is used to retrieve Tokens. +type tokenSource struct { + ctx context.Context + conf *Config +} + +func getMetricsHeaderValue(conf *Config, credSource baseCredentialSource) string { + return fmt.Sprintf("gl-go/%s auth/%s google-byoid-sdk source/%s sa-impersonation/%t config-lifetime/%t", + goVersion(), + "unknown", + credSource.credentialSourceType(), + conf.ServiceAccountImpersonationURL != "", + conf.ServiceAccountImpersonationLifetimeSeconds != 0) +} + +// Token allows tokenSource to conform to the oauth2.TokenSource interface. +func (ts tokenSource) Token() (*oauth2.Token, error) { + conf := ts.conf + + credSource, err := conf.parse(ts.ctx) + if err != nil { + return nil, err + } + subjectToken, err := credSource.subjectToken() + + if err != nil { + return nil, err + } + stsRequest := stsexchange.TokenExchangeRequest{ + GrantType: "urn:ietf:params:oauth:grant-type:token-exchange", + Audience: conf.Audience, + Scope: conf.Scopes, + RequestedTokenType: "urn:ietf:params:oauth:token-type:access_token", + SubjectToken: subjectToken, + SubjectTokenType: conf.SubjectTokenType, + } + header := make(http.Header) + header.Add("Content-Type", "application/x-www-form-urlencoded") + header.Add("x-goog-api-client", getMetricsHeaderValue(conf, credSource)) + clientAuth := stsexchange.ClientAuthentication{ + AuthStyle: oauth2.AuthStyleInHeader, + ClientID: conf.ClientID, + ClientSecret: conf.ClientSecret, + } + var options map[string]interface{} + // Do not pass workforce_pool_user_project when client authentication is used. + // The client ID is sufficient for determining the user project. + if conf.WorkforcePoolUserProject != "" && conf.ClientID == "" { + options = map[string]interface{}{ + "userProject": conf.WorkforcePoolUserProject, + } + } + stsResp, err := stsexchange.ExchangeToken(ts.ctx, conf.TokenURL, &stsRequest, clientAuth, header, options) + if err != nil { + return nil, err + } + + accessToken := &oauth2.Token{ + AccessToken: stsResp.AccessToken, + TokenType: stsResp.TokenType, + } + + // The RFC8693 doesn't define the explicit 0 of "expires_in" field behavior. + if stsResp.ExpiresIn <= 0 { + return nil, fmt.Errorf("oauth2/google/externalaccount: got invalid expiry from security token service") + } + accessToken.Expiry = now().Add(time.Duration(stsResp.ExpiresIn) * time.Second) + + if stsResp.RefreshToken != "" { + accessToken.RefreshToken = stsResp.RefreshToken + } + return accessToken, nil +} diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/executablecredsource.go b/vendor/golang.org/x/oauth2/google/externalaccount/executablecredsource.go similarity index 84% rename from vendor/golang.org/x/oauth2/google/internal/externalaccount/executablecredsource.go rename to vendor/golang.org/x/oauth2/google/externalaccount/executablecredsource.go index 6497dc022..dca5681a4 100644 --- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/executablecredsource.go +++ b/vendor/golang.org/x/oauth2/google/externalaccount/executablecredsource.go @@ -19,7 +19,7 @@ import ( "time" ) -var serviceAccountImpersonationRE = regexp.MustCompile("https://iamcredentials.googleapis.com/v1/projects/-/serviceAccounts/(.*@.*):generateAccessToken") +var serviceAccountImpersonationRE = regexp.MustCompile("https://iamcredentials\\..+/v1/projects/-/serviceAccounts/(.*@.*):generateAccessToken") const ( executableSupportedMaxVersion = 1 @@ -39,51 +39,51 @@ func (nce nonCacheableError) Error() string { } func missingFieldError(source, field string) error { - return fmt.Errorf("oauth2/google: %v missing `%q` field", source, field) + return fmt.Errorf("oauth2/google/externalaccount: %v missing `%q` field", source, field) } func jsonParsingError(source, data string) error { - return fmt.Errorf("oauth2/google: unable to parse %v\nResponse: %v", source, data) + return fmt.Errorf("oauth2/google/externalaccount: unable to parse %v\nResponse: %v", source, data) } func malformedFailureError() error { - return nonCacheableError{"oauth2/google: response must include `error` and `message` fields when unsuccessful"} + return nonCacheableError{"oauth2/google/externalaccount: response must include `error` and `message` fields when unsuccessful"} } func userDefinedError(code, message string) error { - return nonCacheableError{fmt.Sprintf("oauth2/google: response contains unsuccessful response: (%v) %v", code, message)} + return nonCacheableError{fmt.Sprintf("oauth2/google/externalaccount: response contains unsuccessful response: (%v) %v", code, message)} } func unsupportedVersionError(source string, version int) error { - return fmt.Errorf("oauth2/google: %v contains unsupported version: %v", source, version) + return fmt.Errorf("oauth2/google/externalaccount: %v contains unsupported version: %v", source, version) } func tokenExpiredError() error { - return nonCacheableError{"oauth2/google: the token returned by the executable is expired"} + return nonCacheableError{"oauth2/google/externalaccount: the token returned by the executable is expired"} } func tokenTypeError(source string) error { - return fmt.Errorf("oauth2/google: %v contains unsupported token type", source) + return fmt.Errorf("oauth2/google/externalaccount: %v contains unsupported token type", source) } func exitCodeError(exitCode int) error { - return fmt.Errorf("oauth2/google: executable command failed with exit code %v", exitCode) + return fmt.Errorf("oauth2/google/externalaccount: executable command failed with exit code %v", exitCode) } func executableError(err error) error { - return fmt.Errorf("oauth2/google: executable command failed: %v", err) + return fmt.Errorf("oauth2/google/externalaccount: executable command failed: %v", err) } func executablesDisallowedError() error { - return errors.New("oauth2/google: executables need to be explicitly allowed (set GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES to '1') to run") + return errors.New("oauth2/google/externalaccount: executables need to be explicitly allowed (set GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES to '1') to run") } func timeoutRangeError() error { - return errors.New("oauth2/google: invalid `timeout_millis` field — executable timeout must be between 5 and 120 seconds") + return errors.New("oauth2/google/externalaccount: invalid `timeout_millis` field — executable timeout must be between 5 and 120 seconds") } func commandMissingError() error { - return errors.New("oauth2/google: missing `command` field — executable command must be provided") + return errors.New("oauth2/google/externalaccount: missing `command` field — executable command must be provided") } type environment interface { @@ -146,7 +146,7 @@ type executableCredentialSource struct { // CreateExecutableCredential creates an executableCredentialSource given an ExecutableConfig. // It also performs defaulting and type conversions. -func CreateExecutableCredential(ctx context.Context, ec *ExecutableConfig, config *Config) (executableCredentialSource, error) { +func createExecutableCredential(ctx context.Context, ec *ExecutableConfig, config *Config) (executableCredentialSource, error) { if ec.Command == "" { return executableCredentialSource{}, commandMissingError() } diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/filecredsource.go b/vendor/golang.org/x/oauth2/google/externalaccount/filecredsource.go similarity index 62% rename from vendor/golang.org/x/oauth2/google/internal/externalaccount/filecredsource.go rename to vendor/golang.org/x/oauth2/google/externalaccount/filecredsource.go index f35f73c5c..33766b972 100644 --- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/filecredsource.go +++ b/vendor/golang.org/x/oauth2/google/externalaccount/filecredsource.go @@ -16,7 +16,7 @@ import ( type fileCredentialSource struct { File string - Format format + Format Format } func (cs fileCredentialSource) credentialSourceType() string { @@ -26,12 +26,12 @@ func (cs fileCredentialSource) credentialSourceType() string { func (cs fileCredentialSource) subjectToken() (string, error) { tokenFile, err := os.Open(cs.File) if err != nil { - return "", fmt.Errorf("oauth2/google: failed to open credential file %q", cs.File) + return "", fmt.Errorf("oauth2/google/externalaccount: failed to open credential file %q", cs.File) } defer tokenFile.Close() tokenBytes, err := ioutil.ReadAll(io.LimitReader(tokenFile, 1<<20)) if err != nil { - return "", fmt.Errorf("oauth2/google: failed to read credential file: %v", err) + return "", fmt.Errorf("oauth2/google/externalaccount: failed to read credential file: %v", err) } tokenBytes = bytes.TrimSpace(tokenBytes) switch cs.Format.Type { @@ -39,15 +39,15 @@ func (cs fileCredentialSource) subjectToken() (string, error) { jsonData := make(map[string]interface{}) err = json.Unmarshal(tokenBytes, &jsonData) if err != nil { - return "", fmt.Errorf("oauth2/google: failed to unmarshal subject token file: %v", err) + return "", fmt.Errorf("oauth2/google/externalaccount: failed to unmarshal subject token file: %v", err) } val, ok := jsonData[cs.Format.SubjectTokenFieldName] if !ok { - return "", errors.New("oauth2/google: provided subject_token_field_name not found in credentials") + return "", errors.New("oauth2/google/externalaccount: provided subject_token_field_name not found in credentials") } token, ok := val.(string) if !ok { - return "", errors.New("oauth2/google: improperly formatted subject token") + return "", errors.New("oauth2/google/externalaccount: improperly formatted subject token") } return token, nil case "text": @@ -55,7 +55,7 @@ func (cs fileCredentialSource) subjectToken() (string, error) { case "": return string(tokenBytes), nil default: - return "", errors.New("oauth2/google: invalid credential_source file format type") + return "", errors.New("oauth2/google/externalaccount: invalid credential_source file format type") } } diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/header.go b/vendor/golang.org/x/oauth2/google/externalaccount/header.go similarity index 100% rename from vendor/golang.org/x/oauth2/google/internal/externalaccount/header.go rename to vendor/golang.org/x/oauth2/google/externalaccount/header.go diff --git a/vendor/golang.org/x/oauth2/google/externalaccount/programmaticrefreshcredsource.go b/vendor/golang.org/x/oauth2/google/externalaccount/programmaticrefreshcredsource.go new file mode 100644 index 000000000..6c1abdf2d --- /dev/null +++ b/vendor/golang.org/x/oauth2/google/externalaccount/programmaticrefreshcredsource.go @@ -0,0 +1,21 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package externalaccount + +import "context" + +type programmaticRefreshCredentialSource struct { + supplierOptions SupplierOptions + subjectTokenSupplier SubjectTokenSupplier + ctx context.Context +} + +func (cs programmaticRefreshCredentialSource) credentialSourceType() string { + return "programmatic" +} + +func (cs programmaticRefreshCredentialSource) subjectToken() (string, error) { + return cs.subjectTokenSupplier.SubjectToken(cs.ctx, cs.supplierOptions) +} diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/urlcredsource.go b/vendor/golang.org/x/oauth2/google/externalaccount/urlcredsource.go similarity index 61% rename from vendor/golang.org/x/oauth2/google/internal/externalaccount/urlcredsource.go rename to vendor/golang.org/x/oauth2/google/externalaccount/urlcredsource.go index 606bb4e80..71a7184e0 100644 --- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/urlcredsource.go +++ b/vendor/golang.org/x/oauth2/google/externalaccount/urlcredsource.go @@ -19,7 +19,7 @@ import ( type urlCredentialSource struct { URL string Headers map[string]string - Format format + Format Format ctx context.Context } @@ -31,7 +31,7 @@ func (cs urlCredentialSource) subjectToken() (string, error) { client := oauth2.NewClient(cs.ctx, nil) req, err := http.NewRequest("GET", cs.URL, nil) if err != nil { - return "", fmt.Errorf("oauth2/google: HTTP request for URL-sourced credential failed: %v", err) + return "", fmt.Errorf("oauth2/google/externalaccount: HTTP request for URL-sourced credential failed: %v", err) } req = req.WithContext(cs.ctx) @@ -40,16 +40,16 @@ func (cs urlCredentialSource) subjectToken() (string, error) { } resp, err := client.Do(req) if err != nil { - return "", fmt.Errorf("oauth2/google: invalid response when retrieving subject token: %v", err) + return "", fmt.Errorf("oauth2/google/externalaccount: invalid response when retrieving subject token: %v", err) } defer resp.Body.Close() respBody, err := ioutil.ReadAll(io.LimitReader(resp.Body, 1<<20)) if err != nil { - return "", fmt.Errorf("oauth2/google: invalid body in subject token URL query: %v", err) + return "", fmt.Errorf("oauth2/google/externalaccount: invalid body in subject token URL query: %v", err) } if c := resp.StatusCode; c < 200 || c > 299 { - return "", fmt.Errorf("oauth2/google: status code %d: %s", c, respBody) + return "", fmt.Errorf("oauth2/google/externalaccount: status code %d: %s", c, respBody) } switch cs.Format.Type { @@ -57,15 +57,15 @@ func (cs urlCredentialSource) subjectToken() (string, error) { jsonData := make(map[string]interface{}) err = json.Unmarshal(respBody, &jsonData) if err != nil { - return "", fmt.Errorf("oauth2/google: failed to unmarshal subject token file: %v", err) + return "", fmt.Errorf("oauth2/google/externalaccount: failed to unmarshal subject token file: %v", err) } val, ok := jsonData[cs.Format.SubjectTokenFieldName] if !ok { - return "", errors.New("oauth2/google: provided subject_token_field_name not found in credentials") + return "", errors.New("oauth2/google/externalaccount: provided subject_token_field_name not found in credentials") } token, ok := val.(string) if !ok { - return "", errors.New("oauth2/google: improperly formatted subject token") + return "", errors.New("oauth2/google/externalaccount: improperly formatted subject token") } return token, nil case "text": @@ -73,7 +73,7 @@ func (cs urlCredentialSource) subjectToken() (string, error) { case "": return string(respBody), nil default: - return "", errors.New("oauth2/google: invalid credential_source file format type") + return "", errors.New("oauth2/google/externalaccount: invalid credential_source file format type") } } diff --git a/vendor/golang.org/x/oauth2/google/google.go b/vendor/golang.org/x/oauth2/google/google.go index c66c53527..7b82e7a08 100644 --- a/vendor/golang.org/x/oauth2/google/google.go +++ b/vendor/golang.org/x/oauth2/google/google.go @@ -15,8 +15,9 @@ import ( "cloud.google.com/go/compute/metadata" "golang.org/x/oauth2" - "golang.org/x/oauth2/google/internal/externalaccount" + "golang.org/x/oauth2/google/externalaccount" "golang.org/x/oauth2/google/internal/externalaccountauthorizeduser" + "golang.org/x/oauth2/google/internal/impersonate" "golang.org/x/oauth2/jwt" ) @@ -200,12 +201,12 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar ServiceAccountImpersonationLifetimeSeconds: f.ServiceAccountImpersonation.TokenLifetimeSeconds, ClientSecret: f.ClientSecret, ClientID: f.ClientID, - CredentialSource: f.CredentialSource, + CredentialSource: &f.CredentialSource, QuotaProjectID: f.QuotaProjectID, Scopes: params.Scopes, WorkforcePoolUserProject: f.WorkforcePoolUserProject, } - return cfg.TokenSource(ctx) + return externalaccount.NewTokenSource(ctx, *cfg) case externalAccountAuthorizedUserKey: cfg := &externalaccountauthorizeduser.Config{ Audience: f.Audience, @@ -228,7 +229,7 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar if err != nil { return nil, err } - imp := externalaccount.ImpersonateTokenSource{ + imp := impersonate.ImpersonateTokenSource{ Ctx: ctx, URL: f.ServiceAccountImpersonationURL, Scopes: params.Scopes, @@ -251,7 +252,10 @@ func (f *credentialsFile) tokenSource(ctx context.Context, params CredentialsPar // Further information about retrieving access tokens from the GCE metadata // server can be found at https://cloud.google.com/compute/docs/authentication. func ComputeTokenSource(account string, scope ...string) oauth2.TokenSource { - return computeTokenSource(account, 0, scope...) + // refresh 3 minutes and 45 seconds early. The shortest MDS cache is currently 4 minutes, so any + // refreshes earlier are a waste of compute. + earlyExpirySecs := 225 * time.Second + return computeTokenSource(account, earlyExpirySecs, scope...) } func computeTokenSource(account string, earlyExpiry time.Duration, scope ...string) oauth2.TokenSource { diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go b/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go deleted file mode 100644 index 33288d367..000000000 --- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/basecredentials.go +++ /dev/null @@ -1,254 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package externalaccount - -import ( - "context" - "fmt" - "net/http" - "regexp" - "strconv" - "time" - - "golang.org/x/oauth2" - "golang.org/x/oauth2/google/internal/stsexchange" -) - -// now aliases time.Now for testing -var now = func() time.Time { - return time.Now().UTC() -} - -// Config stores the configuration for fetching tokens with external credentials. -type Config struct { - // Audience is the Secure Token Service (STS) audience which contains the resource name for the workload - // identity pool or the workforce pool and the provider identifier in that pool. - Audience string - // SubjectTokenType is the STS token type based on the Oauth2.0 token exchange spec - // e.g. `urn:ietf:params:oauth:token-type:jwt`. - SubjectTokenType string - // TokenURL is the STS token exchange endpoint. - TokenURL string - // TokenInfoURL is the token_info endpoint used to retrieve the account related information ( - // user attributes like account identifier, eg. email, username, uid, etc). This is - // needed for gCloud session account identification. - TokenInfoURL string - // ServiceAccountImpersonationURL is the URL for the service account impersonation request. This is only - // required for workload identity pools when APIs to be accessed have not integrated with UberMint. - ServiceAccountImpersonationURL string - // ServiceAccountImpersonationLifetimeSeconds is the number of seconds the service account impersonation - // token will be valid for. - ServiceAccountImpersonationLifetimeSeconds int - // ClientSecret is currently only required if token_info endpoint also - // needs to be called with the generated GCP access token. When provided, STS will be - // called with additional basic authentication using client_id as username and client_secret as password. - ClientSecret string - // ClientID is only required in conjunction with ClientSecret, as described above. - ClientID string - // CredentialSource contains the necessary information to retrieve the token itself, as well - // as some environmental information. - CredentialSource CredentialSource - // QuotaProjectID is injected by gCloud. If the value is non-empty, the Auth libraries - // will set the x-goog-user-project which overrides the project associated with the credentials. - QuotaProjectID string - // Scopes contains the desired scopes for the returned access token. - Scopes []string - // The optional workforce pool user project number when the credential - // corresponds to a workforce pool and not a workload identity pool. - // The underlying principal must still have serviceusage.services.use IAM - // permission to use the project for billing/quota. - WorkforcePoolUserProject string -} - -var ( - validWorkforceAudiencePattern *regexp.Regexp = regexp.MustCompile(`//iam\.googleapis\.com/locations/[^/]+/workforcePools/`) -) - -func validateWorkforceAudience(input string) bool { - return validWorkforceAudiencePattern.MatchString(input) -} - -// TokenSource Returns an external account TokenSource struct. This is to be called by package google to construct a google.Credentials. -func (c *Config) TokenSource(ctx context.Context) (oauth2.TokenSource, error) { - return c.tokenSource(ctx, "https") -} - -// tokenSource is a private function that's directly called by some of the tests, -// because the unit test URLs are mocked, and would otherwise fail the -// validity check. -func (c *Config) tokenSource(ctx context.Context, scheme string) (oauth2.TokenSource, error) { - if c.WorkforcePoolUserProject != "" { - valid := validateWorkforceAudience(c.Audience) - if !valid { - return nil, fmt.Errorf("oauth2/google: workforce_pool_user_project should not be set for non-workforce pool credentials") - } - } - - ts := tokenSource{ - ctx: ctx, - conf: c, - } - if c.ServiceAccountImpersonationURL == "" { - return oauth2.ReuseTokenSource(nil, ts), nil - } - scopes := c.Scopes - ts.conf.Scopes = []string{"https://www.googleapis.com/auth/cloud-platform"} - imp := ImpersonateTokenSource{ - Ctx: ctx, - URL: c.ServiceAccountImpersonationURL, - Scopes: scopes, - Ts: oauth2.ReuseTokenSource(nil, ts), - TokenLifetimeSeconds: c.ServiceAccountImpersonationLifetimeSeconds, - } - return oauth2.ReuseTokenSource(nil, imp), nil -} - -// Subject token file types. -const ( - fileTypeText = "text" - fileTypeJSON = "json" -) - -type format struct { - // Type is either "text" or "json". When not provided "text" type is assumed. - Type string `json:"type"` - // SubjectTokenFieldName is only required for JSON format. This would be "access_token" for azure. - SubjectTokenFieldName string `json:"subject_token_field_name"` -} - -// CredentialSource stores the information necessary to retrieve the credentials for the STS exchange. -// One field amongst File, URL, and Executable should be filled, depending on the kind of credential in question. -// The EnvironmentID should start with AWS if being used for an AWS credential. -type CredentialSource struct { - File string `json:"file"` - - URL string `json:"url"` - Headers map[string]string `json:"headers"` - - Executable *ExecutableConfig `json:"executable"` - - EnvironmentID string `json:"environment_id"` - RegionURL string `json:"region_url"` - RegionalCredVerificationURL string `json:"regional_cred_verification_url"` - CredVerificationURL string `json:"cred_verification_url"` - IMDSv2SessionTokenURL string `json:"imdsv2_session_token_url"` - Format format `json:"format"` -} - -type ExecutableConfig struct { - Command string `json:"command"` - TimeoutMillis *int `json:"timeout_millis"` - OutputFile string `json:"output_file"` -} - -// parse determines the type of CredentialSource needed. -func (c *Config) parse(ctx context.Context) (baseCredentialSource, error) { - if len(c.CredentialSource.EnvironmentID) > 3 && c.CredentialSource.EnvironmentID[:3] == "aws" { - if awsVersion, err := strconv.Atoi(c.CredentialSource.EnvironmentID[3:]); err == nil { - if awsVersion != 1 { - return nil, fmt.Errorf("oauth2/google: aws version '%d' is not supported in the current build", awsVersion) - } - - awsCredSource := awsCredentialSource{ - EnvironmentID: c.CredentialSource.EnvironmentID, - RegionURL: c.CredentialSource.RegionURL, - RegionalCredVerificationURL: c.CredentialSource.RegionalCredVerificationURL, - CredVerificationURL: c.CredentialSource.URL, - TargetResource: c.Audience, - ctx: ctx, - } - if c.CredentialSource.IMDSv2SessionTokenURL != "" { - awsCredSource.IMDSv2SessionTokenURL = c.CredentialSource.IMDSv2SessionTokenURL - } - - return awsCredSource, nil - } - } else if c.CredentialSource.File != "" { - return fileCredentialSource{File: c.CredentialSource.File, Format: c.CredentialSource.Format}, nil - } else if c.CredentialSource.URL != "" { - return urlCredentialSource{URL: c.CredentialSource.URL, Headers: c.CredentialSource.Headers, Format: c.CredentialSource.Format, ctx: ctx}, nil - } else if c.CredentialSource.Executable != nil { - return CreateExecutableCredential(ctx, c.CredentialSource.Executable, c) - } - return nil, fmt.Errorf("oauth2/google: unable to parse credential source") -} - -type baseCredentialSource interface { - credentialSourceType() string - subjectToken() (string, error) -} - -// tokenSource is the source that handles external credentials. It is used to retrieve Tokens. -type tokenSource struct { - ctx context.Context - conf *Config -} - -func getMetricsHeaderValue(conf *Config, credSource baseCredentialSource) string { - return fmt.Sprintf("gl-go/%s auth/%s google-byoid-sdk source/%s sa-impersonation/%t config-lifetime/%t", - goVersion(), - "unknown", - credSource.credentialSourceType(), - conf.ServiceAccountImpersonationURL != "", - conf.ServiceAccountImpersonationLifetimeSeconds != 0) -} - -// Token allows tokenSource to conform to the oauth2.TokenSource interface. -func (ts tokenSource) Token() (*oauth2.Token, error) { - conf := ts.conf - - credSource, err := conf.parse(ts.ctx) - if err != nil { - return nil, err - } - subjectToken, err := credSource.subjectToken() - - if err != nil { - return nil, err - } - stsRequest := stsexchange.TokenExchangeRequest{ - GrantType: "urn:ietf:params:oauth:grant-type:token-exchange", - Audience: conf.Audience, - Scope: conf.Scopes, - RequestedTokenType: "urn:ietf:params:oauth:token-type:access_token", - SubjectToken: subjectToken, - SubjectTokenType: conf.SubjectTokenType, - } - header := make(http.Header) - header.Add("Content-Type", "application/x-www-form-urlencoded") - header.Add("x-goog-api-client", getMetricsHeaderValue(conf, credSource)) - clientAuth := stsexchange.ClientAuthentication{ - AuthStyle: oauth2.AuthStyleInHeader, - ClientID: conf.ClientID, - ClientSecret: conf.ClientSecret, - } - var options map[string]interface{} - // Do not pass workforce_pool_user_project when client authentication is used. - // The client ID is sufficient for determining the user project. - if conf.WorkforcePoolUserProject != "" && conf.ClientID == "" { - options = map[string]interface{}{ - "userProject": conf.WorkforcePoolUserProject, - } - } - stsResp, err := stsexchange.ExchangeToken(ts.ctx, conf.TokenURL, &stsRequest, clientAuth, header, options) - if err != nil { - return nil, err - } - - accessToken := &oauth2.Token{ - AccessToken: stsResp.AccessToken, - TokenType: stsResp.TokenType, - } - if stsResp.ExpiresIn < 0 { - return nil, fmt.Errorf("oauth2/google: got invalid expiry from security token service") - } else if stsResp.ExpiresIn >= 0 { - accessToken.Expiry = now().Add(time.Duration(stsResp.ExpiresIn) * time.Second) - } - - if stsResp.RefreshToken != "" { - accessToken.RefreshToken = stsResp.RefreshToken - } - return accessToken, nil -} diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/err.go b/vendor/golang.org/x/oauth2/google/internal/externalaccount/err.go deleted file mode 100644 index 233a78cef..000000000 --- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/err.go +++ /dev/null @@ -1,18 +0,0 @@ -// Copyright 2020 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package externalaccount - -import "fmt" - -// Error for handling OAuth related error responses as stated in rfc6749#5.2. -type Error struct { - Code string - URI string - Description string -} - -func (err *Error) Error() string { - return fmt.Sprintf("got error code %s from %s: %s", err.Code, err.URI, err.Description) -} diff --git a/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go b/vendor/golang.org/x/oauth2/google/internal/impersonate/impersonate.go similarity index 99% rename from vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go rename to vendor/golang.org/x/oauth2/google/internal/impersonate/impersonate.go index 54c8f209f..6bc3af110 100644 --- a/vendor/golang.org/x/oauth2/google/internal/externalaccount/impersonate.go +++ b/vendor/golang.org/x/oauth2/google/internal/impersonate/impersonate.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -package externalaccount +package impersonate import ( "bytes" diff --git a/vendor/golang.org/x/oauth2/internal/client_appengine.go b/vendor/golang.org/x/oauth2/internal/client_appengine.go deleted file mode 100644 index d28140f78..000000000 --- a/vendor/golang.org/x/oauth2/internal/client_appengine.go +++ /dev/null @@ -1,13 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build appengine - -package internal - -import "google.golang.org/appengine/urlfetch" - -func init() { - appengineClientHook = urlfetch.Client -} diff --git a/vendor/golang.org/x/oauth2/internal/transport.go b/vendor/golang.org/x/oauth2/internal/transport.go index 572074a63..b9db01ddf 100644 --- a/vendor/golang.org/x/oauth2/internal/transport.go +++ b/vendor/golang.org/x/oauth2/internal/transport.go @@ -18,16 +18,11 @@ var HTTPClient ContextKey // because nobody else can create a ContextKey, being unexported. type ContextKey struct{} -var appengineClientHook func(context.Context) *http.Client - func ContextClient(ctx context.Context) *http.Client { if ctx != nil { if hc, ok := ctx.Value(HTTPClient).(*http.Client); ok { return hc } } - if appengineClientHook != nil { - return appengineClientHook(ctx) - } return http.DefaultClient } diff --git a/vendor/golang.org/x/oauth2/oauth2.go b/vendor/golang.org/x/oauth2/oauth2.go index 90a2c3d6d..09f6a49b8 100644 --- a/vendor/golang.org/x/oauth2/oauth2.go +++ b/vendor/golang.org/x/oauth2/oauth2.go @@ -393,7 +393,7 @@ func ReuseTokenSource(t *Token, src TokenSource) TokenSource { } } -// ReuseTokenSource returns a TokenSource that acts in the same manner as the +// ReuseTokenSourceWithExpiry returns a TokenSource that acts in the same manner as the // TokenSource returned by ReuseTokenSource, except the expiry buffer is // configurable. The expiration time of a token is calculated as // t.Expiry.Add(-earlyExpiry). diff --git a/vendor/golang.org/x/sync/LICENSE b/vendor/golang.org/x/sync/LICENSE index 6a66aea5e..2a7cf70da 100644 --- a/vendor/golang.org/x/sync/LICENSE +++ b/vendor/golang.org/x/sync/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/sys/LICENSE b/vendor/golang.org/x/sys/LICENSE index 6a66aea5e..2a7cf70da 100644 --- a/vendor/golang.org/x/sys/LICENSE +++ b/vendor/golang.org/x/sys/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/sys/cpu/cpu.go b/vendor/golang.org/x/sys/cpu/cpu.go index 8fa707aa4..02609d5b2 100644 --- a/vendor/golang.org/x/sys/cpu/cpu.go +++ b/vendor/golang.org/x/sys/cpu/cpu.go @@ -105,6 +105,8 @@ var ARM64 struct { HasSVE bool // Scalable Vector Extensions HasSVE2 bool // Scalable Vector Extensions 2 HasASIMDFHM bool // Advanced SIMD multiplication FP16 to FP32 + HasDIT bool // Data Independent Timing support + HasI8MM bool // Advanced SIMD Int8 matrix multiplication instructions _ CacheLinePad } @@ -199,6 +201,25 @@ var S390X struct { _ CacheLinePad } +// RISCV64 contains the supported CPU features and performance characteristics for riscv64 +// platforms. The booleans in RISCV64, with the exception of HasFastMisaligned, indicate +// the presence of RISC-V extensions. +// +// It is safe to assume that all the RV64G extensions are supported and so they are omitted from +// this structure. As riscv64 Go programs require at least RV64G, the code that populates +// this structure cannot run successfully if some of the RV64G extensions are missing. +// The struct is padded to avoid false sharing. +var RISCV64 struct { + _ CacheLinePad + HasFastMisaligned bool // Fast misaligned accesses + HasC bool // Compressed instruction-set extension + HasV bool // Vector extension compatible with RVV 1.0 + HasZba bool // Address generation instructions extension + HasZbb bool // Basic bit-manipulation extension + HasZbs bool // Single-bit instructions extension + _ CacheLinePad +} + func init() { archInit() initOptions() diff --git a/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_arm64.go index 0e27a21e1..af2aa99f9 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_arm64.go @@ -38,6 +38,8 @@ func initOptions() { {Name: "dcpop", Feature: &ARM64.HasDCPOP}, {Name: "asimddp", Feature: &ARM64.HasASIMDDP}, {Name: "asimdfhm", Feature: &ARM64.HasASIMDFHM}, + {Name: "dit", Feature: &ARM64.HasDIT}, + {Name: "i8mm", Feature: &ARM64.HasI8MM}, } } @@ -145,6 +147,11 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) { ARM64.HasLRCPC = true } + switch extractBits(isar1, 52, 55) { + case 1: + ARM64.HasI8MM = true + } + // ID_AA64PFR0_EL1 switch extractBits(pfr0, 16, 19) { case 0: @@ -168,6 +175,11 @@ func parseARM64SystemRegisters(isar0, isar1, pfr0 uint64) { parseARM64SVERegister(getzfr0()) } + + switch extractBits(pfr0, 48, 51) { + case 1: + ARM64.HasDIT = true + } } func parseARM64SVERegister(zfr0 uint64) { diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go b/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go index 3d386d0fc..08f35ea17 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_arm64.go @@ -35,8 +35,10 @@ const ( hwcap_SHA512 = 1 << 21 hwcap_SVE = 1 << 22 hwcap_ASIMDFHM = 1 << 23 + hwcap_DIT = 1 << 24 hwcap2_SVE2 = 1 << 1 + hwcap2_I8MM = 1 << 13 ) // linuxKernelCanEmulateCPUID reports whether we're running @@ -106,9 +108,12 @@ func doinit() { ARM64.HasSHA512 = isSet(hwCap, hwcap_SHA512) ARM64.HasSVE = isSet(hwCap, hwcap_SVE) ARM64.HasASIMDFHM = isSet(hwCap, hwcap_ASIMDFHM) + ARM64.HasDIT = isSet(hwCap, hwcap_DIT) + // HWCAP2 feature bits ARM64.HasSVE2 = isSet(hwCap2, hwcap2_SVE2) + ARM64.HasI8MM = isSet(hwCap2, hwcap2_I8MM) } func isSet(hwc uint, value uint) bool { diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go index cd63e7335..7d902b684 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. -//go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x +//go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x && !riscv64 package cpu diff --git a/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go new file mode 100644 index 000000000..cb4a0c572 --- /dev/null +++ b/vendor/golang.org/x/sys/cpu/cpu_linux_riscv64.go @@ -0,0 +1,137 @@ +// Copyright 2024 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package cpu + +import ( + "syscall" + "unsafe" +) + +// RISC-V extension discovery code for Linux. The approach here is to first try the riscv_hwprobe +// syscall falling back to HWCAP to check for the C extension if riscv_hwprobe is not available. +// +// A note on detection of the Vector extension using HWCAP. +// +// Support for the Vector extension version 1.0 was added to the Linux kernel in release 6.5. +// Support for the riscv_hwprobe syscall was added in 6.4. It follows that if the riscv_hwprobe +// syscall is not available then neither is the Vector extension (which needs kernel support). +// The riscv_hwprobe syscall should then be all we need to detect the Vector extension. +// However, some RISC-V board manufacturers ship boards with an older kernel on top of which +// they have back-ported various versions of the Vector extension patches but not the riscv_hwprobe +// patches. These kernels advertise support for the Vector extension using HWCAP. Falling +// back to HWCAP to detect the Vector extension, if riscv_hwprobe is not available, or simply not +// bothering with riscv_hwprobe at all and just using HWCAP may then seem like an attractive option. +// +// Unfortunately, simply checking the 'V' bit in AT_HWCAP will not work as this bit is used by +// RISC-V board and cloud instance providers to mean different things. The Lichee Pi 4A board +// and the Scaleway RV1 cloud instances use the 'V' bit to advertise their support for the unratified +// 0.7.1 version of the Vector Specification. The Banana Pi BPI-F3 and the CanMV-K230 board use +// it to advertise support for 1.0 of the Vector extension. Versions 0.7.1 and 1.0 of the Vector +// extension are binary incompatible. HWCAP can then not be used in isolation to populate the +// HasV field as this field indicates that the underlying CPU is compatible with RVV 1.0. +// +// There is a way at runtime to distinguish between versions 0.7.1 and 1.0 of the Vector +// specification by issuing a RVV 1.0 vsetvli instruction and checking the vill bit of the vtype +// register. This check would allow us to safely detect version 1.0 of the Vector extension +// with HWCAP, if riscv_hwprobe were not available. However, the check cannot +// be added until the assembler supports the Vector instructions. +// +// Note the riscv_hwprobe syscall does not suffer from these ambiguities by design as all of the +// extensions it advertises support for are explicitly versioned. It's also worth noting that +// the riscv_hwprobe syscall is the only way to detect multi-letter RISC-V extensions, e.g., Zba. +// These cannot be detected using HWCAP and so riscv_hwprobe must be used to detect the majority +// of RISC-V extensions. +// +// Please see https://docs.kernel.org/arch/riscv/hwprobe.html for more information. + +// golang.org/x/sys/cpu is not allowed to depend on golang.org/x/sys/unix so we must +// reproduce the constants, types and functions needed to make the riscv_hwprobe syscall +// here. + +const ( + // Copied from golang.org/x/sys/unix/ztypes_linux_riscv64.go. + riscv_HWPROBE_KEY_IMA_EXT_0 = 0x4 + riscv_HWPROBE_IMA_C = 0x2 + riscv_HWPROBE_IMA_V = 0x4 + riscv_HWPROBE_EXT_ZBA = 0x8 + riscv_HWPROBE_EXT_ZBB = 0x10 + riscv_HWPROBE_EXT_ZBS = 0x20 + riscv_HWPROBE_KEY_CPUPERF_0 = 0x5 + riscv_HWPROBE_MISALIGNED_FAST = 0x3 + riscv_HWPROBE_MISALIGNED_MASK = 0x7 +) + +const ( + // sys_RISCV_HWPROBE is copied from golang.org/x/sys/unix/zsysnum_linux_riscv64.go. + sys_RISCV_HWPROBE = 258 +) + +// riscvHWProbePairs is copied from golang.org/x/sys/unix/ztypes_linux_riscv64.go. +type riscvHWProbePairs struct { + key int64 + value uint64 +} + +const ( + // CPU features + hwcap_RISCV_ISA_C = 1 << ('C' - 'A') +) + +func doinit() { + // A slice of key/value pair structures is passed to the RISCVHWProbe syscall. The key + // field should be initialised with one of the key constants defined above, e.g., + // RISCV_HWPROBE_KEY_IMA_EXT_0. The syscall will set the value field to the appropriate value. + // If the kernel does not recognise a key it will set the key field to -1 and the value field to 0. + + pairs := []riscvHWProbePairs{ + {riscv_HWPROBE_KEY_IMA_EXT_0, 0}, + {riscv_HWPROBE_KEY_CPUPERF_0, 0}, + } + + // This call only indicates that extensions are supported if they are implemented on all cores. + if riscvHWProbe(pairs, 0) { + if pairs[0].key != -1 { + v := uint(pairs[0].value) + RISCV64.HasC = isSet(v, riscv_HWPROBE_IMA_C) + RISCV64.HasV = isSet(v, riscv_HWPROBE_IMA_V) + RISCV64.HasZba = isSet(v, riscv_HWPROBE_EXT_ZBA) + RISCV64.HasZbb = isSet(v, riscv_HWPROBE_EXT_ZBB) + RISCV64.HasZbs = isSet(v, riscv_HWPROBE_EXT_ZBS) + } + if pairs[1].key != -1 { + v := pairs[1].value & riscv_HWPROBE_MISALIGNED_MASK + RISCV64.HasFastMisaligned = v == riscv_HWPROBE_MISALIGNED_FAST + } + } + + // Let's double check with HWCAP if the C extension does not appear to be supported. + // This may happen if we're running on a kernel older than 6.4. + + if !RISCV64.HasC { + RISCV64.HasC = isSet(hwCap, hwcap_RISCV_ISA_C) + } +} + +func isSet(hwc uint, value uint) bool { + return hwc&value != 0 +} + +// riscvHWProbe is a simplified version of the generated wrapper function found in +// golang.org/x/sys/unix/zsyscall_linux_riscv64.go. We simplify it by removing the +// cpuCount and cpus parameters which we do not need. We always want to pass 0 for +// these parameters here so the kernel only reports the extensions that are present +// on all cores. +func riscvHWProbe(pairs []riscvHWProbePairs, flags uint) bool { + var _zero uintptr + var p0 unsafe.Pointer + if len(pairs) > 0 { + p0 = unsafe.Pointer(&pairs[0]) + } else { + p0 = unsafe.Pointer(&_zero) + } + + _, _, e1 := syscall.Syscall6(sys_RISCV_HWPROBE, uintptr(p0), uintptr(len(pairs)), uintptr(0), uintptr(0), uintptr(flags), 0) + return e1 == 0 +} diff --git a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go index 7f0c79c00..aca3199c9 100644 --- a/vendor/golang.org/x/sys/cpu/cpu_riscv64.go +++ b/vendor/golang.org/x/sys/cpu/cpu_riscv64.go @@ -8,4 +8,13 @@ package cpu const cacheLineSize = 64 -func initOptions() {} +func initOptions() { + options = []option{ + {Name: "fastmisaligned", Feature: &RISCV64.HasFastMisaligned}, + {Name: "c", Feature: &RISCV64.HasC}, + {Name: "v", Feature: &RISCV64.HasV}, + {Name: "zba", Feature: &RISCV64.HasZba}, + {Name: "zbb", Feature: &RISCV64.HasZbb}, + {Name: "zbs", Feature: &RISCV64.HasZbs}, + } +} diff --git a/vendor/golang.org/x/sys/unix/mkerrors.sh b/vendor/golang.org/x/sys/unix/mkerrors.sh index 4ed2e488b..e14b766a3 100644 --- a/vendor/golang.org/x/sys/unix/mkerrors.sh +++ b/vendor/golang.org/x/sys/unix/mkerrors.sh @@ -58,6 +58,7 @@ includes_Darwin=' #define _DARWIN_USE_64_BIT_INODE #define __APPLE_USE_RFC_3542 #include +#include #include #include #include @@ -551,6 +552,7 @@ ccflags="$@" $2 !~ /^RTC_VL_(ACCURACY|BACKUP|DATA)/ && $2 ~ /^(NETLINK|NLM|NLMSG|NLA|IFA|IFAN|RT|RTC|RTCF|RTN|RTPROT|RTNH|ARPHRD|ETH_P|NETNSA)_/ || $2 ~ /^SOCK_|SK_DIAG_|SKNLGRP_$/ || + $2 ~ /^(CONNECT|SAE)_/ || $2 ~ /^FIORDCHK$/ || $2 ~ /^SIOC/ || $2 ~ /^TIOC/ || diff --git a/vendor/golang.org/x/sys/unix/mremap.go b/vendor/golang.org/x/sys/unix/mremap.go index fd45fe529..3a5e776f8 100644 --- a/vendor/golang.org/x/sys/unix/mremap.go +++ b/vendor/golang.org/x/sys/unix/mremap.go @@ -50,3 +50,8 @@ func (m *mremapMmapper) Mremap(oldData []byte, newLength int, flags int) (data [ func Mremap(oldData []byte, newLength int, flags int) (data []byte, err error) { return mapper.Mremap(oldData, newLength, flags) } + +func MremapPtr(oldAddr unsafe.Pointer, oldSize uintptr, newAddr unsafe.Pointer, newSize uintptr, flags int) (ret unsafe.Pointer, err error) { + xaddr, err := mapper.mremap(uintptr(oldAddr), oldSize, newSize, flags, uintptr(newAddr)) + return unsafe.Pointer(xaddr), err +} diff --git a/vendor/golang.org/x/sys/unix/syscall_darwin.go b/vendor/golang.org/x/sys/unix/syscall_darwin.go index 59542a897..099867dee 100644 --- a/vendor/golang.org/x/sys/unix/syscall_darwin.go +++ b/vendor/golang.org/x/sys/unix/syscall_darwin.go @@ -402,6 +402,18 @@ func IoctlSetIfreqMTU(fd int, ifreq *IfreqMTU) error { return ioctlPtr(fd, SIOCSIFMTU, unsafe.Pointer(ifreq)) } +//sys renamexNp(from string, to string, flag uint32) (err error) + +func RenamexNp(from string, to string, flag uint32) (err error) { + return renamexNp(from, to, flag) +} + +//sys renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) + +func RenameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) { + return renameatxNp(fromfd, from, tofd, to, flag) +} + //sys sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) = SYS_SYSCTL func Uname(uname *Utsname) error { @@ -542,6 +554,55 @@ func SysctlKinfoProcSlice(name string, args ...int) ([]KinfoProc, error) { } } +//sys pthread_chdir_np(path string) (err error) + +func PthreadChdir(path string) (err error) { + return pthread_chdir_np(path) +} + +//sys pthread_fchdir_np(fd int) (err error) + +func PthreadFchdir(fd int) (err error) { + return pthread_fchdir_np(fd) +} + +// Connectx calls connectx(2) to initiate a connection on a socket. +// +// srcIf, srcAddr, and dstAddr are filled into a [SaEndpoints] struct and passed as the endpoints argument. +// +// - srcIf is the optional source interface index. 0 means unspecified. +// - srcAddr is the optional source address. nil means unspecified. +// - dstAddr is the destination address. +// +// On success, Connectx returns the number of bytes enqueued for transmission. +func Connectx(fd int, srcIf uint32, srcAddr, dstAddr Sockaddr, associd SaeAssocID, flags uint32, iov []Iovec, connid *SaeConnID) (n uintptr, err error) { + endpoints := SaEndpoints{ + Srcif: srcIf, + } + + if srcAddr != nil { + addrp, addrlen, err := srcAddr.sockaddr() + if err != nil { + return 0, err + } + endpoints.Srcaddr = (*RawSockaddr)(addrp) + endpoints.Srcaddrlen = uint32(addrlen) + } + + if dstAddr != nil { + addrp, addrlen, err := dstAddr.sockaddr() + if err != nil { + return 0, err + } + endpoints.Dstaddr = (*RawSockaddr)(addrp) + endpoints.Dstaddrlen = uint32(addrlen) + } + + err = connectx(fd, &endpoints, associd, flags, iov, &n, connid) + return +} + +//sys connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) //sys sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) //sys shmat(id int, addr uintptr, flag int) (ret uintptr, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_hurd.go b/vendor/golang.org/x/sys/unix/syscall_hurd.go index ba46651f8..a6a2d2fc2 100644 --- a/vendor/golang.org/x/sys/unix/syscall_hurd.go +++ b/vendor/golang.org/x/sys/unix/syscall_hurd.go @@ -11,6 +11,7 @@ package unix int ioctl(int, unsigned long int, uintptr_t); */ import "C" +import "unsafe" func ioctl(fd int, req uint, arg uintptr) (err error) { r0, er := C.ioctl(C.int(fd), C.ulong(req), C.uintptr_t(arg)) diff --git a/vendor/golang.org/x/sys/unix/syscall_linux.go b/vendor/golang.org/x/sys/unix/syscall_linux.go index 5682e2628..3f1d3d4cb 100644 --- a/vendor/golang.org/x/sys/unix/syscall_linux.go +++ b/vendor/golang.org/x/sys/unix/syscall_linux.go @@ -2592,3 +2592,4 @@ func SchedGetAttr(pid int, flags uint) (*SchedAttr, error) { } //sys Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) (err error) +//sys Mseal(b []byte, flags uint) (err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_openbsd.go b/vendor/golang.org/x/sys/unix/syscall_openbsd.go index b25343c71..b86ded549 100644 --- a/vendor/golang.org/x/sys/unix/syscall_openbsd.go +++ b/vendor/golang.org/x/sys/unix/syscall_openbsd.go @@ -293,6 +293,7 @@ func Uname(uname *Utsname) error { //sys Mkfifoat(dirfd int, path string, mode uint32) (err error) //sys Mknod(path string, mode uint32, dev int) (err error) //sys Mknodat(dirfd int, path string, mode uint32, dev int) (err error) +//sys Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) //sys Nanosleep(time *Timespec, leftover *Timespec) (err error) //sys Open(path string, mode int, perm uint32) (fd int, err error) //sys Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) diff --git a/vendor/golang.org/x/sys/unix/syscall_unix.go b/vendor/golang.org/x/sys/unix/syscall_unix.go index 77081de8c..4e92e5aa4 100644 --- a/vendor/golang.org/x/sys/unix/syscall_unix.go +++ b/vendor/golang.org/x/sys/unix/syscall_unix.go @@ -154,6 +154,15 @@ func Munmap(b []byte) (err error) { return mapper.Munmap(b) } +func MmapPtr(fd int, offset int64, addr unsafe.Pointer, length uintptr, prot int, flags int) (ret unsafe.Pointer, err error) { + xaddr, err := mapper.mmap(uintptr(addr), length, prot, flags, fd, offset) + return unsafe.Pointer(xaddr), err +} + +func MunmapPtr(addr unsafe.Pointer, length uintptr) (err error) { + return mapper.munmap(uintptr(addr), length) +} + func Read(fd int, p []byte) (n int, err error) { n, err = read(fd, p) if raceenabled { diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go index e40fa8524..d73c4652e 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_amd64.go @@ -237,6 +237,9 @@ const ( CLOCK_UPTIME_RAW_APPROX = 0x9 CLONE_NOFOLLOW = 0x1 CLONE_NOOWNERCOPY = 0x2 + CONNECT_DATA_AUTHENTICATED = 0x4 + CONNECT_DATA_IDEMPOTENT = 0x2 + CONNECT_RESUME_ON_READ_WRITE = 0x1 CR0 = 0x0 CR1 = 0x1000 CR2 = 0x2000 @@ -1169,6 +1172,11 @@ const ( PT_WRITE_D = 0x5 PT_WRITE_I = 0x4 PT_WRITE_U = 0x6 + RENAME_EXCL = 0x4 + RENAME_NOFOLLOW_ANY = 0x10 + RENAME_RESERVED1 = 0x8 + RENAME_SECLUDE = 0x1 + RENAME_SWAP = 0x2 RLIMIT_AS = 0x5 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 @@ -1260,6 +1268,10 @@ const ( RTV_SSTHRESH = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 + SAE_ASSOCID_ALL = 0xffffffff + SAE_ASSOCID_ANY = 0x0 + SAE_CONNID_ALL = 0xffffffff + SAE_CONNID_ANY = 0x0 SCM_CREDS = 0x3 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go index bb02aa6c0..4a55a4005 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_darwin_arm64.go @@ -237,6 +237,9 @@ const ( CLOCK_UPTIME_RAW_APPROX = 0x9 CLONE_NOFOLLOW = 0x1 CLONE_NOOWNERCOPY = 0x2 + CONNECT_DATA_AUTHENTICATED = 0x4 + CONNECT_DATA_IDEMPOTENT = 0x2 + CONNECT_RESUME_ON_READ_WRITE = 0x1 CR0 = 0x0 CR1 = 0x1000 CR2 = 0x2000 @@ -1169,6 +1172,11 @@ const ( PT_WRITE_D = 0x5 PT_WRITE_I = 0x4 PT_WRITE_U = 0x6 + RENAME_EXCL = 0x4 + RENAME_NOFOLLOW_ANY = 0x10 + RENAME_RESERVED1 = 0x8 + RENAME_SECLUDE = 0x1 + RENAME_SWAP = 0x2 RLIMIT_AS = 0x5 RLIMIT_CORE = 0x4 RLIMIT_CPU = 0x0 @@ -1260,6 +1268,10 @@ const ( RTV_SSTHRESH = 0x20 RUSAGE_CHILDREN = -0x1 RUSAGE_SELF = 0x0 + SAE_ASSOCID_ALL = 0xffffffff + SAE_ASSOCID_ANY = 0x0 + SAE_CONNID_ALL = 0xffffffff + SAE_CONNID_ANY = 0x0 SCM_CREDS = 0x3 SCM_RIGHTS = 0x1 SCM_TIMESTAMP = 0x2 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux.go b/vendor/golang.org/x/sys/unix/zerrors_linux.go index 877a62b47..01a70b246 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux.go @@ -457,6 +457,7 @@ const ( B600 = 0x8 B75 = 0x2 B9600 = 0xd + BCACHEFS_SUPER_MAGIC = 0xca451a4e BDEVFS_MAGIC = 0x62646576 BINDERFS_SUPER_MAGIC = 0x6c6f6f70 BINFMTFS_MAGIC = 0x42494e4d @@ -928,6 +929,7 @@ const ( EPOLL_CTL_ADD = 0x1 EPOLL_CTL_DEL = 0x2 EPOLL_CTL_MOD = 0x3 + EPOLL_IOC_TYPE = 0x8a EROFS_SUPER_MAGIC_V1 = 0xe0f5e1e2 ESP_V4_FLOW = 0xa ESP_V6_FLOW = 0xc @@ -941,9 +943,6 @@ const ( ETHTOOL_FEC_OFF = 0x4 ETHTOOL_FEC_RS = 0x8 ETHTOOL_FLAG_ALL = 0x7 - ETHTOOL_FLAG_COMPACT_BITSETS = 0x1 - ETHTOOL_FLAG_OMIT_REPLY = 0x2 - ETHTOOL_FLAG_STATS = 0x4 ETHTOOL_FLASHDEV = 0x33 ETHTOOL_FLASH_MAX_FILENAME = 0x80 ETHTOOL_FWVERS_LEN = 0x20 @@ -1705,6 +1704,7 @@ const ( KEXEC_ARCH_S390 = 0x160000 KEXEC_ARCH_SH = 0x2a0000 KEXEC_ARCH_X86_64 = 0x3e0000 + KEXEC_CRASH_HOTPLUG_SUPPORT = 0x8 KEXEC_FILE_DEBUG = 0x8 KEXEC_FILE_NO_INITRAMFS = 0x4 KEXEC_FILE_ON_CRASH = 0x2 @@ -1780,6 +1780,7 @@ const ( KEY_SPEC_USER_KEYRING = -0x4 KEY_SPEC_USER_SESSION_KEYRING = -0x5 LANDLOCK_ACCESS_FS_EXECUTE = 0x1 + LANDLOCK_ACCESS_FS_IOCTL_DEV = 0x8000 LANDLOCK_ACCESS_FS_MAKE_BLOCK = 0x800 LANDLOCK_ACCESS_FS_MAKE_CHAR = 0x40 LANDLOCK_ACCESS_FS_MAKE_DIR = 0x80 @@ -1861,6 +1862,19 @@ const ( MAP_FILE = 0x0 MAP_FIXED = 0x10 MAP_FIXED_NOREPLACE = 0x100000 + MAP_HUGE_16GB = 0x88000000 + MAP_HUGE_16KB = 0x38000000 + MAP_HUGE_16MB = 0x60000000 + MAP_HUGE_1GB = 0x78000000 + MAP_HUGE_1MB = 0x50000000 + MAP_HUGE_256MB = 0x70000000 + MAP_HUGE_2GB = 0x7c000000 + MAP_HUGE_2MB = 0x54000000 + MAP_HUGE_32MB = 0x64000000 + MAP_HUGE_512KB = 0x4c000000 + MAP_HUGE_512MB = 0x74000000 + MAP_HUGE_64KB = 0x40000000 + MAP_HUGE_8MB = 0x5c000000 MAP_HUGE_MASK = 0x3f MAP_HUGE_SHIFT = 0x1a MAP_PRIVATE = 0x2 @@ -2498,6 +2512,23 @@ const ( PR_PAC_GET_ENABLED_KEYS = 0x3d PR_PAC_RESET_KEYS = 0x36 PR_PAC_SET_ENABLED_KEYS = 0x3c + PR_PPC_DEXCR_CTRL_CLEAR = 0x4 + PR_PPC_DEXCR_CTRL_CLEAR_ONEXEC = 0x10 + PR_PPC_DEXCR_CTRL_EDITABLE = 0x1 + PR_PPC_DEXCR_CTRL_MASK = 0x1f + PR_PPC_DEXCR_CTRL_SET = 0x2 + PR_PPC_DEXCR_CTRL_SET_ONEXEC = 0x8 + PR_PPC_DEXCR_IBRTPD = 0x1 + PR_PPC_DEXCR_NPHIE = 0x3 + PR_PPC_DEXCR_SBHE = 0x0 + PR_PPC_DEXCR_SRAPD = 0x2 + PR_PPC_GET_DEXCR = 0x48 + PR_PPC_SET_DEXCR = 0x49 + PR_RISCV_CTX_SW_FENCEI_OFF = 0x1 + PR_RISCV_CTX_SW_FENCEI_ON = 0x0 + PR_RISCV_SCOPE_PER_PROCESS = 0x0 + PR_RISCV_SCOPE_PER_THREAD = 0x1 + PR_RISCV_SET_ICACHE_FLUSH_CTX = 0x47 PR_RISCV_V_GET_CONTROL = 0x46 PR_RISCV_V_SET_CONTROL = 0x45 PR_RISCV_V_VSTATE_CTRL_CUR_MASK = 0x3 @@ -3192,6 +3223,7 @@ const ( STATX_MTIME = 0x40 STATX_NLINK = 0x4 STATX_SIZE = 0x200 + STATX_SUBVOL = 0x8000 STATX_TYPE = 0x1 STATX_UID = 0x8 STATX__RESERVED = 0x80000000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go index e4bc0bd57..684a5168d 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_386.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go index 689317afd..61d74b592 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_amd64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go index 5cca668ac..a28c9e3e8 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go index 14270508b..ab5d1fe8e 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_arm64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 ESR_MAGIC = 0x45535201 EXTPROC = 0x10000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go index 28e39afdc..c523090e7 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_loong64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go index cd66e92cb..01e6ea780 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go index c1595eba7..7aa610b1e 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go index ee9456b0d..92af771b4 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mips64le.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go index 8cfca81e1..b27ef5e6f 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_mipsle.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x80 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go index 60b0deb3a..237a2cefb 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x20 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000000 FF1 = 0x4000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go index f90aa7281..4a5c555a3 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x20 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000000 FF1 = 0x4000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go index ba9e01503..a02fb49a5 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_ppc64le.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x20 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000000 FF1 = 0x4000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go index 07cdfd6e9..e26a7c61b 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_riscv64.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go index 2f1dd214a..c48f7c210 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_s390x.go @@ -78,6 +78,8 @@ const ( ECHOPRT = 0x400 EFD_CLOEXEC = 0x80000 EFD_NONBLOCK = 0x800 + EPIOCGPARAMS = 0x80088a02 + EPIOCSPARAMS = 0x40088a01 EPOLL_CLOEXEC = 0x80000 EXTPROC = 0x10000 FF1 = 0x8000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go index f40519d90..ad4b9aace 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zerrors_linux_sparc64.go @@ -82,6 +82,8 @@ const ( EFD_CLOEXEC = 0x400000 EFD_NONBLOCK = 0x4000 EMT_TAGOVF = 0x1 + EPIOCGPARAMS = 0x40088a02 + EPIOCSPARAMS = 0x80088a01 EPOLL_CLOEXEC = 0x400000 EXTPROC = 0x10000 FF1 = 0x8000 diff --git a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go index da08b2ab3..1ec2b1407 100644 --- a/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go +++ b/vendor/golang.org/x/sys/unix/zerrors_zos_s390x.go @@ -581,6 +581,8 @@ const ( AT_EMPTY_PATH = 0x1000 AT_REMOVEDIR = 0x200 RENAME_NOREPLACE = 1 << 0 + ST_RDONLY = 1 + ST_NOSUID = 2 ) const ( diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go index ccb02f240..24b346e1a 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go @@ -740,6 +740,54 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func renamexNp(from string, to string, flag uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_renamex_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_renameatx_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { var _p0 unsafe.Pointer if len(mib) > 0 { @@ -760,6 +808,59 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func pthread_chdir_np(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pthread_chdir_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pthread_fchdir_np(fd int) (err error) { + _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pthread_fchdir_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) { + var _p0 unsafe.Pointer + if len(iov) > 0 { + _p0 = unsafe.Pointer(&iov[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_connectx_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_connectx connectx "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s index 8b8bb2840..ebd213100 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s @@ -223,11 +223,36 @@ TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) +TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_renamex_np(SB) +GLOBL ·libc_renamex_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB) + +TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_renameatx_np(SB) +GLOBL ·libc_renameatx_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB) + TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pthread_chdir_np(SB) +GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB) + +TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pthread_fchdir_np(SB) +GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB) + +TEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_connectx(SB) +GLOBL ·libc_connectx_trampoline_addr(SB), RODATA, $8 +DATA ·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB) + TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendfile(SB) GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go index 1b40b997b..824b9c2d5 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go @@ -740,6 +740,54 @@ func ioctlPtr(fd int, req uint, arg unsafe.Pointer) (err error) { // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func renamexNp(from string, to string, flag uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := syscall_syscall(libc_renamex_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flag)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_renamex_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_renamex_np renamex_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func renameatxNp(fromfd int, from string, tofd int, to string, flag uint32) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(from) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(to) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_renameatx_np_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), uintptr(flag), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_renameatx_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_renameatx_np renameatx_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) { var _p0 unsafe.Pointer if len(mib) > 0 { @@ -760,6 +808,59 @@ var libc_sysctl_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func pthread_chdir_np(path string) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(path) + if err != nil { + return + } + _, _, e1 := syscall_syscall(libc_pthread_chdir_np_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pthread_chdir_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pthread_chdir_np pthread_chdir_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func pthread_fchdir_np(fd int) (err error) { + _, _, e1 := syscall_syscall(libc_pthread_fchdir_np_trampoline_addr, uintptr(fd), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_pthread_fchdir_np_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_pthread_fchdir_np pthread_fchdir_np "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func connectx(fd int, endpoints *SaEndpoints, associd SaeAssocID, flags uint32, iov []Iovec, n *uintptr, connid *SaeConnID) (err error) { + var _p0 unsafe.Pointer + if len(iov) > 0 { + _p0 = unsafe.Pointer(&iov[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := syscall_syscall9(libc_connectx_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(endpoints)), uintptr(associd), uintptr(flags), uintptr(_p0), uintptr(len(iov)), uintptr(unsafe.Pointer(n)), uintptr(unsafe.Pointer(connid)), 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_connectx_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_connectx connectx "/usr/lib/libSystem.B.dylib" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func sendfile(infd int, outfd int, offset int64, len *int64, hdtr unsafe.Pointer, flags int) (err error) { _, _, e1 := syscall_syscall6(libc_sendfile_trampoline_addr, uintptr(infd), uintptr(outfd), uintptr(offset), uintptr(unsafe.Pointer(len)), uintptr(hdtr), uintptr(flags)) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s index 08362c1ab..4f178a229 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s @@ -223,11 +223,36 @@ TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB) +TEXT libc_renamex_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_renamex_np(SB) +GLOBL ·libc_renamex_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_renamex_np_trampoline_addr(SB)/8, $libc_renamex_np_trampoline<>(SB) + +TEXT libc_renameatx_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_renameatx_np(SB) +GLOBL ·libc_renameatx_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_renameatx_np_trampoline_addr(SB)/8, $libc_renameatx_np_trampoline<>(SB) + TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sysctl(SB) GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8 DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB) +TEXT libc_pthread_chdir_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pthread_chdir_np(SB) +GLOBL ·libc_pthread_chdir_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pthread_chdir_np_trampoline_addr(SB)/8, $libc_pthread_chdir_np_trampoline<>(SB) + +TEXT libc_pthread_fchdir_np_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_pthread_fchdir_np(SB) +GLOBL ·libc_pthread_fchdir_np_trampoline_addr(SB), RODATA, $8 +DATA ·libc_pthread_fchdir_np_trampoline_addr(SB)/8, $libc_pthread_fchdir_np_trampoline<>(SB) + +TEXT libc_connectx_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_connectx(SB) +GLOBL ·libc_connectx_trampoline_addr(SB), RODATA, $8 +DATA ·libc_connectx_trampoline_addr(SB)/8, $libc_connectx_trampoline<>(SB) + TEXT libc_sendfile_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_sendfile(SB) GLOBL ·libc_sendfile_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/vendor/golang.org/x/sys/unix/zsyscall_linux.go index 87d8612a1..1bc1a5adb 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_linux.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_linux.go @@ -2229,3 +2229,19 @@ func Cachestat(fd uint, crange *CachestatRange, cstat *Cachestat_t, flags uint) } return } + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + +func Mseal(b []byte, flags uint) (err error) { + var _p0 unsafe.Pointer + if len(b) > 0 { + _p0 = unsafe.Pointer(&b[0]) + } else { + _p0 = unsafe.Pointer(&_zero) + } + _, _, e1 := Syscall(SYS_MSEAL, uintptr(_p0), uintptr(len(b)), uintptr(flags)) + if e1 != 0 { + err = errnoErr(e1) + } + return +} diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go index 9dc42410b..1851df14e 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s index 41b561731..0b43c6936 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $4 +DATA ·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go index 0d3a0751c..e1ec0dbe4 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s index 4019a656f..880c6d6e3 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go index c39f7776d..7c8452a63 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s index ac4af24f9..b8ef95b0f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4 DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $4 +DATA ·libc_mount_trampoline_addr(SB)/4, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go index 57571d072..2ffdf861f 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s index f77d53212..2af3b5c76 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go index e62963e67..1da08d526 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s index fae140b62..b7a251353 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_mips64.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go index 00831354c..6e85b0aac 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s index 9d1e0ff06..f15dadf05 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s @@ -555,6 +555,12 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + CALL libc_mount(SB) + RET +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 CALL libc_nanosleep(SB) RET diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go index 79029ed58..28b487df2 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go @@ -1493,6 +1493,30 @@ var libc_mknodat_trampoline_addr uintptr // THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT +func Mount(fsType string, dir string, flags int, data unsafe.Pointer) (err error) { + var _p0 *byte + _p0, err = BytePtrFromString(fsType) + if err != nil { + return + } + var _p1 *byte + _p1, err = BytePtrFromString(dir) + if err != nil { + return + } + _, _, e1 := syscall_syscall6(libc_mount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), uintptr(flags), uintptr(data), 0, 0) + if e1 != 0 { + err = errnoErr(e1) + } + return +} + +var libc_mount_trampoline_addr uintptr + +//go:cgo_import_dynamic libc_mount mount "libc.so" + +// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT + func Nanosleep(time *Timespec, leftover *Timespec) (err error) { _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0) if e1 != 0 { diff --git a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s index da115f9a4..1e7f321e4 100644 --- a/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s +++ b/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s @@ -463,6 +463,11 @@ TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0 GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8 DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB) +TEXT libc_mount_trampoline<>(SB),NOSPLIT,$0-0 + JMP libc_mount(SB) +GLOBL ·libc_mount_trampoline_addr(SB), RODATA, $8 +DATA ·libc_mount_trampoline_addr(SB)/8, $libc_mount_trampoline<>(SB) + TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0 JMP libc_nanosleep(SB) GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8 diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go index 53aef5dc5..524b0820c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_386.go @@ -457,4 +457,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go index 71d524763..d3e38f681 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_amd64.go @@ -379,4 +379,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go index c74770613..70b35bf3b 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm.go @@ -421,4 +421,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go index f96e214f6..6c778c232 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_arm64.go @@ -324,4 +324,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go index 28425346c..37281cf51 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_loong64.go @@ -318,4 +318,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go index d0953018d..7e567f1ef 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips.go @@ -441,4 +441,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 4459 SYS_LSM_SET_SELF_ATTR = 4460 SYS_LSM_LIST_MODULES = 4461 + SYS_MSEAL = 4462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go index 295c7f4b8..38ae55e5e 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64.go @@ -371,4 +371,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 5459 SYS_LSM_SET_SELF_ATTR = 5460 SYS_LSM_LIST_MODULES = 5461 + SYS_MSEAL = 5462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go index d1a9eaca7..55e92e60a 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mips64le.go @@ -371,4 +371,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 5459 SYS_LSM_SET_SELF_ATTR = 5460 SYS_LSM_LIST_MODULES = 5461 + SYS_MSEAL = 5462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go index bec157c39..60658d6a0 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_mipsle.go @@ -441,4 +441,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 4459 SYS_LSM_SET_SELF_ATTR = 4460 SYS_LSM_LIST_MODULES = 4461 + SYS_MSEAL = 4462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go index 7ee7bdc43..e203e8a7e 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc.go @@ -448,4 +448,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go index fad1f25b4..5944b97d5 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64.go @@ -420,4 +420,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go index 7d3e16357..c66d416da 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_ppc64le.go @@ -420,4 +420,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go index 0ed53ad9f..9889f6a55 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_riscv64.go @@ -325,4 +325,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go index 2fba04ad5..01d86825b 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_s390x.go @@ -386,4 +386,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go index 621d00d74..7b703e77c 100644 --- a/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go +++ b/vendor/golang.org/x/sys/unix/zsysnum_linux_sparc64.go @@ -399,4 +399,5 @@ const ( SYS_LSM_GET_SELF_ATTR = 459 SYS_LSM_SET_SELF_ATTR = 460 SYS_LSM_LIST_MODULES = 461 + SYS_MSEAL = 462 ) diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go index 091d107f3..d003c3d43 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_amd64.go @@ -306,6 +306,19 @@ type XVSockPgen struct { type _Socklen uint32 +type SaeAssocID uint32 + +type SaeConnID uint32 + +type SaEndpoints struct { + Srcif uint32 + Srcaddr *RawSockaddr + Srcaddrlen uint32 + Dstaddr *RawSockaddr + Dstaddrlen uint32 + _ [4]byte +} + type Xucred struct { Version uint32 Uid uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go index 28ff4ef74..0d45a941a 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_darwin_arm64.go @@ -306,6 +306,19 @@ type XVSockPgen struct { type _Socklen uint32 +type SaeAssocID uint32 + +type SaeConnID uint32 + +type SaEndpoints struct { + Srcif uint32 + Srcaddr *RawSockaddr + Srcaddrlen uint32 + Dstaddr *RawSockaddr + Dstaddrlen uint32 + _ [4]byte +} + type Xucred struct { Version uint32 Uid uint32 diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go index 6cbd094a3..51e13eb05 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go @@ -625,6 +625,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go index 7c03b6ee7..d002d8ef3 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go @@ -630,6 +630,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go index 422107ee8..3f863d898 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go @@ -616,6 +616,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go index 505a12acf..61c729310 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go @@ -610,6 +610,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go index cc986c790..b5d17414f 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go @@ -612,6 +612,7 @@ const ( POLLRDNORM = 0x40 POLLWRBAND = 0x100 POLLWRNORM = 0x4 + POLLRDHUP = 0x4000 ) type CapRights struct { diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux.go b/vendor/golang.org/x/sys/unix/ztypes_linux.go index 4740b8348..9f2550dc3 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux.go @@ -110,7 +110,8 @@ type Statx_t struct { Mnt_id uint64 Dio_mem_align uint32 Dio_offset_align uint32 - _ [12]uint64 + Subvol uint64 + _ [11]uint64 } type Fsid struct { @@ -2485,7 +2486,7 @@ type XDPMmapOffsets struct { type XDPUmemReg struct { Addr uint64 Len uint64 - Chunk_size uint32 + Size uint32 Headroom uint32 Flags uint32 Tx_metadata_len uint32 @@ -3473,7 +3474,7 @@ const ( DEVLINK_PORT_FN_ATTR_STATE = 0x2 DEVLINK_PORT_FN_ATTR_OPSTATE = 0x3 DEVLINK_PORT_FN_ATTR_CAPS = 0x4 - DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x5 + DEVLINK_PORT_FUNCTION_ATTR_MAX = 0x6 ) type FsverityDigest struct { @@ -3806,6 +3807,9 @@ const ( ETHTOOL_MSG_PSE_GET_REPLY = 0x25 ETHTOOL_MSG_RSS_GET_REPLY = 0x26 ETHTOOL_MSG_KERNEL_MAX = 0x2b + ETHTOOL_FLAG_COMPACT_BITSETS = 0x1 + ETHTOOL_FLAG_OMIT_REPLY = 0x2 + ETHTOOL_FLAG_STATS = 0x4 ETHTOOL_A_HEADER_UNSPEC = 0x0 ETHTOOL_A_HEADER_DEV_INDEX = 0x1 ETHTOOL_A_HEADER_DEV_NAME = 0x2 @@ -3975,7 +3979,7 @@ const ( ETHTOOL_A_TSINFO_TX_TYPES = 0x3 ETHTOOL_A_TSINFO_RX_FILTERS = 0x4 ETHTOOL_A_TSINFO_PHC_INDEX = 0x5 - ETHTOOL_A_TSINFO_MAX = 0x5 + ETHTOOL_A_TSINFO_MAX = 0x6 ETHTOOL_A_CABLE_TEST_UNSPEC = 0x0 ETHTOOL_A_CABLE_TEST_HEADER = 0x1 ETHTOOL_A_CABLE_TEST_MAX = 0x1 diff --git a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go index 15adc0414..ad05b51a6 100644 --- a/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go +++ b/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go @@ -727,6 +727,37 @@ const ( RISCV_HWPROBE_EXT_ZBA = 0x8 RISCV_HWPROBE_EXT_ZBB = 0x10 RISCV_HWPROBE_EXT_ZBS = 0x20 + RISCV_HWPROBE_EXT_ZICBOZ = 0x40 + RISCV_HWPROBE_EXT_ZBC = 0x80 + RISCV_HWPROBE_EXT_ZBKB = 0x100 + RISCV_HWPROBE_EXT_ZBKC = 0x200 + RISCV_HWPROBE_EXT_ZBKX = 0x400 + RISCV_HWPROBE_EXT_ZKND = 0x800 + RISCV_HWPROBE_EXT_ZKNE = 0x1000 + RISCV_HWPROBE_EXT_ZKNH = 0x2000 + RISCV_HWPROBE_EXT_ZKSED = 0x4000 + RISCV_HWPROBE_EXT_ZKSH = 0x8000 + RISCV_HWPROBE_EXT_ZKT = 0x10000 + RISCV_HWPROBE_EXT_ZVBB = 0x20000 + RISCV_HWPROBE_EXT_ZVBC = 0x40000 + RISCV_HWPROBE_EXT_ZVKB = 0x80000 + RISCV_HWPROBE_EXT_ZVKG = 0x100000 + RISCV_HWPROBE_EXT_ZVKNED = 0x200000 + RISCV_HWPROBE_EXT_ZVKNHA = 0x400000 + RISCV_HWPROBE_EXT_ZVKNHB = 0x800000 + RISCV_HWPROBE_EXT_ZVKSED = 0x1000000 + RISCV_HWPROBE_EXT_ZVKSH = 0x2000000 + RISCV_HWPROBE_EXT_ZVKT = 0x4000000 + RISCV_HWPROBE_EXT_ZFH = 0x8000000 + RISCV_HWPROBE_EXT_ZFHMIN = 0x10000000 + RISCV_HWPROBE_EXT_ZIHINTNTL = 0x20000000 + RISCV_HWPROBE_EXT_ZVFH = 0x40000000 + RISCV_HWPROBE_EXT_ZVFHMIN = 0x80000000 + RISCV_HWPROBE_EXT_ZFA = 0x100000000 + RISCV_HWPROBE_EXT_ZTSO = 0x200000000 + RISCV_HWPROBE_EXT_ZACAS = 0x400000000 + RISCV_HWPROBE_EXT_ZICOND = 0x800000000 + RISCV_HWPROBE_EXT_ZIHINTPAUSE = 0x1000000000 RISCV_HWPROBE_KEY_CPUPERF_0 = 0x5 RISCV_HWPROBE_MISALIGNED_UNKNOWN = 0x0 RISCV_HWPROBE_MISALIGNED_EMULATED = 0x1 @@ -734,4 +765,6 @@ const ( RISCV_HWPROBE_MISALIGNED_FAST = 0x3 RISCV_HWPROBE_MISALIGNED_UNSUPPORTED = 0x4 RISCV_HWPROBE_MISALIGNED_MASK = 0x7 + RISCV_HWPROBE_KEY_ZICBOZ_BLOCK_SIZE = 0x6 + RISCV_HWPROBE_WHICH_CPUS = 0x1 ) diff --git a/vendor/golang.org/x/sys/windows/security_windows.go b/vendor/golang.org/x/sys/windows/security_windows.go index 6f7d2ac70..b6e1ab76f 100644 --- a/vendor/golang.org/x/sys/windows/security_windows.go +++ b/vendor/golang.org/x/sys/windows/security_windows.go @@ -894,7 +894,7 @@ type ACL struct { aclRevision byte sbz1 byte aclSize uint16 - aceCount uint16 + AceCount uint16 sbz2 uint16 } @@ -1087,6 +1087,27 @@ type EXPLICIT_ACCESS struct { Trustee TRUSTEE } +// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header +type ACE_HEADER struct { + AceType uint8 + AceFlags uint8 + AceSize uint16 +} + +// https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-access_allowed_ace +type ACCESS_ALLOWED_ACE struct { + Header ACE_HEADER + Mask ACCESS_MASK + SidStart uint32 +} + +const ( + // Constants for AceType + // https://learn.microsoft.com/en-us/windows/win32/api/winnt/ns-winnt-ace_header + ACCESS_ALLOWED_ACE_TYPE = 0 + ACCESS_DENIED_ACE_TYPE = 1 +) + // This type is the union inside of TRUSTEE and must be created using one of the TrusteeValueFrom* functions. type TrusteeValue uintptr @@ -1158,6 +1179,7 @@ type OBJECTS_AND_NAME struct { //sys makeSelfRelativeSD(absoluteSD *SECURITY_DESCRIPTOR, selfRelativeSD *SECURITY_DESCRIPTOR, selfRelativeSDSize *uint32) (err error) = advapi32.MakeSelfRelativeSD //sys setEntriesInAcl(countExplicitEntries uint32, explicitEntries *EXPLICIT_ACCESS, oldACL *ACL, newACL **ACL) (ret error) = advapi32.SetEntriesInAclW +//sys GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) = advapi32.GetAce // Control returns the security descriptor control bits. func (sd *SECURITY_DESCRIPTOR) Control() (control SECURITY_DESCRIPTOR_CONTROL, revision uint32, err error) { diff --git a/vendor/golang.org/x/sys/windows/syscall_windows.go b/vendor/golang.org/x/sys/windows/syscall_windows.go index 6525c62f3..5cee9a314 100644 --- a/vendor/golang.org/x/sys/windows/syscall_windows.go +++ b/vendor/golang.org/x/sys/windows/syscall_windows.go @@ -17,8 +17,10 @@ import ( "unsafe" ) -type Handle uintptr -type HWND uintptr +type ( + Handle uintptr + HWND uintptr +) const ( InvalidHandle = ^Handle(0) @@ -211,6 +213,10 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys OpenProcess(desiredAccess uint32, inheritHandle bool, processId uint32) (handle Handle, err error) //sys ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *uint16, showCmd int32) (err error) [failretval<=32] = shell32.ShellExecuteW //sys GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) = user32.GetWindowThreadProcessId +//sys LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) [failretval==0] = user32.LoadKeyboardLayoutW +//sys UnloadKeyboardLayout(hkl Handle) (err error) = user32.UnloadKeyboardLayout +//sys GetKeyboardLayout(tid uint32) (hkl Handle) = user32.GetKeyboardLayout +//sys ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) = user32.ToUnicodeEx //sys GetShellWindow() (shellWindow HWND) = user32.GetShellWindow //sys MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) [failretval==0] = user32.MessageBoxW //sys ExitWindowsEx(flags uint32, reason uint32) (err error) = user32.ExitWindowsEx @@ -307,6 +313,10 @@ func NewCallbackCDecl(fn interface{}) uintptr { //sys SetConsoleMode(console Handle, mode uint32) (err error) = kernel32.SetConsoleMode //sys GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) = kernel32.GetConsoleScreenBufferInfo //sys setConsoleCursorPosition(console Handle, position uint32) (err error) = kernel32.SetConsoleCursorPosition +//sys GetConsoleCP() (cp uint32, err error) = kernel32.GetConsoleCP +//sys GetConsoleOutputCP() (cp uint32, err error) = kernel32.GetConsoleOutputCP +//sys SetConsoleCP(cp uint32) (err error) = kernel32.SetConsoleCP +//sys SetConsoleOutputCP(cp uint32) (err error) = kernel32.SetConsoleOutputCP //sys WriteConsole(console Handle, buf *uint16, towrite uint32, written *uint32, reserved *byte) (err error) = kernel32.WriteConsoleW //sys ReadConsole(console Handle, buf *uint16, toread uint32, read *uint32, inputControl *byte) (err error) = kernel32.ReadConsoleW //sys resizePseudoConsole(pconsole Handle, size uint32) (hr error) = kernel32.ResizePseudoConsole @@ -1368,9 +1378,11 @@ func SetsockoptLinger(fd Handle, level, opt int, l *Linger) (err error) { func SetsockoptInet4Addr(fd Handle, level, opt int, value [4]byte) (err error) { return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(&value[0])), 4) } + func SetsockoptIPMreq(fd Handle, level, opt int, mreq *IPMreq) (err error) { return Setsockopt(fd, int32(level), int32(opt), (*byte)(unsafe.Pointer(mreq)), int32(unsafe.Sizeof(*mreq))) } + func SetsockoptIPv6Mreq(fd Handle, level, opt int, mreq *IPv6Mreq) (err error) { return syscall.EWINDOWS } diff --git a/vendor/golang.org/x/sys/windows/types_windows.go b/vendor/golang.org/x/sys/windows/types_windows.go index d8cb71db0..7b97a154c 100644 --- a/vendor/golang.org/x/sys/windows/types_windows.go +++ b/vendor/golang.org/x/sys/windows/types_windows.go @@ -1060,6 +1060,7 @@ const ( SIO_GET_EXTENSION_FUNCTION_POINTER = IOC_INOUT | IOC_WS2 | 6 SIO_KEEPALIVE_VALS = IOC_IN | IOC_VENDOR | 4 SIO_UDP_CONNRESET = IOC_IN | IOC_VENDOR | 12 + SIO_UDP_NETRESET = IOC_IN | IOC_VENDOR | 15 // cf. http://support.microsoft.com/default.aspx?scid=kb;en-us;257460 @@ -2003,7 +2004,21 @@ const ( MOVEFILE_FAIL_IF_NOT_TRACKABLE = 0x20 ) -const GAA_FLAG_INCLUDE_PREFIX = 0x00000010 +// Flags for GetAdaptersAddresses, see +// https://learn.microsoft.com/en-us/windows/win32/api/iphlpapi/nf-iphlpapi-getadaptersaddresses. +const ( + GAA_FLAG_SKIP_UNICAST = 0x1 + GAA_FLAG_SKIP_ANYCAST = 0x2 + GAA_FLAG_SKIP_MULTICAST = 0x4 + GAA_FLAG_SKIP_DNS_SERVER = 0x8 + GAA_FLAG_INCLUDE_PREFIX = 0x10 + GAA_FLAG_SKIP_FRIENDLY_NAME = 0x20 + GAA_FLAG_INCLUDE_WINS_INFO = 0x40 + GAA_FLAG_INCLUDE_GATEWAYS = 0x80 + GAA_FLAG_INCLUDE_ALL_INTERFACES = 0x100 + GAA_FLAG_INCLUDE_ALL_COMPARTMENTS = 0x200 + GAA_FLAG_INCLUDE_TUNNEL_BINDINGORDER = 0x400 +) const ( IF_TYPE_OTHER = 1 @@ -2017,6 +2032,50 @@ const ( IF_TYPE_IEEE1394 = 144 ) +// Enum NL_PREFIX_ORIGIN for [IpAdapterUnicastAddress], see +// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_prefix_origin +const ( + IpPrefixOriginOther = 0 + IpPrefixOriginManual = 1 + IpPrefixOriginWellKnown = 2 + IpPrefixOriginDhcp = 3 + IpPrefixOriginRouterAdvertisement = 4 + IpPrefixOriginUnchanged = 1 << 4 +) + +// Enum NL_SUFFIX_ORIGIN for [IpAdapterUnicastAddress], see +// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_suffix_origin +const ( + NlsoOther = 0 + NlsoManual = 1 + NlsoWellKnown = 2 + NlsoDhcp = 3 + NlsoLinkLayerAddress = 4 + NlsoRandom = 5 + IpSuffixOriginOther = 0 + IpSuffixOriginManual = 1 + IpSuffixOriginWellKnown = 2 + IpSuffixOriginDhcp = 3 + IpSuffixOriginLinkLayerAddress = 4 + IpSuffixOriginRandom = 5 + IpSuffixOriginUnchanged = 1 << 4 +) + +// Enum NL_DAD_STATE for [IpAdapterUnicastAddress], see +// https://learn.microsoft.com/en-us/windows/win32/api/nldef/ne-nldef-nl_dad_state +const ( + NldsInvalid = 0 + NldsTentative = 1 + NldsDuplicate = 2 + NldsDeprecated = 3 + NldsPreferred = 4 + IpDadStateInvalid = 0 + IpDadStateTentative = 1 + IpDadStateDuplicate = 2 + IpDadStateDeprecated = 3 + IpDadStatePreferred = 4 +) + type SocketAddress struct { Sockaddr *syscall.RawSockaddrAny SockaddrLength int32 @@ -3404,3 +3463,14 @@ type DCB struct { EvtChar byte wReserved1 uint16 } + +// Keyboard Layout Flags. +// See https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-loadkeyboardlayoutw +const ( + KLF_ACTIVATE = 0x00000001 + KLF_SUBSTITUTE_OK = 0x00000002 + KLF_REORDER = 0x00000008 + KLF_REPLACELANG = 0x00000010 + KLF_NOTELLSHELL = 0x00000080 + KLF_SETFORPROCESS = 0x00000100 +) diff --git a/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/vendor/golang.org/x/sys/windows/zsyscall_windows.go index 9f73df75b..4c2e1bdc0 100644 --- a/vendor/golang.org/x/sys/windows/zsyscall_windows.go +++ b/vendor/golang.org/x/sys/windows/zsyscall_windows.go @@ -91,6 +91,7 @@ var ( procEnumServicesStatusExW = modadvapi32.NewProc("EnumServicesStatusExW") procEqualSid = modadvapi32.NewProc("EqualSid") procFreeSid = modadvapi32.NewProc("FreeSid") + procGetAce = modadvapi32.NewProc("GetAce") procGetLengthSid = modadvapi32.NewProc("GetLengthSid") procGetNamedSecurityInfoW = modadvapi32.NewProc("GetNamedSecurityInfoW") procGetSecurityDescriptorControl = modadvapi32.NewProc("GetSecurityDescriptorControl") @@ -246,7 +247,9 @@ var ( procGetCommandLineW = modkernel32.NewProc("GetCommandLineW") procGetComputerNameExW = modkernel32.NewProc("GetComputerNameExW") procGetComputerNameW = modkernel32.NewProc("GetComputerNameW") + procGetConsoleCP = modkernel32.NewProc("GetConsoleCP") procGetConsoleMode = modkernel32.NewProc("GetConsoleMode") + procGetConsoleOutputCP = modkernel32.NewProc("GetConsoleOutputCP") procGetConsoleScreenBufferInfo = modkernel32.NewProc("GetConsoleScreenBufferInfo") procGetCurrentDirectoryW = modkernel32.NewProc("GetCurrentDirectoryW") procGetCurrentProcessId = modkernel32.NewProc("GetCurrentProcessId") @@ -346,8 +349,10 @@ var ( procSetCommMask = modkernel32.NewProc("SetCommMask") procSetCommState = modkernel32.NewProc("SetCommState") procSetCommTimeouts = modkernel32.NewProc("SetCommTimeouts") + procSetConsoleCP = modkernel32.NewProc("SetConsoleCP") procSetConsoleCursorPosition = modkernel32.NewProc("SetConsoleCursorPosition") procSetConsoleMode = modkernel32.NewProc("SetConsoleMode") + procSetConsoleOutputCP = modkernel32.NewProc("SetConsoleOutputCP") procSetCurrentDirectoryW = modkernel32.NewProc("SetCurrentDirectoryW") procSetDefaultDllDirectories = modkernel32.NewProc("SetDefaultDllDirectories") procSetDllDirectoryW = modkernel32.NewProc("SetDllDirectoryW") @@ -477,12 +482,16 @@ var ( procGetDesktopWindow = moduser32.NewProc("GetDesktopWindow") procGetForegroundWindow = moduser32.NewProc("GetForegroundWindow") procGetGUIThreadInfo = moduser32.NewProc("GetGUIThreadInfo") + procGetKeyboardLayout = moduser32.NewProc("GetKeyboardLayout") procGetShellWindow = moduser32.NewProc("GetShellWindow") procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId") procIsWindow = moduser32.NewProc("IsWindow") procIsWindowUnicode = moduser32.NewProc("IsWindowUnicode") procIsWindowVisible = moduser32.NewProc("IsWindowVisible") + procLoadKeyboardLayoutW = moduser32.NewProc("LoadKeyboardLayoutW") procMessageBoxW = moduser32.NewProc("MessageBoxW") + procToUnicodeEx = moduser32.NewProc("ToUnicodeEx") + procUnloadKeyboardLayout = moduser32.NewProc("UnloadKeyboardLayout") procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock") procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock") procGetUserProfileDirectoryW = moduserenv.NewProc("GetUserProfileDirectoryW") @@ -788,6 +797,14 @@ func FreeSid(sid *SID) (err error) { return } +func GetAce(acl *ACL, aceIndex uint32, pAce **ACCESS_ALLOWED_ACE) (err error) { + r1, _, e1 := syscall.Syscall(procGetAce.Addr(), 3, uintptr(unsafe.Pointer(acl)), uintptr(aceIndex), uintptr(unsafe.Pointer(pAce))) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func GetLengthSid(sid *SID) (len uint32) { r0, _, _ := syscall.Syscall(procGetLengthSid.Addr(), 1, uintptr(unsafe.Pointer(sid)), 0, 0) len = uint32(r0) @@ -2149,6 +2166,15 @@ func GetComputerName(buf *uint16, n *uint32) (err error) { return } +func GetConsoleCP() (cp uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetConsoleCP.Addr(), 0, 0, 0, 0) + cp = uint32(r0) + if cp == 0 { + err = errnoErr(e1) + } + return +} + func GetConsoleMode(console Handle, mode *uint32) (err error) { r1, _, e1 := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(mode)), 0) if r1 == 0 { @@ -2157,6 +2183,15 @@ func GetConsoleMode(console Handle, mode *uint32) (err error) { return } +func GetConsoleOutputCP() (cp uint32, err error) { + r0, _, e1 := syscall.Syscall(procGetConsoleOutputCP.Addr(), 0, 0, 0, 0) + cp = uint32(r0) + if cp == 0 { + err = errnoErr(e1) + } + return +} + func GetConsoleScreenBufferInfo(console Handle, info *ConsoleScreenBufferInfo) (err error) { r1, _, e1 := syscall.Syscall(procGetConsoleScreenBufferInfo.Addr(), 2, uintptr(console), uintptr(unsafe.Pointer(info)), 0) if r1 == 0 { @@ -3025,6 +3060,14 @@ func SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error) { return } +func SetConsoleCP(cp uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetConsoleCP.Addr(), 1, uintptr(cp), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func setConsoleCursorPosition(console Handle, position uint32) (err error) { r1, _, e1 := syscall.Syscall(procSetConsoleCursorPosition.Addr(), 2, uintptr(console), uintptr(position), 0) if r1 == 0 { @@ -3041,6 +3084,14 @@ func SetConsoleMode(console Handle, mode uint32) (err error) { return } +func SetConsoleOutputCP(cp uint32) (err error) { + r1, _, e1 := syscall.Syscall(procSetConsoleOutputCP.Addr(), 1, uintptr(cp), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func SetCurrentDirectory(path *uint16) (err error) { r1, _, e1 := syscall.Syscall(procSetCurrentDirectoryW.Addr(), 1, uintptr(unsafe.Pointer(path)), 0, 0) if r1 == 0 { @@ -4073,6 +4124,12 @@ func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) { return } +func GetKeyboardLayout(tid uint32) (hkl Handle) { + r0, _, _ := syscall.Syscall(procGetKeyboardLayout.Addr(), 1, uintptr(tid), 0, 0) + hkl = Handle(r0) + return +} + func GetShellWindow() (shellWindow HWND) { r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0) shellWindow = HWND(r0) @@ -4106,6 +4163,15 @@ func IsWindowVisible(hwnd HWND) (isVisible bool) { return } +func LoadKeyboardLayout(name *uint16, flags uint32) (hkl Handle, err error) { + r0, _, e1 := syscall.Syscall(procLoadKeyboardLayoutW.Addr(), 2, uintptr(unsafe.Pointer(name)), uintptr(flags), 0) + hkl = Handle(r0) + if hkl == 0 { + err = errnoErr(e1) + } + return +} + func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) { r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0) ret = int32(r0) @@ -4115,6 +4181,20 @@ func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret i return } +func ToUnicodeEx(vkey uint32, scancode uint32, keystate *byte, pwszBuff *uint16, cchBuff int32, flags uint32, hkl Handle) (ret int32) { + r0, _, _ := syscall.Syscall9(procToUnicodeEx.Addr(), 7, uintptr(vkey), uintptr(scancode), uintptr(unsafe.Pointer(keystate)), uintptr(unsafe.Pointer(pwszBuff)), uintptr(cchBuff), uintptr(flags), uintptr(hkl), 0, 0) + ret = int32(r0) + return +} + +func UnloadKeyboardLayout(hkl Handle) (err error) { + r1, _, e1 := syscall.Syscall(procUnloadKeyboardLayout.Addr(), 1, uintptr(hkl), 0, 0) + if r1 == 0 { + err = errnoErr(e1) + } + return +} + func CreateEnvironmentBlock(block **uint16, token Token, inheritExisting bool) (err error) { var _p0 uint32 if inheritExisting { diff --git a/vendor/golang.org/x/term/LICENSE b/vendor/golang.org/x/term/LICENSE index 6a66aea5e..2a7cf70da 100644 --- a/vendor/golang.org/x/term/LICENSE +++ b/vendor/golang.org/x/term/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/golang.org/x/term/term_windows.go b/vendor/golang.org/x/term/term_windows.go index 465f56060..df6bf948e 100644 --- a/vendor/golang.org/x/term/term_windows.go +++ b/vendor/golang.org/x/term/term_windows.go @@ -26,6 +26,7 @@ func makeRaw(fd int) (*State, error) { return nil, err } raw := st &^ (windows.ENABLE_ECHO_INPUT | windows.ENABLE_PROCESSED_INPUT | windows.ENABLE_LINE_INPUT | windows.ENABLE_PROCESSED_OUTPUT) + raw |= windows.ENABLE_VIRTUAL_TERMINAL_INPUT if err := windows.SetConsoleMode(windows.Handle(fd), raw); err != nil { return nil, err } diff --git a/vendor/golang.org/x/text/LICENSE b/vendor/golang.org/x/text/LICENSE index 6a66aea5e..2a7cf70da 100644 --- a/vendor/golang.org/x/text/LICENSE +++ b/vendor/golang.org/x/text/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2009 The Go Authors. All rights reserved. +Copyright 2009 The Go Authors. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are @@ -10,7 +10,7 @@ notice, this list of conditions and the following disclaimer. copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - * Neither the name of Google Inc. nor the names of its + * Neither the name of Google LLC nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. diff --git a/vendor/google.golang.org/appengine/CONTRIBUTING.md b/vendor/google.golang.org/appengine/CONTRIBUTING.md deleted file mode 100644 index 289693613..000000000 --- a/vendor/google.golang.org/appengine/CONTRIBUTING.md +++ /dev/null @@ -1,88 +0,0 @@ -# Contributing - -1. Sign one of the contributor license agreements below. -1. Get the package: - - `go get -d google.golang.org/appengine` -1. Change into the checked out source: - - `cd $GOPATH/src/google.golang.org/appengine` -1. Fork the repo. -1. Set your fork as a remote: - - `git remote add fork git@github.com:GITHUB_USERNAME/appengine.git` -1. Make changes, commit to your fork. -1. Send a pull request with your changes. - The first line of your commit message is conventionally a one-line summary of the change, prefixed by the primary affected package, and is used as the title of your pull request. - -# Testing - -## Running system tests - -Set the `APPENGINE_DEV_APPSERVER` environment variable to `/path/to/go_appengine/dev_appserver.py`. - -Run tests with `go test`: - -``` -go test -v google.golang.org/appengine/... -``` - -## Contributor License Agreements - -Before we can accept your pull requests you'll need to sign a Contributor -License Agreement (CLA): - -- **If you are an individual writing original source code** and **you own the -intellectual property**, then you'll need to sign an [individual CLA][indvcla]. -- **If you work for a company that wants to allow you to contribute your work**, -then you'll need to sign a [corporate CLA][corpcla]. - -You can sign these electronically (just scroll to the bottom). After that, -we'll be able to accept your pull requests. - -## Contributor Code of Conduct - -As contributors and maintainers of this project, -and in the interest of fostering an open and welcoming community, -we pledge to respect all people who contribute through reporting issues, -posting feature requests, updating documentation, -submitting pull requests or patches, and other activities. - -We are committed to making participation in this project -a harassment-free experience for everyone, -regardless of level of experience, gender, gender identity and expression, -sexual orientation, disability, personal appearance, -body size, race, ethnicity, age, religion, or nationality. - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery -* Personal attacks -* Trolling or insulting/derogatory comments -* Public or private harassment -* Publishing other's private information, -such as physical or electronic -addresses, without explicit permission -* Other unethical or unprofessional conduct. - -Project maintainers have the right and responsibility to remove, edit, or reject -comments, commits, code, wiki edits, issues, and other contributions -that are not aligned to this Code of Conduct. -By adopting this Code of Conduct, -project maintainers commit themselves to fairly and consistently -applying these principles to every aspect of managing this project. -Project maintainers who do not follow or enforce the Code of Conduct -may be permanently removed from the project team. - -This code of conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. - -Instances of abusive, harassing, or otherwise unacceptable behavior -may be reported by opening an issue -or contacting one or more of the project maintainers. - -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.2.0, -available at [http://contributor-covenant.org/version/1/2/0/](http://contributor-covenant.org/version/1/2/0/) - -[indvcla]: https://developers.google.com/open-source/cla/individual -[corpcla]: https://developers.google.com/open-source/cla/corporate diff --git a/vendor/google.golang.org/appengine/README.md b/vendor/google.golang.org/appengine/README.md deleted file mode 100644 index 5ccddd999..000000000 --- a/vendor/google.golang.org/appengine/README.md +++ /dev/null @@ -1,100 +0,0 @@ -# Go App Engine packages - -[![CI Status](https://github.com/golang/appengine/actions/workflows/ci.yml/badge.svg)](https://github.com/golang/appengine/actions/workflows/ci.yml) - -This repository supports the Go runtime on *App Engine standard*. -It provides APIs for interacting with App Engine services. -Its canonical import path is `google.golang.org/appengine`. - -See https://cloud.google.com/appengine/docs/go/ -for more information. - -File issue reports and feature requests on the [GitHub's issue -tracker](https://github.com/golang/appengine/issues). - -## Upgrading an App Engine app to the flexible environment - -This package does not work on *App Engine flexible*. - -There are many differences between the App Engine standard environment and -the flexible environment. - -See the [documentation on upgrading to the flexible environment](https://cloud.google.com/appengine/docs/flexible/go/upgrading). - -## Directory structure - -The top level directory of this repository is the `appengine` package. It -contains the -basic APIs (e.g. `appengine.NewContext`) that apply across APIs. Specific API -packages are in subdirectories (e.g. `datastore`). - -There is an `internal` subdirectory that contains service protocol buffers, -plus packages required for connectivity to make API calls. App Engine apps -should not directly import any package under `internal`. - -## Updating from legacy (`import "appengine"`) packages - -If you're currently using the bare `appengine` packages -(that is, not these ones, imported via `google.golang.org/appengine`), -then you can use the `aefix` tool to help automate an upgrade to these packages. - -Run `go get google.golang.org/appengine/cmd/aefix` to install it. - -### 1. Update import paths - -The import paths for App Engine packages are now fully qualified, based at `google.golang.org/appengine`. -You will need to update your code to use import paths starting with that; for instance, -code importing `appengine/datastore` will now need to import `google.golang.org/appengine/datastore`. - -### 2. Update code using deprecated, removed or modified APIs - -Most App Engine services are available with exactly the same API. -A few APIs were cleaned up, and there are some differences: - -* `appengine.Context` has been replaced with the `Context` type from `context`. -* Logging methods that were on `appengine.Context` are now functions in `google.golang.org/appengine/log`. -* `appengine.Timeout` has been removed. Use `context.WithTimeout` instead. -* `appengine.Datacenter` now takes a `context.Context` argument. -* `datastore.PropertyLoadSaver` has been simplified to use slices in place of channels. -* `delay.Call` now returns an error. -* `search.FieldLoadSaver` now handles document metadata. -* `urlfetch.Transport` no longer has a Deadline field; set a deadline on the - `context.Context` instead. -* `aetest` no longer declares its own Context type, and uses the standard one instead. -* `taskqueue.QueueStats` no longer takes a maxTasks argument. That argument has been - deprecated and unused for a long time. -* `appengine.BackendHostname` and `appengine.BackendInstance` were for the deprecated backends feature. - Use `appengine.ModuleHostname`and `appengine.ModuleName` instead. -* Most of `appengine/file` and parts of `appengine/blobstore` are deprecated. - Use [Google Cloud Storage](https://godoc.org/cloud.google.com/go/storage) if the - feature you require is not present in the new - [blobstore package](https://google.golang.org/appengine/blobstore). -* `appengine/socket` is not required on App Engine flexible environment / Managed VMs. - Use the standard `net` package instead. - -## Key Encode/Decode compatibility to help with datastore library migrations - -Key compatibility updates have been added to help customers transition from google.golang.org/appengine/datastore to cloud.google.com/go/datastore. -The `EnableKeyConversion` enables automatic conversion from a key encoded with cloud.google.com/go/datastore to google.golang.org/appengine/datastore key type. - -### Enabling key conversion - -Enable key conversion by calling `EnableKeyConversion(ctx)` in the `/_ah/start` handler for basic and manual scaling or any handler in automatic scaling. - -#### 1. Basic or manual scaling - -This start handler will enable key conversion for all handlers in the service. - -``` -http.HandleFunc("/_ah/start", func(w http.ResponseWriter, r *http.Request) { - datastore.EnableKeyConversion(appengine.NewContext(r)) -}) -``` - -#### 2. Automatic scaling - -`/_ah/start` is not supported for automatic scaling and `/_ah/warmup` is not guaranteed to run, so you must call `datastore.EnableKeyConversion(appengine.NewContext(r))` -before you use code that needs key conversion. - -You may want to add this to each of your handlers, or introduce middleware where it's called. -`EnableKeyConversion` is safe for concurrent use. Any call to it after the first is ignored. \ No newline at end of file diff --git a/vendor/google.golang.org/appengine/appengine.go b/vendor/google.golang.org/appengine/appengine.go deleted file mode 100644 index 35ba9c896..000000000 --- a/vendor/google.golang.org/appengine/appengine.go +++ /dev/null @@ -1,138 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -// Package appengine provides basic functionality for Google App Engine. -// -// For more information on how to write Go apps for Google App Engine, see: -// https://cloud.google.com/appengine/docs/go/ -package appengine // import "google.golang.org/appengine" - -import ( - "context" - "net/http" - - "github.com/golang/protobuf/proto" - - "google.golang.org/appengine/internal" -) - -// The gophers party all night; the rabbits provide the beats. - -// Main is the principal entry point for an app running in App Engine. -// -// On App Engine Flexible it installs a trivial health checker if one isn't -// already registered, and starts listening on port 8080 (overridden by the -// $PORT environment variable). -// -// See https://cloud.google.com/appengine/docs/flexible/custom-runtimes#health_check_requests -// for details on how to do your own health checking. -// -// On App Engine Standard it ensures the server has started and is prepared to -// receive requests. -// -// Main never returns. -// -// Main is designed so that the app's main package looks like this: -// -// package main -// -// import ( -// "google.golang.org/appengine" -// -// _ "myapp/package0" -// _ "myapp/package1" -// ) -// -// func main() { -// appengine.Main() -// } -// -// The "myapp/packageX" packages are expected to register HTTP handlers -// in their init functions. -func Main() { - internal.Main() -} - -// Middleware wraps an http handler so that it can make GAE API calls -var Middleware func(http.Handler) http.Handler = internal.Middleware - -// IsDevAppServer reports whether the App Engine app is running in the -// development App Server. -func IsDevAppServer() bool { - return internal.IsDevAppServer() -} - -// IsStandard reports whether the App Engine app is running in the standard -// environment. This includes both the first generation runtimes (<= Go 1.9) -// and the second generation runtimes (>= Go 1.11). -func IsStandard() bool { - return internal.IsStandard() -} - -// IsFlex reports whether the App Engine app is running in the flexible environment. -func IsFlex() bool { - return internal.IsFlex() -} - -// IsAppEngine reports whether the App Engine app is running on App Engine, in either -// the standard or flexible environment. -func IsAppEngine() bool { - return internal.IsAppEngine() -} - -// IsSecondGen reports whether the App Engine app is running on the second generation -// runtimes (>= Go 1.11). -func IsSecondGen() bool { - return internal.IsSecondGen() -} - -// NewContext returns a context for an in-flight HTTP request. -// This function is cheap. -func NewContext(req *http.Request) context.Context { - return internal.ReqContext(req) -} - -// WithContext returns a copy of the parent context -// and associates it with an in-flight HTTP request. -// This function is cheap. -func WithContext(parent context.Context, req *http.Request) context.Context { - return internal.WithContext(parent, req) -} - -// BlobKey is a key for a blobstore blob. -// -// Conceptually, this type belongs in the blobstore package, but it lives in -// the appengine package to avoid a circular dependency: blobstore depends on -// datastore, and datastore needs to refer to the BlobKey type. -type BlobKey string - -// GeoPoint represents a location as latitude/longitude in degrees. -type GeoPoint struct { - Lat, Lng float64 -} - -// Valid returns whether a GeoPoint is within [-90, 90] latitude and [-180, 180] longitude. -func (g GeoPoint) Valid() bool { - return -90 <= g.Lat && g.Lat <= 90 && -180 <= g.Lng && g.Lng <= 180 -} - -// APICallFunc defines a function type for handling an API call. -// See WithCallOverride. -type APICallFunc func(ctx context.Context, service, method string, in, out proto.Message) error - -// WithAPICallFunc returns a copy of the parent context -// that will cause API calls to invoke f instead of their normal operation. -// -// This is intended for advanced users only. -func WithAPICallFunc(ctx context.Context, f APICallFunc) context.Context { - return internal.WithCallOverride(ctx, internal.CallOverrideFunc(f)) -} - -// APICall performs an API call. -// -// This is not intended for general use; it is exported for use in conjunction -// with WithAPICallFunc. -func APICall(ctx context.Context, service, method string, in, out proto.Message) error { - return internal.Call(ctx, service, method, in, out) -} diff --git a/vendor/google.golang.org/appengine/appengine_vm.go b/vendor/google.golang.org/appengine/appengine_vm.go deleted file mode 100644 index 6e1d041cd..000000000 --- a/vendor/google.golang.org/appengine/appengine_vm.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2015 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -//go:build !appengine -// +build !appengine - -package appengine - -import ( - "context" -) - -// BackgroundContext returns a context not associated with a request. -// -// Deprecated: App Engine no longer has a special background context. -// Just use context.Background(). -func BackgroundContext() context.Context { - return context.Background() -} diff --git a/vendor/google.golang.org/appengine/errors.go b/vendor/google.golang.org/appengine/errors.go deleted file mode 100644 index 16d0772e2..000000000 --- a/vendor/google.golang.org/appengine/errors.go +++ /dev/null @@ -1,46 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -// This file provides error functions for common API failure modes. - -package appengine - -import ( - "fmt" - - "google.golang.org/appengine/internal" -) - -// IsOverQuota reports whether err represents an API call failure -// due to insufficient available quota. -func IsOverQuota(err error) bool { - callErr, ok := err.(*internal.CallError) - return ok && callErr.Code == 4 -} - -// MultiError is returned by batch operations when there are errors with -// particular elements. Errors will be in a one-to-one correspondence with -// the input elements; successful elements will have a nil entry. -type MultiError []error - -func (m MultiError) Error() string { - s, n := "", 0 - for _, e := range m { - if e != nil { - if n == 0 { - s = e.Error() - } - n++ - } - } - switch n { - case 0: - return "(0 errors)" - case 1: - return s - case 2: - return s + " (and 1 other error)" - } - return fmt.Sprintf("%s (and %d other errors)", s, n-1) -} diff --git a/vendor/google.golang.org/appengine/identity.go b/vendor/google.golang.org/appengine/identity.go deleted file mode 100644 index 1202fc1a5..000000000 --- a/vendor/google.golang.org/appengine/identity.go +++ /dev/null @@ -1,141 +0,0 @@ -// Copyright 2011 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package appengine - -import ( - "context" - "time" - - "google.golang.org/appengine/internal" - pb "google.golang.org/appengine/internal/app_identity" - modpb "google.golang.org/appengine/internal/modules" -) - -// AppID returns the application ID for the current application. -// The string will be a plain application ID (e.g. "appid"), with a -// domain prefix for custom domain deployments (e.g. "example.com:appid"). -func AppID(c context.Context) string { return internal.AppID(c) } - -// DefaultVersionHostname returns the standard hostname of the default version -// of the current application (e.g. "my-app.appspot.com"). This is suitable for -// use in constructing URLs. -func DefaultVersionHostname(c context.Context) string { - return internal.DefaultVersionHostname(c) -} - -// ModuleName returns the module name of the current instance. -func ModuleName(c context.Context) string { - return internal.ModuleName(c) -} - -// ModuleHostname returns a hostname of a module instance. -// If module is the empty string, it refers to the module of the current instance. -// If version is empty, it refers to the version of the current instance if valid, -// or the default version of the module of the current instance. -// If instance is empty, ModuleHostname returns the load-balancing hostname. -func ModuleHostname(c context.Context, module, version, instance string) (string, error) { - req := &modpb.GetHostnameRequest{} - if module != "" { - req.Module = &module - } - if version != "" { - req.Version = &version - } - if instance != "" { - req.Instance = &instance - } - res := &modpb.GetHostnameResponse{} - if err := internal.Call(c, "modules", "GetHostname", req, res); err != nil { - return "", err - } - return *res.Hostname, nil -} - -// VersionID returns the version ID for the current application. -// It will be of the form "X.Y", where X is specified in app.yaml, -// and Y is a number generated when each version of the app is uploaded. -// It does not include a module name. -func VersionID(c context.Context) string { return internal.VersionID(c) } - -// InstanceID returns a mostly-unique identifier for this instance. -func InstanceID() string { return internal.InstanceID() } - -// Datacenter returns an identifier for the datacenter that the instance is running in. -func Datacenter(c context.Context) string { return internal.Datacenter(c) } - -// ServerSoftware returns the App Engine release version. -// In production, it looks like "Google App Engine/X.Y.Z". -// In the development appserver, it looks like "Development/X.Y". -func ServerSoftware() string { return internal.ServerSoftware() } - -// RequestID returns a string that uniquely identifies the request. -func RequestID(c context.Context) string { return internal.RequestID(c) } - -// AccessToken generates an OAuth2 access token for the specified scopes on -// behalf of service account of this application. This token will expire after -// the returned time. -func AccessToken(c context.Context, scopes ...string) (token string, expiry time.Time, err error) { - req := &pb.GetAccessTokenRequest{Scope: scopes} - res := &pb.GetAccessTokenResponse{} - - err = internal.Call(c, "app_identity_service", "GetAccessToken", req, res) - if err != nil { - return "", time.Time{}, err - } - return res.GetAccessToken(), time.Unix(res.GetExpirationTime(), 0), nil -} - -// Certificate represents a public certificate for the app. -type Certificate struct { - KeyName string - Data []byte // PEM-encoded X.509 certificate -} - -// PublicCertificates retrieves the public certificates for the app. -// They can be used to verify a signature returned by SignBytes. -func PublicCertificates(c context.Context) ([]Certificate, error) { - req := &pb.GetPublicCertificateForAppRequest{} - res := &pb.GetPublicCertificateForAppResponse{} - if err := internal.Call(c, "app_identity_service", "GetPublicCertificatesForApp", req, res); err != nil { - return nil, err - } - var cs []Certificate - for _, pc := range res.PublicCertificateList { - cs = append(cs, Certificate{ - KeyName: pc.GetKeyName(), - Data: []byte(pc.GetX509CertificatePem()), - }) - } - return cs, nil -} - -// ServiceAccount returns a string representing the service account name, in -// the form of an email address (typically app_id@appspot.gserviceaccount.com). -func ServiceAccount(c context.Context) (string, error) { - req := &pb.GetServiceAccountNameRequest{} - res := &pb.GetServiceAccountNameResponse{} - - err := internal.Call(c, "app_identity_service", "GetServiceAccountName", req, res) - if err != nil { - return "", err - } - return res.GetServiceAccountName(), err -} - -// SignBytes signs bytes using a private key unique to your application. -func SignBytes(c context.Context, bytes []byte) (keyName string, signature []byte, err error) { - req := &pb.SignForAppRequest{BytesToSign: bytes} - res := &pb.SignForAppResponse{} - - if err := internal.Call(c, "app_identity_service", "SignForApp", req, res); err != nil { - return "", nil, err - } - return res.GetKeyName(), res.GetSignatureBytes(), nil -} - -func init() { - internal.RegisterErrorCodeMap("app_identity_service", pb.AppIdentityServiceError_ErrorCode_name) - internal.RegisterErrorCodeMap("modules", modpb.ModulesServiceError_ErrorCode_name) -} diff --git a/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go b/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go deleted file mode 100644 index 9a2ff77ab..000000000 --- a/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.pb.go +++ /dev/null @@ -1,611 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google.golang.org/appengine/internal/app_identity/app_identity_service.proto - -package app_identity - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type AppIdentityServiceError_ErrorCode int32 - -const ( - AppIdentityServiceError_SUCCESS AppIdentityServiceError_ErrorCode = 0 - AppIdentityServiceError_UNKNOWN_SCOPE AppIdentityServiceError_ErrorCode = 9 - AppIdentityServiceError_BLOB_TOO_LARGE AppIdentityServiceError_ErrorCode = 1000 - AppIdentityServiceError_DEADLINE_EXCEEDED AppIdentityServiceError_ErrorCode = 1001 - AppIdentityServiceError_NOT_A_VALID_APP AppIdentityServiceError_ErrorCode = 1002 - AppIdentityServiceError_UNKNOWN_ERROR AppIdentityServiceError_ErrorCode = 1003 - AppIdentityServiceError_NOT_ALLOWED AppIdentityServiceError_ErrorCode = 1005 - AppIdentityServiceError_NOT_IMPLEMENTED AppIdentityServiceError_ErrorCode = 1006 -) - -var AppIdentityServiceError_ErrorCode_name = map[int32]string{ - 0: "SUCCESS", - 9: "UNKNOWN_SCOPE", - 1000: "BLOB_TOO_LARGE", - 1001: "DEADLINE_EXCEEDED", - 1002: "NOT_A_VALID_APP", - 1003: "UNKNOWN_ERROR", - 1005: "NOT_ALLOWED", - 1006: "NOT_IMPLEMENTED", -} -var AppIdentityServiceError_ErrorCode_value = map[string]int32{ - "SUCCESS": 0, - "UNKNOWN_SCOPE": 9, - "BLOB_TOO_LARGE": 1000, - "DEADLINE_EXCEEDED": 1001, - "NOT_A_VALID_APP": 1002, - "UNKNOWN_ERROR": 1003, - "NOT_ALLOWED": 1005, - "NOT_IMPLEMENTED": 1006, -} - -func (x AppIdentityServiceError_ErrorCode) Enum() *AppIdentityServiceError_ErrorCode { - p := new(AppIdentityServiceError_ErrorCode) - *p = x - return p -} -func (x AppIdentityServiceError_ErrorCode) String() string { - return proto.EnumName(AppIdentityServiceError_ErrorCode_name, int32(x)) -} -func (x *AppIdentityServiceError_ErrorCode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(AppIdentityServiceError_ErrorCode_value, data, "AppIdentityServiceError_ErrorCode") - if err != nil { - return err - } - *x = AppIdentityServiceError_ErrorCode(value) - return nil -} -func (AppIdentityServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{0, 0} -} - -type AppIdentityServiceError struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *AppIdentityServiceError) Reset() { *m = AppIdentityServiceError{} } -func (m *AppIdentityServiceError) String() string { return proto.CompactTextString(m) } -func (*AppIdentityServiceError) ProtoMessage() {} -func (*AppIdentityServiceError) Descriptor() ([]byte, []int) { - return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{0} -} -func (m *AppIdentityServiceError) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_AppIdentityServiceError.Unmarshal(m, b) -} -func (m *AppIdentityServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_AppIdentityServiceError.Marshal(b, m, deterministic) -} -func (dst *AppIdentityServiceError) XXX_Merge(src proto.Message) { - xxx_messageInfo_AppIdentityServiceError.Merge(dst, src) -} -func (m *AppIdentityServiceError) XXX_Size() int { - return xxx_messageInfo_AppIdentityServiceError.Size(m) -} -func (m *AppIdentityServiceError) XXX_DiscardUnknown() { - xxx_messageInfo_AppIdentityServiceError.DiscardUnknown(m) -} - -var xxx_messageInfo_AppIdentityServiceError proto.InternalMessageInfo - -type SignForAppRequest struct { - BytesToSign []byte `protobuf:"bytes,1,opt,name=bytes_to_sign,json=bytesToSign" json:"bytes_to_sign,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SignForAppRequest) Reset() { *m = SignForAppRequest{} } -func (m *SignForAppRequest) String() string { return proto.CompactTextString(m) } -func (*SignForAppRequest) ProtoMessage() {} -func (*SignForAppRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{1} -} -func (m *SignForAppRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SignForAppRequest.Unmarshal(m, b) -} -func (m *SignForAppRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SignForAppRequest.Marshal(b, m, deterministic) -} -func (dst *SignForAppRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignForAppRequest.Merge(dst, src) -} -func (m *SignForAppRequest) XXX_Size() int { - return xxx_messageInfo_SignForAppRequest.Size(m) -} -func (m *SignForAppRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SignForAppRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SignForAppRequest proto.InternalMessageInfo - -func (m *SignForAppRequest) GetBytesToSign() []byte { - if m != nil { - return m.BytesToSign - } - return nil -} - -type SignForAppResponse struct { - KeyName *string `protobuf:"bytes,1,opt,name=key_name,json=keyName" json:"key_name,omitempty"` - SignatureBytes []byte `protobuf:"bytes,2,opt,name=signature_bytes,json=signatureBytes" json:"signature_bytes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SignForAppResponse) Reset() { *m = SignForAppResponse{} } -func (m *SignForAppResponse) String() string { return proto.CompactTextString(m) } -func (*SignForAppResponse) ProtoMessage() {} -func (*SignForAppResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{2} -} -func (m *SignForAppResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SignForAppResponse.Unmarshal(m, b) -} -func (m *SignForAppResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SignForAppResponse.Marshal(b, m, deterministic) -} -func (dst *SignForAppResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SignForAppResponse.Merge(dst, src) -} -func (m *SignForAppResponse) XXX_Size() int { - return xxx_messageInfo_SignForAppResponse.Size(m) -} -func (m *SignForAppResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SignForAppResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SignForAppResponse proto.InternalMessageInfo - -func (m *SignForAppResponse) GetKeyName() string { - if m != nil && m.KeyName != nil { - return *m.KeyName - } - return "" -} - -func (m *SignForAppResponse) GetSignatureBytes() []byte { - if m != nil { - return m.SignatureBytes - } - return nil -} - -type GetPublicCertificateForAppRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetPublicCertificateForAppRequest) Reset() { *m = GetPublicCertificateForAppRequest{} } -func (m *GetPublicCertificateForAppRequest) String() string { return proto.CompactTextString(m) } -func (*GetPublicCertificateForAppRequest) ProtoMessage() {} -func (*GetPublicCertificateForAppRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{3} -} -func (m *GetPublicCertificateForAppRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetPublicCertificateForAppRequest.Unmarshal(m, b) -} -func (m *GetPublicCertificateForAppRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetPublicCertificateForAppRequest.Marshal(b, m, deterministic) -} -func (dst *GetPublicCertificateForAppRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetPublicCertificateForAppRequest.Merge(dst, src) -} -func (m *GetPublicCertificateForAppRequest) XXX_Size() int { - return xxx_messageInfo_GetPublicCertificateForAppRequest.Size(m) -} -func (m *GetPublicCertificateForAppRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetPublicCertificateForAppRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetPublicCertificateForAppRequest proto.InternalMessageInfo - -type PublicCertificate struct { - KeyName *string `protobuf:"bytes,1,opt,name=key_name,json=keyName" json:"key_name,omitempty"` - X509CertificatePem *string `protobuf:"bytes,2,opt,name=x509_certificate_pem,json=x509CertificatePem" json:"x509_certificate_pem,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *PublicCertificate) Reset() { *m = PublicCertificate{} } -func (m *PublicCertificate) String() string { return proto.CompactTextString(m) } -func (*PublicCertificate) ProtoMessage() {} -func (*PublicCertificate) Descriptor() ([]byte, []int) { - return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{4} -} -func (m *PublicCertificate) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_PublicCertificate.Unmarshal(m, b) -} -func (m *PublicCertificate) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_PublicCertificate.Marshal(b, m, deterministic) -} -func (dst *PublicCertificate) XXX_Merge(src proto.Message) { - xxx_messageInfo_PublicCertificate.Merge(dst, src) -} -func (m *PublicCertificate) XXX_Size() int { - return xxx_messageInfo_PublicCertificate.Size(m) -} -func (m *PublicCertificate) XXX_DiscardUnknown() { - xxx_messageInfo_PublicCertificate.DiscardUnknown(m) -} - -var xxx_messageInfo_PublicCertificate proto.InternalMessageInfo - -func (m *PublicCertificate) GetKeyName() string { - if m != nil && m.KeyName != nil { - return *m.KeyName - } - return "" -} - -func (m *PublicCertificate) GetX509CertificatePem() string { - if m != nil && m.X509CertificatePem != nil { - return *m.X509CertificatePem - } - return "" -} - -type GetPublicCertificateForAppResponse struct { - PublicCertificateList []*PublicCertificate `protobuf:"bytes,1,rep,name=public_certificate_list,json=publicCertificateList" json:"public_certificate_list,omitempty"` - MaxClientCacheTimeInSecond *int64 `protobuf:"varint,2,opt,name=max_client_cache_time_in_second,json=maxClientCacheTimeInSecond" json:"max_client_cache_time_in_second,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetPublicCertificateForAppResponse) Reset() { *m = GetPublicCertificateForAppResponse{} } -func (m *GetPublicCertificateForAppResponse) String() string { return proto.CompactTextString(m) } -func (*GetPublicCertificateForAppResponse) ProtoMessage() {} -func (*GetPublicCertificateForAppResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{5} -} -func (m *GetPublicCertificateForAppResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetPublicCertificateForAppResponse.Unmarshal(m, b) -} -func (m *GetPublicCertificateForAppResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetPublicCertificateForAppResponse.Marshal(b, m, deterministic) -} -func (dst *GetPublicCertificateForAppResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetPublicCertificateForAppResponse.Merge(dst, src) -} -func (m *GetPublicCertificateForAppResponse) XXX_Size() int { - return xxx_messageInfo_GetPublicCertificateForAppResponse.Size(m) -} -func (m *GetPublicCertificateForAppResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetPublicCertificateForAppResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetPublicCertificateForAppResponse proto.InternalMessageInfo - -func (m *GetPublicCertificateForAppResponse) GetPublicCertificateList() []*PublicCertificate { - if m != nil { - return m.PublicCertificateList - } - return nil -} - -func (m *GetPublicCertificateForAppResponse) GetMaxClientCacheTimeInSecond() int64 { - if m != nil && m.MaxClientCacheTimeInSecond != nil { - return *m.MaxClientCacheTimeInSecond - } - return 0 -} - -type GetServiceAccountNameRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetServiceAccountNameRequest) Reset() { *m = GetServiceAccountNameRequest{} } -func (m *GetServiceAccountNameRequest) String() string { return proto.CompactTextString(m) } -func (*GetServiceAccountNameRequest) ProtoMessage() {} -func (*GetServiceAccountNameRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{6} -} -func (m *GetServiceAccountNameRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetServiceAccountNameRequest.Unmarshal(m, b) -} -func (m *GetServiceAccountNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetServiceAccountNameRequest.Marshal(b, m, deterministic) -} -func (dst *GetServiceAccountNameRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetServiceAccountNameRequest.Merge(dst, src) -} -func (m *GetServiceAccountNameRequest) XXX_Size() int { - return xxx_messageInfo_GetServiceAccountNameRequest.Size(m) -} -func (m *GetServiceAccountNameRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetServiceAccountNameRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetServiceAccountNameRequest proto.InternalMessageInfo - -type GetServiceAccountNameResponse struct { - ServiceAccountName *string `protobuf:"bytes,1,opt,name=service_account_name,json=serviceAccountName" json:"service_account_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetServiceAccountNameResponse) Reset() { *m = GetServiceAccountNameResponse{} } -func (m *GetServiceAccountNameResponse) String() string { return proto.CompactTextString(m) } -func (*GetServiceAccountNameResponse) ProtoMessage() {} -func (*GetServiceAccountNameResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{7} -} -func (m *GetServiceAccountNameResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetServiceAccountNameResponse.Unmarshal(m, b) -} -func (m *GetServiceAccountNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetServiceAccountNameResponse.Marshal(b, m, deterministic) -} -func (dst *GetServiceAccountNameResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetServiceAccountNameResponse.Merge(dst, src) -} -func (m *GetServiceAccountNameResponse) XXX_Size() int { - return xxx_messageInfo_GetServiceAccountNameResponse.Size(m) -} -func (m *GetServiceAccountNameResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetServiceAccountNameResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetServiceAccountNameResponse proto.InternalMessageInfo - -func (m *GetServiceAccountNameResponse) GetServiceAccountName() string { - if m != nil && m.ServiceAccountName != nil { - return *m.ServiceAccountName - } - return "" -} - -type GetAccessTokenRequest struct { - Scope []string `protobuf:"bytes,1,rep,name=scope" json:"scope,omitempty"` - ServiceAccountId *int64 `protobuf:"varint,2,opt,name=service_account_id,json=serviceAccountId" json:"service_account_id,omitempty"` - ServiceAccountName *string `protobuf:"bytes,3,opt,name=service_account_name,json=serviceAccountName" json:"service_account_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAccessTokenRequest) Reset() { *m = GetAccessTokenRequest{} } -func (m *GetAccessTokenRequest) String() string { return proto.CompactTextString(m) } -func (*GetAccessTokenRequest) ProtoMessage() {} -func (*GetAccessTokenRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{8} -} -func (m *GetAccessTokenRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAccessTokenRequest.Unmarshal(m, b) -} -func (m *GetAccessTokenRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAccessTokenRequest.Marshal(b, m, deterministic) -} -func (dst *GetAccessTokenRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAccessTokenRequest.Merge(dst, src) -} -func (m *GetAccessTokenRequest) XXX_Size() int { - return xxx_messageInfo_GetAccessTokenRequest.Size(m) -} -func (m *GetAccessTokenRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetAccessTokenRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAccessTokenRequest proto.InternalMessageInfo - -func (m *GetAccessTokenRequest) GetScope() []string { - if m != nil { - return m.Scope - } - return nil -} - -func (m *GetAccessTokenRequest) GetServiceAccountId() int64 { - if m != nil && m.ServiceAccountId != nil { - return *m.ServiceAccountId - } - return 0 -} - -func (m *GetAccessTokenRequest) GetServiceAccountName() string { - if m != nil && m.ServiceAccountName != nil { - return *m.ServiceAccountName - } - return "" -} - -type GetAccessTokenResponse struct { - AccessToken *string `protobuf:"bytes,1,opt,name=access_token,json=accessToken" json:"access_token,omitempty"` - ExpirationTime *int64 `protobuf:"varint,2,opt,name=expiration_time,json=expirationTime" json:"expiration_time,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetAccessTokenResponse) Reset() { *m = GetAccessTokenResponse{} } -func (m *GetAccessTokenResponse) String() string { return proto.CompactTextString(m) } -func (*GetAccessTokenResponse) ProtoMessage() {} -func (*GetAccessTokenResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{9} -} -func (m *GetAccessTokenResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetAccessTokenResponse.Unmarshal(m, b) -} -func (m *GetAccessTokenResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetAccessTokenResponse.Marshal(b, m, deterministic) -} -func (dst *GetAccessTokenResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetAccessTokenResponse.Merge(dst, src) -} -func (m *GetAccessTokenResponse) XXX_Size() int { - return xxx_messageInfo_GetAccessTokenResponse.Size(m) -} -func (m *GetAccessTokenResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetAccessTokenResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetAccessTokenResponse proto.InternalMessageInfo - -func (m *GetAccessTokenResponse) GetAccessToken() string { - if m != nil && m.AccessToken != nil { - return *m.AccessToken - } - return "" -} - -func (m *GetAccessTokenResponse) GetExpirationTime() int64 { - if m != nil && m.ExpirationTime != nil { - return *m.ExpirationTime - } - return 0 -} - -type GetDefaultGcsBucketNameRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetDefaultGcsBucketNameRequest) Reset() { *m = GetDefaultGcsBucketNameRequest{} } -func (m *GetDefaultGcsBucketNameRequest) String() string { return proto.CompactTextString(m) } -func (*GetDefaultGcsBucketNameRequest) ProtoMessage() {} -func (*GetDefaultGcsBucketNameRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{10} -} -func (m *GetDefaultGcsBucketNameRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetDefaultGcsBucketNameRequest.Unmarshal(m, b) -} -func (m *GetDefaultGcsBucketNameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetDefaultGcsBucketNameRequest.Marshal(b, m, deterministic) -} -func (dst *GetDefaultGcsBucketNameRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetDefaultGcsBucketNameRequest.Merge(dst, src) -} -func (m *GetDefaultGcsBucketNameRequest) XXX_Size() int { - return xxx_messageInfo_GetDefaultGcsBucketNameRequest.Size(m) -} -func (m *GetDefaultGcsBucketNameRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetDefaultGcsBucketNameRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetDefaultGcsBucketNameRequest proto.InternalMessageInfo - -type GetDefaultGcsBucketNameResponse struct { - DefaultGcsBucketName *string `protobuf:"bytes,1,opt,name=default_gcs_bucket_name,json=defaultGcsBucketName" json:"default_gcs_bucket_name,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetDefaultGcsBucketNameResponse) Reset() { *m = GetDefaultGcsBucketNameResponse{} } -func (m *GetDefaultGcsBucketNameResponse) String() string { return proto.CompactTextString(m) } -func (*GetDefaultGcsBucketNameResponse) ProtoMessage() {} -func (*GetDefaultGcsBucketNameResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_app_identity_service_08a6e3f74b04cfa4, []int{11} -} -func (m *GetDefaultGcsBucketNameResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetDefaultGcsBucketNameResponse.Unmarshal(m, b) -} -func (m *GetDefaultGcsBucketNameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetDefaultGcsBucketNameResponse.Marshal(b, m, deterministic) -} -func (dst *GetDefaultGcsBucketNameResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetDefaultGcsBucketNameResponse.Merge(dst, src) -} -func (m *GetDefaultGcsBucketNameResponse) XXX_Size() int { - return xxx_messageInfo_GetDefaultGcsBucketNameResponse.Size(m) -} -func (m *GetDefaultGcsBucketNameResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetDefaultGcsBucketNameResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetDefaultGcsBucketNameResponse proto.InternalMessageInfo - -func (m *GetDefaultGcsBucketNameResponse) GetDefaultGcsBucketName() string { - if m != nil && m.DefaultGcsBucketName != nil { - return *m.DefaultGcsBucketName - } - return "" -} - -func init() { - proto.RegisterType((*AppIdentityServiceError)(nil), "appengine.AppIdentityServiceError") - proto.RegisterType((*SignForAppRequest)(nil), "appengine.SignForAppRequest") - proto.RegisterType((*SignForAppResponse)(nil), "appengine.SignForAppResponse") - proto.RegisterType((*GetPublicCertificateForAppRequest)(nil), "appengine.GetPublicCertificateForAppRequest") - proto.RegisterType((*PublicCertificate)(nil), "appengine.PublicCertificate") - proto.RegisterType((*GetPublicCertificateForAppResponse)(nil), "appengine.GetPublicCertificateForAppResponse") - proto.RegisterType((*GetServiceAccountNameRequest)(nil), "appengine.GetServiceAccountNameRequest") - proto.RegisterType((*GetServiceAccountNameResponse)(nil), "appengine.GetServiceAccountNameResponse") - proto.RegisterType((*GetAccessTokenRequest)(nil), "appengine.GetAccessTokenRequest") - proto.RegisterType((*GetAccessTokenResponse)(nil), "appengine.GetAccessTokenResponse") - proto.RegisterType((*GetDefaultGcsBucketNameRequest)(nil), "appengine.GetDefaultGcsBucketNameRequest") - proto.RegisterType((*GetDefaultGcsBucketNameResponse)(nil), "appengine.GetDefaultGcsBucketNameResponse") -} - -func init() { - proto.RegisterFile("google.golang.org/appengine/internal/app_identity/app_identity_service.proto", fileDescriptor_app_identity_service_08a6e3f74b04cfa4) -} - -var fileDescriptor_app_identity_service_08a6e3f74b04cfa4 = []byte{ - // 676 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x7c, 0x54, 0xdb, 0x6e, 0xda, 0x58, - 0x14, 0x1d, 0x26, 0x1a, 0x31, 0x6c, 0x12, 0x62, 0xce, 0x90, 0xcb, 0x8c, 0x32, 0xb9, 0x78, 0x1e, - 0x26, 0x0f, 0x15, 0x89, 0x2a, 0x45, 0x55, 0x1f, 0x8d, 0xed, 0x22, 0x54, 0x07, 0x53, 0x43, 0x9a, - 0xa8, 0x2f, 0xa7, 0xce, 0x61, 0xc7, 0x3d, 0x02, 0x9f, 0xe3, 0xda, 0x87, 0x0a, 0x3e, 0xa2, 0x3f, - 0xd2, 0x9f, 0xe8, 0x5b, 0xbf, 0xa5, 0x17, 0xb5, 0xdf, 0x50, 0xd9, 0x38, 0x5c, 0x92, 0x92, 0x37, - 0xbc, 0xf6, 0x5a, 0xcb, 0x6b, 0x2f, 0x6d, 0x0c, 0x4e, 0x20, 0x65, 0x30, 0xc4, 0x7a, 0x20, 0x87, - 0xbe, 0x08, 0xea, 0x32, 0x0e, 0x4e, 0xfc, 0x28, 0x42, 0x11, 0x70, 0x81, 0x27, 0x5c, 0x28, 0x8c, - 0x85, 0x3f, 0x4c, 0x21, 0xca, 0xfb, 0x28, 0x14, 0x57, 0x93, 0xa5, 0x07, 0x9a, 0x60, 0xfc, 0x8e, - 0x33, 0xac, 0x47, 0xb1, 0x54, 0x92, 0x94, 0x66, 0x5a, 0xfd, 0x53, 0x01, 0x76, 0x8c, 0x28, 0x6a, - 0xe5, 0xc4, 0xee, 0x94, 0x67, 0xc7, 0xb1, 0x8c, 0xf5, 0x0f, 0x05, 0x28, 0x65, 0xbf, 0x4c, 0xd9, - 0x47, 0x52, 0x86, 0x62, 0xf7, 0xc2, 0x34, 0xed, 0x6e, 0x57, 0xfb, 0x8d, 0x54, 0x61, 0xe3, 0xa2, - 0xfd, 0xbc, 0xed, 0x5e, 0xb6, 0x69, 0xd7, 0x74, 0x3b, 0xb6, 0x56, 0x22, 0x7f, 0x41, 0xa5, 0xe1, - 0xb8, 0x0d, 0xda, 0x73, 0x5d, 0xea, 0x18, 0x5e, 0xd3, 0xd6, 0x3e, 0x17, 0xc9, 0x36, 0x54, 0x2d, - 0xdb, 0xb0, 0x9c, 0x56, 0xdb, 0xa6, 0xf6, 0x95, 0x69, 0xdb, 0x96, 0x6d, 0x69, 0x5f, 0x8a, 0xa4, - 0x06, 0x9b, 0x6d, 0xb7, 0x47, 0x0d, 0xfa, 0xd2, 0x70, 0x5a, 0x16, 0x35, 0x3a, 0x1d, 0xed, 0x6b, - 0x91, 0x90, 0xb9, 0xab, 0xed, 0x79, 0xae, 0xa7, 0x7d, 0x2b, 0x12, 0x0d, 0xca, 0x19, 0xd3, 0x71, - 0xdc, 0x4b, 0xdb, 0xd2, 0xbe, 0xcf, 0xb4, 0xad, 0xf3, 0x8e, 0x63, 0x9f, 0xdb, 0xed, 0x9e, 0x6d, - 0x69, 0x3f, 0x8a, 0xfa, 0x13, 0xa8, 0x76, 0x79, 0x20, 0x9e, 0xc9, 0xd8, 0x88, 0x22, 0x0f, 0xdf, - 0x8e, 0x30, 0x51, 0x44, 0x87, 0x8d, 0xeb, 0x89, 0xc2, 0x84, 0x2a, 0x49, 0x13, 0x1e, 0x88, 0xdd, - 0xc2, 0x61, 0xe1, 0x78, 0xdd, 0x2b, 0x67, 0x60, 0x4f, 0xa6, 0x02, 0xfd, 0x0a, 0xc8, 0xa2, 0x30, - 0x89, 0xa4, 0x48, 0x90, 0xfc, 0x0d, 0x7f, 0x0e, 0x70, 0x42, 0x85, 0x1f, 0x62, 0x26, 0x2a, 0x79, - 0xc5, 0x01, 0x4e, 0xda, 0x7e, 0x88, 0xe4, 0x7f, 0xd8, 0x4c, 0xbd, 0x7c, 0x35, 0x8a, 0x91, 0x66, - 0x4e, 0xbb, 0xbf, 0x67, 0xb6, 0x95, 0x19, 0xdc, 0x48, 0x51, 0xfd, 0x3f, 0x38, 0x6a, 0xa2, 0xea, - 0x8c, 0xae, 0x87, 0x9c, 0x99, 0x18, 0x2b, 0x7e, 0xc3, 0x99, 0xaf, 0x70, 0x29, 0xa2, 0xfe, 0x1a, - 0xaa, 0xf7, 0x18, 0x0f, 0xbd, 0xfd, 0x14, 0x6a, 0xe3, 0xb3, 0xd3, 0xa7, 0x94, 0xcd, 0xe9, 0x34, - 0xc2, 0x30, 0x8b, 0x50, 0xf2, 0x48, 0x3a, 0x5b, 0x70, 0xea, 0x60, 0xa8, 0x7f, 0x2c, 0x80, 0xfe, - 0x50, 0x8e, 0x7c, 0xe3, 0x1e, 0xec, 0x44, 0x19, 0x65, 0xc9, 0x7a, 0xc8, 0x13, 0xb5, 0x5b, 0x38, - 0x5c, 0x3b, 0x2e, 0x3f, 0xde, 0xab, 0xcf, 0xce, 0xa6, 0x7e, 0xcf, 0xcc, 0xdb, 0x8a, 0xee, 0x42, - 0x0e, 0x4f, 0x14, 0x31, 0xe1, 0x20, 0xf4, 0xc7, 0x94, 0x0d, 0x39, 0x0a, 0x45, 0x99, 0xcf, 0xde, - 0x20, 0x55, 0x3c, 0x44, 0xca, 0x05, 0x4d, 0x90, 0x49, 0xd1, 0xcf, 0x92, 0xaf, 0x79, 0xff, 0x84, - 0xfe, 0xd8, 0xcc, 0x58, 0x66, 0x4a, 0xea, 0xf1, 0x10, 0x5b, 0xa2, 0x9b, 0x31, 0xf4, 0x7d, 0xd8, - 0x6b, 0xa2, 0xca, 0x6f, 0xd3, 0x60, 0x4c, 0x8e, 0x84, 0x4a, 0xcb, 0xb8, 0xed, 0xf0, 0x05, 0xfc, - 0xbb, 0x62, 0x9e, 0xef, 0x76, 0x0a, 0xb5, 0xfc, 0x1f, 0x40, 0xfd, 0xe9, 0x78, 0xb1, 0x5b, 0x92, - 0xdc, 0x53, 0xea, 0xef, 0x0b, 0xb0, 0xd5, 0x44, 0x65, 0x30, 0x86, 0x49, 0xd2, 0x93, 0x03, 0x14, - 0xb7, 0x37, 0x55, 0x83, 0x3f, 0x12, 0x26, 0x23, 0xcc, 0x5a, 0x29, 0x79, 0xd3, 0x07, 0xf2, 0x08, - 0xc8, 0xdd, 0x37, 0xf0, 0xdb, 0xd5, 0xb4, 0x65, 0xff, 0x56, 0x7f, 0x65, 0x9e, 0xb5, 0x95, 0x79, - 0xfa, 0xb0, 0x7d, 0x37, 0x4e, 0xbe, 0xdb, 0x11, 0xac, 0xfb, 0x19, 0x4c, 0x55, 0x8a, 0xe7, 0x3b, - 0x95, 0xfd, 0x39, 0x35, 0xbd, 0x58, 0x1c, 0x47, 0x3c, 0xf6, 0x15, 0x97, 0x22, 0xab, 0x3f, 0x4f, - 0x56, 0x99, 0xc3, 0x69, 0xe1, 0xfa, 0x21, 0xec, 0x37, 0x51, 0x59, 0x78, 0xe3, 0x8f, 0x86, 0xaa, - 0xc9, 0x92, 0xc6, 0x88, 0x0d, 0x70, 0xa9, 0xea, 0x2b, 0x38, 0x58, 0xc9, 0xc8, 0x03, 0x9d, 0xc1, - 0x4e, 0x7f, 0x3a, 0xa7, 0x01, 0x4b, 0xe8, 0x75, 0xc6, 0x58, 0xec, 0xbb, 0xd6, 0xff, 0x85, 0xbc, - 0x51, 0x79, 0xb5, 0xbe, 0xf8, 0xc9, 0xfa, 0x19, 0x00, 0x00, 0xff, 0xff, 0x37, 0x4c, 0x56, 0x38, - 0xf3, 0x04, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.proto b/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.proto deleted file mode 100644 index 19610ca5b..000000000 --- a/vendor/google.golang.org/appengine/internal/app_identity/app_identity_service.proto +++ /dev/null @@ -1,64 +0,0 @@ -syntax = "proto2"; -option go_package = "app_identity"; - -package appengine; - -message AppIdentityServiceError { - enum ErrorCode { - SUCCESS = 0; - UNKNOWN_SCOPE = 9; - BLOB_TOO_LARGE = 1000; - DEADLINE_EXCEEDED = 1001; - NOT_A_VALID_APP = 1002; - UNKNOWN_ERROR = 1003; - NOT_ALLOWED = 1005; - NOT_IMPLEMENTED = 1006; - } -} - -message SignForAppRequest { - optional bytes bytes_to_sign = 1; -} - -message SignForAppResponse { - optional string key_name = 1; - optional bytes signature_bytes = 2; -} - -message GetPublicCertificateForAppRequest { -} - -message PublicCertificate { - optional string key_name = 1; - optional string x509_certificate_pem = 2; -} - -message GetPublicCertificateForAppResponse { - repeated PublicCertificate public_certificate_list = 1; - optional int64 max_client_cache_time_in_second = 2; -} - -message GetServiceAccountNameRequest { -} - -message GetServiceAccountNameResponse { - optional string service_account_name = 1; -} - -message GetAccessTokenRequest { - repeated string scope = 1; - optional int64 service_account_id = 2; - optional string service_account_name = 3; -} - -message GetAccessTokenResponse { - optional string access_token = 1; - optional int64 expiration_time = 2; -} - -message GetDefaultGcsBucketNameRequest { -} - -message GetDefaultGcsBucketNameResponse { - optional string default_gcs_bucket_name = 1; -} diff --git a/vendor/google.golang.org/appengine/internal/modules/modules_service.pb.go b/vendor/google.golang.org/appengine/internal/modules/modules_service.pb.go deleted file mode 100644 index ddfc0c04a..000000000 --- a/vendor/google.golang.org/appengine/internal/modules/modules_service.pb.go +++ /dev/null @@ -1,786 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// source: google.golang.org/appengine/internal/modules/modules_service.proto - -package modules - -import proto "github.com/golang/protobuf/proto" -import fmt "fmt" -import math "math" - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package - -type ModulesServiceError_ErrorCode int32 - -const ( - ModulesServiceError_OK ModulesServiceError_ErrorCode = 0 - ModulesServiceError_INVALID_MODULE ModulesServiceError_ErrorCode = 1 - ModulesServiceError_INVALID_VERSION ModulesServiceError_ErrorCode = 2 - ModulesServiceError_INVALID_INSTANCES ModulesServiceError_ErrorCode = 3 - ModulesServiceError_TRANSIENT_ERROR ModulesServiceError_ErrorCode = 4 - ModulesServiceError_UNEXPECTED_STATE ModulesServiceError_ErrorCode = 5 -) - -var ModulesServiceError_ErrorCode_name = map[int32]string{ - 0: "OK", - 1: "INVALID_MODULE", - 2: "INVALID_VERSION", - 3: "INVALID_INSTANCES", - 4: "TRANSIENT_ERROR", - 5: "UNEXPECTED_STATE", -} -var ModulesServiceError_ErrorCode_value = map[string]int32{ - "OK": 0, - "INVALID_MODULE": 1, - "INVALID_VERSION": 2, - "INVALID_INSTANCES": 3, - "TRANSIENT_ERROR": 4, - "UNEXPECTED_STATE": 5, -} - -func (x ModulesServiceError_ErrorCode) Enum() *ModulesServiceError_ErrorCode { - p := new(ModulesServiceError_ErrorCode) - *p = x - return p -} -func (x ModulesServiceError_ErrorCode) String() string { - return proto.EnumName(ModulesServiceError_ErrorCode_name, int32(x)) -} -func (x *ModulesServiceError_ErrorCode) UnmarshalJSON(data []byte) error { - value, err := proto.UnmarshalJSONEnum(ModulesServiceError_ErrorCode_value, data, "ModulesServiceError_ErrorCode") - if err != nil { - return err - } - *x = ModulesServiceError_ErrorCode(value) - return nil -} -func (ModulesServiceError_ErrorCode) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{0, 0} -} - -type ModulesServiceError struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *ModulesServiceError) Reset() { *m = ModulesServiceError{} } -func (m *ModulesServiceError) String() string { return proto.CompactTextString(m) } -func (*ModulesServiceError) ProtoMessage() {} -func (*ModulesServiceError) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{0} -} -func (m *ModulesServiceError) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_ModulesServiceError.Unmarshal(m, b) -} -func (m *ModulesServiceError) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_ModulesServiceError.Marshal(b, m, deterministic) -} -func (dst *ModulesServiceError) XXX_Merge(src proto.Message) { - xxx_messageInfo_ModulesServiceError.Merge(dst, src) -} -func (m *ModulesServiceError) XXX_Size() int { - return xxx_messageInfo_ModulesServiceError.Size(m) -} -func (m *ModulesServiceError) XXX_DiscardUnknown() { - xxx_messageInfo_ModulesServiceError.DiscardUnknown(m) -} - -var xxx_messageInfo_ModulesServiceError proto.InternalMessageInfo - -type GetModulesRequest struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetModulesRequest) Reset() { *m = GetModulesRequest{} } -func (m *GetModulesRequest) String() string { return proto.CompactTextString(m) } -func (*GetModulesRequest) ProtoMessage() {} -func (*GetModulesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{1} -} -func (m *GetModulesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetModulesRequest.Unmarshal(m, b) -} -func (m *GetModulesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetModulesRequest.Marshal(b, m, deterministic) -} -func (dst *GetModulesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetModulesRequest.Merge(dst, src) -} -func (m *GetModulesRequest) XXX_Size() int { - return xxx_messageInfo_GetModulesRequest.Size(m) -} -func (m *GetModulesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetModulesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetModulesRequest proto.InternalMessageInfo - -type GetModulesResponse struct { - Module []string `protobuf:"bytes,1,rep,name=module" json:"module,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetModulesResponse) Reset() { *m = GetModulesResponse{} } -func (m *GetModulesResponse) String() string { return proto.CompactTextString(m) } -func (*GetModulesResponse) ProtoMessage() {} -func (*GetModulesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{2} -} -func (m *GetModulesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetModulesResponse.Unmarshal(m, b) -} -func (m *GetModulesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetModulesResponse.Marshal(b, m, deterministic) -} -func (dst *GetModulesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetModulesResponse.Merge(dst, src) -} -func (m *GetModulesResponse) XXX_Size() int { - return xxx_messageInfo_GetModulesResponse.Size(m) -} -func (m *GetModulesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetModulesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetModulesResponse proto.InternalMessageInfo - -func (m *GetModulesResponse) GetModule() []string { - if m != nil { - return m.Module - } - return nil -} - -type GetVersionsRequest struct { - Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetVersionsRequest) Reset() { *m = GetVersionsRequest{} } -func (m *GetVersionsRequest) String() string { return proto.CompactTextString(m) } -func (*GetVersionsRequest) ProtoMessage() {} -func (*GetVersionsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{3} -} -func (m *GetVersionsRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetVersionsRequest.Unmarshal(m, b) -} -func (m *GetVersionsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetVersionsRequest.Marshal(b, m, deterministic) -} -func (dst *GetVersionsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetVersionsRequest.Merge(dst, src) -} -func (m *GetVersionsRequest) XXX_Size() int { - return xxx_messageInfo_GetVersionsRequest.Size(m) -} -func (m *GetVersionsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetVersionsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetVersionsRequest proto.InternalMessageInfo - -func (m *GetVersionsRequest) GetModule() string { - if m != nil && m.Module != nil { - return *m.Module - } - return "" -} - -type GetVersionsResponse struct { - Version []string `protobuf:"bytes,1,rep,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetVersionsResponse) Reset() { *m = GetVersionsResponse{} } -func (m *GetVersionsResponse) String() string { return proto.CompactTextString(m) } -func (*GetVersionsResponse) ProtoMessage() {} -func (*GetVersionsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{4} -} -func (m *GetVersionsResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetVersionsResponse.Unmarshal(m, b) -} -func (m *GetVersionsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetVersionsResponse.Marshal(b, m, deterministic) -} -func (dst *GetVersionsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetVersionsResponse.Merge(dst, src) -} -func (m *GetVersionsResponse) XXX_Size() int { - return xxx_messageInfo_GetVersionsResponse.Size(m) -} -func (m *GetVersionsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetVersionsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetVersionsResponse proto.InternalMessageInfo - -func (m *GetVersionsResponse) GetVersion() []string { - if m != nil { - return m.Version - } - return nil -} - -type GetDefaultVersionRequest struct { - Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetDefaultVersionRequest) Reset() { *m = GetDefaultVersionRequest{} } -func (m *GetDefaultVersionRequest) String() string { return proto.CompactTextString(m) } -func (*GetDefaultVersionRequest) ProtoMessage() {} -func (*GetDefaultVersionRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{5} -} -func (m *GetDefaultVersionRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetDefaultVersionRequest.Unmarshal(m, b) -} -func (m *GetDefaultVersionRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetDefaultVersionRequest.Marshal(b, m, deterministic) -} -func (dst *GetDefaultVersionRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetDefaultVersionRequest.Merge(dst, src) -} -func (m *GetDefaultVersionRequest) XXX_Size() int { - return xxx_messageInfo_GetDefaultVersionRequest.Size(m) -} -func (m *GetDefaultVersionRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetDefaultVersionRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetDefaultVersionRequest proto.InternalMessageInfo - -func (m *GetDefaultVersionRequest) GetModule() string { - if m != nil && m.Module != nil { - return *m.Module - } - return "" -} - -type GetDefaultVersionResponse struct { - Version *string `protobuf:"bytes,1,req,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetDefaultVersionResponse) Reset() { *m = GetDefaultVersionResponse{} } -func (m *GetDefaultVersionResponse) String() string { return proto.CompactTextString(m) } -func (*GetDefaultVersionResponse) ProtoMessage() {} -func (*GetDefaultVersionResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{6} -} -func (m *GetDefaultVersionResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetDefaultVersionResponse.Unmarshal(m, b) -} -func (m *GetDefaultVersionResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetDefaultVersionResponse.Marshal(b, m, deterministic) -} -func (dst *GetDefaultVersionResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetDefaultVersionResponse.Merge(dst, src) -} -func (m *GetDefaultVersionResponse) XXX_Size() int { - return xxx_messageInfo_GetDefaultVersionResponse.Size(m) -} -func (m *GetDefaultVersionResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetDefaultVersionResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetDefaultVersionResponse proto.InternalMessageInfo - -func (m *GetDefaultVersionResponse) GetVersion() string { - if m != nil && m.Version != nil { - return *m.Version - } - return "" -} - -type GetNumInstancesRequest struct { - Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` - Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetNumInstancesRequest) Reset() { *m = GetNumInstancesRequest{} } -func (m *GetNumInstancesRequest) String() string { return proto.CompactTextString(m) } -func (*GetNumInstancesRequest) ProtoMessage() {} -func (*GetNumInstancesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{7} -} -func (m *GetNumInstancesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetNumInstancesRequest.Unmarshal(m, b) -} -func (m *GetNumInstancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetNumInstancesRequest.Marshal(b, m, deterministic) -} -func (dst *GetNumInstancesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetNumInstancesRequest.Merge(dst, src) -} -func (m *GetNumInstancesRequest) XXX_Size() int { - return xxx_messageInfo_GetNumInstancesRequest.Size(m) -} -func (m *GetNumInstancesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetNumInstancesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetNumInstancesRequest proto.InternalMessageInfo - -func (m *GetNumInstancesRequest) GetModule() string { - if m != nil && m.Module != nil { - return *m.Module - } - return "" -} - -func (m *GetNumInstancesRequest) GetVersion() string { - if m != nil && m.Version != nil { - return *m.Version - } - return "" -} - -type GetNumInstancesResponse struct { - Instances *int64 `protobuf:"varint,1,req,name=instances" json:"instances,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetNumInstancesResponse) Reset() { *m = GetNumInstancesResponse{} } -func (m *GetNumInstancesResponse) String() string { return proto.CompactTextString(m) } -func (*GetNumInstancesResponse) ProtoMessage() {} -func (*GetNumInstancesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{8} -} -func (m *GetNumInstancesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetNumInstancesResponse.Unmarshal(m, b) -} -func (m *GetNumInstancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetNumInstancesResponse.Marshal(b, m, deterministic) -} -func (dst *GetNumInstancesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetNumInstancesResponse.Merge(dst, src) -} -func (m *GetNumInstancesResponse) XXX_Size() int { - return xxx_messageInfo_GetNumInstancesResponse.Size(m) -} -func (m *GetNumInstancesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetNumInstancesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetNumInstancesResponse proto.InternalMessageInfo - -func (m *GetNumInstancesResponse) GetInstances() int64 { - if m != nil && m.Instances != nil { - return *m.Instances - } - return 0 -} - -type SetNumInstancesRequest struct { - Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` - Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` - Instances *int64 `protobuf:"varint,3,req,name=instances" json:"instances,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SetNumInstancesRequest) Reset() { *m = SetNumInstancesRequest{} } -func (m *SetNumInstancesRequest) String() string { return proto.CompactTextString(m) } -func (*SetNumInstancesRequest) ProtoMessage() {} -func (*SetNumInstancesRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{9} -} -func (m *SetNumInstancesRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetNumInstancesRequest.Unmarshal(m, b) -} -func (m *SetNumInstancesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetNumInstancesRequest.Marshal(b, m, deterministic) -} -func (dst *SetNumInstancesRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetNumInstancesRequest.Merge(dst, src) -} -func (m *SetNumInstancesRequest) XXX_Size() int { - return xxx_messageInfo_SetNumInstancesRequest.Size(m) -} -func (m *SetNumInstancesRequest) XXX_DiscardUnknown() { - xxx_messageInfo_SetNumInstancesRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_SetNumInstancesRequest proto.InternalMessageInfo - -func (m *SetNumInstancesRequest) GetModule() string { - if m != nil && m.Module != nil { - return *m.Module - } - return "" -} - -func (m *SetNumInstancesRequest) GetVersion() string { - if m != nil && m.Version != nil { - return *m.Version - } - return "" -} - -func (m *SetNumInstancesRequest) GetInstances() int64 { - if m != nil && m.Instances != nil { - return *m.Instances - } - return 0 -} - -type SetNumInstancesResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *SetNumInstancesResponse) Reset() { *m = SetNumInstancesResponse{} } -func (m *SetNumInstancesResponse) String() string { return proto.CompactTextString(m) } -func (*SetNumInstancesResponse) ProtoMessage() {} -func (*SetNumInstancesResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{10} -} -func (m *SetNumInstancesResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_SetNumInstancesResponse.Unmarshal(m, b) -} -func (m *SetNumInstancesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_SetNumInstancesResponse.Marshal(b, m, deterministic) -} -func (dst *SetNumInstancesResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_SetNumInstancesResponse.Merge(dst, src) -} -func (m *SetNumInstancesResponse) XXX_Size() int { - return xxx_messageInfo_SetNumInstancesResponse.Size(m) -} -func (m *SetNumInstancesResponse) XXX_DiscardUnknown() { - xxx_messageInfo_SetNumInstancesResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_SetNumInstancesResponse proto.InternalMessageInfo - -type StartModuleRequest struct { - Module *string `protobuf:"bytes,1,req,name=module" json:"module,omitempty"` - Version *string `protobuf:"bytes,2,req,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StartModuleRequest) Reset() { *m = StartModuleRequest{} } -func (m *StartModuleRequest) String() string { return proto.CompactTextString(m) } -func (*StartModuleRequest) ProtoMessage() {} -func (*StartModuleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{11} -} -func (m *StartModuleRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StartModuleRequest.Unmarshal(m, b) -} -func (m *StartModuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StartModuleRequest.Marshal(b, m, deterministic) -} -func (dst *StartModuleRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StartModuleRequest.Merge(dst, src) -} -func (m *StartModuleRequest) XXX_Size() int { - return xxx_messageInfo_StartModuleRequest.Size(m) -} -func (m *StartModuleRequest) XXX_DiscardUnknown() { - xxx_messageInfo_StartModuleRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_StartModuleRequest proto.InternalMessageInfo - -func (m *StartModuleRequest) GetModule() string { - if m != nil && m.Module != nil { - return *m.Module - } - return "" -} - -func (m *StartModuleRequest) GetVersion() string { - if m != nil && m.Version != nil { - return *m.Version - } - return "" -} - -type StartModuleResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StartModuleResponse) Reset() { *m = StartModuleResponse{} } -func (m *StartModuleResponse) String() string { return proto.CompactTextString(m) } -func (*StartModuleResponse) ProtoMessage() {} -func (*StartModuleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{12} -} -func (m *StartModuleResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StartModuleResponse.Unmarshal(m, b) -} -func (m *StartModuleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StartModuleResponse.Marshal(b, m, deterministic) -} -func (dst *StartModuleResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_StartModuleResponse.Merge(dst, src) -} -func (m *StartModuleResponse) XXX_Size() int { - return xxx_messageInfo_StartModuleResponse.Size(m) -} -func (m *StartModuleResponse) XXX_DiscardUnknown() { - xxx_messageInfo_StartModuleResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_StartModuleResponse proto.InternalMessageInfo - -type StopModuleRequest struct { - Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` - Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StopModuleRequest) Reset() { *m = StopModuleRequest{} } -func (m *StopModuleRequest) String() string { return proto.CompactTextString(m) } -func (*StopModuleRequest) ProtoMessage() {} -func (*StopModuleRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{13} -} -func (m *StopModuleRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StopModuleRequest.Unmarshal(m, b) -} -func (m *StopModuleRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StopModuleRequest.Marshal(b, m, deterministic) -} -func (dst *StopModuleRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_StopModuleRequest.Merge(dst, src) -} -func (m *StopModuleRequest) XXX_Size() int { - return xxx_messageInfo_StopModuleRequest.Size(m) -} -func (m *StopModuleRequest) XXX_DiscardUnknown() { - xxx_messageInfo_StopModuleRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_StopModuleRequest proto.InternalMessageInfo - -func (m *StopModuleRequest) GetModule() string { - if m != nil && m.Module != nil { - return *m.Module - } - return "" -} - -func (m *StopModuleRequest) GetVersion() string { - if m != nil && m.Version != nil { - return *m.Version - } - return "" -} - -type StopModuleResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *StopModuleResponse) Reset() { *m = StopModuleResponse{} } -func (m *StopModuleResponse) String() string { return proto.CompactTextString(m) } -func (*StopModuleResponse) ProtoMessage() {} -func (*StopModuleResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{14} -} -func (m *StopModuleResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_StopModuleResponse.Unmarshal(m, b) -} -func (m *StopModuleResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_StopModuleResponse.Marshal(b, m, deterministic) -} -func (dst *StopModuleResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_StopModuleResponse.Merge(dst, src) -} -func (m *StopModuleResponse) XXX_Size() int { - return xxx_messageInfo_StopModuleResponse.Size(m) -} -func (m *StopModuleResponse) XXX_DiscardUnknown() { - xxx_messageInfo_StopModuleResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_StopModuleResponse proto.InternalMessageInfo - -type GetHostnameRequest struct { - Module *string `protobuf:"bytes,1,opt,name=module" json:"module,omitempty"` - Version *string `protobuf:"bytes,2,opt,name=version" json:"version,omitempty"` - Instance *string `protobuf:"bytes,3,opt,name=instance" json:"instance,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetHostnameRequest) Reset() { *m = GetHostnameRequest{} } -func (m *GetHostnameRequest) String() string { return proto.CompactTextString(m) } -func (*GetHostnameRequest) ProtoMessage() {} -func (*GetHostnameRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{15} -} -func (m *GetHostnameRequest) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetHostnameRequest.Unmarshal(m, b) -} -func (m *GetHostnameRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetHostnameRequest.Marshal(b, m, deterministic) -} -func (dst *GetHostnameRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetHostnameRequest.Merge(dst, src) -} -func (m *GetHostnameRequest) XXX_Size() int { - return xxx_messageInfo_GetHostnameRequest.Size(m) -} -func (m *GetHostnameRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetHostnameRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetHostnameRequest proto.InternalMessageInfo - -func (m *GetHostnameRequest) GetModule() string { - if m != nil && m.Module != nil { - return *m.Module - } - return "" -} - -func (m *GetHostnameRequest) GetVersion() string { - if m != nil && m.Version != nil { - return *m.Version - } - return "" -} - -func (m *GetHostnameRequest) GetInstance() string { - if m != nil && m.Instance != nil { - return *m.Instance - } - return "" -} - -type GetHostnameResponse struct { - Hostname *string `protobuf:"bytes,1,req,name=hostname" json:"hostname,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *GetHostnameResponse) Reset() { *m = GetHostnameResponse{} } -func (m *GetHostnameResponse) String() string { return proto.CompactTextString(m) } -func (*GetHostnameResponse) ProtoMessage() {} -func (*GetHostnameResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_modules_service_9cd3bffe4e91c59a, []int{16} -} -func (m *GetHostnameResponse) XXX_Unmarshal(b []byte) error { - return xxx_messageInfo_GetHostnameResponse.Unmarshal(m, b) -} -func (m *GetHostnameResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - return xxx_messageInfo_GetHostnameResponse.Marshal(b, m, deterministic) -} -func (dst *GetHostnameResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetHostnameResponse.Merge(dst, src) -} -func (m *GetHostnameResponse) XXX_Size() int { - return xxx_messageInfo_GetHostnameResponse.Size(m) -} -func (m *GetHostnameResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetHostnameResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetHostnameResponse proto.InternalMessageInfo - -func (m *GetHostnameResponse) GetHostname() string { - if m != nil && m.Hostname != nil { - return *m.Hostname - } - return "" -} - -func init() { - proto.RegisterType((*ModulesServiceError)(nil), "appengine.ModulesServiceError") - proto.RegisterType((*GetModulesRequest)(nil), "appengine.GetModulesRequest") - proto.RegisterType((*GetModulesResponse)(nil), "appengine.GetModulesResponse") - proto.RegisterType((*GetVersionsRequest)(nil), "appengine.GetVersionsRequest") - proto.RegisterType((*GetVersionsResponse)(nil), "appengine.GetVersionsResponse") - proto.RegisterType((*GetDefaultVersionRequest)(nil), "appengine.GetDefaultVersionRequest") - proto.RegisterType((*GetDefaultVersionResponse)(nil), "appengine.GetDefaultVersionResponse") - proto.RegisterType((*GetNumInstancesRequest)(nil), "appengine.GetNumInstancesRequest") - proto.RegisterType((*GetNumInstancesResponse)(nil), "appengine.GetNumInstancesResponse") - proto.RegisterType((*SetNumInstancesRequest)(nil), "appengine.SetNumInstancesRequest") - proto.RegisterType((*SetNumInstancesResponse)(nil), "appengine.SetNumInstancesResponse") - proto.RegisterType((*StartModuleRequest)(nil), "appengine.StartModuleRequest") - proto.RegisterType((*StartModuleResponse)(nil), "appengine.StartModuleResponse") - proto.RegisterType((*StopModuleRequest)(nil), "appengine.StopModuleRequest") - proto.RegisterType((*StopModuleResponse)(nil), "appengine.StopModuleResponse") - proto.RegisterType((*GetHostnameRequest)(nil), "appengine.GetHostnameRequest") - proto.RegisterType((*GetHostnameResponse)(nil), "appengine.GetHostnameResponse") -} - -func init() { - proto.RegisterFile("google.golang.org/appengine/internal/modules/modules_service.proto", fileDescriptor_modules_service_9cd3bffe4e91c59a) -} - -var fileDescriptor_modules_service_9cd3bffe4e91c59a = []byte{ - // 457 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x94, 0xc1, 0x6f, 0xd3, 0x30, - 0x14, 0xc6, 0x69, 0x02, 0xdb, 0xf2, 0x0e, 0x90, 0x3a, 0x5b, 0xd7, 0x4d, 0x1c, 0x50, 0x4e, 0x1c, - 0x50, 0x2b, 0x90, 0x10, 0xe7, 0xae, 0x35, 0x25, 0xb0, 0xa5, 0x28, 0xce, 0x2a, 0xc4, 0xa5, 0x0a, - 0xdb, 0x23, 0x8b, 0x94, 0xda, 0xc1, 0x76, 0x77, 0xe4, 0xbf, 0xe0, 0xff, 0x45, 0x4b, 0xed, 0xb6, - 0x81, 0x4e, 0x45, 0x68, 0xa7, 0xe4, 0x7d, 0xfe, 0xfc, 0x7b, 0x9f, 0x5f, 0xac, 0xc0, 0x59, 0x2e, - 0x44, 0x5e, 0x62, 0x2f, 0x17, 0x65, 0xc6, 0xf3, 0x9e, 0x90, 0x79, 0x3f, 0xab, 0x2a, 0xe4, 0x79, - 0xc1, 0xb1, 0x5f, 0x70, 0x8d, 0x92, 0x67, 0x65, 0x7f, 0x2e, 0xae, 0x17, 0x25, 0x2a, 0xfb, 0x9c, - 0x29, 0x94, 0xb7, 0xc5, 0x15, 0xf6, 0x2a, 0x29, 0xb4, 0x20, 0xde, 0x6a, 0x47, 0xf8, 0xab, 0x05, - 0xc1, 0xc5, 0xd2, 0xc4, 0x96, 0x1e, 0x2a, 0xa5, 0x90, 0xe1, 0x4f, 0xf0, 0xea, 0x97, 0xa1, 0xb8, - 0x46, 0xb2, 0x07, 0xce, 0xe4, 0x93, 0xff, 0x88, 0x10, 0x78, 0x1a, 0xc5, 0xd3, 0xc1, 0x79, 0x34, - 0x9a, 0x5d, 0x4c, 0x46, 0x97, 0xe7, 0xd4, 0x6f, 0x91, 0x00, 0x9e, 0x59, 0x6d, 0x4a, 0x13, 0x16, - 0x4d, 0x62, 0xdf, 0x21, 0x47, 0xd0, 0xb6, 0x62, 0x14, 0xb3, 0x74, 0x10, 0x0f, 0x29, 0xf3, 0xdd, - 0x3b, 0x6f, 0x9a, 0x0c, 0x62, 0x16, 0xd1, 0x38, 0x9d, 0xd1, 0x24, 0x99, 0x24, 0xfe, 0x63, 0x72, - 0x08, 0xfe, 0x65, 0x4c, 0xbf, 0x7c, 0xa6, 0xc3, 0x94, 0x8e, 0x66, 0x2c, 0x1d, 0xa4, 0xd4, 0x7f, - 0x12, 0x06, 0xd0, 0x1e, 0xa3, 0x36, 0xc9, 0x12, 0xfc, 0xb1, 0x40, 0xa5, 0xc3, 0x57, 0x40, 0x36, - 0x45, 0x55, 0x09, 0xae, 0x90, 0x74, 0x60, 0x6f, 0x79, 0xcc, 0x6e, 0xeb, 0x85, 0xfb, 0xd2, 0x4b, - 0x4c, 0x65, 0xdc, 0x53, 0x94, 0xaa, 0x10, 0xdc, 0x32, 0x1a, 0xee, 0xd6, 0x86, 0xbb, 0x0f, 0x41, - 0xc3, 0x6d, 0xe0, 0x5d, 0xd8, 0xbf, 0x5d, 0x6a, 0x86, 0x6e, 0xcb, 0xf0, 0x0d, 0x74, 0xc7, 0xa8, - 0x47, 0xf8, 0x3d, 0x5b, 0x94, 0x76, 0xdf, 0xae, 0x26, 0x6f, 0xe1, 0x64, 0xcb, 0x9e, 0x6d, 0xad, - 0x9c, 0xcd, 0x56, 0x1f, 0xa1, 0x33, 0x46, 0x1d, 0x2f, 0xe6, 0x11, 0x57, 0x3a, 0xe3, 0x57, 0xb8, - 0xeb, 0x34, 0x9b, 0x2c, 0xa7, 0x5e, 0x58, 0xb1, 0xde, 0xc1, 0xf1, 0x5f, 0x2c, 0x13, 0xe0, 0x39, - 0x78, 0x85, 0x15, 0xeb, 0x08, 0x6e, 0xb2, 0x16, 0xc2, 0x1b, 0xe8, 0xb0, 0x07, 0x0a, 0xd1, 0xec, - 0xe4, 0xfe, 0xd9, 0xe9, 0x04, 0x8e, 0xd9, 0xf6, 0x88, 0xe1, 0x7b, 0x20, 0x4c, 0x67, 0xd2, 0xdc, - 0x81, 0x6d, 0x01, 0x9c, 0xfb, 0x02, 0x34, 0x26, 0x7a, 0x04, 0x41, 0x83, 0x63, 0xf0, 0x14, 0xda, - 0x4c, 0x8b, 0xea, 0x7e, 0xfa, 0xbf, 0xcd, 0xf8, 0xf0, 0x2e, 0xe5, 0x1a, 0x63, 0xe0, 0xdf, 0xea, - 0xfb, 0xf8, 0x41, 0x28, 0xcd, 0xb3, 0xf9, 0xff, 0xd3, 0xc9, 0x29, 0x1c, 0xd8, 0x59, 0x75, 0xdd, - 0x7a, 0x69, 0x55, 0x87, 0xaf, 0xeb, 0x5b, 0xbc, 0xee, 0x61, 0xbe, 0xec, 0x29, 0x1c, 0xdc, 0x18, - 0xcd, 0x8c, 0x68, 0x55, 0x9f, 0x79, 0x5f, 0xf7, 0xcd, 0x5f, 0xe2, 0x77, 0x00, 0x00, 0x00, 0xff, - 0xff, 0x6e, 0xbc, 0xe0, 0x61, 0x5c, 0x04, 0x00, 0x00, -} diff --git a/vendor/google.golang.org/appengine/internal/modules/modules_service.proto b/vendor/google.golang.org/appengine/internal/modules/modules_service.proto deleted file mode 100644 index d29f0065a..000000000 --- a/vendor/google.golang.org/appengine/internal/modules/modules_service.proto +++ /dev/null @@ -1,80 +0,0 @@ -syntax = "proto2"; -option go_package = "modules"; - -package appengine; - -message ModulesServiceError { - enum ErrorCode { - OK = 0; - INVALID_MODULE = 1; - INVALID_VERSION = 2; - INVALID_INSTANCES = 3; - TRANSIENT_ERROR = 4; - UNEXPECTED_STATE = 5; - } -} - -message GetModulesRequest { -} - -message GetModulesResponse { - repeated string module = 1; -} - -message GetVersionsRequest { - optional string module = 1; -} - -message GetVersionsResponse { - repeated string version = 1; -} - -message GetDefaultVersionRequest { - optional string module = 1; -} - -message GetDefaultVersionResponse { - required string version = 1; -} - -message GetNumInstancesRequest { - optional string module = 1; - optional string version = 2; -} - -message GetNumInstancesResponse { - required int64 instances = 1; -} - -message SetNumInstancesRequest { - optional string module = 1; - optional string version = 2; - required int64 instances = 3; -} - -message SetNumInstancesResponse {} - -message StartModuleRequest { - required string module = 1; - required string version = 2; -} - -message StartModuleResponse {} - -message StopModuleRequest { - optional string module = 1; - optional string version = 2; -} - -message StopModuleResponse {} - -message GetHostnameRequest { - optional string module = 1; - optional string version = 2; - optional string instance = 3; -} - -message GetHostnameResponse { - required string hostname = 1; -} - diff --git a/vendor/google.golang.org/appengine/namespace.go b/vendor/google.golang.org/appengine/namespace.go deleted file mode 100644 index 6f169be48..000000000 --- a/vendor/google.golang.org/appengine/namespace.go +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright 2012 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package appengine - -import ( - "context" - "fmt" - "regexp" - - "google.golang.org/appengine/internal" -) - -// Namespace returns a replacement context that operates within the given namespace. -func Namespace(c context.Context, namespace string) (context.Context, error) { - if !validNamespace.MatchString(namespace) { - return nil, fmt.Errorf("appengine: namespace %q does not match /%s/", namespace, validNamespace) - } - return internal.NamespacedContext(c, namespace), nil -} - -// validNamespace matches valid namespace names. -var validNamespace = regexp.MustCompile(`^[0-9A-Za-z._-]{0,100}$`) diff --git a/vendor/google.golang.org/appengine/timeout.go b/vendor/google.golang.org/appengine/timeout.go deleted file mode 100644 index fcf3ad0a5..000000000 --- a/vendor/google.golang.org/appengine/timeout.go +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2013 Google Inc. All rights reserved. -// Use of this source code is governed by the Apache 2.0 -// license that can be found in the LICENSE file. - -package appengine - -import "context" - -// IsTimeoutError reports whether err is a timeout error. -func IsTimeoutError(err error) bool { - if err == context.DeadlineExceeded { - return true - } - if t, ok := err.(interface { - IsTimeout() bool - }); ok { - return t.IsTimeout() - } - return false -} diff --git a/vendor/kmodules.xyz/client-go/api/v1/cluster.go b/vendor/kmodules.xyz/client-go/api/v1/cluster.go index 1de796faf..5977959e5 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/cluster.go +++ b/vendor/kmodules.xyz/client-go/api/v1/cluster.go @@ -153,7 +153,27 @@ func (cm ClusterManager) String() string { } type CAPIClusterInfo struct { - Provider string `json:"provider,omitempty"` - Namespace string `json:"namespace,omitempty"` - ClusterName string `json:"clusterName,omitempty"` + Provider CAPIProvider `json:"provider"` + Namespace string `json:"namespace"` + ClusterName string `json:"clusterName"` } + +// ClusterInfo used in ace-installer +type ClusterInfo struct { + UID string `json:"uid"` + Name string `json:"name"` + ClusterManagers []string `json:"clusterManagers"` + // +optional + CAPI CAPIClusterInfo `json:"capi"` +} + +// +kubebuilder:validation:Enum=capa;capg;capz +type CAPIProvider string + +const ( + CAPIProviderUnknown CAPIProvider = "" + CAPIProviderCAPA CAPIProvider = "capa" + CAPIProviderCAPG CAPIProvider = "capg" + CAPIProviderCAPZ CAPIProvider = "capz" + CAPIProviderCAPH CAPIProvider = "caph" +) diff --git a/vendor/kmodules.xyz/client-go/api/v1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/client-go/api/v1/zz_generated.deepcopy.go index fd286ac41..9e3330952 100644 --- a/vendor/kmodules.xyz/client-go/api/v1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/client-go/api/v1/zz_generated.deepcopy.go @@ -119,6 +119,28 @@ func (in *CertificateSpec) DeepCopy() *CertificateSpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ClusterInfo) DeepCopyInto(out *ClusterInfo) { + *out = *in + if in.ClusterManagers != nil { + in, out := &in.ClusterManagers, &out.ClusterManagers + *out = make([]string, len(*in)) + copy(*out, *in) + } + out.CAPI = in.CAPI + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterInfo. +func (in *ClusterInfo) DeepCopy() *ClusterInfo { + if in == nil { + return nil + } + out := new(ClusterInfo) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ClusterMetadata) DeepCopyInto(out *ClusterMetadata) { *out = *in diff --git a/vendor/kmodules.xyz/client-go/cluster/lib.go b/vendor/kmodules.xyz/client-go/cluster/lib.go index c1a9cedd1..1069ab033 100644 --- a/vendor/kmodules.xyz/client-go/cluster/lib.go +++ b/vendor/kmodules.xyz/client-go/cluster/lib.go @@ -211,14 +211,14 @@ func getCAPIValues(values map[string]any) (string, string, string, error) { return capiProvider, clusterName, ns, nil } -func getProviderName(kind string) string { +func getProviderName(kind string) kmapi.CAPIProvider { switch kind { case "AWSManagedCluster", "AWSManagedControlPlane": - return "capa" + return kmapi.CAPIProviderCAPA case "AzureManagedCluster": - return "capz" + return kmapi.CAPIProviderCAPZ case "GCPManagedCluster": - return "capg" + return kmapi.CAPIProviderCAPG } return "" } diff --git a/vendor/kmodules.xyz/client-go/cluster/rancher.go b/vendor/kmodules.xyz/client-go/cluster/rancher.go index df2a7e69d..40a135556 100644 --- a/vendor/kmodules.xyz/client-go/cluster/rancher.go +++ b/vendor/kmodules.xyz/client-go/cluster/rancher.go @@ -18,12 +18,19 @@ package cluster import ( "context" + "net/url" "sort" + "github.com/rancher/norman/clientbase" + rancher "github.com/rancher/rancher/pkg/client/generated/management/v3" core "k8s.io/api/core/v1" "k8s.io/apimachinery/pkg/api/meta" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/client-go/discovery/cached/memory" + "k8s.io/client-go/kubernetes" + "k8s.io/client-go/rest" + "k8s.io/client-go/restmapper" "sigs.k8s.io/controller-runtime/pkg/client" ) @@ -32,8 +39,11 @@ const ( LabelKeyRancherHelmProjectId = "helm.cattle.io/projectId" LabelKeyRancherHelmProjectOperated = "helm.cattle.io/helm-project-operated" - NamespaceRancherMonitoring = "cattle-monitoring-system" - PrometheusRancherMonitoring = "rancher-monitoring-prometheus" + FakeRancherProjectId = "p-fake" + + RancherMonitoringNamespace = "cattle-monitoring-system" + RancherMonitoringPrometheus = "rancher-monitoring-prometheus" + RancherMonitoringAlertmanager = "rancher-monitoring-alertmanager" ) func IsRancherManaged(mapper meta.RESTMapper) bool { @@ -46,6 +56,37 @@ func IsRancherManaged(mapper meta.RESTMapper) bool { return false } +func DetectRancherProxy(cfg *rest.Config) (*clientbase.ClientOpts, bool, error) { + err := rest.LoadTLSFiles(cfg) + if err != nil { + return nil, false, err + } + + kc, err := kubernetes.NewForConfig(cfg) + if err != nil { + return nil, false, err + } + + mapper := restmapper.NewDeferredDiscoveryRESTMapper(memory.NewMemCacheClient(kc)) + if IsRancherManaged(mapper) { + u, err := url.Parse(cfg.Host) + if err != nil { + return nil, false, err + } + u.Path = "/v3" + + opts := clientbase.ClientOpts{ + URL: u.String(), + TokenKey: cfg.BearerToken, + CACerts: string(cfg.CAData), + // Insecure: true, + } + _, err = rancher.NewClient(&opts) + return &opts, err == nil, err + } + return nil, false, nil +} + func IsInDefaultProject(kc client.Client, nsName string) (bool, error) { return isInProject(kc, nsName, metav1.NamespaceDefault) } diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/gateway_types.go b/vendor/kmodules.xyz/offshoot-api/api/v1/gateway_types.go new file mode 100644 index 000000000..4ade7f6c4 --- /dev/null +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/gateway_types.go @@ -0,0 +1,78 @@ +/* +Copyright AppsCode Inc. and Contributors + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package v1 + +import ( + core "k8s.io/api/core/v1" +) + +type Gateway struct { + Name string `json:"name"` + Namespace string `json:"namespace"` + // +optional + IP string `json:"ip,omitempty"` + // +optional + Hostname string `json:"hostname,omitempty"` + // Services is an optional configuration for services used to expose database + // +optional + Services []NamedServiceStatus `json:"services,omitempty"` + // UI is an optional list of database web uis + // +optional + UI []NamedURL `json:"ui,omitempty"` +} + +type NamedServiceStatus struct { + // Alias represents the identifier of the service. + Alias string `json:"alias"` + + Ports []GatewayPort `json:"ports"` +} + +type NamedURL struct { + // Alias represents the identifier of the service. + // This should match the db ui chart name + Alias string `json:"alias"` + + // URL of the database ui + URL string `json:"url"` + + Port GatewayPort `json:"port"` + + // HelmRelease is the name of the helm release used to deploy this ui + // The name format is typically - + // +optional + HelmRelease *core.LocalObjectReference `json:"helmRelease,omitempty"` +} + +// GatewayPort contains information on Gateway service's port. +type GatewayPort struct { + // The name of this port within the gateway service. + // +optional + Name string `json:"name,omitempty"` + + // The port that will be exposed by the gateway service. + Port int32 `json:"port"` + + // Number of the port to access the backend service. + // +optional + BackendServicePort int32 `json:"backendServicePort,omitempty"` + + // The port on each node on which this gateway service is exposed when type is + // NodePort or LoadBalancer. + // +optional + NodePort int32 `json:"nodePort,omitempty"` +} diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go b/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go index d69c46efd..522a3a64f 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/openapi_generated.go @@ -32,8 +32,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA return map[string]common.OpenAPIDefinition{ "kmodules.xyz/offshoot-api/api/v1.ContainerRuntimeSettings": schema_kmodulesxyz_offshoot_api_api_v1_ContainerRuntimeSettings(ref), "kmodules.xyz/offshoot-api/api/v1.EphemeralVolumeSource": schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref), + "kmodules.xyz/offshoot-api/api/v1.Gateway": schema_kmodulesxyz_offshoot_api_api_v1_Gateway(ref), "kmodules.xyz/offshoot-api/api/v1.GatewayPort": schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref), "kmodules.xyz/offshoot-api/api/v1.IONiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref), + "kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus": schema_kmodulesxyz_offshoot_api_api_v1_NamedServiceStatus(ref), + "kmodules.xyz/offshoot-api/api/v1.NamedURL": schema_kmodulesxyz_offshoot_api_api_v1_NamedURL(ref), "kmodules.xyz/offshoot-api/api/v1.NiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.ObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_ObjectMeta(ref), "kmodules.xyz/offshoot-api/api/v1.PartialObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_PartialObjectMeta(ref), @@ -163,6 +166,75 @@ func schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref common.Ref } } +func schema_kmodulesxyz_offshoot_api_api_v1_Gateway(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ip": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "services": { + SchemaProps: spec.SchemaProps{ + Description: "Services is an optional configuration for services used to expose database", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus"), + }, + }, + }, + }, + }, + "ui": { + SchemaProps: spec.SchemaProps{ + Description: "UI is an optional list of database web uis", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.NamedURL"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "namespace"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus", "kmodules.xyz/offshoot-api/api/v1.NamedURL"}, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -231,6 +303,85 @@ func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceC } } +func schema_kmodulesxyz_offshoot_api_api_v1_NamedServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "alias": { + SchemaProps: spec.SchemaProps{ + Description: "Alias represents the identifier of the service.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.GatewayPort"), + }, + }, + }, + }, + }, + }, + Required: []string{"alias", "ports"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/offshoot-api/api/v1.GatewayPort"}, + } +} + +func schema_kmodulesxyz_offshoot_api_api_v1_NamedURL(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "alias": { + SchemaProps: spec.SchemaProps{ + Description: "Alias represents the identifier of the service. This should match the db ui chart name", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL of the database ui", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.GatewayPort"), + }, + }, + "helmRelease": { + SchemaProps: spec.SchemaProps{ + Description: "HelmRelease is the name of the helm release used to deploy this ui The name format is typically -", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + Required: []string{"alias", "url", "port"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/offshoot-api/api/v1.GatewayPort"}, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/types.go b/vendor/kmodules.xyz/offshoot-api/api/v1/types.go index 979f8510b..6e52f939b 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/types.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/types.go @@ -392,25 +392,6 @@ type ServicePort struct { NodePort int32 `json:"nodePort,omitempty"` } -// GatewayPort contains information on Gateway service's port. -type GatewayPort struct { - // The name of this port within the gateway service. - // +optional - Name string `json:"name,omitempty"` - - // The port that will be exposed by the gateway service. - Port int32 `json:"port"` - - // Number of the port to access the backend service. - // +optional - BackendServicePort int32 `json:"backendServicePort,omitempty"` - - // The port on each node on which this gateway service is exposed when type is - // NodePort or LoadBalancer. - // +optional - NodePort int32 `json:"nodePort,omitempty"` -} - // Beware of MergeServicePorts // ref: https://github.com/kmodules/client-go/blob/03dac1aea5084354127990a10d0b0e7529460dd5/core/v1/service.go#L103-L136 func PatchServicePorts(cur []core.ServicePort, desired []ServicePort) []core.ServicePort { diff --git a/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go b/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go index 3889daa8d..747da2f62 100644 --- a/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go +++ b/vendor/kmodules.xyz/offshoot-api/api/v1/zz_generated.deepcopy.go @@ -108,6 +108,36 @@ func (in *EphemeralVolumeSource) DeepCopy() *EphemeralVolumeSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Gateway) DeepCopyInto(out *Gateway) { + *out = *in + if in.Services != nil { + in, out := &in.Services, &out.Services + *out = make([]NamedServiceStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.UI != nil { + in, out := &in.UI, &out.UI + *out = make([]NamedURL, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Gateway. +func (in *Gateway) DeepCopy() *Gateway { + if in == nil { + return nil + } + out := new(Gateway) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GatewayPort) DeepCopyInto(out *GatewayPort) { *out = *in @@ -150,6 +180,49 @@ func (in *IONiceSettings) DeepCopy() *IONiceSettings { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedServiceStatus) DeepCopyInto(out *NamedServiceStatus) { + *out = *in + if in.Ports != nil { + in, out := &in.Ports, &out.Ports + *out = make([]GatewayPort, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedServiceStatus. +func (in *NamedServiceStatus) DeepCopy() *NamedServiceStatus { + if in == nil { + return nil + } + out := new(NamedServiceStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *NamedURL) DeepCopyInto(out *NamedURL) { + *out = *in + out.Port = in.Port + if in.HelmRelease != nil { + in, out := &in.HelmRelease, &out.HelmRelease + *out = new(corev1.LocalObjectReference) + **out = **in + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamedURL. +func (in *NamedURL) DeepCopy() *NamedURL { + if in == nil { + return nil + } + out := new(NamedURL) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *NiceSettings) DeepCopyInto(out *NiceSettings) { *out = *in diff --git a/vendor/kmodules.xyz/offshoot-api/util/runtime_settings.go b/vendor/kmodules.xyz/offshoot-api/util/runtime_settings.go index 6d0552755..d7954bc6f 100644 --- a/vendor/kmodules.xyz/offshoot-api/util/runtime_settings.go +++ b/vendor/kmodules.xyz/offshoot-api/util/runtime_settings.go @@ -81,7 +81,7 @@ func ApplyContainerRuntimeSettings(container core.Container, settings ofst.Conta } func ApplyPodRuntimeSettings(podSpec core.PodSpec, settings ofst.PodRuntimeSettings) core.PodSpec { - if settings.NodeSelector != nil && len(settings.NodeSelector) > 0 { + if len(settings.NodeSelector) > 0 { podSpec.NodeSelector = settings.NodeSelector } if settings.ServiceAccountName != "" { diff --git a/vendor/modules.txt b/vendor/modules.txt index 2807c4f7c..c4c93b038 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1,7 +1,4 @@ -# cloud.google.com/go/compute v1.23.0 -## explicit; go 1.19 -cloud.google.com/go/compute/internal -# cloud.google.com/go/compute/metadata v0.2.3 +# cloud.google.com/go/compute/metadata v0.3.0 ## explicit; go 1.19 cloud.google.com/go/compute/metadata # cloud.google.com/go/storage v1.30.1 @@ -125,7 +122,7 @@ github.com/blang/semver/v4 # github.com/cenkalti/backoff/v4 v4.2.1 ## explicit; go 1.18 github.com/cenkalti/backoff/v4 -# github.com/cespare/xxhash/v2 v2.2.0 +# github.com/cespare/xxhash/v2 v2.3.0 ## explicit; go 1.11 github.com/cespare/xxhash/v2 # github.com/cloudevents/sdk-go/v2 v2.15.2 @@ -212,6 +209,9 @@ github.com/gabriel-vasile/mimetype github.com/gabriel-vasile/mimetype/internal/charset github.com/gabriel-vasile/mimetype/internal/json github.com/gabriel-vasile/mimetype/internal/magic +# github.com/ghodss/yaml v1.0.0 +## explicit +github.com/ghodss/yaml # github.com/go-errors/errors v1.4.2 ## explicit; go 1.14 github.com/go-errors/errors @@ -379,8 +379,8 @@ github.com/googleapis/gax-go/v2/apierror github.com/googleapis/gax-go/v2/apierror/internal/proto github.com/googleapis/gax-go/v2/callctx github.com/googleapis/gax-go/v2/internal -# github.com/gorilla/websocket v1.5.0 -## explicit; go 1.12 +# github.com/gorilla/websocket v1.5.1 +## explicit; go 1.20 github.com/gorilla/websocket # github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 ## explicit @@ -569,6 +569,21 @@ github.com/prometheus/common/model github.com/prometheus/procfs github.com/prometheus/procfs/internal/fs github.com/prometheus/procfs/internal/util +# github.com/rancher/norman v0.0.0-20240708202514-a0127673d1b9 +## explicit; go 1.22.0 +github.com/rancher/norman/clientbase +github.com/rancher/norman/httperror +github.com/rancher/norman/types +github.com/rancher/norman/types/convert +github.com/rancher/norman/types/definition +github.com/rancher/norman/types/slice +github.com/rancher/norman/types/values +# github.com/rancher/rancher/pkg/client v0.0.0-20240710123941-93e332156bbe +## explicit; go 1.22.0 +github.com/rancher/rancher/pkg/client/generated/management/v3 +# github.com/rancher/wrangler/v3 v3.0.0 +## explicit; go 1.22.0 +github.com/rancher/wrangler/v3/pkg/name # github.com/russross/blackfriday/v2 v2.1.0 ## explicit github.com/russross/blackfriday/v2 @@ -763,8 +778,8 @@ gocloud.dev/internal/gcerr gocloud.dev/internal/oc gocloud.dev/internal/openurl gocloud.dev/internal/retry -# golang.org/x/crypto v0.24.0 -## explicit; go 1.18 +# golang.org/x/crypto v0.27.0 +## explicit; go 1.20 golang.org/x/crypto/bcrypt golang.org/x/crypto/blake2b golang.org/x/crypto/blowfish @@ -773,7 +788,6 @@ golang.org/x/crypto/chacha20poly1305 golang.org/x/crypto/cryptobyte golang.org/x/crypto/cryptobyte/asn1 golang.org/x/crypto/curve25519 -golang.org/x/crypto/curve25519/internal/field golang.org/x/crypto/ed25519 golang.org/x/crypto/hkdf golang.org/x/crypto/internal/alias @@ -790,7 +804,7 @@ golang.org/x/crypto/scrypt golang.org/x/exp/constraints golang.org/x/exp/maps golang.org/x/exp/slices -# golang.org/x/net v0.26.0 +# golang.org/x/net v0.29.0 ## explicit; go 1.18 golang.org/x/net/context golang.org/x/net/html @@ -805,22 +819,23 @@ golang.org/x/net/internal/timeseries golang.org/x/net/proxy golang.org/x/net/trace golang.org/x/net/websocket -# golang.org/x/oauth2 v0.15.0 +# golang.org/x/oauth2 v0.22.0 ## explicit; go 1.18 golang.org/x/oauth2 golang.org/x/oauth2/authhandler golang.org/x/oauth2/google -golang.org/x/oauth2/google/internal/externalaccount +golang.org/x/oauth2/google/externalaccount golang.org/x/oauth2/google/internal/externalaccountauthorizeduser +golang.org/x/oauth2/google/internal/impersonate golang.org/x/oauth2/google/internal/stsexchange golang.org/x/oauth2/internal golang.org/x/oauth2/jws golang.org/x/oauth2/jwt -# golang.org/x/sync v0.7.0 +# golang.org/x/sync v0.8.0 ## explicit; go 1.18 golang.org/x/sync/errgroup golang.org/x/sync/singleflight -# golang.org/x/sys v0.21.0 +# golang.org/x/sys v0.25.0 ## explicit; go 1.18 golang.org/x/sys/cpu golang.org/x/sys/execabs @@ -828,10 +843,10 @@ golang.org/x/sys/plan9 golang.org/x/sys/unix golang.org/x/sys/windows golang.org/x/sys/windows/registry -# golang.org/x/term v0.21.0 +# golang.org/x/term v0.24.0 ## explicit; go 1.18 golang.org/x/term -# golang.org/x/text v0.16.0 +# golang.org/x/text v0.18.0 ## explicit; go 1.18 golang.org/x/text/cases golang.org/x/text/encoding @@ -965,13 +980,10 @@ google.golang.org/api/transport/http google.golang.org/api/transport/http/internal/propagation # google.golang.org/appengine v1.6.8 ## explicit; go 1.11 -google.golang.org/appengine google.golang.org/appengine/internal -google.golang.org/appengine/internal/app_identity google.golang.org/appengine/internal/base google.golang.org/appengine/internal/datastore google.golang.org/appengine/internal/log -google.golang.org/appengine/internal/modules google.golang.org/appengine/internal/remote_api google.golang.org/appengine/internal/urlfetch google.golang.org/appengine/urlfetch @@ -1833,7 +1845,7 @@ k8s.io/utils/trace # kmodules.xyz/apiversion v0.2.0 ## explicit; go 1.14 kmodules.xyz/apiversion -# kmodules.xyz/client-go v0.30.13 +# kmodules.xyz/client-go v0.30.17 ## explicit; go 1.22.0 kmodules.xyz/client-go kmodules.xyz/client-go/admissionregistration @@ -1887,7 +1899,7 @@ kmodules.xyz/go-containerregistry/name ## explicit; go 1.21 kmodules.xyz/objectstore-api/api/v1 kmodules.xyz/objectstore-api/osm -# kmodules.xyz/offshoot-api v0.30.0 +# kmodules.xyz/offshoot-api v0.30.1 ## explicit; go 1.22.0 kmodules.xyz/offshoot-api/api/v1 kmodules.xyz/offshoot-api/api/v2 @@ -1955,7 +1967,7 @@ sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/client/metrics sigs.k8s.io/apiserver-network-proxy/konnectivity-client/pkg/common/metrics sigs.k8s.io/apiserver-network-proxy/konnectivity-client/proto/client -# sigs.k8s.io/cli-utils v0.34.0 +# sigs.k8s.io/cli-utils v0.35.0 ## explicit; go 1.18 sigs.k8s.io/cli-utils/pkg/kstatus/status # sigs.k8s.io/controller-runtime v0.18.4 => github.com/kmodules/controller-runtime v0.18.4-0.20240603164526-fa88ec2314fe @@ -2099,7 +2111,7 @@ sigs.k8s.io/structured-merge-diff/v4/value ## explicit; go 1.12 sigs.k8s.io/yaml sigs.k8s.io/yaml/goyaml.v2 -# stash.appscode.dev/apimachinery v0.35.0 +# stash.appscode.dev/apimachinery v0.36.0 ## explicit; go 1.22.0 stash.appscode.dev/apimachinery/apis stash.appscode.dev/apimachinery/apis/repositories diff --git a/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go index 7ff38cb16..8e1d8182d 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/repositories/v1alpha1/openapi_generated.go @@ -358,6 +358,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/client-go/api/v1.CAPIClusterInfo": schema_kmodulesxyz_client_go_api_v1_CAPIClusterInfo(ref), "kmodules.xyz/client-go/api/v1.CertificatePrivateKey": schema_kmodulesxyz_client_go_api_v1_CertificatePrivateKey(ref), "kmodules.xyz/client-go/api/v1.CertificateSpec": schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref), + "kmodules.xyz/client-go/api/v1.ClusterInfo": schema_kmodulesxyz_client_go_api_v1_ClusterInfo(ref), "kmodules.xyz/client-go/api/v1.ClusterMetadata": schema_kmodulesxyz_client_go_api_v1_ClusterMetadata(ref), "kmodules.xyz/client-go/api/v1.Condition": schema_kmodulesxyz_client_go_api_v1_Condition(ref), "kmodules.xyz/client-go/api/v1.HealthCheckSpec": schema_kmodulesxyz_client_go_api_v1_HealthCheckSpec(ref), @@ -401,7 +402,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/objectstore-api/api/v1.SwiftSpec": schema_kmodulesxyz_objectstore_api_api_v1_SwiftSpec(ref), "kmodules.xyz/offshoot-api/api/v1.ContainerRuntimeSettings": schema_kmodulesxyz_offshoot_api_api_v1_ContainerRuntimeSettings(ref), "kmodules.xyz/offshoot-api/api/v1.EphemeralVolumeSource": schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref), + "kmodules.xyz/offshoot-api/api/v1.Gateway": schema_kmodulesxyz_offshoot_api_api_v1_Gateway(ref), + "kmodules.xyz/offshoot-api/api/v1.GatewayPort": schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref), "kmodules.xyz/offshoot-api/api/v1.IONiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref), + "kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus": schema_kmodulesxyz_offshoot_api_api_v1_NamedServiceStatus(ref), + "kmodules.xyz/offshoot-api/api/v1.NamedURL": schema_kmodulesxyz_offshoot_api_api_v1_NamedURL(ref), "kmodules.xyz/offshoot-api/api/v1.NiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.ObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_ObjectMeta(ref), "kmodules.xyz/offshoot-api/api/v1.PartialObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_PartialObjectMeta(ref), @@ -18441,23 +18446,27 @@ func schema_kmodulesxyz_client_go_api_v1_CAPIClusterInfo(ref common.ReferenceCal Properties: map[string]spec.Schema{ "provider": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "namespace": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "clusterName": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"provider", "namespace", "clusterName"}, }, }, } @@ -18603,6 +18612,56 @@ func schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref common.ReferenceCal } } +func schema_kmodulesxyz_client_go_api_v1_ClusterInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterInfo used in ace-installer", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "clusterManagers": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "capi": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), + }, + }, + }, + Required: []string{"uid", "name", "clusterManagers"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/client-go/api/v1.CAPIClusterInfo"}, + } +} + func schema_kmodulesxyz_client_go_api_v1_ClusterMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -20476,6 +20535,118 @@ func schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref common.Ref } } +func schema_kmodulesxyz_offshoot_api_api_v1_Gateway(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ip": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "services": { + SchemaProps: spec.SchemaProps{ + Description: "Services is an optional configuration for services used to expose database", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus"), + }, + }, + }, + }, + }, + "ui": { + SchemaProps: spec.SchemaProps{ + Description: "UI is an optional list of database web uis", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.NamedURL"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "namespace"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus", "kmodules.xyz/offshoot-api/api/v1.NamedURL"}, + } +} + +func schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GatewayPort contains information on Gateway service's port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port within the gateway service.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port that will be exposed by the gateway service.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "backendServicePort": { + SchemaProps: spec.SchemaProps{ + Description: "Number of the port to access the backend service.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "nodePort": { + SchemaProps: spec.SchemaProps{ + Description: "The port on each node on which this gateway service is exposed when type is NodePort or LoadBalancer.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -20501,6 +20672,85 @@ func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceC } } +func schema_kmodulesxyz_offshoot_api_api_v1_NamedServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "alias": { + SchemaProps: spec.SchemaProps{ + Description: "Alias represents the identifier of the service.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.GatewayPort"), + }, + }, + }, + }, + }, + }, + Required: []string{"alias", "ports"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/offshoot-api/api/v1.GatewayPort"}, + } +} + +func schema_kmodulesxyz_offshoot_api_api_v1_NamedURL(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "alias": { + SchemaProps: spec.SchemaProps{ + Description: "Alias represents the identifier of the service. This should match the db ui chart name", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL of the database ui", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.GatewayPort"), + }, + }, + "helmRelease": { + SchemaProps: spec.SchemaProps{ + Description: "HelmRelease is the name of the helm release used to deploy this ui The name format is typically -", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + Required: []string{"alias", "url", "port"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/offshoot-api/api/v1.GatewayPort"}, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -21255,6 +21505,12 @@ func schema_kmodulesxyz_offshoot_api_api_v1_PodSpec(ref common.ReferenceCallback }, }, }, + "podPlacementPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PodPlacementPolicy is the reference of the podPlacementPolicy", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, }, }, }, diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go index 7975afdf0..a130db7ad 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1alpha1/openapi_generated.go @@ -358,6 +358,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/client-go/api/v1.CAPIClusterInfo": schema_kmodulesxyz_client_go_api_v1_CAPIClusterInfo(ref), "kmodules.xyz/client-go/api/v1.CertificatePrivateKey": schema_kmodulesxyz_client_go_api_v1_CertificatePrivateKey(ref), "kmodules.xyz/client-go/api/v1.CertificateSpec": schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref), + "kmodules.xyz/client-go/api/v1.ClusterInfo": schema_kmodulesxyz_client_go_api_v1_ClusterInfo(ref), "kmodules.xyz/client-go/api/v1.ClusterMetadata": schema_kmodulesxyz_client_go_api_v1_ClusterMetadata(ref), "kmodules.xyz/client-go/api/v1.Condition": schema_kmodulesxyz_client_go_api_v1_Condition(ref), "kmodules.xyz/client-go/api/v1.HealthCheckSpec": schema_kmodulesxyz_client_go_api_v1_HealthCheckSpec(ref), @@ -401,7 +402,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/objectstore-api/api/v1.SwiftSpec": schema_kmodulesxyz_objectstore_api_api_v1_SwiftSpec(ref), "kmodules.xyz/offshoot-api/api/v1.ContainerRuntimeSettings": schema_kmodulesxyz_offshoot_api_api_v1_ContainerRuntimeSettings(ref), "kmodules.xyz/offshoot-api/api/v1.EphemeralVolumeSource": schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref), + "kmodules.xyz/offshoot-api/api/v1.Gateway": schema_kmodulesxyz_offshoot_api_api_v1_Gateway(ref), + "kmodules.xyz/offshoot-api/api/v1.GatewayPort": schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref), "kmodules.xyz/offshoot-api/api/v1.IONiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref), + "kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus": schema_kmodulesxyz_offshoot_api_api_v1_NamedServiceStatus(ref), + "kmodules.xyz/offshoot-api/api/v1.NamedURL": schema_kmodulesxyz_offshoot_api_api_v1_NamedURL(ref), "kmodules.xyz/offshoot-api/api/v1.NiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.ObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_ObjectMeta(ref), "kmodules.xyz/offshoot-api/api/v1.PartialObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_PartialObjectMeta(ref), @@ -18446,23 +18451,27 @@ func schema_kmodulesxyz_client_go_api_v1_CAPIClusterInfo(ref common.ReferenceCal Properties: map[string]spec.Schema{ "provider": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "namespace": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "clusterName": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"provider", "namespace", "clusterName"}, }, }, } @@ -18608,6 +18617,56 @@ func schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref common.ReferenceCal } } +func schema_kmodulesxyz_client_go_api_v1_ClusterInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterInfo used in ace-installer", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "clusterManagers": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "capi": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), + }, + }, + }, + Required: []string{"uid", "name", "clusterManagers"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/client-go/api/v1.CAPIClusterInfo"}, + } +} + func schema_kmodulesxyz_client_go_api_v1_ClusterMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -20481,6 +20540,118 @@ func schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref common.Ref } } +func schema_kmodulesxyz_offshoot_api_api_v1_Gateway(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ip": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "services": { + SchemaProps: spec.SchemaProps{ + Description: "Services is an optional configuration for services used to expose database", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus"), + }, + }, + }, + }, + }, + "ui": { + SchemaProps: spec.SchemaProps{ + Description: "UI is an optional list of database web uis", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.NamedURL"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "namespace"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus", "kmodules.xyz/offshoot-api/api/v1.NamedURL"}, + } +} + +func schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GatewayPort contains information on Gateway service's port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port within the gateway service.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port that will be exposed by the gateway service.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "backendServicePort": { + SchemaProps: spec.SchemaProps{ + Description: "Number of the port to access the backend service.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "nodePort": { + SchemaProps: spec.SchemaProps{ + Description: "The port on each node on which this gateway service is exposed when type is NodePort or LoadBalancer.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -20506,6 +20677,85 @@ func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceC } } +func schema_kmodulesxyz_offshoot_api_api_v1_NamedServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "alias": { + SchemaProps: spec.SchemaProps{ + Description: "Alias represents the identifier of the service.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.GatewayPort"), + }, + }, + }, + }, + }, + }, + Required: []string{"alias", "ports"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/offshoot-api/api/v1.GatewayPort"}, + } +} + +func schema_kmodulesxyz_offshoot_api_api_v1_NamedURL(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "alias": { + SchemaProps: spec.SchemaProps{ + Description: "Alias represents the identifier of the service. This should match the db ui chart name", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL of the database ui", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.GatewayPort"), + }, + }, + "helmRelease": { + SchemaProps: spec.SchemaProps{ + Description: "HelmRelease is the name of the helm release used to deploy this ui The name format is typically -", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + Required: []string{"alias", "url", "port"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/offshoot-api/api/v1.GatewayPort"}, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -21260,6 +21510,12 @@ func schema_kmodulesxyz_offshoot_api_api_v1_PodSpec(ref common.ReferenceCallback }, }, }, + "podPlacementPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PodPlacementPolicy is the reference of the podPlacementPolicy", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, }, }, }, diff --git a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go index 703d69f44..d23654b25 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/stash/v1beta1/openapi_generated.go @@ -358,6 +358,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/client-go/api/v1.CAPIClusterInfo": schema_kmodulesxyz_client_go_api_v1_CAPIClusterInfo(ref), "kmodules.xyz/client-go/api/v1.CertificatePrivateKey": schema_kmodulesxyz_client_go_api_v1_CertificatePrivateKey(ref), "kmodules.xyz/client-go/api/v1.CertificateSpec": schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref), + "kmodules.xyz/client-go/api/v1.ClusterInfo": schema_kmodulesxyz_client_go_api_v1_ClusterInfo(ref), "kmodules.xyz/client-go/api/v1.ClusterMetadata": schema_kmodulesxyz_client_go_api_v1_ClusterMetadata(ref), "kmodules.xyz/client-go/api/v1.Condition": schema_kmodulesxyz_client_go_api_v1_Condition(ref), "kmodules.xyz/client-go/api/v1.HealthCheckSpec": schema_kmodulesxyz_client_go_api_v1_HealthCheckSpec(ref), @@ -401,7 +402,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/objectstore-api/api/v1.SwiftSpec": schema_kmodulesxyz_objectstore_api_api_v1_SwiftSpec(ref), "kmodules.xyz/offshoot-api/api/v1.ContainerRuntimeSettings": schema_kmodulesxyz_offshoot_api_api_v1_ContainerRuntimeSettings(ref), "kmodules.xyz/offshoot-api/api/v1.EphemeralVolumeSource": schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref), + "kmodules.xyz/offshoot-api/api/v1.Gateway": schema_kmodulesxyz_offshoot_api_api_v1_Gateway(ref), + "kmodules.xyz/offshoot-api/api/v1.GatewayPort": schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref), "kmodules.xyz/offshoot-api/api/v1.IONiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref), + "kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus": schema_kmodulesxyz_offshoot_api_api_v1_NamedServiceStatus(ref), + "kmodules.xyz/offshoot-api/api/v1.NamedURL": schema_kmodulesxyz_offshoot_api_api_v1_NamedURL(ref), "kmodules.xyz/offshoot-api/api/v1.NiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.ObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_ObjectMeta(ref), "kmodules.xyz/offshoot-api/api/v1.PartialObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_PartialObjectMeta(ref), @@ -18492,23 +18497,27 @@ func schema_kmodulesxyz_client_go_api_v1_CAPIClusterInfo(ref common.ReferenceCal Properties: map[string]spec.Schema{ "provider": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "namespace": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "clusterName": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"provider", "namespace", "clusterName"}, }, }, } @@ -18654,6 +18663,56 @@ func schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref common.ReferenceCal } } +func schema_kmodulesxyz_client_go_api_v1_ClusterInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterInfo used in ace-installer", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "clusterManagers": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "capi": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), + }, + }, + }, + Required: []string{"uid", "name", "clusterManagers"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/client-go/api/v1.CAPIClusterInfo"}, + } +} + func schema_kmodulesxyz_client_go_api_v1_ClusterMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -20527,6 +20586,118 @@ func schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref common.Ref } } +func schema_kmodulesxyz_offshoot_api_api_v1_Gateway(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ip": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "services": { + SchemaProps: spec.SchemaProps{ + Description: "Services is an optional configuration for services used to expose database", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus"), + }, + }, + }, + }, + }, + "ui": { + SchemaProps: spec.SchemaProps{ + Description: "UI is an optional list of database web uis", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.NamedURL"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "namespace"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus", "kmodules.xyz/offshoot-api/api/v1.NamedURL"}, + } +} + +func schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GatewayPort contains information on Gateway service's port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port within the gateway service.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port that will be exposed by the gateway service.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "backendServicePort": { + SchemaProps: spec.SchemaProps{ + Description: "Number of the port to access the backend service.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "nodePort": { + SchemaProps: spec.SchemaProps{ + Description: "The port on each node on which this gateway service is exposed when type is NodePort or LoadBalancer.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -20552,6 +20723,85 @@ func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceC } } +func schema_kmodulesxyz_offshoot_api_api_v1_NamedServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "alias": { + SchemaProps: spec.SchemaProps{ + Description: "Alias represents the identifier of the service.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.GatewayPort"), + }, + }, + }, + }, + }, + }, + Required: []string{"alias", "ports"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/offshoot-api/api/v1.GatewayPort"}, + } +} + +func schema_kmodulesxyz_offshoot_api_api_v1_NamedURL(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "alias": { + SchemaProps: spec.SchemaProps{ + Description: "Alias represents the identifier of the service. This should match the db ui chart name", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL of the database ui", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.GatewayPort"), + }, + }, + "helmRelease": { + SchemaProps: spec.SchemaProps{ + Description: "HelmRelease is the name of the helm release used to deploy this ui The name format is typically -", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + Required: []string{"alias", "url", "port"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/offshoot-api/api/v1.GatewayPort"}, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -21306,6 +21556,12 @@ func schema_kmodulesxyz_offshoot_api_api_v1_PodSpec(ref common.ReferenceCallback }, }, }, + "podPlacementPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PodPlacementPolicy is the reference of the podPlacementPolicy", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, }, }, }, diff --git a/vendor/stash.appscode.dev/apimachinery/apis/ui/v1alpha1/openapi_generated.go b/vendor/stash.appscode.dev/apimachinery/apis/ui/v1alpha1/openapi_generated.go index 46c8d08ac..0939e4511 100644 --- a/vendor/stash.appscode.dev/apimachinery/apis/ui/v1alpha1/openapi_generated.go +++ b/vendor/stash.appscode.dev/apimachinery/apis/ui/v1alpha1/openapi_generated.go @@ -358,6 +358,7 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/client-go/api/v1.CAPIClusterInfo": schema_kmodulesxyz_client_go_api_v1_CAPIClusterInfo(ref), "kmodules.xyz/client-go/api/v1.CertificatePrivateKey": schema_kmodulesxyz_client_go_api_v1_CertificatePrivateKey(ref), "kmodules.xyz/client-go/api/v1.CertificateSpec": schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref), + "kmodules.xyz/client-go/api/v1.ClusterInfo": schema_kmodulesxyz_client_go_api_v1_ClusterInfo(ref), "kmodules.xyz/client-go/api/v1.ClusterMetadata": schema_kmodulesxyz_client_go_api_v1_ClusterMetadata(ref), "kmodules.xyz/client-go/api/v1.Condition": schema_kmodulesxyz_client_go_api_v1_Condition(ref), "kmodules.xyz/client-go/api/v1.HealthCheckSpec": schema_kmodulesxyz_client_go_api_v1_HealthCheckSpec(ref), @@ -401,7 +402,11 @@ func GetOpenAPIDefinitions(ref common.ReferenceCallback) map[string]common.OpenA "kmodules.xyz/objectstore-api/api/v1.SwiftSpec": schema_kmodulesxyz_objectstore_api_api_v1_SwiftSpec(ref), "kmodules.xyz/offshoot-api/api/v1.ContainerRuntimeSettings": schema_kmodulesxyz_offshoot_api_api_v1_ContainerRuntimeSettings(ref), "kmodules.xyz/offshoot-api/api/v1.EphemeralVolumeSource": schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref), + "kmodules.xyz/offshoot-api/api/v1.Gateway": schema_kmodulesxyz_offshoot_api_api_v1_Gateway(ref), + "kmodules.xyz/offshoot-api/api/v1.GatewayPort": schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref), "kmodules.xyz/offshoot-api/api/v1.IONiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref), + "kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus": schema_kmodulesxyz_offshoot_api_api_v1_NamedServiceStatus(ref), + "kmodules.xyz/offshoot-api/api/v1.NamedURL": schema_kmodulesxyz_offshoot_api_api_v1_NamedURL(ref), "kmodules.xyz/offshoot-api/api/v1.NiceSettings": schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref), "kmodules.xyz/offshoot-api/api/v1.ObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_ObjectMeta(ref), "kmodules.xyz/offshoot-api/api/v1.PartialObjectMeta": schema_kmodulesxyz_offshoot_api_api_v1_PartialObjectMeta(ref), @@ -18441,23 +18446,27 @@ func schema_kmodulesxyz_client_go_api_v1_CAPIClusterInfo(ref common.ReferenceCal Properties: map[string]spec.Schema{ "provider": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "namespace": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, "clusterName": { SchemaProps: spec.SchemaProps{ - Type: []string{"string"}, - Format: "", + Default: "", + Type: []string{"string"}, + Format: "", }, }, }, + Required: []string{"provider", "namespace", "clusterName"}, }, }, } @@ -18603,6 +18612,56 @@ func schema_kmodulesxyz_client_go_api_v1_CertificateSpec(ref common.ReferenceCal } } +func schema_kmodulesxyz_client_go_api_v1_ClusterInfo(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "ClusterInfo used in ace-installer", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "uid": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "clusterManagers": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + }, + }, + }, + "capi": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/client-go/api/v1.CAPIClusterInfo"), + }, + }, + }, + Required: []string{"uid", "name", "clusterManagers"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/client-go/api/v1.CAPIClusterInfo"}, + } +} + func schema_kmodulesxyz_client_go_api_v1_ClusterMetadata(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -20476,6 +20535,118 @@ func schema_kmodulesxyz_offshoot_api_api_v1_EphemeralVolumeSource(ref common.Ref } } +func schema_kmodulesxyz_offshoot_api_api_v1_Gateway(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "namespace": { + SchemaProps: spec.SchemaProps{ + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ip": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "hostname": { + SchemaProps: spec.SchemaProps{ + Type: []string{"string"}, + Format: "", + }, + }, + "services": { + SchemaProps: spec.SchemaProps{ + Description: "Services is an optional configuration for services used to expose database", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus"), + }, + }, + }, + }, + }, + "ui": { + SchemaProps: spec.SchemaProps{ + Description: "UI is an optional list of database web uis", + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.NamedURL"), + }, + }, + }, + }, + }, + }, + Required: []string{"name", "namespace"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/offshoot-api/api/v1.NamedServiceStatus", "kmodules.xyz/offshoot-api/api/v1.NamedURL"}, + } +} + +func schema_kmodulesxyz_offshoot_api_api_v1_GatewayPort(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Description: "GatewayPort contains information on Gateway service's port.", + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "name": { + SchemaProps: spec.SchemaProps{ + Description: "The name of this port within the gateway service.", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Description: "The port that will be exposed by the gateway service.", + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, + "backendServicePort": { + SchemaProps: spec.SchemaProps{ + Description: "Number of the port to access the backend service.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + "nodePort": { + SchemaProps: spec.SchemaProps{ + Description: "The port on each node on which this gateway service is exposed when type is NodePort or LoadBalancer.", + Type: []string{"integer"}, + Format: "int32", + }, + }, + }, + Required: []string{"port"}, + }, + }, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -20501,6 +20672,85 @@ func schema_kmodulesxyz_offshoot_api_api_v1_IONiceSettings(ref common.ReferenceC } } +func schema_kmodulesxyz_offshoot_api_api_v1_NamedServiceStatus(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "alias": { + SchemaProps: spec.SchemaProps{ + Description: "Alias represents the identifier of the service.", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "ports": { + SchemaProps: spec.SchemaProps{ + Type: []string{"array"}, + Items: &spec.SchemaOrArray{ + Schema: &spec.Schema{ + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.GatewayPort"), + }, + }, + }, + }, + }, + }, + Required: []string{"alias", "ports"}, + }, + }, + Dependencies: []string{ + "kmodules.xyz/offshoot-api/api/v1.GatewayPort"}, + } +} + +func schema_kmodulesxyz_offshoot_api_api_v1_NamedURL(ref common.ReferenceCallback) common.OpenAPIDefinition { + return common.OpenAPIDefinition{ + Schema: spec.Schema{ + SchemaProps: spec.SchemaProps{ + Type: []string{"object"}, + Properties: map[string]spec.Schema{ + "alias": { + SchemaProps: spec.SchemaProps{ + Description: "Alias represents the identifier of the service. This should match the db ui chart name", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "url": { + SchemaProps: spec.SchemaProps{ + Description: "URL of the database ui", + Default: "", + Type: []string{"string"}, + Format: "", + }, + }, + "port": { + SchemaProps: spec.SchemaProps{ + Default: map[string]interface{}{}, + Ref: ref("kmodules.xyz/offshoot-api/api/v1.GatewayPort"), + }, + }, + "helmRelease": { + SchemaProps: spec.SchemaProps{ + Description: "HelmRelease is the name of the helm release used to deploy this ui The name format is typically -", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, + }, + Required: []string{"alias", "url", "port"}, + }, + }, + Dependencies: []string{ + "k8s.io/api/core/v1.LocalObjectReference", "kmodules.xyz/offshoot-api/api/v1.GatewayPort"}, + } +} + func schema_kmodulesxyz_offshoot_api_api_v1_NiceSettings(ref common.ReferenceCallback) common.OpenAPIDefinition { return common.OpenAPIDefinition{ Schema: spec.Schema{ @@ -21255,6 +21505,12 @@ func schema_kmodulesxyz_offshoot_api_api_v1_PodSpec(ref common.ReferenceCallback }, }, }, + "podPlacementPolicy": { + SchemaProps: spec.SchemaProps{ + Description: "PodPlacementPolicy is the reference of the podPlacementPolicy", + Ref: ref("k8s.io/api/core/v1.LocalObjectReference"), + }, + }, }, }, },