From f477d5d0b22988aff2849f909c0257ccbbce236c Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Sat, 16 May 2020 22:09:08 -0700 Subject: [PATCH] Update generated code --- .../v1/fakes/zz_generated_api_service_mock.go | 104 +- .../v1/zz_generated_api_service_controller.go | 46 +- .../v1/zz_generated_deepcopy.go | 39 - .../v1/zz_generated_k8s_client.go | 55 +- .../v1/zz_generated_scheme.go | 18 - .../v1/fakes/zz_generated_daemon_set_mock.go | 104 +- .../v1/fakes/zz_generated_deployment_mock.go | 104 +- .../v1/fakes/zz_generated_replica_set_mock.go | 104 +- .../fakes/zz_generated_stateful_set_mock.go | 104 +- .../v1/zz_generated_daemon_set_controller.go | 46 +- apis/apps/v1/zz_generated_deepcopy.go | 138 --- .../v1/zz_generated_deployment_controller.go | 46 +- apis/apps/v1/zz_generated_k8s_client.go | 70 +- .../v1/zz_generated_replica_set_controller.go | 46 +- apis/apps/v1/zz_generated_scheme.go | 21 - .../zz_generated_stateful_set_controller.go | 46 +- ...enerated_horizontal_pod_autoscaler_mock.go | 104 +- .../v2beta2/zz_generated_deepcopy.go | 39 - ...ed_horizontal_pod_autoscaler_controller.go | 46 +- .../v2beta2/zz_generated_k8s_client.go | 55 +- .../v2beta2/zz_generated_scheme.go | 18 - apis/batch/v1/fakes/zz_generated_job_mock.go | 104 +- apis/batch/v1/zz_generated_deepcopy.go | 39 - apis/batch/v1/zz_generated_job_controller.go | 46 +- apis/batch/v1/zz_generated_k8s_client.go | 55 +- apis/batch/v1/zz_generated_scheme.go | 18 - .../fakes/zz_generated_cron_job_mock.go | 104 +- .../zz_generated_cron_job_controller.go | 46 +- apis/batch/v1beta1/zz_generated_deepcopy.go | 39 - apis/batch/v1beta1/zz_generated_k8s_client.go | 55 +- apis/batch/v1beta1/zz_generated_scheme.go | 18 - .../zz_generated_cluster_auth_token_mock.go | 92 -- ...z_generated_cluster_user_attribute_mock.go | 92 -- ...generated_cluster_auth_token_controller.go | 26 +- ...rated_cluster_user_attribute_controller.go | 26 +- .../v3/zz_generated_k8s_client.go | 62 +- .../v3/zz_generated_scheme.go | 2 + .../zz_generated_component_status_mock.go | 104 +- .../v1/fakes/zz_generated_config_map_mock.go | 104 +- .../v1/fakes/zz_generated_endpoints_mock.go | 104 +- apis/core/v1/fakes/zz_generated_event_mock.go | 104 +- .../v1/fakes/zz_generated_limit_range_mock.go | 104 +- .../v1/fakes/zz_generated_namespace_mock.go | 104 +- apis/core/v1/fakes/zz_generated_node_mock.go | 104 +- ..._generated_persistent_volume_claim_mock.go | 104 +- apis/core/v1/fakes/zz_generated_pod_mock.go | 104 +- ...z_generated_replication_controller_mock.go | 104 +- .../fakes/zz_generated_resource_quota_mock.go | 104 +- .../core/v1/fakes/zz_generated_secret_mock.go | 104 +- .../zz_generated_service_account_mock.go | 104 +- .../v1/fakes/zz_generated_service_mock.go | 104 +- ...z_generated_component_status_controller.go | 46 +- .../v1/zz_generated_config_map_controller.go | 46 +- apis/core/v1/zz_generated_deepcopy.go | 468 --------- .../v1/zz_generated_endpoints_controller.go | 46 +- apis/core/v1/zz_generated_event_controller.go | 46 +- apis/core/v1/zz_generated_k8s_client.go | 120 +-- .../v1/zz_generated_limit_range_controller.go | 46 +- .../v1/zz_generated_namespace_controller.go | 46 +- apis/core/v1/zz_generated_node_controller.go | 46 +- ...ated_persistent_volume_claim_controller.go | 46 +- apis/core/v1/zz_generated_pod_controller.go | 46 +- ...rated_replication_controller_controller.go | 46 +- .../zz_generated_resource_quota_controller.go | 46 +- apis/core/v1/zz_generated_scheme.go | 31 - .../core/v1/zz_generated_secret_controller.go | 46 +- ...zz_generated_service_account_controller.go | 46 +- .../v1/zz_generated_service_controller.go | 46 +- .../fakes/zz_generated_ingress_mock.go | 104 +- .../v1beta1/zz_generated_deepcopy.go | 39 - .../zz_generated_ingress_controller.go | 46 +- .../v1beta1/zz_generated_k8s_client.go | 55 +- .../extensions/v1beta1/zz_generated_scheme.go | 18 - .../v3/fakes/zz_generated_auth_config_mock.go | 92 -- .../v3/fakes/zz_generated_catalog_mock.go | 92 -- .../zz_generated_catalog_template_mock.go | 92 -- ...generated_catalog_template_version_mock.go | 92 -- ...zz_generated_cis_benchmark_version_mock.go | 92 -- .../v3/fakes/zz_generated_cis_config_mock.go | 92 -- .../zz_generated_cloud_credential_mock.go | 92 -- .../zz_generated_cluster_alert_group_mock.go | 92 -- .../fakes/zz_generated_cluster_alert_mock.go | 92 -- .../zz_generated_cluster_alert_rule_mock.go | 92 -- .../zz_generated_cluster_catalog_mock.go | 92 -- .../zz_generated_cluster_logging_mock.go | 92 -- .../v3/fakes/zz_generated_cluster_mock.go | 92 -- ...zz_generated_cluster_monitor_graph_mock.go | 92 -- ...nerated_cluster_registration_token_mock.go | 92 -- ...ated_cluster_role_template_binding_mock.go | 92 -- .../fakes/zz_generated_cluster_scan_mock.go | 92 -- .../zz_generated_cluster_template_mock.go | 92 -- ...enerated_cluster_template_revision_mock.go | 92 -- .../fakes/zz_generated_compose_config_mock.go | 92 -- .../fakes/zz_generated_dynamic_schema_mock.go | 92 -- .../v3/fakes/zz_generated_etcd_backup_mock.go | 92 -- .../v3/fakes/zz_generated_feature_mock.go | 92 -- .../v3/fakes/zz_generated_global_dns_mock.go | 956 ++++++++---------- .../zz_generated_global_dns_provider_mock.go | 92 -- .../zz_generated_global_role_binding_mock.go | 92 -- .../v3/fakes/zz_generated_global_role_mock.go | 92 -- .../fakes/zz_generated_group_member_mock.go | 92 -- .../v3/fakes/zz_generated_group_mock.go | 92 -- .../zz_generated_kontainer_driver_mock.go | 92 -- .../v3/fakes/zz_generated_ldap_config_mock.go | 92 -- .../fakes/zz_generated_monitor_metric_mock.go | 92 -- .../zz_generated_multi_cluster_app_mock.go | 92 -- ...nerated_multi_cluster_app_revision_mock.go | 92 -- .../v3/fakes/zz_generated_node_driver_mock.go | 92 -- .../v3/fakes/zz_generated_node_mock.go | 92 -- .../v3/fakes/zz_generated_node_pool_mock.go | 92 -- .../fakes/zz_generated_node_template_mock.go | 92 -- .../v3/fakes/zz_generated_notifier_mock.go | 92 -- ...rated_pod_security_policy_template_mock.go | 92 -- ...ty_policy_template_project_binding_mock.go | 92 -- .../v3/fakes/zz_generated_preference_mock.go | 92 -- .../v3/fakes/zz_generated_principal_mock.go | 92 -- .../zz_generated_project_alert_group_mock.go | 92 -- .../fakes/zz_generated_project_alert_mock.go | 92 -- .../zz_generated_project_alert_rule_mock.go | 92 -- .../zz_generated_project_catalog_mock.go | 92 -- .../zz_generated_project_logging_mock.go | 92 -- .../v3/fakes/zz_generated_project_mock.go | 92 -- ...zz_generated_project_monitor_graph_mock.go | 92 -- ...z_generated_project_network_policy_mock.go | 92 -- ...ated_project_role_template_binding_mock.go | 92 -- .../v3/fakes/zz_generated_rke_addon_mock.go | 956 ++++++++---------- ...z_generated_rke_k8s_service_option_mock.go | 956 ++++++++---------- .../zz_generated_rke_k8s_system_image_mock.go | 956 ++++++++---------- .../fakes/zz_generated_role_template_mock.go | 92 -- .../v3/fakes/zz_generated_setting_mock.go | 92 -- .../zz_generated_template_content_mock.go | 92 -- .../v3/fakes/zz_generated_template_mock.go | 92 -- .../zz_generated_template_version_mock.go | 92 -- .../v3/fakes/zz_generated_token_mock.go | 92 -- .../fakes/zz_generated_user_attribute_mock.go | 92 -- .../v3/fakes/zz_generated_user_mock.go | 92 -- .../v3/zz_generated_auth_config_controller.go | 26 +- .../v3/zz_generated_catalog_controller.go | 26 +- ...z_generated_catalog_template_controller.go | 26 +- ...ted_catalog_template_version_controller.go | 26 +- ...erated_cis_benchmark_version_controller.go | 26 +- .../v3/zz_generated_cis_config_controller.go | 26 +- ...z_generated_cloud_credential_controller.go | 26 +- .../zz_generated_cluster_alert_controller.go | 26 +- ...enerated_cluster_alert_group_controller.go | 26 +- ...generated_cluster_alert_rule_controller.go | 26 +- ...zz_generated_cluster_catalog_controller.go | 26 +- .../v3/zz_generated_cluster_controller.go | 26 +- ...zz_generated_cluster_logging_controller.go | 26 +- ...erated_cluster_monitor_graph_controller.go | 26 +- ...d_cluster_registration_token_controller.go | 26 +- ...luster_role_template_binding_controller.go | 26 +- .../zz_generated_cluster_scan_controller.go | 26 +- ...z_generated_cluster_template_controller.go | 26 +- ...ed_cluster_template_revision_controller.go | 26 +- .../zz_generated_compose_config_controller.go | 26 +- .../v3/zz_generated_deepcopy.go | 488 ++++----- .../zz_generated_dynamic_schema_controller.go | 26 +- .../v3/zz_generated_etcd_backup_controller.go | 26 +- .../v3/zz_generated_feature_controller.go | 26 +- .../v3/zz_generated_global_dns_controller.go | 190 ++-- ..._generated_global_dns_lifecycle_adapter.go | 22 +- ...enerated_global_dns_provider_controller.go | 26 +- ...enerated_global_role_binding_controller.go | 26 +- .../v3/zz_generated_global_role_controller.go | 26 +- .../v3/zz_generated_group_controller.go | 26 +- .../zz_generated_group_member_controller.go | 26 +- .../v3/zz_generated_k8s_client.go | 399 +++----- ...z_generated_kontainer_driver_controller.go | 26 +- .../v3/zz_generated_ldap_config_controller.go | 26 +- .../zz_generated_monitor_metric_controller.go | 26 +- ..._generated_multi_cluster_app_controller.go | 26 +- ...d_multi_cluster_app_revision_controller.go | 26 +- .../v3/zz_generated_node_controller.go | 26 +- .../v3/zz_generated_node_driver_controller.go | 26 +- .../v3/zz_generated_node_pool_controller.go | 26 +- .../zz_generated_node_template_controller.go | 26 +- .../v3/zz_generated_notifier_controller.go | 26 +- ...pod_security_policy_template_controller.go | 26 +- ...icy_template_project_binding_controller.go | 26 +- .../v3/zz_generated_preference_controller.go | 26 +- .../v3/zz_generated_principal_controller.go | 26 +- .../zz_generated_project_alert_controller.go | 26 +- ...enerated_project_alert_group_controller.go | 26 +- ...generated_project_alert_rule_controller.go | 26 +- ...zz_generated_project_catalog_controller.go | 26 +- .../v3/zz_generated_project_controller.go | 26 +- ...zz_generated_project_logging_controller.go | 26 +- ...erated_project_monitor_graph_controller.go | 26 +- ...rated_project_network_policy_controller.go | 26 +- ...roject_role_template_binding_controller.go | 26 +- .../v3/zz_generated_rke_addon_controller.go | 190 ++-- ...z_generated_rke_addon_lifecycle_adapter.go | 22 +- ...rated_rke_k8s_service_option_controller.go | 190 ++-- ...ke_k8s_service_option_lifecycle_adapter.go | 22 +- ...nerated_rke_k8s_system_image_controller.go | 190 ++-- ..._rke_k8s_system_image_lifecycle_adapter.go | 22 +- .../zz_generated_role_template_controller.go | 26 +- .../v3/zz_generated_scheme.go | 17 +- .../v3/zz_generated_setting_controller.go | 26 +- ...z_generated_template_content_controller.go | 26 +- .../v3/zz_generated_template_controller.go | 26 +- ...z_generated_template_version_controller.go | 26 +- .../v3/zz_generated_token_controller.go | 26 +- .../zz_generated_user_attribute_controller.go | 26 +- .../v3/zz_generated_user_controller.go | 26 +- .../fakes/zz_generated_auth_provider_mock.go | 92 -- .../zz_generated_auth_provider_controller.go | 26 +- .../v3public/zz_generated_k8s_client.go | 57 +- .../fakes/zz_generated_alertmanager_mock.go | 104 +- .../v1/fakes/zz_generated_prometheus_mock.go | 104 +- .../zz_generated_prometheus_rule_mock.go | 104 +- .../zz_generated_service_monitor_mock.go | 104 +- .../zz_generated_alertmanager_controller.go | 46 +- .../v1/zz_generated_deepcopy.go | 138 --- .../v1/zz_generated_k8s_client.go | 70 +- .../v1/zz_generated_prometheus_controller.go | 46 +- ...zz_generated_prometheus_rule_controller.go | 46 +- .../v1/zz_generated_scheme.go | 21 - ...zz_generated_service_monitor_controller.go | 46 +- .../zz_generated_destination_rule_mock.go | 104 +- .../zz_generated_virtual_service_mock.go | 104 +- .../v1alpha3/zz_generated_deepcopy.go | 72 -- ...z_generated_destination_rule_controller.go | 46 +- .../v1alpha3/zz_generated_k8s_client.go | 60 +- .../v1alpha3/zz_generated_scheme.go | 19 - ...zz_generated_virtual_service_controller.go | 46 +- .../fakes/zz_generated_network_policy_mock.go | 104 +- .../v1/zz_generated_deepcopy.go | 39 - .../v1/zz_generated_k8s_client.go | 55 +- .../zz_generated_network_policy_controller.go | 46 +- .../v1/zz_generated_scheme.go | 18 - .../zz_generated_pod_security_policy_mock.go | 104 +- apis/policy/v1beta1/zz_generated_deepcopy.go | 39 - .../policy/v1beta1/zz_generated_k8s_client.go | 55 +- ...enerated_pod_security_policy_controller.go | 46 +- apis/policy/v1beta1/zz_generated_scheme.go | 18 - .../v3/fakes/zz_generated_app_mock.go | 92 -- .../fakes/zz_generated_app_revision_mock.go | 92 -- .../v3/fakes/zz_generated_basic_auth_mock.go | 92 -- .../v3/fakes/zz_generated_certificate_mock.go | 92 -- .../zz_generated_docker_credential_mock.go | 92 -- ...zz_generated_namespaced_basic_auth_mock.go | 92 -- ...z_generated_namespaced_certificate_mock.go | 92 -- ...rated_namespaced_docker_credential_mock.go | 92 -- ...d_namespaced_service_account_token_mock.go | 92 -- .../zz_generated_namespaced_ssh_auth_mock.go | 92 -- .../zz_generated_pipeline_execution_mock.go | 92 -- .../v3/fakes/zz_generated_pipeline_mock.go | 92 -- .../zz_generated_pipeline_setting_mock.go | 92 -- ...zz_generated_service_account_token_mock.go | 92 -- ...z_generated_source_code_credential_mock.go | 92 -- ...erated_source_code_provider_config_mock.go | 92 -- .../zz_generated_source_code_provider_mock.go | 92 -- ...z_generated_source_code_repository_mock.go | 92 -- .../v3/fakes/zz_generated_ssh_auth_mock.go | 92 -- .../v3/fakes/zz_generated_workload_mock.go | 92 -- .../v3/zz_generated_app_controller.go | 26 +- .../zz_generated_app_revision_controller.go | 26 +- .../v3/zz_generated_basic_auth_controller.go | 26 +- .../v3/zz_generated_certificate_controller.go | 26 +- ..._generated_docker_credential_controller.go | 26 +- .../v3/zz_generated_k8s_client.go | 152 +-- ...erated_namespaced_basic_auth_controller.go | 26 +- ...rated_namespaced_certificate_controller.go | 26 +- ...namespaced_docker_credential_controller.go | 26 +- ...spaced_service_account_token_controller.go | 26 +- ...enerated_namespaced_ssh_auth_controller.go | 26 +- .../v3/zz_generated_pipeline_controller.go | 26 +- ...generated_pipeline_execution_controller.go | 26 +- ...z_generated_pipeline_setting_controller.go | 26 +- ...erated_service_account_token_controller.go | 26 +- ...rated_source_code_credential_controller.go | 26 +- ..._source_code_provider_config_controller.go | 26 +- ...nerated_source_code_provider_controller.go | 26 +- ...rated_source_code_repository_controller.go | 26 +- .../v3/zz_generated_ssh_auth_controller.go | 26 +- .../v3/zz_generated_workload_controller.go | 26 +- .../zz_generated_cluster_role_binding_mock.go | 104 +- .../fakes/zz_generated_cluster_role_mock.go | 104 +- .../fakes/zz_generated_role_binding_mock.go | 104 +- .../v1/fakes/zz_generated_role_mock.go | 104 +- ...nerated_cluster_role_binding_controller.go | 46 +- .../zz_generated_cluster_role_controller.go | 46 +- .../v1/zz_generated_deepcopy.go | 138 --- .../v1/zz_generated_k8s_client.go | 70 +- .../zz_generated_role_binding_controller.go | 46 +- .../v1/zz_generated_role_controller.go | 46 +- .../v1/zz_generated_scheme.go | 21 - .../fakes/zz_generated_storage_class_mock.go | 104 +- .../v1/zz_generated_deepcopy.go | 39 - .../v1/zz_generated_k8s_client.go | 55 +- apis/storage.k8s.io/v1/zz_generated_scheme.go | 18 - .../zz_generated_storage_class_controller.go | 46 +- client/management/v3/zz_generated_client.go | 16 +- .../management/v3/zz_generated_global_dns.go | 122 +-- .../management/v3/zz_generated_rke_addon.go | 92 +- .../v3/zz_generated_rke_k8s_service_option.go | 92 +- .../v3/zz_generated_rke_k8s_system_image.go | 92 +- compose/zz_generated_compose.go | 8 +- 300 files changed, 4421 insertions(+), 19279 deletions(-) delete mode 100644 apis/apiregistration.k8s.io/v1/zz_generated_deepcopy.go delete mode 100644 apis/apps/v1/zz_generated_deepcopy.go delete mode 100644 apis/autoscaling/v2beta2/zz_generated_deepcopy.go delete mode 100644 apis/batch/v1/zz_generated_deepcopy.go delete mode 100644 apis/batch/v1beta1/zz_generated_deepcopy.go delete mode 100644 apis/core/v1/zz_generated_deepcopy.go delete mode 100644 apis/extensions/v1beta1/zz_generated_deepcopy.go delete mode 100644 apis/monitoring.coreos.com/v1/zz_generated_deepcopy.go delete mode 100644 apis/networking.istio.io/v1alpha3/zz_generated_deepcopy.go delete mode 100644 apis/networking.k8s.io/v1/zz_generated_deepcopy.go delete mode 100644 apis/policy/v1beta1/zz_generated_deepcopy.go delete mode 100644 apis/rbac.authorization.k8s.io/v1/zz_generated_deepcopy.go delete mode 100644 apis/storage.k8s.io/v1/zz_generated_deepcopy.go diff --git a/apis/apiregistration.k8s.io/v1/fakes/zz_generated_api_service_mock.go b/apis/apiregistration.k8s.io/v1/fakes/zz_generated_api_service_mock.go index d60ee4ca..b72ec061 100644 --- a/apis/apiregistration.k8s.io/v1/fakes/zz_generated_api_service_mock.go +++ b/apis/apiregistration.k8s.io/v1/fakes/zz_generated_api_service_mock.go @@ -151,8 +151,6 @@ var ( lockAPIServiceControllerMockGeneric sync.RWMutex lockAPIServiceControllerMockInformer sync.RWMutex lockAPIServiceControllerMockLister sync.RWMutex - lockAPIServiceControllerMockStart sync.RWMutex - lockAPIServiceControllerMockSync sync.RWMutex ) // Ensure, that APIServiceControllerMock does implement APIServiceController. @@ -192,12 +190,6 @@ var _ v1a.APIServiceController = &APIServiceControllerMock{} // ListerFunc: func() v1a.APIServiceLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedAPIServiceController in code that requires APIServiceController @@ -232,12 +224,6 @@ type APIServiceControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.APIServiceLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type APIServiceControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *APIServiceControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *APIServiceControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("APIServiceControllerMock.StartFunc: method is nil but APIServiceController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockAPIServiceControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockAPIServiceControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedAPIServiceController.StartCalls()) -func (mock *APIServiceControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockAPIServiceControllerMockStart.RLock() - calls = mock.calls.Start - lockAPIServiceControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *APIServiceControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("APIServiceControllerMock.SyncFunc: method is nil but APIServiceController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockAPIServiceControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockAPIServiceControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedAPIServiceController.SyncCalls()) -func (mock *APIServiceControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockAPIServiceControllerMockSync.RLock() - calls = mock.calls.Sync - lockAPIServiceControllerMockSync.RUnlock() - return calls -} - var ( lockAPIServiceInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockAPIServiceInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.APIServiceInterface = &APIServiceInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.APIService, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.APIServiceList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.APIServiceList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.APIServiceList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.APIServiceList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type APIServiceInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.APIService, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.APIServiceList, error) + ListFunc func(opts v1b.ListOptions) (*v1.APIServiceList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.APIServiceList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.APIServiceList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *APIServiceInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *APIServiceInterfaceMock) List(opts v1b.ListOptions) (*v1a.APIServiceList, error) { +func (mock *APIServiceInterfaceMock) List(opts v1b.ListOptions) (*v1.APIServiceList, error) { if mock.ListFunc == nil { panic("APIServiceInterfaceMock.ListFunc: method is nil but APIServiceInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *APIServiceInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *APIServiceInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.APIServiceList, error) { +func (mock *APIServiceInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.APIServiceList, error) { if mock.ListNamespacedFunc == nil { panic("APIServiceInterfaceMock.ListNamespacedFunc: method is nil but APIServiceInterface.ListNamespaced was just called") } diff --git a/apis/apiregistration.k8s.io/v1/zz_generated_api_service_controller.go b/apis/apiregistration.k8s.io/v1/zz_generated_api_service_controller.go index 3f9a05a6..9ea806e8 100644 --- a/apis/apiregistration.k8s.io/v1/zz_generated_api_service_controller.go +++ b/apis/apiregistration.k8s.io/v1/zz_generated_api_service_controller.go @@ -49,12 +49,6 @@ func NewAPIService(namespace, name string, obj v1.APIService) *v1.APIService { return &obj } -type APIServiceList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.APIService `json:"items"` -} - type APIServiceHandlerFunc func(key string, obj *v1.APIService) (runtime.Object, error) type APIServiceChangeHandlerFunc func(obj *v1.APIService) (runtime.Object, error) @@ -74,8 +68,6 @@ type APIServiceController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler APIServiceHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type APIServiceInterface interface { @@ -86,8 +78,8 @@ type APIServiceInterface interface { Update(*v1.APIService) (*v1.APIService, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*APIServiceList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*APIServiceList, error) + List(opts metav1.ListOptions) (*v1.APIServiceList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.APIServiceList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() APIServiceController @@ -126,7 +118,7 @@ func (l *apiServiceLister) Get(namespace, name string) (*v1.APIService, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: APIServiceGroupVersionKind.Group, - Resource: "apiService", + Resource: APIServiceGroupVersionResource.Resource, }, key) } return obj.(*v1.APIService), nil @@ -206,29 +198,16 @@ func (c apiServiceFactory) Object() runtime.Object { } func (c apiServiceFactory) List() runtime.Object { - return &APIServiceList{} + return &v1.APIServiceList{} } func (s *apiServiceClient) Controller() APIServiceController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.apiServiceControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(APIServiceGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(APIServiceGroupVersionResource, APIServiceGroupVersionKind.Kind, false)) - c = &apiServiceController{ + return &apiServiceController{ GenericController: genericController, } - - s.client.apiServiceControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type apiServiceClient struct { @@ -262,6 +241,11 @@ func (s *apiServiceClient) Update(o *v1.APIService) (*v1.APIService, error) { return obj.(*v1.APIService), err } +func (s *apiServiceClient) UpdateStatus(o *v1.APIService) (*v1.APIService, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.APIService), err +} + func (s *apiServiceClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -270,14 +254,14 @@ func (s *apiServiceClient) DeleteNamespaced(namespace, name string, options *met return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *apiServiceClient) List(opts metav1.ListOptions) (*APIServiceList, error) { +func (s *apiServiceClient) List(opts metav1.ListOptions) (*v1.APIServiceList, error) { obj, err := s.objectClient.List(opts) - return obj.(*APIServiceList), err + return obj.(*v1.APIServiceList), err } -func (s *apiServiceClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*APIServiceList, error) { +func (s *apiServiceClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.APIServiceList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*APIServiceList), err + return obj.(*v1.APIServiceList), err } func (s *apiServiceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/apiregistration.k8s.io/v1/zz_generated_deepcopy.go b/apis/apiregistration.k8s.io/v1/zz_generated_deepcopy.go deleted file mode 100644 index 33b1f29f..00000000 --- a/apis/apiregistration.k8s.io/v1/zz_generated_deepcopy.go +++ /dev/null @@ -1,39 +0,0 @@ -package v1 - -import ( - runtime "k8s.io/apimachinery/pkg/runtime" - apiregistrationv1 "k8s.io/kube-aggregator/pkg/apis/apiregistration/v1" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *APIServiceList) DeepCopyInto(out *APIServiceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]apiregistrationv1.APIService, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIServiceList. -func (in *APIServiceList) DeepCopy() *APIServiceList { - if in == nil { - return nil - } - out := new(APIServiceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *APIServiceList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/apis/apiregistration.k8s.io/v1/zz_generated_k8s_client.go b/apis/apiregistration.k8s.io/v1/zz_generated_k8s_client.go index 078ef7ab..ec2ee8af 100644 --- a/apis/apiregistration.k8s.io/v1/zz_generated_k8s_client.go +++ b/apis/apiregistration.k8s.io/v1/zz_generated_k8s_client.go @@ -1,71 +1,34 @@ package v1 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" - "k8s.io/client-go/rest" -) - -type ( - contextKeyType struct{} - contextClientsKeyType struct{} ) type Interface interface { - RESTClient() rest.Interface - controller.Starter - APIServicesGetter } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - apiServiceControllers map[string]APIServiceController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer - } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) - if err != nil { - return nil, err - } - +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - apiServiceControllers: map[string]APIServiceController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type APIServicesGetter interface { APIServices(namespace string) APIServiceInterface } func (c *Client) APIServices(namespace string) APIServiceInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &APIServiceResource, APIServiceGroupVersionKind, apiServiceFactory{}) + sharedClient := c.clientFactory.ForResourceKind(APIServiceGroupVersionResource, APIServiceGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &APIServiceResource, APIServiceGroupVersionKind, apiServiceFactory{}) return &apiServiceClient{ ns: namespace, client: c, diff --git a/apis/apiregistration.k8s.io/v1/zz_generated_scheme.go b/apis/apiregistration.k8s.io/v1/zz_generated_scheme.go index f49665a9..6e0a0cca 100644 --- a/apis/apiregistration.k8s.io/v1/zz_generated_scheme.go +++ b/apis/apiregistration.k8s.io/v1/zz_generated_scheme.go @@ -1,8 +1,6 @@ package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -23,19 +21,3 @@ func Kind(kind string) schema.GroupKind { func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - // TODO this gets cleaned up when the types are fixed - scheme.AddKnownTypes(SchemeGroupVersion, - - &APIServiceList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/apis/apps/v1/fakes/zz_generated_daemon_set_mock.go b/apis/apps/v1/fakes/zz_generated_daemon_set_mock.go index d8672f2f..e7320aa8 100644 --- a/apis/apps/v1/fakes/zz_generated_daemon_set_mock.go +++ b/apis/apps/v1/fakes/zz_generated_daemon_set_mock.go @@ -151,8 +151,6 @@ var ( lockDaemonSetControllerMockGeneric sync.RWMutex lockDaemonSetControllerMockInformer sync.RWMutex lockDaemonSetControllerMockLister sync.RWMutex - lockDaemonSetControllerMockStart sync.RWMutex - lockDaemonSetControllerMockSync sync.RWMutex ) // Ensure, that DaemonSetControllerMock does implement DaemonSetController. @@ -192,12 +190,6 @@ var _ v1a.DaemonSetController = &DaemonSetControllerMock{} // ListerFunc: func() v1a.DaemonSetLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedDaemonSetController in code that requires DaemonSetController @@ -232,12 +224,6 @@ type DaemonSetControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.DaemonSetLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type DaemonSetControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *DaemonSetControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *DaemonSetControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("DaemonSetControllerMock.StartFunc: method is nil but DaemonSetController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockDaemonSetControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockDaemonSetControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedDaemonSetController.StartCalls()) -func (mock *DaemonSetControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockDaemonSetControllerMockStart.RLock() - calls = mock.calls.Start - lockDaemonSetControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *DaemonSetControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("DaemonSetControllerMock.SyncFunc: method is nil but DaemonSetController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockDaemonSetControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockDaemonSetControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedDaemonSetController.SyncCalls()) -func (mock *DaemonSetControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockDaemonSetControllerMockSync.RLock() - calls = mock.calls.Sync - lockDaemonSetControllerMockSync.RUnlock() - return calls -} - var ( lockDaemonSetInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockDaemonSetInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.DaemonSetInterface = &DaemonSetInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.DaemonSet, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.DaemonSetList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.DaemonSetList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.DaemonSetList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.DaemonSetList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type DaemonSetInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.DaemonSet, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.DaemonSetList, error) + ListFunc func(opts v1b.ListOptions) (*v1.DaemonSetList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.DaemonSetList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.DaemonSetList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *DaemonSetInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *DaemonSetInterfaceMock) List(opts v1b.ListOptions) (*v1a.DaemonSetList, error) { +func (mock *DaemonSetInterfaceMock) List(opts v1b.ListOptions) (*v1.DaemonSetList, error) { if mock.ListFunc == nil { panic("DaemonSetInterfaceMock.ListFunc: method is nil but DaemonSetInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *DaemonSetInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *DaemonSetInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.DaemonSetList, error) { +func (mock *DaemonSetInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.DaemonSetList, error) { if mock.ListNamespacedFunc == nil { panic("DaemonSetInterfaceMock.ListNamespacedFunc: method is nil but DaemonSetInterface.ListNamespaced was just called") } diff --git a/apis/apps/v1/fakes/zz_generated_deployment_mock.go b/apis/apps/v1/fakes/zz_generated_deployment_mock.go index d5c5b5d8..fb4814ea 100644 --- a/apis/apps/v1/fakes/zz_generated_deployment_mock.go +++ b/apis/apps/v1/fakes/zz_generated_deployment_mock.go @@ -151,8 +151,6 @@ var ( lockDeploymentControllerMockGeneric sync.RWMutex lockDeploymentControllerMockInformer sync.RWMutex lockDeploymentControllerMockLister sync.RWMutex - lockDeploymentControllerMockStart sync.RWMutex - lockDeploymentControllerMockSync sync.RWMutex ) // Ensure, that DeploymentControllerMock does implement DeploymentController. @@ -192,12 +190,6 @@ var _ v1a.DeploymentController = &DeploymentControllerMock{} // ListerFunc: func() v1a.DeploymentLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedDeploymentController in code that requires DeploymentController @@ -232,12 +224,6 @@ type DeploymentControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.DeploymentLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type DeploymentControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *DeploymentControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *DeploymentControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("DeploymentControllerMock.StartFunc: method is nil but DeploymentController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockDeploymentControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockDeploymentControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedDeploymentController.StartCalls()) -func (mock *DeploymentControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockDeploymentControllerMockStart.RLock() - calls = mock.calls.Start - lockDeploymentControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *DeploymentControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("DeploymentControllerMock.SyncFunc: method is nil but DeploymentController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockDeploymentControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockDeploymentControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedDeploymentController.SyncCalls()) -func (mock *DeploymentControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockDeploymentControllerMockSync.RLock() - calls = mock.calls.Sync - lockDeploymentControllerMockSync.RUnlock() - return calls -} - var ( lockDeploymentInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockDeploymentInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.DeploymentInterface = &DeploymentInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Deployment, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.DeploymentList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.DeploymentList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.DeploymentList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.DeploymentList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type DeploymentInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Deployment, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.DeploymentList, error) + ListFunc func(opts v1b.ListOptions) (*v1.DeploymentList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.DeploymentList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.DeploymentList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *DeploymentInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *DeploymentInterfaceMock) List(opts v1b.ListOptions) (*v1a.DeploymentList, error) { +func (mock *DeploymentInterfaceMock) List(opts v1b.ListOptions) (*v1.DeploymentList, error) { if mock.ListFunc == nil { panic("DeploymentInterfaceMock.ListFunc: method is nil but DeploymentInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *DeploymentInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *DeploymentInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.DeploymentList, error) { +func (mock *DeploymentInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.DeploymentList, error) { if mock.ListNamespacedFunc == nil { panic("DeploymentInterfaceMock.ListNamespacedFunc: method is nil but DeploymentInterface.ListNamespaced was just called") } diff --git a/apis/apps/v1/fakes/zz_generated_replica_set_mock.go b/apis/apps/v1/fakes/zz_generated_replica_set_mock.go index 04b6932c..1ee770b9 100644 --- a/apis/apps/v1/fakes/zz_generated_replica_set_mock.go +++ b/apis/apps/v1/fakes/zz_generated_replica_set_mock.go @@ -151,8 +151,6 @@ var ( lockReplicaSetControllerMockGeneric sync.RWMutex lockReplicaSetControllerMockInformer sync.RWMutex lockReplicaSetControllerMockLister sync.RWMutex - lockReplicaSetControllerMockStart sync.RWMutex - lockReplicaSetControllerMockSync sync.RWMutex ) // Ensure, that ReplicaSetControllerMock does implement ReplicaSetController. @@ -192,12 +190,6 @@ var _ v1a.ReplicaSetController = &ReplicaSetControllerMock{} // ListerFunc: func() v1a.ReplicaSetLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedReplicaSetController in code that requires ReplicaSetController @@ -232,12 +224,6 @@ type ReplicaSetControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.ReplicaSetLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type ReplicaSetControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *ReplicaSetControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ReplicaSetControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ReplicaSetControllerMock.StartFunc: method is nil but ReplicaSetController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockReplicaSetControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockReplicaSetControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedReplicaSetController.StartCalls()) -func (mock *ReplicaSetControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockReplicaSetControllerMockStart.RLock() - calls = mock.calls.Start - lockReplicaSetControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ReplicaSetControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ReplicaSetControllerMock.SyncFunc: method is nil but ReplicaSetController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockReplicaSetControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockReplicaSetControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedReplicaSetController.SyncCalls()) -func (mock *ReplicaSetControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockReplicaSetControllerMockSync.RLock() - calls = mock.calls.Sync - lockReplicaSetControllerMockSync.RUnlock() - return calls -} - var ( lockReplicaSetInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockReplicaSetInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.ReplicaSetInterface = &ReplicaSetInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ReplicaSet, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.ReplicaSetList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.ReplicaSetList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ReplicaSetList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ReplicaSetList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type ReplicaSetInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ReplicaSet, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.ReplicaSetList, error) + ListFunc func(opts v1b.ListOptions) (*v1.ReplicaSetList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ReplicaSetList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ReplicaSetList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *ReplicaSetInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *ReplicaSetInterfaceMock) List(opts v1b.ListOptions) (*v1a.ReplicaSetList, error) { +func (mock *ReplicaSetInterfaceMock) List(opts v1b.ListOptions) (*v1.ReplicaSetList, error) { if mock.ListFunc == nil { panic("ReplicaSetInterfaceMock.ListFunc: method is nil but ReplicaSetInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *ReplicaSetInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *ReplicaSetInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ReplicaSetList, error) { +func (mock *ReplicaSetInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ReplicaSetList, error) { if mock.ListNamespacedFunc == nil { panic("ReplicaSetInterfaceMock.ListNamespacedFunc: method is nil but ReplicaSetInterface.ListNamespaced was just called") } diff --git a/apis/apps/v1/fakes/zz_generated_stateful_set_mock.go b/apis/apps/v1/fakes/zz_generated_stateful_set_mock.go index 5822f1f7..c391f671 100644 --- a/apis/apps/v1/fakes/zz_generated_stateful_set_mock.go +++ b/apis/apps/v1/fakes/zz_generated_stateful_set_mock.go @@ -151,8 +151,6 @@ var ( lockStatefulSetControllerMockGeneric sync.RWMutex lockStatefulSetControllerMockInformer sync.RWMutex lockStatefulSetControllerMockLister sync.RWMutex - lockStatefulSetControllerMockStart sync.RWMutex - lockStatefulSetControllerMockSync sync.RWMutex ) // Ensure, that StatefulSetControllerMock does implement StatefulSetController. @@ -192,12 +190,6 @@ var _ v1a.StatefulSetController = &StatefulSetControllerMock{} // ListerFunc: func() v1a.StatefulSetLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedStatefulSetController in code that requires StatefulSetController @@ -232,12 +224,6 @@ type StatefulSetControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.StatefulSetLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type StatefulSetControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *StatefulSetControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *StatefulSetControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("StatefulSetControllerMock.StartFunc: method is nil but StatefulSetController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockStatefulSetControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockStatefulSetControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedStatefulSetController.StartCalls()) -func (mock *StatefulSetControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockStatefulSetControllerMockStart.RLock() - calls = mock.calls.Start - lockStatefulSetControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *StatefulSetControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("StatefulSetControllerMock.SyncFunc: method is nil but StatefulSetController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockStatefulSetControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockStatefulSetControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedStatefulSetController.SyncCalls()) -func (mock *StatefulSetControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockStatefulSetControllerMockSync.RLock() - calls = mock.calls.Sync - lockStatefulSetControllerMockSync.RUnlock() - return calls -} - var ( lockStatefulSetInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockStatefulSetInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.StatefulSetInterface = &StatefulSetInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.StatefulSet, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.StatefulSetList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.StatefulSetList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.StatefulSetList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.StatefulSetList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type StatefulSetInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.StatefulSet, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.StatefulSetList, error) + ListFunc func(opts v1b.ListOptions) (*v1.StatefulSetList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.StatefulSetList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.StatefulSetList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *StatefulSetInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *StatefulSetInterfaceMock) List(opts v1b.ListOptions) (*v1a.StatefulSetList, error) { +func (mock *StatefulSetInterfaceMock) List(opts v1b.ListOptions) (*v1.StatefulSetList, error) { if mock.ListFunc == nil { panic("StatefulSetInterfaceMock.ListFunc: method is nil but StatefulSetInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *StatefulSetInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *StatefulSetInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.StatefulSetList, error) { +func (mock *StatefulSetInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.StatefulSetList, error) { if mock.ListNamespacedFunc == nil { panic("StatefulSetInterfaceMock.ListNamespacedFunc: method is nil but StatefulSetInterface.ListNamespaced was just called") } diff --git a/apis/apps/v1/zz_generated_daemon_set_controller.go b/apis/apps/v1/zz_generated_daemon_set_controller.go index 733e1088..68f1e9fa 100644 --- a/apis/apps/v1/zz_generated_daemon_set_controller.go +++ b/apis/apps/v1/zz_generated_daemon_set_controller.go @@ -50,12 +50,6 @@ func NewDaemonSet(namespace, name string, obj v1.DaemonSet) *v1.DaemonSet { return &obj } -type DaemonSetList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.DaemonSet `json:"items"` -} - type DaemonSetHandlerFunc func(key string, obj *v1.DaemonSet) (runtime.Object, error) type DaemonSetChangeHandlerFunc func(obj *v1.DaemonSet) (runtime.Object, error) @@ -75,8 +69,6 @@ type DaemonSetController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler DaemonSetHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type DaemonSetInterface interface { @@ -87,8 +79,8 @@ type DaemonSetInterface interface { Update(*v1.DaemonSet) (*v1.DaemonSet, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*DaemonSetList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*DaemonSetList, error) + List(opts metav1.ListOptions) (*v1.DaemonSetList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.DaemonSetList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() DaemonSetController @@ -127,7 +119,7 @@ func (l *daemonSetLister) Get(namespace, name string) (*v1.DaemonSet, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: DaemonSetGroupVersionKind.Group, - Resource: "daemonSet", + Resource: DaemonSetGroupVersionResource.Resource, }, key) } return obj.(*v1.DaemonSet), nil @@ -207,29 +199,16 @@ func (c daemonSetFactory) Object() runtime.Object { } func (c daemonSetFactory) List() runtime.Object { - return &DaemonSetList{} + return &v1.DaemonSetList{} } func (s *daemonSetClient) Controller() DaemonSetController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.daemonSetControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(DaemonSetGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(DaemonSetGroupVersionResource, DaemonSetGroupVersionKind.Kind, true)) - c = &daemonSetController{ + return &daemonSetController{ GenericController: genericController, } - - s.client.daemonSetControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type daemonSetClient struct { @@ -263,6 +242,11 @@ func (s *daemonSetClient) Update(o *v1.DaemonSet) (*v1.DaemonSet, error) { return obj.(*v1.DaemonSet), err } +func (s *daemonSetClient) UpdateStatus(o *v1.DaemonSet) (*v1.DaemonSet, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.DaemonSet), err +} + func (s *daemonSetClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *daemonSetClient) DeleteNamespaced(namespace, name string, options *meta return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *daemonSetClient) List(opts metav1.ListOptions) (*DaemonSetList, error) { +func (s *daemonSetClient) List(opts metav1.ListOptions) (*v1.DaemonSetList, error) { obj, err := s.objectClient.List(opts) - return obj.(*DaemonSetList), err + return obj.(*v1.DaemonSetList), err } -func (s *daemonSetClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*DaemonSetList, error) { +func (s *daemonSetClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.DaemonSetList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*DaemonSetList), err + return obj.(*v1.DaemonSetList), err } func (s *daemonSetClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/apps/v1/zz_generated_deepcopy.go b/apis/apps/v1/zz_generated_deepcopy.go deleted file mode 100644 index 972e7fc6..00000000 --- a/apis/apps/v1/zz_generated_deepcopy.go +++ /dev/null @@ -1,138 +0,0 @@ -package v1 - -import ( - appsv1 "k8s.io/api/apps/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DaemonSetList) DeepCopyInto(out *DaemonSetList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]appsv1.DaemonSet, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DaemonSetList. -func (in *DaemonSetList) DeepCopy() *DaemonSetList { - if in == nil { - return nil - } - out := new(DaemonSetList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DaemonSetList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DeploymentList) DeepCopyInto(out *DeploymentList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]appsv1.Deployment, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentList. -func (in *DeploymentList) DeepCopy() *DeploymentList { - if in == nil { - return nil - } - out := new(DeploymentList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DeploymentList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ReplicaSetList) DeepCopyInto(out *ReplicaSetList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]appsv1.ReplicaSet, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicaSetList. -func (in *ReplicaSetList) DeepCopy() *ReplicaSetList { - if in == nil { - return nil - } - out := new(ReplicaSetList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ReplicaSetList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StatefulSetList) DeepCopyInto(out *StatefulSetList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]appsv1.StatefulSet, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulSetList. -func (in *StatefulSetList) DeepCopy() *StatefulSetList { - if in == nil { - return nil - } - out := new(StatefulSetList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *StatefulSetList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/apis/apps/v1/zz_generated_deployment_controller.go b/apis/apps/v1/zz_generated_deployment_controller.go index dbb97393..43b66d47 100644 --- a/apis/apps/v1/zz_generated_deployment_controller.go +++ b/apis/apps/v1/zz_generated_deployment_controller.go @@ -50,12 +50,6 @@ func NewDeployment(namespace, name string, obj v1.Deployment) *v1.Deployment { return &obj } -type DeploymentList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Deployment `json:"items"` -} - type DeploymentHandlerFunc func(key string, obj *v1.Deployment) (runtime.Object, error) type DeploymentChangeHandlerFunc func(obj *v1.Deployment) (runtime.Object, error) @@ -75,8 +69,6 @@ type DeploymentController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler DeploymentHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type DeploymentInterface interface { @@ -87,8 +79,8 @@ type DeploymentInterface interface { Update(*v1.Deployment) (*v1.Deployment, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*DeploymentList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*DeploymentList, error) + List(opts metav1.ListOptions) (*v1.DeploymentList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.DeploymentList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() DeploymentController @@ -127,7 +119,7 @@ func (l *deploymentLister) Get(namespace, name string) (*v1.Deployment, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: DeploymentGroupVersionKind.Group, - Resource: "deployment", + Resource: DeploymentGroupVersionResource.Resource, }, key) } return obj.(*v1.Deployment), nil @@ -207,29 +199,16 @@ func (c deploymentFactory) Object() runtime.Object { } func (c deploymentFactory) List() runtime.Object { - return &DeploymentList{} + return &v1.DeploymentList{} } func (s *deploymentClient) Controller() DeploymentController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.deploymentControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(DeploymentGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(DeploymentGroupVersionResource, DeploymentGroupVersionKind.Kind, true)) - c = &deploymentController{ + return &deploymentController{ GenericController: genericController, } - - s.client.deploymentControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type deploymentClient struct { @@ -263,6 +242,11 @@ func (s *deploymentClient) Update(o *v1.Deployment) (*v1.Deployment, error) { return obj.(*v1.Deployment), err } +func (s *deploymentClient) UpdateStatus(o *v1.Deployment) (*v1.Deployment, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.Deployment), err +} + func (s *deploymentClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *deploymentClient) DeleteNamespaced(namespace, name string, options *met return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *deploymentClient) List(opts metav1.ListOptions) (*DeploymentList, error) { +func (s *deploymentClient) List(opts metav1.ListOptions) (*v1.DeploymentList, error) { obj, err := s.objectClient.List(opts) - return obj.(*DeploymentList), err + return obj.(*v1.DeploymentList), err } -func (s *deploymentClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*DeploymentList, error) { +func (s *deploymentClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.DeploymentList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*DeploymentList), err + return obj.(*v1.DeploymentList), err } func (s *deploymentClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/apps/v1/zz_generated_k8s_client.go b/apis/apps/v1/zz_generated_k8s_client.go index ec472f54..f7f1e194 100644 --- a/apis/apps/v1/zz_generated_k8s_client.go +++ b/apis/apps/v1/zz_generated_k8s_client.go @@ -1,25 +1,12 @@ package v1 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" - "k8s.io/client-go/rest" -) - -type ( - contextKeyType struct{} - contextClientsKeyType struct{} ) type Interface interface { - RESTClient() rest.Interface - controller.Starter - DeploymentsGetter DaemonSetsGetter StatefulSetsGetter @@ -27,54 +14,24 @@ type Interface interface { } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - deploymentControllers map[string]DeploymentController - daemonSetControllers map[string]DaemonSetController - statefulSetControllers map[string]StatefulSetController - replicaSetControllers map[string]ReplicaSetController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer - } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) - if err != nil { - return nil, err - } - +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - deploymentControllers: map[string]DeploymentController{}, - daemonSetControllers: map[string]DaemonSetController{}, - statefulSetControllers: map[string]StatefulSetController{}, - replicaSetControllers: map[string]ReplicaSetController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type DeploymentsGetter interface { Deployments(namespace string) DeploymentInterface } func (c *Client) Deployments(namespace string) DeploymentInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &DeploymentResource, DeploymentGroupVersionKind, deploymentFactory{}) + sharedClient := c.clientFactory.ForResourceKind(DeploymentGroupVersionResource, DeploymentGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &DeploymentResource, DeploymentGroupVersionKind, deploymentFactory{}) return &deploymentClient{ ns: namespace, client: c, @@ -87,7 +44,8 @@ type DaemonSetsGetter interface { } func (c *Client) DaemonSets(namespace string) DaemonSetInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &DaemonSetResource, DaemonSetGroupVersionKind, daemonSetFactory{}) + sharedClient := c.clientFactory.ForResourceKind(DaemonSetGroupVersionResource, DaemonSetGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &DaemonSetResource, DaemonSetGroupVersionKind, daemonSetFactory{}) return &daemonSetClient{ ns: namespace, client: c, @@ -100,7 +58,8 @@ type StatefulSetsGetter interface { } func (c *Client) StatefulSets(namespace string) StatefulSetInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &StatefulSetResource, StatefulSetGroupVersionKind, statefulSetFactory{}) + sharedClient := c.clientFactory.ForResourceKind(StatefulSetGroupVersionResource, StatefulSetGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &StatefulSetResource, StatefulSetGroupVersionKind, statefulSetFactory{}) return &statefulSetClient{ ns: namespace, client: c, @@ -113,7 +72,8 @@ type ReplicaSetsGetter interface { } func (c *Client) ReplicaSets(namespace string) ReplicaSetInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ReplicaSetResource, ReplicaSetGroupVersionKind, replicaSetFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ReplicaSetGroupVersionResource, ReplicaSetGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ReplicaSetResource, ReplicaSetGroupVersionKind, replicaSetFactory{}) return &replicaSetClient{ ns: namespace, client: c, diff --git a/apis/apps/v1/zz_generated_replica_set_controller.go b/apis/apps/v1/zz_generated_replica_set_controller.go index d3bf5b3a..6a5ffa3c 100644 --- a/apis/apps/v1/zz_generated_replica_set_controller.go +++ b/apis/apps/v1/zz_generated_replica_set_controller.go @@ -50,12 +50,6 @@ func NewReplicaSet(namespace, name string, obj v1.ReplicaSet) *v1.ReplicaSet { return &obj } -type ReplicaSetList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ReplicaSet `json:"items"` -} - type ReplicaSetHandlerFunc func(key string, obj *v1.ReplicaSet) (runtime.Object, error) type ReplicaSetChangeHandlerFunc func(obj *v1.ReplicaSet) (runtime.Object, error) @@ -75,8 +69,6 @@ type ReplicaSetController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ReplicaSetHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ReplicaSetInterface interface { @@ -87,8 +79,8 @@ type ReplicaSetInterface interface { Update(*v1.ReplicaSet) (*v1.ReplicaSet, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*ReplicaSetList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*ReplicaSetList, error) + List(opts metav1.ListOptions) (*v1.ReplicaSetList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ReplicaSetList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() ReplicaSetController @@ -127,7 +119,7 @@ func (l *replicaSetLister) Get(namespace, name string) (*v1.ReplicaSet, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ReplicaSetGroupVersionKind.Group, - Resource: "replicaSet", + Resource: ReplicaSetGroupVersionResource.Resource, }, key) } return obj.(*v1.ReplicaSet), nil @@ -207,29 +199,16 @@ func (c replicaSetFactory) Object() runtime.Object { } func (c replicaSetFactory) List() runtime.Object { - return &ReplicaSetList{} + return &v1.ReplicaSetList{} } func (s *replicaSetClient) Controller() ReplicaSetController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.replicaSetControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ReplicaSetGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ReplicaSetGroupVersionResource, ReplicaSetGroupVersionKind.Kind, true)) - c = &replicaSetController{ + return &replicaSetController{ GenericController: genericController, } - - s.client.replicaSetControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type replicaSetClient struct { @@ -263,6 +242,11 @@ func (s *replicaSetClient) Update(o *v1.ReplicaSet) (*v1.ReplicaSet, error) { return obj.(*v1.ReplicaSet), err } +func (s *replicaSetClient) UpdateStatus(o *v1.ReplicaSet) (*v1.ReplicaSet, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.ReplicaSet), err +} + func (s *replicaSetClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *replicaSetClient) DeleteNamespaced(namespace, name string, options *met return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *replicaSetClient) List(opts metav1.ListOptions) (*ReplicaSetList, error) { +func (s *replicaSetClient) List(opts metav1.ListOptions) (*v1.ReplicaSetList, error) { obj, err := s.objectClient.List(opts) - return obj.(*ReplicaSetList), err + return obj.(*v1.ReplicaSetList), err } -func (s *replicaSetClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ReplicaSetList, error) { +func (s *replicaSetClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ReplicaSetList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*ReplicaSetList), err + return obj.(*v1.ReplicaSetList), err } func (s *replicaSetClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/apps/v1/zz_generated_scheme.go b/apis/apps/v1/zz_generated_scheme.go index 1ea03aeb..30e1deb8 100644 --- a/apis/apps/v1/zz_generated_scheme.go +++ b/apis/apps/v1/zz_generated_scheme.go @@ -1,8 +1,6 @@ package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -23,22 +21,3 @@ func Kind(kind string) schema.GroupKind { func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - // TODO this gets cleaned up when the types are fixed - scheme.AddKnownTypes(SchemeGroupVersion, - - &DeploymentList{}, - &DaemonSetList{}, - &StatefulSetList{}, - &ReplicaSetList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/apis/apps/v1/zz_generated_stateful_set_controller.go b/apis/apps/v1/zz_generated_stateful_set_controller.go index 0cf80682..cf2a7079 100644 --- a/apis/apps/v1/zz_generated_stateful_set_controller.go +++ b/apis/apps/v1/zz_generated_stateful_set_controller.go @@ -50,12 +50,6 @@ func NewStatefulSet(namespace, name string, obj v1.StatefulSet) *v1.StatefulSet return &obj } -type StatefulSetList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.StatefulSet `json:"items"` -} - type StatefulSetHandlerFunc func(key string, obj *v1.StatefulSet) (runtime.Object, error) type StatefulSetChangeHandlerFunc func(obj *v1.StatefulSet) (runtime.Object, error) @@ -75,8 +69,6 @@ type StatefulSetController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler StatefulSetHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type StatefulSetInterface interface { @@ -87,8 +79,8 @@ type StatefulSetInterface interface { Update(*v1.StatefulSet) (*v1.StatefulSet, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*StatefulSetList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*StatefulSetList, error) + List(opts metav1.ListOptions) (*v1.StatefulSetList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.StatefulSetList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() StatefulSetController @@ -127,7 +119,7 @@ func (l *statefulSetLister) Get(namespace, name string) (*v1.StatefulSet, error) if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: StatefulSetGroupVersionKind.Group, - Resource: "statefulSet", + Resource: StatefulSetGroupVersionResource.Resource, }, key) } return obj.(*v1.StatefulSet), nil @@ -207,29 +199,16 @@ func (c statefulSetFactory) Object() runtime.Object { } func (c statefulSetFactory) List() runtime.Object { - return &StatefulSetList{} + return &v1.StatefulSetList{} } func (s *statefulSetClient) Controller() StatefulSetController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.statefulSetControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(StatefulSetGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(StatefulSetGroupVersionResource, StatefulSetGroupVersionKind.Kind, true)) - c = &statefulSetController{ + return &statefulSetController{ GenericController: genericController, } - - s.client.statefulSetControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type statefulSetClient struct { @@ -263,6 +242,11 @@ func (s *statefulSetClient) Update(o *v1.StatefulSet) (*v1.StatefulSet, error) { return obj.(*v1.StatefulSet), err } +func (s *statefulSetClient) UpdateStatus(o *v1.StatefulSet) (*v1.StatefulSet, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.StatefulSet), err +} + func (s *statefulSetClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *statefulSetClient) DeleteNamespaced(namespace, name string, options *me return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *statefulSetClient) List(opts metav1.ListOptions) (*StatefulSetList, error) { +func (s *statefulSetClient) List(opts metav1.ListOptions) (*v1.StatefulSetList, error) { obj, err := s.objectClient.List(opts) - return obj.(*StatefulSetList), err + return obj.(*v1.StatefulSetList), err } -func (s *statefulSetClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*StatefulSetList, error) { +func (s *statefulSetClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.StatefulSetList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*StatefulSetList), err + return obj.(*v1.StatefulSetList), err } func (s *statefulSetClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/autoscaling/v2beta2/fakes/zz_generated_horizontal_pod_autoscaler_mock.go b/apis/autoscaling/v2beta2/fakes/zz_generated_horizontal_pod_autoscaler_mock.go index 01b57c06..d9050cd6 100644 --- a/apis/autoscaling/v2beta2/fakes/zz_generated_horizontal_pod_autoscaler_mock.go +++ b/apis/autoscaling/v2beta2/fakes/zz_generated_horizontal_pod_autoscaler_mock.go @@ -151,8 +151,6 @@ var ( lockHorizontalPodAutoscalerControllerMockGeneric sync.RWMutex lockHorizontalPodAutoscalerControllerMockInformer sync.RWMutex lockHorizontalPodAutoscalerControllerMockLister sync.RWMutex - lockHorizontalPodAutoscalerControllerMockStart sync.RWMutex - lockHorizontalPodAutoscalerControllerMockSync sync.RWMutex ) // Ensure, that HorizontalPodAutoscalerControllerMock does implement HorizontalPodAutoscalerController. @@ -192,12 +190,6 @@ var _ v2beta2a.HorizontalPodAutoscalerController = &HorizontalPodAutoscalerContr // ListerFunc: func() v2beta2a.HorizontalPodAutoscalerLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedHorizontalPodAutoscalerController in code that requires HorizontalPodAutoscalerController @@ -232,12 +224,6 @@ type HorizontalPodAutoscalerControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v2beta2a.HorizontalPodAutoscalerLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type HorizontalPodAutoscalerControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *HorizontalPodAutoscalerControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *HorizontalPodAutoscalerControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("HorizontalPodAutoscalerControllerMock.StartFunc: method is nil but HorizontalPodAutoscalerController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockHorizontalPodAutoscalerControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockHorizontalPodAutoscalerControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedHorizontalPodAutoscalerController.StartCalls()) -func (mock *HorizontalPodAutoscalerControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockHorizontalPodAutoscalerControllerMockStart.RLock() - calls = mock.calls.Start - lockHorizontalPodAutoscalerControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *HorizontalPodAutoscalerControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("HorizontalPodAutoscalerControllerMock.SyncFunc: method is nil but HorizontalPodAutoscalerController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockHorizontalPodAutoscalerControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockHorizontalPodAutoscalerControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedHorizontalPodAutoscalerController.SyncCalls()) -func (mock *HorizontalPodAutoscalerControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockHorizontalPodAutoscalerControllerMockSync.RLock() - calls = mock.calls.Sync - lockHorizontalPodAutoscalerControllerMockSync.RUnlock() - return calls -} - var ( lockHorizontalPodAutoscalerInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockHorizontalPodAutoscalerInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v2beta2a.HorizontalPodAutoscalerInterface = &HorizontalPodAutoscalerInterf // GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v2beta2.HorizontalPodAutoscaler, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1.ListOptions) (*v2beta2a.HorizontalPodAutoscalerList, error) { +// ListFunc: func(opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v2beta2a.HorizontalPodAutoscalerList, error) { +// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type HorizontalPodAutoscalerInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v2beta2.HorizontalPodAutoscaler, error) // ListFunc mocks the List method. - ListFunc func(opts v1.ListOptions) (*v2beta2a.HorizontalPodAutoscalerList, error) + ListFunc func(opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v2beta2a.HorizontalPodAutoscalerList, error) + ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *HorizontalPodAutoscalerInterfaceMock) GetNamespacedCalls() []struct } // List calls ListFunc. -func (mock *HorizontalPodAutoscalerInterfaceMock) List(opts v1.ListOptions) (*v2beta2a.HorizontalPodAutoscalerList, error) { +func (mock *HorizontalPodAutoscalerInterfaceMock) List(opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) { if mock.ListFunc == nil { panic("HorizontalPodAutoscalerInterfaceMock.ListFunc: method is nil but HorizontalPodAutoscalerInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *HorizontalPodAutoscalerInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *HorizontalPodAutoscalerInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v2beta2a.HorizontalPodAutoscalerList, error) { +func (mock *HorizontalPodAutoscalerInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) { if mock.ListNamespacedFunc == nil { panic("HorizontalPodAutoscalerInterfaceMock.ListNamespacedFunc: method is nil but HorizontalPodAutoscalerInterface.ListNamespaced was just called") } diff --git a/apis/autoscaling/v2beta2/zz_generated_deepcopy.go b/apis/autoscaling/v2beta2/zz_generated_deepcopy.go deleted file mode 100644 index 7d687bd7..00000000 --- a/apis/autoscaling/v2beta2/zz_generated_deepcopy.go +++ /dev/null @@ -1,39 +0,0 @@ -package v2beta2 - -import ( - autoscalingv2beta2 "k8s.io/api/autoscaling/v2beta2" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *HorizontalPodAutoscalerList) DeepCopyInto(out *HorizontalPodAutoscalerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]autoscalingv2beta2.HorizontalPodAutoscaler, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HorizontalPodAutoscalerList. -func (in *HorizontalPodAutoscalerList) DeepCopy() *HorizontalPodAutoscalerList { - if in == nil { - return nil - } - out := new(HorizontalPodAutoscalerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *HorizontalPodAutoscalerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/apis/autoscaling/v2beta2/zz_generated_horizontal_pod_autoscaler_controller.go b/apis/autoscaling/v2beta2/zz_generated_horizontal_pod_autoscaler_controller.go index f3ff95dc..fcc7e3d4 100644 --- a/apis/autoscaling/v2beta2/zz_generated_horizontal_pod_autoscaler_controller.go +++ b/apis/autoscaling/v2beta2/zz_generated_horizontal_pod_autoscaler_controller.go @@ -50,12 +50,6 @@ func NewHorizontalPodAutoscaler(namespace, name string, obj v2beta2.HorizontalPo return &obj } -type HorizontalPodAutoscalerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v2beta2.HorizontalPodAutoscaler `json:"items"` -} - type HorizontalPodAutoscalerHandlerFunc func(key string, obj *v2beta2.HorizontalPodAutoscaler) (runtime.Object, error) type HorizontalPodAutoscalerChangeHandlerFunc func(obj *v2beta2.HorizontalPodAutoscaler) (runtime.Object, error) @@ -75,8 +69,6 @@ type HorizontalPodAutoscalerController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler HorizontalPodAutoscalerHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type HorizontalPodAutoscalerInterface interface { @@ -87,8 +79,8 @@ type HorizontalPodAutoscalerInterface interface { Update(*v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*HorizontalPodAutoscalerList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*HorizontalPodAutoscalerList, error) + List(opts metav1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() HorizontalPodAutoscalerController @@ -127,7 +119,7 @@ func (l *horizontalPodAutoscalerLister) Get(namespace, name string) (*v2beta2.Ho if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: HorizontalPodAutoscalerGroupVersionKind.Group, - Resource: "horizontalPodAutoscaler", + Resource: HorizontalPodAutoscalerGroupVersionResource.Resource, }, key) } return obj.(*v2beta2.HorizontalPodAutoscaler), nil @@ -207,29 +199,16 @@ func (c horizontalPodAutoscalerFactory) Object() runtime.Object { } func (c horizontalPodAutoscalerFactory) List() runtime.Object { - return &HorizontalPodAutoscalerList{} + return &v2beta2.HorizontalPodAutoscalerList{} } func (s *horizontalPodAutoscalerClient) Controller() HorizontalPodAutoscalerController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.horizontalPodAutoscalerControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(HorizontalPodAutoscalerGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(HorizontalPodAutoscalerGroupVersionResource, HorizontalPodAutoscalerGroupVersionKind.Kind, true)) - c = &horizontalPodAutoscalerController{ + return &horizontalPodAutoscalerController{ GenericController: genericController, } - - s.client.horizontalPodAutoscalerControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type horizontalPodAutoscalerClient struct { @@ -263,6 +242,11 @@ func (s *horizontalPodAutoscalerClient) Update(o *v2beta2.HorizontalPodAutoscale return obj.(*v2beta2.HorizontalPodAutoscaler), err } +func (s *horizontalPodAutoscalerClient) UpdateStatus(o *v2beta2.HorizontalPodAutoscaler) (*v2beta2.HorizontalPodAutoscaler, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v2beta2.HorizontalPodAutoscaler), err +} + func (s *horizontalPodAutoscalerClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *horizontalPodAutoscalerClient) DeleteNamespaced(namespace, name string, return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *horizontalPodAutoscalerClient) List(opts metav1.ListOptions) (*HorizontalPodAutoscalerList, error) { +func (s *horizontalPodAutoscalerClient) List(opts metav1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) { obj, err := s.objectClient.List(opts) - return obj.(*HorizontalPodAutoscalerList), err + return obj.(*v2beta2.HorizontalPodAutoscalerList), err } -func (s *horizontalPodAutoscalerClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*HorizontalPodAutoscalerList, error) { +func (s *horizontalPodAutoscalerClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v2beta2.HorizontalPodAutoscalerList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*HorizontalPodAutoscalerList), err + return obj.(*v2beta2.HorizontalPodAutoscalerList), err } func (s *horizontalPodAutoscalerClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/autoscaling/v2beta2/zz_generated_k8s_client.go b/apis/autoscaling/v2beta2/zz_generated_k8s_client.go index ad47581b..aa3d341e 100644 --- a/apis/autoscaling/v2beta2/zz_generated_k8s_client.go +++ b/apis/autoscaling/v2beta2/zz_generated_k8s_client.go @@ -1,71 +1,34 @@ package v2beta2 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" - "k8s.io/client-go/rest" -) - -type ( - contextKeyType struct{} - contextClientsKeyType struct{} ) type Interface interface { - RESTClient() rest.Interface - controller.Starter - HorizontalPodAutoscalersGetter } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - horizontalPodAutoscalerControllers map[string]HorizontalPodAutoscalerController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer - } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) - if err != nil { - return nil, err - } - +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - horizontalPodAutoscalerControllers: map[string]HorizontalPodAutoscalerController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type HorizontalPodAutoscalersGetter interface { HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface } func (c *Client) HorizontalPodAutoscalers(namespace string) HorizontalPodAutoscalerInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &HorizontalPodAutoscalerResource, HorizontalPodAutoscalerGroupVersionKind, horizontalPodAutoscalerFactory{}) + sharedClient := c.clientFactory.ForResourceKind(HorizontalPodAutoscalerGroupVersionResource, HorizontalPodAutoscalerGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &HorizontalPodAutoscalerResource, HorizontalPodAutoscalerGroupVersionKind, horizontalPodAutoscalerFactory{}) return &horizontalPodAutoscalerClient{ ns: namespace, client: c, diff --git a/apis/autoscaling/v2beta2/zz_generated_scheme.go b/apis/autoscaling/v2beta2/zz_generated_scheme.go index d716e23e..6925c6ff 100644 --- a/apis/autoscaling/v2beta2/zz_generated_scheme.go +++ b/apis/autoscaling/v2beta2/zz_generated_scheme.go @@ -1,8 +1,6 @@ package v2beta2 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -23,19 +21,3 @@ func Kind(kind string) schema.GroupKind { func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - // TODO this gets cleaned up when the types are fixed - scheme.AddKnownTypes(SchemeGroupVersion, - - &HorizontalPodAutoscalerList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/apis/batch/v1/fakes/zz_generated_job_mock.go b/apis/batch/v1/fakes/zz_generated_job_mock.go index 3eb061a4..f2411c64 100644 --- a/apis/batch/v1/fakes/zz_generated_job_mock.go +++ b/apis/batch/v1/fakes/zz_generated_job_mock.go @@ -151,8 +151,6 @@ var ( lockJobControllerMockGeneric sync.RWMutex lockJobControllerMockInformer sync.RWMutex lockJobControllerMockLister sync.RWMutex - lockJobControllerMockStart sync.RWMutex - lockJobControllerMockSync sync.RWMutex ) // Ensure, that JobControllerMock does implement JobController. @@ -192,12 +190,6 @@ var _ v1a.JobController = &JobControllerMock{} // ListerFunc: func() v1a.JobLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedJobController in code that requires JobController @@ -232,12 +224,6 @@ type JobControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.JobLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type JobControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *JobControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *JobControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("JobControllerMock.StartFunc: method is nil but JobController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockJobControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockJobControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedJobController.StartCalls()) -func (mock *JobControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockJobControllerMockStart.RLock() - calls = mock.calls.Start - lockJobControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *JobControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("JobControllerMock.SyncFunc: method is nil but JobController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockJobControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockJobControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedJobController.SyncCalls()) -func (mock *JobControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockJobControllerMockSync.RLock() - calls = mock.calls.Sync - lockJobControllerMockSync.RUnlock() - return calls -} - var ( lockJobInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockJobInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.JobInterface = &JobInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Job, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.JobList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.JobList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.JobList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.JobList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type JobInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Job, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.JobList, error) + ListFunc func(opts v1b.ListOptions) (*v1.JobList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.JobList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.JobList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *JobInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *JobInterfaceMock) List(opts v1b.ListOptions) (*v1a.JobList, error) { +func (mock *JobInterfaceMock) List(opts v1b.ListOptions) (*v1.JobList, error) { if mock.ListFunc == nil { panic("JobInterfaceMock.ListFunc: method is nil but JobInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *JobInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *JobInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.JobList, error) { +func (mock *JobInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.JobList, error) { if mock.ListNamespacedFunc == nil { panic("JobInterfaceMock.ListNamespacedFunc: method is nil but JobInterface.ListNamespaced was just called") } diff --git a/apis/batch/v1/zz_generated_deepcopy.go b/apis/batch/v1/zz_generated_deepcopy.go deleted file mode 100644 index c2005366..00000000 --- a/apis/batch/v1/zz_generated_deepcopy.go +++ /dev/null @@ -1,39 +0,0 @@ -package v1 - -import ( - batchv1 "k8s.io/api/batch/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *JobList) DeepCopyInto(out *JobList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]batchv1.Job, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobList. -func (in *JobList) DeepCopy() *JobList { - if in == nil { - return nil - } - out := new(JobList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *JobList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/apis/batch/v1/zz_generated_job_controller.go b/apis/batch/v1/zz_generated_job_controller.go index 1ebdba64..449724eb 100644 --- a/apis/batch/v1/zz_generated_job_controller.go +++ b/apis/batch/v1/zz_generated_job_controller.go @@ -50,12 +50,6 @@ func NewJob(namespace, name string, obj v1.Job) *v1.Job { return &obj } -type JobList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Job `json:"items"` -} - type JobHandlerFunc func(key string, obj *v1.Job) (runtime.Object, error) type JobChangeHandlerFunc func(obj *v1.Job) (runtime.Object, error) @@ -75,8 +69,6 @@ type JobController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler JobHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type JobInterface interface { @@ -87,8 +79,8 @@ type JobInterface interface { Update(*v1.Job) (*v1.Job, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*JobList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*JobList, error) + List(opts metav1.ListOptions) (*v1.JobList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.JobList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() JobController @@ -127,7 +119,7 @@ func (l *jobLister) Get(namespace, name string) (*v1.Job, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: JobGroupVersionKind.Group, - Resource: "job", + Resource: JobGroupVersionResource.Resource, }, key) } return obj.(*v1.Job), nil @@ -207,29 +199,16 @@ func (c jobFactory) Object() runtime.Object { } func (c jobFactory) List() runtime.Object { - return &JobList{} + return &v1.JobList{} } func (s *jobClient) Controller() JobController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.jobControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(JobGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(JobGroupVersionResource, JobGroupVersionKind.Kind, true)) - c = &jobController{ + return &jobController{ GenericController: genericController, } - - s.client.jobControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type jobClient struct { @@ -263,6 +242,11 @@ func (s *jobClient) Update(o *v1.Job) (*v1.Job, error) { return obj.(*v1.Job), err } +func (s *jobClient) UpdateStatus(o *v1.Job) (*v1.Job, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.Job), err +} + func (s *jobClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *jobClient) DeleteNamespaced(namespace, name string, options *metav1.Del return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *jobClient) List(opts metav1.ListOptions) (*JobList, error) { +func (s *jobClient) List(opts metav1.ListOptions) (*v1.JobList, error) { obj, err := s.objectClient.List(opts) - return obj.(*JobList), err + return obj.(*v1.JobList), err } -func (s *jobClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*JobList, error) { +func (s *jobClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.JobList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*JobList), err + return obj.(*v1.JobList), err } func (s *jobClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/batch/v1/zz_generated_k8s_client.go b/apis/batch/v1/zz_generated_k8s_client.go index ad5369d0..2e19b5de 100644 --- a/apis/batch/v1/zz_generated_k8s_client.go +++ b/apis/batch/v1/zz_generated_k8s_client.go @@ -1,71 +1,34 @@ package v1 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" - "k8s.io/client-go/rest" -) - -type ( - contextKeyType struct{} - contextClientsKeyType struct{} ) type Interface interface { - RESTClient() rest.Interface - controller.Starter - JobsGetter } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - jobControllers map[string]JobController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer - } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) - if err != nil { - return nil, err - } - +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - jobControllers: map[string]JobController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type JobsGetter interface { Jobs(namespace string) JobInterface } func (c *Client) Jobs(namespace string) JobInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &JobResource, JobGroupVersionKind, jobFactory{}) + sharedClient := c.clientFactory.ForResourceKind(JobGroupVersionResource, JobGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &JobResource, JobGroupVersionKind, jobFactory{}) return &jobClient{ ns: namespace, client: c, diff --git a/apis/batch/v1/zz_generated_scheme.go b/apis/batch/v1/zz_generated_scheme.go index 4e093514..4f51ce9c 100644 --- a/apis/batch/v1/zz_generated_scheme.go +++ b/apis/batch/v1/zz_generated_scheme.go @@ -1,8 +1,6 @@ package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -23,19 +21,3 @@ func Kind(kind string) schema.GroupKind { func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - // TODO this gets cleaned up when the types are fixed - scheme.AddKnownTypes(SchemeGroupVersion, - - &JobList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/apis/batch/v1beta1/fakes/zz_generated_cron_job_mock.go b/apis/batch/v1beta1/fakes/zz_generated_cron_job_mock.go index 343275d3..d4d4d6c1 100644 --- a/apis/batch/v1beta1/fakes/zz_generated_cron_job_mock.go +++ b/apis/batch/v1beta1/fakes/zz_generated_cron_job_mock.go @@ -151,8 +151,6 @@ var ( lockCronJobControllerMockGeneric sync.RWMutex lockCronJobControllerMockInformer sync.RWMutex lockCronJobControllerMockLister sync.RWMutex - lockCronJobControllerMockStart sync.RWMutex - lockCronJobControllerMockSync sync.RWMutex ) // Ensure, that CronJobControllerMock does implement CronJobController. @@ -192,12 +190,6 @@ var _ v1beta1a.CronJobController = &CronJobControllerMock{} // ListerFunc: func() v1beta1a.CronJobLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedCronJobController in code that requires CronJobController @@ -232,12 +224,6 @@ type CronJobControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1beta1a.CronJobLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type CronJobControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *CronJobControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *CronJobControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("CronJobControllerMock.StartFunc: method is nil but CronJobController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockCronJobControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockCronJobControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedCronJobController.StartCalls()) -func (mock *CronJobControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockCronJobControllerMockStart.RLock() - calls = mock.calls.Start - lockCronJobControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *CronJobControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("CronJobControllerMock.SyncFunc: method is nil but CronJobController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockCronJobControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockCronJobControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedCronJobController.SyncCalls()) -func (mock *CronJobControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockCronJobControllerMockSync.RLock() - calls = mock.calls.Sync - lockCronJobControllerMockSync.RUnlock() - return calls -} - var ( lockCronJobInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockCronJobInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1beta1a.CronJobInterface = &CronJobInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v1beta1.CronJob, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1.ListOptions) (*v1beta1a.CronJobList, error) { +// ListFunc: func(opts v1.ListOptions) (*v1beta1.CronJobList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v1beta1a.CronJobList, error) { +// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v1beta1.CronJobList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type CronJobInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v1beta1.CronJob, error) // ListFunc mocks the List method. - ListFunc func(opts v1.ListOptions) (*v1beta1a.CronJobList, error) + ListFunc func(opts v1.ListOptions) (*v1beta1.CronJobList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1beta1a.CronJobList, error) + ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1beta1.CronJobList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *CronJobInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *CronJobInterfaceMock) List(opts v1.ListOptions) (*v1beta1a.CronJobList, error) { +func (mock *CronJobInterfaceMock) List(opts v1.ListOptions) (*v1beta1.CronJobList, error) { if mock.ListFunc == nil { panic("CronJobInterfaceMock.ListFunc: method is nil but CronJobInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *CronJobInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *CronJobInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1beta1a.CronJobList, error) { +func (mock *CronJobInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1beta1.CronJobList, error) { if mock.ListNamespacedFunc == nil { panic("CronJobInterfaceMock.ListNamespacedFunc: method is nil but CronJobInterface.ListNamespaced was just called") } diff --git a/apis/batch/v1beta1/zz_generated_cron_job_controller.go b/apis/batch/v1beta1/zz_generated_cron_job_controller.go index 5064cf43..214c733e 100644 --- a/apis/batch/v1beta1/zz_generated_cron_job_controller.go +++ b/apis/batch/v1beta1/zz_generated_cron_job_controller.go @@ -50,12 +50,6 @@ func NewCronJob(namespace, name string, obj v1beta1.CronJob) *v1beta1.CronJob { return &obj } -type CronJobList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1beta1.CronJob `json:"items"` -} - type CronJobHandlerFunc func(key string, obj *v1beta1.CronJob) (runtime.Object, error) type CronJobChangeHandlerFunc func(obj *v1beta1.CronJob) (runtime.Object, error) @@ -75,8 +69,6 @@ type CronJobController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CronJobHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CronJobInterface interface { @@ -87,8 +79,8 @@ type CronJobInterface interface { Update(*v1beta1.CronJob) (*v1beta1.CronJob, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*CronJobList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*CronJobList, error) + List(opts metav1.ListOptions) (*v1beta1.CronJobList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1beta1.CronJobList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() CronJobController @@ -127,7 +119,7 @@ func (l *cronJobLister) Get(namespace, name string) (*v1beta1.CronJob, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CronJobGroupVersionKind.Group, - Resource: "cronJob", + Resource: CronJobGroupVersionResource.Resource, }, key) } return obj.(*v1beta1.CronJob), nil @@ -207,29 +199,16 @@ func (c cronJobFactory) Object() runtime.Object { } func (c cronJobFactory) List() runtime.Object { - return &CronJobList{} + return &v1beta1.CronJobList{} } func (s *cronJobClient) Controller() CronJobController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.cronJobControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CronJobGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CronJobGroupVersionResource, CronJobGroupVersionKind.Kind, true)) - c = &cronJobController{ + return &cronJobController{ GenericController: genericController, } - - s.client.cronJobControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type cronJobClient struct { @@ -263,6 +242,11 @@ func (s *cronJobClient) Update(o *v1beta1.CronJob) (*v1beta1.CronJob, error) { return obj.(*v1beta1.CronJob), err } +func (s *cronJobClient) UpdateStatus(o *v1beta1.CronJob) (*v1beta1.CronJob, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1beta1.CronJob), err +} + func (s *cronJobClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *cronJobClient) DeleteNamespaced(namespace, name string, options *metav1 return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *cronJobClient) List(opts metav1.ListOptions) (*CronJobList, error) { +func (s *cronJobClient) List(opts metav1.ListOptions) (*v1beta1.CronJobList, error) { obj, err := s.objectClient.List(opts) - return obj.(*CronJobList), err + return obj.(*v1beta1.CronJobList), err } -func (s *cronJobClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*CronJobList, error) { +func (s *cronJobClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1beta1.CronJobList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*CronJobList), err + return obj.(*v1beta1.CronJobList), err } func (s *cronJobClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/batch/v1beta1/zz_generated_deepcopy.go b/apis/batch/v1beta1/zz_generated_deepcopy.go deleted file mode 100644 index 1f5b5be2..00000000 --- a/apis/batch/v1beta1/zz_generated_deepcopy.go +++ /dev/null @@ -1,39 +0,0 @@ -package v1beta1 - -import ( - batchv1beta1 "k8s.io/api/batch/v1beta1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *CronJobList) DeepCopyInto(out *CronJobList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]batchv1beta1.CronJob, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CronJobList. -func (in *CronJobList) DeepCopy() *CronJobList { - if in == nil { - return nil - } - out := new(CronJobList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *CronJobList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/apis/batch/v1beta1/zz_generated_k8s_client.go b/apis/batch/v1beta1/zz_generated_k8s_client.go index c89d291a..93995310 100644 --- a/apis/batch/v1beta1/zz_generated_k8s_client.go +++ b/apis/batch/v1beta1/zz_generated_k8s_client.go @@ -1,71 +1,34 @@ package v1beta1 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" - "k8s.io/client-go/rest" -) - -type ( - contextKeyType struct{} - contextClientsKeyType struct{} ) type Interface interface { - RESTClient() rest.Interface - controller.Starter - CronJobsGetter } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - cronJobControllers map[string]CronJobController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer - } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) - if err != nil { - return nil, err - } - +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - cronJobControllers: map[string]CronJobController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type CronJobsGetter interface { CronJobs(namespace string) CronJobInterface } func (c *Client) CronJobs(namespace string) CronJobInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CronJobResource, CronJobGroupVersionKind, cronJobFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CronJobGroupVersionResource, CronJobGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CronJobResource, CronJobGroupVersionKind, cronJobFactory{}) return &cronJobClient{ ns: namespace, client: c, diff --git a/apis/batch/v1beta1/zz_generated_scheme.go b/apis/batch/v1beta1/zz_generated_scheme.go index a6b33bb3..30f0c920 100644 --- a/apis/batch/v1beta1/zz_generated_scheme.go +++ b/apis/batch/v1beta1/zz_generated_scheme.go @@ -1,8 +1,6 @@ package v1beta1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -23,19 +21,3 @@ func Kind(kind string) schema.GroupKind { func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - // TODO this gets cleaned up when the types are fixed - scheme.AddKnownTypes(SchemeGroupVersion, - - &CronJobList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_auth_token_mock.go b/apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_auth_token_mock.go index ed2122ba..a6f69c58 100644 --- a/apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_auth_token_mock.go +++ b/apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_auth_token_mock.go @@ -150,8 +150,6 @@ var ( lockClusterAuthTokenControllerMockGeneric sync.RWMutex lockClusterAuthTokenControllerMockInformer sync.RWMutex lockClusterAuthTokenControllerMockLister sync.RWMutex - lockClusterAuthTokenControllerMockStart sync.RWMutex - lockClusterAuthTokenControllerMockSync sync.RWMutex ) // Ensure, that ClusterAuthTokenControllerMock does implement ClusterAuthTokenController. @@ -191,12 +189,6 @@ var _ v3.ClusterAuthTokenController = &ClusterAuthTokenControllerMock{} // ListerFunc: func() v3.ClusterAuthTokenLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterAuthTokenController in code that requires ClusterAuthTokenController @@ -231,12 +223,6 @@ type ClusterAuthTokenControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ClusterAuthTokenLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ClusterAuthTokenControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ClusterAuthTokenControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterAuthTokenControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterAuthTokenControllerMock.StartFunc: method is nil but ClusterAuthTokenController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterAuthTokenControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterAuthTokenControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterAuthTokenController.StartCalls()) -func (mock *ClusterAuthTokenControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterAuthTokenControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterAuthTokenControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterAuthTokenControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterAuthTokenControllerMock.SyncFunc: method is nil but ClusterAuthTokenController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterAuthTokenControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterAuthTokenControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterAuthTokenController.SyncCalls()) -func (mock *ClusterAuthTokenControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterAuthTokenControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterAuthTokenControllerMockSync.RUnlock() - return calls -} - var ( lockClusterAuthTokenInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterAuthTokenInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_user_attribute_mock.go b/apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_user_attribute_mock.go index 37b03b68..78dd837c 100644 --- a/apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_user_attribute_mock.go +++ b/apis/cluster.cattle.io/v3/fakes/zz_generated_cluster_user_attribute_mock.go @@ -150,8 +150,6 @@ var ( lockClusterUserAttributeControllerMockGeneric sync.RWMutex lockClusterUserAttributeControllerMockInformer sync.RWMutex lockClusterUserAttributeControllerMockLister sync.RWMutex - lockClusterUserAttributeControllerMockStart sync.RWMutex - lockClusterUserAttributeControllerMockSync sync.RWMutex ) // Ensure, that ClusterUserAttributeControllerMock does implement ClusterUserAttributeController. @@ -191,12 +189,6 @@ var _ v3.ClusterUserAttributeController = &ClusterUserAttributeControllerMock{} // ListerFunc: func() v3.ClusterUserAttributeLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterUserAttributeController in code that requires ClusterUserAttributeController @@ -231,12 +223,6 @@ type ClusterUserAttributeControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ClusterUserAttributeLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ClusterUserAttributeControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ClusterUserAttributeControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterUserAttributeControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterUserAttributeControllerMock.StartFunc: method is nil but ClusterUserAttributeController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterUserAttributeControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterUserAttributeControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterUserAttributeController.StartCalls()) -func (mock *ClusterUserAttributeControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterUserAttributeControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterUserAttributeControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterUserAttributeControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterUserAttributeControllerMock.SyncFunc: method is nil but ClusterUserAttributeController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterUserAttributeControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterUserAttributeControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterUserAttributeController.SyncCalls()) -func (mock *ClusterUserAttributeControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterUserAttributeControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterUserAttributeControllerMockSync.RUnlock() - return calls -} - var ( lockClusterUserAttributeInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterUserAttributeInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/cluster.cattle.io/v3/zz_generated_cluster_auth_token_controller.go b/apis/cluster.cattle.io/v3/zz_generated_cluster_auth_token_controller.go index 9027de8c..5dbf8956 100644 --- a/apis/cluster.cattle.io/v3/zz_generated_cluster_auth_token_controller.go +++ b/apis/cluster.cattle.io/v3/zz_generated_cluster_auth_token_controller.go @@ -74,8 +74,6 @@ type ClusterAuthTokenController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterAuthTokenHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterAuthTokenInterface interface { @@ -126,7 +124,7 @@ func (l *clusterAuthTokenLister) Get(namespace, name string) (*ClusterAuthToken, if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterAuthTokenGroupVersionKind.Group, - Resource: "clusterAuthToken", + Resource: ClusterAuthTokenGroupVersionResource.Resource, }, key) } return obj.(*ClusterAuthToken), nil @@ -210,25 +208,12 @@ func (c clusterAuthTokenFactory) List() runtime.Object { } func (s *clusterAuthTokenClient) Controller() ClusterAuthTokenController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterAuthTokenControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterAuthTokenGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterAuthTokenGroupVersionResource, ClusterAuthTokenGroupVersionKind.Kind, true)) - c = &clusterAuthTokenController{ + return &clusterAuthTokenController{ GenericController: genericController, } - - s.client.clusterAuthTokenControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterAuthTokenClient struct { @@ -262,6 +247,11 @@ func (s *clusterAuthTokenClient) Update(o *ClusterAuthToken) (*ClusterAuthToken, return obj.(*ClusterAuthToken), err } +func (s *clusterAuthTokenClient) UpdateStatus(o *ClusterAuthToken) (*ClusterAuthToken, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterAuthToken), err +} + func (s *clusterAuthTokenClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/cluster.cattle.io/v3/zz_generated_cluster_user_attribute_controller.go b/apis/cluster.cattle.io/v3/zz_generated_cluster_user_attribute_controller.go index 12e743c4..07a0a862 100644 --- a/apis/cluster.cattle.io/v3/zz_generated_cluster_user_attribute_controller.go +++ b/apis/cluster.cattle.io/v3/zz_generated_cluster_user_attribute_controller.go @@ -74,8 +74,6 @@ type ClusterUserAttributeController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterUserAttributeHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterUserAttributeInterface interface { @@ -126,7 +124,7 @@ func (l *clusterUserAttributeLister) Get(namespace, name string) (*ClusterUserAt if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterUserAttributeGroupVersionKind.Group, - Resource: "clusterUserAttribute", + Resource: ClusterUserAttributeGroupVersionResource.Resource, }, key) } return obj.(*ClusterUserAttribute), nil @@ -210,25 +208,12 @@ func (c clusterUserAttributeFactory) List() runtime.Object { } func (s *clusterUserAttributeClient) Controller() ClusterUserAttributeController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterUserAttributeControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterUserAttributeGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterUserAttributeGroupVersionResource, ClusterUserAttributeGroupVersionKind.Kind, true)) - c = &clusterUserAttributeController{ + return &clusterUserAttributeController{ GenericController: genericController, } - - s.client.clusterUserAttributeControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterUserAttributeClient struct { @@ -262,6 +247,11 @@ func (s *clusterUserAttributeClient) Update(o *ClusterUserAttribute) (*ClusterUs return obj.(*ClusterUserAttribute), err } +func (s *clusterUserAttributeClient) UpdateStatus(o *ClusterUserAttribute) (*ClusterUserAttribute, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterUserAttribute), err +} + func (s *clusterUserAttributeClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/cluster.cattle.io/v3/zz_generated_k8s_client.go b/apis/cluster.cattle.io/v3/zz_generated_k8s_client.go index 8ce7b3ec..99ae170e 100644 --- a/apis/cluster.cattle.io/v3/zz_generated_k8s_client.go +++ b/apis/cluster.cattle.io/v3/zz_generated_k8s_client.go @@ -1,74 +1,49 @@ package v3 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" ) -type ( - contextKeyType struct{} - contextClientsKeyType struct{} -) - type Interface interface { - RESTClient() rest.Interface - controller.Starter - ClusterAuthTokensGetter ClusterUserAttributesGetter } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - clusterAuthTokenControllers map[string]ClusterAuthTokenController - clusterUserAttributeControllers map[string]ClusterUserAttributeController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer +func NewForConfig(cfg rest.Config) (Interface, error) { + scheme := runtime.NewScheme() + if err := AddToScheme(scheme); err != nil { + return nil, err } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) + controllerFactory, err := controller.NewSharedControllerFactoryFromConfig(&cfg, scheme) if err != nil { return nil, err } + return NewFromControllerFactory(controllerFactory) +} +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - clusterAuthTokenControllers: map[string]ClusterAuthTokenController{}, - clusterUserAttributeControllers: map[string]ClusterUserAttributeController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type ClusterAuthTokensGetter interface { ClusterAuthTokens(namespace string) ClusterAuthTokenInterface } func (c *Client) ClusterAuthTokens(namespace string) ClusterAuthTokenInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterAuthTokenResource, ClusterAuthTokenGroupVersionKind, clusterAuthTokenFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterAuthTokenGroupVersionResource, ClusterAuthTokenGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterAuthTokenResource, ClusterAuthTokenGroupVersionKind, clusterAuthTokenFactory{}) return &clusterAuthTokenClient{ ns: namespace, client: c, @@ -81,7 +56,8 @@ type ClusterUserAttributesGetter interface { } func (c *Client) ClusterUserAttributes(namespace string) ClusterUserAttributeInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterUserAttributeResource, ClusterUserAttributeGroupVersionKind, clusterUserAttributeFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterUserAttributeGroupVersionResource, ClusterUserAttributeGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterUserAttributeResource, ClusterUserAttributeGroupVersionKind, clusterUserAttributeFactory{}) return &clusterUserAttributeClient{ ns: namespace, client: c, diff --git a/apis/cluster.cattle.io/v3/zz_generated_scheme.go b/apis/cluster.cattle.io/v3/zz_generated_scheme.go index 86720fd9..4789d4f6 100644 --- a/apis/cluster.cattle.io/v3/zz_generated_scheme.go +++ b/apis/cluster.cattle.io/v3/zz_generated_scheme.go @@ -35,7 +35,9 @@ func addKnownTypes(scheme *runtime.Scheme) error { scheme.AddKnownTypes(SchemeGroupVersion, &ClusterAuthToken{}, + &ClusterAuthTokenList{}, &ClusterUserAttribute{}, + &ClusterUserAttributeList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/apis/core/v1/fakes/zz_generated_component_status_mock.go b/apis/core/v1/fakes/zz_generated_component_status_mock.go index 4d1fbb24..5d47b01d 100644 --- a/apis/core/v1/fakes/zz_generated_component_status_mock.go +++ b/apis/core/v1/fakes/zz_generated_component_status_mock.go @@ -151,8 +151,6 @@ var ( lockComponentStatusControllerMockGeneric sync.RWMutex lockComponentStatusControllerMockInformer sync.RWMutex lockComponentStatusControllerMockLister sync.RWMutex - lockComponentStatusControllerMockStart sync.RWMutex - lockComponentStatusControllerMockSync sync.RWMutex ) // Ensure, that ComponentStatusControllerMock does implement ComponentStatusController. @@ -192,12 +190,6 @@ var _ v1a.ComponentStatusController = &ComponentStatusControllerMock{} // ListerFunc: func() v1a.ComponentStatusLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedComponentStatusController in code that requires ComponentStatusController @@ -232,12 +224,6 @@ type ComponentStatusControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.ComponentStatusLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type ComponentStatusControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *ComponentStatusControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ComponentStatusControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ComponentStatusControllerMock.StartFunc: method is nil but ComponentStatusController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockComponentStatusControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockComponentStatusControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedComponentStatusController.StartCalls()) -func (mock *ComponentStatusControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockComponentStatusControllerMockStart.RLock() - calls = mock.calls.Start - lockComponentStatusControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ComponentStatusControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ComponentStatusControllerMock.SyncFunc: method is nil but ComponentStatusController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockComponentStatusControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockComponentStatusControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedComponentStatusController.SyncCalls()) -func (mock *ComponentStatusControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockComponentStatusControllerMockSync.RLock() - calls = mock.calls.Sync - lockComponentStatusControllerMockSync.RUnlock() - return calls -} - var ( lockComponentStatusInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockComponentStatusInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.ComponentStatusInterface = &ComponentStatusInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ComponentStatus, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.ComponentStatusList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.ComponentStatusList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ComponentStatusList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ComponentStatusList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type ComponentStatusInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ComponentStatus, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.ComponentStatusList, error) + ListFunc func(opts v1b.ListOptions) (*v1.ComponentStatusList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ComponentStatusList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ComponentStatusList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *ComponentStatusInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *ComponentStatusInterfaceMock) List(opts v1b.ListOptions) (*v1a.ComponentStatusList, error) { +func (mock *ComponentStatusInterfaceMock) List(opts v1b.ListOptions) (*v1.ComponentStatusList, error) { if mock.ListFunc == nil { panic("ComponentStatusInterfaceMock.ListFunc: method is nil but ComponentStatusInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *ComponentStatusInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *ComponentStatusInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ComponentStatusList, error) { +func (mock *ComponentStatusInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ComponentStatusList, error) { if mock.ListNamespacedFunc == nil { panic("ComponentStatusInterfaceMock.ListNamespacedFunc: method is nil but ComponentStatusInterface.ListNamespaced was just called") } diff --git a/apis/core/v1/fakes/zz_generated_config_map_mock.go b/apis/core/v1/fakes/zz_generated_config_map_mock.go index b287b706..f045cff0 100644 --- a/apis/core/v1/fakes/zz_generated_config_map_mock.go +++ b/apis/core/v1/fakes/zz_generated_config_map_mock.go @@ -151,8 +151,6 @@ var ( lockConfigMapControllerMockGeneric sync.RWMutex lockConfigMapControllerMockInformer sync.RWMutex lockConfigMapControllerMockLister sync.RWMutex - lockConfigMapControllerMockStart sync.RWMutex - lockConfigMapControllerMockSync sync.RWMutex ) // Ensure, that ConfigMapControllerMock does implement ConfigMapController. @@ -192,12 +190,6 @@ var _ v1a.ConfigMapController = &ConfigMapControllerMock{} // ListerFunc: func() v1a.ConfigMapLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedConfigMapController in code that requires ConfigMapController @@ -232,12 +224,6 @@ type ConfigMapControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.ConfigMapLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type ConfigMapControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *ConfigMapControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ConfigMapControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ConfigMapControllerMock.StartFunc: method is nil but ConfigMapController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockConfigMapControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockConfigMapControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedConfigMapController.StartCalls()) -func (mock *ConfigMapControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockConfigMapControllerMockStart.RLock() - calls = mock.calls.Start - lockConfigMapControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ConfigMapControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ConfigMapControllerMock.SyncFunc: method is nil but ConfigMapController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockConfigMapControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockConfigMapControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedConfigMapController.SyncCalls()) -func (mock *ConfigMapControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockConfigMapControllerMockSync.RLock() - calls = mock.calls.Sync - lockConfigMapControllerMockSync.RUnlock() - return calls -} - var ( lockConfigMapInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockConfigMapInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.ConfigMapInterface = &ConfigMapInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ConfigMap, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.ConfigMapList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.ConfigMapList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ConfigMapList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ConfigMapList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type ConfigMapInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ConfigMap, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.ConfigMapList, error) + ListFunc func(opts v1b.ListOptions) (*v1.ConfigMapList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ConfigMapList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ConfigMapList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *ConfigMapInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *ConfigMapInterfaceMock) List(opts v1b.ListOptions) (*v1a.ConfigMapList, error) { +func (mock *ConfigMapInterfaceMock) List(opts v1b.ListOptions) (*v1.ConfigMapList, error) { if mock.ListFunc == nil { panic("ConfigMapInterfaceMock.ListFunc: method is nil but ConfigMapInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *ConfigMapInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *ConfigMapInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ConfigMapList, error) { +func (mock *ConfigMapInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ConfigMapList, error) { if mock.ListNamespacedFunc == nil { panic("ConfigMapInterfaceMock.ListNamespacedFunc: method is nil but ConfigMapInterface.ListNamespaced was just called") } diff --git a/apis/core/v1/fakes/zz_generated_endpoints_mock.go b/apis/core/v1/fakes/zz_generated_endpoints_mock.go index ecb38d7c..0605d3f4 100644 --- a/apis/core/v1/fakes/zz_generated_endpoints_mock.go +++ b/apis/core/v1/fakes/zz_generated_endpoints_mock.go @@ -151,8 +151,6 @@ var ( lockEndpointsControllerMockGeneric sync.RWMutex lockEndpointsControllerMockInformer sync.RWMutex lockEndpointsControllerMockLister sync.RWMutex - lockEndpointsControllerMockStart sync.RWMutex - lockEndpointsControllerMockSync sync.RWMutex ) // Ensure, that EndpointsControllerMock does implement EndpointsController. @@ -192,12 +190,6 @@ var _ v1a.EndpointsController = &EndpointsControllerMock{} // ListerFunc: func() v1a.EndpointsLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedEndpointsController in code that requires EndpointsController @@ -232,12 +224,6 @@ type EndpointsControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.EndpointsLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type EndpointsControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *EndpointsControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *EndpointsControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("EndpointsControllerMock.StartFunc: method is nil but EndpointsController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockEndpointsControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockEndpointsControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedEndpointsController.StartCalls()) -func (mock *EndpointsControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockEndpointsControllerMockStart.RLock() - calls = mock.calls.Start - lockEndpointsControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *EndpointsControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("EndpointsControllerMock.SyncFunc: method is nil but EndpointsController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockEndpointsControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockEndpointsControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedEndpointsController.SyncCalls()) -func (mock *EndpointsControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockEndpointsControllerMockSync.RLock() - calls = mock.calls.Sync - lockEndpointsControllerMockSync.RUnlock() - return calls -} - var ( lockEndpointsInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockEndpointsInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.EndpointsInterface = &EndpointsInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Endpoints, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.EndpointsList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.EndpointsList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.EndpointsList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.EndpointsList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type EndpointsInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Endpoints, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.EndpointsList, error) + ListFunc func(opts v1b.ListOptions) (*v1.EndpointsList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.EndpointsList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.EndpointsList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *EndpointsInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *EndpointsInterfaceMock) List(opts v1b.ListOptions) (*v1a.EndpointsList, error) { +func (mock *EndpointsInterfaceMock) List(opts v1b.ListOptions) (*v1.EndpointsList, error) { if mock.ListFunc == nil { panic("EndpointsInterfaceMock.ListFunc: method is nil but EndpointsInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *EndpointsInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *EndpointsInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.EndpointsList, error) { +func (mock *EndpointsInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.EndpointsList, error) { if mock.ListNamespacedFunc == nil { panic("EndpointsInterfaceMock.ListNamespacedFunc: method is nil but EndpointsInterface.ListNamespaced was just called") } diff --git a/apis/core/v1/fakes/zz_generated_event_mock.go b/apis/core/v1/fakes/zz_generated_event_mock.go index 61e2f17b..a45499b7 100644 --- a/apis/core/v1/fakes/zz_generated_event_mock.go +++ b/apis/core/v1/fakes/zz_generated_event_mock.go @@ -151,8 +151,6 @@ var ( lockEventControllerMockGeneric sync.RWMutex lockEventControllerMockInformer sync.RWMutex lockEventControllerMockLister sync.RWMutex - lockEventControllerMockStart sync.RWMutex - lockEventControllerMockSync sync.RWMutex ) // Ensure, that EventControllerMock does implement EventController. @@ -192,12 +190,6 @@ var _ v1a.EventController = &EventControllerMock{} // ListerFunc: func() v1a.EventLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedEventController in code that requires EventController @@ -232,12 +224,6 @@ type EventControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.EventLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type EventControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *EventControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *EventControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("EventControllerMock.StartFunc: method is nil but EventController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockEventControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockEventControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedEventController.StartCalls()) -func (mock *EventControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockEventControllerMockStart.RLock() - calls = mock.calls.Start - lockEventControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *EventControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("EventControllerMock.SyncFunc: method is nil but EventController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockEventControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockEventControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedEventController.SyncCalls()) -func (mock *EventControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockEventControllerMockSync.RLock() - calls = mock.calls.Sync - lockEventControllerMockSync.RUnlock() - return calls -} - var ( lockEventInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockEventInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.EventInterface = &EventInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Event, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.EventList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.EventList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.EventList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.EventList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type EventInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Event, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.EventList, error) + ListFunc func(opts v1b.ListOptions) (*v1.EventList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.EventList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.EventList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *EventInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *EventInterfaceMock) List(opts v1b.ListOptions) (*v1a.EventList, error) { +func (mock *EventInterfaceMock) List(opts v1b.ListOptions) (*v1.EventList, error) { if mock.ListFunc == nil { panic("EventInterfaceMock.ListFunc: method is nil but EventInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *EventInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *EventInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.EventList, error) { +func (mock *EventInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.EventList, error) { if mock.ListNamespacedFunc == nil { panic("EventInterfaceMock.ListNamespacedFunc: method is nil but EventInterface.ListNamespaced was just called") } diff --git a/apis/core/v1/fakes/zz_generated_limit_range_mock.go b/apis/core/v1/fakes/zz_generated_limit_range_mock.go index a7f81cf2..3c4aa13a 100644 --- a/apis/core/v1/fakes/zz_generated_limit_range_mock.go +++ b/apis/core/v1/fakes/zz_generated_limit_range_mock.go @@ -151,8 +151,6 @@ var ( lockLimitRangeControllerMockGeneric sync.RWMutex lockLimitRangeControllerMockInformer sync.RWMutex lockLimitRangeControllerMockLister sync.RWMutex - lockLimitRangeControllerMockStart sync.RWMutex - lockLimitRangeControllerMockSync sync.RWMutex ) // Ensure, that LimitRangeControllerMock does implement LimitRangeController. @@ -192,12 +190,6 @@ var _ v1a.LimitRangeController = &LimitRangeControllerMock{} // ListerFunc: func() v1a.LimitRangeLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedLimitRangeController in code that requires LimitRangeController @@ -232,12 +224,6 @@ type LimitRangeControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.LimitRangeLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type LimitRangeControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *LimitRangeControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *LimitRangeControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("LimitRangeControllerMock.StartFunc: method is nil but LimitRangeController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockLimitRangeControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockLimitRangeControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedLimitRangeController.StartCalls()) -func (mock *LimitRangeControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockLimitRangeControllerMockStart.RLock() - calls = mock.calls.Start - lockLimitRangeControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *LimitRangeControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("LimitRangeControllerMock.SyncFunc: method is nil but LimitRangeController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockLimitRangeControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockLimitRangeControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedLimitRangeController.SyncCalls()) -func (mock *LimitRangeControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockLimitRangeControllerMockSync.RLock() - calls = mock.calls.Sync - lockLimitRangeControllerMockSync.RUnlock() - return calls -} - var ( lockLimitRangeInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockLimitRangeInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.LimitRangeInterface = &LimitRangeInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.LimitRange, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.LimitRangeList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.LimitRangeList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.LimitRangeList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.LimitRangeList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type LimitRangeInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.LimitRange, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.LimitRangeList, error) + ListFunc func(opts v1b.ListOptions) (*v1.LimitRangeList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.LimitRangeList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.LimitRangeList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *LimitRangeInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *LimitRangeInterfaceMock) List(opts v1b.ListOptions) (*v1a.LimitRangeList, error) { +func (mock *LimitRangeInterfaceMock) List(opts v1b.ListOptions) (*v1.LimitRangeList, error) { if mock.ListFunc == nil { panic("LimitRangeInterfaceMock.ListFunc: method is nil but LimitRangeInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *LimitRangeInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *LimitRangeInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.LimitRangeList, error) { +func (mock *LimitRangeInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.LimitRangeList, error) { if mock.ListNamespacedFunc == nil { panic("LimitRangeInterfaceMock.ListNamespacedFunc: method is nil but LimitRangeInterface.ListNamespaced was just called") } diff --git a/apis/core/v1/fakes/zz_generated_namespace_mock.go b/apis/core/v1/fakes/zz_generated_namespace_mock.go index db05e729..882dc56e 100644 --- a/apis/core/v1/fakes/zz_generated_namespace_mock.go +++ b/apis/core/v1/fakes/zz_generated_namespace_mock.go @@ -151,8 +151,6 @@ var ( lockNamespaceControllerMockGeneric sync.RWMutex lockNamespaceControllerMockInformer sync.RWMutex lockNamespaceControllerMockLister sync.RWMutex - lockNamespaceControllerMockStart sync.RWMutex - lockNamespaceControllerMockSync sync.RWMutex ) // Ensure, that NamespaceControllerMock does implement NamespaceController. @@ -192,12 +190,6 @@ var _ v1a.NamespaceController = &NamespaceControllerMock{} // ListerFunc: func() v1a.NamespaceLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedNamespaceController in code that requires NamespaceController @@ -232,12 +224,6 @@ type NamespaceControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.NamespaceLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type NamespaceControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *NamespaceControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *NamespaceControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("NamespaceControllerMock.StartFunc: method is nil but NamespaceController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockNamespaceControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockNamespaceControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedNamespaceController.StartCalls()) -func (mock *NamespaceControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockNamespaceControllerMockStart.RLock() - calls = mock.calls.Start - lockNamespaceControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *NamespaceControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("NamespaceControllerMock.SyncFunc: method is nil but NamespaceController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockNamespaceControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockNamespaceControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedNamespaceController.SyncCalls()) -func (mock *NamespaceControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockNamespaceControllerMockSync.RLock() - calls = mock.calls.Sync - lockNamespaceControllerMockSync.RUnlock() - return calls -} - var ( lockNamespaceInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockNamespaceInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.NamespaceInterface = &NamespaceInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Namespace, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.NamespaceList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.NamespaceList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.NamespaceList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.NamespaceList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type NamespaceInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Namespace, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.NamespaceList, error) + ListFunc func(opts v1b.ListOptions) (*v1.NamespaceList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.NamespaceList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.NamespaceList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *NamespaceInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *NamespaceInterfaceMock) List(opts v1b.ListOptions) (*v1a.NamespaceList, error) { +func (mock *NamespaceInterfaceMock) List(opts v1b.ListOptions) (*v1.NamespaceList, error) { if mock.ListFunc == nil { panic("NamespaceInterfaceMock.ListFunc: method is nil but NamespaceInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *NamespaceInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *NamespaceInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.NamespaceList, error) { +func (mock *NamespaceInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.NamespaceList, error) { if mock.ListNamespacedFunc == nil { panic("NamespaceInterfaceMock.ListNamespacedFunc: method is nil but NamespaceInterface.ListNamespaced was just called") } diff --git a/apis/core/v1/fakes/zz_generated_node_mock.go b/apis/core/v1/fakes/zz_generated_node_mock.go index f2e87cbe..9aa0d4e9 100644 --- a/apis/core/v1/fakes/zz_generated_node_mock.go +++ b/apis/core/v1/fakes/zz_generated_node_mock.go @@ -151,8 +151,6 @@ var ( lockNodeControllerMockGeneric sync.RWMutex lockNodeControllerMockInformer sync.RWMutex lockNodeControllerMockLister sync.RWMutex - lockNodeControllerMockStart sync.RWMutex - lockNodeControllerMockSync sync.RWMutex ) // Ensure, that NodeControllerMock does implement NodeController. @@ -192,12 +190,6 @@ var _ v1a.NodeController = &NodeControllerMock{} // ListerFunc: func() v1a.NodeLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedNodeController in code that requires NodeController @@ -232,12 +224,6 @@ type NodeControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.NodeLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type NodeControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *NodeControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *NodeControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("NodeControllerMock.StartFunc: method is nil but NodeController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockNodeControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockNodeControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedNodeController.StartCalls()) -func (mock *NodeControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockNodeControllerMockStart.RLock() - calls = mock.calls.Start - lockNodeControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *NodeControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("NodeControllerMock.SyncFunc: method is nil but NodeController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockNodeControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockNodeControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedNodeController.SyncCalls()) -func (mock *NodeControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockNodeControllerMockSync.RLock() - calls = mock.calls.Sync - lockNodeControllerMockSync.RUnlock() - return calls -} - var ( lockNodeInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockNodeInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.NodeInterface = &NodeInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Node, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.NodeList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.NodeList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.NodeList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.NodeList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type NodeInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Node, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.NodeList, error) + ListFunc func(opts v1b.ListOptions) (*v1.NodeList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.NodeList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.NodeList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *NodeInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *NodeInterfaceMock) List(opts v1b.ListOptions) (*v1a.NodeList, error) { +func (mock *NodeInterfaceMock) List(opts v1b.ListOptions) (*v1.NodeList, error) { if mock.ListFunc == nil { panic("NodeInterfaceMock.ListFunc: method is nil but NodeInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *NodeInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *NodeInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.NodeList, error) { +func (mock *NodeInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.NodeList, error) { if mock.ListNamespacedFunc == nil { panic("NodeInterfaceMock.ListNamespacedFunc: method is nil but NodeInterface.ListNamespaced was just called") } diff --git a/apis/core/v1/fakes/zz_generated_persistent_volume_claim_mock.go b/apis/core/v1/fakes/zz_generated_persistent_volume_claim_mock.go index 0a874efe..b3ba3894 100644 --- a/apis/core/v1/fakes/zz_generated_persistent_volume_claim_mock.go +++ b/apis/core/v1/fakes/zz_generated_persistent_volume_claim_mock.go @@ -151,8 +151,6 @@ var ( lockPersistentVolumeClaimControllerMockGeneric sync.RWMutex lockPersistentVolumeClaimControllerMockInformer sync.RWMutex lockPersistentVolumeClaimControllerMockLister sync.RWMutex - lockPersistentVolumeClaimControllerMockStart sync.RWMutex - lockPersistentVolumeClaimControllerMockSync sync.RWMutex ) // Ensure, that PersistentVolumeClaimControllerMock does implement PersistentVolumeClaimController. @@ -192,12 +190,6 @@ var _ v1a.PersistentVolumeClaimController = &PersistentVolumeClaimControllerMock // ListerFunc: func() v1a.PersistentVolumeClaimLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedPersistentVolumeClaimController in code that requires PersistentVolumeClaimController @@ -232,12 +224,6 @@ type PersistentVolumeClaimControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.PersistentVolumeClaimLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type PersistentVolumeClaimControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *PersistentVolumeClaimControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *PersistentVolumeClaimControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("PersistentVolumeClaimControllerMock.StartFunc: method is nil but PersistentVolumeClaimController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockPersistentVolumeClaimControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockPersistentVolumeClaimControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedPersistentVolumeClaimController.StartCalls()) -func (mock *PersistentVolumeClaimControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockPersistentVolumeClaimControllerMockStart.RLock() - calls = mock.calls.Start - lockPersistentVolumeClaimControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *PersistentVolumeClaimControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("PersistentVolumeClaimControllerMock.SyncFunc: method is nil but PersistentVolumeClaimController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockPersistentVolumeClaimControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockPersistentVolumeClaimControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedPersistentVolumeClaimController.SyncCalls()) -func (mock *PersistentVolumeClaimControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockPersistentVolumeClaimControllerMockSync.RLock() - calls = mock.calls.Sync - lockPersistentVolumeClaimControllerMockSync.RUnlock() - return calls -} - var ( lockPersistentVolumeClaimInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockPersistentVolumeClaimInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.PersistentVolumeClaimInterface = &PersistentVolumeClaimInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.PersistentVolumeClaim, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.PersistentVolumeClaimList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.PersistentVolumeClaimList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type PersistentVolumeClaimInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.PersistentVolumeClaim, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error) + ListFunc func(opts v1b.ListOptions) (*v1.PersistentVolumeClaimList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.PersistentVolumeClaimList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *PersistentVolumeClaimInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *PersistentVolumeClaimInterfaceMock) List(opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error) { +func (mock *PersistentVolumeClaimInterfaceMock) List(opts v1b.ListOptions) (*v1.PersistentVolumeClaimList, error) { if mock.ListFunc == nil { panic("PersistentVolumeClaimInterfaceMock.ListFunc: method is nil but PersistentVolumeClaimInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *PersistentVolumeClaimInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *PersistentVolumeClaimInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.PersistentVolumeClaimList, error) { +func (mock *PersistentVolumeClaimInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.PersistentVolumeClaimList, error) { if mock.ListNamespacedFunc == nil { panic("PersistentVolumeClaimInterfaceMock.ListNamespacedFunc: method is nil but PersistentVolumeClaimInterface.ListNamespaced was just called") } diff --git a/apis/core/v1/fakes/zz_generated_pod_mock.go b/apis/core/v1/fakes/zz_generated_pod_mock.go index 7e1e7c69..88500d55 100644 --- a/apis/core/v1/fakes/zz_generated_pod_mock.go +++ b/apis/core/v1/fakes/zz_generated_pod_mock.go @@ -151,8 +151,6 @@ var ( lockPodControllerMockGeneric sync.RWMutex lockPodControllerMockInformer sync.RWMutex lockPodControllerMockLister sync.RWMutex - lockPodControllerMockStart sync.RWMutex - lockPodControllerMockSync sync.RWMutex ) // Ensure, that PodControllerMock does implement PodController. @@ -192,12 +190,6 @@ var _ v1a.PodController = &PodControllerMock{} // ListerFunc: func() v1a.PodLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedPodController in code that requires PodController @@ -232,12 +224,6 @@ type PodControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.PodLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type PodControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *PodControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *PodControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("PodControllerMock.StartFunc: method is nil but PodController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockPodControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockPodControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedPodController.StartCalls()) -func (mock *PodControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockPodControllerMockStart.RLock() - calls = mock.calls.Start - lockPodControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *PodControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("PodControllerMock.SyncFunc: method is nil but PodController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockPodControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockPodControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedPodController.SyncCalls()) -func (mock *PodControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockPodControllerMockSync.RLock() - calls = mock.calls.Sync - lockPodControllerMockSync.RUnlock() - return calls -} - var ( lockPodInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockPodInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.PodInterface = &PodInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Pod, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.PodList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.PodList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.PodList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.PodList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type PodInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Pod, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.PodList, error) + ListFunc func(opts v1b.ListOptions) (*v1.PodList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.PodList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.PodList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *PodInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *PodInterfaceMock) List(opts v1b.ListOptions) (*v1a.PodList, error) { +func (mock *PodInterfaceMock) List(opts v1b.ListOptions) (*v1.PodList, error) { if mock.ListFunc == nil { panic("PodInterfaceMock.ListFunc: method is nil but PodInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *PodInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *PodInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.PodList, error) { +func (mock *PodInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.PodList, error) { if mock.ListNamespacedFunc == nil { panic("PodInterfaceMock.ListNamespacedFunc: method is nil but PodInterface.ListNamespaced was just called") } diff --git a/apis/core/v1/fakes/zz_generated_replication_controller_mock.go b/apis/core/v1/fakes/zz_generated_replication_controller_mock.go index e88f8d34..0dafb720 100644 --- a/apis/core/v1/fakes/zz_generated_replication_controller_mock.go +++ b/apis/core/v1/fakes/zz_generated_replication_controller_mock.go @@ -151,8 +151,6 @@ var ( lockReplicationControllerControllerMockGeneric sync.RWMutex lockReplicationControllerControllerMockInformer sync.RWMutex lockReplicationControllerControllerMockLister sync.RWMutex - lockReplicationControllerControllerMockStart sync.RWMutex - lockReplicationControllerControllerMockSync sync.RWMutex ) // Ensure, that ReplicationControllerControllerMock does implement ReplicationControllerController. @@ -192,12 +190,6 @@ var _ v1a.ReplicationControllerController = &ReplicationControllerControllerMock // ListerFunc: func() v1a.ReplicationControllerLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedReplicationControllerController in code that requires ReplicationControllerController @@ -232,12 +224,6 @@ type ReplicationControllerControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.ReplicationControllerLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type ReplicationControllerControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *ReplicationControllerControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ReplicationControllerControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ReplicationControllerControllerMock.StartFunc: method is nil but ReplicationControllerController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockReplicationControllerControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockReplicationControllerControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedReplicationControllerController.StartCalls()) -func (mock *ReplicationControllerControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockReplicationControllerControllerMockStart.RLock() - calls = mock.calls.Start - lockReplicationControllerControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ReplicationControllerControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ReplicationControllerControllerMock.SyncFunc: method is nil but ReplicationControllerController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockReplicationControllerControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockReplicationControllerControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedReplicationControllerController.SyncCalls()) -func (mock *ReplicationControllerControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockReplicationControllerControllerMockSync.RLock() - calls = mock.calls.Sync - lockReplicationControllerControllerMockSync.RUnlock() - return calls -} - var ( lockReplicationControllerInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockReplicationControllerInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.ReplicationControllerInterface = &ReplicationControllerInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ReplicationController, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.ReplicationControllerList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.ReplicationControllerList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ReplicationControllerList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ReplicationControllerList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type ReplicationControllerInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ReplicationController, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.ReplicationControllerList, error) + ListFunc func(opts v1b.ListOptions) (*v1.ReplicationControllerList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ReplicationControllerList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ReplicationControllerList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *ReplicationControllerInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *ReplicationControllerInterfaceMock) List(opts v1b.ListOptions) (*v1a.ReplicationControllerList, error) { +func (mock *ReplicationControllerInterfaceMock) List(opts v1b.ListOptions) (*v1.ReplicationControllerList, error) { if mock.ListFunc == nil { panic("ReplicationControllerInterfaceMock.ListFunc: method is nil but ReplicationControllerInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *ReplicationControllerInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *ReplicationControllerInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ReplicationControllerList, error) { +func (mock *ReplicationControllerInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ReplicationControllerList, error) { if mock.ListNamespacedFunc == nil { panic("ReplicationControllerInterfaceMock.ListNamespacedFunc: method is nil but ReplicationControllerInterface.ListNamespaced was just called") } diff --git a/apis/core/v1/fakes/zz_generated_resource_quota_mock.go b/apis/core/v1/fakes/zz_generated_resource_quota_mock.go index ae61bfeb..3f563487 100644 --- a/apis/core/v1/fakes/zz_generated_resource_quota_mock.go +++ b/apis/core/v1/fakes/zz_generated_resource_quota_mock.go @@ -151,8 +151,6 @@ var ( lockResourceQuotaControllerMockGeneric sync.RWMutex lockResourceQuotaControllerMockInformer sync.RWMutex lockResourceQuotaControllerMockLister sync.RWMutex - lockResourceQuotaControllerMockStart sync.RWMutex - lockResourceQuotaControllerMockSync sync.RWMutex ) // Ensure, that ResourceQuotaControllerMock does implement ResourceQuotaController. @@ -192,12 +190,6 @@ var _ v1a.ResourceQuotaController = &ResourceQuotaControllerMock{} // ListerFunc: func() v1a.ResourceQuotaLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedResourceQuotaController in code that requires ResourceQuotaController @@ -232,12 +224,6 @@ type ResourceQuotaControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.ResourceQuotaLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type ResourceQuotaControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *ResourceQuotaControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ResourceQuotaControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ResourceQuotaControllerMock.StartFunc: method is nil but ResourceQuotaController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockResourceQuotaControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockResourceQuotaControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedResourceQuotaController.StartCalls()) -func (mock *ResourceQuotaControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockResourceQuotaControllerMockStart.RLock() - calls = mock.calls.Start - lockResourceQuotaControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ResourceQuotaControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ResourceQuotaControllerMock.SyncFunc: method is nil but ResourceQuotaController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockResourceQuotaControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockResourceQuotaControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedResourceQuotaController.SyncCalls()) -func (mock *ResourceQuotaControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockResourceQuotaControllerMockSync.RLock() - calls = mock.calls.Sync - lockResourceQuotaControllerMockSync.RUnlock() - return calls -} - var ( lockResourceQuotaInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockResourceQuotaInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.ResourceQuotaInterface = &ResourceQuotaInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ResourceQuota, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.ResourceQuotaList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.ResourceQuotaList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ResourceQuotaList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ResourceQuotaList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type ResourceQuotaInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ResourceQuota, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.ResourceQuotaList, error) + ListFunc func(opts v1b.ListOptions) (*v1.ResourceQuotaList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ResourceQuotaList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ResourceQuotaList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *ResourceQuotaInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *ResourceQuotaInterfaceMock) List(opts v1b.ListOptions) (*v1a.ResourceQuotaList, error) { +func (mock *ResourceQuotaInterfaceMock) List(opts v1b.ListOptions) (*v1.ResourceQuotaList, error) { if mock.ListFunc == nil { panic("ResourceQuotaInterfaceMock.ListFunc: method is nil but ResourceQuotaInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *ResourceQuotaInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *ResourceQuotaInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ResourceQuotaList, error) { +func (mock *ResourceQuotaInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ResourceQuotaList, error) { if mock.ListNamespacedFunc == nil { panic("ResourceQuotaInterfaceMock.ListNamespacedFunc: method is nil but ResourceQuotaInterface.ListNamespaced was just called") } diff --git a/apis/core/v1/fakes/zz_generated_secret_mock.go b/apis/core/v1/fakes/zz_generated_secret_mock.go index 97cc4dc4..335b29a2 100644 --- a/apis/core/v1/fakes/zz_generated_secret_mock.go +++ b/apis/core/v1/fakes/zz_generated_secret_mock.go @@ -151,8 +151,6 @@ var ( lockSecretControllerMockGeneric sync.RWMutex lockSecretControllerMockInformer sync.RWMutex lockSecretControllerMockLister sync.RWMutex - lockSecretControllerMockStart sync.RWMutex - lockSecretControllerMockSync sync.RWMutex ) // Ensure, that SecretControllerMock does implement SecretController. @@ -192,12 +190,6 @@ var _ v1a.SecretController = &SecretControllerMock{} // ListerFunc: func() v1a.SecretLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedSecretController in code that requires SecretController @@ -232,12 +224,6 @@ type SecretControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.SecretLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type SecretControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *SecretControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *SecretControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("SecretControllerMock.StartFunc: method is nil but SecretController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockSecretControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockSecretControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedSecretController.StartCalls()) -func (mock *SecretControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockSecretControllerMockStart.RLock() - calls = mock.calls.Start - lockSecretControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *SecretControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("SecretControllerMock.SyncFunc: method is nil but SecretController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockSecretControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockSecretControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedSecretController.SyncCalls()) -func (mock *SecretControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockSecretControllerMockSync.RLock() - calls = mock.calls.Sync - lockSecretControllerMockSync.RUnlock() - return calls -} - var ( lockSecretInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockSecretInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.SecretInterface = &SecretInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Secret, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.SecretList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.SecretList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.SecretList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.SecretList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type SecretInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Secret, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.SecretList, error) + ListFunc func(opts v1b.ListOptions) (*v1.SecretList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.SecretList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.SecretList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *SecretInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *SecretInterfaceMock) List(opts v1b.ListOptions) (*v1a.SecretList, error) { +func (mock *SecretInterfaceMock) List(opts v1b.ListOptions) (*v1.SecretList, error) { if mock.ListFunc == nil { panic("SecretInterfaceMock.ListFunc: method is nil but SecretInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *SecretInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *SecretInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.SecretList, error) { +func (mock *SecretInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.SecretList, error) { if mock.ListNamespacedFunc == nil { panic("SecretInterfaceMock.ListNamespacedFunc: method is nil but SecretInterface.ListNamespaced was just called") } diff --git a/apis/core/v1/fakes/zz_generated_service_account_mock.go b/apis/core/v1/fakes/zz_generated_service_account_mock.go index 7317e189..f1a8028c 100644 --- a/apis/core/v1/fakes/zz_generated_service_account_mock.go +++ b/apis/core/v1/fakes/zz_generated_service_account_mock.go @@ -151,8 +151,6 @@ var ( lockServiceAccountControllerMockGeneric sync.RWMutex lockServiceAccountControllerMockInformer sync.RWMutex lockServiceAccountControllerMockLister sync.RWMutex - lockServiceAccountControllerMockStart sync.RWMutex - lockServiceAccountControllerMockSync sync.RWMutex ) // Ensure, that ServiceAccountControllerMock does implement ServiceAccountController. @@ -192,12 +190,6 @@ var _ v1a.ServiceAccountController = &ServiceAccountControllerMock{} // ListerFunc: func() v1a.ServiceAccountLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedServiceAccountController in code that requires ServiceAccountController @@ -232,12 +224,6 @@ type ServiceAccountControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.ServiceAccountLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type ServiceAccountControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *ServiceAccountControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ServiceAccountControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ServiceAccountControllerMock.StartFunc: method is nil but ServiceAccountController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockServiceAccountControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockServiceAccountControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedServiceAccountController.StartCalls()) -func (mock *ServiceAccountControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockServiceAccountControllerMockStart.RLock() - calls = mock.calls.Start - lockServiceAccountControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ServiceAccountControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ServiceAccountControllerMock.SyncFunc: method is nil but ServiceAccountController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockServiceAccountControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockServiceAccountControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedServiceAccountController.SyncCalls()) -func (mock *ServiceAccountControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockServiceAccountControllerMockSync.RLock() - calls = mock.calls.Sync - lockServiceAccountControllerMockSync.RUnlock() - return calls -} - var ( lockServiceAccountInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockServiceAccountInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.ServiceAccountInterface = &ServiceAccountInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ServiceAccount, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.ServiceAccountList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.ServiceAccountList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ServiceAccountList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ServiceAccountList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type ServiceAccountInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ServiceAccount, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.ServiceAccountList, error) + ListFunc func(opts v1b.ListOptions) (*v1.ServiceAccountList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ServiceAccountList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ServiceAccountList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *ServiceAccountInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *ServiceAccountInterfaceMock) List(opts v1b.ListOptions) (*v1a.ServiceAccountList, error) { +func (mock *ServiceAccountInterfaceMock) List(opts v1b.ListOptions) (*v1.ServiceAccountList, error) { if mock.ListFunc == nil { panic("ServiceAccountInterfaceMock.ListFunc: method is nil but ServiceAccountInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *ServiceAccountInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *ServiceAccountInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ServiceAccountList, error) { +func (mock *ServiceAccountInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ServiceAccountList, error) { if mock.ListNamespacedFunc == nil { panic("ServiceAccountInterfaceMock.ListNamespacedFunc: method is nil but ServiceAccountInterface.ListNamespaced was just called") } diff --git a/apis/core/v1/fakes/zz_generated_service_mock.go b/apis/core/v1/fakes/zz_generated_service_mock.go index 84616192..ef0acecb 100644 --- a/apis/core/v1/fakes/zz_generated_service_mock.go +++ b/apis/core/v1/fakes/zz_generated_service_mock.go @@ -151,8 +151,6 @@ var ( lockServiceControllerMockGeneric sync.RWMutex lockServiceControllerMockInformer sync.RWMutex lockServiceControllerMockLister sync.RWMutex - lockServiceControllerMockStart sync.RWMutex - lockServiceControllerMockSync sync.RWMutex ) // Ensure, that ServiceControllerMock does implement ServiceController. @@ -192,12 +190,6 @@ var _ v1a.ServiceController = &ServiceControllerMock{} // ListerFunc: func() v1a.ServiceLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedServiceController in code that requires ServiceController @@ -232,12 +224,6 @@ type ServiceControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.ServiceLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type ServiceControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *ServiceControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ServiceControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ServiceControllerMock.StartFunc: method is nil but ServiceController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockServiceControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockServiceControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedServiceController.StartCalls()) -func (mock *ServiceControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockServiceControllerMockStart.RLock() - calls = mock.calls.Start - lockServiceControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ServiceControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ServiceControllerMock.SyncFunc: method is nil but ServiceController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockServiceControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockServiceControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedServiceController.SyncCalls()) -func (mock *ServiceControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockServiceControllerMockSync.RLock() - calls = mock.calls.Sync - lockServiceControllerMockSync.RUnlock() - return calls -} - var ( lockServiceInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockServiceInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.ServiceInterface = &ServiceInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Service, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.ServiceList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.ServiceList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ServiceList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ServiceList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type ServiceInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Service, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.ServiceList, error) + ListFunc func(opts v1b.ListOptions) (*v1.ServiceList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ServiceList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ServiceList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *ServiceInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *ServiceInterfaceMock) List(opts v1b.ListOptions) (*v1a.ServiceList, error) { +func (mock *ServiceInterfaceMock) List(opts v1b.ListOptions) (*v1.ServiceList, error) { if mock.ListFunc == nil { panic("ServiceInterfaceMock.ListFunc: method is nil but ServiceInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *ServiceInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *ServiceInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ServiceList, error) { +func (mock *ServiceInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ServiceList, error) { if mock.ListNamespacedFunc == nil { panic("ServiceInterfaceMock.ListNamespacedFunc: method is nil but ServiceInterface.ListNamespaced was just called") } diff --git a/apis/core/v1/zz_generated_component_status_controller.go b/apis/core/v1/zz_generated_component_status_controller.go index 5c7e424c..247ae58b 100644 --- a/apis/core/v1/zz_generated_component_status_controller.go +++ b/apis/core/v1/zz_generated_component_status_controller.go @@ -49,12 +49,6 @@ func NewComponentStatus(namespace, name string, obj v1.ComponentStatus) *v1.Comp return &obj } -type ComponentStatusList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ComponentStatus `json:"items"` -} - type ComponentStatusHandlerFunc func(key string, obj *v1.ComponentStatus) (runtime.Object, error) type ComponentStatusChangeHandlerFunc func(obj *v1.ComponentStatus) (runtime.Object, error) @@ -74,8 +68,6 @@ type ComponentStatusController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ComponentStatusHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ComponentStatusInterface interface { @@ -86,8 +78,8 @@ type ComponentStatusInterface interface { Update(*v1.ComponentStatus) (*v1.ComponentStatus, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*ComponentStatusList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*ComponentStatusList, error) + List(opts metav1.ListOptions) (*v1.ComponentStatusList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ComponentStatusList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() ComponentStatusController @@ -126,7 +118,7 @@ func (l *componentStatusLister) Get(namespace, name string) (*v1.ComponentStatus if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ComponentStatusGroupVersionKind.Group, - Resource: "componentStatus", + Resource: ComponentStatusGroupVersionResource.Resource, }, key) } return obj.(*v1.ComponentStatus), nil @@ -206,29 +198,16 @@ func (c componentStatusFactory) Object() runtime.Object { } func (c componentStatusFactory) List() runtime.Object { - return &ComponentStatusList{} + return &v1.ComponentStatusList{} } func (s *componentStatusClient) Controller() ComponentStatusController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.componentStatusControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ComponentStatusGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ComponentStatusGroupVersionResource, ComponentStatusGroupVersionKind.Kind, false)) - c = &componentStatusController{ + return &componentStatusController{ GenericController: genericController, } - - s.client.componentStatusControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type componentStatusClient struct { @@ -262,6 +241,11 @@ func (s *componentStatusClient) Update(o *v1.ComponentStatus) (*v1.ComponentStat return obj.(*v1.ComponentStatus), err } +func (s *componentStatusClient) UpdateStatus(o *v1.ComponentStatus) (*v1.ComponentStatus, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.ComponentStatus), err +} + func (s *componentStatusClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -270,14 +254,14 @@ func (s *componentStatusClient) DeleteNamespaced(namespace, name string, options return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *componentStatusClient) List(opts metav1.ListOptions) (*ComponentStatusList, error) { +func (s *componentStatusClient) List(opts metav1.ListOptions) (*v1.ComponentStatusList, error) { obj, err := s.objectClient.List(opts) - return obj.(*ComponentStatusList), err + return obj.(*v1.ComponentStatusList), err } -func (s *componentStatusClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ComponentStatusList, error) { +func (s *componentStatusClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ComponentStatusList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*ComponentStatusList), err + return obj.(*v1.ComponentStatusList), err } func (s *componentStatusClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/core/v1/zz_generated_config_map_controller.go b/apis/core/v1/zz_generated_config_map_controller.go index 1faf71fe..e2c55f27 100644 --- a/apis/core/v1/zz_generated_config_map_controller.go +++ b/apis/core/v1/zz_generated_config_map_controller.go @@ -50,12 +50,6 @@ func NewConfigMap(namespace, name string, obj v1.ConfigMap) *v1.ConfigMap { return &obj } -type ConfigMapList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ConfigMap `json:"items"` -} - type ConfigMapHandlerFunc func(key string, obj *v1.ConfigMap) (runtime.Object, error) type ConfigMapChangeHandlerFunc func(obj *v1.ConfigMap) (runtime.Object, error) @@ -75,8 +69,6 @@ type ConfigMapController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ConfigMapHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ConfigMapInterface interface { @@ -87,8 +79,8 @@ type ConfigMapInterface interface { Update(*v1.ConfigMap) (*v1.ConfigMap, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*ConfigMapList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*ConfigMapList, error) + List(opts metav1.ListOptions) (*v1.ConfigMapList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ConfigMapList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() ConfigMapController @@ -127,7 +119,7 @@ func (l *configMapLister) Get(namespace, name string) (*v1.ConfigMap, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ConfigMapGroupVersionKind.Group, - Resource: "configMap", + Resource: ConfigMapGroupVersionResource.Resource, }, key) } return obj.(*v1.ConfigMap), nil @@ -207,29 +199,16 @@ func (c configMapFactory) Object() runtime.Object { } func (c configMapFactory) List() runtime.Object { - return &ConfigMapList{} + return &v1.ConfigMapList{} } func (s *configMapClient) Controller() ConfigMapController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.configMapControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ConfigMapGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ConfigMapGroupVersionResource, ConfigMapGroupVersionKind.Kind, true)) - c = &configMapController{ + return &configMapController{ GenericController: genericController, } - - s.client.configMapControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type configMapClient struct { @@ -263,6 +242,11 @@ func (s *configMapClient) Update(o *v1.ConfigMap) (*v1.ConfigMap, error) { return obj.(*v1.ConfigMap), err } +func (s *configMapClient) UpdateStatus(o *v1.ConfigMap) (*v1.ConfigMap, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.ConfigMap), err +} + func (s *configMapClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *configMapClient) DeleteNamespaced(namespace, name string, options *meta return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *configMapClient) List(opts metav1.ListOptions) (*ConfigMapList, error) { +func (s *configMapClient) List(opts metav1.ListOptions) (*v1.ConfigMapList, error) { obj, err := s.objectClient.List(opts) - return obj.(*ConfigMapList), err + return obj.(*v1.ConfigMapList), err } -func (s *configMapClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ConfigMapList, error) { +func (s *configMapClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ConfigMapList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*ConfigMapList), err + return obj.(*v1.ConfigMapList), err } func (s *configMapClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/core/v1/zz_generated_deepcopy.go b/apis/core/v1/zz_generated_deepcopy.go deleted file mode 100644 index 933c92bf..00000000 --- a/apis/core/v1/zz_generated_deepcopy.go +++ /dev/null @@ -1,468 +0,0 @@ -package v1 - -import ( - corev1 "k8s.io/api/core/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ComponentStatusList) DeepCopyInto(out *ComponentStatusList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.ComponentStatus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentStatusList. -func (in *ComponentStatusList) DeepCopy() *ComponentStatusList { - if in == nil { - return nil - } - out := new(ComponentStatusList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ComponentStatusList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ConfigMapList) DeepCopyInto(out *ConfigMapList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.ConfigMap, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ConfigMapList. -func (in *ConfigMapList) DeepCopy() *ConfigMapList { - if in == nil { - return nil - } - out := new(ConfigMapList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ConfigMapList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointsList) DeepCopyInto(out *EndpointsList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.Endpoints, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointsList. -func (in *EndpointsList) DeepCopy() *EndpointsList { - if in == nil { - return nil - } - out := new(EndpointsList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EndpointsList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EventList) DeepCopyInto(out *EventList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.Event, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EventList. -func (in *EventList) DeepCopy() *EventList { - if in == nil { - return nil - } - out := new(EventList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *EventList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *LimitRangeList) DeepCopyInto(out *LimitRangeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.LimitRange, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new LimitRangeList. -func (in *LimitRangeList) DeepCopy() *LimitRangeList { - if in == nil { - return nil - } - out := new(LimitRangeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *LimitRangeList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NamespaceList) DeepCopyInto(out *NamespaceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.Namespace, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NamespaceList. -func (in *NamespaceList) DeepCopy() *NamespaceList { - if in == nil { - return nil - } - out := new(NamespaceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NamespaceList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NodeList) DeepCopyInto(out *NodeList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.Node, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeList. -func (in *NodeList) DeepCopy() *NodeList { - if in == nil { - return nil - } - out := new(NodeList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NodeList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PersistentVolumeClaimList) DeepCopyInto(out *PersistentVolumeClaimList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.PersistentVolumeClaim, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PersistentVolumeClaimList. -func (in *PersistentVolumeClaimList) DeepCopy() *PersistentVolumeClaimList { - if in == nil { - return nil - } - out := new(PersistentVolumeClaimList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PersistentVolumeClaimList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodList) DeepCopyInto(out *PodList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.Pod, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodList. -func (in *PodList) DeepCopy() *PodList { - if in == nil { - return nil - } - out := new(PodList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ReplicationControllerList) DeepCopyInto(out *ReplicationControllerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.ReplicationController, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ReplicationControllerList. -func (in *ReplicationControllerList) DeepCopy() *ReplicationControllerList { - if in == nil { - return nil - } - out := new(ReplicationControllerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ReplicationControllerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ResourceQuotaList) DeepCopyInto(out *ResourceQuotaList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.ResourceQuota, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ResourceQuotaList. -func (in *ResourceQuotaList) DeepCopy() *ResourceQuotaList { - if in == nil { - return nil - } - out := new(ResourceQuotaList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ResourceQuotaList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *SecretList) DeepCopyInto(out *SecretList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.Secret, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SecretList. -func (in *SecretList) DeepCopy() *SecretList { - if in == nil { - return nil - } - out := new(SecretList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *SecretList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceAccountList) DeepCopyInto(out *ServiceAccountList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.ServiceAccount, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceAccountList. -func (in *ServiceAccountList) DeepCopy() *ServiceAccountList { - if in == nil { - return nil - } - out := new(ServiceAccountList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceAccountList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceList) DeepCopyInto(out *ServiceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]corev1.Service, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceList. -func (in *ServiceList) DeepCopy() *ServiceList { - if in == nil { - return nil - } - out := new(ServiceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/apis/core/v1/zz_generated_endpoints_controller.go b/apis/core/v1/zz_generated_endpoints_controller.go index 25491dcd..77b4e3ed 100644 --- a/apis/core/v1/zz_generated_endpoints_controller.go +++ b/apis/core/v1/zz_generated_endpoints_controller.go @@ -50,12 +50,6 @@ func NewEndpoints(namespace, name string, obj v1.Endpoints) *v1.Endpoints { return &obj } -type EndpointsList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Endpoints `json:"items"` -} - type EndpointsHandlerFunc func(key string, obj *v1.Endpoints) (runtime.Object, error) type EndpointsChangeHandlerFunc func(obj *v1.Endpoints) (runtime.Object, error) @@ -75,8 +69,6 @@ type EndpointsController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler EndpointsHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type EndpointsInterface interface { @@ -87,8 +79,8 @@ type EndpointsInterface interface { Update(*v1.Endpoints) (*v1.Endpoints, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*EndpointsList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*EndpointsList, error) + List(opts metav1.ListOptions) (*v1.EndpointsList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.EndpointsList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() EndpointsController @@ -127,7 +119,7 @@ func (l *endpointsLister) Get(namespace, name string) (*v1.Endpoints, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: EndpointsGroupVersionKind.Group, - Resource: "endpoints", + Resource: EndpointsGroupVersionResource.Resource, }, key) } return obj.(*v1.Endpoints), nil @@ -207,29 +199,16 @@ func (c endpointsFactory) Object() runtime.Object { } func (c endpointsFactory) List() runtime.Object { - return &EndpointsList{} + return &v1.EndpointsList{} } func (s *endpointsClient) Controller() EndpointsController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.endpointsControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(EndpointsGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(EndpointsGroupVersionResource, EndpointsGroupVersionKind.Kind, true)) - c = &endpointsController{ + return &endpointsController{ GenericController: genericController, } - - s.client.endpointsControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type endpointsClient struct { @@ -263,6 +242,11 @@ func (s *endpointsClient) Update(o *v1.Endpoints) (*v1.Endpoints, error) { return obj.(*v1.Endpoints), err } +func (s *endpointsClient) UpdateStatus(o *v1.Endpoints) (*v1.Endpoints, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.Endpoints), err +} + func (s *endpointsClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *endpointsClient) DeleteNamespaced(namespace, name string, options *meta return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *endpointsClient) List(opts metav1.ListOptions) (*EndpointsList, error) { +func (s *endpointsClient) List(opts metav1.ListOptions) (*v1.EndpointsList, error) { obj, err := s.objectClient.List(opts) - return obj.(*EndpointsList), err + return obj.(*v1.EndpointsList), err } -func (s *endpointsClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*EndpointsList, error) { +func (s *endpointsClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.EndpointsList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*EndpointsList), err + return obj.(*v1.EndpointsList), err } func (s *endpointsClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/core/v1/zz_generated_event_controller.go b/apis/core/v1/zz_generated_event_controller.go index a9a660b4..e3eb7df6 100644 --- a/apis/core/v1/zz_generated_event_controller.go +++ b/apis/core/v1/zz_generated_event_controller.go @@ -49,12 +49,6 @@ func NewEvent(namespace, name string, obj v1.Event) *v1.Event { return &obj } -type EventList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Event `json:"items"` -} - type EventHandlerFunc func(key string, obj *v1.Event) (runtime.Object, error) type EventChangeHandlerFunc func(obj *v1.Event) (runtime.Object, error) @@ -74,8 +68,6 @@ type EventController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler EventHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type EventInterface interface { @@ -86,8 +78,8 @@ type EventInterface interface { Update(*v1.Event) (*v1.Event, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*EventList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*EventList, error) + List(opts metav1.ListOptions) (*v1.EventList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.EventList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() EventController @@ -126,7 +118,7 @@ func (l *eventLister) Get(namespace, name string) (*v1.Event, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: EventGroupVersionKind.Group, - Resource: "event", + Resource: EventGroupVersionResource.Resource, }, key) } return obj.(*v1.Event), nil @@ -206,29 +198,16 @@ func (c eventFactory) Object() runtime.Object { } func (c eventFactory) List() runtime.Object { - return &EventList{} + return &v1.EventList{} } func (s *eventClient) Controller() EventController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.eventControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(EventGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(EventGroupVersionResource, EventGroupVersionKind.Kind, false)) - c = &eventController{ + return &eventController{ GenericController: genericController, } - - s.client.eventControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type eventClient struct { @@ -262,6 +241,11 @@ func (s *eventClient) Update(o *v1.Event) (*v1.Event, error) { return obj.(*v1.Event), err } +func (s *eventClient) UpdateStatus(o *v1.Event) (*v1.Event, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.Event), err +} + func (s *eventClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -270,14 +254,14 @@ func (s *eventClient) DeleteNamespaced(namespace, name string, options *metav1.D return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *eventClient) List(opts metav1.ListOptions) (*EventList, error) { +func (s *eventClient) List(opts metav1.ListOptions) (*v1.EventList, error) { obj, err := s.objectClient.List(opts) - return obj.(*EventList), err + return obj.(*v1.EventList), err } -func (s *eventClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*EventList, error) { +func (s *eventClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.EventList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*EventList), err + return obj.(*v1.EventList), err } func (s *eventClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/core/v1/zz_generated_k8s_client.go b/apis/core/v1/zz_generated_k8s_client.go index 04f0dfa4..59e3044e 100644 --- a/apis/core/v1/zz_generated_k8s_client.go +++ b/apis/core/v1/zz_generated_k8s_client.go @@ -1,25 +1,12 @@ package v1 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" - "k8s.io/client-go/rest" -) - -type ( - contextKeyType struct{} - contextClientsKeyType struct{} ) type Interface interface { - RESTClient() rest.Interface - controller.Starter - NodesGetter ComponentStatusesGetter NamespacesGetter @@ -37,74 +24,24 @@ type Interface interface { } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - nodeControllers map[string]NodeController - componentStatusControllers map[string]ComponentStatusController - namespaceControllers map[string]NamespaceController - eventControllers map[string]EventController - endpointsControllers map[string]EndpointsController - persistentVolumeClaimControllers map[string]PersistentVolumeClaimController - podControllers map[string]PodController - serviceControllers map[string]ServiceController - secretControllers map[string]SecretController - configMapControllers map[string]ConfigMapController - serviceAccountControllers map[string]ServiceAccountController - replicationControllerControllers map[string]ReplicationControllerController - resourceQuotaControllers map[string]ResourceQuotaController - limitRangeControllers map[string]LimitRangeController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer - } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) - if err != nil { - return nil, err - } - +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - nodeControllers: map[string]NodeController{}, - componentStatusControllers: map[string]ComponentStatusController{}, - namespaceControllers: map[string]NamespaceController{}, - eventControllers: map[string]EventController{}, - endpointsControllers: map[string]EndpointsController{}, - persistentVolumeClaimControllers: map[string]PersistentVolumeClaimController{}, - podControllers: map[string]PodController{}, - serviceControllers: map[string]ServiceController{}, - secretControllers: map[string]SecretController{}, - configMapControllers: map[string]ConfigMapController{}, - serviceAccountControllers: map[string]ServiceAccountController{}, - replicationControllerControllers: map[string]ReplicationControllerController{}, - resourceQuotaControllers: map[string]ResourceQuotaController{}, - limitRangeControllers: map[string]LimitRangeController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type NodesGetter interface { Nodes(namespace string) NodeInterface } func (c *Client) Nodes(namespace string) NodeInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NodeResource, NodeGroupVersionKind, nodeFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NodeGroupVersionResource, NodeGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NodeResource, NodeGroupVersionKind, nodeFactory{}) return &nodeClient{ ns: namespace, client: c, @@ -117,7 +54,8 @@ type ComponentStatusesGetter interface { } func (c *Client) ComponentStatuses(namespace string) ComponentStatusInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ComponentStatusResource, ComponentStatusGroupVersionKind, componentStatusFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ComponentStatusGroupVersionResource, ComponentStatusGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ComponentStatusResource, ComponentStatusGroupVersionKind, componentStatusFactory{}) return &componentStatusClient{ ns: namespace, client: c, @@ -130,7 +68,8 @@ type NamespacesGetter interface { } func (c *Client) Namespaces(namespace string) NamespaceInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NamespaceResource, NamespaceGroupVersionKind, namespaceFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NamespaceGroupVersionResource, NamespaceGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NamespaceResource, NamespaceGroupVersionKind, namespaceFactory{}) return &namespaceClient{ ns: namespace, client: c, @@ -143,7 +82,8 @@ type EventsGetter interface { } func (c *Client) Events(namespace string) EventInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &EventResource, EventGroupVersionKind, eventFactory{}) + sharedClient := c.clientFactory.ForResourceKind(EventGroupVersionResource, EventGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &EventResource, EventGroupVersionKind, eventFactory{}) return &eventClient{ ns: namespace, client: c, @@ -156,7 +96,8 @@ type EndpointsGetter interface { } func (c *Client) Endpoints(namespace string) EndpointsInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &EndpointsResource, EndpointsGroupVersionKind, endpointsFactory{}) + sharedClient := c.clientFactory.ForResourceKind(EndpointsGroupVersionResource, EndpointsGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &EndpointsResource, EndpointsGroupVersionKind, endpointsFactory{}) return &endpointsClient{ ns: namespace, client: c, @@ -169,7 +110,8 @@ type PersistentVolumeClaimsGetter interface { } func (c *Client) PersistentVolumeClaims(namespace string) PersistentVolumeClaimInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PersistentVolumeClaimResource, PersistentVolumeClaimGroupVersionKind, persistentVolumeClaimFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PersistentVolumeClaimGroupVersionResource, PersistentVolumeClaimGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PersistentVolumeClaimResource, PersistentVolumeClaimGroupVersionKind, persistentVolumeClaimFactory{}) return &persistentVolumeClaimClient{ ns: namespace, client: c, @@ -182,7 +124,8 @@ type PodsGetter interface { } func (c *Client) Pods(namespace string) PodInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PodResource, PodGroupVersionKind, podFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PodGroupVersionResource, PodGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PodResource, PodGroupVersionKind, podFactory{}) return &podClient{ ns: namespace, client: c, @@ -195,7 +138,8 @@ type ServicesGetter interface { } func (c *Client) Services(namespace string) ServiceInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ServiceResource, ServiceGroupVersionKind, serviceFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ServiceGroupVersionResource, ServiceGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ServiceResource, ServiceGroupVersionKind, serviceFactory{}) return &serviceClient{ ns: namespace, client: c, @@ -208,7 +152,8 @@ type SecretsGetter interface { } func (c *Client) Secrets(namespace string) SecretInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SecretResource, SecretGroupVersionKind, secretFactory{}) + sharedClient := c.clientFactory.ForResourceKind(SecretGroupVersionResource, SecretGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &SecretResource, SecretGroupVersionKind, secretFactory{}) return &secretClient{ ns: namespace, client: c, @@ -221,7 +166,8 @@ type ConfigMapsGetter interface { } func (c *Client) ConfigMaps(namespace string) ConfigMapInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ConfigMapResource, ConfigMapGroupVersionKind, configMapFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ConfigMapGroupVersionResource, ConfigMapGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ConfigMapResource, ConfigMapGroupVersionKind, configMapFactory{}) return &configMapClient{ ns: namespace, client: c, @@ -234,7 +180,8 @@ type ServiceAccountsGetter interface { } func (c *Client) ServiceAccounts(namespace string) ServiceAccountInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ServiceAccountResource, ServiceAccountGroupVersionKind, serviceAccountFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ServiceAccountGroupVersionResource, ServiceAccountGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ServiceAccountResource, ServiceAccountGroupVersionKind, serviceAccountFactory{}) return &serviceAccountClient{ ns: namespace, client: c, @@ -247,7 +194,8 @@ type ReplicationControllersGetter interface { } func (c *Client) ReplicationControllers(namespace string) ReplicationControllerInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ReplicationControllerResource, ReplicationControllerGroupVersionKind, replicationControllerFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ReplicationControllerGroupVersionResource, ReplicationControllerGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ReplicationControllerResource, ReplicationControllerGroupVersionKind, replicationControllerFactory{}) return &replicationControllerClient{ ns: namespace, client: c, @@ -260,7 +208,8 @@ type ResourceQuotasGetter interface { } func (c *Client) ResourceQuotas(namespace string) ResourceQuotaInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ResourceQuotaResource, ResourceQuotaGroupVersionKind, resourceQuotaFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ResourceQuotaGroupVersionResource, ResourceQuotaGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ResourceQuotaResource, ResourceQuotaGroupVersionKind, resourceQuotaFactory{}) return &resourceQuotaClient{ ns: namespace, client: c, @@ -273,7 +222,8 @@ type LimitRangesGetter interface { } func (c *Client) LimitRanges(namespace string) LimitRangeInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &LimitRangeResource, LimitRangeGroupVersionKind, limitRangeFactory{}) + sharedClient := c.clientFactory.ForResourceKind(LimitRangeGroupVersionResource, LimitRangeGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &LimitRangeResource, LimitRangeGroupVersionKind, limitRangeFactory{}) return &limitRangeClient{ ns: namespace, client: c, diff --git a/apis/core/v1/zz_generated_limit_range_controller.go b/apis/core/v1/zz_generated_limit_range_controller.go index 00f4aaeb..1c01d108 100644 --- a/apis/core/v1/zz_generated_limit_range_controller.go +++ b/apis/core/v1/zz_generated_limit_range_controller.go @@ -50,12 +50,6 @@ func NewLimitRange(namespace, name string, obj v1.LimitRange) *v1.LimitRange { return &obj } -type LimitRangeList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.LimitRange `json:"items"` -} - type LimitRangeHandlerFunc func(key string, obj *v1.LimitRange) (runtime.Object, error) type LimitRangeChangeHandlerFunc func(obj *v1.LimitRange) (runtime.Object, error) @@ -75,8 +69,6 @@ type LimitRangeController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler LimitRangeHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type LimitRangeInterface interface { @@ -87,8 +79,8 @@ type LimitRangeInterface interface { Update(*v1.LimitRange) (*v1.LimitRange, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*LimitRangeList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*LimitRangeList, error) + List(opts metav1.ListOptions) (*v1.LimitRangeList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.LimitRangeList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() LimitRangeController @@ -127,7 +119,7 @@ func (l *limitRangeLister) Get(namespace, name string) (*v1.LimitRange, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: LimitRangeGroupVersionKind.Group, - Resource: "limitRange", + Resource: LimitRangeGroupVersionResource.Resource, }, key) } return obj.(*v1.LimitRange), nil @@ -207,29 +199,16 @@ func (c limitRangeFactory) Object() runtime.Object { } func (c limitRangeFactory) List() runtime.Object { - return &LimitRangeList{} + return &v1.LimitRangeList{} } func (s *limitRangeClient) Controller() LimitRangeController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.limitRangeControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(LimitRangeGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(LimitRangeGroupVersionResource, LimitRangeGroupVersionKind.Kind, true)) - c = &limitRangeController{ + return &limitRangeController{ GenericController: genericController, } - - s.client.limitRangeControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type limitRangeClient struct { @@ -263,6 +242,11 @@ func (s *limitRangeClient) Update(o *v1.LimitRange) (*v1.LimitRange, error) { return obj.(*v1.LimitRange), err } +func (s *limitRangeClient) UpdateStatus(o *v1.LimitRange) (*v1.LimitRange, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.LimitRange), err +} + func (s *limitRangeClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *limitRangeClient) DeleteNamespaced(namespace, name string, options *met return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *limitRangeClient) List(opts metav1.ListOptions) (*LimitRangeList, error) { +func (s *limitRangeClient) List(opts metav1.ListOptions) (*v1.LimitRangeList, error) { obj, err := s.objectClient.List(opts) - return obj.(*LimitRangeList), err + return obj.(*v1.LimitRangeList), err } -func (s *limitRangeClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*LimitRangeList, error) { +func (s *limitRangeClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.LimitRangeList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*LimitRangeList), err + return obj.(*v1.LimitRangeList), err } func (s *limitRangeClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/core/v1/zz_generated_namespace_controller.go b/apis/core/v1/zz_generated_namespace_controller.go index c29d690e..a4d09854 100644 --- a/apis/core/v1/zz_generated_namespace_controller.go +++ b/apis/core/v1/zz_generated_namespace_controller.go @@ -49,12 +49,6 @@ func NewNamespace(namespace, name string, obj v1.Namespace) *v1.Namespace { return &obj } -type NamespaceList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Namespace `json:"items"` -} - type NamespaceHandlerFunc func(key string, obj *v1.Namespace) (runtime.Object, error) type NamespaceChangeHandlerFunc func(obj *v1.Namespace) (runtime.Object, error) @@ -74,8 +68,6 @@ type NamespaceController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NamespaceHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NamespaceInterface interface { @@ -86,8 +78,8 @@ type NamespaceInterface interface { Update(*v1.Namespace) (*v1.Namespace, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*NamespaceList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*NamespaceList, error) + List(opts metav1.ListOptions) (*v1.NamespaceList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.NamespaceList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() NamespaceController @@ -126,7 +118,7 @@ func (l *namespaceLister) Get(namespace, name string) (*v1.Namespace, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NamespaceGroupVersionKind.Group, - Resource: "namespace", + Resource: NamespaceGroupVersionResource.Resource, }, key) } return obj.(*v1.Namespace), nil @@ -206,29 +198,16 @@ func (c namespaceFactory) Object() runtime.Object { } func (c namespaceFactory) List() runtime.Object { - return &NamespaceList{} + return &v1.NamespaceList{} } func (s *namespaceClient) Controller() NamespaceController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.namespaceControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NamespaceGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NamespaceGroupVersionResource, NamespaceGroupVersionKind.Kind, false)) - c = &namespaceController{ + return &namespaceController{ GenericController: genericController, } - - s.client.namespaceControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type namespaceClient struct { @@ -262,6 +241,11 @@ func (s *namespaceClient) Update(o *v1.Namespace) (*v1.Namespace, error) { return obj.(*v1.Namespace), err } +func (s *namespaceClient) UpdateStatus(o *v1.Namespace) (*v1.Namespace, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.Namespace), err +} + func (s *namespaceClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -270,14 +254,14 @@ func (s *namespaceClient) DeleteNamespaced(namespace, name string, options *meta return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *namespaceClient) List(opts metav1.ListOptions) (*NamespaceList, error) { +func (s *namespaceClient) List(opts metav1.ListOptions) (*v1.NamespaceList, error) { obj, err := s.objectClient.List(opts) - return obj.(*NamespaceList), err + return obj.(*v1.NamespaceList), err } -func (s *namespaceClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*NamespaceList, error) { +func (s *namespaceClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.NamespaceList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*NamespaceList), err + return obj.(*v1.NamespaceList), err } func (s *namespaceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/core/v1/zz_generated_node_controller.go b/apis/core/v1/zz_generated_node_controller.go index 3c600cd1..0e976440 100644 --- a/apis/core/v1/zz_generated_node_controller.go +++ b/apis/core/v1/zz_generated_node_controller.go @@ -49,12 +49,6 @@ func NewNode(namespace, name string, obj v1.Node) *v1.Node { return &obj } -type NodeList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Node `json:"items"` -} - type NodeHandlerFunc func(key string, obj *v1.Node) (runtime.Object, error) type NodeChangeHandlerFunc func(obj *v1.Node) (runtime.Object, error) @@ -74,8 +68,6 @@ type NodeController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NodeHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NodeInterface interface { @@ -86,8 +78,8 @@ type NodeInterface interface { Update(*v1.Node) (*v1.Node, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*NodeList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*NodeList, error) + List(opts metav1.ListOptions) (*v1.NodeList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.NodeList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() NodeController @@ -126,7 +118,7 @@ func (l *nodeLister) Get(namespace, name string) (*v1.Node, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NodeGroupVersionKind.Group, - Resource: "node", + Resource: NodeGroupVersionResource.Resource, }, key) } return obj.(*v1.Node), nil @@ -206,29 +198,16 @@ func (c nodeFactory) Object() runtime.Object { } func (c nodeFactory) List() runtime.Object { - return &NodeList{} + return &v1.NodeList{} } func (s *nodeClient) Controller() NodeController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.nodeControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NodeGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NodeGroupVersionResource, NodeGroupVersionKind.Kind, false)) - c = &nodeController{ + return &nodeController{ GenericController: genericController, } - - s.client.nodeControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type nodeClient struct { @@ -262,6 +241,11 @@ func (s *nodeClient) Update(o *v1.Node) (*v1.Node, error) { return obj.(*v1.Node), err } +func (s *nodeClient) UpdateStatus(o *v1.Node) (*v1.Node, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.Node), err +} + func (s *nodeClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -270,14 +254,14 @@ func (s *nodeClient) DeleteNamespaced(namespace, name string, options *metav1.De return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *nodeClient) List(opts metav1.ListOptions) (*NodeList, error) { +func (s *nodeClient) List(opts metav1.ListOptions) (*v1.NodeList, error) { obj, err := s.objectClient.List(opts) - return obj.(*NodeList), err + return obj.(*v1.NodeList), err } -func (s *nodeClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*NodeList, error) { +func (s *nodeClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.NodeList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*NodeList), err + return obj.(*v1.NodeList), err } func (s *nodeClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/core/v1/zz_generated_persistent_volume_claim_controller.go b/apis/core/v1/zz_generated_persistent_volume_claim_controller.go index e5098ba0..a7d7776a 100644 --- a/apis/core/v1/zz_generated_persistent_volume_claim_controller.go +++ b/apis/core/v1/zz_generated_persistent_volume_claim_controller.go @@ -50,12 +50,6 @@ func NewPersistentVolumeClaim(namespace, name string, obj v1.PersistentVolumeCla return &obj } -type PersistentVolumeClaimList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.PersistentVolumeClaim `json:"items"` -} - type PersistentVolumeClaimHandlerFunc func(key string, obj *v1.PersistentVolumeClaim) (runtime.Object, error) type PersistentVolumeClaimChangeHandlerFunc func(obj *v1.PersistentVolumeClaim) (runtime.Object, error) @@ -75,8 +69,6 @@ type PersistentVolumeClaimController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PersistentVolumeClaimHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PersistentVolumeClaimInterface interface { @@ -87,8 +79,8 @@ type PersistentVolumeClaimInterface interface { Update(*v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*PersistentVolumeClaimList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*PersistentVolumeClaimList, error) + List(opts metav1.ListOptions) (*v1.PersistentVolumeClaimList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.PersistentVolumeClaimList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() PersistentVolumeClaimController @@ -127,7 +119,7 @@ func (l *persistentVolumeClaimLister) Get(namespace, name string) (*v1.Persisten if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PersistentVolumeClaimGroupVersionKind.Group, - Resource: "persistentVolumeClaim", + Resource: PersistentVolumeClaimGroupVersionResource.Resource, }, key) } return obj.(*v1.PersistentVolumeClaim), nil @@ -207,29 +199,16 @@ func (c persistentVolumeClaimFactory) Object() runtime.Object { } func (c persistentVolumeClaimFactory) List() runtime.Object { - return &PersistentVolumeClaimList{} + return &v1.PersistentVolumeClaimList{} } func (s *persistentVolumeClaimClient) Controller() PersistentVolumeClaimController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.persistentVolumeClaimControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PersistentVolumeClaimGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PersistentVolumeClaimGroupVersionResource, PersistentVolumeClaimGroupVersionKind.Kind, true)) - c = &persistentVolumeClaimController{ + return &persistentVolumeClaimController{ GenericController: genericController, } - - s.client.persistentVolumeClaimControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type persistentVolumeClaimClient struct { @@ -263,6 +242,11 @@ func (s *persistentVolumeClaimClient) Update(o *v1.PersistentVolumeClaim) (*v1.P return obj.(*v1.PersistentVolumeClaim), err } +func (s *persistentVolumeClaimClient) UpdateStatus(o *v1.PersistentVolumeClaim) (*v1.PersistentVolumeClaim, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.PersistentVolumeClaim), err +} + func (s *persistentVolumeClaimClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *persistentVolumeClaimClient) DeleteNamespaced(namespace, name string, o return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *persistentVolumeClaimClient) List(opts metav1.ListOptions) (*PersistentVolumeClaimList, error) { +func (s *persistentVolumeClaimClient) List(opts metav1.ListOptions) (*v1.PersistentVolumeClaimList, error) { obj, err := s.objectClient.List(opts) - return obj.(*PersistentVolumeClaimList), err + return obj.(*v1.PersistentVolumeClaimList), err } -func (s *persistentVolumeClaimClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*PersistentVolumeClaimList, error) { +func (s *persistentVolumeClaimClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.PersistentVolumeClaimList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*PersistentVolumeClaimList), err + return obj.(*v1.PersistentVolumeClaimList), err } func (s *persistentVolumeClaimClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/core/v1/zz_generated_pod_controller.go b/apis/core/v1/zz_generated_pod_controller.go index a2b55e05..742166da 100644 --- a/apis/core/v1/zz_generated_pod_controller.go +++ b/apis/core/v1/zz_generated_pod_controller.go @@ -50,12 +50,6 @@ func NewPod(namespace, name string, obj v1.Pod) *v1.Pod { return &obj } -type PodList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Pod `json:"items"` -} - type PodHandlerFunc func(key string, obj *v1.Pod) (runtime.Object, error) type PodChangeHandlerFunc func(obj *v1.Pod) (runtime.Object, error) @@ -75,8 +69,6 @@ type PodController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PodHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PodInterface interface { @@ -87,8 +79,8 @@ type PodInterface interface { Update(*v1.Pod) (*v1.Pod, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*PodList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*PodList, error) + List(opts metav1.ListOptions) (*v1.PodList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.PodList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() PodController @@ -127,7 +119,7 @@ func (l *podLister) Get(namespace, name string) (*v1.Pod, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PodGroupVersionKind.Group, - Resource: "pod", + Resource: PodGroupVersionResource.Resource, }, key) } return obj.(*v1.Pod), nil @@ -207,29 +199,16 @@ func (c podFactory) Object() runtime.Object { } func (c podFactory) List() runtime.Object { - return &PodList{} + return &v1.PodList{} } func (s *podClient) Controller() PodController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.podControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PodGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PodGroupVersionResource, PodGroupVersionKind.Kind, true)) - c = &podController{ + return &podController{ GenericController: genericController, } - - s.client.podControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type podClient struct { @@ -263,6 +242,11 @@ func (s *podClient) Update(o *v1.Pod) (*v1.Pod, error) { return obj.(*v1.Pod), err } +func (s *podClient) UpdateStatus(o *v1.Pod) (*v1.Pod, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.Pod), err +} + func (s *podClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *podClient) DeleteNamespaced(namespace, name string, options *metav1.Del return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *podClient) List(opts metav1.ListOptions) (*PodList, error) { +func (s *podClient) List(opts metav1.ListOptions) (*v1.PodList, error) { obj, err := s.objectClient.List(opts) - return obj.(*PodList), err + return obj.(*v1.PodList), err } -func (s *podClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*PodList, error) { +func (s *podClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.PodList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*PodList), err + return obj.(*v1.PodList), err } func (s *podClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/core/v1/zz_generated_replication_controller_controller.go b/apis/core/v1/zz_generated_replication_controller_controller.go index 97a7d09c..52fb9377 100644 --- a/apis/core/v1/zz_generated_replication_controller_controller.go +++ b/apis/core/v1/zz_generated_replication_controller_controller.go @@ -50,12 +50,6 @@ func NewReplicationController(namespace, name string, obj v1.ReplicationControll return &obj } -type ReplicationControllerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ReplicationController `json:"items"` -} - type ReplicationControllerHandlerFunc func(key string, obj *v1.ReplicationController) (runtime.Object, error) type ReplicationControllerChangeHandlerFunc func(obj *v1.ReplicationController) (runtime.Object, error) @@ -75,8 +69,6 @@ type ReplicationControllerController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ReplicationControllerHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ReplicationControllerInterface interface { @@ -87,8 +79,8 @@ type ReplicationControllerInterface interface { Update(*v1.ReplicationController) (*v1.ReplicationController, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*ReplicationControllerList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*ReplicationControllerList, error) + List(opts metav1.ListOptions) (*v1.ReplicationControllerList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ReplicationControllerList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() ReplicationControllerController @@ -127,7 +119,7 @@ func (l *replicationControllerLister) Get(namespace, name string) (*v1.Replicati if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ReplicationControllerGroupVersionKind.Group, - Resource: "replicationController", + Resource: ReplicationControllerGroupVersionResource.Resource, }, key) } return obj.(*v1.ReplicationController), nil @@ -207,29 +199,16 @@ func (c replicationControllerFactory) Object() runtime.Object { } func (c replicationControllerFactory) List() runtime.Object { - return &ReplicationControllerList{} + return &v1.ReplicationControllerList{} } func (s *replicationControllerClient) Controller() ReplicationControllerController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.replicationControllerControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ReplicationControllerGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ReplicationControllerGroupVersionResource, ReplicationControllerGroupVersionKind.Kind, true)) - c = &replicationControllerController{ + return &replicationControllerController{ GenericController: genericController, } - - s.client.replicationControllerControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type replicationControllerClient struct { @@ -263,6 +242,11 @@ func (s *replicationControllerClient) Update(o *v1.ReplicationController) (*v1.R return obj.(*v1.ReplicationController), err } +func (s *replicationControllerClient) UpdateStatus(o *v1.ReplicationController) (*v1.ReplicationController, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.ReplicationController), err +} + func (s *replicationControllerClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *replicationControllerClient) DeleteNamespaced(namespace, name string, o return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *replicationControllerClient) List(opts metav1.ListOptions) (*ReplicationControllerList, error) { +func (s *replicationControllerClient) List(opts metav1.ListOptions) (*v1.ReplicationControllerList, error) { obj, err := s.objectClient.List(opts) - return obj.(*ReplicationControllerList), err + return obj.(*v1.ReplicationControllerList), err } -func (s *replicationControllerClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ReplicationControllerList, error) { +func (s *replicationControllerClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ReplicationControllerList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*ReplicationControllerList), err + return obj.(*v1.ReplicationControllerList), err } func (s *replicationControllerClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/core/v1/zz_generated_resource_quota_controller.go b/apis/core/v1/zz_generated_resource_quota_controller.go index 36e8b790..632a4f38 100644 --- a/apis/core/v1/zz_generated_resource_quota_controller.go +++ b/apis/core/v1/zz_generated_resource_quota_controller.go @@ -50,12 +50,6 @@ func NewResourceQuota(namespace, name string, obj v1.ResourceQuota) *v1.Resource return &obj } -type ResourceQuotaList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ResourceQuota `json:"items"` -} - type ResourceQuotaHandlerFunc func(key string, obj *v1.ResourceQuota) (runtime.Object, error) type ResourceQuotaChangeHandlerFunc func(obj *v1.ResourceQuota) (runtime.Object, error) @@ -75,8 +69,6 @@ type ResourceQuotaController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ResourceQuotaHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ResourceQuotaInterface interface { @@ -87,8 +79,8 @@ type ResourceQuotaInterface interface { Update(*v1.ResourceQuota) (*v1.ResourceQuota, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*ResourceQuotaList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*ResourceQuotaList, error) + List(opts metav1.ListOptions) (*v1.ResourceQuotaList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ResourceQuotaList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() ResourceQuotaController @@ -127,7 +119,7 @@ func (l *resourceQuotaLister) Get(namespace, name string) (*v1.ResourceQuota, er if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ResourceQuotaGroupVersionKind.Group, - Resource: "resourceQuota", + Resource: ResourceQuotaGroupVersionResource.Resource, }, key) } return obj.(*v1.ResourceQuota), nil @@ -207,29 +199,16 @@ func (c resourceQuotaFactory) Object() runtime.Object { } func (c resourceQuotaFactory) List() runtime.Object { - return &ResourceQuotaList{} + return &v1.ResourceQuotaList{} } func (s *resourceQuotaClient) Controller() ResourceQuotaController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.resourceQuotaControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ResourceQuotaGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ResourceQuotaGroupVersionResource, ResourceQuotaGroupVersionKind.Kind, true)) - c = &resourceQuotaController{ + return &resourceQuotaController{ GenericController: genericController, } - - s.client.resourceQuotaControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type resourceQuotaClient struct { @@ -263,6 +242,11 @@ func (s *resourceQuotaClient) Update(o *v1.ResourceQuota) (*v1.ResourceQuota, er return obj.(*v1.ResourceQuota), err } +func (s *resourceQuotaClient) UpdateStatus(o *v1.ResourceQuota) (*v1.ResourceQuota, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.ResourceQuota), err +} + func (s *resourceQuotaClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *resourceQuotaClient) DeleteNamespaced(namespace, name string, options * return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *resourceQuotaClient) List(opts metav1.ListOptions) (*ResourceQuotaList, error) { +func (s *resourceQuotaClient) List(opts metav1.ListOptions) (*v1.ResourceQuotaList, error) { obj, err := s.objectClient.List(opts) - return obj.(*ResourceQuotaList), err + return obj.(*v1.ResourceQuotaList), err } -func (s *resourceQuotaClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ResourceQuotaList, error) { +func (s *resourceQuotaClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ResourceQuotaList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*ResourceQuotaList), err + return obj.(*v1.ResourceQuotaList), err } func (s *resourceQuotaClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/core/v1/zz_generated_scheme.go b/apis/core/v1/zz_generated_scheme.go index a9cf35a7..9a928575 100644 --- a/apis/core/v1/zz_generated_scheme.go +++ b/apis/core/v1/zz_generated_scheme.go @@ -1,8 +1,6 @@ package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -23,32 +21,3 @@ func Kind(kind string) schema.GroupKind { func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - // TODO this gets cleaned up when the types are fixed - scheme.AddKnownTypes(SchemeGroupVersion, - - &NodeList{}, - &ComponentStatusList{}, - &NamespaceList{}, - &EventList{}, - &EndpointsList{}, - &PersistentVolumeClaimList{}, - &PodList{}, - &ServiceList{}, - &SecretList{}, - &ConfigMapList{}, - &ServiceAccountList{}, - &ReplicationControllerList{}, - &ResourceQuotaList{}, - &LimitRangeList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/apis/core/v1/zz_generated_secret_controller.go b/apis/core/v1/zz_generated_secret_controller.go index c7d14522..99b98733 100644 --- a/apis/core/v1/zz_generated_secret_controller.go +++ b/apis/core/v1/zz_generated_secret_controller.go @@ -50,12 +50,6 @@ func NewSecret(namespace, name string, obj v1.Secret) *v1.Secret { return &obj } -type SecretList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Secret `json:"items"` -} - type SecretHandlerFunc func(key string, obj *v1.Secret) (runtime.Object, error) type SecretChangeHandlerFunc func(obj *v1.Secret) (runtime.Object, error) @@ -75,8 +69,6 @@ type SecretController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler SecretHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type SecretInterface interface { @@ -87,8 +79,8 @@ type SecretInterface interface { Update(*v1.Secret) (*v1.Secret, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*SecretList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*SecretList, error) + List(opts metav1.ListOptions) (*v1.SecretList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.SecretList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() SecretController @@ -127,7 +119,7 @@ func (l *secretLister) Get(namespace, name string) (*v1.Secret, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: SecretGroupVersionKind.Group, - Resource: "secret", + Resource: SecretGroupVersionResource.Resource, }, key) } return obj.(*v1.Secret), nil @@ -207,29 +199,16 @@ func (c secretFactory) Object() runtime.Object { } func (c secretFactory) List() runtime.Object { - return &SecretList{} + return &v1.SecretList{} } func (s *secretClient) Controller() SecretController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.secretControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(SecretGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(SecretGroupVersionResource, SecretGroupVersionKind.Kind, true)) - c = &secretController{ + return &secretController{ GenericController: genericController, } - - s.client.secretControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type secretClient struct { @@ -263,6 +242,11 @@ func (s *secretClient) Update(o *v1.Secret) (*v1.Secret, error) { return obj.(*v1.Secret), err } +func (s *secretClient) UpdateStatus(o *v1.Secret) (*v1.Secret, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.Secret), err +} + func (s *secretClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *secretClient) DeleteNamespaced(namespace, name string, options *metav1. return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *secretClient) List(opts metav1.ListOptions) (*SecretList, error) { +func (s *secretClient) List(opts metav1.ListOptions) (*v1.SecretList, error) { obj, err := s.objectClient.List(opts) - return obj.(*SecretList), err + return obj.(*v1.SecretList), err } -func (s *secretClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*SecretList, error) { +func (s *secretClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.SecretList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*SecretList), err + return obj.(*v1.SecretList), err } func (s *secretClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/core/v1/zz_generated_service_account_controller.go b/apis/core/v1/zz_generated_service_account_controller.go index d92b21a6..b3a384fe 100644 --- a/apis/core/v1/zz_generated_service_account_controller.go +++ b/apis/core/v1/zz_generated_service_account_controller.go @@ -50,12 +50,6 @@ func NewServiceAccount(namespace, name string, obj v1.ServiceAccount) *v1.Servic return &obj } -type ServiceAccountList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ServiceAccount `json:"items"` -} - type ServiceAccountHandlerFunc func(key string, obj *v1.ServiceAccount) (runtime.Object, error) type ServiceAccountChangeHandlerFunc func(obj *v1.ServiceAccount) (runtime.Object, error) @@ -75,8 +69,6 @@ type ServiceAccountController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ServiceAccountHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ServiceAccountInterface interface { @@ -87,8 +79,8 @@ type ServiceAccountInterface interface { Update(*v1.ServiceAccount) (*v1.ServiceAccount, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*ServiceAccountList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*ServiceAccountList, error) + List(opts metav1.ListOptions) (*v1.ServiceAccountList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ServiceAccountList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() ServiceAccountController @@ -127,7 +119,7 @@ func (l *serviceAccountLister) Get(namespace, name string) (*v1.ServiceAccount, if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ServiceAccountGroupVersionKind.Group, - Resource: "serviceAccount", + Resource: ServiceAccountGroupVersionResource.Resource, }, key) } return obj.(*v1.ServiceAccount), nil @@ -207,29 +199,16 @@ func (c serviceAccountFactory) Object() runtime.Object { } func (c serviceAccountFactory) List() runtime.Object { - return &ServiceAccountList{} + return &v1.ServiceAccountList{} } func (s *serviceAccountClient) Controller() ServiceAccountController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.serviceAccountControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ServiceAccountGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ServiceAccountGroupVersionResource, ServiceAccountGroupVersionKind.Kind, true)) - c = &serviceAccountController{ + return &serviceAccountController{ GenericController: genericController, } - - s.client.serviceAccountControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type serviceAccountClient struct { @@ -263,6 +242,11 @@ func (s *serviceAccountClient) Update(o *v1.ServiceAccount) (*v1.ServiceAccount, return obj.(*v1.ServiceAccount), err } +func (s *serviceAccountClient) UpdateStatus(o *v1.ServiceAccount) (*v1.ServiceAccount, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.ServiceAccount), err +} + func (s *serviceAccountClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *serviceAccountClient) DeleteNamespaced(namespace, name string, options return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *serviceAccountClient) List(opts metav1.ListOptions) (*ServiceAccountList, error) { +func (s *serviceAccountClient) List(opts metav1.ListOptions) (*v1.ServiceAccountList, error) { obj, err := s.objectClient.List(opts) - return obj.(*ServiceAccountList), err + return obj.(*v1.ServiceAccountList), err } -func (s *serviceAccountClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ServiceAccountList, error) { +func (s *serviceAccountClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ServiceAccountList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*ServiceAccountList), err + return obj.(*v1.ServiceAccountList), err } func (s *serviceAccountClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/core/v1/zz_generated_service_controller.go b/apis/core/v1/zz_generated_service_controller.go index a949fec3..6fdb35c1 100644 --- a/apis/core/v1/zz_generated_service_controller.go +++ b/apis/core/v1/zz_generated_service_controller.go @@ -50,12 +50,6 @@ func NewService(namespace, name string, obj v1.Service) *v1.Service { return &obj } -type ServiceList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Service `json:"items"` -} - type ServiceHandlerFunc func(key string, obj *v1.Service) (runtime.Object, error) type ServiceChangeHandlerFunc func(obj *v1.Service) (runtime.Object, error) @@ -75,8 +69,6 @@ type ServiceController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ServiceHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ServiceInterface interface { @@ -87,8 +79,8 @@ type ServiceInterface interface { Update(*v1.Service) (*v1.Service, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*ServiceList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*ServiceList, error) + List(opts metav1.ListOptions) (*v1.ServiceList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ServiceList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() ServiceController @@ -127,7 +119,7 @@ func (l *serviceLister) Get(namespace, name string) (*v1.Service, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ServiceGroupVersionKind.Group, - Resource: "service", + Resource: ServiceGroupVersionResource.Resource, }, key) } return obj.(*v1.Service), nil @@ -207,29 +199,16 @@ func (c serviceFactory) Object() runtime.Object { } func (c serviceFactory) List() runtime.Object { - return &ServiceList{} + return &v1.ServiceList{} } func (s *serviceClient) Controller() ServiceController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.serviceControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ServiceGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ServiceGroupVersionResource, ServiceGroupVersionKind.Kind, true)) - c = &serviceController{ + return &serviceController{ GenericController: genericController, } - - s.client.serviceControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type serviceClient struct { @@ -263,6 +242,11 @@ func (s *serviceClient) Update(o *v1.Service) (*v1.Service, error) { return obj.(*v1.Service), err } +func (s *serviceClient) UpdateStatus(o *v1.Service) (*v1.Service, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.Service), err +} + func (s *serviceClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *serviceClient) DeleteNamespaced(namespace, name string, options *metav1 return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *serviceClient) List(opts metav1.ListOptions) (*ServiceList, error) { +func (s *serviceClient) List(opts metav1.ListOptions) (*v1.ServiceList, error) { obj, err := s.objectClient.List(opts) - return obj.(*ServiceList), err + return obj.(*v1.ServiceList), err } -func (s *serviceClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ServiceList, error) { +func (s *serviceClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ServiceList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*ServiceList), err + return obj.(*v1.ServiceList), err } func (s *serviceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/extensions/v1beta1/fakes/zz_generated_ingress_mock.go b/apis/extensions/v1beta1/fakes/zz_generated_ingress_mock.go index 20cb946c..d4332ac0 100644 --- a/apis/extensions/v1beta1/fakes/zz_generated_ingress_mock.go +++ b/apis/extensions/v1beta1/fakes/zz_generated_ingress_mock.go @@ -151,8 +151,6 @@ var ( lockIngressControllerMockGeneric sync.RWMutex lockIngressControllerMockInformer sync.RWMutex lockIngressControllerMockLister sync.RWMutex - lockIngressControllerMockStart sync.RWMutex - lockIngressControllerMockSync sync.RWMutex ) // Ensure, that IngressControllerMock does implement IngressController. @@ -192,12 +190,6 @@ var _ v1beta1a.IngressController = &IngressControllerMock{} // ListerFunc: func() v1beta1a.IngressLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedIngressController in code that requires IngressController @@ -232,12 +224,6 @@ type IngressControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1beta1a.IngressLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type IngressControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *IngressControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *IngressControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("IngressControllerMock.StartFunc: method is nil but IngressController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockIngressControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockIngressControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedIngressController.StartCalls()) -func (mock *IngressControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockIngressControllerMockStart.RLock() - calls = mock.calls.Start - lockIngressControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *IngressControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("IngressControllerMock.SyncFunc: method is nil but IngressController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockIngressControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockIngressControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedIngressController.SyncCalls()) -func (mock *IngressControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockIngressControllerMockSync.RLock() - calls = mock.calls.Sync - lockIngressControllerMockSync.RUnlock() - return calls -} - var ( lockIngressInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockIngressInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1beta1a.IngressInterface = &IngressInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v1beta1.Ingress, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1.ListOptions) (*v1beta1a.IngressList, error) { +// ListFunc: func(opts v1.ListOptions) (*v1beta1.IngressList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v1beta1a.IngressList, error) { +// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v1beta1.IngressList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type IngressInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v1beta1.Ingress, error) // ListFunc mocks the List method. - ListFunc func(opts v1.ListOptions) (*v1beta1a.IngressList, error) + ListFunc func(opts v1.ListOptions) (*v1beta1.IngressList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1beta1a.IngressList, error) + ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1beta1.IngressList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *IngressInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *IngressInterfaceMock) List(opts v1.ListOptions) (*v1beta1a.IngressList, error) { +func (mock *IngressInterfaceMock) List(opts v1.ListOptions) (*v1beta1.IngressList, error) { if mock.ListFunc == nil { panic("IngressInterfaceMock.ListFunc: method is nil but IngressInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *IngressInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *IngressInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1beta1a.IngressList, error) { +func (mock *IngressInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1beta1.IngressList, error) { if mock.ListNamespacedFunc == nil { panic("IngressInterfaceMock.ListNamespacedFunc: method is nil but IngressInterface.ListNamespaced was just called") } diff --git a/apis/extensions/v1beta1/zz_generated_deepcopy.go b/apis/extensions/v1beta1/zz_generated_deepcopy.go deleted file mode 100644 index c998711b..00000000 --- a/apis/extensions/v1beta1/zz_generated_deepcopy.go +++ /dev/null @@ -1,39 +0,0 @@ -package v1beta1 - -import ( - extensionsv1beta1 "k8s.io/api/extensions/v1beta1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *IngressList) DeepCopyInto(out *IngressList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]extensionsv1beta1.Ingress, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new IngressList. -func (in *IngressList) DeepCopy() *IngressList { - if in == nil { - return nil - } - out := new(IngressList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *IngressList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/apis/extensions/v1beta1/zz_generated_ingress_controller.go b/apis/extensions/v1beta1/zz_generated_ingress_controller.go index 9ba37b09..542fd7a1 100644 --- a/apis/extensions/v1beta1/zz_generated_ingress_controller.go +++ b/apis/extensions/v1beta1/zz_generated_ingress_controller.go @@ -50,12 +50,6 @@ func NewIngress(namespace, name string, obj v1beta1.Ingress) *v1beta1.Ingress { return &obj } -type IngressList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1beta1.Ingress `json:"items"` -} - type IngressHandlerFunc func(key string, obj *v1beta1.Ingress) (runtime.Object, error) type IngressChangeHandlerFunc func(obj *v1beta1.Ingress) (runtime.Object, error) @@ -75,8 +69,6 @@ type IngressController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler IngressHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type IngressInterface interface { @@ -87,8 +79,8 @@ type IngressInterface interface { Update(*v1beta1.Ingress) (*v1beta1.Ingress, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*IngressList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*IngressList, error) + List(opts metav1.ListOptions) (*v1beta1.IngressList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1beta1.IngressList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() IngressController @@ -127,7 +119,7 @@ func (l *ingressLister) Get(namespace, name string) (*v1beta1.Ingress, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: IngressGroupVersionKind.Group, - Resource: "ingress", + Resource: IngressGroupVersionResource.Resource, }, key) } return obj.(*v1beta1.Ingress), nil @@ -207,29 +199,16 @@ func (c ingressFactory) Object() runtime.Object { } func (c ingressFactory) List() runtime.Object { - return &IngressList{} + return &v1beta1.IngressList{} } func (s *ingressClient) Controller() IngressController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.ingressControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(IngressGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(IngressGroupVersionResource, IngressGroupVersionKind.Kind, true)) - c = &ingressController{ + return &ingressController{ GenericController: genericController, } - - s.client.ingressControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type ingressClient struct { @@ -263,6 +242,11 @@ func (s *ingressClient) Update(o *v1beta1.Ingress) (*v1beta1.Ingress, error) { return obj.(*v1beta1.Ingress), err } +func (s *ingressClient) UpdateStatus(o *v1beta1.Ingress) (*v1beta1.Ingress, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1beta1.Ingress), err +} + func (s *ingressClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *ingressClient) DeleteNamespaced(namespace, name string, options *metav1 return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *ingressClient) List(opts metav1.ListOptions) (*IngressList, error) { +func (s *ingressClient) List(opts metav1.ListOptions) (*v1beta1.IngressList, error) { obj, err := s.objectClient.List(opts) - return obj.(*IngressList), err + return obj.(*v1beta1.IngressList), err } -func (s *ingressClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*IngressList, error) { +func (s *ingressClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1beta1.IngressList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*IngressList), err + return obj.(*v1beta1.IngressList), err } func (s *ingressClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/extensions/v1beta1/zz_generated_k8s_client.go b/apis/extensions/v1beta1/zz_generated_k8s_client.go index 84fbc856..28ae82a8 100644 --- a/apis/extensions/v1beta1/zz_generated_k8s_client.go +++ b/apis/extensions/v1beta1/zz_generated_k8s_client.go @@ -1,71 +1,34 @@ package v1beta1 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" - "k8s.io/client-go/rest" -) - -type ( - contextKeyType struct{} - contextClientsKeyType struct{} ) type Interface interface { - RESTClient() rest.Interface - controller.Starter - IngressesGetter } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - ingressControllers map[string]IngressController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer - } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) - if err != nil { - return nil, err - } - +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - ingressControllers: map[string]IngressController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type IngressesGetter interface { Ingresses(namespace string) IngressInterface } func (c *Client) Ingresses(namespace string) IngressInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &IngressResource, IngressGroupVersionKind, ingressFactory{}) + sharedClient := c.clientFactory.ForResourceKind(IngressGroupVersionResource, IngressGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &IngressResource, IngressGroupVersionKind, ingressFactory{}) return &ingressClient{ ns: namespace, client: c, diff --git a/apis/extensions/v1beta1/zz_generated_scheme.go b/apis/extensions/v1beta1/zz_generated_scheme.go index 507b45f0..91c5b3aa 100644 --- a/apis/extensions/v1beta1/zz_generated_scheme.go +++ b/apis/extensions/v1beta1/zz_generated_scheme.go @@ -1,8 +1,6 @@ package v1beta1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -23,19 +21,3 @@ func Kind(kind string) schema.GroupKind { func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - // TODO this gets cleaned up when the types are fixed - scheme.AddKnownTypes(SchemeGroupVersion, - - &IngressList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_auth_config_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_auth_config_mock.go index a2fa8eaf..b100e2e4 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_auth_config_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_auth_config_mock.go @@ -150,8 +150,6 @@ var ( lockAuthConfigControllerMockGeneric sync.RWMutex lockAuthConfigControllerMockInformer sync.RWMutex lockAuthConfigControllerMockLister sync.RWMutex - lockAuthConfigControllerMockStart sync.RWMutex - lockAuthConfigControllerMockSync sync.RWMutex ) // Ensure, that AuthConfigControllerMock does implement AuthConfigController. @@ -191,12 +189,6 @@ var _ v3.AuthConfigController = &AuthConfigControllerMock{} // ListerFunc: func() v3.AuthConfigLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedAuthConfigController in code that requires AuthConfigController @@ -231,12 +223,6 @@ type AuthConfigControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.AuthConfigLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type AuthConfigControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *AuthConfigControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *AuthConfigControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("AuthConfigControllerMock.StartFunc: method is nil but AuthConfigController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockAuthConfigControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockAuthConfigControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedAuthConfigController.StartCalls()) -func (mock *AuthConfigControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockAuthConfigControllerMockStart.RLock() - calls = mock.calls.Start - lockAuthConfigControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *AuthConfigControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("AuthConfigControllerMock.SyncFunc: method is nil but AuthConfigController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockAuthConfigControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockAuthConfigControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedAuthConfigController.SyncCalls()) -func (mock *AuthConfigControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockAuthConfigControllerMockSync.RLock() - calls = mock.calls.Sync - lockAuthConfigControllerMockSync.RUnlock() - return calls -} - var ( lockAuthConfigInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockAuthConfigInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_catalog_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_catalog_mock.go index 0ad205d6..3a319d9e 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_catalog_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_catalog_mock.go @@ -150,8 +150,6 @@ var ( lockCatalogControllerMockGeneric sync.RWMutex lockCatalogControllerMockInformer sync.RWMutex lockCatalogControllerMockLister sync.RWMutex - lockCatalogControllerMockStart sync.RWMutex - lockCatalogControllerMockSync sync.RWMutex ) // Ensure, that CatalogControllerMock does implement CatalogController. @@ -191,12 +189,6 @@ var _ v3.CatalogController = &CatalogControllerMock{} // ListerFunc: func() v3.CatalogLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedCatalogController in code that requires CatalogController @@ -231,12 +223,6 @@ type CatalogControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.CatalogLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type CatalogControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *CatalogControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *CatalogControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("CatalogControllerMock.StartFunc: method is nil but CatalogController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockCatalogControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockCatalogControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedCatalogController.StartCalls()) -func (mock *CatalogControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockCatalogControllerMockStart.RLock() - calls = mock.calls.Start - lockCatalogControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *CatalogControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("CatalogControllerMock.SyncFunc: method is nil but CatalogController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockCatalogControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockCatalogControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedCatalogController.SyncCalls()) -func (mock *CatalogControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockCatalogControllerMockSync.RLock() - calls = mock.calls.Sync - lockCatalogControllerMockSync.RUnlock() - return calls -} - var ( lockCatalogInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockCatalogInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_mock.go index f928b8b4..d83f3c75 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_mock.go @@ -150,8 +150,6 @@ var ( lockCatalogTemplateControllerMockGeneric sync.RWMutex lockCatalogTemplateControllerMockInformer sync.RWMutex lockCatalogTemplateControllerMockLister sync.RWMutex - lockCatalogTemplateControllerMockStart sync.RWMutex - lockCatalogTemplateControllerMockSync sync.RWMutex ) // Ensure, that CatalogTemplateControllerMock does implement CatalogTemplateController. @@ -191,12 +189,6 @@ var _ v3.CatalogTemplateController = &CatalogTemplateControllerMock{} // ListerFunc: func() v3.CatalogTemplateLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedCatalogTemplateController in code that requires CatalogTemplateController @@ -231,12 +223,6 @@ type CatalogTemplateControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.CatalogTemplateLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type CatalogTemplateControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *CatalogTemplateControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *CatalogTemplateControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("CatalogTemplateControllerMock.StartFunc: method is nil but CatalogTemplateController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockCatalogTemplateControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockCatalogTemplateControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedCatalogTemplateController.StartCalls()) -func (mock *CatalogTemplateControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockCatalogTemplateControllerMockStart.RLock() - calls = mock.calls.Start - lockCatalogTemplateControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *CatalogTemplateControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("CatalogTemplateControllerMock.SyncFunc: method is nil but CatalogTemplateController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockCatalogTemplateControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockCatalogTemplateControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedCatalogTemplateController.SyncCalls()) -func (mock *CatalogTemplateControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockCatalogTemplateControllerMockSync.RLock() - calls = mock.calls.Sync - lockCatalogTemplateControllerMockSync.RUnlock() - return calls -} - var ( lockCatalogTemplateInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockCatalogTemplateInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_version_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_version_mock.go index c79e4bfe..5822864d 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_version_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_catalog_template_version_mock.go @@ -150,8 +150,6 @@ var ( lockCatalogTemplateVersionControllerMockGeneric sync.RWMutex lockCatalogTemplateVersionControllerMockInformer sync.RWMutex lockCatalogTemplateVersionControllerMockLister sync.RWMutex - lockCatalogTemplateVersionControllerMockStart sync.RWMutex - lockCatalogTemplateVersionControllerMockSync sync.RWMutex ) // Ensure, that CatalogTemplateVersionControllerMock does implement CatalogTemplateVersionController. @@ -191,12 +189,6 @@ var _ v3.CatalogTemplateVersionController = &CatalogTemplateVersionControllerMoc // ListerFunc: func() v3.CatalogTemplateVersionLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedCatalogTemplateVersionController in code that requires CatalogTemplateVersionController @@ -231,12 +223,6 @@ type CatalogTemplateVersionControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.CatalogTemplateVersionLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type CatalogTemplateVersionControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *CatalogTemplateVersionControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *CatalogTemplateVersionControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("CatalogTemplateVersionControllerMock.StartFunc: method is nil but CatalogTemplateVersionController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockCatalogTemplateVersionControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockCatalogTemplateVersionControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedCatalogTemplateVersionController.StartCalls()) -func (mock *CatalogTemplateVersionControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockCatalogTemplateVersionControllerMockStart.RLock() - calls = mock.calls.Start - lockCatalogTemplateVersionControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *CatalogTemplateVersionControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("CatalogTemplateVersionControllerMock.SyncFunc: method is nil but CatalogTemplateVersionController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockCatalogTemplateVersionControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockCatalogTemplateVersionControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedCatalogTemplateVersionController.SyncCalls()) -func (mock *CatalogTemplateVersionControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockCatalogTemplateVersionControllerMockSync.RLock() - calls = mock.calls.Sync - lockCatalogTemplateVersionControllerMockSync.RUnlock() - return calls -} - var ( lockCatalogTemplateVersionInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockCatalogTemplateVersionInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cis_benchmark_version_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cis_benchmark_version_mock.go index e9987947..affc92f4 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cis_benchmark_version_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cis_benchmark_version_mock.go @@ -150,8 +150,6 @@ var ( lockCisBenchmarkVersionControllerMockGeneric sync.RWMutex lockCisBenchmarkVersionControllerMockInformer sync.RWMutex lockCisBenchmarkVersionControllerMockLister sync.RWMutex - lockCisBenchmarkVersionControllerMockStart sync.RWMutex - lockCisBenchmarkVersionControllerMockSync sync.RWMutex ) // Ensure, that CisBenchmarkVersionControllerMock does implement CisBenchmarkVersionController. @@ -191,12 +189,6 @@ var _ v3.CisBenchmarkVersionController = &CisBenchmarkVersionControllerMock{} // ListerFunc: func() v3.CisBenchmarkVersionLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedCisBenchmarkVersionController in code that requires CisBenchmarkVersionController @@ -231,12 +223,6 @@ type CisBenchmarkVersionControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.CisBenchmarkVersionLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type CisBenchmarkVersionControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *CisBenchmarkVersionControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *CisBenchmarkVersionControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("CisBenchmarkVersionControllerMock.StartFunc: method is nil but CisBenchmarkVersionController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockCisBenchmarkVersionControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockCisBenchmarkVersionControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedCisBenchmarkVersionController.StartCalls()) -func (mock *CisBenchmarkVersionControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockCisBenchmarkVersionControllerMockStart.RLock() - calls = mock.calls.Start - lockCisBenchmarkVersionControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *CisBenchmarkVersionControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("CisBenchmarkVersionControllerMock.SyncFunc: method is nil but CisBenchmarkVersionController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockCisBenchmarkVersionControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockCisBenchmarkVersionControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedCisBenchmarkVersionController.SyncCalls()) -func (mock *CisBenchmarkVersionControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockCisBenchmarkVersionControllerMockSync.RLock() - calls = mock.calls.Sync - lockCisBenchmarkVersionControllerMockSync.RUnlock() - return calls -} - var ( lockCisBenchmarkVersionInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockCisBenchmarkVersionInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cis_config_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cis_config_mock.go index 93575869..54ad6c74 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cis_config_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cis_config_mock.go @@ -150,8 +150,6 @@ var ( lockCisConfigControllerMockGeneric sync.RWMutex lockCisConfigControllerMockInformer sync.RWMutex lockCisConfigControllerMockLister sync.RWMutex - lockCisConfigControllerMockStart sync.RWMutex - lockCisConfigControllerMockSync sync.RWMutex ) // Ensure, that CisConfigControllerMock does implement CisConfigController. @@ -191,12 +189,6 @@ var _ v3.CisConfigController = &CisConfigControllerMock{} // ListerFunc: func() v3.CisConfigLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedCisConfigController in code that requires CisConfigController @@ -231,12 +223,6 @@ type CisConfigControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.CisConfigLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type CisConfigControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *CisConfigControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *CisConfigControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("CisConfigControllerMock.StartFunc: method is nil but CisConfigController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockCisConfigControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockCisConfigControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedCisConfigController.StartCalls()) -func (mock *CisConfigControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockCisConfigControllerMockStart.RLock() - calls = mock.calls.Start - lockCisConfigControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *CisConfigControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("CisConfigControllerMock.SyncFunc: method is nil but CisConfigController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockCisConfigControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockCisConfigControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedCisConfigController.SyncCalls()) -func (mock *CisConfigControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockCisConfigControllerMockSync.RLock() - calls = mock.calls.Sync - lockCisConfigControllerMockSync.RUnlock() - return calls -} - var ( lockCisConfigInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockCisConfigInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cloud_credential_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cloud_credential_mock.go index 3ea7fd5f..aa983263 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cloud_credential_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cloud_credential_mock.go @@ -150,8 +150,6 @@ var ( lockCloudCredentialControllerMockGeneric sync.RWMutex lockCloudCredentialControllerMockInformer sync.RWMutex lockCloudCredentialControllerMockLister sync.RWMutex - lockCloudCredentialControllerMockStart sync.RWMutex - lockCloudCredentialControllerMockSync sync.RWMutex ) // Ensure, that CloudCredentialControllerMock does implement CloudCredentialController. @@ -191,12 +189,6 @@ var _ v3.CloudCredentialController = &CloudCredentialControllerMock{} // ListerFunc: func() v3.CloudCredentialLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedCloudCredentialController in code that requires CloudCredentialController @@ -231,12 +223,6 @@ type CloudCredentialControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.CloudCredentialLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type CloudCredentialControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *CloudCredentialControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *CloudCredentialControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("CloudCredentialControllerMock.StartFunc: method is nil but CloudCredentialController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockCloudCredentialControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockCloudCredentialControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedCloudCredentialController.StartCalls()) -func (mock *CloudCredentialControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockCloudCredentialControllerMockStart.RLock() - calls = mock.calls.Start - lockCloudCredentialControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *CloudCredentialControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("CloudCredentialControllerMock.SyncFunc: method is nil but CloudCredentialController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockCloudCredentialControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockCloudCredentialControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedCloudCredentialController.SyncCalls()) -func (mock *CloudCredentialControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockCloudCredentialControllerMockSync.RLock() - calls = mock.calls.Sync - lockCloudCredentialControllerMockSync.RUnlock() - return calls -} - var ( lockCloudCredentialInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockCloudCredentialInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_group_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_group_mock.go index 6238f810..bbc1db00 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_group_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_group_mock.go @@ -150,8 +150,6 @@ var ( lockClusterAlertGroupControllerMockGeneric sync.RWMutex lockClusterAlertGroupControllerMockInformer sync.RWMutex lockClusterAlertGroupControllerMockLister sync.RWMutex - lockClusterAlertGroupControllerMockStart sync.RWMutex - lockClusterAlertGroupControllerMockSync sync.RWMutex ) // Ensure, that ClusterAlertGroupControllerMock does implement ClusterAlertGroupController. @@ -191,12 +189,6 @@ var _ v3.ClusterAlertGroupController = &ClusterAlertGroupControllerMock{} // ListerFunc: func() v3.ClusterAlertGroupLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterAlertGroupController in code that requires ClusterAlertGroupController @@ -231,12 +223,6 @@ type ClusterAlertGroupControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ClusterAlertGroupLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ClusterAlertGroupControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ClusterAlertGroupControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterAlertGroupControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterAlertGroupControllerMock.StartFunc: method is nil but ClusterAlertGroupController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterAlertGroupControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterAlertGroupControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterAlertGroupController.StartCalls()) -func (mock *ClusterAlertGroupControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterAlertGroupControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterAlertGroupControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterAlertGroupControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterAlertGroupControllerMock.SyncFunc: method is nil but ClusterAlertGroupController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterAlertGroupControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterAlertGroupControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterAlertGroupController.SyncCalls()) -func (mock *ClusterAlertGroupControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterAlertGroupControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterAlertGroupControllerMockSync.RUnlock() - return calls -} - var ( lockClusterAlertGroupInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterAlertGroupInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_mock.go index b3b72f31..1aa7bca6 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_mock.go @@ -150,8 +150,6 @@ var ( lockClusterAlertControllerMockGeneric sync.RWMutex lockClusterAlertControllerMockInformer sync.RWMutex lockClusterAlertControllerMockLister sync.RWMutex - lockClusterAlertControllerMockStart sync.RWMutex - lockClusterAlertControllerMockSync sync.RWMutex ) // Ensure, that ClusterAlertControllerMock does implement ClusterAlertController. @@ -191,12 +189,6 @@ var _ v3.ClusterAlertController = &ClusterAlertControllerMock{} // ListerFunc: func() v3.ClusterAlertLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterAlertController in code that requires ClusterAlertController @@ -231,12 +223,6 @@ type ClusterAlertControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ClusterAlertLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ClusterAlertControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ClusterAlertControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterAlertControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterAlertControllerMock.StartFunc: method is nil but ClusterAlertController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterAlertControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterAlertControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterAlertController.StartCalls()) -func (mock *ClusterAlertControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterAlertControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterAlertControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterAlertControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterAlertControllerMock.SyncFunc: method is nil but ClusterAlertController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterAlertControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterAlertControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterAlertController.SyncCalls()) -func (mock *ClusterAlertControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterAlertControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterAlertControllerMockSync.RUnlock() - return calls -} - var ( lockClusterAlertInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterAlertInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_rule_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_rule_mock.go index 5316a8af..460eebd1 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_rule_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_alert_rule_mock.go @@ -150,8 +150,6 @@ var ( lockClusterAlertRuleControllerMockGeneric sync.RWMutex lockClusterAlertRuleControllerMockInformer sync.RWMutex lockClusterAlertRuleControllerMockLister sync.RWMutex - lockClusterAlertRuleControllerMockStart sync.RWMutex - lockClusterAlertRuleControllerMockSync sync.RWMutex ) // Ensure, that ClusterAlertRuleControllerMock does implement ClusterAlertRuleController. @@ -191,12 +189,6 @@ var _ v3.ClusterAlertRuleController = &ClusterAlertRuleControllerMock{} // ListerFunc: func() v3.ClusterAlertRuleLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterAlertRuleController in code that requires ClusterAlertRuleController @@ -231,12 +223,6 @@ type ClusterAlertRuleControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ClusterAlertRuleLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ClusterAlertRuleControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ClusterAlertRuleControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterAlertRuleControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterAlertRuleControllerMock.StartFunc: method is nil but ClusterAlertRuleController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterAlertRuleControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterAlertRuleControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterAlertRuleController.StartCalls()) -func (mock *ClusterAlertRuleControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterAlertRuleControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterAlertRuleControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterAlertRuleControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterAlertRuleControllerMock.SyncFunc: method is nil but ClusterAlertRuleController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterAlertRuleControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterAlertRuleControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterAlertRuleController.SyncCalls()) -func (mock *ClusterAlertRuleControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterAlertRuleControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterAlertRuleControllerMockSync.RUnlock() - return calls -} - var ( lockClusterAlertRuleInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterAlertRuleInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_catalog_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_catalog_mock.go index b5ccb5f4..f3f02436 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_catalog_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_catalog_mock.go @@ -150,8 +150,6 @@ var ( lockClusterCatalogControllerMockGeneric sync.RWMutex lockClusterCatalogControllerMockInformer sync.RWMutex lockClusterCatalogControllerMockLister sync.RWMutex - lockClusterCatalogControllerMockStart sync.RWMutex - lockClusterCatalogControllerMockSync sync.RWMutex ) // Ensure, that ClusterCatalogControllerMock does implement ClusterCatalogController. @@ -191,12 +189,6 @@ var _ v3.ClusterCatalogController = &ClusterCatalogControllerMock{} // ListerFunc: func() v3.ClusterCatalogLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterCatalogController in code that requires ClusterCatalogController @@ -231,12 +223,6 @@ type ClusterCatalogControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ClusterCatalogLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ClusterCatalogControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ClusterCatalogControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterCatalogControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterCatalogControllerMock.StartFunc: method is nil but ClusterCatalogController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterCatalogControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterCatalogControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterCatalogController.StartCalls()) -func (mock *ClusterCatalogControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterCatalogControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterCatalogControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterCatalogControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterCatalogControllerMock.SyncFunc: method is nil but ClusterCatalogController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterCatalogControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterCatalogControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterCatalogController.SyncCalls()) -func (mock *ClusterCatalogControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterCatalogControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterCatalogControllerMockSync.RUnlock() - return calls -} - var ( lockClusterCatalogInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterCatalogInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_logging_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_logging_mock.go index d45054d6..a03b237f 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_logging_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_logging_mock.go @@ -150,8 +150,6 @@ var ( lockClusterLoggingControllerMockGeneric sync.RWMutex lockClusterLoggingControllerMockInformer sync.RWMutex lockClusterLoggingControllerMockLister sync.RWMutex - lockClusterLoggingControllerMockStart sync.RWMutex - lockClusterLoggingControllerMockSync sync.RWMutex ) // Ensure, that ClusterLoggingControllerMock does implement ClusterLoggingController. @@ -191,12 +189,6 @@ var _ v3.ClusterLoggingController = &ClusterLoggingControllerMock{} // ListerFunc: func() v3.ClusterLoggingLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterLoggingController in code that requires ClusterLoggingController @@ -231,12 +223,6 @@ type ClusterLoggingControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ClusterLoggingLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ClusterLoggingControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ClusterLoggingControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterLoggingControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterLoggingControllerMock.StartFunc: method is nil but ClusterLoggingController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterLoggingControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterLoggingControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterLoggingController.StartCalls()) -func (mock *ClusterLoggingControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterLoggingControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterLoggingControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterLoggingControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterLoggingControllerMock.SyncFunc: method is nil but ClusterLoggingController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterLoggingControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterLoggingControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterLoggingController.SyncCalls()) -func (mock *ClusterLoggingControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterLoggingControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterLoggingControllerMockSync.RUnlock() - return calls -} - var ( lockClusterLoggingInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterLoggingInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_mock.go index ebb785dd..8870c979 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_mock.go @@ -150,8 +150,6 @@ var ( lockClusterControllerMockGeneric sync.RWMutex lockClusterControllerMockInformer sync.RWMutex lockClusterControllerMockLister sync.RWMutex - lockClusterControllerMockStart sync.RWMutex - lockClusterControllerMockSync sync.RWMutex ) // Ensure, that ClusterControllerMock does implement ClusterController. @@ -191,12 +189,6 @@ var _ v3.ClusterController = &ClusterControllerMock{} // ListerFunc: func() v3.ClusterLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterController in code that requires ClusterController @@ -231,12 +223,6 @@ type ClusterControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ClusterLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ClusterControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ClusterControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterControllerMock.StartFunc: method is nil but ClusterController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterController.StartCalls()) -func (mock *ClusterControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterControllerMock.SyncFunc: method is nil but ClusterController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterController.SyncCalls()) -func (mock *ClusterControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterControllerMockSync.RUnlock() - return calls -} - var ( lockClusterInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_monitor_graph_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_monitor_graph_mock.go index 1d2a1dd7..b8659dd3 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_monitor_graph_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_monitor_graph_mock.go @@ -150,8 +150,6 @@ var ( lockClusterMonitorGraphControllerMockGeneric sync.RWMutex lockClusterMonitorGraphControllerMockInformer sync.RWMutex lockClusterMonitorGraphControllerMockLister sync.RWMutex - lockClusterMonitorGraphControllerMockStart sync.RWMutex - lockClusterMonitorGraphControllerMockSync sync.RWMutex ) // Ensure, that ClusterMonitorGraphControllerMock does implement ClusterMonitorGraphController. @@ -191,12 +189,6 @@ var _ v3.ClusterMonitorGraphController = &ClusterMonitorGraphControllerMock{} // ListerFunc: func() v3.ClusterMonitorGraphLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterMonitorGraphController in code that requires ClusterMonitorGraphController @@ -231,12 +223,6 @@ type ClusterMonitorGraphControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ClusterMonitorGraphLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ClusterMonitorGraphControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ClusterMonitorGraphControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterMonitorGraphControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterMonitorGraphControllerMock.StartFunc: method is nil but ClusterMonitorGraphController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterMonitorGraphControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterMonitorGraphControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterMonitorGraphController.StartCalls()) -func (mock *ClusterMonitorGraphControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterMonitorGraphControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterMonitorGraphControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterMonitorGraphControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterMonitorGraphControllerMock.SyncFunc: method is nil but ClusterMonitorGraphController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterMonitorGraphControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterMonitorGraphControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterMonitorGraphController.SyncCalls()) -func (mock *ClusterMonitorGraphControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterMonitorGraphControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterMonitorGraphControllerMockSync.RUnlock() - return calls -} - var ( lockClusterMonitorGraphInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterMonitorGraphInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_registration_token_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_registration_token_mock.go index 00441982..98180713 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_registration_token_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_registration_token_mock.go @@ -150,8 +150,6 @@ var ( lockClusterRegistrationTokenControllerMockGeneric sync.RWMutex lockClusterRegistrationTokenControllerMockInformer sync.RWMutex lockClusterRegistrationTokenControllerMockLister sync.RWMutex - lockClusterRegistrationTokenControllerMockStart sync.RWMutex - lockClusterRegistrationTokenControllerMockSync sync.RWMutex ) // Ensure, that ClusterRegistrationTokenControllerMock does implement ClusterRegistrationTokenController. @@ -191,12 +189,6 @@ var _ v3.ClusterRegistrationTokenController = &ClusterRegistrationTokenControlle // ListerFunc: func() v3.ClusterRegistrationTokenLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterRegistrationTokenController in code that requires ClusterRegistrationTokenController @@ -231,12 +223,6 @@ type ClusterRegistrationTokenControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ClusterRegistrationTokenLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ClusterRegistrationTokenControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ClusterRegistrationTokenControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterRegistrationTokenControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterRegistrationTokenControllerMock.StartFunc: method is nil but ClusterRegistrationTokenController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterRegistrationTokenControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterRegistrationTokenControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterRegistrationTokenController.StartCalls()) -func (mock *ClusterRegistrationTokenControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterRegistrationTokenControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterRegistrationTokenControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterRegistrationTokenControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterRegistrationTokenControllerMock.SyncFunc: method is nil but ClusterRegistrationTokenController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterRegistrationTokenControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterRegistrationTokenControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterRegistrationTokenController.SyncCalls()) -func (mock *ClusterRegistrationTokenControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterRegistrationTokenControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterRegistrationTokenControllerMockSync.RUnlock() - return calls -} - var ( lockClusterRegistrationTokenInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterRegistrationTokenInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_role_template_binding_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_role_template_binding_mock.go index 4282f079..2fa5ab9f 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_role_template_binding_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_role_template_binding_mock.go @@ -150,8 +150,6 @@ var ( lockClusterRoleTemplateBindingControllerMockGeneric sync.RWMutex lockClusterRoleTemplateBindingControllerMockInformer sync.RWMutex lockClusterRoleTemplateBindingControllerMockLister sync.RWMutex - lockClusterRoleTemplateBindingControllerMockStart sync.RWMutex - lockClusterRoleTemplateBindingControllerMockSync sync.RWMutex ) // Ensure, that ClusterRoleTemplateBindingControllerMock does implement ClusterRoleTemplateBindingController. @@ -191,12 +189,6 @@ var _ v3.ClusterRoleTemplateBindingController = &ClusterRoleTemplateBindingContr // ListerFunc: func() v3.ClusterRoleTemplateBindingLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterRoleTemplateBindingController in code that requires ClusterRoleTemplateBindingController @@ -231,12 +223,6 @@ type ClusterRoleTemplateBindingControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ClusterRoleTemplateBindingLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ClusterRoleTemplateBindingControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ClusterRoleTemplateBindingControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterRoleTemplateBindingControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterRoleTemplateBindingControllerMock.StartFunc: method is nil but ClusterRoleTemplateBindingController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterRoleTemplateBindingControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterRoleTemplateBindingControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterRoleTemplateBindingController.StartCalls()) -func (mock *ClusterRoleTemplateBindingControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterRoleTemplateBindingControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterRoleTemplateBindingControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterRoleTemplateBindingControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterRoleTemplateBindingControllerMock.SyncFunc: method is nil but ClusterRoleTemplateBindingController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterRoleTemplateBindingControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterRoleTemplateBindingControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterRoleTemplateBindingController.SyncCalls()) -func (mock *ClusterRoleTemplateBindingControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterRoleTemplateBindingControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterRoleTemplateBindingControllerMockSync.RUnlock() - return calls -} - var ( lockClusterRoleTemplateBindingInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterRoleTemplateBindingInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_scan_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_scan_mock.go index cb097953..c02f7332 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_scan_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_scan_mock.go @@ -150,8 +150,6 @@ var ( lockClusterScanControllerMockGeneric sync.RWMutex lockClusterScanControllerMockInformer sync.RWMutex lockClusterScanControllerMockLister sync.RWMutex - lockClusterScanControllerMockStart sync.RWMutex - lockClusterScanControllerMockSync sync.RWMutex ) // Ensure, that ClusterScanControllerMock does implement ClusterScanController. @@ -191,12 +189,6 @@ var _ v3.ClusterScanController = &ClusterScanControllerMock{} // ListerFunc: func() v3.ClusterScanLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterScanController in code that requires ClusterScanController @@ -231,12 +223,6 @@ type ClusterScanControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ClusterScanLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ClusterScanControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ClusterScanControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterScanControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterScanControllerMock.StartFunc: method is nil but ClusterScanController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterScanControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterScanControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterScanController.StartCalls()) -func (mock *ClusterScanControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterScanControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterScanControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterScanControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterScanControllerMock.SyncFunc: method is nil but ClusterScanController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterScanControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterScanControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterScanController.SyncCalls()) -func (mock *ClusterScanControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterScanControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterScanControllerMockSync.RUnlock() - return calls -} - var ( lockClusterScanInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterScanInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_template_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_template_mock.go index f25df27f..9b4da2c0 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_template_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_template_mock.go @@ -150,8 +150,6 @@ var ( lockClusterTemplateControllerMockGeneric sync.RWMutex lockClusterTemplateControllerMockInformer sync.RWMutex lockClusterTemplateControllerMockLister sync.RWMutex - lockClusterTemplateControllerMockStart sync.RWMutex - lockClusterTemplateControllerMockSync sync.RWMutex ) // Ensure, that ClusterTemplateControllerMock does implement ClusterTemplateController. @@ -191,12 +189,6 @@ var _ v3.ClusterTemplateController = &ClusterTemplateControllerMock{} // ListerFunc: func() v3.ClusterTemplateLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterTemplateController in code that requires ClusterTemplateController @@ -231,12 +223,6 @@ type ClusterTemplateControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ClusterTemplateLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ClusterTemplateControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ClusterTemplateControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterTemplateControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterTemplateControllerMock.StartFunc: method is nil but ClusterTemplateController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterTemplateControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterTemplateControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterTemplateController.StartCalls()) -func (mock *ClusterTemplateControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterTemplateControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterTemplateControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterTemplateControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterTemplateControllerMock.SyncFunc: method is nil but ClusterTemplateController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterTemplateControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterTemplateControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterTemplateController.SyncCalls()) -func (mock *ClusterTemplateControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterTemplateControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterTemplateControllerMockSync.RUnlock() - return calls -} - var ( lockClusterTemplateInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterTemplateInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_template_revision_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_template_revision_mock.go index ed7a45a0..2e9c4fe5 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_cluster_template_revision_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_cluster_template_revision_mock.go @@ -150,8 +150,6 @@ var ( lockClusterTemplateRevisionControllerMockGeneric sync.RWMutex lockClusterTemplateRevisionControllerMockInformer sync.RWMutex lockClusterTemplateRevisionControllerMockLister sync.RWMutex - lockClusterTemplateRevisionControllerMockStart sync.RWMutex - lockClusterTemplateRevisionControllerMockSync sync.RWMutex ) // Ensure, that ClusterTemplateRevisionControllerMock does implement ClusterTemplateRevisionController. @@ -191,12 +189,6 @@ var _ v3.ClusterTemplateRevisionController = &ClusterTemplateRevisionControllerM // ListerFunc: func() v3.ClusterTemplateRevisionLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterTemplateRevisionController in code that requires ClusterTemplateRevisionController @@ -231,12 +223,6 @@ type ClusterTemplateRevisionControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ClusterTemplateRevisionLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ClusterTemplateRevisionControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ClusterTemplateRevisionControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterTemplateRevisionControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterTemplateRevisionControllerMock.StartFunc: method is nil but ClusterTemplateRevisionController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterTemplateRevisionControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterTemplateRevisionControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterTemplateRevisionController.StartCalls()) -func (mock *ClusterTemplateRevisionControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterTemplateRevisionControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterTemplateRevisionControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterTemplateRevisionControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterTemplateRevisionControllerMock.SyncFunc: method is nil but ClusterTemplateRevisionController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterTemplateRevisionControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterTemplateRevisionControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterTemplateRevisionController.SyncCalls()) -func (mock *ClusterTemplateRevisionControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterTemplateRevisionControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterTemplateRevisionControllerMockSync.RUnlock() - return calls -} - var ( lockClusterTemplateRevisionInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterTemplateRevisionInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_compose_config_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_compose_config_mock.go index 2b35b288..df6afa6d 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_compose_config_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_compose_config_mock.go @@ -150,8 +150,6 @@ var ( lockComposeConfigControllerMockGeneric sync.RWMutex lockComposeConfigControllerMockInformer sync.RWMutex lockComposeConfigControllerMockLister sync.RWMutex - lockComposeConfigControllerMockStart sync.RWMutex - lockComposeConfigControllerMockSync sync.RWMutex ) // Ensure, that ComposeConfigControllerMock does implement ComposeConfigController. @@ -191,12 +189,6 @@ var _ v3.ComposeConfigController = &ComposeConfigControllerMock{} // ListerFunc: func() v3.ComposeConfigLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedComposeConfigController in code that requires ComposeConfigController @@ -231,12 +223,6 @@ type ComposeConfigControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ComposeConfigLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ComposeConfigControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ComposeConfigControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ComposeConfigControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ComposeConfigControllerMock.StartFunc: method is nil but ComposeConfigController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockComposeConfigControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockComposeConfigControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedComposeConfigController.StartCalls()) -func (mock *ComposeConfigControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockComposeConfigControllerMockStart.RLock() - calls = mock.calls.Start - lockComposeConfigControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ComposeConfigControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ComposeConfigControllerMock.SyncFunc: method is nil but ComposeConfigController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockComposeConfigControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockComposeConfigControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedComposeConfigController.SyncCalls()) -func (mock *ComposeConfigControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockComposeConfigControllerMockSync.RLock() - calls = mock.calls.Sync - lockComposeConfigControllerMockSync.RUnlock() - return calls -} - var ( lockComposeConfigInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockComposeConfigInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_dynamic_schema_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_dynamic_schema_mock.go index d13b3b7f..0ef609e4 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_dynamic_schema_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_dynamic_schema_mock.go @@ -150,8 +150,6 @@ var ( lockDynamicSchemaControllerMockGeneric sync.RWMutex lockDynamicSchemaControllerMockInformer sync.RWMutex lockDynamicSchemaControllerMockLister sync.RWMutex - lockDynamicSchemaControllerMockStart sync.RWMutex - lockDynamicSchemaControllerMockSync sync.RWMutex ) // Ensure, that DynamicSchemaControllerMock does implement DynamicSchemaController. @@ -191,12 +189,6 @@ var _ v3.DynamicSchemaController = &DynamicSchemaControllerMock{} // ListerFunc: func() v3.DynamicSchemaLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedDynamicSchemaController in code that requires DynamicSchemaController @@ -231,12 +223,6 @@ type DynamicSchemaControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.DynamicSchemaLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type DynamicSchemaControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *DynamicSchemaControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *DynamicSchemaControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("DynamicSchemaControllerMock.StartFunc: method is nil but DynamicSchemaController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockDynamicSchemaControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockDynamicSchemaControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedDynamicSchemaController.StartCalls()) -func (mock *DynamicSchemaControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockDynamicSchemaControllerMockStart.RLock() - calls = mock.calls.Start - lockDynamicSchemaControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *DynamicSchemaControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("DynamicSchemaControllerMock.SyncFunc: method is nil but DynamicSchemaController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockDynamicSchemaControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockDynamicSchemaControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedDynamicSchemaController.SyncCalls()) -func (mock *DynamicSchemaControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockDynamicSchemaControllerMockSync.RLock() - calls = mock.calls.Sync - lockDynamicSchemaControllerMockSync.RUnlock() - return calls -} - var ( lockDynamicSchemaInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockDynamicSchemaInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_etcd_backup_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_etcd_backup_mock.go index 35783703..65e97597 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_etcd_backup_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_etcd_backup_mock.go @@ -150,8 +150,6 @@ var ( lockEtcdBackupControllerMockGeneric sync.RWMutex lockEtcdBackupControllerMockInformer sync.RWMutex lockEtcdBackupControllerMockLister sync.RWMutex - lockEtcdBackupControllerMockStart sync.RWMutex - lockEtcdBackupControllerMockSync sync.RWMutex ) // Ensure, that EtcdBackupControllerMock does implement EtcdBackupController. @@ -191,12 +189,6 @@ var _ v3.EtcdBackupController = &EtcdBackupControllerMock{} // ListerFunc: func() v3.EtcdBackupLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedEtcdBackupController in code that requires EtcdBackupController @@ -231,12 +223,6 @@ type EtcdBackupControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.EtcdBackupLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type EtcdBackupControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *EtcdBackupControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *EtcdBackupControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("EtcdBackupControllerMock.StartFunc: method is nil but EtcdBackupController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockEtcdBackupControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockEtcdBackupControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedEtcdBackupController.StartCalls()) -func (mock *EtcdBackupControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockEtcdBackupControllerMockStart.RLock() - calls = mock.calls.Start - lockEtcdBackupControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *EtcdBackupControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("EtcdBackupControllerMock.SyncFunc: method is nil but EtcdBackupController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockEtcdBackupControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockEtcdBackupControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedEtcdBackupController.SyncCalls()) -func (mock *EtcdBackupControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockEtcdBackupControllerMockSync.RLock() - calls = mock.calls.Sync - lockEtcdBackupControllerMockSync.RUnlock() - return calls -} - var ( lockEtcdBackupInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockEtcdBackupInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_feature_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_feature_mock.go index d9f6479e..5f7c8891 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_feature_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_feature_mock.go @@ -150,8 +150,6 @@ var ( lockFeatureControllerMockGeneric sync.RWMutex lockFeatureControllerMockInformer sync.RWMutex lockFeatureControllerMockLister sync.RWMutex - lockFeatureControllerMockStart sync.RWMutex - lockFeatureControllerMockSync sync.RWMutex ) // Ensure, that FeatureControllerMock does implement FeatureController. @@ -191,12 +189,6 @@ var _ v3.FeatureController = &FeatureControllerMock{} // ListerFunc: func() v3.FeatureLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedFeatureController in code that requires FeatureController @@ -231,12 +223,6 @@ type FeatureControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.FeatureLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type FeatureControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *FeatureControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *FeatureControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("FeatureControllerMock.StartFunc: method is nil but FeatureController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockFeatureControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockFeatureControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedFeatureController.StartCalls()) -func (mock *FeatureControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockFeatureControllerMockStart.RLock() - calls = mock.calls.Start - lockFeatureControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *FeatureControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("FeatureControllerMock.SyncFunc: method is nil but FeatureController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockFeatureControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockFeatureControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedFeatureController.SyncCalls()) -func (mock *FeatureControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockFeatureControllerMockSync.RLock() - calls = mock.calls.Sync - lockFeatureControllerMockSync.RUnlock() - return calls -} - var ( lockFeatureInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockFeatureInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_global_dns_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_global_dns_mock.go index 07854e43..e49e640f 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_global_dns_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_global_dns_mock.go @@ -18,38 +18,38 @@ import ( ) var ( - lockGlobalDNSListerMockGet sync.RWMutex - lockGlobalDNSListerMockList sync.RWMutex + lockGlobalDnsListerMockGet sync.RWMutex + lockGlobalDnsListerMockList sync.RWMutex ) -// Ensure, that GlobalDNSListerMock does implement GlobalDNSLister. +// Ensure, that GlobalDnsListerMock does implement GlobalDnsLister. // If this is not the case, regenerate this file with moq. -var _ v3.GlobalDNSLister = &GlobalDNSListerMock{} +var _ v3.GlobalDnsLister = &GlobalDnsListerMock{} -// GlobalDNSListerMock is a mock implementation of GlobalDNSLister. +// GlobalDnsListerMock is a mock implementation of GlobalDnsLister. // -// func TestSomethingThatUsesGlobalDNSLister(t *testing.T) { +// func TestSomethingThatUsesGlobalDnsLister(t *testing.T) { // -// // make and configure a mocked GlobalDNSLister -// mockedGlobalDNSLister := &GlobalDNSListerMock{ -// GetFunc: func(namespace string, name string) (*v3.GlobalDNS, error) { +// // make and configure a mocked GlobalDnsLister +// mockedGlobalDnsLister := &GlobalDnsListerMock{ +// GetFunc: func(namespace string, name string) (*v3.GlobalDns, error) { // panic("mock out the Get method") // }, -// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.GlobalDNS, error) { +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.GlobalDns, error) { // panic("mock out the List method") // }, // } // -// // use mockedGlobalDNSLister in code that requires GlobalDNSLister +// // use mockedGlobalDnsLister in code that requires GlobalDnsLister // // and then make assertions. // // } -type GlobalDNSListerMock struct { +type GlobalDnsListerMock struct { // GetFunc mocks the Get method. - GetFunc func(namespace string, name string) (*v3.GlobalDNS, error) + GetFunc func(namespace string, name string) (*v3.GlobalDns, error) // ListFunc mocks the List method. - ListFunc func(namespace string, selector labels.Selector) ([]*v3.GlobalDNS, error) + ListFunc func(namespace string, selector labels.Selector) ([]*v3.GlobalDns, error) // calls tracks calls to the methods. calls struct { @@ -71,9 +71,9 @@ type GlobalDNSListerMock struct { } // Get calls GetFunc. -func (mock *GlobalDNSListerMock) Get(namespace string, name string) (*v3.GlobalDNS, error) { +func (mock *GlobalDnsListerMock) Get(namespace string, name string) (*v3.GlobalDns, error) { if mock.GetFunc == nil { - panic("GlobalDNSListerMock.GetFunc: method is nil but GlobalDNSLister.Get was just called") + panic("GlobalDnsListerMock.GetFunc: method is nil but GlobalDnsLister.Get was just called") } callInfo := struct { Namespace string @@ -82,16 +82,16 @@ func (mock *GlobalDNSListerMock) Get(namespace string, name string) (*v3.GlobalD Namespace: namespace, Name: name, } - lockGlobalDNSListerMockGet.Lock() + lockGlobalDnsListerMockGet.Lock() mock.calls.Get = append(mock.calls.Get, callInfo) - lockGlobalDNSListerMockGet.Unlock() + lockGlobalDnsListerMockGet.Unlock() return mock.GetFunc(namespace, name) } // GetCalls gets all the calls that were made to Get. // Check the length with: -// len(mockedGlobalDNSLister.GetCalls()) -func (mock *GlobalDNSListerMock) GetCalls() []struct { +// len(mockedGlobalDnsLister.GetCalls()) +func (mock *GlobalDnsListerMock) GetCalls() []struct { Namespace string Name string } { @@ -99,16 +99,16 @@ func (mock *GlobalDNSListerMock) GetCalls() []struct { Namespace string Name string } - lockGlobalDNSListerMockGet.RLock() + lockGlobalDnsListerMockGet.RLock() calls = mock.calls.Get - lockGlobalDNSListerMockGet.RUnlock() + lockGlobalDnsListerMockGet.RUnlock() return calls } // List calls ListFunc. -func (mock *GlobalDNSListerMock) List(namespace string, selector labels.Selector) ([]*v3.GlobalDNS, error) { +func (mock *GlobalDnsListerMock) List(namespace string, selector labels.Selector) ([]*v3.GlobalDns, error) { if mock.ListFunc == nil { - panic("GlobalDNSListerMock.ListFunc: method is nil but GlobalDNSLister.List was just called") + panic("GlobalDnsListerMock.ListFunc: method is nil but GlobalDnsLister.List was just called") } callInfo := struct { Namespace string @@ -117,16 +117,16 @@ func (mock *GlobalDNSListerMock) List(namespace string, selector labels.Selector Namespace: namespace, Selector: selector, } - lockGlobalDNSListerMockList.Lock() + lockGlobalDnsListerMockList.Lock() mock.calls.List = append(mock.calls.List, callInfo) - lockGlobalDNSListerMockList.Unlock() + lockGlobalDnsListerMockList.Unlock() return mock.ListFunc(namespace, selector) } // ListCalls gets all the calls that were made to List. // Check the length with: -// len(mockedGlobalDNSLister.ListCalls()) -func (mock *GlobalDNSListerMock) ListCalls() []struct { +// len(mockedGlobalDnsLister.ListCalls()) +func (mock *GlobalDnsListerMock) ListCalls() []struct { Namespace string Selector labels.Selector } { @@ -134,46 +134,44 @@ func (mock *GlobalDNSListerMock) ListCalls() []struct { Namespace string Selector labels.Selector } - lockGlobalDNSListerMockList.RLock() + lockGlobalDnsListerMockList.RLock() calls = mock.calls.List - lockGlobalDNSListerMockList.RUnlock() + lockGlobalDnsListerMockList.RUnlock() return calls } var ( - lockGlobalDNSControllerMockAddClusterScopedFeatureHandler sync.RWMutex - lockGlobalDNSControllerMockAddClusterScopedHandler sync.RWMutex - lockGlobalDNSControllerMockAddFeatureHandler sync.RWMutex - lockGlobalDNSControllerMockAddHandler sync.RWMutex - lockGlobalDNSControllerMockEnqueue sync.RWMutex - lockGlobalDNSControllerMockEnqueueAfter sync.RWMutex - lockGlobalDNSControllerMockGeneric sync.RWMutex - lockGlobalDNSControllerMockInformer sync.RWMutex - lockGlobalDNSControllerMockLister sync.RWMutex - lockGlobalDNSControllerMockStart sync.RWMutex - lockGlobalDNSControllerMockSync sync.RWMutex + lockGlobalDnsControllerMockAddClusterScopedFeatureHandler sync.RWMutex + lockGlobalDnsControllerMockAddClusterScopedHandler sync.RWMutex + lockGlobalDnsControllerMockAddFeatureHandler sync.RWMutex + lockGlobalDnsControllerMockAddHandler sync.RWMutex + lockGlobalDnsControllerMockEnqueue sync.RWMutex + lockGlobalDnsControllerMockEnqueueAfter sync.RWMutex + lockGlobalDnsControllerMockGeneric sync.RWMutex + lockGlobalDnsControllerMockInformer sync.RWMutex + lockGlobalDnsControllerMockLister sync.RWMutex ) -// Ensure, that GlobalDNSControllerMock does implement GlobalDNSController. +// Ensure, that GlobalDnsControllerMock does implement GlobalDnsController. // If this is not the case, regenerate this file with moq. -var _ v3.GlobalDNSController = &GlobalDNSControllerMock{} +var _ v3.GlobalDnsController = &GlobalDnsControllerMock{} -// GlobalDNSControllerMock is a mock implementation of GlobalDNSController. +// GlobalDnsControllerMock is a mock implementation of GlobalDnsController. // -// func TestSomethingThatUsesGlobalDNSController(t *testing.T) { +// func TestSomethingThatUsesGlobalDnsController(t *testing.T) { // -// // make and configure a mocked GlobalDNSController -// mockedGlobalDNSController := &GlobalDNSControllerMock{ -// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.GlobalDNSHandlerFunc) { +// // make and configure a mocked GlobalDnsController +// mockedGlobalDnsController := &GlobalDnsControllerMock{ +// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.GlobalDnsHandlerFunc) { // panic("mock out the AddClusterScopedFeatureHandler method") // }, -// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.GlobalDNSHandlerFunc) { +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.GlobalDnsHandlerFunc) { // panic("mock out the AddClusterScopedHandler method") // }, -// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.GlobalDNSHandlerFunc) { +// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.GlobalDnsHandlerFunc) { // panic("mock out the AddFeatureHandler method") // }, -// AddHandlerFunc: func(ctx context.Context, name string, handler v3.GlobalDNSHandlerFunc) { +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.GlobalDnsHandlerFunc) { // panic("mock out the AddHandler method") // }, // EnqueueFunc: func(namespace string, name string) { @@ -188,33 +186,27 @@ var _ v3.GlobalDNSController = &GlobalDNSControllerMock{} // InformerFunc: func() cache.SharedIndexInformer { // panic("mock out the Informer method") // }, -// ListerFunc: func() v3.GlobalDNSLister { +// ListerFunc: func() v3.GlobalDnsLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // -// // use mockedGlobalDNSController in code that requires GlobalDNSController +// // use mockedGlobalDnsController in code that requires GlobalDnsController // // and then make assertions. // // } -type GlobalDNSControllerMock struct { +type GlobalDnsControllerMock struct { // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. - AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.GlobalDNSHandlerFunc) + AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.GlobalDnsHandlerFunc) // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. - AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.GlobalDNSHandlerFunc) + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.GlobalDnsHandlerFunc) // AddFeatureHandlerFunc mocks the AddFeatureHandler method. - AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.GlobalDNSHandlerFunc) + AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.GlobalDnsHandlerFunc) // AddHandlerFunc mocks the AddHandler method. - AddHandlerFunc func(ctx context.Context, name string, handler v3.GlobalDNSHandlerFunc) + AddHandlerFunc func(ctx context.Context, name string, handler v3.GlobalDnsHandlerFunc) // EnqueueFunc mocks the Enqueue method. EnqueueFunc func(namespace string, name string) @@ -229,13 +221,7 @@ type GlobalDNSControllerMock struct { InformerFunc func() cache.SharedIndexInformer // ListerFunc mocks the Lister method. - ListerFunc func() v3.GlobalDNSLister - - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error + ListerFunc func() v3.GlobalDnsLister // calls tracks calls to the methods. calls struct { @@ -250,7 +236,7 @@ type GlobalDNSControllerMock struct { // ClusterName is the clusterName argument value. ClusterName string // Handler is the handler argument value. - Handler v3.GlobalDNSHandlerFunc + Handler v3.GlobalDnsHandlerFunc } // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. AddClusterScopedHandler []struct { @@ -261,7 +247,7 @@ type GlobalDNSControllerMock struct { // ClusterName is the clusterName argument value. ClusterName string // Handler is the handler argument value. - Handler v3.GlobalDNSHandlerFunc + Handler v3.GlobalDnsHandlerFunc } // AddFeatureHandler holds details about calls to the AddFeatureHandler method. AddFeatureHandler []struct { @@ -272,7 +258,7 @@ type GlobalDNSControllerMock struct { // Name is the name argument value. Name string // Sync is the sync argument value. - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } // AddHandler holds details about calls to the AddHandler method. AddHandler []struct { @@ -281,7 +267,7 @@ type GlobalDNSControllerMock struct { // Name is the name argument value. Name string // Handler is the handler argument value. - Handler v3.GlobalDNSHandlerFunc + Handler v3.GlobalDnsHandlerFunc } // Enqueue holds details about calls to the Enqueue method. Enqueue []struct { @@ -308,32 +294,20 @@ type GlobalDNSControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } // AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc. -func (mock *GlobalDNSControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.GlobalDNSHandlerFunc) { +func (mock *GlobalDnsControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.GlobalDnsHandlerFunc) { if mock.AddClusterScopedFeatureHandlerFunc == nil { - panic("GlobalDNSControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but GlobalDNSController.AddClusterScopedFeatureHandler was just called") + panic("GlobalDnsControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but GlobalDnsController.AddClusterScopedFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Handler v3.GlobalDNSHandlerFunc + Handler v3.GlobalDnsHandlerFunc }{ Ctx: ctx, Enabled: enabled, @@ -341,164 +315,164 @@ func (mock *GlobalDNSControllerMock) AddClusterScopedFeatureHandler(ctx context. ClusterName: clusterName, Handler: handler, } - lockGlobalDNSControllerMockAddClusterScopedFeatureHandler.Lock() + lockGlobalDnsControllerMockAddClusterScopedFeatureHandler.Lock() mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) - lockGlobalDNSControllerMockAddClusterScopedFeatureHandler.Unlock() + lockGlobalDnsControllerMockAddClusterScopedFeatureHandler.Unlock() mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, handler) } // AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. // Check the length with: -// len(mockedGlobalDNSController.AddClusterScopedFeatureHandlerCalls()) -func (mock *GlobalDNSControllerMock) AddClusterScopedFeatureHandlerCalls() []struct { +// len(mockedGlobalDnsController.AddClusterScopedFeatureHandlerCalls()) +func (mock *GlobalDnsControllerMock) AddClusterScopedFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Handler v3.GlobalDNSHandlerFunc + Handler v3.GlobalDnsHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Handler v3.GlobalDNSHandlerFunc + Handler v3.GlobalDnsHandlerFunc } - lockGlobalDNSControllerMockAddClusterScopedFeatureHandler.RLock() + lockGlobalDnsControllerMockAddClusterScopedFeatureHandler.RLock() calls = mock.calls.AddClusterScopedFeatureHandler - lockGlobalDNSControllerMockAddClusterScopedFeatureHandler.RUnlock() + lockGlobalDnsControllerMockAddClusterScopedFeatureHandler.RUnlock() return calls } // AddClusterScopedHandler calls AddClusterScopedHandlerFunc. -func (mock *GlobalDNSControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.GlobalDNSHandlerFunc) { +func (mock *GlobalDnsControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.GlobalDnsHandlerFunc) { if mock.AddClusterScopedHandlerFunc == nil { - panic("GlobalDNSControllerMock.AddClusterScopedHandlerFunc: method is nil but GlobalDNSController.AddClusterScopedHandler was just called") + panic("GlobalDnsControllerMock.AddClusterScopedHandlerFunc: method is nil but GlobalDnsController.AddClusterScopedHandler was just called") } callInfo := struct { Ctx context.Context Name string ClusterName string - Handler v3.GlobalDNSHandlerFunc + Handler v3.GlobalDnsHandlerFunc }{ Ctx: ctx, Name: name, ClusterName: clusterName, Handler: handler, } - lockGlobalDNSControllerMockAddClusterScopedHandler.Lock() + lockGlobalDnsControllerMockAddClusterScopedHandler.Lock() mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) - lockGlobalDNSControllerMockAddClusterScopedHandler.Unlock() + lockGlobalDnsControllerMockAddClusterScopedHandler.Unlock() mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) } // AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. // Check the length with: -// len(mockedGlobalDNSController.AddClusterScopedHandlerCalls()) -func (mock *GlobalDNSControllerMock) AddClusterScopedHandlerCalls() []struct { +// len(mockedGlobalDnsController.AddClusterScopedHandlerCalls()) +func (mock *GlobalDnsControllerMock) AddClusterScopedHandlerCalls() []struct { Ctx context.Context Name string ClusterName string - Handler v3.GlobalDNSHandlerFunc + Handler v3.GlobalDnsHandlerFunc } { var calls []struct { Ctx context.Context Name string ClusterName string - Handler v3.GlobalDNSHandlerFunc + Handler v3.GlobalDnsHandlerFunc } - lockGlobalDNSControllerMockAddClusterScopedHandler.RLock() + lockGlobalDnsControllerMockAddClusterScopedHandler.RLock() calls = mock.calls.AddClusterScopedHandler - lockGlobalDNSControllerMockAddClusterScopedHandler.RUnlock() + lockGlobalDnsControllerMockAddClusterScopedHandler.RUnlock() return calls } // AddFeatureHandler calls AddFeatureHandlerFunc. -func (mock *GlobalDNSControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.GlobalDNSHandlerFunc) { +func (mock *GlobalDnsControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.GlobalDnsHandlerFunc) { if mock.AddFeatureHandlerFunc == nil { - panic("GlobalDNSControllerMock.AddFeatureHandlerFunc: method is nil but GlobalDNSController.AddFeatureHandler was just called") + panic("GlobalDnsControllerMock.AddFeatureHandlerFunc: method is nil but GlobalDnsController.AddFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc }{ Ctx: ctx, Enabled: enabled, Name: name, Sync: sync, } - lockGlobalDNSControllerMockAddFeatureHandler.Lock() + lockGlobalDnsControllerMockAddFeatureHandler.Lock() mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) - lockGlobalDNSControllerMockAddFeatureHandler.Unlock() + lockGlobalDnsControllerMockAddFeatureHandler.Unlock() mock.AddFeatureHandlerFunc(ctx, enabled, name, sync) } // AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. // Check the length with: -// len(mockedGlobalDNSController.AddFeatureHandlerCalls()) -func (mock *GlobalDNSControllerMock) AddFeatureHandlerCalls() []struct { +// len(mockedGlobalDnsController.AddFeatureHandlerCalls()) +func (mock *GlobalDnsControllerMock) AddFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } - lockGlobalDNSControllerMockAddFeatureHandler.RLock() + lockGlobalDnsControllerMockAddFeatureHandler.RLock() calls = mock.calls.AddFeatureHandler - lockGlobalDNSControllerMockAddFeatureHandler.RUnlock() + lockGlobalDnsControllerMockAddFeatureHandler.RUnlock() return calls } // AddHandler calls AddHandlerFunc. -func (mock *GlobalDNSControllerMock) AddHandler(ctx context.Context, name string, handler v3.GlobalDNSHandlerFunc) { +func (mock *GlobalDnsControllerMock) AddHandler(ctx context.Context, name string, handler v3.GlobalDnsHandlerFunc) { if mock.AddHandlerFunc == nil { - panic("GlobalDNSControllerMock.AddHandlerFunc: method is nil but GlobalDNSController.AddHandler was just called") + panic("GlobalDnsControllerMock.AddHandlerFunc: method is nil but GlobalDnsController.AddHandler was just called") } callInfo := struct { Ctx context.Context Name string - Handler v3.GlobalDNSHandlerFunc + Handler v3.GlobalDnsHandlerFunc }{ Ctx: ctx, Name: name, Handler: handler, } - lockGlobalDNSControllerMockAddHandler.Lock() + lockGlobalDnsControllerMockAddHandler.Lock() mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) - lockGlobalDNSControllerMockAddHandler.Unlock() + lockGlobalDnsControllerMockAddHandler.Unlock() mock.AddHandlerFunc(ctx, name, handler) } // AddHandlerCalls gets all the calls that were made to AddHandler. // Check the length with: -// len(mockedGlobalDNSController.AddHandlerCalls()) -func (mock *GlobalDNSControllerMock) AddHandlerCalls() []struct { +// len(mockedGlobalDnsController.AddHandlerCalls()) +func (mock *GlobalDnsControllerMock) AddHandlerCalls() []struct { Ctx context.Context Name string - Handler v3.GlobalDNSHandlerFunc + Handler v3.GlobalDnsHandlerFunc } { var calls []struct { Ctx context.Context Name string - Handler v3.GlobalDNSHandlerFunc + Handler v3.GlobalDnsHandlerFunc } - lockGlobalDNSControllerMockAddHandler.RLock() + lockGlobalDnsControllerMockAddHandler.RLock() calls = mock.calls.AddHandler - lockGlobalDNSControllerMockAddHandler.RUnlock() + lockGlobalDnsControllerMockAddHandler.RUnlock() return calls } // Enqueue calls EnqueueFunc. -func (mock *GlobalDNSControllerMock) Enqueue(namespace string, name string) { +func (mock *GlobalDnsControllerMock) Enqueue(namespace string, name string) { if mock.EnqueueFunc == nil { - panic("GlobalDNSControllerMock.EnqueueFunc: method is nil but GlobalDNSController.Enqueue was just called") + panic("GlobalDnsControllerMock.EnqueueFunc: method is nil but GlobalDnsController.Enqueue was just called") } callInfo := struct { Namespace string @@ -507,16 +481,16 @@ func (mock *GlobalDNSControllerMock) Enqueue(namespace string, name string) { Namespace: namespace, Name: name, } - lockGlobalDNSControllerMockEnqueue.Lock() + lockGlobalDnsControllerMockEnqueue.Lock() mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) - lockGlobalDNSControllerMockEnqueue.Unlock() + lockGlobalDnsControllerMockEnqueue.Unlock() mock.EnqueueFunc(namespace, name) } // EnqueueCalls gets all the calls that were made to Enqueue. // Check the length with: -// len(mockedGlobalDNSController.EnqueueCalls()) -func (mock *GlobalDNSControllerMock) EnqueueCalls() []struct { +// len(mockedGlobalDnsController.EnqueueCalls()) +func (mock *GlobalDnsControllerMock) EnqueueCalls() []struct { Namespace string Name string } { @@ -524,16 +498,16 @@ func (mock *GlobalDNSControllerMock) EnqueueCalls() []struct { Namespace string Name string } - lockGlobalDNSControllerMockEnqueue.RLock() + lockGlobalDnsControllerMockEnqueue.RLock() calls = mock.calls.Enqueue - lockGlobalDNSControllerMockEnqueue.RUnlock() + lockGlobalDnsControllerMockEnqueue.RUnlock() return calls } // EnqueueAfter calls EnqueueAfterFunc. -func (mock *GlobalDNSControllerMock) EnqueueAfter(namespace string, name string, after time.Duration) { +func (mock *GlobalDnsControllerMock) EnqueueAfter(namespace string, name string, after time.Duration) { if mock.EnqueueAfterFunc == nil { - panic("GlobalDNSControllerMock.EnqueueAfterFunc: method is nil but GlobalDNSController.EnqueueAfter was just called") + panic("GlobalDnsControllerMock.EnqueueAfterFunc: method is nil but GlobalDnsController.EnqueueAfter was just called") } callInfo := struct { Namespace string @@ -544,16 +518,16 @@ func (mock *GlobalDNSControllerMock) EnqueueAfter(namespace string, name string, Name: name, After: after, } - lockGlobalDNSControllerMockEnqueueAfter.Lock() + lockGlobalDnsControllerMockEnqueueAfter.Lock() mock.calls.EnqueueAfter = append(mock.calls.EnqueueAfter, callInfo) - lockGlobalDNSControllerMockEnqueueAfter.Unlock() + lockGlobalDnsControllerMockEnqueueAfter.Unlock() mock.EnqueueAfterFunc(namespace, name, after) } // EnqueueAfterCalls gets all the calls that were made to EnqueueAfter. // Check the length with: -// len(mockedGlobalDNSController.EnqueueAfterCalls()) -func (mock *GlobalDNSControllerMock) EnqueueAfterCalls() []struct { +// len(mockedGlobalDnsController.EnqueueAfterCalls()) +func (mock *GlobalDnsControllerMock) EnqueueAfterCalls() []struct { Namespace string Name string After time.Duration @@ -563,217 +537,151 @@ func (mock *GlobalDNSControllerMock) EnqueueAfterCalls() []struct { Name string After time.Duration } - lockGlobalDNSControllerMockEnqueueAfter.RLock() + lockGlobalDnsControllerMockEnqueueAfter.RLock() calls = mock.calls.EnqueueAfter - lockGlobalDNSControllerMockEnqueueAfter.RUnlock() + lockGlobalDnsControllerMockEnqueueAfter.RUnlock() return calls } // Generic calls GenericFunc. -func (mock *GlobalDNSControllerMock) Generic() controller.GenericController { +func (mock *GlobalDnsControllerMock) Generic() controller.GenericController { if mock.GenericFunc == nil { - panic("GlobalDNSControllerMock.GenericFunc: method is nil but GlobalDNSController.Generic was just called") + panic("GlobalDnsControllerMock.GenericFunc: method is nil but GlobalDnsController.Generic was just called") } callInfo := struct { }{} - lockGlobalDNSControllerMockGeneric.Lock() + lockGlobalDnsControllerMockGeneric.Lock() mock.calls.Generic = append(mock.calls.Generic, callInfo) - lockGlobalDNSControllerMockGeneric.Unlock() + lockGlobalDnsControllerMockGeneric.Unlock() return mock.GenericFunc() } // GenericCalls gets all the calls that were made to Generic. // Check the length with: -// len(mockedGlobalDNSController.GenericCalls()) -func (mock *GlobalDNSControllerMock) GenericCalls() []struct { +// len(mockedGlobalDnsController.GenericCalls()) +func (mock *GlobalDnsControllerMock) GenericCalls() []struct { } { var calls []struct { } - lockGlobalDNSControllerMockGeneric.RLock() + lockGlobalDnsControllerMockGeneric.RLock() calls = mock.calls.Generic - lockGlobalDNSControllerMockGeneric.RUnlock() + lockGlobalDnsControllerMockGeneric.RUnlock() return calls } // Informer calls InformerFunc. -func (mock *GlobalDNSControllerMock) Informer() cache.SharedIndexInformer { +func (mock *GlobalDnsControllerMock) Informer() cache.SharedIndexInformer { if mock.InformerFunc == nil { - panic("GlobalDNSControllerMock.InformerFunc: method is nil but GlobalDNSController.Informer was just called") + panic("GlobalDnsControllerMock.InformerFunc: method is nil but GlobalDnsController.Informer was just called") } callInfo := struct { }{} - lockGlobalDNSControllerMockInformer.Lock() + lockGlobalDnsControllerMockInformer.Lock() mock.calls.Informer = append(mock.calls.Informer, callInfo) - lockGlobalDNSControllerMockInformer.Unlock() + lockGlobalDnsControllerMockInformer.Unlock() return mock.InformerFunc() } // InformerCalls gets all the calls that were made to Informer. // Check the length with: -// len(mockedGlobalDNSController.InformerCalls()) -func (mock *GlobalDNSControllerMock) InformerCalls() []struct { +// len(mockedGlobalDnsController.InformerCalls()) +func (mock *GlobalDnsControllerMock) InformerCalls() []struct { } { var calls []struct { } - lockGlobalDNSControllerMockInformer.RLock() + lockGlobalDnsControllerMockInformer.RLock() calls = mock.calls.Informer - lockGlobalDNSControllerMockInformer.RUnlock() + lockGlobalDnsControllerMockInformer.RUnlock() return calls } // Lister calls ListerFunc. -func (mock *GlobalDNSControllerMock) Lister() v3.GlobalDNSLister { +func (mock *GlobalDnsControllerMock) Lister() v3.GlobalDnsLister { if mock.ListerFunc == nil { - panic("GlobalDNSControllerMock.ListerFunc: method is nil but GlobalDNSController.Lister was just called") + panic("GlobalDnsControllerMock.ListerFunc: method is nil but GlobalDnsController.Lister was just called") } callInfo := struct { }{} - lockGlobalDNSControllerMockLister.Lock() + lockGlobalDnsControllerMockLister.Lock() mock.calls.Lister = append(mock.calls.Lister, callInfo) - lockGlobalDNSControllerMockLister.Unlock() + lockGlobalDnsControllerMockLister.Unlock() return mock.ListerFunc() } // ListerCalls gets all the calls that were made to Lister. // Check the length with: -// len(mockedGlobalDNSController.ListerCalls()) -func (mock *GlobalDNSControllerMock) ListerCalls() []struct { +// len(mockedGlobalDnsController.ListerCalls()) +func (mock *GlobalDnsControllerMock) ListerCalls() []struct { } { var calls []struct { } - lockGlobalDNSControllerMockLister.RLock() + lockGlobalDnsControllerMockLister.RLock() calls = mock.calls.Lister - lockGlobalDNSControllerMockLister.RUnlock() - return calls -} - -// Start calls StartFunc. -func (mock *GlobalDNSControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("GlobalDNSControllerMock.StartFunc: method is nil but GlobalDNSController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockGlobalDNSControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockGlobalDNSControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedGlobalDNSController.StartCalls()) -func (mock *GlobalDNSControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockGlobalDNSControllerMockStart.RLock() - calls = mock.calls.Start - lockGlobalDNSControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *GlobalDNSControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("GlobalDNSControllerMock.SyncFunc: method is nil but GlobalDNSController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockGlobalDNSControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockGlobalDNSControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedGlobalDNSController.SyncCalls()) -func (mock *GlobalDNSControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockGlobalDNSControllerMockSync.RLock() - calls = mock.calls.Sync - lockGlobalDNSControllerMockSync.RUnlock() + lockGlobalDnsControllerMockLister.RUnlock() return calls } var ( - lockGlobalDNSInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex - lockGlobalDNSInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex - lockGlobalDNSInterfaceMockAddClusterScopedHandler sync.RWMutex - lockGlobalDNSInterfaceMockAddClusterScopedLifecycle sync.RWMutex - lockGlobalDNSInterfaceMockAddFeatureHandler sync.RWMutex - lockGlobalDNSInterfaceMockAddFeatureLifecycle sync.RWMutex - lockGlobalDNSInterfaceMockAddHandler sync.RWMutex - lockGlobalDNSInterfaceMockAddLifecycle sync.RWMutex - lockGlobalDNSInterfaceMockController sync.RWMutex - lockGlobalDNSInterfaceMockCreate sync.RWMutex - lockGlobalDNSInterfaceMockDelete sync.RWMutex - lockGlobalDNSInterfaceMockDeleteCollection sync.RWMutex - lockGlobalDNSInterfaceMockDeleteNamespaced sync.RWMutex - lockGlobalDNSInterfaceMockGet sync.RWMutex - lockGlobalDNSInterfaceMockGetNamespaced sync.RWMutex - lockGlobalDNSInterfaceMockList sync.RWMutex - lockGlobalDNSInterfaceMockListNamespaced sync.RWMutex - lockGlobalDNSInterfaceMockObjectClient sync.RWMutex - lockGlobalDNSInterfaceMockUpdate sync.RWMutex - lockGlobalDNSInterfaceMockWatch sync.RWMutex + lockGlobalDnsInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex + lockGlobalDnsInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex + lockGlobalDnsInterfaceMockAddClusterScopedHandler sync.RWMutex + lockGlobalDnsInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockGlobalDnsInterfaceMockAddFeatureHandler sync.RWMutex + lockGlobalDnsInterfaceMockAddFeatureLifecycle sync.RWMutex + lockGlobalDnsInterfaceMockAddHandler sync.RWMutex + lockGlobalDnsInterfaceMockAddLifecycle sync.RWMutex + lockGlobalDnsInterfaceMockController sync.RWMutex + lockGlobalDnsInterfaceMockCreate sync.RWMutex + lockGlobalDnsInterfaceMockDelete sync.RWMutex + lockGlobalDnsInterfaceMockDeleteCollection sync.RWMutex + lockGlobalDnsInterfaceMockDeleteNamespaced sync.RWMutex + lockGlobalDnsInterfaceMockGet sync.RWMutex + lockGlobalDnsInterfaceMockGetNamespaced sync.RWMutex + lockGlobalDnsInterfaceMockList sync.RWMutex + lockGlobalDnsInterfaceMockListNamespaced sync.RWMutex + lockGlobalDnsInterfaceMockObjectClient sync.RWMutex + lockGlobalDnsInterfaceMockUpdate sync.RWMutex + lockGlobalDnsInterfaceMockWatch sync.RWMutex ) -// Ensure, that GlobalDNSInterfaceMock does implement GlobalDNSInterface. +// Ensure, that GlobalDnsInterfaceMock does implement GlobalDnsInterface. // If this is not the case, regenerate this file with moq. -var _ v3.GlobalDNSInterface = &GlobalDNSInterfaceMock{} +var _ v3.GlobalDnsInterface = &GlobalDnsInterfaceMock{} -// GlobalDNSInterfaceMock is a mock implementation of GlobalDNSInterface. +// GlobalDnsInterfaceMock is a mock implementation of GlobalDnsInterface. // -// func TestSomethingThatUsesGlobalDNSInterface(t *testing.T) { +// func TestSomethingThatUsesGlobalDnsInterface(t *testing.T) { // -// // make and configure a mocked GlobalDNSInterface -// mockedGlobalDNSInterface := &GlobalDNSInterfaceMock{ -// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.GlobalDNSHandlerFunc) { +// // make and configure a mocked GlobalDnsInterface +// mockedGlobalDnsInterface := &GlobalDnsInterfaceMock{ +// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.GlobalDnsHandlerFunc) { // panic("mock out the AddClusterScopedFeatureHandler method") // }, -// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.GlobalDNSLifecycle) { +// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.GlobalDnsLifecycle) { // panic("mock out the AddClusterScopedFeatureLifecycle method") // }, -// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.GlobalDNSHandlerFunc) { +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.GlobalDnsHandlerFunc) { // panic("mock out the AddClusterScopedHandler method") // }, -// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalDNSLifecycle) { +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalDnsLifecycle) { // panic("mock out the AddClusterScopedLifecycle method") // }, -// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.GlobalDNSHandlerFunc) { +// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.GlobalDnsHandlerFunc) { // panic("mock out the AddFeatureHandler method") // }, -// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3.GlobalDNSLifecycle) { +// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3.GlobalDnsLifecycle) { // panic("mock out the AddFeatureLifecycle method") // }, -// AddHandlerFunc: func(ctx context.Context, name string, sync v3.GlobalDNSHandlerFunc) { +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.GlobalDnsHandlerFunc) { // panic("mock out the AddHandler method") // }, -// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.GlobalDNSLifecycle) { +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.GlobalDnsLifecycle) { // panic("mock out the AddLifecycle method") // }, -// ControllerFunc: func() v3.GlobalDNSController { +// ControllerFunc: func() v3.GlobalDnsController { // panic("mock out the Controller method") // }, -// CreateFunc: func(in1 *v3.GlobalDNS) (*v3.GlobalDNS, error) { +// CreateFunc: func(in1 *v3.GlobalDns) (*v3.GlobalDns, error) { // panic("mock out the Create method") // }, // DeleteFunc: func(name string, options *v1.DeleteOptions) error { @@ -785,22 +693,22 @@ var _ v3.GlobalDNSInterface = &GlobalDNSInterfaceMock{} // DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { // panic("mock out the DeleteNamespaced method") // }, -// GetFunc: func(name string, opts v1.GetOptions) (*v3.GlobalDNS, error) { +// GetFunc: func(name string, opts v1.GetOptions) (*v3.GlobalDns, error) { // panic("mock out the Get method") // }, -// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.GlobalDNS, error) { +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.GlobalDns, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1.ListOptions) (*v3.GlobalDNSList, error) { +// ListFunc: func(opts v1.ListOptions) (*v3.GlobalDnsList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v3.GlobalDNSList, error) { +// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v3.GlobalDnsList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { // panic("mock out the ObjectClient method") // }, -// UpdateFunc: func(in1 *v3.GlobalDNS) (*v3.GlobalDNS, error) { +// UpdateFunc: func(in1 *v3.GlobalDns) (*v3.GlobalDns, error) { // panic("mock out the Update method") // }, // WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { @@ -808,40 +716,40 @@ var _ v3.GlobalDNSInterface = &GlobalDNSInterfaceMock{} // }, // } // -// // use mockedGlobalDNSInterface in code that requires GlobalDNSInterface +// // use mockedGlobalDnsInterface in code that requires GlobalDnsInterface // // and then make assertions. // // } -type GlobalDNSInterfaceMock struct { +type GlobalDnsInterfaceMock struct { // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. - AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.GlobalDNSHandlerFunc) + AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.GlobalDnsHandlerFunc) // AddClusterScopedFeatureLifecycleFunc mocks the AddClusterScopedFeatureLifecycle method. - AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.GlobalDNSLifecycle) + AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.GlobalDnsLifecycle) // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. - AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.GlobalDNSHandlerFunc) + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.GlobalDnsHandlerFunc) // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. - AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalDNSLifecycle) + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalDnsLifecycle) // AddFeatureHandlerFunc mocks the AddFeatureHandler method. - AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.GlobalDNSHandlerFunc) + AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.GlobalDnsHandlerFunc) // AddFeatureLifecycleFunc mocks the AddFeatureLifecycle method. - AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3.GlobalDNSLifecycle) + AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3.GlobalDnsLifecycle) // AddHandlerFunc mocks the AddHandler method. - AddHandlerFunc func(ctx context.Context, name string, sync v3.GlobalDNSHandlerFunc) + AddHandlerFunc func(ctx context.Context, name string, sync v3.GlobalDnsHandlerFunc) // AddLifecycleFunc mocks the AddLifecycle method. - AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.GlobalDNSLifecycle) + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.GlobalDnsLifecycle) // ControllerFunc mocks the Controller method. - ControllerFunc func() v3.GlobalDNSController + ControllerFunc func() v3.GlobalDnsController // CreateFunc mocks the Create method. - CreateFunc func(in1 *v3.GlobalDNS) (*v3.GlobalDNS, error) + CreateFunc func(in1 *v3.GlobalDns) (*v3.GlobalDns, error) // DeleteFunc mocks the Delete method. DeleteFunc func(name string, options *v1.DeleteOptions) error @@ -853,22 +761,22 @@ type GlobalDNSInterfaceMock struct { DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error // GetFunc mocks the Get method. - GetFunc func(name string, opts v1.GetOptions) (*v3.GlobalDNS, error) + GetFunc func(name string, opts v1.GetOptions) (*v3.GlobalDns, error) // GetNamespacedFunc mocks the GetNamespaced method. - GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.GlobalDNS, error) + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.GlobalDns, error) // ListFunc mocks the List method. - ListFunc func(opts v1.ListOptions) (*v3.GlobalDNSList, error) + ListFunc func(opts v1.ListOptions) (*v3.GlobalDnsList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v3.GlobalDNSList, error) + ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v3.GlobalDnsList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient // UpdateFunc mocks the Update method. - UpdateFunc func(in1 *v3.GlobalDNS) (*v3.GlobalDNS, error) + UpdateFunc func(in1 *v3.GlobalDns) (*v3.GlobalDns, error) // WatchFunc mocks the Watch method. WatchFunc func(opts v1.ListOptions) (watch.Interface, error) @@ -886,7 +794,7 @@ type GlobalDNSInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Sync is the sync argument value. - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } // AddClusterScopedFeatureLifecycle holds details about calls to the AddClusterScopedFeatureLifecycle method. AddClusterScopedFeatureLifecycle []struct { @@ -899,7 +807,7 @@ type GlobalDNSInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Lifecycle is the lifecycle argument value. - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle } // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. AddClusterScopedHandler []struct { @@ -910,7 +818,7 @@ type GlobalDNSInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Sync is the sync argument value. - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. AddClusterScopedLifecycle []struct { @@ -921,7 +829,7 @@ type GlobalDNSInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Lifecycle is the lifecycle argument value. - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle } // AddFeatureHandler holds details about calls to the AddFeatureHandler method. AddFeatureHandler []struct { @@ -932,7 +840,7 @@ type GlobalDNSInterfaceMock struct { // Name is the name argument value. Name string // Sync is the sync argument value. - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } // AddFeatureLifecycle holds details about calls to the AddFeatureLifecycle method. AddFeatureLifecycle []struct { @@ -943,7 +851,7 @@ type GlobalDNSInterfaceMock struct { // Name is the name argument value. Name string // Lifecycle is the lifecycle argument value. - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle } // AddHandler holds details about calls to the AddHandler method. AddHandler []struct { @@ -952,7 +860,7 @@ type GlobalDNSInterfaceMock struct { // Name is the name argument value. Name string // Sync is the sync argument value. - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } // AddLifecycle holds details about calls to the AddLifecycle method. AddLifecycle []struct { @@ -961,7 +869,7 @@ type GlobalDNSInterfaceMock struct { // Name is the name argument value. Name string // Lifecycle is the lifecycle argument value. - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle } // Controller holds details about calls to the Controller method. Controller []struct { @@ -969,7 +877,7 @@ type GlobalDNSInterfaceMock struct { // Create holds details about calls to the Create method. Create []struct { // In1 is the in1 argument value. - In1 *v3.GlobalDNS + In1 *v3.GlobalDns } // Delete holds details about calls to the Delete method. Delete []struct { @@ -1028,7 +936,7 @@ type GlobalDNSInterfaceMock struct { // Update holds details about calls to the Update method. Update []struct { // In1 is the in1 argument value. - In1 *v3.GlobalDNS + In1 *v3.GlobalDns } // Watch holds details about calls to the Watch method. Watch []struct { @@ -1039,16 +947,16 @@ type GlobalDNSInterfaceMock struct { } // AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc. -func (mock *GlobalDNSInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.GlobalDNSHandlerFunc) { +func (mock *GlobalDnsInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.GlobalDnsHandlerFunc) { if mock.AddClusterScopedFeatureHandlerFunc == nil { - panic("GlobalDNSInterfaceMock.AddClusterScopedFeatureHandlerFunc: method is nil but GlobalDNSInterface.AddClusterScopedFeatureHandler was just called") + panic("GlobalDnsInterfaceMock.AddClusterScopedFeatureHandlerFunc: method is nil but GlobalDnsInterface.AddClusterScopedFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc }{ Ctx: ctx, Enabled: enabled, @@ -1056,46 +964,46 @@ func (mock *GlobalDNSInterfaceMock) AddClusterScopedFeatureHandler(ctx context.C ClusterName: clusterName, Sync: sync, } - lockGlobalDNSInterfaceMockAddClusterScopedFeatureHandler.Lock() + lockGlobalDnsInterfaceMockAddClusterScopedFeatureHandler.Lock() mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) - lockGlobalDNSInterfaceMockAddClusterScopedFeatureHandler.Unlock() + lockGlobalDnsInterfaceMockAddClusterScopedFeatureHandler.Unlock() mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, sync) } // AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. // Check the length with: -// len(mockedGlobalDNSInterface.AddClusterScopedFeatureHandlerCalls()) -func (mock *GlobalDNSInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct { +// len(mockedGlobalDnsInterface.AddClusterScopedFeatureHandlerCalls()) +func (mock *GlobalDnsInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } - lockGlobalDNSInterfaceMockAddClusterScopedFeatureHandler.RLock() + lockGlobalDnsInterfaceMockAddClusterScopedFeatureHandler.RLock() calls = mock.calls.AddClusterScopedFeatureHandler - lockGlobalDNSInterfaceMockAddClusterScopedFeatureHandler.RUnlock() + lockGlobalDnsInterfaceMockAddClusterScopedFeatureHandler.RUnlock() return calls } // AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc. -func (mock *GlobalDNSInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.GlobalDNSLifecycle) { +func (mock *GlobalDnsInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.GlobalDnsLifecycle) { if mock.AddClusterScopedFeatureLifecycleFunc == nil { - panic("GlobalDNSInterfaceMock.AddClusterScopedFeatureLifecycleFunc: method is nil but GlobalDNSInterface.AddClusterScopedFeatureLifecycle was just called") + panic("GlobalDnsInterfaceMock.AddClusterScopedFeatureLifecycleFunc: method is nil but GlobalDnsInterface.AddClusterScopedFeatureLifecycle was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle }{ Ctx: ctx, Enabled: enabled, @@ -1103,346 +1011,346 @@ func (mock *GlobalDNSInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context ClusterName: clusterName, Lifecycle: lifecycle, } - lockGlobalDNSInterfaceMockAddClusterScopedFeatureLifecycle.Lock() + lockGlobalDnsInterfaceMockAddClusterScopedFeatureLifecycle.Lock() mock.calls.AddClusterScopedFeatureLifecycle = append(mock.calls.AddClusterScopedFeatureLifecycle, callInfo) - lockGlobalDNSInterfaceMockAddClusterScopedFeatureLifecycle.Unlock() + lockGlobalDnsInterfaceMockAddClusterScopedFeatureLifecycle.Unlock() mock.AddClusterScopedFeatureLifecycleFunc(ctx, enabled, name, clusterName, lifecycle) } // AddClusterScopedFeatureLifecycleCalls gets all the calls that were made to AddClusterScopedFeatureLifecycle. // Check the length with: -// len(mockedGlobalDNSInterface.AddClusterScopedFeatureLifecycleCalls()) -func (mock *GlobalDNSInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct { +// len(mockedGlobalDnsInterface.AddClusterScopedFeatureLifecycleCalls()) +func (mock *GlobalDnsInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle } { var calls []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle } - lockGlobalDNSInterfaceMockAddClusterScopedFeatureLifecycle.RLock() + lockGlobalDnsInterfaceMockAddClusterScopedFeatureLifecycle.RLock() calls = mock.calls.AddClusterScopedFeatureLifecycle - lockGlobalDNSInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock() + lockGlobalDnsInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock() return calls } // AddClusterScopedHandler calls AddClusterScopedHandlerFunc. -func (mock *GlobalDNSInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.GlobalDNSHandlerFunc) { +func (mock *GlobalDnsInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.GlobalDnsHandlerFunc) { if mock.AddClusterScopedHandlerFunc == nil { - panic("GlobalDNSInterfaceMock.AddClusterScopedHandlerFunc: method is nil but GlobalDNSInterface.AddClusterScopedHandler was just called") + panic("GlobalDnsInterfaceMock.AddClusterScopedHandlerFunc: method is nil but GlobalDnsInterface.AddClusterScopedHandler was just called") } callInfo := struct { Ctx context.Context Name string ClusterName string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc }{ Ctx: ctx, Name: name, ClusterName: clusterName, Sync: sync, } - lockGlobalDNSInterfaceMockAddClusterScopedHandler.Lock() + lockGlobalDnsInterfaceMockAddClusterScopedHandler.Lock() mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) - lockGlobalDNSInterfaceMockAddClusterScopedHandler.Unlock() + lockGlobalDnsInterfaceMockAddClusterScopedHandler.Unlock() mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) } // AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. // Check the length with: -// len(mockedGlobalDNSInterface.AddClusterScopedHandlerCalls()) -func (mock *GlobalDNSInterfaceMock) AddClusterScopedHandlerCalls() []struct { +// len(mockedGlobalDnsInterface.AddClusterScopedHandlerCalls()) +func (mock *GlobalDnsInterfaceMock) AddClusterScopedHandlerCalls() []struct { Ctx context.Context Name string ClusterName string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } { var calls []struct { Ctx context.Context Name string ClusterName string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } - lockGlobalDNSInterfaceMockAddClusterScopedHandler.RLock() + lockGlobalDnsInterfaceMockAddClusterScopedHandler.RLock() calls = mock.calls.AddClusterScopedHandler - lockGlobalDNSInterfaceMockAddClusterScopedHandler.RUnlock() + lockGlobalDnsInterfaceMockAddClusterScopedHandler.RUnlock() return calls } // AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. -func (mock *GlobalDNSInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalDNSLifecycle) { +func (mock *GlobalDnsInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.GlobalDnsLifecycle) { if mock.AddClusterScopedLifecycleFunc == nil { - panic("GlobalDNSInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but GlobalDNSInterface.AddClusterScopedLifecycle was just called") + panic("GlobalDnsInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but GlobalDnsInterface.AddClusterScopedLifecycle was just called") } callInfo := struct { Ctx context.Context Name string ClusterName string - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle }{ Ctx: ctx, Name: name, ClusterName: clusterName, Lifecycle: lifecycle, } - lockGlobalDNSInterfaceMockAddClusterScopedLifecycle.Lock() + lockGlobalDnsInterfaceMockAddClusterScopedLifecycle.Lock() mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) - lockGlobalDNSInterfaceMockAddClusterScopedLifecycle.Unlock() + lockGlobalDnsInterfaceMockAddClusterScopedLifecycle.Unlock() mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) } // AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. // Check the length with: -// len(mockedGlobalDNSInterface.AddClusterScopedLifecycleCalls()) -func (mock *GlobalDNSInterfaceMock) AddClusterScopedLifecycleCalls() []struct { +// len(mockedGlobalDnsInterface.AddClusterScopedLifecycleCalls()) +func (mock *GlobalDnsInterfaceMock) AddClusterScopedLifecycleCalls() []struct { Ctx context.Context Name string ClusterName string - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle } { var calls []struct { Ctx context.Context Name string ClusterName string - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle } - lockGlobalDNSInterfaceMockAddClusterScopedLifecycle.RLock() + lockGlobalDnsInterfaceMockAddClusterScopedLifecycle.RLock() calls = mock.calls.AddClusterScopedLifecycle - lockGlobalDNSInterfaceMockAddClusterScopedLifecycle.RUnlock() + lockGlobalDnsInterfaceMockAddClusterScopedLifecycle.RUnlock() return calls } // AddFeatureHandler calls AddFeatureHandlerFunc. -func (mock *GlobalDNSInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.GlobalDNSHandlerFunc) { +func (mock *GlobalDnsInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.GlobalDnsHandlerFunc) { if mock.AddFeatureHandlerFunc == nil { - panic("GlobalDNSInterfaceMock.AddFeatureHandlerFunc: method is nil but GlobalDNSInterface.AddFeatureHandler was just called") + panic("GlobalDnsInterfaceMock.AddFeatureHandlerFunc: method is nil but GlobalDnsInterface.AddFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc }{ Ctx: ctx, Enabled: enabled, Name: name, Sync: sync, } - lockGlobalDNSInterfaceMockAddFeatureHandler.Lock() + lockGlobalDnsInterfaceMockAddFeatureHandler.Lock() mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) - lockGlobalDNSInterfaceMockAddFeatureHandler.Unlock() + lockGlobalDnsInterfaceMockAddFeatureHandler.Unlock() mock.AddFeatureHandlerFunc(ctx, enabled, name, sync) } // AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. // Check the length with: -// len(mockedGlobalDNSInterface.AddFeatureHandlerCalls()) -func (mock *GlobalDNSInterfaceMock) AddFeatureHandlerCalls() []struct { +// len(mockedGlobalDnsInterface.AddFeatureHandlerCalls()) +func (mock *GlobalDnsInterfaceMock) AddFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } - lockGlobalDNSInterfaceMockAddFeatureHandler.RLock() + lockGlobalDnsInterfaceMockAddFeatureHandler.RLock() calls = mock.calls.AddFeatureHandler - lockGlobalDNSInterfaceMockAddFeatureHandler.RUnlock() + lockGlobalDnsInterfaceMockAddFeatureHandler.RUnlock() return calls } // AddFeatureLifecycle calls AddFeatureLifecycleFunc. -func (mock *GlobalDNSInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v3.GlobalDNSLifecycle) { +func (mock *GlobalDnsInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v3.GlobalDnsLifecycle) { if mock.AddFeatureLifecycleFunc == nil { - panic("GlobalDNSInterfaceMock.AddFeatureLifecycleFunc: method is nil but GlobalDNSInterface.AddFeatureLifecycle was just called") + panic("GlobalDnsInterfaceMock.AddFeatureLifecycleFunc: method is nil but GlobalDnsInterface.AddFeatureLifecycle was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle }{ Ctx: ctx, Enabled: enabled, Name: name, Lifecycle: lifecycle, } - lockGlobalDNSInterfaceMockAddFeatureLifecycle.Lock() + lockGlobalDnsInterfaceMockAddFeatureLifecycle.Lock() mock.calls.AddFeatureLifecycle = append(mock.calls.AddFeatureLifecycle, callInfo) - lockGlobalDNSInterfaceMockAddFeatureLifecycle.Unlock() + lockGlobalDnsInterfaceMockAddFeatureLifecycle.Unlock() mock.AddFeatureLifecycleFunc(ctx, enabled, name, lifecycle) } // AddFeatureLifecycleCalls gets all the calls that were made to AddFeatureLifecycle. // Check the length with: -// len(mockedGlobalDNSInterface.AddFeatureLifecycleCalls()) -func (mock *GlobalDNSInterfaceMock) AddFeatureLifecycleCalls() []struct { +// len(mockedGlobalDnsInterface.AddFeatureLifecycleCalls()) +func (mock *GlobalDnsInterfaceMock) AddFeatureLifecycleCalls() []struct { Ctx context.Context Enabled func() bool Name string - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle } { var calls []struct { Ctx context.Context Enabled func() bool Name string - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle } - lockGlobalDNSInterfaceMockAddFeatureLifecycle.RLock() + lockGlobalDnsInterfaceMockAddFeatureLifecycle.RLock() calls = mock.calls.AddFeatureLifecycle - lockGlobalDNSInterfaceMockAddFeatureLifecycle.RUnlock() + lockGlobalDnsInterfaceMockAddFeatureLifecycle.RUnlock() return calls } // AddHandler calls AddHandlerFunc. -func (mock *GlobalDNSInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.GlobalDNSHandlerFunc) { +func (mock *GlobalDnsInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.GlobalDnsHandlerFunc) { if mock.AddHandlerFunc == nil { - panic("GlobalDNSInterfaceMock.AddHandlerFunc: method is nil but GlobalDNSInterface.AddHandler was just called") + panic("GlobalDnsInterfaceMock.AddHandlerFunc: method is nil but GlobalDnsInterface.AddHandler was just called") } callInfo := struct { Ctx context.Context Name string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc }{ Ctx: ctx, Name: name, Sync: sync, } - lockGlobalDNSInterfaceMockAddHandler.Lock() + lockGlobalDnsInterfaceMockAddHandler.Lock() mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) - lockGlobalDNSInterfaceMockAddHandler.Unlock() + lockGlobalDnsInterfaceMockAddHandler.Unlock() mock.AddHandlerFunc(ctx, name, sync) } // AddHandlerCalls gets all the calls that were made to AddHandler. // Check the length with: -// len(mockedGlobalDNSInterface.AddHandlerCalls()) -func (mock *GlobalDNSInterfaceMock) AddHandlerCalls() []struct { +// len(mockedGlobalDnsInterface.AddHandlerCalls()) +func (mock *GlobalDnsInterfaceMock) AddHandlerCalls() []struct { Ctx context.Context Name string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } { var calls []struct { Ctx context.Context Name string - Sync v3.GlobalDNSHandlerFunc + Sync v3.GlobalDnsHandlerFunc } - lockGlobalDNSInterfaceMockAddHandler.RLock() + lockGlobalDnsInterfaceMockAddHandler.RLock() calls = mock.calls.AddHandler - lockGlobalDNSInterfaceMockAddHandler.RUnlock() + lockGlobalDnsInterfaceMockAddHandler.RUnlock() return calls } // AddLifecycle calls AddLifecycleFunc. -func (mock *GlobalDNSInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.GlobalDNSLifecycle) { +func (mock *GlobalDnsInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.GlobalDnsLifecycle) { if mock.AddLifecycleFunc == nil { - panic("GlobalDNSInterfaceMock.AddLifecycleFunc: method is nil but GlobalDNSInterface.AddLifecycle was just called") + panic("GlobalDnsInterfaceMock.AddLifecycleFunc: method is nil but GlobalDnsInterface.AddLifecycle was just called") } callInfo := struct { Ctx context.Context Name string - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle }{ Ctx: ctx, Name: name, Lifecycle: lifecycle, } - lockGlobalDNSInterfaceMockAddLifecycle.Lock() + lockGlobalDnsInterfaceMockAddLifecycle.Lock() mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) - lockGlobalDNSInterfaceMockAddLifecycle.Unlock() + lockGlobalDnsInterfaceMockAddLifecycle.Unlock() mock.AddLifecycleFunc(ctx, name, lifecycle) } // AddLifecycleCalls gets all the calls that were made to AddLifecycle. // Check the length with: -// len(mockedGlobalDNSInterface.AddLifecycleCalls()) -func (mock *GlobalDNSInterfaceMock) AddLifecycleCalls() []struct { +// len(mockedGlobalDnsInterface.AddLifecycleCalls()) +func (mock *GlobalDnsInterfaceMock) AddLifecycleCalls() []struct { Ctx context.Context Name string - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle } { var calls []struct { Ctx context.Context Name string - Lifecycle v3.GlobalDNSLifecycle + Lifecycle v3.GlobalDnsLifecycle } - lockGlobalDNSInterfaceMockAddLifecycle.RLock() + lockGlobalDnsInterfaceMockAddLifecycle.RLock() calls = mock.calls.AddLifecycle - lockGlobalDNSInterfaceMockAddLifecycle.RUnlock() + lockGlobalDnsInterfaceMockAddLifecycle.RUnlock() return calls } // Controller calls ControllerFunc. -func (mock *GlobalDNSInterfaceMock) Controller() v3.GlobalDNSController { +func (mock *GlobalDnsInterfaceMock) Controller() v3.GlobalDnsController { if mock.ControllerFunc == nil { - panic("GlobalDNSInterfaceMock.ControllerFunc: method is nil but GlobalDNSInterface.Controller was just called") + panic("GlobalDnsInterfaceMock.ControllerFunc: method is nil but GlobalDnsInterface.Controller was just called") } callInfo := struct { }{} - lockGlobalDNSInterfaceMockController.Lock() + lockGlobalDnsInterfaceMockController.Lock() mock.calls.Controller = append(mock.calls.Controller, callInfo) - lockGlobalDNSInterfaceMockController.Unlock() + lockGlobalDnsInterfaceMockController.Unlock() return mock.ControllerFunc() } // ControllerCalls gets all the calls that were made to Controller. // Check the length with: -// len(mockedGlobalDNSInterface.ControllerCalls()) -func (mock *GlobalDNSInterfaceMock) ControllerCalls() []struct { +// len(mockedGlobalDnsInterface.ControllerCalls()) +func (mock *GlobalDnsInterfaceMock) ControllerCalls() []struct { } { var calls []struct { } - lockGlobalDNSInterfaceMockController.RLock() + lockGlobalDnsInterfaceMockController.RLock() calls = mock.calls.Controller - lockGlobalDNSInterfaceMockController.RUnlock() + lockGlobalDnsInterfaceMockController.RUnlock() return calls } // Create calls CreateFunc. -func (mock *GlobalDNSInterfaceMock) Create(in1 *v3.GlobalDNS) (*v3.GlobalDNS, error) { +func (mock *GlobalDnsInterfaceMock) Create(in1 *v3.GlobalDns) (*v3.GlobalDns, error) { if mock.CreateFunc == nil { - panic("GlobalDNSInterfaceMock.CreateFunc: method is nil but GlobalDNSInterface.Create was just called") + panic("GlobalDnsInterfaceMock.CreateFunc: method is nil but GlobalDnsInterface.Create was just called") } callInfo := struct { - In1 *v3.GlobalDNS + In1 *v3.GlobalDns }{ In1: in1, } - lockGlobalDNSInterfaceMockCreate.Lock() + lockGlobalDnsInterfaceMockCreate.Lock() mock.calls.Create = append(mock.calls.Create, callInfo) - lockGlobalDNSInterfaceMockCreate.Unlock() + lockGlobalDnsInterfaceMockCreate.Unlock() return mock.CreateFunc(in1) } // CreateCalls gets all the calls that were made to Create. // Check the length with: -// len(mockedGlobalDNSInterface.CreateCalls()) -func (mock *GlobalDNSInterfaceMock) CreateCalls() []struct { - In1 *v3.GlobalDNS +// len(mockedGlobalDnsInterface.CreateCalls()) +func (mock *GlobalDnsInterfaceMock) CreateCalls() []struct { + In1 *v3.GlobalDns } { var calls []struct { - In1 *v3.GlobalDNS + In1 *v3.GlobalDns } - lockGlobalDNSInterfaceMockCreate.RLock() + lockGlobalDnsInterfaceMockCreate.RLock() calls = mock.calls.Create - lockGlobalDNSInterfaceMockCreate.RUnlock() + lockGlobalDnsInterfaceMockCreate.RUnlock() return calls } // Delete calls DeleteFunc. -func (mock *GlobalDNSInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { +func (mock *GlobalDnsInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { if mock.DeleteFunc == nil { - panic("GlobalDNSInterfaceMock.DeleteFunc: method is nil but GlobalDNSInterface.Delete was just called") + panic("GlobalDnsInterfaceMock.DeleteFunc: method is nil but GlobalDnsInterface.Delete was just called") } callInfo := struct { Name string @@ -1451,16 +1359,16 @@ func (mock *GlobalDNSInterfaceMock) Delete(name string, options *v1.DeleteOption Name: name, Options: options, } - lockGlobalDNSInterfaceMockDelete.Lock() + lockGlobalDnsInterfaceMockDelete.Lock() mock.calls.Delete = append(mock.calls.Delete, callInfo) - lockGlobalDNSInterfaceMockDelete.Unlock() + lockGlobalDnsInterfaceMockDelete.Unlock() return mock.DeleteFunc(name, options) } // DeleteCalls gets all the calls that were made to Delete. // Check the length with: -// len(mockedGlobalDNSInterface.DeleteCalls()) -func (mock *GlobalDNSInterfaceMock) DeleteCalls() []struct { +// len(mockedGlobalDnsInterface.DeleteCalls()) +func (mock *GlobalDnsInterfaceMock) DeleteCalls() []struct { Name string Options *v1.DeleteOptions } { @@ -1468,16 +1376,16 @@ func (mock *GlobalDNSInterfaceMock) DeleteCalls() []struct { Name string Options *v1.DeleteOptions } - lockGlobalDNSInterfaceMockDelete.RLock() + lockGlobalDnsInterfaceMockDelete.RLock() calls = mock.calls.Delete - lockGlobalDNSInterfaceMockDelete.RUnlock() + lockGlobalDnsInterfaceMockDelete.RUnlock() return calls } // DeleteCollection calls DeleteCollectionFunc. -func (mock *GlobalDNSInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +func (mock *GlobalDnsInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { if mock.DeleteCollectionFunc == nil { - panic("GlobalDNSInterfaceMock.DeleteCollectionFunc: method is nil but GlobalDNSInterface.DeleteCollection was just called") + panic("GlobalDnsInterfaceMock.DeleteCollectionFunc: method is nil but GlobalDnsInterface.DeleteCollection was just called") } callInfo := struct { DeleteOpts *v1.DeleteOptions @@ -1486,16 +1394,16 @@ func (mock *GlobalDNSInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOption DeleteOpts: deleteOpts, ListOpts: listOpts, } - lockGlobalDNSInterfaceMockDeleteCollection.Lock() + lockGlobalDnsInterfaceMockDeleteCollection.Lock() mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) - lockGlobalDNSInterfaceMockDeleteCollection.Unlock() + lockGlobalDnsInterfaceMockDeleteCollection.Unlock() return mock.DeleteCollectionFunc(deleteOpts, listOpts) } // DeleteCollectionCalls gets all the calls that were made to DeleteCollection. // Check the length with: -// len(mockedGlobalDNSInterface.DeleteCollectionCalls()) -func (mock *GlobalDNSInterfaceMock) DeleteCollectionCalls() []struct { +// len(mockedGlobalDnsInterface.DeleteCollectionCalls()) +func (mock *GlobalDnsInterfaceMock) DeleteCollectionCalls() []struct { DeleteOpts *v1.DeleteOptions ListOpts v1.ListOptions } { @@ -1503,16 +1411,16 @@ func (mock *GlobalDNSInterfaceMock) DeleteCollectionCalls() []struct { DeleteOpts *v1.DeleteOptions ListOpts v1.ListOptions } - lockGlobalDNSInterfaceMockDeleteCollection.RLock() + lockGlobalDnsInterfaceMockDeleteCollection.RLock() calls = mock.calls.DeleteCollection - lockGlobalDNSInterfaceMockDeleteCollection.RUnlock() + lockGlobalDnsInterfaceMockDeleteCollection.RUnlock() return calls } // DeleteNamespaced calls DeleteNamespacedFunc. -func (mock *GlobalDNSInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { +func (mock *GlobalDnsInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { if mock.DeleteNamespacedFunc == nil { - panic("GlobalDNSInterfaceMock.DeleteNamespacedFunc: method is nil but GlobalDNSInterface.DeleteNamespaced was just called") + panic("GlobalDnsInterfaceMock.DeleteNamespacedFunc: method is nil but GlobalDnsInterface.DeleteNamespaced was just called") } callInfo := struct { Namespace string @@ -1523,16 +1431,16 @@ func (mock *GlobalDNSInterfaceMock) DeleteNamespaced(namespace string, name stri Name: name, Options: options, } - lockGlobalDNSInterfaceMockDeleteNamespaced.Lock() + lockGlobalDnsInterfaceMockDeleteNamespaced.Lock() mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) - lockGlobalDNSInterfaceMockDeleteNamespaced.Unlock() + lockGlobalDnsInterfaceMockDeleteNamespaced.Unlock() return mock.DeleteNamespacedFunc(namespace, name, options) } // DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. // Check the length with: -// len(mockedGlobalDNSInterface.DeleteNamespacedCalls()) -func (mock *GlobalDNSInterfaceMock) DeleteNamespacedCalls() []struct { +// len(mockedGlobalDnsInterface.DeleteNamespacedCalls()) +func (mock *GlobalDnsInterfaceMock) DeleteNamespacedCalls() []struct { Namespace string Name string Options *v1.DeleteOptions @@ -1542,16 +1450,16 @@ func (mock *GlobalDNSInterfaceMock) DeleteNamespacedCalls() []struct { Name string Options *v1.DeleteOptions } - lockGlobalDNSInterfaceMockDeleteNamespaced.RLock() + lockGlobalDnsInterfaceMockDeleteNamespaced.RLock() calls = mock.calls.DeleteNamespaced - lockGlobalDNSInterfaceMockDeleteNamespaced.RUnlock() + lockGlobalDnsInterfaceMockDeleteNamespaced.RUnlock() return calls } // Get calls GetFunc. -func (mock *GlobalDNSInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.GlobalDNS, error) { +func (mock *GlobalDnsInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.GlobalDns, error) { if mock.GetFunc == nil { - panic("GlobalDNSInterfaceMock.GetFunc: method is nil but GlobalDNSInterface.Get was just called") + panic("GlobalDnsInterfaceMock.GetFunc: method is nil but GlobalDnsInterface.Get was just called") } callInfo := struct { Name string @@ -1560,16 +1468,16 @@ func (mock *GlobalDNSInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.Gl Name: name, Opts: opts, } - lockGlobalDNSInterfaceMockGet.Lock() + lockGlobalDnsInterfaceMockGet.Lock() mock.calls.Get = append(mock.calls.Get, callInfo) - lockGlobalDNSInterfaceMockGet.Unlock() + lockGlobalDnsInterfaceMockGet.Unlock() return mock.GetFunc(name, opts) } // GetCalls gets all the calls that were made to Get. // Check the length with: -// len(mockedGlobalDNSInterface.GetCalls()) -func (mock *GlobalDNSInterfaceMock) GetCalls() []struct { +// len(mockedGlobalDnsInterface.GetCalls()) +func (mock *GlobalDnsInterfaceMock) GetCalls() []struct { Name string Opts v1.GetOptions } { @@ -1577,16 +1485,16 @@ func (mock *GlobalDNSInterfaceMock) GetCalls() []struct { Name string Opts v1.GetOptions } - lockGlobalDNSInterfaceMockGet.RLock() + lockGlobalDnsInterfaceMockGet.RLock() calls = mock.calls.Get - lockGlobalDNSInterfaceMockGet.RUnlock() + lockGlobalDnsInterfaceMockGet.RUnlock() return calls } // GetNamespaced calls GetNamespacedFunc. -func (mock *GlobalDNSInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.GlobalDNS, error) { +func (mock *GlobalDnsInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.GlobalDns, error) { if mock.GetNamespacedFunc == nil { - panic("GlobalDNSInterfaceMock.GetNamespacedFunc: method is nil but GlobalDNSInterface.GetNamespaced was just called") + panic("GlobalDnsInterfaceMock.GetNamespacedFunc: method is nil but GlobalDnsInterface.GetNamespaced was just called") } callInfo := struct { Namespace string @@ -1597,16 +1505,16 @@ func (mock *GlobalDNSInterfaceMock) GetNamespaced(namespace string, name string, Name: name, Opts: opts, } - lockGlobalDNSInterfaceMockGetNamespaced.Lock() + lockGlobalDnsInterfaceMockGetNamespaced.Lock() mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) - lockGlobalDNSInterfaceMockGetNamespaced.Unlock() + lockGlobalDnsInterfaceMockGetNamespaced.Unlock() return mock.GetNamespacedFunc(namespace, name, opts) } // GetNamespacedCalls gets all the calls that were made to GetNamespaced. // Check the length with: -// len(mockedGlobalDNSInterface.GetNamespacedCalls()) -func (mock *GlobalDNSInterfaceMock) GetNamespacedCalls() []struct { +// len(mockedGlobalDnsInterface.GetNamespacedCalls()) +func (mock *GlobalDnsInterfaceMock) GetNamespacedCalls() []struct { Namespace string Name string Opts v1.GetOptions @@ -1616,47 +1524,47 @@ func (mock *GlobalDNSInterfaceMock) GetNamespacedCalls() []struct { Name string Opts v1.GetOptions } - lockGlobalDNSInterfaceMockGetNamespaced.RLock() + lockGlobalDnsInterfaceMockGetNamespaced.RLock() calls = mock.calls.GetNamespaced - lockGlobalDNSInterfaceMockGetNamespaced.RUnlock() + lockGlobalDnsInterfaceMockGetNamespaced.RUnlock() return calls } // List calls ListFunc. -func (mock *GlobalDNSInterfaceMock) List(opts v1.ListOptions) (*v3.GlobalDNSList, error) { +func (mock *GlobalDnsInterfaceMock) List(opts v1.ListOptions) (*v3.GlobalDnsList, error) { if mock.ListFunc == nil { - panic("GlobalDNSInterfaceMock.ListFunc: method is nil but GlobalDNSInterface.List was just called") + panic("GlobalDnsInterfaceMock.ListFunc: method is nil but GlobalDnsInterface.List was just called") } callInfo := struct { Opts v1.ListOptions }{ Opts: opts, } - lockGlobalDNSInterfaceMockList.Lock() + lockGlobalDnsInterfaceMockList.Lock() mock.calls.List = append(mock.calls.List, callInfo) - lockGlobalDNSInterfaceMockList.Unlock() + lockGlobalDnsInterfaceMockList.Unlock() return mock.ListFunc(opts) } // ListCalls gets all the calls that were made to List. // Check the length with: -// len(mockedGlobalDNSInterface.ListCalls()) -func (mock *GlobalDNSInterfaceMock) ListCalls() []struct { +// len(mockedGlobalDnsInterface.ListCalls()) +func (mock *GlobalDnsInterfaceMock) ListCalls() []struct { Opts v1.ListOptions } { var calls []struct { Opts v1.ListOptions } - lockGlobalDNSInterfaceMockList.RLock() + lockGlobalDnsInterfaceMockList.RLock() calls = mock.calls.List - lockGlobalDNSInterfaceMockList.RUnlock() + lockGlobalDnsInterfaceMockList.RUnlock() return calls } // ListNamespaced calls ListNamespacedFunc. -func (mock *GlobalDNSInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v3.GlobalDNSList, error) { +func (mock *GlobalDnsInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v3.GlobalDnsList, error) { if mock.ListNamespacedFunc == nil { - panic("GlobalDNSInterfaceMock.ListNamespacedFunc: method is nil but GlobalDNSInterface.ListNamespaced was just called") + panic("GlobalDnsInterfaceMock.ListNamespacedFunc: method is nil but GlobalDnsInterface.ListNamespaced was just called") } callInfo := struct { Namespace string @@ -1665,16 +1573,16 @@ func (mock *GlobalDNSInterfaceMock) ListNamespaced(namespace string, opts v1.Lis Namespace: namespace, Opts: opts, } - lockGlobalDNSInterfaceMockListNamespaced.Lock() + lockGlobalDnsInterfaceMockListNamespaced.Lock() mock.calls.ListNamespaced = append(mock.calls.ListNamespaced, callInfo) - lockGlobalDNSInterfaceMockListNamespaced.Unlock() + lockGlobalDnsInterfaceMockListNamespaced.Unlock() return mock.ListNamespacedFunc(namespace, opts) } // ListNamespacedCalls gets all the calls that were made to ListNamespaced. // Check the length with: -// len(mockedGlobalDNSInterface.ListNamespacedCalls()) -func (mock *GlobalDNSInterfaceMock) ListNamespacedCalls() []struct { +// len(mockedGlobalDnsInterface.ListNamespacedCalls()) +func (mock *GlobalDnsInterfaceMock) ListNamespacedCalls() []struct { Namespace string Opts v1.ListOptions } { @@ -1682,164 +1590,164 @@ func (mock *GlobalDNSInterfaceMock) ListNamespacedCalls() []struct { Namespace string Opts v1.ListOptions } - lockGlobalDNSInterfaceMockListNamespaced.RLock() + lockGlobalDnsInterfaceMockListNamespaced.RLock() calls = mock.calls.ListNamespaced - lockGlobalDNSInterfaceMockListNamespaced.RUnlock() + lockGlobalDnsInterfaceMockListNamespaced.RUnlock() return calls } // ObjectClient calls ObjectClientFunc. -func (mock *GlobalDNSInterfaceMock) ObjectClient() *objectclient.ObjectClient { +func (mock *GlobalDnsInterfaceMock) ObjectClient() *objectclient.ObjectClient { if mock.ObjectClientFunc == nil { - panic("GlobalDNSInterfaceMock.ObjectClientFunc: method is nil but GlobalDNSInterface.ObjectClient was just called") + panic("GlobalDnsInterfaceMock.ObjectClientFunc: method is nil but GlobalDnsInterface.ObjectClient was just called") } callInfo := struct { }{} - lockGlobalDNSInterfaceMockObjectClient.Lock() + lockGlobalDnsInterfaceMockObjectClient.Lock() mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) - lockGlobalDNSInterfaceMockObjectClient.Unlock() + lockGlobalDnsInterfaceMockObjectClient.Unlock() return mock.ObjectClientFunc() } // ObjectClientCalls gets all the calls that were made to ObjectClient. // Check the length with: -// len(mockedGlobalDNSInterface.ObjectClientCalls()) -func (mock *GlobalDNSInterfaceMock) ObjectClientCalls() []struct { +// len(mockedGlobalDnsInterface.ObjectClientCalls()) +func (mock *GlobalDnsInterfaceMock) ObjectClientCalls() []struct { } { var calls []struct { } - lockGlobalDNSInterfaceMockObjectClient.RLock() + lockGlobalDnsInterfaceMockObjectClient.RLock() calls = mock.calls.ObjectClient - lockGlobalDNSInterfaceMockObjectClient.RUnlock() + lockGlobalDnsInterfaceMockObjectClient.RUnlock() return calls } // Update calls UpdateFunc. -func (mock *GlobalDNSInterfaceMock) Update(in1 *v3.GlobalDNS) (*v3.GlobalDNS, error) { +func (mock *GlobalDnsInterfaceMock) Update(in1 *v3.GlobalDns) (*v3.GlobalDns, error) { if mock.UpdateFunc == nil { - panic("GlobalDNSInterfaceMock.UpdateFunc: method is nil but GlobalDNSInterface.Update was just called") + panic("GlobalDnsInterfaceMock.UpdateFunc: method is nil but GlobalDnsInterface.Update was just called") } callInfo := struct { - In1 *v3.GlobalDNS + In1 *v3.GlobalDns }{ In1: in1, } - lockGlobalDNSInterfaceMockUpdate.Lock() + lockGlobalDnsInterfaceMockUpdate.Lock() mock.calls.Update = append(mock.calls.Update, callInfo) - lockGlobalDNSInterfaceMockUpdate.Unlock() + lockGlobalDnsInterfaceMockUpdate.Unlock() return mock.UpdateFunc(in1) } // UpdateCalls gets all the calls that were made to Update. // Check the length with: -// len(mockedGlobalDNSInterface.UpdateCalls()) -func (mock *GlobalDNSInterfaceMock) UpdateCalls() []struct { - In1 *v3.GlobalDNS +// len(mockedGlobalDnsInterface.UpdateCalls()) +func (mock *GlobalDnsInterfaceMock) UpdateCalls() []struct { + In1 *v3.GlobalDns } { var calls []struct { - In1 *v3.GlobalDNS + In1 *v3.GlobalDns } - lockGlobalDNSInterfaceMockUpdate.RLock() + lockGlobalDnsInterfaceMockUpdate.RLock() calls = mock.calls.Update - lockGlobalDNSInterfaceMockUpdate.RUnlock() + lockGlobalDnsInterfaceMockUpdate.RUnlock() return calls } // Watch calls WatchFunc. -func (mock *GlobalDNSInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (mock *GlobalDnsInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { if mock.WatchFunc == nil { - panic("GlobalDNSInterfaceMock.WatchFunc: method is nil but GlobalDNSInterface.Watch was just called") + panic("GlobalDnsInterfaceMock.WatchFunc: method is nil but GlobalDnsInterface.Watch was just called") } callInfo := struct { Opts v1.ListOptions }{ Opts: opts, } - lockGlobalDNSInterfaceMockWatch.Lock() + lockGlobalDnsInterfaceMockWatch.Lock() mock.calls.Watch = append(mock.calls.Watch, callInfo) - lockGlobalDNSInterfaceMockWatch.Unlock() + lockGlobalDnsInterfaceMockWatch.Unlock() return mock.WatchFunc(opts) } // WatchCalls gets all the calls that were made to Watch. // Check the length with: -// len(mockedGlobalDNSInterface.WatchCalls()) -func (mock *GlobalDNSInterfaceMock) WatchCalls() []struct { +// len(mockedGlobalDnsInterface.WatchCalls()) +func (mock *GlobalDnsInterfaceMock) WatchCalls() []struct { Opts v1.ListOptions } { var calls []struct { Opts v1.ListOptions } - lockGlobalDNSInterfaceMockWatch.RLock() + lockGlobalDnsInterfaceMockWatch.RLock() calls = mock.calls.Watch - lockGlobalDNSInterfaceMockWatch.RUnlock() + lockGlobalDnsInterfaceMockWatch.RUnlock() return calls } var ( - lockGlobalDNSsGetterMockGlobalDNSs sync.RWMutex + lockGlobalDnsesGetterMockGlobalDnses sync.RWMutex ) -// Ensure, that GlobalDNSsGetterMock does implement GlobalDNSsGetter. +// Ensure, that GlobalDnsesGetterMock does implement GlobalDnsesGetter. // If this is not the case, regenerate this file with moq. -var _ v3.GlobalDNSsGetter = &GlobalDNSsGetterMock{} +var _ v3.GlobalDnsesGetter = &GlobalDnsesGetterMock{} -// GlobalDNSsGetterMock is a mock implementation of GlobalDNSsGetter. +// GlobalDnsesGetterMock is a mock implementation of GlobalDnsesGetter. // -// func TestSomethingThatUsesGlobalDNSsGetter(t *testing.T) { +// func TestSomethingThatUsesGlobalDnsesGetter(t *testing.T) { // -// // make and configure a mocked GlobalDNSsGetter -// mockedGlobalDNSsGetter := &GlobalDNSsGetterMock{ -// GlobalDNSsFunc: func(namespace string) v3.GlobalDNSInterface { -// panic("mock out the GlobalDNSs method") +// // make and configure a mocked GlobalDnsesGetter +// mockedGlobalDnsesGetter := &GlobalDnsesGetterMock{ +// GlobalDnsesFunc: func(namespace string) v3.GlobalDnsInterface { +// panic("mock out the GlobalDnses method") // }, // } // -// // use mockedGlobalDNSsGetter in code that requires GlobalDNSsGetter +// // use mockedGlobalDnsesGetter in code that requires GlobalDnsesGetter // // and then make assertions. // // } -type GlobalDNSsGetterMock struct { - // GlobalDNSsFunc mocks the GlobalDNSs method. - GlobalDNSsFunc func(namespace string) v3.GlobalDNSInterface +type GlobalDnsesGetterMock struct { + // GlobalDnsesFunc mocks the GlobalDnses method. + GlobalDnsesFunc func(namespace string) v3.GlobalDnsInterface // calls tracks calls to the methods. calls struct { - // GlobalDNSs holds details about calls to the GlobalDNSs method. - GlobalDNSs []struct { + // GlobalDnses holds details about calls to the GlobalDnses method. + GlobalDnses []struct { // Namespace is the namespace argument value. Namespace string } } } -// GlobalDNSs calls GlobalDNSsFunc. -func (mock *GlobalDNSsGetterMock) GlobalDNSs(namespace string) v3.GlobalDNSInterface { - if mock.GlobalDNSsFunc == nil { - panic("GlobalDNSsGetterMock.GlobalDNSsFunc: method is nil but GlobalDNSsGetter.GlobalDNSs was just called") +// GlobalDnses calls GlobalDnsesFunc. +func (mock *GlobalDnsesGetterMock) GlobalDnses(namespace string) v3.GlobalDnsInterface { + if mock.GlobalDnsesFunc == nil { + panic("GlobalDnsesGetterMock.GlobalDnsesFunc: method is nil but GlobalDnsesGetter.GlobalDnses was just called") } callInfo := struct { Namespace string }{ Namespace: namespace, } - lockGlobalDNSsGetterMockGlobalDNSs.Lock() - mock.calls.GlobalDNSs = append(mock.calls.GlobalDNSs, callInfo) - lockGlobalDNSsGetterMockGlobalDNSs.Unlock() - return mock.GlobalDNSsFunc(namespace) + lockGlobalDnsesGetterMockGlobalDnses.Lock() + mock.calls.GlobalDnses = append(mock.calls.GlobalDnses, callInfo) + lockGlobalDnsesGetterMockGlobalDnses.Unlock() + return mock.GlobalDnsesFunc(namespace) } -// GlobalDNSsCalls gets all the calls that were made to GlobalDNSs. +// GlobalDnsesCalls gets all the calls that were made to GlobalDnses. // Check the length with: -// len(mockedGlobalDNSsGetter.GlobalDNSsCalls()) -func (mock *GlobalDNSsGetterMock) GlobalDNSsCalls() []struct { +// len(mockedGlobalDnsesGetter.GlobalDnsesCalls()) +func (mock *GlobalDnsesGetterMock) GlobalDnsesCalls() []struct { Namespace string } { var calls []struct { Namespace string } - lockGlobalDNSsGetterMockGlobalDNSs.RLock() - calls = mock.calls.GlobalDNSs - lockGlobalDNSsGetterMockGlobalDNSs.RUnlock() + lockGlobalDnsesGetterMockGlobalDnses.RLock() + calls = mock.calls.GlobalDnses + lockGlobalDnsesGetterMockGlobalDnses.RUnlock() return calls } diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_global_dns_provider_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_global_dns_provider_mock.go index b6ca5a5b..a79d37dd 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_global_dns_provider_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_global_dns_provider_mock.go @@ -150,8 +150,6 @@ var ( lockGlobalDNSProviderControllerMockGeneric sync.RWMutex lockGlobalDNSProviderControllerMockInformer sync.RWMutex lockGlobalDNSProviderControllerMockLister sync.RWMutex - lockGlobalDNSProviderControllerMockStart sync.RWMutex - lockGlobalDNSProviderControllerMockSync sync.RWMutex ) // Ensure, that GlobalDNSProviderControllerMock does implement GlobalDNSProviderController. @@ -191,12 +189,6 @@ var _ v3.GlobalDNSProviderController = &GlobalDNSProviderControllerMock{} // ListerFunc: func() v3.GlobalDNSProviderLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedGlobalDNSProviderController in code that requires GlobalDNSProviderController @@ -231,12 +223,6 @@ type GlobalDNSProviderControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.GlobalDNSProviderLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type GlobalDNSProviderControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *GlobalDNSProviderControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *GlobalDNSProviderControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("GlobalDNSProviderControllerMock.StartFunc: method is nil but GlobalDNSProviderController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockGlobalDNSProviderControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockGlobalDNSProviderControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedGlobalDNSProviderController.StartCalls()) -func (mock *GlobalDNSProviderControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockGlobalDNSProviderControllerMockStart.RLock() - calls = mock.calls.Start - lockGlobalDNSProviderControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *GlobalDNSProviderControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("GlobalDNSProviderControllerMock.SyncFunc: method is nil but GlobalDNSProviderController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockGlobalDNSProviderControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockGlobalDNSProviderControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedGlobalDNSProviderController.SyncCalls()) -func (mock *GlobalDNSProviderControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockGlobalDNSProviderControllerMockSync.RLock() - calls = mock.calls.Sync - lockGlobalDNSProviderControllerMockSync.RUnlock() - return calls -} - var ( lockGlobalDNSProviderInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockGlobalDNSProviderInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_global_role_binding_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_global_role_binding_mock.go index e45dc4a1..70768555 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_global_role_binding_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_global_role_binding_mock.go @@ -150,8 +150,6 @@ var ( lockGlobalRoleBindingControllerMockGeneric sync.RWMutex lockGlobalRoleBindingControllerMockInformer sync.RWMutex lockGlobalRoleBindingControllerMockLister sync.RWMutex - lockGlobalRoleBindingControllerMockStart sync.RWMutex - lockGlobalRoleBindingControllerMockSync sync.RWMutex ) // Ensure, that GlobalRoleBindingControllerMock does implement GlobalRoleBindingController. @@ -191,12 +189,6 @@ var _ v3.GlobalRoleBindingController = &GlobalRoleBindingControllerMock{} // ListerFunc: func() v3.GlobalRoleBindingLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedGlobalRoleBindingController in code that requires GlobalRoleBindingController @@ -231,12 +223,6 @@ type GlobalRoleBindingControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.GlobalRoleBindingLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type GlobalRoleBindingControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *GlobalRoleBindingControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *GlobalRoleBindingControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("GlobalRoleBindingControllerMock.StartFunc: method is nil but GlobalRoleBindingController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockGlobalRoleBindingControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockGlobalRoleBindingControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedGlobalRoleBindingController.StartCalls()) -func (mock *GlobalRoleBindingControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockGlobalRoleBindingControllerMockStart.RLock() - calls = mock.calls.Start - lockGlobalRoleBindingControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *GlobalRoleBindingControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("GlobalRoleBindingControllerMock.SyncFunc: method is nil but GlobalRoleBindingController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockGlobalRoleBindingControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockGlobalRoleBindingControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedGlobalRoleBindingController.SyncCalls()) -func (mock *GlobalRoleBindingControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockGlobalRoleBindingControllerMockSync.RLock() - calls = mock.calls.Sync - lockGlobalRoleBindingControllerMockSync.RUnlock() - return calls -} - var ( lockGlobalRoleBindingInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockGlobalRoleBindingInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_global_role_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_global_role_mock.go index b33ea849..c69f2f87 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_global_role_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_global_role_mock.go @@ -150,8 +150,6 @@ var ( lockGlobalRoleControllerMockGeneric sync.RWMutex lockGlobalRoleControllerMockInformer sync.RWMutex lockGlobalRoleControllerMockLister sync.RWMutex - lockGlobalRoleControllerMockStart sync.RWMutex - lockGlobalRoleControllerMockSync sync.RWMutex ) // Ensure, that GlobalRoleControllerMock does implement GlobalRoleController. @@ -191,12 +189,6 @@ var _ v3.GlobalRoleController = &GlobalRoleControllerMock{} // ListerFunc: func() v3.GlobalRoleLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedGlobalRoleController in code that requires GlobalRoleController @@ -231,12 +223,6 @@ type GlobalRoleControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.GlobalRoleLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type GlobalRoleControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *GlobalRoleControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *GlobalRoleControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("GlobalRoleControllerMock.StartFunc: method is nil but GlobalRoleController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockGlobalRoleControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockGlobalRoleControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedGlobalRoleController.StartCalls()) -func (mock *GlobalRoleControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockGlobalRoleControllerMockStart.RLock() - calls = mock.calls.Start - lockGlobalRoleControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *GlobalRoleControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("GlobalRoleControllerMock.SyncFunc: method is nil but GlobalRoleController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockGlobalRoleControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockGlobalRoleControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedGlobalRoleController.SyncCalls()) -func (mock *GlobalRoleControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockGlobalRoleControllerMockSync.RLock() - calls = mock.calls.Sync - lockGlobalRoleControllerMockSync.RUnlock() - return calls -} - var ( lockGlobalRoleInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockGlobalRoleInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_group_member_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_group_member_mock.go index d5953d5a..f8f8dd00 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_group_member_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_group_member_mock.go @@ -150,8 +150,6 @@ var ( lockGroupMemberControllerMockGeneric sync.RWMutex lockGroupMemberControllerMockInformer sync.RWMutex lockGroupMemberControllerMockLister sync.RWMutex - lockGroupMemberControllerMockStart sync.RWMutex - lockGroupMemberControllerMockSync sync.RWMutex ) // Ensure, that GroupMemberControllerMock does implement GroupMemberController. @@ -191,12 +189,6 @@ var _ v3.GroupMemberController = &GroupMemberControllerMock{} // ListerFunc: func() v3.GroupMemberLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedGroupMemberController in code that requires GroupMemberController @@ -231,12 +223,6 @@ type GroupMemberControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.GroupMemberLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type GroupMemberControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *GroupMemberControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *GroupMemberControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("GroupMemberControllerMock.StartFunc: method is nil but GroupMemberController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockGroupMemberControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockGroupMemberControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedGroupMemberController.StartCalls()) -func (mock *GroupMemberControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockGroupMemberControllerMockStart.RLock() - calls = mock.calls.Start - lockGroupMemberControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *GroupMemberControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("GroupMemberControllerMock.SyncFunc: method is nil but GroupMemberController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockGroupMemberControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockGroupMemberControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedGroupMemberController.SyncCalls()) -func (mock *GroupMemberControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockGroupMemberControllerMockSync.RLock() - calls = mock.calls.Sync - lockGroupMemberControllerMockSync.RUnlock() - return calls -} - var ( lockGroupMemberInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockGroupMemberInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_group_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_group_mock.go index 19306e57..e054d5d5 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_group_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_group_mock.go @@ -150,8 +150,6 @@ var ( lockGroupControllerMockGeneric sync.RWMutex lockGroupControllerMockInformer sync.RWMutex lockGroupControllerMockLister sync.RWMutex - lockGroupControllerMockStart sync.RWMutex - lockGroupControllerMockSync sync.RWMutex ) // Ensure, that GroupControllerMock does implement GroupController. @@ -191,12 +189,6 @@ var _ v3.GroupController = &GroupControllerMock{} // ListerFunc: func() v3.GroupLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedGroupController in code that requires GroupController @@ -231,12 +223,6 @@ type GroupControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.GroupLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type GroupControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *GroupControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *GroupControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("GroupControllerMock.StartFunc: method is nil but GroupController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockGroupControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockGroupControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedGroupController.StartCalls()) -func (mock *GroupControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockGroupControllerMockStart.RLock() - calls = mock.calls.Start - lockGroupControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *GroupControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("GroupControllerMock.SyncFunc: method is nil but GroupController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockGroupControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockGroupControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedGroupController.SyncCalls()) -func (mock *GroupControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockGroupControllerMockSync.RLock() - calls = mock.calls.Sync - lockGroupControllerMockSync.RUnlock() - return calls -} - var ( lockGroupInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockGroupInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_kontainer_driver_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_kontainer_driver_mock.go index dac0399a..28bd88d0 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_kontainer_driver_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_kontainer_driver_mock.go @@ -150,8 +150,6 @@ var ( lockKontainerDriverControllerMockGeneric sync.RWMutex lockKontainerDriverControllerMockInformer sync.RWMutex lockKontainerDriverControllerMockLister sync.RWMutex - lockKontainerDriverControllerMockStart sync.RWMutex - lockKontainerDriverControllerMockSync sync.RWMutex ) // Ensure, that KontainerDriverControllerMock does implement KontainerDriverController. @@ -191,12 +189,6 @@ var _ v3.KontainerDriverController = &KontainerDriverControllerMock{} // ListerFunc: func() v3.KontainerDriverLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedKontainerDriverController in code that requires KontainerDriverController @@ -231,12 +223,6 @@ type KontainerDriverControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.KontainerDriverLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type KontainerDriverControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *KontainerDriverControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *KontainerDriverControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("KontainerDriverControllerMock.StartFunc: method is nil but KontainerDriverController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockKontainerDriverControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockKontainerDriverControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedKontainerDriverController.StartCalls()) -func (mock *KontainerDriverControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockKontainerDriverControllerMockStart.RLock() - calls = mock.calls.Start - lockKontainerDriverControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *KontainerDriverControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("KontainerDriverControllerMock.SyncFunc: method is nil but KontainerDriverController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockKontainerDriverControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockKontainerDriverControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedKontainerDriverController.SyncCalls()) -func (mock *KontainerDriverControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockKontainerDriverControllerMockSync.RLock() - calls = mock.calls.Sync - lockKontainerDriverControllerMockSync.RUnlock() - return calls -} - var ( lockKontainerDriverInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockKontainerDriverInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_ldap_config_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_ldap_config_mock.go index 202022e0..dd2ace57 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_ldap_config_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_ldap_config_mock.go @@ -150,8 +150,6 @@ var ( lockLdapConfigControllerMockGeneric sync.RWMutex lockLdapConfigControllerMockInformer sync.RWMutex lockLdapConfigControllerMockLister sync.RWMutex - lockLdapConfigControllerMockStart sync.RWMutex - lockLdapConfigControllerMockSync sync.RWMutex ) // Ensure, that LdapConfigControllerMock does implement LdapConfigController. @@ -191,12 +189,6 @@ var _ v3.LdapConfigController = &LdapConfigControllerMock{} // ListerFunc: func() v3.LdapConfigLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedLdapConfigController in code that requires LdapConfigController @@ -231,12 +223,6 @@ type LdapConfigControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.LdapConfigLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type LdapConfigControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *LdapConfigControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *LdapConfigControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("LdapConfigControllerMock.StartFunc: method is nil but LdapConfigController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockLdapConfigControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockLdapConfigControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedLdapConfigController.StartCalls()) -func (mock *LdapConfigControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockLdapConfigControllerMockStart.RLock() - calls = mock.calls.Start - lockLdapConfigControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *LdapConfigControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("LdapConfigControllerMock.SyncFunc: method is nil but LdapConfigController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockLdapConfigControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockLdapConfigControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedLdapConfigController.SyncCalls()) -func (mock *LdapConfigControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockLdapConfigControllerMockSync.RLock() - calls = mock.calls.Sync - lockLdapConfigControllerMockSync.RUnlock() - return calls -} - var ( lockLdapConfigInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockLdapConfigInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_monitor_metric_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_monitor_metric_mock.go index 1ce67155..7398ea0d 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_monitor_metric_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_monitor_metric_mock.go @@ -150,8 +150,6 @@ var ( lockMonitorMetricControllerMockGeneric sync.RWMutex lockMonitorMetricControllerMockInformer sync.RWMutex lockMonitorMetricControllerMockLister sync.RWMutex - lockMonitorMetricControllerMockStart sync.RWMutex - lockMonitorMetricControllerMockSync sync.RWMutex ) // Ensure, that MonitorMetricControllerMock does implement MonitorMetricController. @@ -191,12 +189,6 @@ var _ v3.MonitorMetricController = &MonitorMetricControllerMock{} // ListerFunc: func() v3.MonitorMetricLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedMonitorMetricController in code that requires MonitorMetricController @@ -231,12 +223,6 @@ type MonitorMetricControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.MonitorMetricLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type MonitorMetricControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *MonitorMetricControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *MonitorMetricControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("MonitorMetricControllerMock.StartFunc: method is nil but MonitorMetricController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockMonitorMetricControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockMonitorMetricControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedMonitorMetricController.StartCalls()) -func (mock *MonitorMetricControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockMonitorMetricControllerMockStart.RLock() - calls = mock.calls.Start - lockMonitorMetricControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *MonitorMetricControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("MonitorMetricControllerMock.SyncFunc: method is nil but MonitorMetricController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockMonitorMetricControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockMonitorMetricControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedMonitorMetricController.SyncCalls()) -func (mock *MonitorMetricControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockMonitorMetricControllerMockSync.RLock() - calls = mock.calls.Sync - lockMonitorMetricControllerMockSync.RUnlock() - return calls -} - var ( lockMonitorMetricInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockMonitorMetricInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_mock.go index f0c38a3e..c112bd5e 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_mock.go @@ -150,8 +150,6 @@ var ( lockMultiClusterAppControllerMockGeneric sync.RWMutex lockMultiClusterAppControllerMockInformer sync.RWMutex lockMultiClusterAppControllerMockLister sync.RWMutex - lockMultiClusterAppControllerMockStart sync.RWMutex - lockMultiClusterAppControllerMockSync sync.RWMutex ) // Ensure, that MultiClusterAppControllerMock does implement MultiClusterAppController. @@ -191,12 +189,6 @@ var _ v3.MultiClusterAppController = &MultiClusterAppControllerMock{} // ListerFunc: func() v3.MultiClusterAppLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedMultiClusterAppController in code that requires MultiClusterAppController @@ -231,12 +223,6 @@ type MultiClusterAppControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.MultiClusterAppLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type MultiClusterAppControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *MultiClusterAppControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *MultiClusterAppControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("MultiClusterAppControllerMock.StartFunc: method is nil but MultiClusterAppController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockMultiClusterAppControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockMultiClusterAppControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedMultiClusterAppController.StartCalls()) -func (mock *MultiClusterAppControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockMultiClusterAppControllerMockStart.RLock() - calls = mock.calls.Start - lockMultiClusterAppControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *MultiClusterAppControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("MultiClusterAppControllerMock.SyncFunc: method is nil but MultiClusterAppController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockMultiClusterAppControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockMultiClusterAppControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedMultiClusterAppController.SyncCalls()) -func (mock *MultiClusterAppControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockMultiClusterAppControllerMockSync.RLock() - calls = mock.calls.Sync - lockMultiClusterAppControllerMockSync.RUnlock() - return calls -} - var ( lockMultiClusterAppInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockMultiClusterAppInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_revision_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_revision_mock.go index 63dd0547..f9a49e74 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_revision_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_multi_cluster_app_revision_mock.go @@ -150,8 +150,6 @@ var ( lockMultiClusterAppRevisionControllerMockGeneric sync.RWMutex lockMultiClusterAppRevisionControllerMockInformer sync.RWMutex lockMultiClusterAppRevisionControllerMockLister sync.RWMutex - lockMultiClusterAppRevisionControllerMockStart sync.RWMutex - lockMultiClusterAppRevisionControllerMockSync sync.RWMutex ) // Ensure, that MultiClusterAppRevisionControllerMock does implement MultiClusterAppRevisionController. @@ -191,12 +189,6 @@ var _ v3.MultiClusterAppRevisionController = &MultiClusterAppRevisionControllerM // ListerFunc: func() v3.MultiClusterAppRevisionLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedMultiClusterAppRevisionController in code that requires MultiClusterAppRevisionController @@ -231,12 +223,6 @@ type MultiClusterAppRevisionControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.MultiClusterAppRevisionLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type MultiClusterAppRevisionControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *MultiClusterAppRevisionControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *MultiClusterAppRevisionControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("MultiClusterAppRevisionControllerMock.StartFunc: method is nil but MultiClusterAppRevisionController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockMultiClusterAppRevisionControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockMultiClusterAppRevisionControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedMultiClusterAppRevisionController.StartCalls()) -func (mock *MultiClusterAppRevisionControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockMultiClusterAppRevisionControllerMockStart.RLock() - calls = mock.calls.Start - lockMultiClusterAppRevisionControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *MultiClusterAppRevisionControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("MultiClusterAppRevisionControllerMock.SyncFunc: method is nil but MultiClusterAppRevisionController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockMultiClusterAppRevisionControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockMultiClusterAppRevisionControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedMultiClusterAppRevisionController.SyncCalls()) -func (mock *MultiClusterAppRevisionControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockMultiClusterAppRevisionControllerMockSync.RLock() - calls = mock.calls.Sync - lockMultiClusterAppRevisionControllerMockSync.RUnlock() - return calls -} - var ( lockMultiClusterAppRevisionInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockMultiClusterAppRevisionInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_node_driver_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_node_driver_mock.go index 848aa31f..ee0fe2d1 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_node_driver_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_node_driver_mock.go @@ -150,8 +150,6 @@ var ( lockNodeDriverControllerMockGeneric sync.RWMutex lockNodeDriverControllerMockInformer sync.RWMutex lockNodeDriverControllerMockLister sync.RWMutex - lockNodeDriverControllerMockStart sync.RWMutex - lockNodeDriverControllerMockSync sync.RWMutex ) // Ensure, that NodeDriverControllerMock does implement NodeDriverController. @@ -191,12 +189,6 @@ var _ v3.NodeDriverController = &NodeDriverControllerMock{} // ListerFunc: func() v3.NodeDriverLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedNodeDriverController in code that requires NodeDriverController @@ -231,12 +223,6 @@ type NodeDriverControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.NodeDriverLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type NodeDriverControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *NodeDriverControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *NodeDriverControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("NodeDriverControllerMock.StartFunc: method is nil but NodeDriverController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockNodeDriverControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockNodeDriverControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedNodeDriverController.StartCalls()) -func (mock *NodeDriverControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockNodeDriverControllerMockStart.RLock() - calls = mock.calls.Start - lockNodeDriverControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *NodeDriverControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("NodeDriverControllerMock.SyncFunc: method is nil but NodeDriverController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockNodeDriverControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockNodeDriverControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedNodeDriverController.SyncCalls()) -func (mock *NodeDriverControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockNodeDriverControllerMockSync.RLock() - calls = mock.calls.Sync - lockNodeDriverControllerMockSync.RUnlock() - return calls -} - var ( lockNodeDriverInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockNodeDriverInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_node_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_node_mock.go index 8b782d14..2badddc0 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_node_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_node_mock.go @@ -150,8 +150,6 @@ var ( lockNodeControllerMockGeneric sync.RWMutex lockNodeControllerMockInformer sync.RWMutex lockNodeControllerMockLister sync.RWMutex - lockNodeControllerMockStart sync.RWMutex - lockNodeControllerMockSync sync.RWMutex ) // Ensure, that NodeControllerMock does implement NodeController. @@ -191,12 +189,6 @@ var _ v3.NodeController = &NodeControllerMock{} // ListerFunc: func() v3.NodeLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedNodeController in code that requires NodeController @@ -231,12 +223,6 @@ type NodeControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.NodeLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type NodeControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *NodeControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *NodeControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("NodeControllerMock.StartFunc: method is nil but NodeController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockNodeControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockNodeControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedNodeController.StartCalls()) -func (mock *NodeControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockNodeControllerMockStart.RLock() - calls = mock.calls.Start - lockNodeControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *NodeControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("NodeControllerMock.SyncFunc: method is nil but NodeController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockNodeControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockNodeControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedNodeController.SyncCalls()) -func (mock *NodeControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockNodeControllerMockSync.RLock() - calls = mock.calls.Sync - lockNodeControllerMockSync.RUnlock() - return calls -} - var ( lockNodeInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockNodeInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_node_pool_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_node_pool_mock.go index e733b451..bdf25c78 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_node_pool_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_node_pool_mock.go @@ -150,8 +150,6 @@ var ( lockNodePoolControllerMockGeneric sync.RWMutex lockNodePoolControllerMockInformer sync.RWMutex lockNodePoolControllerMockLister sync.RWMutex - lockNodePoolControllerMockStart sync.RWMutex - lockNodePoolControllerMockSync sync.RWMutex ) // Ensure, that NodePoolControllerMock does implement NodePoolController. @@ -191,12 +189,6 @@ var _ v3.NodePoolController = &NodePoolControllerMock{} // ListerFunc: func() v3.NodePoolLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedNodePoolController in code that requires NodePoolController @@ -231,12 +223,6 @@ type NodePoolControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.NodePoolLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type NodePoolControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *NodePoolControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *NodePoolControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("NodePoolControllerMock.StartFunc: method is nil but NodePoolController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockNodePoolControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockNodePoolControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedNodePoolController.StartCalls()) -func (mock *NodePoolControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockNodePoolControllerMockStart.RLock() - calls = mock.calls.Start - lockNodePoolControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *NodePoolControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("NodePoolControllerMock.SyncFunc: method is nil but NodePoolController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockNodePoolControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockNodePoolControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedNodePoolController.SyncCalls()) -func (mock *NodePoolControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockNodePoolControllerMockSync.RLock() - calls = mock.calls.Sync - lockNodePoolControllerMockSync.RUnlock() - return calls -} - var ( lockNodePoolInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockNodePoolInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_node_template_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_node_template_mock.go index d7225442..087c366a 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_node_template_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_node_template_mock.go @@ -150,8 +150,6 @@ var ( lockNodeTemplateControllerMockGeneric sync.RWMutex lockNodeTemplateControllerMockInformer sync.RWMutex lockNodeTemplateControllerMockLister sync.RWMutex - lockNodeTemplateControllerMockStart sync.RWMutex - lockNodeTemplateControllerMockSync sync.RWMutex ) // Ensure, that NodeTemplateControllerMock does implement NodeTemplateController. @@ -191,12 +189,6 @@ var _ v3.NodeTemplateController = &NodeTemplateControllerMock{} // ListerFunc: func() v3.NodeTemplateLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedNodeTemplateController in code that requires NodeTemplateController @@ -231,12 +223,6 @@ type NodeTemplateControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.NodeTemplateLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type NodeTemplateControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *NodeTemplateControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *NodeTemplateControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("NodeTemplateControllerMock.StartFunc: method is nil but NodeTemplateController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockNodeTemplateControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockNodeTemplateControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedNodeTemplateController.StartCalls()) -func (mock *NodeTemplateControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockNodeTemplateControllerMockStart.RLock() - calls = mock.calls.Start - lockNodeTemplateControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *NodeTemplateControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("NodeTemplateControllerMock.SyncFunc: method is nil but NodeTemplateController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockNodeTemplateControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockNodeTemplateControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedNodeTemplateController.SyncCalls()) -func (mock *NodeTemplateControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockNodeTemplateControllerMockSync.RLock() - calls = mock.calls.Sync - lockNodeTemplateControllerMockSync.RUnlock() - return calls -} - var ( lockNodeTemplateInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockNodeTemplateInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_notifier_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_notifier_mock.go index f0da6e75..e2cb37f5 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_notifier_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_notifier_mock.go @@ -150,8 +150,6 @@ var ( lockNotifierControllerMockGeneric sync.RWMutex lockNotifierControllerMockInformer sync.RWMutex lockNotifierControllerMockLister sync.RWMutex - lockNotifierControllerMockStart sync.RWMutex - lockNotifierControllerMockSync sync.RWMutex ) // Ensure, that NotifierControllerMock does implement NotifierController. @@ -191,12 +189,6 @@ var _ v3.NotifierController = &NotifierControllerMock{} // ListerFunc: func() v3.NotifierLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedNotifierController in code that requires NotifierController @@ -231,12 +223,6 @@ type NotifierControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.NotifierLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type NotifierControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *NotifierControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *NotifierControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("NotifierControllerMock.StartFunc: method is nil but NotifierController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockNotifierControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockNotifierControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedNotifierController.StartCalls()) -func (mock *NotifierControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockNotifierControllerMockStart.RLock() - calls = mock.calls.Start - lockNotifierControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *NotifierControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("NotifierControllerMock.SyncFunc: method is nil but NotifierController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockNotifierControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockNotifierControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedNotifierController.SyncCalls()) -func (mock *NotifierControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockNotifierControllerMockSync.RLock() - calls = mock.calls.Sync - lockNotifierControllerMockSync.RUnlock() - return calls -} - var ( lockNotifierInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockNotifierInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_mock.go index 996d17d3..20e02a71 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_mock.go @@ -150,8 +150,6 @@ var ( lockPodSecurityPolicyTemplateControllerMockGeneric sync.RWMutex lockPodSecurityPolicyTemplateControllerMockInformer sync.RWMutex lockPodSecurityPolicyTemplateControllerMockLister sync.RWMutex - lockPodSecurityPolicyTemplateControllerMockStart sync.RWMutex - lockPodSecurityPolicyTemplateControllerMockSync sync.RWMutex ) // Ensure, that PodSecurityPolicyTemplateControllerMock does implement PodSecurityPolicyTemplateController. @@ -191,12 +189,6 @@ var _ v3.PodSecurityPolicyTemplateController = &PodSecurityPolicyTemplateControl // ListerFunc: func() v3.PodSecurityPolicyTemplateLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedPodSecurityPolicyTemplateController in code that requires PodSecurityPolicyTemplateController @@ -231,12 +223,6 @@ type PodSecurityPolicyTemplateControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.PodSecurityPolicyTemplateLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type PodSecurityPolicyTemplateControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *PodSecurityPolicyTemplateControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *PodSecurityPolicyTemplateControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("PodSecurityPolicyTemplateControllerMock.StartFunc: method is nil but PodSecurityPolicyTemplateController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockPodSecurityPolicyTemplateControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockPodSecurityPolicyTemplateControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedPodSecurityPolicyTemplateController.StartCalls()) -func (mock *PodSecurityPolicyTemplateControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockPodSecurityPolicyTemplateControllerMockStart.RLock() - calls = mock.calls.Start - lockPodSecurityPolicyTemplateControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *PodSecurityPolicyTemplateControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("PodSecurityPolicyTemplateControllerMock.SyncFunc: method is nil but PodSecurityPolicyTemplateController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockPodSecurityPolicyTemplateControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockPodSecurityPolicyTemplateControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedPodSecurityPolicyTemplateController.SyncCalls()) -func (mock *PodSecurityPolicyTemplateControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockPodSecurityPolicyTemplateControllerMockSync.RLock() - calls = mock.calls.Sync - lockPodSecurityPolicyTemplateControllerMockSync.RUnlock() - return calls -} - var ( lockPodSecurityPolicyTemplateInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockPodSecurityPolicyTemplateInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_project_binding_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_project_binding_mock.go index cf80b981..4f104565 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_project_binding_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_pod_security_policy_template_project_binding_mock.go @@ -150,8 +150,6 @@ var ( lockPodSecurityPolicyTemplateProjectBindingControllerMockGeneric sync.RWMutex lockPodSecurityPolicyTemplateProjectBindingControllerMockInformer sync.RWMutex lockPodSecurityPolicyTemplateProjectBindingControllerMockLister sync.RWMutex - lockPodSecurityPolicyTemplateProjectBindingControllerMockStart sync.RWMutex - lockPodSecurityPolicyTemplateProjectBindingControllerMockSync sync.RWMutex ) // Ensure, that PodSecurityPolicyTemplateProjectBindingControllerMock does implement PodSecurityPolicyTemplateProjectBindingController. @@ -191,12 +189,6 @@ var _ v3.PodSecurityPolicyTemplateProjectBindingController = &PodSecurityPolicyT // ListerFunc: func() v3.PodSecurityPolicyTemplateProjectBindingLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedPodSecurityPolicyTemplateProjectBindingController in code that requires PodSecurityPolicyTemplateProjectBindingController @@ -231,12 +223,6 @@ type PodSecurityPolicyTemplateProjectBindingControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.PodSecurityPolicyTemplateProjectBindingLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type PodSecurityPolicyTemplateProjectBindingControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) ListerCalls() return calls } -// Start calls StartFunc. -func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("PodSecurityPolicyTemplateProjectBindingControllerMock.StartFunc: method is nil but PodSecurityPolicyTemplateProjectBindingController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockPodSecurityPolicyTemplateProjectBindingControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockPodSecurityPolicyTemplateProjectBindingControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedPodSecurityPolicyTemplateProjectBindingController.StartCalls()) -func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockPodSecurityPolicyTemplateProjectBindingControllerMockStart.RLock() - calls = mock.calls.Start - lockPodSecurityPolicyTemplateProjectBindingControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("PodSecurityPolicyTemplateProjectBindingControllerMock.SyncFunc: method is nil but PodSecurityPolicyTemplateProjectBindingController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockPodSecurityPolicyTemplateProjectBindingControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockPodSecurityPolicyTemplateProjectBindingControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedPodSecurityPolicyTemplateProjectBindingController.SyncCalls()) -func (mock *PodSecurityPolicyTemplateProjectBindingControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockPodSecurityPolicyTemplateProjectBindingControllerMockSync.RLock() - calls = mock.calls.Sync - lockPodSecurityPolicyTemplateProjectBindingControllerMockSync.RUnlock() - return calls -} - var ( lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockPodSecurityPolicyTemplateProjectBindingInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_preference_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_preference_mock.go index d4db9756..938f6f9f 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_preference_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_preference_mock.go @@ -150,8 +150,6 @@ var ( lockPreferenceControllerMockGeneric sync.RWMutex lockPreferenceControllerMockInformer sync.RWMutex lockPreferenceControllerMockLister sync.RWMutex - lockPreferenceControllerMockStart sync.RWMutex - lockPreferenceControllerMockSync sync.RWMutex ) // Ensure, that PreferenceControllerMock does implement PreferenceController. @@ -191,12 +189,6 @@ var _ v3.PreferenceController = &PreferenceControllerMock{} // ListerFunc: func() v3.PreferenceLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedPreferenceController in code that requires PreferenceController @@ -231,12 +223,6 @@ type PreferenceControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.PreferenceLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type PreferenceControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *PreferenceControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *PreferenceControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("PreferenceControllerMock.StartFunc: method is nil but PreferenceController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockPreferenceControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockPreferenceControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedPreferenceController.StartCalls()) -func (mock *PreferenceControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockPreferenceControllerMockStart.RLock() - calls = mock.calls.Start - lockPreferenceControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *PreferenceControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("PreferenceControllerMock.SyncFunc: method is nil but PreferenceController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockPreferenceControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockPreferenceControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedPreferenceController.SyncCalls()) -func (mock *PreferenceControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockPreferenceControllerMockSync.RLock() - calls = mock.calls.Sync - lockPreferenceControllerMockSync.RUnlock() - return calls -} - var ( lockPreferenceInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockPreferenceInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_principal_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_principal_mock.go index 031cb0b7..192ba317 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_principal_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_principal_mock.go @@ -150,8 +150,6 @@ var ( lockPrincipalControllerMockGeneric sync.RWMutex lockPrincipalControllerMockInformer sync.RWMutex lockPrincipalControllerMockLister sync.RWMutex - lockPrincipalControllerMockStart sync.RWMutex - lockPrincipalControllerMockSync sync.RWMutex ) // Ensure, that PrincipalControllerMock does implement PrincipalController. @@ -191,12 +189,6 @@ var _ v3.PrincipalController = &PrincipalControllerMock{} // ListerFunc: func() v3.PrincipalLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedPrincipalController in code that requires PrincipalController @@ -231,12 +223,6 @@ type PrincipalControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.PrincipalLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type PrincipalControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *PrincipalControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *PrincipalControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("PrincipalControllerMock.StartFunc: method is nil but PrincipalController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockPrincipalControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockPrincipalControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedPrincipalController.StartCalls()) -func (mock *PrincipalControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockPrincipalControllerMockStart.RLock() - calls = mock.calls.Start - lockPrincipalControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *PrincipalControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("PrincipalControllerMock.SyncFunc: method is nil but PrincipalController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockPrincipalControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockPrincipalControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedPrincipalController.SyncCalls()) -func (mock *PrincipalControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockPrincipalControllerMockSync.RLock() - calls = mock.calls.Sync - lockPrincipalControllerMockSync.RUnlock() - return calls -} - var ( lockPrincipalInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockPrincipalInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_group_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_group_mock.go index b0ca72e1..9fdfe897 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_group_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_group_mock.go @@ -150,8 +150,6 @@ var ( lockProjectAlertGroupControllerMockGeneric sync.RWMutex lockProjectAlertGroupControllerMockInformer sync.RWMutex lockProjectAlertGroupControllerMockLister sync.RWMutex - lockProjectAlertGroupControllerMockStart sync.RWMutex - lockProjectAlertGroupControllerMockSync sync.RWMutex ) // Ensure, that ProjectAlertGroupControllerMock does implement ProjectAlertGroupController. @@ -191,12 +189,6 @@ var _ v3.ProjectAlertGroupController = &ProjectAlertGroupControllerMock{} // ListerFunc: func() v3.ProjectAlertGroupLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedProjectAlertGroupController in code that requires ProjectAlertGroupController @@ -231,12 +223,6 @@ type ProjectAlertGroupControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ProjectAlertGroupLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ProjectAlertGroupControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ProjectAlertGroupControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ProjectAlertGroupControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ProjectAlertGroupControllerMock.StartFunc: method is nil but ProjectAlertGroupController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockProjectAlertGroupControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockProjectAlertGroupControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedProjectAlertGroupController.StartCalls()) -func (mock *ProjectAlertGroupControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockProjectAlertGroupControllerMockStart.RLock() - calls = mock.calls.Start - lockProjectAlertGroupControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ProjectAlertGroupControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ProjectAlertGroupControllerMock.SyncFunc: method is nil but ProjectAlertGroupController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockProjectAlertGroupControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockProjectAlertGroupControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedProjectAlertGroupController.SyncCalls()) -func (mock *ProjectAlertGroupControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockProjectAlertGroupControllerMockSync.RLock() - calls = mock.calls.Sync - lockProjectAlertGroupControllerMockSync.RUnlock() - return calls -} - var ( lockProjectAlertGroupInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockProjectAlertGroupInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_mock.go index 2b4f26a8..cdd00d11 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_mock.go @@ -150,8 +150,6 @@ var ( lockProjectAlertControllerMockGeneric sync.RWMutex lockProjectAlertControllerMockInformer sync.RWMutex lockProjectAlertControllerMockLister sync.RWMutex - lockProjectAlertControllerMockStart sync.RWMutex - lockProjectAlertControllerMockSync sync.RWMutex ) // Ensure, that ProjectAlertControllerMock does implement ProjectAlertController. @@ -191,12 +189,6 @@ var _ v3.ProjectAlertController = &ProjectAlertControllerMock{} // ListerFunc: func() v3.ProjectAlertLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedProjectAlertController in code that requires ProjectAlertController @@ -231,12 +223,6 @@ type ProjectAlertControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ProjectAlertLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ProjectAlertControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ProjectAlertControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ProjectAlertControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ProjectAlertControllerMock.StartFunc: method is nil but ProjectAlertController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockProjectAlertControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockProjectAlertControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedProjectAlertController.StartCalls()) -func (mock *ProjectAlertControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockProjectAlertControllerMockStart.RLock() - calls = mock.calls.Start - lockProjectAlertControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ProjectAlertControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ProjectAlertControllerMock.SyncFunc: method is nil but ProjectAlertController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockProjectAlertControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockProjectAlertControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedProjectAlertController.SyncCalls()) -func (mock *ProjectAlertControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockProjectAlertControllerMockSync.RLock() - calls = mock.calls.Sync - lockProjectAlertControllerMockSync.RUnlock() - return calls -} - var ( lockProjectAlertInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockProjectAlertInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_rule_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_rule_mock.go index c7d8dcf1..4312b2d8 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_rule_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_alert_rule_mock.go @@ -150,8 +150,6 @@ var ( lockProjectAlertRuleControllerMockGeneric sync.RWMutex lockProjectAlertRuleControllerMockInformer sync.RWMutex lockProjectAlertRuleControllerMockLister sync.RWMutex - lockProjectAlertRuleControllerMockStart sync.RWMutex - lockProjectAlertRuleControllerMockSync sync.RWMutex ) // Ensure, that ProjectAlertRuleControllerMock does implement ProjectAlertRuleController. @@ -191,12 +189,6 @@ var _ v3.ProjectAlertRuleController = &ProjectAlertRuleControllerMock{} // ListerFunc: func() v3.ProjectAlertRuleLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedProjectAlertRuleController in code that requires ProjectAlertRuleController @@ -231,12 +223,6 @@ type ProjectAlertRuleControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ProjectAlertRuleLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ProjectAlertRuleControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ProjectAlertRuleControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ProjectAlertRuleControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ProjectAlertRuleControllerMock.StartFunc: method is nil but ProjectAlertRuleController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockProjectAlertRuleControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockProjectAlertRuleControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedProjectAlertRuleController.StartCalls()) -func (mock *ProjectAlertRuleControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockProjectAlertRuleControllerMockStart.RLock() - calls = mock.calls.Start - lockProjectAlertRuleControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ProjectAlertRuleControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ProjectAlertRuleControllerMock.SyncFunc: method is nil but ProjectAlertRuleController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockProjectAlertRuleControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockProjectAlertRuleControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedProjectAlertRuleController.SyncCalls()) -func (mock *ProjectAlertRuleControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockProjectAlertRuleControllerMockSync.RLock() - calls = mock.calls.Sync - lockProjectAlertRuleControllerMockSync.RUnlock() - return calls -} - var ( lockProjectAlertRuleInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockProjectAlertRuleInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_catalog_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_catalog_mock.go index 0ec2a3c2..5f74cc4d 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_project_catalog_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_catalog_mock.go @@ -150,8 +150,6 @@ var ( lockProjectCatalogControllerMockGeneric sync.RWMutex lockProjectCatalogControllerMockInformer sync.RWMutex lockProjectCatalogControllerMockLister sync.RWMutex - lockProjectCatalogControllerMockStart sync.RWMutex - lockProjectCatalogControllerMockSync sync.RWMutex ) // Ensure, that ProjectCatalogControllerMock does implement ProjectCatalogController. @@ -191,12 +189,6 @@ var _ v3.ProjectCatalogController = &ProjectCatalogControllerMock{} // ListerFunc: func() v3.ProjectCatalogLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedProjectCatalogController in code that requires ProjectCatalogController @@ -231,12 +223,6 @@ type ProjectCatalogControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ProjectCatalogLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ProjectCatalogControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ProjectCatalogControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ProjectCatalogControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ProjectCatalogControllerMock.StartFunc: method is nil but ProjectCatalogController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockProjectCatalogControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockProjectCatalogControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedProjectCatalogController.StartCalls()) -func (mock *ProjectCatalogControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockProjectCatalogControllerMockStart.RLock() - calls = mock.calls.Start - lockProjectCatalogControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ProjectCatalogControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ProjectCatalogControllerMock.SyncFunc: method is nil but ProjectCatalogController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockProjectCatalogControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockProjectCatalogControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedProjectCatalogController.SyncCalls()) -func (mock *ProjectCatalogControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockProjectCatalogControllerMockSync.RLock() - calls = mock.calls.Sync - lockProjectCatalogControllerMockSync.RUnlock() - return calls -} - var ( lockProjectCatalogInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockProjectCatalogInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_logging_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_logging_mock.go index 32f7b040..da9d293e 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_project_logging_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_logging_mock.go @@ -150,8 +150,6 @@ var ( lockProjectLoggingControllerMockGeneric sync.RWMutex lockProjectLoggingControllerMockInformer sync.RWMutex lockProjectLoggingControllerMockLister sync.RWMutex - lockProjectLoggingControllerMockStart sync.RWMutex - lockProjectLoggingControllerMockSync sync.RWMutex ) // Ensure, that ProjectLoggingControllerMock does implement ProjectLoggingController. @@ -191,12 +189,6 @@ var _ v3.ProjectLoggingController = &ProjectLoggingControllerMock{} // ListerFunc: func() v3.ProjectLoggingLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedProjectLoggingController in code that requires ProjectLoggingController @@ -231,12 +223,6 @@ type ProjectLoggingControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ProjectLoggingLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ProjectLoggingControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ProjectLoggingControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ProjectLoggingControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ProjectLoggingControllerMock.StartFunc: method is nil but ProjectLoggingController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockProjectLoggingControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockProjectLoggingControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedProjectLoggingController.StartCalls()) -func (mock *ProjectLoggingControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockProjectLoggingControllerMockStart.RLock() - calls = mock.calls.Start - lockProjectLoggingControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ProjectLoggingControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ProjectLoggingControllerMock.SyncFunc: method is nil but ProjectLoggingController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockProjectLoggingControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockProjectLoggingControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedProjectLoggingController.SyncCalls()) -func (mock *ProjectLoggingControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockProjectLoggingControllerMockSync.RLock() - calls = mock.calls.Sync - lockProjectLoggingControllerMockSync.RUnlock() - return calls -} - var ( lockProjectLoggingInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockProjectLoggingInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_mock.go index 713eee65..ab21af00 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_project_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_mock.go @@ -150,8 +150,6 @@ var ( lockProjectControllerMockGeneric sync.RWMutex lockProjectControllerMockInformer sync.RWMutex lockProjectControllerMockLister sync.RWMutex - lockProjectControllerMockStart sync.RWMutex - lockProjectControllerMockSync sync.RWMutex ) // Ensure, that ProjectControllerMock does implement ProjectController. @@ -191,12 +189,6 @@ var _ v3.ProjectController = &ProjectControllerMock{} // ListerFunc: func() v3.ProjectLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedProjectController in code that requires ProjectController @@ -231,12 +223,6 @@ type ProjectControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ProjectLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ProjectControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ProjectControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ProjectControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ProjectControllerMock.StartFunc: method is nil but ProjectController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockProjectControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockProjectControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedProjectController.StartCalls()) -func (mock *ProjectControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockProjectControllerMockStart.RLock() - calls = mock.calls.Start - lockProjectControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ProjectControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ProjectControllerMock.SyncFunc: method is nil but ProjectController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockProjectControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockProjectControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedProjectController.SyncCalls()) -func (mock *ProjectControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockProjectControllerMockSync.RLock() - calls = mock.calls.Sync - lockProjectControllerMockSync.RUnlock() - return calls -} - var ( lockProjectInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockProjectInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_monitor_graph_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_monitor_graph_mock.go index 7021882c..01213a0d 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_project_monitor_graph_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_monitor_graph_mock.go @@ -150,8 +150,6 @@ var ( lockProjectMonitorGraphControllerMockGeneric sync.RWMutex lockProjectMonitorGraphControllerMockInformer sync.RWMutex lockProjectMonitorGraphControllerMockLister sync.RWMutex - lockProjectMonitorGraphControllerMockStart sync.RWMutex - lockProjectMonitorGraphControllerMockSync sync.RWMutex ) // Ensure, that ProjectMonitorGraphControllerMock does implement ProjectMonitorGraphController. @@ -191,12 +189,6 @@ var _ v3.ProjectMonitorGraphController = &ProjectMonitorGraphControllerMock{} // ListerFunc: func() v3.ProjectMonitorGraphLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedProjectMonitorGraphController in code that requires ProjectMonitorGraphController @@ -231,12 +223,6 @@ type ProjectMonitorGraphControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ProjectMonitorGraphLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ProjectMonitorGraphControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ProjectMonitorGraphControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ProjectMonitorGraphControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ProjectMonitorGraphControllerMock.StartFunc: method is nil but ProjectMonitorGraphController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockProjectMonitorGraphControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockProjectMonitorGraphControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedProjectMonitorGraphController.StartCalls()) -func (mock *ProjectMonitorGraphControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockProjectMonitorGraphControllerMockStart.RLock() - calls = mock.calls.Start - lockProjectMonitorGraphControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ProjectMonitorGraphControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ProjectMonitorGraphControllerMock.SyncFunc: method is nil but ProjectMonitorGraphController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockProjectMonitorGraphControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockProjectMonitorGraphControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedProjectMonitorGraphController.SyncCalls()) -func (mock *ProjectMonitorGraphControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockProjectMonitorGraphControllerMockSync.RLock() - calls = mock.calls.Sync - lockProjectMonitorGraphControllerMockSync.RUnlock() - return calls -} - var ( lockProjectMonitorGraphInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockProjectMonitorGraphInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_network_policy_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_network_policy_mock.go index 752ba517..158f57be 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_project_network_policy_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_network_policy_mock.go @@ -150,8 +150,6 @@ var ( lockProjectNetworkPolicyControllerMockGeneric sync.RWMutex lockProjectNetworkPolicyControllerMockInformer sync.RWMutex lockProjectNetworkPolicyControllerMockLister sync.RWMutex - lockProjectNetworkPolicyControllerMockStart sync.RWMutex - lockProjectNetworkPolicyControllerMockSync sync.RWMutex ) // Ensure, that ProjectNetworkPolicyControllerMock does implement ProjectNetworkPolicyController. @@ -191,12 +189,6 @@ var _ v3.ProjectNetworkPolicyController = &ProjectNetworkPolicyControllerMock{} // ListerFunc: func() v3.ProjectNetworkPolicyLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedProjectNetworkPolicyController in code that requires ProjectNetworkPolicyController @@ -231,12 +223,6 @@ type ProjectNetworkPolicyControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ProjectNetworkPolicyLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ProjectNetworkPolicyControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ProjectNetworkPolicyControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ProjectNetworkPolicyControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ProjectNetworkPolicyControllerMock.StartFunc: method is nil but ProjectNetworkPolicyController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockProjectNetworkPolicyControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockProjectNetworkPolicyControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedProjectNetworkPolicyController.StartCalls()) -func (mock *ProjectNetworkPolicyControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockProjectNetworkPolicyControllerMockStart.RLock() - calls = mock.calls.Start - lockProjectNetworkPolicyControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ProjectNetworkPolicyControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ProjectNetworkPolicyControllerMock.SyncFunc: method is nil but ProjectNetworkPolicyController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockProjectNetworkPolicyControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockProjectNetworkPolicyControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedProjectNetworkPolicyController.SyncCalls()) -func (mock *ProjectNetworkPolicyControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockProjectNetworkPolicyControllerMockSync.RLock() - calls = mock.calls.Sync - lockProjectNetworkPolicyControllerMockSync.RUnlock() - return calls -} - var ( lockProjectNetworkPolicyInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockProjectNetworkPolicyInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_project_role_template_binding_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_project_role_template_binding_mock.go index 505f2b43..5c8cd818 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_project_role_template_binding_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_project_role_template_binding_mock.go @@ -150,8 +150,6 @@ var ( lockProjectRoleTemplateBindingControllerMockGeneric sync.RWMutex lockProjectRoleTemplateBindingControllerMockInformer sync.RWMutex lockProjectRoleTemplateBindingControllerMockLister sync.RWMutex - lockProjectRoleTemplateBindingControllerMockStart sync.RWMutex - lockProjectRoleTemplateBindingControllerMockSync sync.RWMutex ) // Ensure, that ProjectRoleTemplateBindingControllerMock does implement ProjectRoleTemplateBindingController. @@ -191,12 +189,6 @@ var _ v3.ProjectRoleTemplateBindingController = &ProjectRoleTemplateBindingContr // ListerFunc: func() v3.ProjectRoleTemplateBindingLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedProjectRoleTemplateBindingController in code that requires ProjectRoleTemplateBindingController @@ -231,12 +223,6 @@ type ProjectRoleTemplateBindingControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ProjectRoleTemplateBindingLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ProjectRoleTemplateBindingControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ProjectRoleTemplateBindingControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ProjectRoleTemplateBindingControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ProjectRoleTemplateBindingControllerMock.StartFunc: method is nil but ProjectRoleTemplateBindingController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockProjectRoleTemplateBindingControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockProjectRoleTemplateBindingControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedProjectRoleTemplateBindingController.StartCalls()) -func (mock *ProjectRoleTemplateBindingControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockProjectRoleTemplateBindingControllerMockStart.RLock() - calls = mock.calls.Start - lockProjectRoleTemplateBindingControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ProjectRoleTemplateBindingControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ProjectRoleTemplateBindingControllerMock.SyncFunc: method is nil but ProjectRoleTemplateBindingController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockProjectRoleTemplateBindingControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockProjectRoleTemplateBindingControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedProjectRoleTemplateBindingController.SyncCalls()) -func (mock *ProjectRoleTemplateBindingControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockProjectRoleTemplateBindingControllerMockSync.RLock() - calls = mock.calls.Sync - lockProjectRoleTemplateBindingControllerMockSync.RUnlock() - return calls -} - var ( lockProjectRoleTemplateBindingInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockProjectRoleTemplateBindingInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_rke_addon_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_rke_addon_mock.go index 4854ef09..e7c601ab 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_rke_addon_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_rke_addon_mock.go @@ -18,38 +18,38 @@ import ( ) var ( - lockRKEAddonListerMockGet sync.RWMutex - lockRKEAddonListerMockList sync.RWMutex + lockRkeAddonListerMockGet sync.RWMutex + lockRkeAddonListerMockList sync.RWMutex ) -// Ensure, that RKEAddonListerMock does implement RKEAddonLister. +// Ensure, that RkeAddonListerMock does implement RkeAddonLister. // If this is not the case, regenerate this file with moq. -var _ v3.RKEAddonLister = &RKEAddonListerMock{} +var _ v3.RkeAddonLister = &RkeAddonListerMock{} -// RKEAddonListerMock is a mock implementation of RKEAddonLister. +// RkeAddonListerMock is a mock implementation of RkeAddonLister. // -// func TestSomethingThatUsesRKEAddonLister(t *testing.T) { +// func TestSomethingThatUsesRkeAddonLister(t *testing.T) { // -// // make and configure a mocked RKEAddonLister -// mockedRKEAddonLister := &RKEAddonListerMock{ -// GetFunc: func(namespace string, name string) (*v3.RKEAddon, error) { +// // make and configure a mocked RkeAddonLister +// mockedRkeAddonLister := &RkeAddonListerMock{ +// GetFunc: func(namespace string, name string) (*v3.RkeAddon, error) { // panic("mock out the Get method") // }, -// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.RKEAddon, error) { +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.RkeAddon, error) { // panic("mock out the List method") // }, // } // -// // use mockedRKEAddonLister in code that requires RKEAddonLister +// // use mockedRkeAddonLister in code that requires RkeAddonLister // // and then make assertions. // // } -type RKEAddonListerMock struct { +type RkeAddonListerMock struct { // GetFunc mocks the Get method. - GetFunc func(namespace string, name string) (*v3.RKEAddon, error) + GetFunc func(namespace string, name string) (*v3.RkeAddon, error) // ListFunc mocks the List method. - ListFunc func(namespace string, selector labels.Selector) ([]*v3.RKEAddon, error) + ListFunc func(namespace string, selector labels.Selector) ([]*v3.RkeAddon, error) // calls tracks calls to the methods. calls struct { @@ -71,9 +71,9 @@ type RKEAddonListerMock struct { } // Get calls GetFunc. -func (mock *RKEAddonListerMock) Get(namespace string, name string) (*v3.RKEAddon, error) { +func (mock *RkeAddonListerMock) Get(namespace string, name string) (*v3.RkeAddon, error) { if mock.GetFunc == nil { - panic("RKEAddonListerMock.GetFunc: method is nil but RKEAddonLister.Get was just called") + panic("RkeAddonListerMock.GetFunc: method is nil but RkeAddonLister.Get was just called") } callInfo := struct { Namespace string @@ -82,16 +82,16 @@ func (mock *RKEAddonListerMock) Get(namespace string, name string) (*v3.RKEAddon Namespace: namespace, Name: name, } - lockRKEAddonListerMockGet.Lock() + lockRkeAddonListerMockGet.Lock() mock.calls.Get = append(mock.calls.Get, callInfo) - lockRKEAddonListerMockGet.Unlock() + lockRkeAddonListerMockGet.Unlock() return mock.GetFunc(namespace, name) } // GetCalls gets all the calls that were made to Get. // Check the length with: -// len(mockedRKEAddonLister.GetCalls()) -func (mock *RKEAddonListerMock) GetCalls() []struct { +// len(mockedRkeAddonLister.GetCalls()) +func (mock *RkeAddonListerMock) GetCalls() []struct { Namespace string Name string } { @@ -99,16 +99,16 @@ func (mock *RKEAddonListerMock) GetCalls() []struct { Namespace string Name string } - lockRKEAddonListerMockGet.RLock() + lockRkeAddonListerMockGet.RLock() calls = mock.calls.Get - lockRKEAddonListerMockGet.RUnlock() + lockRkeAddonListerMockGet.RUnlock() return calls } // List calls ListFunc. -func (mock *RKEAddonListerMock) List(namespace string, selector labels.Selector) ([]*v3.RKEAddon, error) { +func (mock *RkeAddonListerMock) List(namespace string, selector labels.Selector) ([]*v3.RkeAddon, error) { if mock.ListFunc == nil { - panic("RKEAddonListerMock.ListFunc: method is nil but RKEAddonLister.List was just called") + panic("RkeAddonListerMock.ListFunc: method is nil but RkeAddonLister.List was just called") } callInfo := struct { Namespace string @@ -117,16 +117,16 @@ func (mock *RKEAddonListerMock) List(namespace string, selector labels.Selector) Namespace: namespace, Selector: selector, } - lockRKEAddonListerMockList.Lock() + lockRkeAddonListerMockList.Lock() mock.calls.List = append(mock.calls.List, callInfo) - lockRKEAddonListerMockList.Unlock() + lockRkeAddonListerMockList.Unlock() return mock.ListFunc(namespace, selector) } // ListCalls gets all the calls that were made to List. // Check the length with: -// len(mockedRKEAddonLister.ListCalls()) -func (mock *RKEAddonListerMock) ListCalls() []struct { +// len(mockedRkeAddonLister.ListCalls()) +func (mock *RkeAddonListerMock) ListCalls() []struct { Namespace string Selector labels.Selector } { @@ -134,46 +134,44 @@ func (mock *RKEAddonListerMock) ListCalls() []struct { Namespace string Selector labels.Selector } - lockRKEAddonListerMockList.RLock() + lockRkeAddonListerMockList.RLock() calls = mock.calls.List - lockRKEAddonListerMockList.RUnlock() + lockRkeAddonListerMockList.RUnlock() return calls } var ( - lockRKEAddonControllerMockAddClusterScopedFeatureHandler sync.RWMutex - lockRKEAddonControllerMockAddClusterScopedHandler sync.RWMutex - lockRKEAddonControllerMockAddFeatureHandler sync.RWMutex - lockRKEAddonControllerMockAddHandler sync.RWMutex - lockRKEAddonControllerMockEnqueue sync.RWMutex - lockRKEAddonControllerMockEnqueueAfter sync.RWMutex - lockRKEAddonControllerMockGeneric sync.RWMutex - lockRKEAddonControllerMockInformer sync.RWMutex - lockRKEAddonControllerMockLister sync.RWMutex - lockRKEAddonControllerMockStart sync.RWMutex - lockRKEAddonControllerMockSync sync.RWMutex + lockRkeAddonControllerMockAddClusterScopedFeatureHandler sync.RWMutex + lockRkeAddonControllerMockAddClusterScopedHandler sync.RWMutex + lockRkeAddonControllerMockAddFeatureHandler sync.RWMutex + lockRkeAddonControllerMockAddHandler sync.RWMutex + lockRkeAddonControllerMockEnqueue sync.RWMutex + lockRkeAddonControllerMockEnqueueAfter sync.RWMutex + lockRkeAddonControllerMockGeneric sync.RWMutex + lockRkeAddonControllerMockInformer sync.RWMutex + lockRkeAddonControllerMockLister sync.RWMutex ) -// Ensure, that RKEAddonControllerMock does implement RKEAddonController. +// Ensure, that RkeAddonControllerMock does implement RkeAddonController. // If this is not the case, regenerate this file with moq. -var _ v3.RKEAddonController = &RKEAddonControllerMock{} +var _ v3.RkeAddonController = &RkeAddonControllerMock{} -// RKEAddonControllerMock is a mock implementation of RKEAddonController. +// RkeAddonControllerMock is a mock implementation of RkeAddonController. // -// func TestSomethingThatUsesRKEAddonController(t *testing.T) { +// func TestSomethingThatUsesRkeAddonController(t *testing.T) { // -// // make and configure a mocked RKEAddonController -// mockedRKEAddonController := &RKEAddonControllerMock{ -// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEAddonHandlerFunc) { +// // make and configure a mocked RkeAddonController +// mockedRkeAddonController := &RkeAddonControllerMock{ +// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RkeAddonHandlerFunc) { // panic("mock out the AddClusterScopedFeatureHandler method") // }, -// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.RKEAddonHandlerFunc) { +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.RkeAddonHandlerFunc) { // panic("mock out the AddClusterScopedHandler method") // }, -// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RKEAddonHandlerFunc) { +// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RkeAddonHandlerFunc) { // panic("mock out the AddFeatureHandler method") // }, -// AddHandlerFunc: func(ctx context.Context, name string, handler v3.RKEAddonHandlerFunc) { +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.RkeAddonHandlerFunc) { // panic("mock out the AddHandler method") // }, // EnqueueFunc: func(namespace string, name string) { @@ -188,33 +186,27 @@ var _ v3.RKEAddonController = &RKEAddonControllerMock{} // InformerFunc: func() cache.SharedIndexInformer { // panic("mock out the Informer method") // }, -// ListerFunc: func() v3.RKEAddonLister { +// ListerFunc: func() v3.RkeAddonLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // -// // use mockedRKEAddonController in code that requires RKEAddonController +// // use mockedRkeAddonController in code that requires RkeAddonController // // and then make assertions. // // } -type RKEAddonControllerMock struct { +type RkeAddonControllerMock struct { // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. - AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEAddonHandlerFunc) + AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RkeAddonHandlerFunc) // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. - AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.RKEAddonHandlerFunc) + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.RkeAddonHandlerFunc) // AddFeatureHandlerFunc mocks the AddFeatureHandler method. - AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RKEAddonHandlerFunc) + AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RkeAddonHandlerFunc) // AddHandlerFunc mocks the AddHandler method. - AddHandlerFunc func(ctx context.Context, name string, handler v3.RKEAddonHandlerFunc) + AddHandlerFunc func(ctx context.Context, name string, handler v3.RkeAddonHandlerFunc) // EnqueueFunc mocks the Enqueue method. EnqueueFunc func(namespace string, name string) @@ -229,13 +221,7 @@ type RKEAddonControllerMock struct { InformerFunc func() cache.SharedIndexInformer // ListerFunc mocks the Lister method. - ListerFunc func() v3.RKEAddonLister - - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error + ListerFunc func() v3.RkeAddonLister // calls tracks calls to the methods. calls struct { @@ -250,7 +236,7 @@ type RKEAddonControllerMock struct { // ClusterName is the clusterName argument value. ClusterName string // Handler is the handler argument value. - Handler v3.RKEAddonHandlerFunc + Handler v3.RkeAddonHandlerFunc } // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. AddClusterScopedHandler []struct { @@ -261,7 +247,7 @@ type RKEAddonControllerMock struct { // ClusterName is the clusterName argument value. ClusterName string // Handler is the handler argument value. - Handler v3.RKEAddonHandlerFunc + Handler v3.RkeAddonHandlerFunc } // AddFeatureHandler holds details about calls to the AddFeatureHandler method. AddFeatureHandler []struct { @@ -272,7 +258,7 @@ type RKEAddonControllerMock struct { // Name is the name argument value. Name string // Sync is the sync argument value. - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } // AddHandler holds details about calls to the AddHandler method. AddHandler []struct { @@ -281,7 +267,7 @@ type RKEAddonControllerMock struct { // Name is the name argument value. Name string // Handler is the handler argument value. - Handler v3.RKEAddonHandlerFunc + Handler v3.RkeAddonHandlerFunc } // Enqueue holds details about calls to the Enqueue method. Enqueue []struct { @@ -308,32 +294,20 @@ type RKEAddonControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } // AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc. -func (mock *RKEAddonControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEAddonHandlerFunc) { +func (mock *RkeAddonControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RkeAddonHandlerFunc) { if mock.AddClusterScopedFeatureHandlerFunc == nil { - panic("RKEAddonControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but RKEAddonController.AddClusterScopedFeatureHandler was just called") + panic("RkeAddonControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but RkeAddonController.AddClusterScopedFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Handler v3.RKEAddonHandlerFunc + Handler v3.RkeAddonHandlerFunc }{ Ctx: ctx, Enabled: enabled, @@ -341,164 +315,164 @@ func (mock *RKEAddonControllerMock) AddClusterScopedFeatureHandler(ctx context.C ClusterName: clusterName, Handler: handler, } - lockRKEAddonControllerMockAddClusterScopedFeatureHandler.Lock() + lockRkeAddonControllerMockAddClusterScopedFeatureHandler.Lock() mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) - lockRKEAddonControllerMockAddClusterScopedFeatureHandler.Unlock() + lockRkeAddonControllerMockAddClusterScopedFeatureHandler.Unlock() mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, handler) } // AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. // Check the length with: -// len(mockedRKEAddonController.AddClusterScopedFeatureHandlerCalls()) -func (mock *RKEAddonControllerMock) AddClusterScopedFeatureHandlerCalls() []struct { +// len(mockedRkeAddonController.AddClusterScopedFeatureHandlerCalls()) +func (mock *RkeAddonControllerMock) AddClusterScopedFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Handler v3.RKEAddonHandlerFunc + Handler v3.RkeAddonHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Handler v3.RKEAddonHandlerFunc + Handler v3.RkeAddonHandlerFunc } - lockRKEAddonControllerMockAddClusterScopedFeatureHandler.RLock() + lockRkeAddonControllerMockAddClusterScopedFeatureHandler.RLock() calls = mock.calls.AddClusterScopedFeatureHandler - lockRKEAddonControllerMockAddClusterScopedFeatureHandler.RUnlock() + lockRkeAddonControllerMockAddClusterScopedFeatureHandler.RUnlock() return calls } // AddClusterScopedHandler calls AddClusterScopedHandlerFunc. -func (mock *RKEAddonControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.RKEAddonHandlerFunc) { +func (mock *RkeAddonControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.RkeAddonHandlerFunc) { if mock.AddClusterScopedHandlerFunc == nil { - panic("RKEAddonControllerMock.AddClusterScopedHandlerFunc: method is nil but RKEAddonController.AddClusterScopedHandler was just called") + panic("RkeAddonControllerMock.AddClusterScopedHandlerFunc: method is nil but RkeAddonController.AddClusterScopedHandler was just called") } callInfo := struct { Ctx context.Context Name string ClusterName string - Handler v3.RKEAddonHandlerFunc + Handler v3.RkeAddonHandlerFunc }{ Ctx: ctx, Name: name, ClusterName: clusterName, Handler: handler, } - lockRKEAddonControllerMockAddClusterScopedHandler.Lock() + lockRkeAddonControllerMockAddClusterScopedHandler.Lock() mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) - lockRKEAddonControllerMockAddClusterScopedHandler.Unlock() + lockRkeAddonControllerMockAddClusterScopedHandler.Unlock() mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) } // AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. // Check the length with: -// len(mockedRKEAddonController.AddClusterScopedHandlerCalls()) -func (mock *RKEAddonControllerMock) AddClusterScopedHandlerCalls() []struct { +// len(mockedRkeAddonController.AddClusterScopedHandlerCalls()) +func (mock *RkeAddonControllerMock) AddClusterScopedHandlerCalls() []struct { Ctx context.Context Name string ClusterName string - Handler v3.RKEAddonHandlerFunc + Handler v3.RkeAddonHandlerFunc } { var calls []struct { Ctx context.Context Name string ClusterName string - Handler v3.RKEAddonHandlerFunc + Handler v3.RkeAddonHandlerFunc } - lockRKEAddonControllerMockAddClusterScopedHandler.RLock() + lockRkeAddonControllerMockAddClusterScopedHandler.RLock() calls = mock.calls.AddClusterScopedHandler - lockRKEAddonControllerMockAddClusterScopedHandler.RUnlock() + lockRkeAddonControllerMockAddClusterScopedHandler.RUnlock() return calls } // AddFeatureHandler calls AddFeatureHandlerFunc. -func (mock *RKEAddonControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RKEAddonHandlerFunc) { +func (mock *RkeAddonControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RkeAddonHandlerFunc) { if mock.AddFeatureHandlerFunc == nil { - panic("RKEAddonControllerMock.AddFeatureHandlerFunc: method is nil but RKEAddonController.AddFeatureHandler was just called") + panic("RkeAddonControllerMock.AddFeatureHandlerFunc: method is nil but RkeAddonController.AddFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc }{ Ctx: ctx, Enabled: enabled, Name: name, Sync: sync, } - lockRKEAddonControllerMockAddFeatureHandler.Lock() + lockRkeAddonControllerMockAddFeatureHandler.Lock() mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) - lockRKEAddonControllerMockAddFeatureHandler.Unlock() + lockRkeAddonControllerMockAddFeatureHandler.Unlock() mock.AddFeatureHandlerFunc(ctx, enabled, name, sync) } // AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. // Check the length with: -// len(mockedRKEAddonController.AddFeatureHandlerCalls()) -func (mock *RKEAddonControllerMock) AddFeatureHandlerCalls() []struct { +// len(mockedRkeAddonController.AddFeatureHandlerCalls()) +func (mock *RkeAddonControllerMock) AddFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } - lockRKEAddonControllerMockAddFeatureHandler.RLock() + lockRkeAddonControllerMockAddFeatureHandler.RLock() calls = mock.calls.AddFeatureHandler - lockRKEAddonControllerMockAddFeatureHandler.RUnlock() + lockRkeAddonControllerMockAddFeatureHandler.RUnlock() return calls } // AddHandler calls AddHandlerFunc. -func (mock *RKEAddonControllerMock) AddHandler(ctx context.Context, name string, handler v3.RKEAddonHandlerFunc) { +func (mock *RkeAddonControllerMock) AddHandler(ctx context.Context, name string, handler v3.RkeAddonHandlerFunc) { if mock.AddHandlerFunc == nil { - panic("RKEAddonControllerMock.AddHandlerFunc: method is nil but RKEAddonController.AddHandler was just called") + panic("RkeAddonControllerMock.AddHandlerFunc: method is nil but RkeAddonController.AddHandler was just called") } callInfo := struct { Ctx context.Context Name string - Handler v3.RKEAddonHandlerFunc + Handler v3.RkeAddonHandlerFunc }{ Ctx: ctx, Name: name, Handler: handler, } - lockRKEAddonControllerMockAddHandler.Lock() + lockRkeAddonControllerMockAddHandler.Lock() mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) - lockRKEAddonControllerMockAddHandler.Unlock() + lockRkeAddonControllerMockAddHandler.Unlock() mock.AddHandlerFunc(ctx, name, handler) } // AddHandlerCalls gets all the calls that were made to AddHandler. // Check the length with: -// len(mockedRKEAddonController.AddHandlerCalls()) -func (mock *RKEAddonControllerMock) AddHandlerCalls() []struct { +// len(mockedRkeAddonController.AddHandlerCalls()) +func (mock *RkeAddonControllerMock) AddHandlerCalls() []struct { Ctx context.Context Name string - Handler v3.RKEAddonHandlerFunc + Handler v3.RkeAddonHandlerFunc } { var calls []struct { Ctx context.Context Name string - Handler v3.RKEAddonHandlerFunc + Handler v3.RkeAddonHandlerFunc } - lockRKEAddonControllerMockAddHandler.RLock() + lockRkeAddonControllerMockAddHandler.RLock() calls = mock.calls.AddHandler - lockRKEAddonControllerMockAddHandler.RUnlock() + lockRkeAddonControllerMockAddHandler.RUnlock() return calls } // Enqueue calls EnqueueFunc. -func (mock *RKEAddonControllerMock) Enqueue(namespace string, name string) { +func (mock *RkeAddonControllerMock) Enqueue(namespace string, name string) { if mock.EnqueueFunc == nil { - panic("RKEAddonControllerMock.EnqueueFunc: method is nil but RKEAddonController.Enqueue was just called") + panic("RkeAddonControllerMock.EnqueueFunc: method is nil but RkeAddonController.Enqueue was just called") } callInfo := struct { Namespace string @@ -507,16 +481,16 @@ func (mock *RKEAddonControllerMock) Enqueue(namespace string, name string) { Namespace: namespace, Name: name, } - lockRKEAddonControllerMockEnqueue.Lock() + lockRkeAddonControllerMockEnqueue.Lock() mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) - lockRKEAddonControllerMockEnqueue.Unlock() + lockRkeAddonControllerMockEnqueue.Unlock() mock.EnqueueFunc(namespace, name) } // EnqueueCalls gets all the calls that were made to Enqueue. // Check the length with: -// len(mockedRKEAddonController.EnqueueCalls()) -func (mock *RKEAddonControllerMock) EnqueueCalls() []struct { +// len(mockedRkeAddonController.EnqueueCalls()) +func (mock *RkeAddonControllerMock) EnqueueCalls() []struct { Namespace string Name string } { @@ -524,16 +498,16 @@ func (mock *RKEAddonControllerMock) EnqueueCalls() []struct { Namespace string Name string } - lockRKEAddonControllerMockEnqueue.RLock() + lockRkeAddonControllerMockEnqueue.RLock() calls = mock.calls.Enqueue - lockRKEAddonControllerMockEnqueue.RUnlock() + lockRkeAddonControllerMockEnqueue.RUnlock() return calls } // EnqueueAfter calls EnqueueAfterFunc. -func (mock *RKEAddonControllerMock) EnqueueAfter(namespace string, name string, after time.Duration) { +func (mock *RkeAddonControllerMock) EnqueueAfter(namespace string, name string, after time.Duration) { if mock.EnqueueAfterFunc == nil { - panic("RKEAddonControllerMock.EnqueueAfterFunc: method is nil but RKEAddonController.EnqueueAfter was just called") + panic("RkeAddonControllerMock.EnqueueAfterFunc: method is nil but RkeAddonController.EnqueueAfter was just called") } callInfo := struct { Namespace string @@ -544,16 +518,16 @@ func (mock *RKEAddonControllerMock) EnqueueAfter(namespace string, name string, Name: name, After: after, } - lockRKEAddonControllerMockEnqueueAfter.Lock() + lockRkeAddonControllerMockEnqueueAfter.Lock() mock.calls.EnqueueAfter = append(mock.calls.EnqueueAfter, callInfo) - lockRKEAddonControllerMockEnqueueAfter.Unlock() + lockRkeAddonControllerMockEnqueueAfter.Unlock() mock.EnqueueAfterFunc(namespace, name, after) } // EnqueueAfterCalls gets all the calls that were made to EnqueueAfter. // Check the length with: -// len(mockedRKEAddonController.EnqueueAfterCalls()) -func (mock *RKEAddonControllerMock) EnqueueAfterCalls() []struct { +// len(mockedRkeAddonController.EnqueueAfterCalls()) +func (mock *RkeAddonControllerMock) EnqueueAfterCalls() []struct { Namespace string Name string After time.Duration @@ -563,217 +537,151 @@ func (mock *RKEAddonControllerMock) EnqueueAfterCalls() []struct { Name string After time.Duration } - lockRKEAddonControllerMockEnqueueAfter.RLock() + lockRkeAddonControllerMockEnqueueAfter.RLock() calls = mock.calls.EnqueueAfter - lockRKEAddonControllerMockEnqueueAfter.RUnlock() + lockRkeAddonControllerMockEnqueueAfter.RUnlock() return calls } // Generic calls GenericFunc. -func (mock *RKEAddonControllerMock) Generic() controller.GenericController { +func (mock *RkeAddonControllerMock) Generic() controller.GenericController { if mock.GenericFunc == nil { - panic("RKEAddonControllerMock.GenericFunc: method is nil but RKEAddonController.Generic was just called") + panic("RkeAddonControllerMock.GenericFunc: method is nil but RkeAddonController.Generic was just called") } callInfo := struct { }{} - lockRKEAddonControllerMockGeneric.Lock() + lockRkeAddonControllerMockGeneric.Lock() mock.calls.Generic = append(mock.calls.Generic, callInfo) - lockRKEAddonControllerMockGeneric.Unlock() + lockRkeAddonControllerMockGeneric.Unlock() return mock.GenericFunc() } // GenericCalls gets all the calls that were made to Generic. // Check the length with: -// len(mockedRKEAddonController.GenericCalls()) -func (mock *RKEAddonControllerMock) GenericCalls() []struct { +// len(mockedRkeAddonController.GenericCalls()) +func (mock *RkeAddonControllerMock) GenericCalls() []struct { } { var calls []struct { } - lockRKEAddonControllerMockGeneric.RLock() + lockRkeAddonControllerMockGeneric.RLock() calls = mock.calls.Generic - lockRKEAddonControllerMockGeneric.RUnlock() + lockRkeAddonControllerMockGeneric.RUnlock() return calls } // Informer calls InformerFunc. -func (mock *RKEAddonControllerMock) Informer() cache.SharedIndexInformer { +func (mock *RkeAddonControllerMock) Informer() cache.SharedIndexInformer { if mock.InformerFunc == nil { - panic("RKEAddonControllerMock.InformerFunc: method is nil but RKEAddonController.Informer was just called") + panic("RkeAddonControllerMock.InformerFunc: method is nil but RkeAddonController.Informer was just called") } callInfo := struct { }{} - lockRKEAddonControllerMockInformer.Lock() + lockRkeAddonControllerMockInformer.Lock() mock.calls.Informer = append(mock.calls.Informer, callInfo) - lockRKEAddonControllerMockInformer.Unlock() + lockRkeAddonControllerMockInformer.Unlock() return mock.InformerFunc() } // InformerCalls gets all the calls that were made to Informer. // Check the length with: -// len(mockedRKEAddonController.InformerCalls()) -func (mock *RKEAddonControllerMock) InformerCalls() []struct { +// len(mockedRkeAddonController.InformerCalls()) +func (mock *RkeAddonControllerMock) InformerCalls() []struct { } { var calls []struct { } - lockRKEAddonControllerMockInformer.RLock() + lockRkeAddonControllerMockInformer.RLock() calls = mock.calls.Informer - lockRKEAddonControllerMockInformer.RUnlock() + lockRkeAddonControllerMockInformer.RUnlock() return calls } // Lister calls ListerFunc. -func (mock *RKEAddonControllerMock) Lister() v3.RKEAddonLister { +func (mock *RkeAddonControllerMock) Lister() v3.RkeAddonLister { if mock.ListerFunc == nil { - panic("RKEAddonControllerMock.ListerFunc: method is nil but RKEAddonController.Lister was just called") + panic("RkeAddonControllerMock.ListerFunc: method is nil but RkeAddonController.Lister was just called") } callInfo := struct { }{} - lockRKEAddonControllerMockLister.Lock() + lockRkeAddonControllerMockLister.Lock() mock.calls.Lister = append(mock.calls.Lister, callInfo) - lockRKEAddonControllerMockLister.Unlock() + lockRkeAddonControllerMockLister.Unlock() return mock.ListerFunc() } // ListerCalls gets all the calls that were made to Lister. // Check the length with: -// len(mockedRKEAddonController.ListerCalls()) -func (mock *RKEAddonControllerMock) ListerCalls() []struct { +// len(mockedRkeAddonController.ListerCalls()) +func (mock *RkeAddonControllerMock) ListerCalls() []struct { } { var calls []struct { } - lockRKEAddonControllerMockLister.RLock() + lockRkeAddonControllerMockLister.RLock() calls = mock.calls.Lister - lockRKEAddonControllerMockLister.RUnlock() - return calls -} - -// Start calls StartFunc. -func (mock *RKEAddonControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("RKEAddonControllerMock.StartFunc: method is nil but RKEAddonController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockRKEAddonControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockRKEAddonControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedRKEAddonController.StartCalls()) -func (mock *RKEAddonControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockRKEAddonControllerMockStart.RLock() - calls = mock.calls.Start - lockRKEAddonControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *RKEAddonControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("RKEAddonControllerMock.SyncFunc: method is nil but RKEAddonController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockRKEAddonControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockRKEAddonControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedRKEAddonController.SyncCalls()) -func (mock *RKEAddonControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockRKEAddonControllerMockSync.RLock() - calls = mock.calls.Sync - lockRKEAddonControllerMockSync.RUnlock() + lockRkeAddonControllerMockLister.RUnlock() return calls } var ( - lockRKEAddonInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex - lockRKEAddonInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex - lockRKEAddonInterfaceMockAddClusterScopedHandler sync.RWMutex - lockRKEAddonInterfaceMockAddClusterScopedLifecycle sync.RWMutex - lockRKEAddonInterfaceMockAddFeatureHandler sync.RWMutex - lockRKEAddonInterfaceMockAddFeatureLifecycle sync.RWMutex - lockRKEAddonInterfaceMockAddHandler sync.RWMutex - lockRKEAddonInterfaceMockAddLifecycle sync.RWMutex - lockRKEAddonInterfaceMockController sync.RWMutex - lockRKEAddonInterfaceMockCreate sync.RWMutex - lockRKEAddonInterfaceMockDelete sync.RWMutex - lockRKEAddonInterfaceMockDeleteCollection sync.RWMutex - lockRKEAddonInterfaceMockDeleteNamespaced sync.RWMutex - lockRKEAddonInterfaceMockGet sync.RWMutex - lockRKEAddonInterfaceMockGetNamespaced sync.RWMutex - lockRKEAddonInterfaceMockList sync.RWMutex - lockRKEAddonInterfaceMockListNamespaced sync.RWMutex - lockRKEAddonInterfaceMockObjectClient sync.RWMutex - lockRKEAddonInterfaceMockUpdate sync.RWMutex - lockRKEAddonInterfaceMockWatch sync.RWMutex + lockRkeAddonInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex + lockRkeAddonInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex + lockRkeAddonInterfaceMockAddClusterScopedHandler sync.RWMutex + lockRkeAddonInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockRkeAddonInterfaceMockAddFeatureHandler sync.RWMutex + lockRkeAddonInterfaceMockAddFeatureLifecycle sync.RWMutex + lockRkeAddonInterfaceMockAddHandler sync.RWMutex + lockRkeAddonInterfaceMockAddLifecycle sync.RWMutex + lockRkeAddonInterfaceMockController sync.RWMutex + lockRkeAddonInterfaceMockCreate sync.RWMutex + lockRkeAddonInterfaceMockDelete sync.RWMutex + lockRkeAddonInterfaceMockDeleteCollection sync.RWMutex + lockRkeAddonInterfaceMockDeleteNamespaced sync.RWMutex + lockRkeAddonInterfaceMockGet sync.RWMutex + lockRkeAddonInterfaceMockGetNamespaced sync.RWMutex + lockRkeAddonInterfaceMockList sync.RWMutex + lockRkeAddonInterfaceMockListNamespaced sync.RWMutex + lockRkeAddonInterfaceMockObjectClient sync.RWMutex + lockRkeAddonInterfaceMockUpdate sync.RWMutex + lockRkeAddonInterfaceMockWatch sync.RWMutex ) -// Ensure, that RKEAddonInterfaceMock does implement RKEAddonInterface. +// Ensure, that RkeAddonInterfaceMock does implement RkeAddonInterface. // If this is not the case, regenerate this file with moq. -var _ v3.RKEAddonInterface = &RKEAddonInterfaceMock{} +var _ v3.RkeAddonInterface = &RkeAddonInterfaceMock{} -// RKEAddonInterfaceMock is a mock implementation of RKEAddonInterface. +// RkeAddonInterfaceMock is a mock implementation of RkeAddonInterface. // -// func TestSomethingThatUsesRKEAddonInterface(t *testing.T) { +// func TestSomethingThatUsesRkeAddonInterface(t *testing.T) { // -// // make and configure a mocked RKEAddonInterface -// mockedRKEAddonInterface := &RKEAddonInterfaceMock{ -// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEAddonHandlerFunc) { +// // make and configure a mocked RkeAddonInterface +// mockedRkeAddonInterface := &RkeAddonInterfaceMock{ +// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RkeAddonHandlerFunc) { // panic("mock out the AddClusterScopedFeatureHandler method") // }, -// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEAddonLifecycle) { +// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RkeAddonLifecycle) { // panic("mock out the AddClusterScopedFeatureLifecycle method") // }, -// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.RKEAddonHandlerFunc) { +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.RkeAddonHandlerFunc) { // panic("mock out the AddClusterScopedHandler method") // }, -// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.RKEAddonLifecycle) { +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.RkeAddonLifecycle) { // panic("mock out the AddClusterScopedLifecycle method") // }, -// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RKEAddonHandlerFunc) { +// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RkeAddonHandlerFunc) { // panic("mock out the AddFeatureHandler method") // }, -// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEAddonLifecycle) { +// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RkeAddonLifecycle) { // panic("mock out the AddFeatureLifecycle method") // }, -// AddHandlerFunc: func(ctx context.Context, name string, sync v3.RKEAddonHandlerFunc) { +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.RkeAddonHandlerFunc) { // panic("mock out the AddHandler method") // }, -// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.RKEAddonLifecycle) { +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.RkeAddonLifecycle) { // panic("mock out the AddLifecycle method") // }, -// ControllerFunc: func() v3.RKEAddonController { +// ControllerFunc: func() v3.RkeAddonController { // panic("mock out the Controller method") // }, -// CreateFunc: func(in1 *v3.RKEAddon) (*v3.RKEAddon, error) { +// CreateFunc: func(in1 *v3.RkeAddon) (*v3.RkeAddon, error) { // panic("mock out the Create method") // }, // DeleteFunc: func(name string, options *v1.DeleteOptions) error { @@ -785,22 +693,22 @@ var _ v3.RKEAddonInterface = &RKEAddonInterfaceMock{} // DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { // panic("mock out the DeleteNamespaced method") // }, -// GetFunc: func(name string, opts v1.GetOptions) (*v3.RKEAddon, error) { +// GetFunc: func(name string, opts v1.GetOptions) (*v3.RkeAddon, error) { // panic("mock out the Get method") // }, -// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.RKEAddon, error) { +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.RkeAddon, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1.ListOptions) (*v3.RKEAddonList, error) { +// ListFunc: func(opts v1.ListOptions) (*v3.RkeAddonList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v3.RKEAddonList, error) { +// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v3.RkeAddonList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { // panic("mock out the ObjectClient method") // }, -// UpdateFunc: func(in1 *v3.RKEAddon) (*v3.RKEAddon, error) { +// UpdateFunc: func(in1 *v3.RkeAddon) (*v3.RkeAddon, error) { // panic("mock out the Update method") // }, // WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { @@ -808,40 +716,40 @@ var _ v3.RKEAddonInterface = &RKEAddonInterfaceMock{} // }, // } // -// // use mockedRKEAddonInterface in code that requires RKEAddonInterface +// // use mockedRkeAddonInterface in code that requires RkeAddonInterface // // and then make assertions. // // } -type RKEAddonInterfaceMock struct { +type RkeAddonInterfaceMock struct { // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. - AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEAddonHandlerFunc) + AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RkeAddonHandlerFunc) // AddClusterScopedFeatureLifecycleFunc mocks the AddClusterScopedFeatureLifecycle method. - AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEAddonLifecycle) + AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RkeAddonLifecycle) // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. - AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.RKEAddonHandlerFunc) + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.RkeAddonHandlerFunc) // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. - AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.RKEAddonLifecycle) + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.RkeAddonLifecycle) // AddFeatureHandlerFunc mocks the AddFeatureHandler method. - AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RKEAddonHandlerFunc) + AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RkeAddonHandlerFunc) // AddFeatureLifecycleFunc mocks the AddFeatureLifecycle method. - AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEAddonLifecycle) + AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RkeAddonLifecycle) // AddHandlerFunc mocks the AddHandler method. - AddHandlerFunc func(ctx context.Context, name string, sync v3.RKEAddonHandlerFunc) + AddHandlerFunc func(ctx context.Context, name string, sync v3.RkeAddonHandlerFunc) // AddLifecycleFunc mocks the AddLifecycle method. - AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.RKEAddonLifecycle) + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.RkeAddonLifecycle) // ControllerFunc mocks the Controller method. - ControllerFunc func() v3.RKEAddonController + ControllerFunc func() v3.RkeAddonController // CreateFunc mocks the Create method. - CreateFunc func(in1 *v3.RKEAddon) (*v3.RKEAddon, error) + CreateFunc func(in1 *v3.RkeAddon) (*v3.RkeAddon, error) // DeleteFunc mocks the Delete method. DeleteFunc func(name string, options *v1.DeleteOptions) error @@ -853,22 +761,22 @@ type RKEAddonInterfaceMock struct { DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error // GetFunc mocks the Get method. - GetFunc func(name string, opts v1.GetOptions) (*v3.RKEAddon, error) + GetFunc func(name string, opts v1.GetOptions) (*v3.RkeAddon, error) // GetNamespacedFunc mocks the GetNamespaced method. - GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.RKEAddon, error) + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.RkeAddon, error) // ListFunc mocks the List method. - ListFunc func(opts v1.ListOptions) (*v3.RKEAddonList, error) + ListFunc func(opts v1.ListOptions) (*v3.RkeAddonList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v3.RKEAddonList, error) + ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v3.RkeAddonList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient // UpdateFunc mocks the Update method. - UpdateFunc func(in1 *v3.RKEAddon) (*v3.RKEAddon, error) + UpdateFunc func(in1 *v3.RkeAddon) (*v3.RkeAddon, error) // WatchFunc mocks the Watch method. WatchFunc func(opts v1.ListOptions) (watch.Interface, error) @@ -886,7 +794,7 @@ type RKEAddonInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Sync is the sync argument value. - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } // AddClusterScopedFeatureLifecycle holds details about calls to the AddClusterScopedFeatureLifecycle method. AddClusterScopedFeatureLifecycle []struct { @@ -899,7 +807,7 @@ type RKEAddonInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle } // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. AddClusterScopedHandler []struct { @@ -910,7 +818,7 @@ type RKEAddonInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Sync is the sync argument value. - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. AddClusterScopedLifecycle []struct { @@ -921,7 +829,7 @@ type RKEAddonInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle } // AddFeatureHandler holds details about calls to the AddFeatureHandler method. AddFeatureHandler []struct { @@ -932,7 +840,7 @@ type RKEAddonInterfaceMock struct { // Name is the name argument value. Name string // Sync is the sync argument value. - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } // AddFeatureLifecycle holds details about calls to the AddFeatureLifecycle method. AddFeatureLifecycle []struct { @@ -943,7 +851,7 @@ type RKEAddonInterfaceMock struct { // Name is the name argument value. Name string // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle } // AddHandler holds details about calls to the AddHandler method. AddHandler []struct { @@ -952,7 +860,7 @@ type RKEAddonInterfaceMock struct { // Name is the name argument value. Name string // Sync is the sync argument value. - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } // AddLifecycle holds details about calls to the AddLifecycle method. AddLifecycle []struct { @@ -961,7 +869,7 @@ type RKEAddonInterfaceMock struct { // Name is the name argument value. Name string // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle } // Controller holds details about calls to the Controller method. Controller []struct { @@ -969,7 +877,7 @@ type RKEAddonInterfaceMock struct { // Create holds details about calls to the Create method. Create []struct { // In1 is the in1 argument value. - In1 *v3.RKEAddon + In1 *v3.RkeAddon } // Delete holds details about calls to the Delete method. Delete []struct { @@ -1028,7 +936,7 @@ type RKEAddonInterfaceMock struct { // Update holds details about calls to the Update method. Update []struct { // In1 is the in1 argument value. - In1 *v3.RKEAddon + In1 *v3.RkeAddon } // Watch holds details about calls to the Watch method. Watch []struct { @@ -1039,16 +947,16 @@ type RKEAddonInterfaceMock struct { } // AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc. -func (mock *RKEAddonInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEAddonHandlerFunc) { +func (mock *RkeAddonInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RkeAddonHandlerFunc) { if mock.AddClusterScopedFeatureHandlerFunc == nil { - panic("RKEAddonInterfaceMock.AddClusterScopedFeatureHandlerFunc: method is nil but RKEAddonInterface.AddClusterScopedFeatureHandler was just called") + panic("RkeAddonInterfaceMock.AddClusterScopedFeatureHandlerFunc: method is nil but RkeAddonInterface.AddClusterScopedFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc }{ Ctx: ctx, Enabled: enabled, @@ -1056,46 +964,46 @@ func (mock *RKEAddonInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Co ClusterName: clusterName, Sync: sync, } - lockRKEAddonInterfaceMockAddClusterScopedFeatureHandler.Lock() + lockRkeAddonInterfaceMockAddClusterScopedFeatureHandler.Lock() mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) - lockRKEAddonInterfaceMockAddClusterScopedFeatureHandler.Unlock() + lockRkeAddonInterfaceMockAddClusterScopedFeatureHandler.Unlock() mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, sync) } // AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. // Check the length with: -// len(mockedRKEAddonInterface.AddClusterScopedFeatureHandlerCalls()) -func (mock *RKEAddonInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct { +// len(mockedRkeAddonInterface.AddClusterScopedFeatureHandlerCalls()) +func (mock *RkeAddonInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } - lockRKEAddonInterfaceMockAddClusterScopedFeatureHandler.RLock() + lockRkeAddonInterfaceMockAddClusterScopedFeatureHandler.RLock() calls = mock.calls.AddClusterScopedFeatureHandler - lockRKEAddonInterfaceMockAddClusterScopedFeatureHandler.RUnlock() + lockRkeAddonInterfaceMockAddClusterScopedFeatureHandler.RUnlock() return calls } // AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc. -func (mock *RKEAddonInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEAddonLifecycle) { +func (mock *RkeAddonInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RkeAddonLifecycle) { if mock.AddClusterScopedFeatureLifecycleFunc == nil { - panic("RKEAddonInterfaceMock.AddClusterScopedFeatureLifecycleFunc: method is nil but RKEAddonInterface.AddClusterScopedFeatureLifecycle was just called") + panic("RkeAddonInterfaceMock.AddClusterScopedFeatureLifecycleFunc: method is nil but RkeAddonInterface.AddClusterScopedFeatureLifecycle was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle }{ Ctx: ctx, Enabled: enabled, @@ -1103,346 +1011,346 @@ func (mock *RKEAddonInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context. ClusterName: clusterName, Lifecycle: lifecycle, } - lockRKEAddonInterfaceMockAddClusterScopedFeatureLifecycle.Lock() + lockRkeAddonInterfaceMockAddClusterScopedFeatureLifecycle.Lock() mock.calls.AddClusterScopedFeatureLifecycle = append(mock.calls.AddClusterScopedFeatureLifecycle, callInfo) - lockRKEAddonInterfaceMockAddClusterScopedFeatureLifecycle.Unlock() + lockRkeAddonInterfaceMockAddClusterScopedFeatureLifecycle.Unlock() mock.AddClusterScopedFeatureLifecycleFunc(ctx, enabled, name, clusterName, lifecycle) } // AddClusterScopedFeatureLifecycleCalls gets all the calls that were made to AddClusterScopedFeatureLifecycle. // Check the length with: -// len(mockedRKEAddonInterface.AddClusterScopedFeatureLifecycleCalls()) -func (mock *RKEAddonInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct { +// len(mockedRkeAddonInterface.AddClusterScopedFeatureLifecycleCalls()) +func (mock *RkeAddonInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle } { var calls []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle } - lockRKEAddonInterfaceMockAddClusterScopedFeatureLifecycle.RLock() + lockRkeAddonInterfaceMockAddClusterScopedFeatureLifecycle.RLock() calls = mock.calls.AddClusterScopedFeatureLifecycle - lockRKEAddonInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock() + lockRkeAddonInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock() return calls } // AddClusterScopedHandler calls AddClusterScopedHandlerFunc. -func (mock *RKEAddonInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.RKEAddonHandlerFunc) { +func (mock *RkeAddonInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.RkeAddonHandlerFunc) { if mock.AddClusterScopedHandlerFunc == nil { - panic("RKEAddonInterfaceMock.AddClusterScopedHandlerFunc: method is nil but RKEAddonInterface.AddClusterScopedHandler was just called") + panic("RkeAddonInterfaceMock.AddClusterScopedHandlerFunc: method is nil but RkeAddonInterface.AddClusterScopedHandler was just called") } callInfo := struct { Ctx context.Context Name string ClusterName string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc }{ Ctx: ctx, Name: name, ClusterName: clusterName, Sync: sync, } - lockRKEAddonInterfaceMockAddClusterScopedHandler.Lock() + lockRkeAddonInterfaceMockAddClusterScopedHandler.Lock() mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) - lockRKEAddonInterfaceMockAddClusterScopedHandler.Unlock() + lockRkeAddonInterfaceMockAddClusterScopedHandler.Unlock() mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) } // AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. // Check the length with: -// len(mockedRKEAddonInterface.AddClusterScopedHandlerCalls()) -func (mock *RKEAddonInterfaceMock) AddClusterScopedHandlerCalls() []struct { +// len(mockedRkeAddonInterface.AddClusterScopedHandlerCalls()) +func (mock *RkeAddonInterfaceMock) AddClusterScopedHandlerCalls() []struct { Ctx context.Context Name string ClusterName string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } { var calls []struct { Ctx context.Context Name string ClusterName string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } - lockRKEAddonInterfaceMockAddClusterScopedHandler.RLock() + lockRkeAddonInterfaceMockAddClusterScopedHandler.RLock() calls = mock.calls.AddClusterScopedHandler - lockRKEAddonInterfaceMockAddClusterScopedHandler.RUnlock() + lockRkeAddonInterfaceMockAddClusterScopedHandler.RUnlock() return calls } // AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. -func (mock *RKEAddonInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.RKEAddonLifecycle) { +func (mock *RkeAddonInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.RkeAddonLifecycle) { if mock.AddClusterScopedLifecycleFunc == nil { - panic("RKEAddonInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but RKEAddonInterface.AddClusterScopedLifecycle was just called") + panic("RkeAddonInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but RkeAddonInterface.AddClusterScopedLifecycle was just called") } callInfo := struct { Ctx context.Context Name string ClusterName string - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle }{ Ctx: ctx, Name: name, ClusterName: clusterName, Lifecycle: lifecycle, } - lockRKEAddonInterfaceMockAddClusterScopedLifecycle.Lock() + lockRkeAddonInterfaceMockAddClusterScopedLifecycle.Lock() mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) - lockRKEAddonInterfaceMockAddClusterScopedLifecycle.Unlock() + lockRkeAddonInterfaceMockAddClusterScopedLifecycle.Unlock() mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) } // AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. // Check the length with: -// len(mockedRKEAddonInterface.AddClusterScopedLifecycleCalls()) -func (mock *RKEAddonInterfaceMock) AddClusterScopedLifecycleCalls() []struct { +// len(mockedRkeAddonInterface.AddClusterScopedLifecycleCalls()) +func (mock *RkeAddonInterfaceMock) AddClusterScopedLifecycleCalls() []struct { Ctx context.Context Name string ClusterName string - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle } { var calls []struct { Ctx context.Context Name string ClusterName string - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle } - lockRKEAddonInterfaceMockAddClusterScopedLifecycle.RLock() + lockRkeAddonInterfaceMockAddClusterScopedLifecycle.RLock() calls = mock.calls.AddClusterScopedLifecycle - lockRKEAddonInterfaceMockAddClusterScopedLifecycle.RUnlock() + lockRkeAddonInterfaceMockAddClusterScopedLifecycle.RUnlock() return calls } // AddFeatureHandler calls AddFeatureHandlerFunc. -func (mock *RKEAddonInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RKEAddonHandlerFunc) { +func (mock *RkeAddonInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RkeAddonHandlerFunc) { if mock.AddFeatureHandlerFunc == nil { - panic("RKEAddonInterfaceMock.AddFeatureHandlerFunc: method is nil but RKEAddonInterface.AddFeatureHandler was just called") + panic("RkeAddonInterfaceMock.AddFeatureHandlerFunc: method is nil but RkeAddonInterface.AddFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc }{ Ctx: ctx, Enabled: enabled, Name: name, Sync: sync, } - lockRKEAddonInterfaceMockAddFeatureHandler.Lock() + lockRkeAddonInterfaceMockAddFeatureHandler.Lock() mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) - lockRKEAddonInterfaceMockAddFeatureHandler.Unlock() + lockRkeAddonInterfaceMockAddFeatureHandler.Unlock() mock.AddFeatureHandlerFunc(ctx, enabled, name, sync) } // AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. // Check the length with: -// len(mockedRKEAddonInterface.AddFeatureHandlerCalls()) -func (mock *RKEAddonInterfaceMock) AddFeatureHandlerCalls() []struct { +// len(mockedRkeAddonInterface.AddFeatureHandlerCalls()) +func (mock *RkeAddonInterfaceMock) AddFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } - lockRKEAddonInterfaceMockAddFeatureHandler.RLock() + lockRkeAddonInterfaceMockAddFeatureHandler.RLock() calls = mock.calls.AddFeatureHandler - lockRKEAddonInterfaceMockAddFeatureHandler.RUnlock() + lockRkeAddonInterfaceMockAddFeatureHandler.RUnlock() return calls } // AddFeatureLifecycle calls AddFeatureLifecycleFunc. -func (mock *RKEAddonInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEAddonLifecycle) { +func (mock *RkeAddonInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v3.RkeAddonLifecycle) { if mock.AddFeatureLifecycleFunc == nil { - panic("RKEAddonInterfaceMock.AddFeatureLifecycleFunc: method is nil but RKEAddonInterface.AddFeatureLifecycle was just called") + panic("RkeAddonInterfaceMock.AddFeatureLifecycleFunc: method is nil but RkeAddonInterface.AddFeatureLifecycle was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle }{ Ctx: ctx, Enabled: enabled, Name: name, Lifecycle: lifecycle, } - lockRKEAddonInterfaceMockAddFeatureLifecycle.Lock() + lockRkeAddonInterfaceMockAddFeatureLifecycle.Lock() mock.calls.AddFeatureLifecycle = append(mock.calls.AddFeatureLifecycle, callInfo) - lockRKEAddonInterfaceMockAddFeatureLifecycle.Unlock() + lockRkeAddonInterfaceMockAddFeatureLifecycle.Unlock() mock.AddFeatureLifecycleFunc(ctx, enabled, name, lifecycle) } // AddFeatureLifecycleCalls gets all the calls that were made to AddFeatureLifecycle. // Check the length with: -// len(mockedRKEAddonInterface.AddFeatureLifecycleCalls()) -func (mock *RKEAddonInterfaceMock) AddFeatureLifecycleCalls() []struct { +// len(mockedRkeAddonInterface.AddFeatureLifecycleCalls()) +func (mock *RkeAddonInterfaceMock) AddFeatureLifecycleCalls() []struct { Ctx context.Context Enabled func() bool Name string - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle } { var calls []struct { Ctx context.Context Enabled func() bool Name string - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle } - lockRKEAddonInterfaceMockAddFeatureLifecycle.RLock() + lockRkeAddonInterfaceMockAddFeatureLifecycle.RLock() calls = mock.calls.AddFeatureLifecycle - lockRKEAddonInterfaceMockAddFeatureLifecycle.RUnlock() + lockRkeAddonInterfaceMockAddFeatureLifecycle.RUnlock() return calls } // AddHandler calls AddHandlerFunc. -func (mock *RKEAddonInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.RKEAddonHandlerFunc) { +func (mock *RkeAddonInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.RkeAddonHandlerFunc) { if mock.AddHandlerFunc == nil { - panic("RKEAddonInterfaceMock.AddHandlerFunc: method is nil but RKEAddonInterface.AddHandler was just called") + panic("RkeAddonInterfaceMock.AddHandlerFunc: method is nil but RkeAddonInterface.AddHandler was just called") } callInfo := struct { Ctx context.Context Name string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc }{ Ctx: ctx, Name: name, Sync: sync, } - lockRKEAddonInterfaceMockAddHandler.Lock() + lockRkeAddonInterfaceMockAddHandler.Lock() mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) - lockRKEAddonInterfaceMockAddHandler.Unlock() + lockRkeAddonInterfaceMockAddHandler.Unlock() mock.AddHandlerFunc(ctx, name, sync) } // AddHandlerCalls gets all the calls that were made to AddHandler. // Check the length with: -// len(mockedRKEAddonInterface.AddHandlerCalls()) -func (mock *RKEAddonInterfaceMock) AddHandlerCalls() []struct { +// len(mockedRkeAddonInterface.AddHandlerCalls()) +func (mock *RkeAddonInterfaceMock) AddHandlerCalls() []struct { Ctx context.Context Name string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } { var calls []struct { Ctx context.Context Name string - Sync v3.RKEAddonHandlerFunc + Sync v3.RkeAddonHandlerFunc } - lockRKEAddonInterfaceMockAddHandler.RLock() + lockRkeAddonInterfaceMockAddHandler.RLock() calls = mock.calls.AddHandler - lockRKEAddonInterfaceMockAddHandler.RUnlock() + lockRkeAddonInterfaceMockAddHandler.RUnlock() return calls } // AddLifecycle calls AddLifecycleFunc. -func (mock *RKEAddonInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.RKEAddonLifecycle) { +func (mock *RkeAddonInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.RkeAddonLifecycle) { if mock.AddLifecycleFunc == nil { - panic("RKEAddonInterfaceMock.AddLifecycleFunc: method is nil but RKEAddonInterface.AddLifecycle was just called") + panic("RkeAddonInterfaceMock.AddLifecycleFunc: method is nil but RkeAddonInterface.AddLifecycle was just called") } callInfo := struct { Ctx context.Context Name string - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle }{ Ctx: ctx, Name: name, Lifecycle: lifecycle, } - lockRKEAddonInterfaceMockAddLifecycle.Lock() + lockRkeAddonInterfaceMockAddLifecycle.Lock() mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) - lockRKEAddonInterfaceMockAddLifecycle.Unlock() + lockRkeAddonInterfaceMockAddLifecycle.Unlock() mock.AddLifecycleFunc(ctx, name, lifecycle) } // AddLifecycleCalls gets all the calls that were made to AddLifecycle. // Check the length with: -// len(mockedRKEAddonInterface.AddLifecycleCalls()) -func (mock *RKEAddonInterfaceMock) AddLifecycleCalls() []struct { +// len(mockedRkeAddonInterface.AddLifecycleCalls()) +func (mock *RkeAddonInterfaceMock) AddLifecycleCalls() []struct { Ctx context.Context Name string - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle } { var calls []struct { Ctx context.Context Name string - Lifecycle v3.RKEAddonLifecycle + Lifecycle v3.RkeAddonLifecycle } - lockRKEAddonInterfaceMockAddLifecycle.RLock() + lockRkeAddonInterfaceMockAddLifecycle.RLock() calls = mock.calls.AddLifecycle - lockRKEAddonInterfaceMockAddLifecycle.RUnlock() + lockRkeAddonInterfaceMockAddLifecycle.RUnlock() return calls } // Controller calls ControllerFunc. -func (mock *RKEAddonInterfaceMock) Controller() v3.RKEAddonController { +func (mock *RkeAddonInterfaceMock) Controller() v3.RkeAddonController { if mock.ControllerFunc == nil { - panic("RKEAddonInterfaceMock.ControllerFunc: method is nil but RKEAddonInterface.Controller was just called") + panic("RkeAddonInterfaceMock.ControllerFunc: method is nil but RkeAddonInterface.Controller was just called") } callInfo := struct { }{} - lockRKEAddonInterfaceMockController.Lock() + lockRkeAddonInterfaceMockController.Lock() mock.calls.Controller = append(mock.calls.Controller, callInfo) - lockRKEAddonInterfaceMockController.Unlock() + lockRkeAddonInterfaceMockController.Unlock() return mock.ControllerFunc() } // ControllerCalls gets all the calls that were made to Controller. // Check the length with: -// len(mockedRKEAddonInterface.ControllerCalls()) -func (mock *RKEAddonInterfaceMock) ControllerCalls() []struct { +// len(mockedRkeAddonInterface.ControllerCalls()) +func (mock *RkeAddonInterfaceMock) ControllerCalls() []struct { } { var calls []struct { } - lockRKEAddonInterfaceMockController.RLock() + lockRkeAddonInterfaceMockController.RLock() calls = mock.calls.Controller - lockRKEAddonInterfaceMockController.RUnlock() + lockRkeAddonInterfaceMockController.RUnlock() return calls } // Create calls CreateFunc. -func (mock *RKEAddonInterfaceMock) Create(in1 *v3.RKEAddon) (*v3.RKEAddon, error) { +func (mock *RkeAddonInterfaceMock) Create(in1 *v3.RkeAddon) (*v3.RkeAddon, error) { if mock.CreateFunc == nil { - panic("RKEAddonInterfaceMock.CreateFunc: method is nil but RKEAddonInterface.Create was just called") + panic("RkeAddonInterfaceMock.CreateFunc: method is nil but RkeAddonInterface.Create was just called") } callInfo := struct { - In1 *v3.RKEAddon + In1 *v3.RkeAddon }{ In1: in1, } - lockRKEAddonInterfaceMockCreate.Lock() + lockRkeAddonInterfaceMockCreate.Lock() mock.calls.Create = append(mock.calls.Create, callInfo) - lockRKEAddonInterfaceMockCreate.Unlock() + lockRkeAddonInterfaceMockCreate.Unlock() return mock.CreateFunc(in1) } // CreateCalls gets all the calls that were made to Create. // Check the length with: -// len(mockedRKEAddonInterface.CreateCalls()) -func (mock *RKEAddonInterfaceMock) CreateCalls() []struct { - In1 *v3.RKEAddon +// len(mockedRkeAddonInterface.CreateCalls()) +func (mock *RkeAddonInterfaceMock) CreateCalls() []struct { + In1 *v3.RkeAddon } { var calls []struct { - In1 *v3.RKEAddon + In1 *v3.RkeAddon } - lockRKEAddonInterfaceMockCreate.RLock() + lockRkeAddonInterfaceMockCreate.RLock() calls = mock.calls.Create - lockRKEAddonInterfaceMockCreate.RUnlock() + lockRkeAddonInterfaceMockCreate.RUnlock() return calls } // Delete calls DeleteFunc. -func (mock *RKEAddonInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { +func (mock *RkeAddonInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { if mock.DeleteFunc == nil { - panic("RKEAddonInterfaceMock.DeleteFunc: method is nil but RKEAddonInterface.Delete was just called") + panic("RkeAddonInterfaceMock.DeleteFunc: method is nil but RkeAddonInterface.Delete was just called") } callInfo := struct { Name string @@ -1451,16 +1359,16 @@ func (mock *RKEAddonInterfaceMock) Delete(name string, options *v1.DeleteOptions Name: name, Options: options, } - lockRKEAddonInterfaceMockDelete.Lock() + lockRkeAddonInterfaceMockDelete.Lock() mock.calls.Delete = append(mock.calls.Delete, callInfo) - lockRKEAddonInterfaceMockDelete.Unlock() + lockRkeAddonInterfaceMockDelete.Unlock() return mock.DeleteFunc(name, options) } // DeleteCalls gets all the calls that were made to Delete. // Check the length with: -// len(mockedRKEAddonInterface.DeleteCalls()) -func (mock *RKEAddonInterfaceMock) DeleteCalls() []struct { +// len(mockedRkeAddonInterface.DeleteCalls()) +func (mock *RkeAddonInterfaceMock) DeleteCalls() []struct { Name string Options *v1.DeleteOptions } { @@ -1468,16 +1376,16 @@ func (mock *RKEAddonInterfaceMock) DeleteCalls() []struct { Name string Options *v1.DeleteOptions } - lockRKEAddonInterfaceMockDelete.RLock() + lockRkeAddonInterfaceMockDelete.RLock() calls = mock.calls.Delete - lockRKEAddonInterfaceMockDelete.RUnlock() + lockRkeAddonInterfaceMockDelete.RUnlock() return calls } // DeleteCollection calls DeleteCollectionFunc. -func (mock *RKEAddonInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +func (mock *RkeAddonInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { if mock.DeleteCollectionFunc == nil { - panic("RKEAddonInterfaceMock.DeleteCollectionFunc: method is nil but RKEAddonInterface.DeleteCollection was just called") + panic("RkeAddonInterfaceMock.DeleteCollectionFunc: method is nil but RkeAddonInterface.DeleteCollection was just called") } callInfo := struct { DeleteOpts *v1.DeleteOptions @@ -1486,16 +1394,16 @@ func (mock *RKEAddonInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions DeleteOpts: deleteOpts, ListOpts: listOpts, } - lockRKEAddonInterfaceMockDeleteCollection.Lock() + lockRkeAddonInterfaceMockDeleteCollection.Lock() mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) - lockRKEAddonInterfaceMockDeleteCollection.Unlock() + lockRkeAddonInterfaceMockDeleteCollection.Unlock() return mock.DeleteCollectionFunc(deleteOpts, listOpts) } // DeleteCollectionCalls gets all the calls that were made to DeleteCollection. // Check the length with: -// len(mockedRKEAddonInterface.DeleteCollectionCalls()) -func (mock *RKEAddonInterfaceMock) DeleteCollectionCalls() []struct { +// len(mockedRkeAddonInterface.DeleteCollectionCalls()) +func (mock *RkeAddonInterfaceMock) DeleteCollectionCalls() []struct { DeleteOpts *v1.DeleteOptions ListOpts v1.ListOptions } { @@ -1503,16 +1411,16 @@ func (mock *RKEAddonInterfaceMock) DeleteCollectionCalls() []struct { DeleteOpts *v1.DeleteOptions ListOpts v1.ListOptions } - lockRKEAddonInterfaceMockDeleteCollection.RLock() + lockRkeAddonInterfaceMockDeleteCollection.RLock() calls = mock.calls.DeleteCollection - lockRKEAddonInterfaceMockDeleteCollection.RUnlock() + lockRkeAddonInterfaceMockDeleteCollection.RUnlock() return calls } // DeleteNamespaced calls DeleteNamespacedFunc. -func (mock *RKEAddonInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { +func (mock *RkeAddonInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { if mock.DeleteNamespacedFunc == nil { - panic("RKEAddonInterfaceMock.DeleteNamespacedFunc: method is nil but RKEAddonInterface.DeleteNamespaced was just called") + panic("RkeAddonInterfaceMock.DeleteNamespacedFunc: method is nil but RkeAddonInterface.DeleteNamespaced was just called") } callInfo := struct { Namespace string @@ -1523,16 +1431,16 @@ func (mock *RKEAddonInterfaceMock) DeleteNamespaced(namespace string, name strin Name: name, Options: options, } - lockRKEAddonInterfaceMockDeleteNamespaced.Lock() + lockRkeAddonInterfaceMockDeleteNamespaced.Lock() mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) - lockRKEAddonInterfaceMockDeleteNamespaced.Unlock() + lockRkeAddonInterfaceMockDeleteNamespaced.Unlock() return mock.DeleteNamespacedFunc(namespace, name, options) } // DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. // Check the length with: -// len(mockedRKEAddonInterface.DeleteNamespacedCalls()) -func (mock *RKEAddonInterfaceMock) DeleteNamespacedCalls() []struct { +// len(mockedRkeAddonInterface.DeleteNamespacedCalls()) +func (mock *RkeAddonInterfaceMock) DeleteNamespacedCalls() []struct { Namespace string Name string Options *v1.DeleteOptions @@ -1542,16 +1450,16 @@ func (mock *RKEAddonInterfaceMock) DeleteNamespacedCalls() []struct { Name string Options *v1.DeleteOptions } - lockRKEAddonInterfaceMockDeleteNamespaced.RLock() + lockRkeAddonInterfaceMockDeleteNamespaced.RLock() calls = mock.calls.DeleteNamespaced - lockRKEAddonInterfaceMockDeleteNamespaced.RUnlock() + lockRkeAddonInterfaceMockDeleteNamespaced.RUnlock() return calls } // Get calls GetFunc. -func (mock *RKEAddonInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.RKEAddon, error) { +func (mock *RkeAddonInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.RkeAddon, error) { if mock.GetFunc == nil { - panic("RKEAddonInterfaceMock.GetFunc: method is nil but RKEAddonInterface.Get was just called") + panic("RkeAddonInterfaceMock.GetFunc: method is nil but RkeAddonInterface.Get was just called") } callInfo := struct { Name string @@ -1560,16 +1468,16 @@ func (mock *RKEAddonInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.RKE Name: name, Opts: opts, } - lockRKEAddonInterfaceMockGet.Lock() + lockRkeAddonInterfaceMockGet.Lock() mock.calls.Get = append(mock.calls.Get, callInfo) - lockRKEAddonInterfaceMockGet.Unlock() + lockRkeAddonInterfaceMockGet.Unlock() return mock.GetFunc(name, opts) } // GetCalls gets all the calls that were made to Get. // Check the length with: -// len(mockedRKEAddonInterface.GetCalls()) -func (mock *RKEAddonInterfaceMock) GetCalls() []struct { +// len(mockedRkeAddonInterface.GetCalls()) +func (mock *RkeAddonInterfaceMock) GetCalls() []struct { Name string Opts v1.GetOptions } { @@ -1577,16 +1485,16 @@ func (mock *RKEAddonInterfaceMock) GetCalls() []struct { Name string Opts v1.GetOptions } - lockRKEAddonInterfaceMockGet.RLock() + lockRkeAddonInterfaceMockGet.RLock() calls = mock.calls.Get - lockRKEAddonInterfaceMockGet.RUnlock() + lockRkeAddonInterfaceMockGet.RUnlock() return calls } // GetNamespaced calls GetNamespacedFunc. -func (mock *RKEAddonInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.RKEAddon, error) { +func (mock *RkeAddonInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.RkeAddon, error) { if mock.GetNamespacedFunc == nil { - panic("RKEAddonInterfaceMock.GetNamespacedFunc: method is nil but RKEAddonInterface.GetNamespaced was just called") + panic("RkeAddonInterfaceMock.GetNamespacedFunc: method is nil but RkeAddonInterface.GetNamespaced was just called") } callInfo := struct { Namespace string @@ -1597,16 +1505,16 @@ func (mock *RKEAddonInterfaceMock) GetNamespaced(namespace string, name string, Name: name, Opts: opts, } - lockRKEAddonInterfaceMockGetNamespaced.Lock() + lockRkeAddonInterfaceMockGetNamespaced.Lock() mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) - lockRKEAddonInterfaceMockGetNamespaced.Unlock() + lockRkeAddonInterfaceMockGetNamespaced.Unlock() return mock.GetNamespacedFunc(namespace, name, opts) } // GetNamespacedCalls gets all the calls that were made to GetNamespaced. // Check the length with: -// len(mockedRKEAddonInterface.GetNamespacedCalls()) -func (mock *RKEAddonInterfaceMock) GetNamespacedCalls() []struct { +// len(mockedRkeAddonInterface.GetNamespacedCalls()) +func (mock *RkeAddonInterfaceMock) GetNamespacedCalls() []struct { Namespace string Name string Opts v1.GetOptions @@ -1616,47 +1524,47 @@ func (mock *RKEAddonInterfaceMock) GetNamespacedCalls() []struct { Name string Opts v1.GetOptions } - lockRKEAddonInterfaceMockGetNamespaced.RLock() + lockRkeAddonInterfaceMockGetNamespaced.RLock() calls = mock.calls.GetNamespaced - lockRKEAddonInterfaceMockGetNamespaced.RUnlock() + lockRkeAddonInterfaceMockGetNamespaced.RUnlock() return calls } // List calls ListFunc. -func (mock *RKEAddonInterfaceMock) List(opts v1.ListOptions) (*v3.RKEAddonList, error) { +func (mock *RkeAddonInterfaceMock) List(opts v1.ListOptions) (*v3.RkeAddonList, error) { if mock.ListFunc == nil { - panic("RKEAddonInterfaceMock.ListFunc: method is nil but RKEAddonInterface.List was just called") + panic("RkeAddonInterfaceMock.ListFunc: method is nil but RkeAddonInterface.List was just called") } callInfo := struct { Opts v1.ListOptions }{ Opts: opts, } - lockRKEAddonInterfaceMockList.Lock() + lockRkeAddonInterfaceMockList.Lock() mock.calls.List = append(mock.calls.List, callInfo) - lockRKEAddonInterfaceMockList.Unlock() + lockRkeAddonInterfaceMockList.Unlock() return mock.ListFunc(opts) } // ListCalls gets all the calls that were made to List. // Check the length with: -// len(mockedRKEAddonInterface.ListCalls()) -func (mock *RKEAddonInterfaceMock) ListCalls() []struct { +// len(mockedRkeAddonInterface.ListCalls()) +func (mock *RkeAddonInterfaceMock) ListCalls() []struct { Opts v1.ListOptions } { var calls []struct { Opts v1.ListOptions } - lockRKEAddonInterfaceMockList.RLock() + lockRkeAddonInterfaceMockList.RLock() calls = mock.calls.List - lockRKEAddonInterfaceMockList.RUnlock() + lockRkeAddonInterfaceMockList.RUnlock() return calls } // ListNamespaced calls ListNamespacedFunc. -func (mock *RKEAddonInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v3.RKEAddonList, error) { +func (mock *RkeAddonInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v3.RkeAddonList, error) { if mock.ListNamespacedFunc == nil { - panic("RKEAddonInterfaceMock.ListNamespacedFunc: method is nil but RKEAddonInterface.ListNamespaced was just called") + panic("RkeAddonInterfaceMock.ListNamespacedFunc: method is nil but RkeAddonInterface.ListNamespaced was just called") } callInfo := struct { Namespace string @@ -1665,16 +1573,16 @@ func (mock *RKEAddonInterfaceMock) ListNamespaced(namespace string, opts v1.List Namespace: namespace, Opts: opts, } - lockRKEAddonInterfaceMockListNamespaced.Lock() + lockRkeAddonInterfaceMockListNamespaced.Lock() mock.calls.ListNamespaced = append(mock.calls.ListNamespaced, callInfo) - lockRKEAddonInterfaceMockListNamespaced.Unlock() + lockRkeAddonInterfaceMockListNamespaced.Unlock() return mock.ListNamespacedFunc(namespace, opts) } // ListNamespacedCalls gets all the calls that were made to ListNamespaced. // Check the length with: -// len(mockedRKEAddonInterface.ListNamespacedCalls()) -func (mock *RKEAddonInterfaceMock) ListNamespacedCalls() []struct { +// len(mockedRkeAddonInterface.ListNamespacedCalls()) +func (mock *RkeAddonInterfaceMock) ListNamespacedCalls() []struct { Namespace string Opts v1.ListOptions } { @@ -1682,164 +1590,164 @@ func (mock *RKEAddonInterfaceMock) ListNamespacedCalls() []struct { Namespace string Opts v1.ListOptions } - lockRKEAddonInterfaceMockListNamespaced.RLock() + lockRkeAddonInterfaceMockListNamespaced.RLock() calls = mock.calls.ListNamespaced - lockRKEAddonInterfaceMockListNamespaced.RUnlock() + lockRkeAddonInterfaceMockListNamespaced.RUnlock() return calls } // ObjectClient calls ObjectClientFunc. -func (mock *RKEAddonInterfaceMock) ObjectClient() *objectclient.ObjectClient { +func (mock *RkeAddonInterfaceMock) ObjectClient() *objectclient.ObjectClient { if mock.ObjectClientFunc == nil { - panic("RKEAddonInterfaceMock.ObjectClientFunc: method is nil but RKEAddonInterface.ObjectClient was just called") + panic("RkeAddonInterfaceMock.ObjectClientFunc: method is nil but RkeAddonInterface.ObjectClient was just called") } callInfo := struct { }{} - lockRKEAddonInterfaceMockObjectClient.Lock() + lockRkeAddonInterfaceMockObjectClient.Lock() mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) - lockRKEAddonInterfaceMockObjectClient.Unlock() + lockRkeAddonInterfaceMockObjectClient.Unlock() return mock.ObjectClientFunc() } // ObjectClientCalls gets all the calls that were made to ObjectClient. // Check the length with: -// len(mockedRKEAddonInterface.ObjectClientCalls()) -func (mock *RKEAddonInterfaceMock) ObjectClientCalls() []struct { +// len(mockedRkeAddonInterface.ObjectClientCalls()) +func (mock *RkeAddonInterfaceMock) ObjectClientCalls() []struct { } { var calls []struct { } - lockRKEAddonInterfaceMockObjectClient.RLock() + lockRkeAddonInterfaceMockObjectClient.RLock() calls = mock.calls.ObjectClient - lockRKEAddonInterfaceMockObjectClient.RUnlock() + lockRkeAddonInterfaceMockObjectClient.RUnlock() return calls } // Update calls UpdateFunc. -func (mock *RKEAddonInterfaceMock) Update(in1 *v3.RKEAddon) (*v3.RKEAddon, error) { +func (mock *RkeAddonInterfaceMock) Update(in1 *v3.RkeAddon) (*v3.RkeAddon, error) { if mock.UpdateFunc == nil { - panic("RKEAddonInterfaceMock.UpdateFunc: method is nil but RKEAddonInterface.Update was just called") + panic("RkeAddonInterfaceMock.UpdateFunc: method is nil but RkeAddonInterface.Update was just called") } callInfo := struct { - In1 *v3.RKEAddon + In1 *v3.RkeAddon }{ In1: in1, } - lockRKEAddonInterfaceMockUpdate.Lock() + lockRkeAddonInterfaceMockUpdate.Lock() mock.calls.Update = append(mock.calls.Update, callInfo) - lockRKEAddonInterfaceMockUpdate.Unlock() + lockRkeAddonInterfaceMockUpdate.Unlock() return mock.UpdateFunc(in1) } // UpdateCalls gets all the calls that were made to Update. // Check the length with: -// len(mockedRKEAddonInterface.UpdateCalls()) -func (mock *RKEAddonInterfaceMock) UpdateCalls() []struct { - In1 *v3.RKEAddon +// len(mockedRkeAddonInterface.UpdateCalls()) +func (mock *RkeAddonInterfaceMock) UpdateCalls() []struct { + In1 *v3.RkeAddon } { var calls []struct { - In1 *v3.RKEAddon + In1 *v3.RkeAddon } - lockRKEAddonInterfaceMockUpdate.RLock() + lockRkeAddonInterfaceMockUpdate.RLock() calls = mock.calls.Update - lockRKEAddonInterfaceMockUpdate.RUnlock() + lockRkeAddonInterfaceMockUpdate.RUnlock() return calls } // Watch calls WatchFunc. -func (mock *RKEAddonInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (mock *RkeAddonInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { if mock.WatchFunc == nil { - panic("RKEAddonInterfaceMock.WatchFunc: method is nil but RKEAddonInterface.Watch was just called") + panic("RkeAddonInterfaceMock.WatchFunc: method is nil but RkeAddonInterface.Watch was just called") } callInfo := struct { Opts v1.ListOptions }{ Opts: opts, } - lockRKEAddonInterfaceMockWatch.Lock() + lockRkeAddonInterfaceMockWatch.Lock() mock.calls.Watch = append(mock.calls.Watch, callInfo) - lockRKEAddonInterfaceMockWatch.Unlock() + lockRkeAddonInterfaceMockWatch.Unlock() return mock.WatchFunc(opts) } // WatchCalls gets all the calls that were made to Watch. // Check the length with: -// len(mockedRKEAddonInterface.WatchCalls()) -func (mock *RKEAddonInterfaceMock) WatchCalls() []struct { +// len(mockedRkeAddonInterface.WatchCalls()) +func (mock *RkeAddonInterfaceMock) WatchCalls() []struct { Opts v1.ListOptions } { var calls []struct { Opts v1.ListOptions } - lockRKEAddonInterfaceMockWatch.RLock() + lockRkeAddonInterfaceMockWatch.RLock() calls = mock.calls.Watch - lockRKEAddonInterfaceMockWatch.RUnlock() + lockRkeAddonInterfaceMockWatch.RUnlock() return calls } var ( - lockRKEAddonsGetterMockRKEAddons sync.RWMutex + lockRkeAddonsGetterMockRkeAddons sync.RWMutex ) -// Ensure, that RKEAddonsGetterMock does implement RKEAddonsGetter. +// Ensure, that RkeAddonsGetterMock does implement RkeAddonsGetter. // If this is not the case, regenerate this file with moq. -var _ v3.RKEAddonsGetter = &RKEAddonsGetterMock{} +var _ v3.RkeAddonsGetter = &RkeAddonsGetterMock{} -// RKEAddonsGetterMock is a mock implementation of RKEAddonsGetter. +// RkeAddonsGetterMock is a mock implementation of RkeAddonsGetter. // -// func TestSomethingThatUsesRKEAddonsGetter(t *testing.T) { +// func TestSomethingThatUsesRkeAddonsGetter(t *testing.T) { // -// // make and configure a mocked RKEAddonsGetter -// mockedRKEAddonsGetter := &RKEAddonsGetterMock{ -// RKEAddonsFunc: func(namespace string) v3.RKEAddonInterface { -// panic("mock out the RKEAddons method") +// // make and configure a mocked RkeAddonsGetter +// mockedRkeAddonsGetter := &RkeAddonsGetterMock{ +// RkeAddonsFunc: func(namespace string) v3.RkeAddonInterface { +// panic("mock out the RkeAddons method") // }, // } // -// // use mockedRKEAddonsGetter in code that requires RKEAddonsGetter +// // use mockedRkeAddonsGetter in code that requires RkeAddonsGetter // // and then make assertions. // // } -type RKEAddonsGetterMock struct { - // RKEAddonsFunc mocks the RKEAddons method. - RKEAddonsFunc func(namespace string) v3.RKEAddonInterface +type RkeAddonsGetterMock struct { + // RkeAddonsFunc mocks the RkeAddons method. + RkeAddonsFunc func(namespace string) v3.RkeAddonInterface // calls tracks calls to the methods. calls struct { - // RKEAddons holds details about calls to the RKEAddons method. - RKEAddons []struct { + // RkeAddons holds details about calls to the RkeAddons method. + RkeAddons []struct { // Namespace is the namespace argument value. Namespace string } } } -// RKEAddons calls RKEAddonsFunc. -func (mock *RKEAddonsGetterMock) RKEAddons(namespace string) v3.RKEAddonInterface { - if mock.RKEAddonsFunc == nil { - panic("RKEAddonsGetterMock.RKEAddonsFunc: method is nil but RKEAddonsGetter.RKEAddons was just called") +// RkeAddons calls RkeAddonsFunc. +func (mock *RkeAddonsGetterMock) RkeAddons(namespace string) v3.RkeAddonInterface { + if mock.RkeAddonsFunc == nil { + panic("RkeAddonsGetterMock.RkeAddonsFunc: method is nil but RkeAddonsGetter.RkeAddons was just called") } callInfo := struct { Namespace string }{ Namespace: namespace, } - lockRKEAddonsGetterMockRKEAddons.Lock() - mock.calls.RKEAddons = append(mock.calls.RKEAddons, callInfo) - lockRKEAddonsGetterMockRKEAddons.Unlock() - return mock.RKEAddonsFunc(namespace) + lockRkeAddonsGetterMockRkeAddons.Lock() + mock.calls.RkeAddons = append(mock.calls.RkeAddons, callInfo) + lockRkeAddonsGetterMockRkeAddons.Unlock() + return mock.RkeAddonsFunc(namespace) } -// RKEAddonsCalls gets all the calls that were made to RKEAddons. +// RkeAddonsCalls gets all the calls that were made to RkeAddons. // Check the length with: -// len(mockedRKEAddonsGetter.RKEAddonsCalls()) -func (mock *RKEAddonsGetterMock) RKEAddonsCalls() []struct { +// len(mockedRkeAddonsGetter.RkeAddonsCalls()) +func (mock *RkeAddonsGetterMock) RkeAddonsCalls() []struct { Namespace string } { var calls []struct { Namespace string } - lockRKEAddonsGetterMockRKEAddons.RLock() - calls = mock.calls.RKEAddons - lockRKEAddonsGetterMockRKEAddons.RUnlock() + lockRkeAddonsGetterMockRkeAddons.RLock() + calls = mock.calls.RkeAddons + lockRkeAddonsGetterMockRkeAddons.RUnlock() return calls } diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_service_option_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_service_option_mock.go index 60d0536b..c2d03ef2 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_service_option_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_service_option_mock.go @@ -18,38 +18,38 @@ import ( ) var ( - lockRKEK8sServiceOptionListerMockGet sync.RWMutex - lockRKEK8sServiceOptionListerMockList sync.RWMutex + lockRkeK8sServiceOptionListerMockGet sync.RWMutex + lockRkeK8sServiceOptionListerMockList sync.RWMutex ) -// Ensure, that RKEK8sServiceOptionListerMock does implement RKEK8sServiceOptionLister. +// Ensure, that RkeK8sServiceOptionListerMock does implement RkeK8sServiceOptionLister. // If this is not the case, regenerate this file with moq. -var _ v3.RKEK8sServiceOptionLister = &RKEK8sServiceOptionListerMock{} +var _ v3.RkeK8sServiceOptionLister = &RkeK8sServiceOptionListerMock{} -// RKEK8sServiceOptionListerMock is a mock implementation of RKEK8sServiceOptionLister. +// RkeK8sServiceOptionListerMock is a mock implementation of RkeK8sServiceOptionLister. // -// func TestSomethingThatUsesRKEK8sServiceOptionLister(t *testing.T) { +// func TestSomethingThatUsesRkeK8sServiceOptionLister(t *testing.T) { // -// // make and configure a mocked RKEK8sServiceOptionLister -// mockedRKEK8sServiceOptionLister := &RKEK8sServiceOptionListerMock{ -// GetFunc: func(namespace string, name string) (*v3.RKEK8sServiceOption, error) { +// // make and configure a mocked RkeK8sServiceOptionLister +// mockedRkeK8sServiceOptionLister := &RkeK8sServiceOptionListerMock{ +// GetFunc: func(namespace string, name string) (*v3.RkeK8sServiceOption, error) { // panic("mock out the Get method") // }, -// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.RKEK8sServiceOption, error) { +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.RkeK8sServiceOption, error) { // panic("mock out the List method") // }, // } // -// // use mockedRKEK8sServiceOptionLister in code that requires RKEK8sServiceOptionLister +// // use mockedRkeK8sServiceOptionLister in code that requires RkeK8sServiceOptionLister // // and then make assertions. // // } -type RKEK8sServiceOptionListerMock struct { +type RkeK8sServiceOptionListerMock struct { // GetFunc mocks the Get method. - GetFunc func(namespace string, name string) (*v3.RKEK8sServiceOption, error) + GetFunc func(namespace string, name string) (*v3.RkeK8sServiceOption, error) // ListFunc mocks the List method. - ListFunc func(namespace string, selector labels.Selector) ([]*v3.RKEK8sServiceOption, error) + ListFunc func(namespace string, selector labels.Selector) ([]*v3.RkeK8sServiceOption, error) // calls tracks calls to the methods. calls struct { @@ -71,9 +71,9 @@ type RKEK8sServiceOptionListerMock struct { } // Get calls GetFunc. -func (mock *RKEK8sServiceOptionListerMock) Get(namespace string, name string) (*v3.RKEK8sServiceOption, error) { +func (mock *RkeK8sServiceOptionListerMock) Get(namespace string, name string) (*v3.RkeK8sServiceOption, error) { if mock.GetFunc == nil { - panic("RKEK8sServiceOptionListerMock.GetFunc: method is nil but RKEK8sServiceOptionLister.Get was just called") + panic("RkeK8sServiceOptionListerMock.GetFunc: method is nil but RkeK8sServiceOptionLister.Get was just called") } callInfo := struct { Namespace string @@ -82,16 +82,16 @@ func (mock *RKEK8sServiceOptionListerMock) Get(namespace string, name string) (* Namespace: namespace, Name: name, } - lockRKEK8sServiceOptionListerMockGet.Lock() + lockRkeK8sServiceOptionListerMockGet.Lock() mock.calls.Get = append(mock.calls.Get, callInfo) - lockRKEK8sServiceOptionListerMockGet.Unlock() + lockRkeK8sServiceOptionListerMockGet.Unlock() return mock.GetFunc(namespace, name) } // GetCalls gets all the calls that were made to Get. // Check the length with: -// len(mockedRKEK8sServiceOptionLister.GetCalls()) -func (mock *RKEK8sServiceOptionListerMock) GetCalls() []struct { +// len(mockedRkeK8sServiceOptionLister.GetCalls()) +func (mock *RkeK8sServiceOptionListerMock) GetCalls() []struct { Namespace string Name string } { @@ -99,16 +99,16 @@ func (mock *RKEK8sServiceOptionListerMock) GetCalls() []struct { Namespace string Name string } - lockRKEK8sServiceOptionListerMockGet.RLock() + lockRkeK8sServiceOptionListerMockGet.RLock() calls = mock.calls.Get - lockRKEK8sServiceOptionListerMockGet.RUnlock() + lockRkeK8sServiceOptionListerMockGet.RUnlock() return calls } // List calls ListFunc. -func (mock *RKEK8sServiceOptionListerMock) List(namespace string, selector labels.Selector) ([]*v3.RKEK8sServiceOption, error) { +func (mock *RkeK8sServiceOptionListerMock) List(namespace string, selector labels.Selector) ([]*v3.RkeK8sServiceOption, error) { if mock.ListFunc == nil { - panic("RKEK8sServiceOptionListerMock.ListFunc: method is nil but RKEK8sServiceOptionLister.List was just called") + panic("RkeK8sServiceOptionListerMock.ListFunc: method is nil but RkeK8sServiceOptionLister.List was just called") } callInfo := struct { Namespace string @@ -117,16 +117,16 @@ func (mock *RKEK8sServiceOptionListerMock) List(namespace string, selector label Namespace: namespace, Selector: selector, } - lockRKEK8sServiceOptionListerMockList.Lock() + lockRkeK8sServiceOptionListerMockList.Lock() mock.calls.List = append(mock.calls.List, callInfo) - lockRKEK8sServiceOptionListerMockList.Unlock() + lockRkeK8sServiceOptionListerMockList.Unlock() return mock.ListFunc(namespace, selector) } // ListCalls gets all the calls that were made to List. // Check the length with: -// len(mockedRKEK8sServiceOptionLister.ListCalls()) -func (mock *RKEK8sServiceOptionListerMock) ListCalls() []struct { +// len(mockedRkeK8sServiceOptionLister.ListCalls()) +func (mock *RkeK8sServiceOptionListerMock) ListCalls() []struct { Namespace string Selector labels.Selector } { @@ -134,46 +134,44 @@ func (mock *RKEK8sServiceOptionListerMock) ListCalls() []struct { Namespace string Selector labels.Selector } - lockRKEK8sServiceOptionListerMockList.RLock() + lockRkeK8sServiceOptionListerMockList.RLock() calls = mock.calls.List - lockRKEK8sServiceOptionListerMockList.RUnlock() + lockRkeK8sServiceOptionListerMockList.RUnlock() return calls } var ( - lockRKEK8sServiceOptionControllerMockAddClusterScopedFeatureHandler sync.RWMutex - lockRKEK8sServiceOptionControllerMockAddClusterScopedHandler sync.RWMutex - lockRKEK8sServiceOptionControllerMockAddFeatureHandler sync.RWMutex - lockRKEK8sServiceOptionControllerMockAddHandler sync.RWMutex - lockRKEK8sServiceOptionControllerMockEnqueue sync.RWMutex - lockRKEK8sServiceOptionControllerMockEnqueueAfter sync.RWMutex - lockRKEK8sServiceOptionControllerMockGeneric sync.RWMutex - lockRKEK8sServiceOptionControllerMockInformer sync.RWMutex - lockRKEK8sServiceOptionControllerMockLister sync.RWMutex - lockRKEK8sServiceOptionControllerMockStart sync.RWMutex - lockRKEK8sServiceOptionControllerMockSync sync.RWMutex + lockRkeK8sServiceOptionControllerMockAddClusterScopedFeatureHandler sync.RWMutex + lockRkeK8sServiceOptionControllerMockAddClusterScopedHandler sync.RWMutex + lockRkeK8sServiceOptionControllerMockAddFeatureHandler sync.RWMutex + lockRkeK8sServiceOptionControllerMockAddHandler sync.RWMutex + lockRkeK8sServiceOptionControllerMockEnqueue sync.RWMutex + lockRkeK8sServiceOptionControllerMockEnqueueAfter sync.RWMutex + lockRkeK8sServiceOptionControllerMockGeneric sync.RWMutex + lockRkeK8sServiceOptionControllerMockInformer sync.RWMutex + lockRkeK8sServiceOptionControllerMockLister sync.RWMutex ) -// Ensure, that RKEK8sServiceOptionControllerMock does implement RKEK8sServiceOptionController. +// Ensure, that RkeK8sServiceOptionControllerMock does implement RkeK8sServiceOptionController. // If this is not the case, regenerate this file with moq. -var _ v3.RKEK8sServiceOptionController = &RKEK8sServiceOptionControllerMock{} +var _ v3.RkeK8sServiceOptionController = &RkeK8sServiceOptionControllerMock{} -// RKEK8sServiceOptionControllerMock is a mock implementation of RKEK8sServiceOptionController. +// RkeK8sServiceOptionControllerMock is a mock implementation of RkeK8sServiceOptionController. // -// func TestSomethingThatUsesRKEK8sServiceOptionController(t *testing.T) { +// func TestSomethingThatUsesRkeK8sServiceOptionController(t *testing.T) { // -// // make and configure a mocked RKEK8sServiceOptionController -// mockedRKEK8sServiceOptionController := &RKEK8sServiceOptionControllerMock{ -// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEK8sServiceOptionHandlerFunc) { +// // make and configure a mocked RkeK8sServiceOptionController +// mockedRkeK8sServiceOptionController := &RkeK8sServiceOptionControllerMock{ +// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RkeK8sServiceOptionHandlerFunc) { // panic("mock out the AddClusterScopedFeatureHandler method") // }, -// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.RKEK8sServiceOptionHandlerFunc) { +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.RkeK8sServiceOptionHandlerFunc) { // panic("mock out the AddClusterScopedHandler method") // }, -// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sServiceOptionHandlerFunc) { +// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RkeK8sServiceOptionHandlerFunc) { // panic("mock out the AddFeatureHandler method") // }, -// AddHandlerFunc: func(ctx context.Context, name string, handler v3.RKEK8sServiceOptionHandlerFunc) { +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.RkeK8sServiceOptionHandlerFunc) { // panic("mock out the AddHandler method") // }, // EnqueueFunc: func(namespace string, name string) { @@ -188,33 +186,27 @@ var _ v3.RKEK8sServiceOptionController = &RKEK8sServiceOptionControllerMock{} // InformerFunc: func() cache.SharedIndexInformer { // panic("mock out the Informer method") // }, -// ListerFunc: func() v3.RKEK8sServiceOptionLister { +// ListerFunc: func() v3.RkeK8sServiceOptionLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // -// // use mockedRKEK8sServiceOptionController in code that requires RKEK8sServiceOptionController +// // use mockedRkeK8sServiceOptionController in code that requires RkeK8sServiceOptionController // // and then make assertions. // // } -type RKEK8sServiceOptionControllerMock struct { +type RkeK8sServiceOptionControllerMock struct { // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. - AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEK8sServiceOptionHandlerFunc) + AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RkeK8sServiceOptionHandlerFunc) // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. - AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.RKEK8sServiceOptionHandlerFunc) + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.RkeK8sServiceOptionHandlerFunc) // AddFeatureHandlerFunc mocks the AddFeatureHandler method. - AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sServiceOptionHandlerFunc) + AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RkeK8sServiceOptionHandlerFunc) // AddHandlerFunc mocks the AddHandler method. - AddHandlerFunc func(ctx context.Context, name string, handler v3.RKEK8sServiceOptionHandlerFunc) + AddHandlerFunc func(ctx context.Context, name string, handler v3.RkeK8sServiceOptionHandlerFunc) // EnqueueFunc mocks the Enqueue method. EnqueueFunc func(namespace string, name string) @@ -229,13 +221,7 @@ type RKEK8sServiceOptionControllerMock struct { InformerFunc func() cache.SharedIndexInformer // ListerFunc mocks the Lister method. - ListerFunc func() v3.RKEK8sServiceOptionLister - - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error + ListerFunc func() v3.RkeK8sServiceOptionLister // calls tracks calls to the methods. calls struct { @@ -250,7 +236,7 @@ type RKEK8sServiceOptionControllerMock struct { // ClusterName is the clusterName argument value. ClusterName string // Handler is the handler argument value. - Handler v3.RKEK8sServiceOptionHandlerFunc + Handler v3.RkeK8sServiceOptionHandlerFunc } // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. AddClusterScopedHandler []struct { @@ -261,7 +247,7 @@ type RKEK8sServiceOptionControllerMock struct { // ClusterName is the clusterName argument value. ClusterName string // Handler is the handler argument value. - Handler v3.RKEK8sServiceOptionHandlerFunc + Handler v3.RkeK8sServiceOptionHandlerFunc } // AddFeatureHandler holds details about calls to the AddFeatureHandler method. AddFeatureHandler []struct { @@ -272,7 +258,7 @@ type RKEK8sServiceOptionControllerMock struct { // Name is the name argument value. Name string // Sync is the sync argument value. - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } // AddHandler holds details about calls to the AddHandler method. AddHandler []struct { @@ -281,7 +267,7 @@ type RKEK8sServiceOptionControllerMock struct { // Name is the name argument value. Name string // Handler is the handler argument value. - Handler v3.RKEK8sServiceOptionHandlerFunc + Handler v3.RkeK8sServiceOptionHandlerFunc } // Enqueue holds details about calls to the Enqueue method. Enqueue []struct { @@ -308,32 +294,20 @@ type RKEK8sServiceOptionControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } // AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc. -func (mock *RKEK8sServiceOptionControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEK8sServiceOptionHandlerFunc) { +func (mock *RkeK8sServiceOptionControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RkeK8sServiceOptionHandlerFunc) { if mock.AddClusterScopedFeatureHandlerFunc == nil { - panic("RKEK8sServiceOptionControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but RKEK8sServiceOptionController.AddClusterScopedFeatureHandler was just called") + panic("RkeK8sServiceOptionControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but RkeK8sServiceOptionController.AddClusterScopedFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Handler v3.RKEK8sServiceOptionHandlerFunc + Handler v3.RkeK8sServiceOptionHandlerFunc }{ Ctx: ctx, Enabled: enabled, @@ -341,164 +315,164 @@ func (mock *RKEK8sServiceOptionControllerMock) AddClusterScopedFeatureHandler(ct ClusterName: clusterName, Handler: handler, } - lockRKEK8sServiceOptionControllerMockAddClusterScopedFeatureHandler.Lock() + lockRkeK8sServiceOptionControllerMockAddClusterScopedFeatureHandler.Lock() mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) - lockRKEK8sServiceOptionControllerMockAddClusterScopedFeatureHandler.Unlock() + lockRkeK8sServiceOptionControllerMockAddClusterScopedFeatureHandler.Unlock() mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, handler) } // AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. // Check the length with: -// len(mockedRKEK8sServiceOptionController.AddClusterScopedFeatureHandlerCalls()) -func (mock *RKEK8sServiceOptionControllerMock) AddClusterScopedFeatureHandlerCalls() []struct { +// len(mockedRkeK8sServiceOptionController.AddClusterScopedFeatureHandlerCalls()) +func (mock *RkeK8sServiceOptionControllerMock) AddClusterScopedFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Handler v3.RKEK8sServiceOptionHandlerFunc + Handler v3.RkeK8sServiceOptionHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Handler v3.RKEK8sServiceOptionHandlerFunc + Handler v3.RkeK8sServiceOptionHandlerFunc } - lockRKEK8sServiceOptionControllerMockAddClusterScopedFeatureHandler.RLock() + lockRkeK8sServiceOptionControllerMockAddClusterScopedFeatureHandler.RLock() calls = mock.calls.AddClusterScopedFeatureHandler - lockRKEK8sServiceOptionControllerMockAddClusterScopedFeatureHandler.RUnlock() + lockRkeK8sServiceOptionControllerMockAddClusterScopedFeatureHandler.RUnlock() return calls } // AddClusterScopedHandler calls AddClusterScopedHandlerFunc. -func (mock *RKEK8sServiceOptionControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.RKEK8sServiceOptionHandlerFunc) { +func (mock *RkeK8sServiceOptionControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.RkeK8sServiceOptionHandlerFunc) { if mock.AddClusterScopedHandlerFunc == nil { - panic("RKEK8sServiceOptionControllerMock.AddClusterScopedHandlerFunc: method is nil but RKEK8sServiceOptionController.AddClusterScopedHandler was just called") + panic("RkeK8sServiceOptionControllerMock.AddClusterScopedHandlerFunc: method is nil but RkeK8sServiceOptionController.AddClusterScopedHandler was just called") } callInfo := struct { Ctx context.Context Name string ClusterName string - Handler v3.RKEK8sServiceOptionHandlerFunc + Handler v3.RkeK8sServiceOptionHandlerFunc }{ Ctx: ctx, Name: name, ClusterName: clusterName, Handler: handler, } - lockRKEK8sServiceOptionControllerMockAddClusterScopedHandler.Lock() + lockRkeK8sServiceOptionControllerMockAddClusterScopedHandler.Lock() mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) - lockRKEK8sServiceOptionControllerMockAddClusterScopedHandler.Unlock() + lockRkeK8sServiceOptionControllerMockAddClusterScopedHandler.Unlock() mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) } // AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. // Check the length with: -// len(mockedRKEK8sServiceOptionController.AddClusterScopedHandlerCalls()) -func (mock *RKEK8sServiceOptionControllerMock) AddClusterScopedHandlerCalls() []struct { +// len(mockedRkeK8sServiceOptionController.AddClusterScopedHandlerCalls()) +func (mock *RkeK8sServiceOptionControllerMock) AddClusterScopedHandlerCalls() []struct { Ctx context.Context Name string ClusterName string - Handler v3.RKEK8sServiceOptionHandlerFunc + Handler v3.RkeK8sServiceOptionHandlerFunc } { var calls []struct { Ctx context.Context Name string ClusterName string - Handler v3.RKEK8sServiceOptionHandlerFunc + Handler v3.RkeK8sServiceOptionHandlerFunc } - lockRKEK8sServiceOptionControllerMockAddClusterScopedHandler.RLock() + lockRkeK8sServiceOptionControllerMockAddClusterScopedHandler.RLock() calls = mock.calls.AddClusterScopedHandler - lockRKEK8sServiceOptionControllerMockAddClusterScopedHandler.RUnlock() + lockRkeK8sServiceOptionControllerMockAddClusterScopedHandler.RUnlock() return calls } // AddFeatureHandler calls AddFeatureHandlerFunc. -func (mock *RKEK8sServiceOptionControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sServiceOptionHandlerFunc) { +func (mock *RkeK8sServiceOptionControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RkeK8sServiceOptionHandlerFunc) { if mock.AddFeatureHandlerFunc == nil { - panic("RKEK8sServiceOptionControllerMock.AddFeatureHandlerFunc: method is nil but RKEK8sServiceOptionController.AddFeatureHandler was just called") + panic("RkeK8sServiceOptionControllerMock.AddFeatureHandlerFunc: method is nil but RkeK8sServiceOptionController.AddFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc }{ Ctx: ctx, Enabled: enabled, Name: name, Sync: sync, } - lockRKEK8sServiceOptionControllerMockAddFeatureHandler.Lock() + lockRkeK8sServiceOptionControllerMockAddFeatureHandler.Lock() mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) - lockRKEK8sServiceOptionControllerMockAddFeatureHandler.Unlock() + lockRkeK8sServiceOptionControllerMockAddFeatureHandler.Unlock() mock.AddFeatureHandlerFunc(ctx, enabled, name, sync) } // AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. // Check the length with: -// len(mockedRKEK8sServiceOptionController.AddFeatureHandlerCalls()) -func (mock *RKEK8sServiceOptionControllerMock) AddFeatureHandlerCalls() []struct { +// len(mockedRkeK8sServiceOptionController.AddFeatureHandlerCalls()) +func (mock *RkeK8sServiceOptionControllerMock) AddFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } - lockRKEK8sServiceOptionControllerMockAddFeatureHandler.RLock() + lockRkeK8sServiceOptionControllerMockAddFeatureHandler.RLock() calls = mock.calls.AddFeatureHandler - lockRKEK8sServiceOptionControllerMockAddFeatureHandler.RUnlock() + lockRkeK8sServiceOptionControllerMockAddFeatureHandler.RUnlock() return calls } // AddHandler calls AddHandlerFunc. -func (mock *RKEK8sServiceOptionControllerMock) AddHandler(ctx context.Context, name string, handler v3.RKEK8sServiceOptionHandlerFunc) { +func (mock *RkeK8sServiceOptionControllerMock) AddHandler(ctx context.Context, name string, handler v3.RkeK8sServiceOptionHandlerFunc) { if mock.AddHandlerFunc == nil { - panic("RKEK8sServiceOptionControllerMock.AddHandlerFunc: method is nil but RKEK8sServiceOptionController.AddHandler was just called") + panic("RkeK8sServiceOptionControllerMock.AddHandlerFunc: method is nil but RkeK8sServiceOptionController.AddHandler was just called") } callInfo := struct { Ctx context.Context Name string - Handler v3.RKEK8sServiceOptionHandlerFunc + Handler v3.RkeK8sServiceOptionHandlerFunc }{ Ctx: ctx, Name: name, Handler: handler, } - lockRKEK8sServiceOptionControllerMockAddHandler.Lock() + lockRkeK8sServiceOptionControllerMockAddHandler.Lock() mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) - lockRKEK8sServiceOptionControllerMockAddHandler.Unlock() + lockRkeK8sServiceOptionControllerMockAddHandler.Unlock() mock.AddHandlerFunc(ctx, name, handler) } // AddHandlerCalls gets all the calls that were made to AddHandler. // Check the length with: -// len(mockedRKEK8sServiceOptionController.AddHandlerCalls()) -func (mock *RKEK8sServiceOptionControllerMock) AddHandlerCalls() []struct { +// len(mockedRkeK8sServiceOptionController.AddHandlerCalls()) +func (mock *RkeK8sServiceOptionControllerMock) AddHandlerCalls() []struct { Ctx context.Context Name string - Handler v3.RKEK8sServiceOptionHandlerFunc + Handler v3.RkeK8sServiceOptionHandlerFunc } { var calls []struct { Ctx context.Context Name string - Handler v3.RKEK8sServiceOptionHandlerFunc + Handler v3.RkeK8sServiceOptionHandlerFunc } - lockRKEK8sServiceOptionControllerMockAddHandler.RLock() + lockRkeK8sServiceOptionControllerMockAddHandler.RLock() calls = mock.calls.AddHandler - lockRKEK8sServiceOptionControllerMockAddHandler.RUnlock() + lockRkeK8sServiceOptionControllerMockAddHandler.RUnlock() return calls } // Enqueue calls EnqueueFunc. -func (mock *RKEK8sServiceOptionControllerMock) Enqueue(namespace string, name string) { +func (mock *RkeK8sServiceOptionControllerMock) Enqueue(namespace string, name string) { if mock.EnqueueFunc == nil { - panic("RKEK8sServiceOptionControllerMock.EnqueueFunc: method is nil but RKEK8sServiceOptionController.Enqueue was just called") + panic("RkeK8sServiceOptionControllerMock.EnqueueFunc: method is nil but RkeK8sServiceOptionController.Enqueue was just called") } callInfo := struct { Namespace string @@ -507,16 +481,16 @@ func (mock *RKEK8sServiceOptionControllerMock) Enqueue(namespace string, name st Namespace: namespace, Name: name, } - lockRKEK8sServiceOptionControllerMockEnqueue.Lock() + lockRkeK8sServiceOptionControllerMockEnqueue.Lock() mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) - lockRKEK8sServiceOptionControllerMockEnqueue.Unlock() + lockRkeK8sServiceOptionControllerMockEnqueue.Unlock() mock.EnqueueFunc(namespace, name) } // EnqueueCalls gets all the calls that were made to Enqueue. // Check the length with: -// len(mockedRKEK8sServiceOptionController.EnqueueCalls()) -func (mock *RKEK8sServiceOptionControllerMock) EnqueueCalls() []struct { +// len(mockedRkeK8sServiceOptionController.EnqueueCalls()) +func (mock *RkeK8sServiceOptionControllerMock) EnqueueCalls() []struct { Namespace string Name string } { @@ -524,16 +498,16 @@ func (mock *RKEK8sServiceOptionControllerMock) EnqueueCalls() []struct { Namespace string Name string } - lockRKEK8sServiceOptionControllerMockEnqueue.RLock() + lockRkeK8sServiceOptionControllerMockEnqueue.RLock() calls = mock.calls.Enqueue - lockRKEK8sServiceOptionControllerMockEnqueue.RUnlock() + lockRkeK8sServiceOptionControllerMockEnqueue.RUnlock() return calls } // EnqueueAfter calls EnqueueAfterFunc. -func (mock *RKEK8sServiceOptionControllerMock) EnqueueAfter(namespace string, name string, after time.Duration) { +func (mock *RkeK8sServiceOptionControllerMock) EnqueueAfter(namespace string, name string, after time.Duration) { if mock.EnqueueAfterFunc == nil { - panic("RKEK8sServiceOptionControllerMock.EnqueueAfterFunc: method is nil but RKEK8sServiceOptionController.EnqueueAfter was just called") + panic("RkeK8sServiceOptionControllerMock.EnqueueAfterFunc: method is nil but RkeK8sServiceOptionController.EnqueueAfter was just called") } callInfo := struct { Namespace string @@ -544,16 +518,16 @@ func (mock *RKEK8sServiceOptionControllerMock) EnqueueAfter(namespace string, na Name: name, After: after, } - lockRKEK8sServiceOptionControllerMockEnqueueAfter.Lock() + lockRkeK8sServiceOptionControllerMockEnqueueAfter.Lock() mock.calls.EnqueueAfter = append(mock.calls.EnqueueAfter, callInfo) - lockRKEK8sServiceOptionControllerMockEnqueueAfter.Unlock() + lockRkeK8sServiceOptionControllerMockEnqueueAfter.Unlock() mock.EnqueueAfterFunc(namespace, name, after) } // EnqueueAfterCalls gets all the calls that were made to EnqueueAfter. // Check the length with: -// len(mockedRKEK8sServiceOptionController.EnqueueAfterCalls()) -func (mock *RKEK8sServiceOptionControllerMock) EnqueueAfterCalls() []struct { +// len(mockedRkeK8sServiceOptionController.EnqueueAfterCalls()) +func (mock *RkeK8sServiceOptionControllerMock) EnqueueAfterCalls() []struct { Namespace string Name string After time.Duration @@ -563,217 +537,151 @@ func (mock *RKEK8sServiceOptionControllerMock) EnqueueAfterCalls() []struct { Name string After time.Duration } - lockRKEK8sServiceOptionControllerMockEnqueueAfter.RLock() + lockRkeK8sServiceOptionControllerMockEnqueueAfter.RLock() calls = mock.calls.EnqueueAfter - lockRKEK8sServiceOptionControllerMockEnqueueAfter.RUnlock() + lockRkeK8sServiceOptionControllerMockEnqueueAfter.RUnlock() return calls } // Generic calls GenericFunc. -func (mock *RKEK8sServiceOptionControllerMock) Generic() controller.GenericController { +func (mock *RkeK8sServiceOptionControllerMock) Generic() controller.GenericController { if mock.GenericFunc == nil { - panic("RKEK8sServiceOptionControllerMock.GenericFunc: method is nil but RKEK8sServiceOptionController.Generic was just called") + panic("RkeK8sServiceOptionControllerMock.GenericFunc: method is nil but RkeK8sServiceOptionController.Generic was just called") } callInfo := struct { }{} - lockRKEK8sServiceOptionControllerMockGeneric.Lock() + lockRkeK8sServiceOptionControllerMockGeneric.Lock() mock.calls.Generic = append(mock.calls.Generic, callInfo) - lockRKEK8sServiceOptionControllerMockGeneric.Unlock() + lockRkeK8sServiceOptionControllerMockGeneric.Unlock() return mock.GenericFunc() } // GenericCalls gets all the calls that were made to Generic. // Check the length with: -// len(mockedRKEK8sServiceOptionController.GenericCalls()) -func (mock *RKEK8sServiceOptionControllerMock) GenericCalls() []struct { +// len(mockedRkeK8sServiceOptionController.GenericCalls()) +func (mock *RkeK8sServiceOptionControllerMock) GenericCalls() []struct { } { var calls []struct { } - lockRKEK8sServiceOptionControllerMockGeneric.RLock() + lockRkeK8sServiceOptionControllerMockGeneric.RLock() calls = mock.calls.Generic - lockRKEK8sServiceOptionControllerMockGeneric.RUnlock() + lockRkeK8sServiceOptionControllerMockGeneric.RUnlock() return calls } // Informer calls InformerFunc. -func (mock *RKEK8sServiceOptionControllerMock) Informer() cache.SharedIndexInformer { +func (mock *RkeK8sServiceOptionControllerMock) Informer() cache.SharedIndexInformer { if mock.InformerFunc == nil { - panic("RKEK8sServiceOptionControllerMock.InformerFunc: method is nil but RKEK8sServiceOptionController.Informer was just called") + panic("RkeK8sServiceOptionControllerMock.InformerFunc: method is nil but RkeK8sServiceOptionController.Informer was just called") } callInfo := struct { }{} - lockRKEK8sServiceOptionControllerMockInformer.Lock() + lockRkeK8sServiceOptionControllerMockInformer.Lock() mock.calls.Informer = append(mock.calls.Informer, callInfo) - lockRKEK8sServiceOptionControllerMockInformer.Unlock() + lockRkeK8sServiceOptionControllerMockInformer.Unlock() return mock.InformerFunc() } // InformerCalls gets all the calls that were made to Informer. // Check the length with: -// len(mockedRKEK8sServiceOptionController.InformerCalls()) -func (mock *RKEK8sServiceOptionControllerMock) InformerCalls() []struct { +// len(mockedRkeK8sServiceOptionController.InformerCalls()) +func (mock *RkeK8sServiceOptionControllerMock) InformerCalls() []struct { } { var calls []struct { } - lockRKEK8sServiceOptionControllerMockInformer.RLock() + lockRkeK8sServiceOptionControllerMockInformer.RLock() calls = mock.calls.Informer - lockRKEK8sServiceOptionControllerMockInformer.RUnlock() + lockRkeK8sServiceOptionControllerMockInformer.RUnlock() return calls } // Lister calls ListerFunc. -func (mock *RKEK8sServiceOptionControllerMock) Lister() v3.RKEK8sServiceOptionLister { +func (mock *RkeK8sServiceOptionControllerMock) Lister() v3.RkeK8sServiceOptionLister { if mock.ListerFunc == nil { - panic("RKEK8sServiceOptionControllerMock.ListerFunc: method is nil but RKEK8sServiceOptionController.Lister was just called") + panic("RkeK8sServiceOptionControllerMock.ListerFunc: method is nil but RkeK8sServiceOptionController.Lister was just called") } callInfo := struct { }{} - lockRKEK8sServiceOptionControllerMockLister.Lock() + lockRkeK8sServiceOptionControllerMockLister.Lock() mock.calls.Lister = append(mock.calls.Lister, callInfo) - lockRKEK8sServiceOptionControllerMockLister.Unlock() + lockRkeK8sServiceOptionControllerMockLister.Unlock() return mock.ListerFunc() } // ListerCalls gets all the calls that were made to Lister. // Check the length with: -// len(mockedRKEK8sServiceOptionController.ListerCalls()) -func (mock *RKEK8sServiceOptionControllerMock) ListerCalls() []struct { +// len(mockedRkeK8sServiceOptionController.ListerCalls()) +func (mock *RkeK8sServiceOptionControllerMock) ListerCalls() []struct { } { var calls []struct { } - lockRKEK8sServiceOptionControllerMockLister.RLock() + lockRkeK8sServiceOptionControllerMockLister.RLock() calls = mock.calls.Lister - lockRKEK8sServiceOptionControllerMockLister.RUnlock() - return calls -} - -// Start calls StartFunc. -func (mock *RKEK8sServiceOptionControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("RKEK8sServiceOptionControllerMock.StartFunc: method is nil but RKEK8sServiceOptionController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockRKEK8sServiceOptionControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockRKEK8sServiceOptionControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedRKEK8sServiceOptionController.StartCalls()) -func (mock *RKEK8sServiceOptionControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockRKEK8sServiceOptionControllerMockStart.RLock() - calls = mock.calls.Start - lockRKEK8sServiceOptionControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *RKEK8sServiceOptionControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("RKEK8sServiceOptionControllerMock.SyncFunc: method is nil but RKEK8sServiceOptionController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockRKEK8sServiceOptionControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockRKEK8sServiceOptionControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedRKEK8sServiceOptionController.SyncCalls()) -func (mock *RKEK8sServiceOptionControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockRKEK8sServiceOptionControllerMockSync.RLock() - calls = mock.calls.Sync - lockRKEK8sServiceOptionControllerMockSync.RUnlock() + lockRkeK8sServiceOptionControllerMockLister.RUnlock() return calls } var ( - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedHandler sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedLifecycle sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockAddFeatureHandler sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockAddFeatureLifecycle sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockAddHandler sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockAddLifecycle sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockController sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockCreate sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockDelete sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockDeleteCollection sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockDeleteNamespaced sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockGet sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockGetNamespaced sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockList sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockListNamespaced sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockObjectClient sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockUpdate sync.RWMutex - lockRKEK8sServiceOptionInterfaceMockWatch sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedHandler sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockAddFeatureHandler sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockAddFeatureLifecycle sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockAddHandler sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockAddLifecycle sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockController sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockCreate sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockDelete sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockDeleteCollection sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockDeleteNamespaced sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockGet sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockGetNamespaced sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockList sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockListNamespaced sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockObjectClient sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockUpdate sync.RWMutex + lockRkeK8sServiceOptionInterfaceMockWatch sync.RWMutex ) -// Ensure, that RKEK8sServiceOptionInterfaceMock does implement RKEK8sServiceOptionInterface. +// Ensure, that RkeK8sServiceOptionInterfaceMock does implement RkeK8sServiceOptionInterface. // If this is not the case, regenerate this file with moq. -var _ v3.RKEK8sServiceOptionInterface = &RKEK8sServiceOptionInterfaceMock{} +var _ v3.RkeK8sServiceOptionInterface = &RkeK8sServiceOptionInterfaceMock{} -// RKEK8sServiceOptionInterfaceMock is a mock implementation of RKEK8sServiceOptionInterface. +// RkeK8sServiceOptionInterfaceMock is a mock implementation of RkeK8sServiceOptionInterface. // -// func TestSomethingThatUsesRKEK8sServiceOptionInterface(t *testing.T) { +// func TestSomethingThatUsesRkeK8sServiceOptionInterface(t *testing.T) { // -// // make and configure a mocked RKEK8sServiceOptionInterface -// mockedRKEK8sServiceOptionInterface := &RKEK8sServiceOptionInterfaceMock{ -// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEK8sServiceOptionHandlerFunc) { +// // make and configure a mocked RkeK8sServiceOptionInterface +// mockedRkeK8sServiceOptionInterface := &RkeK8sServiceOptionInterfaceMock{ +// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RkeK8sServiceOptionHandlerFunc) { // panic("mock out the AddClusterScopedFeatureHandler method") // }, -// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEK8sServiceOptionLifecycle) { +// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RkeK8sServiceOptionLifecycle) { // panic("mock out the AddClusterScopedFeatureLifecycle method") // }, -// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.RKEK8sServiceOptionHandlerFunc) { +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.RkeK8sServiceOptionHandlerFunc) { // panic("mock out the AddClusterScopedHandler method") // }, -// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.RKEK8sServiceOptionLifecycle) { +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.RkeK8sServiceOptionLifecycle) { // panic("mock out the AddClusterScopedLifecycle method") // }, -// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sServiceOptionHandlerFunc) { +// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RkeK8sServiceOptionHandlerFunc) { // panic("mock out the AddFeatureHandler method") // }, -// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEK8sServiceOptionLifecycle) { +// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RkeK8sServiceOptionLifecycle) { // panic("mock out the AddFeatureLifecycle method") // }, -// AddHandlerFunc: func(ctx context.Context, name string, sync v3.RKEK8sServiceOptionHandlerFunc) { +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.RkeK8sServiceOptionHandlerFunc) { // panic("mock out the AddHandler method") // }, -// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.RKEK8sServiceOptionLifecycle) { +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.RkeK8sServiceOptionLifecycle) { // panic("mock out the AddLifecycle method") // }, -// ControllerFunc: func() v3.RKEK8sServiceOptionController { +// ControllerFunc: func() v3.RkeK8sServiceOptionController { // panic("mock out the Controller method") // }, -// CreateFunc: func(in1 *v3.RKEK8sServiceOption) (*v3.RKEK8sServiceOption, error) { +// CreateFunc: func(in1 *v3.RkeK8sServiceOption) (*v3.RkeK8sServiceOption, error) { // panic("mock out the Create method") // }, // DeleteFunc: func(name string, options *v1.DeleteOptions) error { @@ -785,22 +693,22 @@ var _ v3.RKEK8sServiceOptionInterface = &RKEK8sServiceOptionInterfaceMock{} // DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { // panic("mock out the DeleteNamespaced method") // }, -// GetFunc: func(name string, opts v1.GetOptions) (*v3.RKEK8sServiceOption, error) { +// GetFunc: func(name string, opts v1.GetOptions) (*v3.RkeK8sServiceOption, error) { // panic("mock out the Get method") // }, -// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.RKEK8sServiceOption, error) { +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.RkeK8sServiceOption, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1.ListOptions) (*v3.RKEK8sServiceOptionList, error) { +// ListFunc: func(opts v1.ListOptions) (*v3.RkeK8sServiceOptionList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v3.RKEK8sServiceOptionList, error) { +// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v3.RkeK8sServiceOptionList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { // panic("mock out the ObjectClient method") // }, -// UpdateFunc: func(in1 *v3.RKEK8sServiceOption) (*v3.RKEK8sServiceOption, error) { +// UpdateFunc: func(in1 *v3.RkeK8sServiceOption) (*v3.RkeK8sServiceOption, error) { // panic("mock out the Update method") // }, // WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { @@ -808,40 +716,40 @@ var _ v3.RKEK8sServiceOptionInterface = &RKEK8sServiceOptionInterfaceMock{} // }, // } // -// // use mockedRKEK8sServiceOptionInterface in code that requires RKEK8sServiceOptionInterface +// // use mockedRkeK8sServiceOptionInterface in code that requires RkeK8sServiceOptionInterface // // and then make assertions. // // } -type RKEK8sServiceOptionInterfaceMock struct { +type RkeK8sServiceOptionInterfaceMock struct { // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. - AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEK8sServiceOptionHandlerFunc) + AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RkeK8sServiceOptionHandlerFunc) // AddClusterScopedFeatureLifecycleFunc mocks the AddClusterScopedFeatureLifecycle method. - AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEK8sServiceOptionLifecycle) + AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RkeK8sServiceOptionLifecycle) // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. - AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.RKEK8sServiceOptionHandlerFunc) + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.RkeK8sServiceOptionHandlerFunc) // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. - AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.RKEK8sServiceOptionLifecycle) + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.RkeK8sServiceOptionLifecycle) // AddFeatureHandlerFunc mocks the AddFeatureHandler method. - AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sServiceOptionHandlerFunc) + AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RkeK8sServiceOptionHandlerFunc) // AddFeatureLifecycleFunc mocks the AddFeatureLifecycle method. - AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEK8sServiceOptionLifecycle) + AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RkeK8sServiceOptionLifecycle) // AddHandlerFunc mocks the AddHandler method. - AddHandlerFunc func(ctx context.Context, name string, sync v3.RKEK8sServiceOptionHandlerFunc) + AddHandlerFunc func(ctx context.Context, name string, sync v3.RkeK8sServiceOptionHandlerFunc) // AddLifecycleFunc mocks the AddLifecycle method. - AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.RKEK8sServiceOptionLifecycle) + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.RkeK8sServiceOptionLifecycle) // ControllerFunc mocks the Controller method. - ControllerFunc func() v3.RKEK8sServiceOptionController + ControllerFunc func() v3.RkeK8sServiceOptionController // CreateFunc mocks the Create method. - CreateFunc func(in1 *v3.RKEK8sServiceOption) (*v3.RKEK8sServiceOption, error) + CreateFunc func(in1 *v3.RkeK8sServiceOption) (*v3.RkeK8sServiceOption, error) // DeleteFunc mocks the Delete method. DeleteFunc func(name string, options *v1.DeleteOptions) error @@ -853,22 +761,22 @@ type RKEK8sServiceOptionInterfaceMock struct { DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error // GetFunc mocks the Get method. - GetFunc func(name string, opts v1.GetOptions) (*v3.RKEK8sServiceOption, error) + GetFunc func(name string, opts v1.GetOptions) (*v3.RkeK8sServiceOption, error) // GetNamespacedFunc mocks the GetNamespaced method. - GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.RKEK8sServiceOption, error) + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.RkeK8sServiceOption, error) // ListFunc mocks the List method. - ListFunc func(opts v1.ListOptions) (*v3.RKEK8sServiceOptionList, error) + ListFunc func(opts v1.ListOptions) (*v3.RkeK8sServiceOptionList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v3.RKEK8sServiceOptionList, error) + ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v3.RkeK8sServiceOptionList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient // UpdateFunc mocks the Update method. - UpdateFunc func(in1 *v3.RKEK8sServiceOption) (*v3.RKEK8sServiceOption, error) + UpdateFunc func(in1 *v3.RkeK8sServiceOption) (*v3.RkeK8sServiceOption, error) // WatchFunc mocks the Watch method. WatchFunc func(opts v1.ListOptions) (watch.Interface, error) @@ -886,7 +794,7 @@ type RKEK8sServiceOptionInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Sync is the sync argument value. - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } // AddClusterScopedFeatureLifecycle holds details about calls to the AddClusterScopedFeatureLifecycle method. AddClusterScopedFeatureLifecycle []struct { @@ -899,7 +807,7 @@ type RKEK8sServiceOptionInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle } // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. AddClusterScopedHandler []struct { @@ -910,7 +818,7 @@ type RKEK8sServiceOptionInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Sync is the sync argument value. - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. AddClusterScopedLifecycle []struct { @@ -921,7 +829,7 @@ type RKEK8sServiceOptionInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle } // AddFeatureHandler holds details about calls to the AddFeatureHandler method. AddFeatureHandler []struct { @@ -932,7 +840,7 @@ type RKEK8sServiceOptionInterfaceMock struct { // Name is the name argument value. Name string // Sync is the sync argument value. - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } // AddFeatureLifecycle holds details about calls to the AddFeatureLifecycle method. AddFeatureLifecycle []struct { @@ -943,7 +851,7 @@ type RKEK8sServiceOptionInterfaceMock struct { // Name is the name argument value. Name string // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle } // AddHandler holds details about calls to the AddHandler method. AddHandler []struct { @@ -952,7 +860,7 @@ type RKEK8sServiceOptionInterfaceMock struct { // Name is the name argument value. Name string // Sync is the sync argument value. - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } // AddLifecycle holds details about calls to the AddLifecycle method. AddLifecycle []struct { @@ -961,7 +869,7 @@ type RKEK8sServiceOptionInterfaceMock struct { // Name is the name argument value. Name string // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle } // Controller holds details about calls to the Controller method. Controller []struct { @@ -969,7 +877,7 @@ type RKEK8sServiceOptionInterfaceMock struct { // Create holds details about calls to the Create method. Create []struct { // In1 is the in1 argument value. - In1 *v3.RKEK8sServiceOption + In1 *v3.RkeK8sServiceOption } // Delete holds details about calls to the Delete method. Delete []struct { @@ -1028,7 +936,7 @@ type RKEK8sServiceOptionInterfaceMock struct { // Update holds details about calls to the Update method. Update []struct { // In1 is the in1 argument value. - In1 *v3.RKEK8sServiceOption + In1 *v3.RkeK8sServiceOption } // Watch holds details about calls to the Watch method. Watch []struct { @@ -1039,16 +947,16 @@ type RKEK8sServiceOptionInterfaceMock struct { } // AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEK8sServiceOptionHandlerFunc) { +func (mock *RkeK8sServiceOptionInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RkeK8sServiceOptionHandlerFunc) { if mock.AddClusterScopedFeatureHandlerFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.AddClusterScopedFeatureHandlerFunc: method is nil but RKEK8sServiceOptionInterface.AddClusterScopedFeatureHandler was just called") + panic("RkeK8sServiceOptionInterfaceMock.AddClusterScopedFeatureHandlerFunc: method is nil but RkeK8sServiceOptionInterface.AddClusterScopedFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc }{ Ctx: ctx, Enabled: enabled, @@ -1056,46 +964,46 @@ func (mock *RKEK8sServiceOptionInterfaceMock) AddClusterScopedFeatureHandler(ctx ClusterName: clusterName, Sync: sync, } - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureHandler.Lock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedFeatureHandler.Lock() mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureHandler.Unlock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedFeatureHandler.Unlock() mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, sync) } // AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.AddClusterScopedFeatureHandlerCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.AddClusterScopedFeatureHandlerCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureHandler.RLock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedFeatureHandler.RLock() calls = mock.calls.AddClusterScopedFeatureHandler - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureHandler.RUnlock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedFeatureHandler.RUnlock() return calls } // AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEK8sServiceOptionLifecycle) { +func (mock *RkeK8sServiceOptionInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RkeK8sServiceOptionLifecycle) { if mock.AddClusterScopedFeatureLifecycleFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.AddClusterScopedFeatureLifecycleFunc: method is nil but RKEK8sServiceOptionInterface.AddClusterScopedFeatureLifecycle was just called") + panic("RkeK8sServiceOptionInterfaceMock.AddClusterScopedFeatureLifecycleFunc: method is nil but RkeK8sServiceOptionInterface.AddClusterScopedFeatureLifecycle was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle }{ Ctx: ctx, Enabled: enabled, @@ -1103,346 +1011,346 @@ func (mock *RKEK8sServiceOptionInterfaceMock) AddClusterScopedFeatureLifecycle(c ClusterName: clusterName, Lifecycle: lifecycle, } - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureLifecycle.Lock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedFeatureLifecycle.Lock() mock.calls.AddClusterScopedFeatureLifecycle = append(mock.calls.AddClusterScopedFeatureLifecycle, callInfo) - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureLifecycle.Unlock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedFeatureLifecycle.Unlock() mock.AddClusterScopedFeatureLifecycleFunc(ctx, enabled, name, clusterName, lifecycle) } // AddClusterScopedFeatureLifecycleCalls gets all the calls that were made to AddClusterScopedFeatureLifecycle. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.AddClusterScopedFeatureLifecycleCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.AddClusterScopedFeatureLifecycleCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle } { var calls []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle } - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureLifecycle.RLock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedFeatureLifecycle.RLock() calls = mock.calls.AddClusterScopedFeatureLifecycle - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock() return calls } // AddClusterScopedHandler calls AddClusterScopedHandlerFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.RKEK8sServiceOptionHandlerFunc) { +func (mock *RkeK8sServiceOptionInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.RkeK8sServiceOptionHandlerFunc) { if mock.AddClusterScopedHandlerFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.AddClusterScopedHandlerFunc: method is nil but RKEK8sServiceOptionInterface.AddClusterScopedHandler was just called") + panic("RkeK8sServiceOptionInterfaceMock.AddClusterScopedHandlerFunc: method is nil but RkeK8sServiceOptionInterface.AddClusterScopedHandler was just called") } callInfo := struct { Ctx context.Context Name string ClusterName string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc }{ Ctx: ctx, Name: name, ClusterName: clusterName, Sync: sync, } - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedHandler.Lock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedHandler.Lock() mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedHandler.Unlock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedHandler.Unlock() mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) } // AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.AddClusterScopedHandlerCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) AddClusterScopedHandlerCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.AddClusterScopedHandlerCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) AddClusterScopedHandlerCalls() []struct { Ctx context.Context Name string ClusterName string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } { var calls []struct { Ctx context.Context Name string ClusterName string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedHandler.RLock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedHandler.RLock() calls = mock.calls.AddClusterScopedHandler - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedHandler.RUnlock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedHandler.RUnlock() return calls } // AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.RKEK8sServiceOptionLifecycle) { +func (mock *RkeK8sServiceOptionInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.RkeK8sServiceOptionLifecycle) { if mock.AddClusterScopedLifecycleFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but RKEK8sServiceOptionInterface.AddClusterScopedLifecycle was just called") + panic("RkeK8sServiceOptionInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but RkeK8sServiceOptionInterface.AddClusterScopedLifecycle was just called") } callInfo := struct { Ctx context.Context Name string ClusterName string - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle }{ Ctx: ctx, Name: name, ClusterName: clusterName, Lifecycle: lifecycle, } - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedLifecycle.Lock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedLifecycle.Lock() mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedLifecycle.Unlock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedLifecycle.Unlock() mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) } // AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.AddClusterScopedLifecycleCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) AddClusterScopedLifecycleCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.AddClusterScopedLifecycleCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) AddClusterScopedLifecycleCalls() []struct { Ctx context.Context Name string ClusterName string - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle } { var calls []struct { Ctx context.Context Name string ClusterName string - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle } - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedLifecycle.RLock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedLifecycle.RLock() calls = mock.calls.AddClusterScopedLifecycle - lockRKEK8sServiceOptionInterfaceMockAddClusterScopedLifecycle.RUnlock() + lockRkeK8sServiceOptionInterfaceMockAddClusterScopedLifecycle.RUnlock() return calls } // AddFeatureHandler calls AddFeatureHandlerFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sServiceOptionHandlerFunc) { +func (mock *RkeK8sServiceOptionInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RkeK8sServiceOptionHandlerFunc) { if mock.AddFeatureHandlerFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.AddFeatureHandlerFunc: method is nil but RKEK8sServiceOptionInterface.AddFeatureHandler was just called") + panic("RkeK8sServiceOptionInterfaceMock.AddFeatureHandlerFunc: method is nil but RkeK8sServiceOptionInterface.AddFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc }{ Ctx: ctx, Enabled: enabled, Name: name, Sync: sync, } - lockRKEK8sServiceOptionInterfaceMockAddFeatureHandler.Lock() + lockRkeK8sServiceOptionInterfaceMockAddFeatureHandler.Lock() mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) - lockRKEK8sServiceOptionInterfaceMockAddFeatureHandler.Unlock() + lockRkeK8sServiceOptionInterfaceMockAddFeatureHandler.Unlock() mock.AddFeatureHandlerFunc(ctx, enabled, name, sync) } // AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.AddFeatureHandlerCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) AddFeatureHandlerCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.AddFeatureHandlerCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) AddFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } - lockRKEK8sServiceOptionInterfaceMockAddFeatureHandler.RLock() + lockRkeK8sServiceOptionInterfaceMockAddFeatureHandler.RLock() calls = mock.calls.AddFeatureHandler - lockRKEK8sServiceOptionInterfaceMockAddFeatureHandler.RUnlock() + lockRkeK8sServiceOptionInterfaceMockAddFeatureHandler.RUnlock() return calls } // AddFeatureLifecycle calls AddFeatureLifecycleFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEK8sServiceOptionLifecycle) { +func (mock *RkeK8sServiceOptionInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v3.RkeK8sServiceOptionLifecycle) { if mock.AddFeatureLifecycleFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.AddFeatureLifecycleFunc: method is nil but RKEK8sServiceOptionInterface.AddFeatureLifecycle was just called") + panic("RkeK8sServiceOptionInterfaceMock.AddFeatureLifecycleFunc: method is nil but RkeK8sServiceOptionInterface.AddFeatureLifecycle was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle }{ Ctx: ctx, Enabled: enabled, Name: name, Lifecycle: lifecycle, } - lockRKEK8sServiceOptionInterfaceMockAddFeatureLifecycle.Lock() + lockRkeK8sServiceOptionInterfaceMockAddFeatureLifecycle.Lock() mock.calls.AddFeatureLifecycle = append(mock.calls.AddFeatureLifecycle, callInfo) - lockRKEK8sServiceOptionInterfaceMockAddFeatureLifecycle.Unlock() + lockRkeK8sServiceOptionInterfaceMockAddFeatureLifecycle.Unlock() mock.AddFeatureLifecycleFunc(ctx, enabled, name, lifecycle) } // AddFeatureLifecycleCalls gets all the calls that were made to AddFeatureLifecycle. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.AddFeatureLifecycleCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) AddFeatureLifecycleCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.AddFeatureLifecycleCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) AddFeatureLifecycleCalls() []struct { Ctx context.Context Enabled func() bool Name string - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle } { var calls []struct { Ctx context.Context Enabled func() bool Name string - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle } - lockRKEK8sServiceOptionInterfaceMockAddFeatureLifecycle.RLock() + lockRkeK8sServiceOptionInterfaceMockAddFeatureLifecycle.RLock() calls = mock.calls.AddFeatureLifecycle - lockRKEK8sServiceOptionInterfaceMockAddFeatureLifecycle.RUnlock() + lockRkeK8sServiceOptionInterfaceMockAddFeatureLifecycle.RUnlock() return calls } // AddHandler calls AddHandlerFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.RKEK8sServiceOptionHandlerFunc) { +func (mock *RkeK8sServiceOptionInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.RkeK8sServiceOptionHandlerFunc) { if mock.AddHandlerFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.AddHandlerFunc: method is nil but RKEK8sServiceOptionInterface.AddHandler was just called") + panic("RkeK8sServiceOptionInterfaceMock.AddHandlerFunc: method is nil but RkeK8sServiceOptionInterface.AddHandler was just called") } callInfo := struct { Ctx context.Context Name string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc }{ Ctx: ctx, Name: name, Sync: sync, } - lockRKEK8sServiceOptionInterfaceMockAddHandler.Lock() + lockRkeK8sServiceOptionInterfaceMockAddHandler.Lock() mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) - lockRKEK8sServiceOptionInterfaceMockAddHandler.Unlock() + lockRkeK8sServiceOptionInterfaceMockAddHandler.Unlock() mock.AddHandlerFunc(ctx, name, sync) } // AddHandlerCalls gets all the calls that were made to AddHandler. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.AddHandlerCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) AddHandlerCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.AddHandlerCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) AddHandlerCalls() []struct { Ctx context.Context Name string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } { var calls []struct { Ctx context.Context Name string - Sync v3.RKEK8sServiceOptionHandlerFunc + Sync v3.RkeK8sServiceOptionHandlerFunc } - lockRKEK8sServiceOptionInterfaceMockAddHandler.RLock() + lockRkeK8sServiceOptionInterfaceMockAddHandler.RLock() calls = mock.calls.AddHandler - lockRKEK8sServiceOptionInterfaceMockAddHandler.RUnlock() + lockRkeK8sServiceOptionInterfaceMockAddHandler.RUnlock() return calls } // AddLifecycle calls AddLifecycleFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.RKEK8sServiceOptionLifecycle) { +func (mock *RkeK8sServiceOptionInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.RkeK8sServiceOptionLifecycle) { if mock.AddLifecycleFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.AddLifecycleFunc: method is nil but RKEK8sServiceOptionInterface.AddLifecycle was just called") + panic("RkeK8sServiceOptionInterfaceMock.AddLifecycleFunc: method is nil but RkeK8sServiceOptionInterface.AddLifecycle was just called") } callInfo := struct { Ctx context.Context Name string - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle }{ Ctx: ctx, Name: name, Lifecycle: lifecycle, } - lockRKEK8sServiceOptionInterfaceMockAddLifecycle.Lock() + lockRkeK8sServiceOptionInterfaceMockAddLifecycle.Lock() mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) - lockRKEK8sServiceOptionInterfaceMockAddLifecycle.Unlock() + lockRkeK8sServiceOptionInterfaceMockAddLifecycle.Unlock() mock.AddLifecycleFunc(ctx, name, lifecycle) } // AddLifecycleCalls gets all the calls that were made to AddLifecycle. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.AddLifecycleCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) AddLifecycleCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.AddLifecycleCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) AddLifecycleCalls() []struct { Ctx context.Context Name string - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle } { var calls []struct { Ctx context.Context Name string - Lifecycle v3.RKEK8sServiceOptionLifecycle + Lifecycle v3.RkeK8sServiceOptionLifecycle } - lockRKEK8sServiceOptionInterfaceMockAddLifecycle.RLock() + lockRkeK8sServiceOptionInterfaceMockAddLifecycle.RLock() calls = mock.calls.AddLifecycle - lockRKEK8sServiceOptionInterfaceMockAddLifecycle.RUnlock() + lockRkeK8sServiceOptionInterfaceMockAddLifecycle.RUnlock() return calls } // Controller calls ControllerFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) Controller() v3.RKEK8sServiceOptionController { +func (mock *RkeK8sServiceOptionInterfaceMock) Controller() v3.RkeK8sServiceOptionController { if mock.ControllerFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.ControllerFunc: method is nil but RKEK8sServiceOptionInterface.Controller was just called") + panic("RkeK8sServiceOptionInterfaceMock.ControllerFunc: method is nil but RkeK8sServiceOptionInterface.Controller was just called") } callInfo := struct { }{} - lockRKEK8sServiceOptionInterfaceMockController.Lock() + lockRkeK8sServiceOptionInterfaceMockController.Lock() mock.calls.Controller = append(mock.calls.Controller, callInfo) - lockRKEK8sServiceOptionInterfaceMockController.Unlock() + lockRkeK8sServiceOptionInterfaceMockController.Unlock() return mock.ControllerFunc() } // ControllerCalls gets all the calls that were made to Controller. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.ControllerCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) ControllerCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.ControllerCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) ControllerCalls() []struct { } { var calls []struct { } - lockRKEK8sServiceOptionInterfaceMockController.RLock() + lockRkeK8sServiceOptionInterfaceMockController.RLock() calls = mock.calls.Controller - lockRKEK8sServiceOptionInterfaceMockController.RUnlock() + lockRkeK8sServiceOptionInterfaceMockController.RUnlock() return calls } // Create calls CreateFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) Create(in1 *v3.RKEK8sServiceOption) (*v3.RKEK8sServiceOption, error) { +func (mock *RkeK8sServiceOptionInterfaceMock) Create(in1 *v3.RkeK8sServiceOption) (*v3.RkeK8sServiceOption, error) { if mock.CreateFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.CreateFunc: method is nil but RKEK8sServiceOptionInterface.Create was just called") + panic("RkeK8sServiceOptionInterfaceMock.CreateFunc: method is nil but RkeK8sServiceOptionInterface.Create was just called") } callInfo := struct { - In1 *v3.RKEK8sServiceOption + In1 *v3.RkeK8sServiceOption }{ In1: in1, } - lockRKEK8sServiceOptionInterfaceMockCreate.Lock() + lockRkeK8sServiceOptionInterfaceMockCreate.Lock() mock.calls.Create = append(mock.calls.Create, callInfo) - lockRKEK8sServiceOptionInterfaceMockCreate.Unlock() + lockRkeK8sServiceOptionInterfaceMockCreate.Unlock() return mock.CreateFunc(in1) } // CreateCalls gets all the calls that were made to Create. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.CreateCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) CreateCalls() []struct { - In1 *v3.RKEK8sServiceOption +// len(mockedRkeK8sServiceOptionInterface.CreateCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) CreateCalls() []struct { + In1 *v3.RkeK8sServiceOption } { var calls []struct { - In1 *v3.RKEK8sServiceOption + In1 *v3.RkeK8sServiceOption } - lockRKEK8sServiceOptionInterfaceMockCreate.RLock() + lockRkeK8sServiceOptionInterfaceMockCreate.RLock() calls = mock.calls.Create - lockRKEK8sServiceOptionInterfaceMockCreate.RUnlock() + lockRkeK8sServiceOptionInterfaceMockCreate.RUnlock() return calls } // Delete calls DeleteFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { +func (mock *RkeK8sServiceOptionInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { if mock.DeleteFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.DeleteFunc: method is nil but RKEK8sServiceOptionInterface.Delete was just called") + panic("RkeK8sServiceOptionInterfaceMock.DeleteFunc: method is nil but RkeK8sServiceOptionInterface.Delete was just called") } callInfo := struct { Name string @@ -1451,16 +1359,16 @@ func (mock *RKEK8sServiceOptionInterfaceMock) Delete(name string, options *v1.De Name: name, Options: options, } - lockRKEK8sServiceOptionInterfaceMockDelete.Lock() + lockRkeK8sServiceOptionInterfaceMockDelete.Lock() mock.calls.Delete = append(mock.calls.Delete, callInfo) - lockRKEK8sServiceOptionInterfaceMockDelete.Unlock() + lockRkeK8sServiceOptionInterfaceMockDelete.Unlock() return mock.DeleteFunc(name, options) } // DeleteCalls gets all the calls that were made to Delete. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.DeleteCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) DeleteCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.DeleteCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) DeleteCalls() []struct { Name string Options *v1.DeleteOptions } { @@ -1468,16 +1376,16 @@ func (mock *RKEK8sServiceOptionInterfaceMock) DeleteCalls() []struct { Name string Options *v1.DeleteOptions } - lockRKEK8sServiceOptionInterfaceMockDelete.RLock() + lockRkeK8sServiceOptionInterfaceMockDelete.RLock() calls = mock.calls.Delete - lockRKEK8sServiceOptionInterfaceMockDelete.RUnlock() + lockRkeK8sServiceOptionInterfaceMockDelete.RUnlock() return calls } // DeleteCollection calls DeleteCollectionFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +func (mock *RkeK8sServiceOptionInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { if mock.DeleteCollectionFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.DeleteCollectionFunc: method is nil but RKEK8sServiceOptionInterface.DeleteCollection was just called") + panic("RkeK8sServiceOptionInterfaceMock.DeleteCollectionFunc: method is nil but RkeK8sServiceOptionInterface.DeleteCollection was just called") } callInfo := struct { DeleteOpts *v1.DeleteOptions @@ -1486,16 +1394,16 @@ func (mock *RKEK8sServiceOptionInterfaceMock) DeleteCollection(deleteOpts *v1.De DeleteOpts: deleteOpts, ListOpts: listOpts, } - lockRKEK8sServiceOptionInterfaceMockDeleteCollection.Lock() + lockRkeK8sServiceOptionInterfaceMockDeleteCollection.Lock() mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) - lockRKEK8sServiceOptionInterfaceMockDeleteCollection.Unlock() + lockRkeK8sServiceOptionInterfaceMockDeleteCollection.Unlock() return mock.DeleteCollectionFunc(deleteOpts, listOpts) } // DeleteCollectionCalls gets all the calls that were made to DeleteCollection. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.DeleteCollectionCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) DeleteCollectionCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.DeleteCollectionCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) DeleteCollectionCalls() []struct { DeleteOpts *v1.DeleteOptions ListOpts v1.ListOptions } { @@ -1503,16 +1411,16 @@ func (mock *RKEK8sServiceOptionInterfaceMock) DeleteCollectionCalls() []struct { DeleteOpts *v1.DeleteOptions ListOpts v1.ListOptions } - lockRKEK8sServiceOptionInterfaceMockDeleteCollection.RLock() + lockRkeK8sServiceOptionInterfaceMockDeleteCollection.RLock() calls = mock.calls.DeleteCollection - lockRKEK8sServiceOptionInterfaceMockDeleteCollection.RUnlock() + lockRkeK8sServiceOptionInterfaceMockDeleteCollection.RUnlock() return calls } // DeleteNamespaced calls DeleteNamespacedFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { +func (mock *RkeK8sServiceOptionInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { if mock.DeleteNamespacedFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.DeleteNamespacedFunc: method is nil but RKEK8sServiceOptionInterface.DeleteNamespaced was just called") + panic("RkeK8sServiceOptionInterfaceMock.DeleteNamespacedFunc: method is nil but RkeK8sServiceOptionInterface.DeleteNamespaced was just called") } callInfo := struct { Namespace string @@ -1523,16 +1431,16 @@ func (mock *RKEK8sServiceOptionInterfaceMock) DeleteNamespaced(namespace string, Name: name, Options: options, } - lockRKEK8sServiceOptionInterfaceMockDeleteNamespaced.Lock() + lockRkeK8sServiceOptionInterfaceMockDeleteNamespaced.Lock() mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) - lockRKEK8sServiceOptionInterfaceMockDeleteNamespaced.Unlock() + lockRkeK8sServiceOptionInterfaceMockDeleteNamespaced.Unlock() return mock.DeleteNamespacedFunc(namespace, name, options) } // DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.DeleteNamespacedCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) DeleteNamespacedCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.DeleteNamespacedCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) DeleteNamespacedCalls() []struct { Namespace string Name string Options *v1.DeleteOptions @@ -1542,16 +1450,16 @@ func (mock *RKEK8sServiceOptionInterfaceMock) DeleteNamespacedCalls() []struct { Name string Options *v1.DeleteOptions } - lockRKEK8sServiceOptionInterfaceMockDeleteNamespaced.RLock() + lockRkeK8sServiceOptionInterfaceMockDeleteNamespaced.RLock() calls = mock.calls.DeleteNamespaced - lockRKEK8sServiceOptionInterfaceMockDeleteNamespaced.RUnlock() + lockRkeK8sServiceOptionInterfaceMockDeleteNamespaced.RUnlock() return calls } // Get calls GetFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.RKEK8sServiceOption, error) { +func (mock *RkeK8sServiceOptionInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.RkeK8sServiceOption, error) { if mock.GetFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.GetFunc: method is nil but RKEK8sServiceOptionInterface.Get was just called") + panic("RkeK8sServiceOptionInterfaceMock.GetFunc: method is nil but RkeK8sServiceOptionInterface.Get was just called") } callInfo := struct { Name string @@ -1560,16 +1468,16 @@ func (mock *RKEK8sServiceOptionInterfaceMock) Get(name string, opts v1.GetOption Name: name, Opts: opts, } - lockRKEK8sServiceOptionInterfaceMockGet.Lock() + lockRkeK8sServiceOptionInterfaceMockGet.Lock() mock.calls.Get = append(mock.calls.Get, callInfo) - lockRKEK8sServiceOptionInterfaceMockGet.Unlock() + lockRkeK8sServiceOptionInterfaceMockGet.Unlock() return mock.GetFunc(name, opts) } // GetCalls gets all the calls that were made to Get. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.GetCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) GetCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.GetCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) GetCalls() []struct { Name string Opts v1.GetOptions } { @@ -1577,16 +1485,16 @@ func (mock *RKEK8sServiceOptionInterfaceMock) GetCalls() []struct { Name string Opts v1.GetOptions } - lockRKEK8sServiceOptionInterfaceMockGet.RLock() + lockRkeK8sServiceOptionInterfaceMockGet.RLock() calls = mock.calls.Get - lockRKEK8sServiceOptionInterfaceMockGet.RUnlock() + lockRkeK8sServiceOptionInterfaceMockGet.RUnlock() return calls } // GetNamespaced calls GetNamespacedFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.RKEK8sServiceOption, error) { +func (mock *RkeK8sServiceOptionInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.RkeK8sServiceOption, error) { if mock.GetNamespacedFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.GetNamespacedFunc: method is nil but RKEK8sServiceOptionInterface.GetNamespaced was just called") + panic("RkeK8sServiceOptionInterfaceMock.GetNamespacedFunc: method is nil but RkeK8sServiceOptionInterface.GetNamespaced was just called") } callInfo := struct { Namespace string @@ -1597,16 +1505,16 @@ func (mock *RKEK8sServiceOptionInterfaceMock) GetNamespaced(namespace string, na Name: name, Opts: opts, } - lockRKEK8sServiceOptionInterfaceMockGetNamespaced.Lock() + lockRkeK8sServiceOptionInterfaceMockGetNamespaced.Lock() mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) - lockRKEK8sServiceOptionInterfaceMockGetNamespaced.Unlock() + lockRkeK8sServiceOptionInterfaceMockGetNamespaced.Unlock() return mock.GetNamespacedFunc(namespace, name, opts) } // GetNamespacedCalls gets all the calls that were made to GetNamespaced. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.GetNamespacedCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) GetNamespacedCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.GetNamespacedCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) GetNamespacedCalls() []struct { Namespace string Name string Opts v1.GetOptions @@ -1616,47 +1524,47 @@ func (mock *RKEK8sServiceOptionInterfaceMock) GetNamespacedCalls() []struct { Name string Opts v1.GetOptions } - lockRKEK8sServiceOptionInterfaceMockGetNamespaced.RLock() + lockRkeK8sServiceOptionInterfaceMockGetNamespaced.RLock() calls = mock.calls.GetNamespaced - lockRKEK8sServiceOptionInterfaceMockGetNamespaced.RUnlock() + lockRkeK8sServiceOptionInterfaceMockGetNamespaced.RUnlock() return calls } // List calls ListFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) List(opts v1.ListOptions) (*v3.RKEK8sServiceOptionList, error) { +func (mock *RkeK8sServiceOptionInterfaceMock) List(opts v1.ListOptions) (*v3.RkeK8sServiceOptionList, error) { if mock.ListFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.ListFunc: method is nil but RKEK8sServiceOptionInterface.List was just called") + panic("RkeK8sServiceOptionInterfaceMock.ListFunc: method is nil but RkeK8sServiceOptionInterface.List was just called") } callInfo := struct { Opts v1.ListOptions }{ Opts: opts, } - lockRKEK8sServiceOptionInterfaceMockList.Lock() + lockRkeK8sServiceOptionInterfaceMockList.Lock() mock.calls.List = append(mock.calls.List, callInfo) - lockRKEK8sServiceOptionInterfaceMockList.Unlock() + lockRkeK8sServiceOptionInterfaceMockList.Unlock() return mock.ListFunc(opts) } // ListCalls gets all the calls that were made to List. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.ListCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) ListCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.ListCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) ListCalls() []struct { Opts v1.ListOptions } { var calls []struct { Opts v1.ListOptions } - lockRKEK8sServiceOptionInterfaceMockList.RLock() + lockRkeK8sServiceOptionInterfaceMockList.RLock() calls = mock.calls.List - lockRKEK8sServiceOptionInterfaceMockList.RUnlock() + lockRkeK8sServiceOptionInterfaceMockList.RUnlock() return calls } // ListNamespaced calls ListNamespacedFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v3.RKEK8sServiceOptionList, error) { +func (mock *RkeK8sServiceOptionInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v3.RkeK8sServiceOptionList, error) { if mock.ListNamespacedFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.ListNamespacedFunc: method is nil but RKEK8sServiceOptionInterface.ListNamespaced was just called") + panic("RkeK8sServiceOptionInterfaceMock.ListNamespacedFunc: method is nil but RkeK8sServiceOptionInterface.ListNamespaced was just called") } callInfo := struct { Namespace string @@ -1665,16 +1573,16 @@ func (mock *RKEK8sServiceOptionInterfaceMock) ListNamespaced(namespace string, o Namespace: namespace, Opts: opts, } - lockRKEK8sServiceOptionInterfaceMockListNamespaced.Lock() + lockRkeK8sServiceOptionInterfaceMockListNamespaced.Lock() mock.calls.ListNamespaced = append(mock.calls.ListNamespaced, callInfo) - lockRKEK8sServiceOptionInterfaceMockListNamespaced.Unlock() + lockRkeK8sServiceOptionInterfaceMockListNamespaced.Unlock() return mock.ListNamespacedFunc(namespace, opts) } // ListNamespacedCalls gets all the calls that were made to ListNamespaced. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.ListNamespacedCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) ListNamespacedCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.ListNamespacedCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) ListNamespacedCalls() []struct { Namespace string Opts v1.ListOptions } { @@ -1682,164 +1590,164 @@ func (mock *RKEK8sServiceOptionInterfaceMock) ListNamespacedCalls() []struct { Namespace string Opts v1.ListOptions } - lockRKEK8sServiceOptionInterfaceMockListNamespaced.RLock() + lockRkeK8sServiceOptionInterfaceMockListNamespaced.RLock() calls = mock.calls.ListNamespaced - lockRKEK8sServiceOptionInterfaceMockListNamespaced.RUnlock() + lockRkeK8sServiceOptionInterfaceMockListNamespaced.RUnlock() return calls } // ObjectClient calls ObjectClientFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) ObjectClient() *objectclient.ObjectClient { +func (mock *RkeK8sServiceOptionInterfaceMock) ObjectClient() *objectclient.ObjectClient { if mock.ObjectClientFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.ObjectClientFunc: method is nil but RKEK8sServiceOptionInterface.ObjectClient was just called") + panic("RkeK8sServiceOptionInterfaceMock.ObjectClientFunc: method is nil but RkeK8sServiceOptionInterface.ObjectClient was just called") } callInfo := struct { }{} - lockRKEK8sServiceOptionInterfaceMockObjectClient.Lock() + lockRkeK8sServiceOptionInterfaceMockObjectClient.Lock() mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) - lockRKEK8sServiceOptionInterfaceMockObjectClient.Unlock() + lockRkeK8sServiceOptionInterfaceMockObjectClient.Unlock() return mock.ObjectClientFunc() } // ObjectClientCalls gets all the calls that were made to ObjectClient. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.ObjectClientCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) ObjectClientCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.ObjectClientCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) ObjectClientCalls() []struct { } { var calls []struct { } - lockRKEK8sServiceOptionInterfaceMockObjectClient.RLock() + lockRkeK8sServiceOptionInterfaceMockObjectClient.RLock() calls = mock.calls.ObjectClient - lockRKEK8sServiceOptionInterfaceMockObjectClient.RUnlock() + lockRkeK8sServiceOptionInterfaceMockObjectClient.RUnlock() return calls } // Update calls UpdateFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) Update(in1 *v3.RKEK8sServiceOption) (*v3.RKEK8sServiceOption, error) { +func (mock *RkeK8sServiceOptionInterfaceMock) Update(in1 *v3.RkeK8sServiceOption) (*v3.RkeK8sServiceOption, error) { if mock.UpdateFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.UpdateFunc: method is nil but RKEK8sServiceOptionInterface.Update was just called") + panic("RkeK8sServiceOptionInterfaceMock.UpdateFunc: method is nil but RkeK8sServiceOptionInterface.Update was just called") } callInfo := struct { - In1 *v3.RKEK8sServiceOption + In1 *v3.RkeK8sServiceOption }{ In1: in1, } - lockRKEK8sServiceOptionInterfaceMockUpdate.Lock() + lockRkeK8sServiceOptionInterfaceMockUpdate.Lock() mock.calls.Update = append(mock.calls.Update, callInfo) - lockRKEK8sServiceOptionInterfaceMockUpdate.Unlock() + lockRkeK8sServiceOptionInterfaceMockUpdate.Unlock() return mock.UpdateFunc(in1) } // UpdateCalls gets all the calls that were made to Update. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.UpdateCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) UpdateCalls() []struct { - In1 *v3.RKEK8sServiceOption +// len(mockedRkeK8sServiceOptionInterface.UpdateCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) UpdateCalls() []struct { + In1 *v3.RkeK8sServiceOption } { var calls []struct { - In1 *v3.RKEK8sServiceOption + In1 *v3.RkeK8sServiceOption } - lockRKEK8sServiceOptionInterfaceMockUpdate.RLock() + lockRkeK8sServiceOptionInterfaceMockUpdate.RLock() calls = mock.calls.Update - lockRKEK8sServiceOptionInterfaceMockUpdate.RUnlock() + lockRkeK8sServiceOptionInterfaceMockUpdate.RUnlock() return calls } // Watch calls WatchFunc. -func (mock *RKEK8sServiceOptionInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (mock *RkeK8sServiceOptionInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { if mock.WatchFunc == nil { - panic("RKEK8sServiceOptionInterfaceMock.WatchFunc: method is nil but RKEK8sServiceOptionInterface.Watch was just called") + panic("RkeK8sServiceOptionInterfaceMock.WatchFunc: method is nil but RkeK8sServiceOptionInterface.Watch was just called") } callInfo := struct { Opts v1.ListOptions }{ Opts: opts, } - lockRKEK8sServiceOptionInterfaceMockWatch.Lock() + lockRkeK8sServiceOptionInterfaceMockWatch.Lock() mock.calls.Watch = append(mock.calls.Watch, callInfo) - lockRKEK8sServiceOptionInterfaceMockWatch.Unlock() + lockRkeK8sServiceOptionInterfaceMockWatch.Unlock() return mock.WatchFunc(opts) } // WatchCalls gets all the calls that were made to Watch. // Check the length with: -// len(mockedRKEK8sServiceOptionInterface.WatchCalls()) -func (mock *RKEK8sServiceOptionInterfaceMock) WatchCalls() []struct { +// len(mockedRkeK8sServiceOptionInterface.WatchCalls()) +func (mock *RkeK8sServiceOptionInterfaceMock) WatchCalls() []struct { Opts v1.ListOptions } { var calls []struct { Opts v1.ListOptions } - lockRKEK8sServiceOptionInterfaceMockWatch.RLock() + lockRkeK8sServiceOptionInterfaceMockWatch.RLock() calls = mock.calls.Watch - lockRKEK8sServiceOptionInterfaceMockWatch.RUnlock() + lockRkeK8sServiceOptionInterfaceMockWatch.RUnlock() return calls } var ( - lockRKEK8sServiceOptionsGetterMockRKEK8sServiceOptions sync.RWMutex + lockRkeK8sServiceOptionsGetterMockRkeK8sServiceOptions sync.RWMutex ) -// Ensure, that RKEK8sServiceOptionsGetterMock does implement RKEK8sServiceOptionsGetter. +// Ensure, that RkeK8sServiceOptionsGetterMock does implement RkeK8sServiceOptionsGetter. // If this is not the case, regenerate this file with moq. -var _ v3.RKEK8sServiceOptionsGetter = &RKEK8sServiceOptionsGetterMock{} +var _ v3.RkeK8sServiceOptionsGetter = &RkeK8sServiceOptionsGetterMock{} -// RKEK8sServiceOptionsGetterMock is a mock implementation of RKEK8sServiceOptionsGetter. +// RkeK8sServiceOptionsGetterMock is a mock implementation of RkeK8sServiceOptionsGetter. // -// func TestSomethingThatUsesRKEK8sServiceOptionsGetter(t *testing.T) { +// func TestSomethingThatUsesRkeK8sServiceOptionsGetter(t *testing.T) { // -// // make and configure a mocked RKEK8sServiceOptionsGetter -// mockedRKEK8sServiceOptionsGetter := &RKEK8sServiceOptionsGetterMock{ -// RKEK8sServiceOptionsFunc: func(namespace string) v3.RKEK8sServiceOptionInterface { -// panic("mock out the RKEK8sServiceOptions method") +// // make and configure a mocked RkeK8sServiceOptionsGetter +// mockedRkeK8sServiceOptionsGetter := &RkeK8sServiceOptionsGetterMock{ +// RkeK8sServiceOptionsFunc: func(namespace string) v3.RkeK8sServiceOptionInterface { +// panic("mock out the RkeK8sServiceOptions method") // }, // } // -// // use mockedRKEK8sServiceOptionsGetter in code that requires RKEK8sServiceOptionsGetter +// // use mockedRkeK8sServiceOptionsGetter in code that requires RkeK8sServiceOptionsGetter // // and then make assertions. // // } -type RKEK8sServiceOptionsGetterMock struct { - // RKEK8sServiceOptionsFunc mocks the RKEK8sServiceOptions method. - RKEK8sServiceOptionsFunc func(namespace string) v3.RKEK8sServiceOptionInterface +type RkeK8sServiceOptionsGetterMock struct { + // RkeK8sServiceOptionsFunc mocks the RkeK8sServiceOptions method. + RkeK8sServiceOptionsFunc func(namespace string) v3.RkeK8sServiceOptionInterface // calls tracks calls to the methods. calls struct { - // RKEK8sServiceOptions holds details about calls to the RKEK8sServiceOptions method. - RKEK8sServiceOptions []struct { + // RkeK8sServiceOptions holds details about calls to the RkeK8sServiceOptions method. + RkeK8sServiceOptions []struct { // Namespace is the namespace argument value. Namespace string } } } -// RKEK8sServiceOptions calls RKEK8sServiceOptionsFunc. -func (mock *RKEK8sServiceOptionsGetterMock) RKEK8sServiceOptions(namespace string) v3.RKEK8sServiceOptionInterface { - if mock.RKEK8sServiceOptionsFunc == nil { - panic("RKEK8sServiceOptionsGetterMock.RKEK8sServiceOptionsFunc: method is nil but RKEK8sServiceOptionsGetter.RKEK8sServiceOptions was just called") +// RkeK8sServiceOptions calls RkeK8sServiceOptionsFunc. +func (mock *RkeK8sServiceOptionsGetterMock) RkeK8sServiceOptions(namespace string) v3.RkeK8sServiceOptionInterface { + if mock.RkeK8sServiceOptionsFunc == nil { + panic("RkeK8sServiceOptionsGetterMock.RkeK8sServiceOptionsFunc: method is nil but RkeK8sServiceOptionsGetter.RkeK8sServiceOptions was just called") } callInfo := struct { Namespace string }{ Namespace: namespace, } - lockRKEK8sServiceOptionsGetterMockRKEK8sServiceOptions.Lock() - mock.calls.RKEK8sServiceOptions = append(mock.calls.RKEK8sServiceOptions, callInfo) - lockRKEK8sServiceOptionsGetterMockRKEK8sServiceOptions.Unlock() - return mock.RKEK8sServiceOptionsFunc(namespace) + lockRkeK8sServiceOptionsGetterMockRkeK8sServiceOptions.Lock() + mock.calls.RkeK8sServiceOptions = append(mock.calls.RkeK8sServiceOptions, callInfo) + lockRkeK8sServiceOptionsGetterMockRkeK8sServiceOptions.Unlock() + return mock.RkeK8sServiceOptionsFunc(namespace) } -// RKEK8sServiceOptionsCalls gets all the calls that were made to RKEK8sServiceOptions. +// RkeK8sServiceOptionsCalls gets all the calls that were made to RkeK8sServiceOptions. // Check the length with: -// len(mockedRKEK8sServiceOptionsGetter.RKEK8sServiceOptionsCalls()) -func (mock *RKEK8sServiceOptionsGetterMock) RKEK8sServiceOptionsCalls() []struct { +// len(mockedRkeK8sServiceOptionsGetter.RkeK8sServiceOptionsCalls()) +func (mock *RkeK8sServiceOptionsGetterMock) RkeK8sServiceOptionsCalls() []struct { Namespace string } { var calls []struct { Namespace string } - lockRKEK8sServiceOptionsGetterMockRKEK8sServiceOptions.RLock() - calls = mock.calls.RKEK8sServiceOptions - lockRKEK8sServiceOptionsGetterMockRKEK8sServiceOptions.RUnlock() + lockRkeK8sServiceOptionsGetterMockRkeK8sServiceOptions.RLock() + calls = mock.calls.RkeK8sServiceOptions + lockRkeK8sServiceOptionsGetterMockRkeK8sServiceOptions.RUnlock() return calls } diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_system_image_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_system_image_mock.go index 5feac6e2..74112903 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_system_image_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_system_image_mock.go @@ -18,38 +18,38 @@ import ( ) var ( - lockRKEK8sSystemImageListerMockGet sync.RWMutex - lockRKEK8sSystemImageListerMockList sync.RWMutex + lockRkeK8sSystemImageListerMockGet sync.RWMutex + lockRkeK8sSystemImageListerMockList sync.RWMutex ) -// Ensure, that RKEK8sSystemImageListerMock does implement RKEK8sSystemImageLister. +// Ensure, that RkeK8sSystemImageListerMock does implement RkeK8sSystemImageLister. // If this is not the case, regenerate this file with moq. -var _ v3.RKEK8sSystemImageLister = &RKEK8sSystemImageListerMock{} +var _ v3.RkeK8sSystemImageLister = &RkeK8sSystemImageListerMock{} -// RKEK8sSystemImageListerMock is a mock implementation of RKEK8sSystemImageLister. +// RkeK8sSystemImageListerMock is a mock implementation of RkeK8sSystemImageLister. // -// func TestSomethingThatUsesRKEK8sSystemImageLister(t *testing.T) { +// func TestSomethingThatUsesRkeK8sSystemImageLister(t *testing.T) { // -// // make and configure a mocked RKEK8sSystemImageLister -// mockedRKEK8sSystemImageLister := &RKEK8sSystemImageListerMock{ -// GetFunc: func(namespace string, name string) (*v3.RKEK8sSystemImage, error) { +// // make and configure a mocked RkeK8sSystemImageLister +// mockedRkeK8sSystemImageLister := &RkeK8sSystemImageListerMock{ +// GetFunc: func(namespace string, name string) (*v3.RkeK8sSystemImage, error) { // panic("mock out the Get method") // }, -// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.RKEK8sSystemImage, error) { +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.RkeK8sSystemImage, error) { // panic("mock out the List method") // }, // } // -// // use mockedRKEK8sSystemImageLister in code that requires RKEK8sSystemImageLister +// // use mockedRkeK8sSystemImageLister in code that requires RkeK8sSystemImageLister // // and then make assertions. // // } -type RKEK8sSystemImageListerMock struct { +type RkeK8sSystemImageListerMock struct { // GetFunc mocks the Get method. - GetFunc func(namespace string, name string) (*v3.RKEK8sSystemImage, error) + GetFunc func(namespace string, name string) (*v3.RkeK8sSystemImage, error) // ListFunc mocks the List method. - ListFunc func(namespace string, selector labels.Selector) ([]*v3.RKEK8sSystemImage, error) + ListFunc func(namespace string, selector labels.Selector) ([]*v3.RkeK8sSystemImage, error) // calls tracks calls to the methods. calls struct { @@ -71,9 +71,9 @@ type RKEK8sSystemImageListerMock struct { } // Get calls GetFunc. -func (mock *RKEK8sSystemImageListerMock) Get(namespace string, name string) (*v3.RKEK8sSystemImage, error) { +func (mock *RkeK8sSystemImageListerMock) Get(namespace string, name string) (*v3.RkeK8sSystemImage, error) { if mock.GetFunc == nil { - panic("RKEK8sSystemImageListerMock.GetFunc: method is nil but RKEK8sSystemImageLister.Get was just called") + panic("RkeK8sSystemImageListerMock.GetFunc: method is nil but RkeK8sSystemImageLister.Get was just called") } callInfo := struct { Namespace string @@ -82,16 +82,16 @@ func (mock *RKEK8sSystemImageListerMock) Get(namespace string, name string) (*v3 Namespace: namespace, Name: name, } - lockRKEK8sSystemImageListerMockGet.Lock() + lockRkeK8sSystemImageListerMockGet.Lock() mock.calls.Get = append(mock.calls.Get, callInfo) - lockRKEK8sSystemImageListerMockGet.Unlock() + lockRkeK8sSystemImageListerMockGet.Unlock() return mock.GetFunc(namespace, name) } // GetCalls gets all the calls that were made to Get. // Check the length with: -// len(mockedRKEK8sSystemImageLister.GetCalls()) -func (mock *RKEK8sSystemImageListerMock) GetCalls() []struct { +// len(mockedRkeK8sSystemImageLister.GetCalls()) +func (mock *RkeK8sSystemImageListerMock) GetCalls() []struct { Namespace string Name string } { @@ -99,16 +99,16 @@ func (mock *RKEK8sSystemImageListerMock) GetCalls() []struct { Namespace string Name string } - lockRKEK8sSystemImageListerMockGet.RLock() + lockRkeK8sSystemImageListerMockGet.RLock() calls = mock.calls.Get - lockRKEK8sSystemImageListerMockGet.RUnlock() + lockRkeK8sSystemImageListerMockGet.RUnlock() return calls } // List calls ListFunc. -func (mock *RKEK8sSystemImageListerMock) List(namespace string, selector labels.Selector) ([]*v3.RKEK8sSystemImage, error) { +func (mock *RkeK8sSystemImageListerMock) List(namespace string, selector labels.Selector) ([]*v3.RkeK8sSystemImage, error) { if mock.ListFunc == nil { - panic("RKEK8sSystemImageListerMock.ListFunc: method is nil but RKEK8sSystemImageLister.List was just called") + panic("RkeK8sSystemImageListerMock.ListFunc: method is nil but RkeK8sSystemImageLister.List was just called") } callInfo := struct { Namespace string @@ -117,16 +117,16 @@ func (mock *RKEK8sSystemImageListerMock) List(namespace string, selector labels. Namespace: namespace, Selector: selector, } - lockRKEK8sSystemImageListerMockList.Lock() + lockRkeK8sSystemImageListerMockList.Lock() mock.calls.List = append(mock.calls.List, callInfo) - lockRKEK8sSystemImageListerMockList.Unlock() + lockRkeK8sSystemImageListerMockList.Unlock() return mock.ListFunc(namespace, selector) } // ListCalls gets all the calls that were made to List. // Check the length with: -// len(mockedRKEK8sSystemImageLister.ListCalls()) -func (mock *RKEK8sSystemImageListerMock) ListCalls() []struct { +// len(mockedRkeK8sSystemImageLister.ListCalls()) +func (mock *RkeK8sSystemImageListerMock) ListCalls() []struct { Namespace string Selector labels.Selector } { @@ -134,46 +134,44 @@ func (mock *RKEK8sSystemImageListerMock) ListCalls() []struct { Namespace string Selector labels.Selector } - lockRKEK8sSystemImageListerMockList.RLock() + lockRkeK8sSystemImageListerMockList.RLock() calls = mock.calls.List - lockRKEK8sSystemImageListerMockList.RUnlock() + lockRkeK8sSystemImageListerMockList.RUnlock() return calls } var ( - lockRKEK8sSystemImageControllerMockAddClusterScopedFeatureHandler sync.RWMutex - lockRKEK8sSystemImageControllerMockAddClusterScopedHandler sync.RWMutex - lockRKEK8sSystemImageControllerMockAddFeatureHandler sync.RWMutex - lockRKEK8sSystemImageControllerMockAddHandler sync.RWMutex - lockRKEK8sSystemImageControllerMockEnqueue sync.RWMutex - lockRKEK8sSystemImageControllerMockEnqueueAfter sync.RWMutex - lockRKEK8sSystemImageControllerMockGeneric sync.RWMutex - lockRKEK8sSystemImageControllerMockInformer sync.RWMutex - lockRKEK8sSystemImageControllerMockLister sync.RWMutex - lockRKEK8sSystemImageControllerMockStart sync.RWMutex - lockRKEK8sSystemImageControllerMockSync sync.RWMutex + lockRkeK8sSystemImageControllerMockAddClusterScopedFeatureHandler sync.RWMutex + lockRkeK8sSystemImageControllerMockAddClusterScopedHandler sync.RWMutex + lockRkeK8sSystemImageControllerMockAddFeatureHandler sync.RWMutex + lockRkeK8sSystemImageControllerMockAddHandler sync.RWMutex + lockRkeK8sSystemImageControllerMockEnqueue sync.RWMutex + lockRkeK8sSystemImageControllerMockEnqueueAfter sync.RWMutex + lockRkeK8sSystemImageControllerMockGeneric sync.RWMutex + lockRkeK8sSystemImageControllerMockInformer sync.RWMutex + lockRkeK8sSystemImageControllerMockLister sync.RWMutex ) -// Ensure, that RKEK8sSystemImageControllerMock does implement RKEK8sSystemImageController. +// Ensure, that RkeK8sSystemImageControllerMock does implement RkeK8sSystemImageController. // If this is not the case, regenerate this file with moq. -var _ v3.RKEK8sSystemImageController = &RKEK8sSystemImageControllerMock{} +var _ v3.RkeK8sSystemImageController = &RkeK8sSystemImageControllerMock{} -// RKEK8sSystemImageControllerMock is a mock implementation of RKEK8sSystemImageController. +// RkeK8sSystemImageControllerMock is a mock implementation of RkeK8sSystemImageController. // -// func TestSomethingThatUsesRKEK8sSystemImageController(t *testing.T) { +// func TestSomethingThatUsesRkeK8sSystemImageController(t *testing.T) { // -// // make and configure a mocked RKEK8sSystemImageController -// mockedRKEK8sSystemImageController := &RKEK8sSystemImageControllerMock{ -// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEK8sSystemImageHandlerFunc) { +// // make and configure a mocked RkeK8sSystemImageController +// mockedRkeK8sSystemImageController := &RkeK8sSystemImageControllerMock{ +// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RkeK8sSystemImageHandlerFunc) { // panic("mock out the AddClusterScopedFeatureHandler method") // }, -// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.RKEK8sSystemImageHandlerFunc) { +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.RkeK8sSystemImageHandlerFunc) { // panic("mock out the AddClusterScopedHandler method") // }, -// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sSystemImageHandlerFunc) { +// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RkeK8sSystemImageHandlerFunc) { // panic("mock out the AddFeatureHandler method") // }, -// AddHandlerFunc: func(ctx context.Context, name string, handler v3.RKEK8sSystemImageHandlerFunc) { +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.RkeK8sSystemImageHandlerFunc) { // panic("mock out the AddHandler method") // }, // EnqueueFunc: func(namespace string, name string) { @@ -188,33 +186,27 @@ var _ v3.RKEK8sSystemImageController = &RKEK8sSystemImageControllerMock{} // InformerFunc: func() cache.SharedIndexInformer { // panic("mock out the Informer method") // }, -// ListerFunc: func() v3.RKEK8sSystemImageLister { +// ListerFunc: func() v3.RkeK8sSystemImageLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // -// // use mockedRKEK8sSystemImageController in code that requires RKEK8sSystemImageController +// // use mockedRkeK8sSystemImageController in code that requires RkeK8sSystemImageController // // and then make assertions. // // } -type RKEK8sSystemImageControllerMock struct { +type RkeK8sSystemImageControllerMock struct { // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. - AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEK8sSystemImageHandlerFunc) + AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RkeK8sSystemImageHandlerFunc) // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. - AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.RKEK8sSystemImageHandlerFunc) + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.RkeK8sSystemImageHandlerFunc) // AddFeatureHandlerFunc mocks the AddFeatureHandler method. - AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sSystemImageHandlerFunc) + AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RkeK8sSystemImageHandlerFunc) // AddHandlerFunc mocks the AddHandler method. - AddHandlerFunc func(ctx context.Context, name string, handler v3.RKEK8sSystemImageHandlerFunc) + AddHandlerFunc func(ctx context.Context, name string, handler v3.RkeK8sSystemImageHandlerFunc) // EnqueueFunc mocks the Enqueue method. EnqueueFunc func(namespace string, name string) @@ -229,13 +221,7 @@ type RKEK8sSystemImageControllerMock struct { InformerFunc func() cache.SharedIndexInformer // ListerFunc mocks the Lister method. - ListerFunc func() v3.RKEK8sSystemImageLister - - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error + ListerFunc func() v3.RkeK8sSystemImageLister // calls tracks calls to the methods. calls struct { @@ -250,7 +236,7 @@ type RKEK8sSystemImageControllerMock struct { // ClusterName is the clusterName argument value. ClusterName string // Handler is the handler argument value. - Handler v3.RKEK8sSystemImageHandlerFunc + Handler v3.RkeK8sSystemImageHandlerFunc } // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. AddClusterScopedHandler []struct { @@ -261,7 +247,7 @@ type RKEK8sSystemImageControllerMock struct { // ClusterName is the clusterName argument value. ClusterName string // Handler is the handler argument value. - Handler v3.RKEK8sSystemImageHandlerFunc + Handler v3.RkeK8sSystemImageHandlerFunc } // AddFeatureHandler holds details about calls to the AddFeatureHandler method. AddFeatureHandler []struct { @@ -272,7 +258,7 @@ type RKEK8sSystemImageControllerMock struct { // Name is the name argument value. Name string // Sync is the sync argument value. - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } // AddHandler holds details about calls to the AddHandler method. AddHandler []struct { @@ -281,7 +267,7 @@ type RKEK8sSystemImageControllerMock struct { // Name is the name argument value. Name string // Handler is the handler argument value. - Handler v3.RKEK8sSystemImageHandlerFunc + Handler v3.RkeK8sSystemImageHandlerFunc } // Enqueue holds details about calls to the Enqueue method. Enqueue []struct { @@ -308,32 +294,20 @@ type RKEK8sSystemImageControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } // AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc. -func (mock *RKEK8sSystemImageControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEK8sSystemImageHandlerFunc) { +func (mock *RkeK8sSystemImageControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RkeK8sSystemImageHandlerFunc) { if mock.AddClusterScopedFeatureHandlerFunc == nil { - panic("RKEK8sSystemImageControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but RKEK8sSystemImageController.AddClusterScopedFeatureHandler was just called") + panic("RkeK8sSystemImageControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but RkeK8sSystemImageController.AddClusterScopedFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Handler v3.RKEK8sSystemImageHandlerFunc + Handler v3.RkeK8sSystemImageHandlerFunc }{ Ctx: ctx, Enabled: enabled, @@ -341,164 +315,164 @@ func (mock *RKEK8sSystemImageControllerMock) AddClusterScopedFeatureHandler(ctx ClusterName: clusterName, Handler: handler, } - lockRKEK8sSystemImageControllerMockAddClusterScopedFeatureHandler.Lock() + lockRkeK8sSystemImageControllerMockAddClusterScopedFeatureHandler.Lock() mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) - lockRKEK8sSystemImageControllerMockAddClusterScopedFeatureHandler.Unlock() + lockRkeK8sSystemImageControllerMockAddClusterScopedFeatureHandler.Unlock() mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, handler) } // AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. // Check the length with: -// len(mockedRKEK8sSystemImageController.AddClusterScopedFeatureHandlerCalls()) -func (mock *RKEK8sSystemImageControllerMock) AddClusterScopedFeatureHandlerCalls() []struct { +// len(mockedRkeK8sSystemImageController.AddClusterScopedFeatureHandlerCalls()) +func (mock *RkeK8sSystemImageControllerMock) AddClusterScopedFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Handler v3.RKEK8sSystemImageHandlerFunc + Handler v3.RkeK8sSystemImageHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Handler v3.RKEK8sSystemImageHandlerFunc + Handler v3.RkeK8sSystemImageHandlerFunc } - lockRKEK8sSystemImageControllerMockAddClusterScopedFeatureHandler.RLock() + lockRkeK8sSystemImageControllerMockAddClusterScopedFeatureHandler.RLock() calls = mock.calls.AddClusterScopedFeatureHandler - lockRKEK8sSystemImageControllerMockAddClusterScopedFeatureHandler.RUnlock() + lockRkeK8sSystemImageControllerMockAddClusterScopedFeatureHandler.RUnlock() return calls } // AddClusterScopedHandler calls AddClusterScopedHandlerFunc. -func (mock *RKEK8sSystemImageControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.RKEK8sSystemImageHandlerFunc) { +func (mock *RkeK8sSystemImageControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.RkeK8sSystemImageHandlerFunc) { if mock.AddClusterScopedHandlerFunc == nil { - panic("RKEK8sSystemImageControllerMock.AddClusterScopedHandlerFunc: method is nil but RKEK8sSystemImageController.AddClusterScopedHandler was just called") + panic("RkeK8sSystemImageControllerMock.AddClusterScopedHandlerFunc: method is nil but RkeK8sSystemImageController.AddClusterScopedHandler was just called") } callInfo := struct { Ctx context.Context Name string ClusterName string - Handler v3.RKEK8sSystemImageHandlerFunc + Handler v3.RkeK8sSystemImageHandlerFunc }{ Ctx: ctx, Name: name, ClusterName: clusterName, Handler: handler, } - lockRKEK8sSystemImageControllerMockAddClusterScopedHandler.Lock() + lockRkeK8sSystemImageControllerMockAddClusterScopedHandler.Lock() mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) - lockRKEK8sSystemImageControllerMockAddClusterScopedHandler.Unlock() + lockRkeK8sSystemImageControllerMockAddClusterScopedHandler.Unlock() mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) } // AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. // Check the length with: -// len(mockedRKEK8sSystemImageController.AddClusterScopedHandlerCalls()) -func (mock *RKEK8sSystemImageControllerMock) AddClusterScopedHandlerCalls() []struct { +// len(mockedRkeK8sSystemImageController.AddClusterScopedHandlerCalls()) +func (mock *RkeK8sSystemImageControllerMock) AddClusterScopedHandlerCalls() []struct { Ctx context.Context Name string ClusterName string - Handler v3.RKEK8sSystemImageHandlerFunc + Handler v3.RkeK8sSystemImageHandlerFunc } { var calls []struct { Ctx context.Context Name string ClusterName string - Handler v3.RKEK8sSystemImageHandlerFunc + Handler v3.RkeK8sSystemImageHandlerFunc } - lockRKEK8sSystemImageControllerMockAddClusterScopedHandler.RLock() + lockRkeK8sSystemImageControllerMockAddClusterScopedHandler.RLock() calls = mock.calls.AddClusterScopedHandler - lockRKEK8sSystemImageControllerMockAddClusterScopedHandler.RUnlock() + lockRkeK8sSystemImageControllerMockAddClusterScopedHandler.RUnlock() return calls } // AddFeatureHandler calls AddFeatureHandlerFunc. -func (mock *RKEK8sSystemImageControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sSystemImageHandlerFunc) { +func (mock *RkeK8sSystemImageControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RkeK8sSystemImageHandlerFunc) { if mock.AddFeatureHandlerFunc == nil { - panic("RKEK8sSystemImageControllerMock.AddFeatureHandlerFunc: method is nil but RKEK8sSystemImageController.AddFeatureHandler was just called") + panic("RkeK8sSystemImageControllerMock.AddFeatureHandlerFunc: method is nil but RkeK8sSystemImageController.AddFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc }{ Ctx: ctx, Enabled: enabled, Name: name, Sync: sync, } - lockRKEK8sSystemImageControllerMockAddFeatureHandler.Lock() + lockRkeK8sSystemImageControllerMockAddFeatureHandler.Lock() mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) - lockRKEK8sSystemImageControllerMockAddFeatureHandler.Unlock() + lockRkeK8sSystemImageControllerMockAddFeatureHandler.Unlock() mock.AddFeatureHandlerFunc(ctx, enabled, name, sync) } // AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. // Check the length with: -// len(mockedRKEK8sSystemImageController.AddFeatureHandlerCalls()) -func (mock *RKEK8sSystemImageControllerMock) AddFeatureHandlerCalls() []struct { +// len(mockedRkeK8sSystemImageController.AddFeatureHandlerCalls()) +func (mock *RkeK8sSystemImageControllerMock) AddFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } - lockRKEK8sSystemImageControllerMockAddFeatureHandler.RLock() + lockRkeK8sSystemImageControllerMockAddFeatureHandler.RLock() calls = mock.calls.AddFeatureHandler - lockRKEK8sSystemImageControllerMockAddFeatureHandler.RUnlock() + lockRkeK8sSystemImageControllerMockAddFeatureHandler.RUnlock() return calls } // AddHandler calls AddHandlerFunc. -func (mock *RKEK8sSystemImageControllerMock) AddHandler(ctx context.Context, name string, handler v3.RKEK8sSystemImageHandlerFunc) { +func (mock *RkeK8sSystemImageControllerMock) AddHandler(ctx context.Context, name string, handler v3.RkeK8sSystemImageHandlerFunc) { if mock.AddHandlerFunc == nil { - panic("RKEK8sSystemImageControllerMock.AddHandlerFunc: method is nil but RKEK8sSystemImageController.AddHandler was just called") + panic("RkeK8sSystemImageControllerMock.AddHandlerFunc: method is nil but RkeK8sSystemImageController.AddHandler was just called") } callInfo := struct { Ctx context.Context Name string - Handler v3.RKEK8sSystemImageHandlerFunc + Handler v3.RkeK8sSystemImageHandlerFunc }{ Ctx: ctx, Name: name, Handler: handler, } - lockRKEK8sSystemImageControllerMockAddHandler.Lock() + lockRkeK8sSystemImageControllerMockAddHandler.Lock() mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) - lockRKEK8sSystemImageControllerMockAddHandler.Unlock() + lockRkeK8sSystemImageControllerMockAddHandler.Unlock() mock.AddHandlerFunc(ctx, name, handler) } // AddHandlerCalls gets all the calls that were made to AddHandler. // Check the length with: -// len(mockedRKEK8sSystemImageController.AddHandlerCalls()) -func (mock *RKEK8sSystemImageControllerMock) AddHandlerCalls() []struct { +// len(mockedRkeK8sSystemImageController.AddHandlerCalls()) +func (mock *RkeK8sSystemImageControllerMock) AddHandlerCalls() []struct { Ctx context.Context Name string - Handler v3.RKEK8sSystemImageHandlerFunc + Handler v3.RkeK8sSystemImageHandlerFunc } { var calls []struct { Ctx context.Context Name string - Handler v3.RKEK8sSystemImageHandlerFunc + Handler v3.RkeK8sSystemImageHandlerFunc } - lockRKEK8sSystemImageControllerMockAddHandler.RLock() + lockRkeK8sSystemImageControllerMockAddHandler.RLock() calls = mock.calls.AddHandler - lockRKEK8sSystemImageControllerMockAddHandler.RUnlock() + lockRkeK8sSystemImageControllerMockAddHandler.RUnlock() return calls } // Enqueue calls EnqueueFunc. -func (mock *RKEK8sSystemImageControllerMock) Enqueue(namespace string, name string) { +func (mock *RkeK8sSystemImageControllerMock) Enqueue(namespace string, name string) { if mock.EnqueueFunc == nil { - panic("RKEK8sSystemImageControllerMock.EnqueueFunc: method is nil but RKEK8sSystemImageController.Enqueue was just called") + panic("RkeK8sSystemImageControllerMock.EnqueueFunc: method is nil but RkeK8sSystemImageController.Enqueue was just called") } callInfo := struct { Namespace string @@ -507,16 +481,16 @@ func (mock *RKEK8sSystemImageControllerMock) Enqueue(namespace string, name stri Namespace: namespace, Name: name, } - lockRKEK8sSystemImageControllerMockEnqueue.Lock() + lockRkeK8sSystemImageControllerMockEnqueue.Lock() mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) - lockRKEK8sSystemImageControllerMockEnqueue.Unlock() + lockRkeK8sSystemImageControllerMockEnqueue.Unlock() mock.EnqueueFunc(namespace, name) } // EnqueueCalls gets all the calls that were made to Enqueue. // Check the length with: -// len(mockedRKEK8sSystemImageController.EnqueueCalls()) -func (mock *RKEK8sSystemImageControllerMock) EnqueueCalls() []struct { +// len(mockedRkeK8sSystemImageController.EnqueueCalls()) +func (mock *RkeK8sSystemImageControllerMock) EnqueueCalls() []struct { Namespace string Name string } { @@ -524,16 +498,16 @@ func (mock *RKEK8sSystemImageControllerMock) EnqueueCalls() []struct { Namespace string Name string } - lockRKEK8sSystemImageControllerMockEnqueue.RLock() + lockRkeK8sSystemImageControllerMockEnqueue.RLock() calls = mock.calls.Enqueue - lockRKEK8sSystemImageControllerMockEnqueue.RUnlock() + lockRkeK8sSystemImageControllerMockEnqueue.RUnlock() return calls } // EnqueueAfter calls EnqueueAfterFunc. -func (mock *RKEK8sSystemImageControllerMock) EnqueueAfter(namespace string, name string, after time.Duration) { +func (mock *RkeK8sSystemImageControllerMock) EnqueueAfter(namespace string, name string, after time.Duration) { if mock.EnqueueAfterFunc == nil { - panic("RKEK8sSystemImageControllerMock.EnqueueAfterFunc: method is nil but RKEK8sSystemImageController.EnqueueAfter was just called") + panic("RkeK8sSystemImageControllerMock.EnqueueAfterFunc: method is nil but RkeK8sSystemImageController.EnqueueAfter was just called") } callInfo := struct { Namespace string @@ -544,16 +518,16 @@ func (mock *RKEK8sSystemImageControllerMock) EnqueueAfter(namespace string, name Name: name, After: after, } - lockRKEK8sSystemImageControllerMockEnqueueAfter.Lock() + lockRkeK8sSystemImageControllerMockEnqueueAfter.Lock() mock.calls.EnqueueAfter = append(mock.calls.EnqueueAfter, callInfo) - lockRKEK8sSystemImageControllerMockEnqueueAfter.Unlock() + lockRkeK8sSystemImageControllerMockEnqueueAfter.Unlock() mock.EnqueueAfterFunc(namespace, name, after) } // EnqueueAfterCalls gets all the calls that were made to EnqueueAfter. // Check the length with: -// len(mockedRKEK8sSystemImageController.EnqueueAfterCalls()) -func (mock *RKEK8sSystemImageControllerMock) EnqueueAfterCalls() []struct { +// len(mockedRkeK8sSystemImageController.EnqueueAfterCalls()) +func (mock *RkeK8sSystemImageControllerMock) EnqueueAfterCalls() []struct { Namespace string Name string After time.Duration @@ -563,217 +537,151 @@ func (mock *RKEK8sSystemImageControllerMock) EnqueueAfterCalls() []struct { Name string After time.Duration } - lockRKEK8sSystemImageControllerMockEnqueueAfter.RLock() + lockRkeK8sSystemImageControllerMockEnqueueAfter.RLock() calls = mock.calls.EnqueueAfter - lockRKEK8sSystemImageControllerMockEnqueueAfter.RUnlock() + lockRkeK8sSystemImageControllerMockEnqueueAfter.RUnlock() return calls } // Generic calls GenericFunc. -func (mock *RKEK8sSystemImageControllerMock) Generic() controller.GenericController { +func (mock *RkeK8sSystemImageControllerMock) Generic() controller.GenericController { if mock.GenericFunc == nil { - panic("RKEK8sSystemImageControllerMock.GenericFunc: method is nil but RKEK8sSystemImageController.Generic was just called") + panic("RkeK8sSystemImageControllerMock.GenericFunc: method is nil but RkeK8sSystemImageController.Generic was just called") } callInfo := struct { }{} - lockRKEK8sSystemImageControllerMockGeneric.Lock() + lockRkeK8sSystemImageControllerMockGeneric.Lock() mock.calls.Generic = append(mock.calls.Generic, callInfo) - lockRKEK8sSystemImageControllerMockGeneric.Unlock() + lockRkeK8sSystemImageControllerMockGeneric.Unlock() return mock.GenericFunc() } // GenericCalls gets all the calls that were made to Generic. // Check the length with: -// len(mockedRKEK8sSystemImageController.GenericCalls()) -func (mock *RKEK8sSystemImageControllerMock) GenericCalls() []struct { +// len(mockedRkeK8sSystemImageController.GenericCalls()) +func (mock *RkeK8sSystemImageControllerMock) GenericCalls() []struct { } { var calls []struct { } - lockRKEK8sSystemImageControllerMockGeneric.RLock() + lockRkeK8sSystemImageControllerMockGeneric.RLock() calls = mock.calls.Generic - lockRKEK8sSystemImageControllerMockGeneric.RUnlock() + lockRkeK8sSystemImageControllerMockGeneric.RUnlock() return calls } // Informer calls InformerFunc. -func (mock *RKEK8sSystemImageControllerMock) Informer() cache.SharedIndexInformer { +func (mock *RkeK8sSystemImageControllerMock) Informer() cache.SharedIndexInformer { if mock.InformerFunc == nil { - panic("RKEK8sSystemImageControllerMock.InformerFunc: method is nil but RKEK8sSystemImageController.Informer was just called") + panic("RkeK8sSystemImageControllerMock.InformerFunc: method is nil but RkeK8sSystemImageController.Informer was just called") } callInfo := struct { }{} - lockRKEK8sSystemImageControllerMockInformer.Lock() + lockRkeK8sSystemImageControllerMockInformer.Lock() mock.calls.Informer = append(mock.calls.Informer, callInfo) - lockRKEK8sSystemImageControllerMockInformer.Unlock() + lockRkeK8sSystemImageControllerMockInformer.Unlock() return mock.InformerFunc() } // InformerCalls gets all the calls that were made to Informer. // Check the length with: -// len(mockedRKEK8sSystemImageController.InformerCalls()) -func (mock *RKEK8sSystemImageControllerMock) InformerCalls() []struct { +// len(mockedRkeK8sSystemImageController.InformerCalls()) +func (mock *RkeK8sSystemImageControllerMock) InformerCalls() []struct { } { var calls []struct { } - lockRKEK8sSystemImageControllerMockInformer.RLock() + lockRkeK8sSystemImageControllerMockInformer.RLock() calls = mock.calls.Informer - lockRKEK8sSystemImageControllerMockInformer.RUnlock() + lockRkeK8sSystemImageControllerMockInformer.RUnlock() return calls } // Lister calls ListerFunc. -func (mock *RKEK8sSystemImageControllerMock) Lister() v3.RKEK8sSystemImageLister { +func (mock *RkeK8sSystemImageControllerMock) Lister() v3.RkeK8sSystemImageLister { if mock.ListerFunc == nil { - panic("RKEK8sSystemImageControllerMock.ListerFunc: method is nil but RKEK8sSystemImageController.Lister was just called") + panic("RkeK8sSystemImageControllerMock.ListerFunc: method is nil but RkeK8sSystemImageController.Lister was just called") } callInfo := struct { }{} - lockRKEK8sSystemImageControllerMockLister.Lock() + lockRkeK8sSystemImageControllerMockLister.Lock() mock.calls.Lister = append(mock.calls.Lister, callInfo) - lockRKEK8sSystemImageControllerMockLister.Unlock() + lockRkeK8sSystemImageControllerMockLister.Unlock() return mock.ListerFunc() } // ListerCalls gets all the calls that were made to Lister. // Check the length with: -// len(mockedRKEK8sSystemImageController.ListerCalls()) -func (mock *RKEK8sSystemImageControllerMock) ListerCalls() []struct { +// len(mockedRkeK8sSystemImageController.ListerCalls()) +func (mock *RkeK8sSystemImageControllerMock) ListerCalls() []struct { } { var calls []struct { } - lockRKEK8sSystemImageControllerMockLister.RLock() + lockRkeK8sSystemImageControllerMockLister.RLock() calls = mock.calls.Lister - lockRKEK8sSystemImageControllerMockLister.RUnlock() - return calls -} - -// Start calls StartFunc. -func (mock *RKEK8sSystemImageControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("RKEK8sSystemImageControllerMock.StartFunc: method is nil but RKEK8sSystemImageController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockRKEK8sSystemImageControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockRKEK8sSystemImageControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedRKEK8sSystemImageController.StartCalls()) -func (mock *RKEK8sSystemImageControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockRKEK8sSystemImageControllerMockStart.RLock() - calls = mock.calls.Start - lockRKEK8sSystemImageControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *RKEK8sSystemImageControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("RKEK8sSystemImageControllerMock.SyncFunc: method is nil but RKEK8sSystemImageController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockRKEK8sSystemImageControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockRKEK8sSystemImageControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedRKEK8sSystemImageController.SyncCalls()) -func (mock *RKEK8sSystemImageControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockRKEK8sSystemImageControllerMockSync.RLock() - calls = mock.calls.Sync - lockRKEK8sSystemImageControllerMockSync.RUnlock() + lockRkeK8sSystemImageControllerMockLister.RUnlock() return calls } var ( - lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex - lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex - lockRKEK8sSystemImageInterfaceMockAddClusterScopedHandler sync.RWMutex - lockRKEK8sSystemImageInterfaceMockAddClusterScopedLifecycle sync.RWMutex - lockRKEK8sSystemImageInterfaceMockAddFeatureHandler sync.RWMutex - lockRKEK8sSystemImageInterfaceMockAddFeatureLifecycle sync.RWMutex - lockRKEK8sSystemImageInterfaceMockAddHandler sync.RWMutex - lockRKEK8sSystemImageInterfaceMockAddLifecycle sync.RWMutex - lockRKEK8sSystemImageInterfaceMockController sync.RWMutex - lockRKEK8sSystemImageInterfaceMockCreate sync.RWMutex - lockRKEK8sSystemImageInterfaceMockDelete sync.RWMutex - lockRKEK8sSystemImageInterfaceMockDeleteCollection sync.RWMutex - lockRKEK8sSystemImageInterfaceMockDeleteNamespaced sync.RWMutex - lockRKEK8sSystemImageInterfaceMockGet sync.RWMutex - lockRKEK8sSystemImageInterfaceMockGetNamespaced sync.RWMutex - lockRKEK8sSystemImageInterfaceMockList sync.RWMutex - lockRKEK8sSystemImageInterfaceMockListNamespaced sync.RWMutex - lockRKEK8sSystemImageInterfaceMockObjectClient sync.RWMutex - lockRKEK8sSystemImageInterfaceMockUpdate sync.RWMutex - lockRKEK8sSystemImageInterfaceMockWatch sync.RWMutex + lockRkeK8sSystemImageInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex + lockRkeK8sSystemImageInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex + lockRkeK8sSystemImageInterfaceMockAddClusterScopedHandler sync.RWMutex + lockRkeK8sSystemImageInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockRkeK8sSystemImageInterfaceMockAddFeatureHandler sync.RWMutex + lockRkeK8sSystemImageInterfaceMockAddFeatureLifecycle sync.RWMutex + lockRkeK8sSystemImageInterfaceMockAddHandler sync.RWMutex + lockRkeK8sSystemImageInterfaceMockAddLifecycle sync.RWMutex + lockRkeK8sSystemImageInterfaceMockController sync.RWMutex + lockRkeK8sSystemImageInterfaceMockCreate sync.RWMutex + lockRkeK8sSystemImageInterfaceMockDelete sync.RWMutex + lockRkeK8sSystemImageInterfaceMockDeleteCollection sync.RWMutex + lockRkeK8sSystemImageInterfaceMockDeleteNamespaced sync.RWMutex + lockRkeK8sSystemImageInterfaceMockGet sync.RWMutex + lockRkeK8sSystemImageInterfaceMockGetNamespaced sync.RWMutex + lockRkeK8sSystemImageInterfaceMockList sync.RWMutex + lockRkeK8sSystemImageInterfaceMockListNamespaced sync.RWMutex + lockRkeK8sSystemImageInterfaceMockObjectClient sync.RWMutex + lockRkeK8sSystemImageInterfaceMockUpdate sync.RWMutex + lockRkeK8sSystemImageInterfaceMockWatch sync.RWMutex ) -// Ensure, that RKEK8sSystemImageInterfaceMock does implement RKEK8sSystemImageInterface. +// Ensure, that RkeK8sSystemImageInterfaceMock does implement RkeK8sSystemImageInterface. // If this is not the case, regenerate this file with moq. -var _ v3.RKEK8sSystemImageInterface = &RKEK8sSystemImageInterfaceMock{} +var _ v3.RkeK8sSystemImageInterface = &RkeK8sSystemImageInterfaceMock{} -// RKEK8sSystemImageInterfaceMock is a mock implementation of RKEK8sSystemImageInterface. +// RkeK8sSystemImageInterfaceMock is a mock implementation of RkeK8sSystemImageInterface. // -// func TestSomethingThatUsesRKEK8sSystemImageInterface(t *testing.T) { +// func TestSomethingThatUsesRkeK8sSystemImageInterface(t *testing.T) { // -// // make and configure a mocked RKEK8sSystemImageInterface -// mockedRKEK8sSystemImageInterface := &RKEK8sSystemImageInterfaceMock{ -// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEK8sSystemImageHandlerFunc) { +// // make and configure a mocked RkeK8sSystemImageInterface +// mockedRkeK8sSystemImageInterface := &RkeK8sSystemImageInterfaceMock{ +// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RkeK8sSystemImageHandlerFunc) { // panic("mock out the AddClusterScopedFeatureHandler method") // }, -// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEK8sSystemImageLifecycle) { +// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RkeK8sSystemImageLifecycle) { // panic("mock out the AddClusterScopedFeatureLifecycle method") // }, -// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.RKEK8sSystemImageHandlerFunc) { +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.RkeK8sSystemImageHandlerFunc) { // panic("mock out the AddClusterScopedHandler method") // }, -// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.RKEK8sSystemImageLifecycle) { +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.RkeK8sSystemImageLifecycle) { // panic("mock out the AddClusterScopedLifecycle method") // }, -// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sSystemImageHandlerFunc) { +// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RkeK8sSystemImageHandlerFunc) { // panic("mock out the AddFeatureHandler method") // }, -// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEK8sSystemImageLifecycle) { +// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RkeK8sSystemImageLifecycle) { // panic("mock out the AddFeatureLifecycle method") // }, -// AddHandlerFunc: func(ctx context.Context, name string, sync v3.RKEK8sSystemImageHandlerFunc) { +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.RkeK8sSystemImageHandlerFunc) { // panic("mock out the AddHandler method") // }, -// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.RKEK8sSystemImageLifecycle) { +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.RkeK8sSystemImageLifecycle) { // panic("mock out the AddLifecycle method") // }, -// ControllerFunc: func() v3.RKEK8sSystemImageController { +// ControllerFunc: func() v3.RkeK8sSystemImageController { // panic("mock out the Controller method") // }, -// CreateFunc: func(in1 *v3.RKEK8sSystemImage) (*v3.RKEK8sSystemImage, error) { +// CreateFunc: func(in1 *v3.RkeK8sSystemImage) (*v3.RkeK8sSystemImage, error) { // panic("mock out the Create method") // }, // DeleteFunc: func(name string, options *v1.DeleteOptions) error { @@ -785,22 +693,22 @@ var _ v3.RKEK8sSystemImageInterface = &RKEK8sSystemImageInterfaceMock{} // DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { // panic("mock out the DeleteNamespaced method") // }, -// GetFunc: func(name string, opts v1.GetOptions) (*v3.RKEK8sSystemImage, error) { +// GetFunc: func(name string, opts v1.GetOptions) (*v3.RkeK8sSystemImage, error) { // panic("mock out the Get method") // }, -// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.RKEK8sSystemImage, error) { +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.RkeK8sSystemImage, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1.ListOptions) (*v3.RKEK8sSystemImageList, error) { +// ListFunc: func(opts v1.ListOptions) (*v3.RkeK8sSystemImageList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v3.RKEK8sSystemImageList, error) { +// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v3.RkeK8sSystemImageList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { // panic("mock out the ObjectClient method") // }, -// UpdateFunc: func(in1 *v3.RKEK8sSystemImage) (*v3.RKEK8sSystemImage, error) { +// UpdateFunc: func(in1 *v3.RkeK8sSystemImage) (*v3.RkeK8sSystemImage, error) { // panic("mock out the Update method") // }, // WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { @@ -808,40 +716,40 @@ var _ v3.RKEK8sSystemImageInterface = &RKEK8sSystemImageInterfaceMock{} // }, // } // -// // use mockedRKEK8sSystemImageInterface in code that requires RKEK8sSystemImageInterface +// // use mockedRkeK8sSystemImageInterface in code that requires RkeK8sSystemImageInterface // // and then make assertions. // // } -type RKEK8sSystemImageInterfaceMock struct { +type RkeK8sSystemImageInterfaceMock struct { // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. - AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEK8sSystemImageHandlerFunc) + AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RkeK8sSystemImageHandlerFunc) // AddClusterScopedFeatureLifecycleFunc mocks the AddClusterScopedFeatureLifecycle method. - AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEK8sSystemImageLifecycle) + AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RkeK8sSystemImageLifecycle) // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. - AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.RKEK8sSystemImageHandlerFunc) + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.RkeK8sSystemImageHandlerFunc) // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. - AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.RKEK8sSystemImageLifecycle) + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.RkeK8sSystemImageLifecycle) // AddFeatureHandlerFunc mocks the AddFeatureHandler method. - AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sSystemImageHandlerFunc) + AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RkeK8sSystemImageHandlerFunc) // AddFeatureLifecycleFunc mocks the AddFeatureLifecycle method. - AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEK8sSystemImageLifecycle) + AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RkeK8sSystemImageLifecycle) // AddHandlerFunc mocks the AddHandler method. - AddHandlerFunc func(ctx context.Context, name string, sync v3.RKEK8sSystemImageHandlerFunc) + AddHandlerFunc func(ctx context.Context, name string, sync v3.RkeK8sSystemImageHandlerFunc) // AddLifecycleFunc mocks the AddLifecycle method. - AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.RKEK8sSystemImageLifecycle) + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.RkeK8sSystemImageLifecycle) // ControllerFunc mocks the Controller method. - ControllerFunc func() v3.RKEK8sSystemImageController + ControllerFunc func() v3.RkeK8sSystemImageController // CreateFunc mocks the Create method. - CreateFunc func(in1 *v3.RKEK8sSystemImage) (*v3.RKEK8sSystemImage, error) + CreateFunc func(in1 *v3.RkeK8sSystemImage) (*v3.RkeK8sSystemImage, error) // DeleteFunc mocks the Delete method. DeleteFunc func(name string, options *v1.DeleteOptions) error @@ -853,22 +761,22 @@ type RKEK8sSystemImageInterfaceMock struct { DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error // GetFunc mocks the Get method. - GetFunc func(name string, opts v1.GetOptions) (*v3.RKEK8sSystemImage, error) + GetFunc func(name string, opts v1.GetOptions) (*v3.RkeK8sSystemImage, error) // GetNamespacedFunc mocks the GetNamespaced method. - GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.RKEK8sSystemImage, error) + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.RkeK8sSystemImage, error) // ListFunc mocks the List method. - ListFunc func(opts v1.ListOptions) (*v3.RKEK8sSystemImageList, error) + ListFunc func(opts v1.ListOptions) (*v3.RkeK8sSystemImageList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v3.RKEK8sSystemImageList, error) + ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v3.RkeK8sSystemImageList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient // UpdateFunc mocks the Update method. - UpdateFunc func(in1 *v3.RKEK8sSystemImage) (*v3.RKEK8sSystemImage, error) + UpdateFunc func(in1 *v3.RkeK8sSystemImage) (*v3.RkeK8sSystemImage, error) // WatchFunc mocks the Watch method. WatchFunc func(opts v1.ListOptions) (watch.Interface, error) @@ -886,7 +794,7 @@ type RKEK8sSystemImageInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Sync is the sync argument value. - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } // AddClusterScopedFeatureLifecycle holds details about calls to the AddClusterScopedFeatureLifecycle method. AddClusterScopedFeatureLifecycle []struct { @@ -899,7 +807,7 @@ type RKEK8sSystemImageInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle } // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. AddClusterScopedHandler []struct { @@ -910,7 +818,7 @@ type RKEK8sSystemImageInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Sync is the sync argument value. - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. AddClusterScopedLifecycle []struct { @@ -921,7 +829,7 @@ type RKEK8sSystemImageInterfaceMock struct { // ClusterName is the clusterName argument value. ClusterName string // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle } // AddFeatureHandler holds details about calls to the AddFeatureHandler method. AddFeatureHandler []struct { @@ -932,7 +840,7 @@ type RKEK8sSystemImageInterfaceMock struct { // Name is the name argument value. Name string // Sync is the sync argument value. - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } // AddFeatureLifecycle holds details about calls to the AddFeatureLifecycle method. AddFeatureLifecycle []struct { @@ -943,7 +851,7 @@ type RKEK8sSystemImageInterfaceMock struct { // Name is the name argument value. Name string // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle } // AddHandler holds details about calls to the AddHandler method. AddHandler []struct { @@ -952,7 +860,7 @@ type RKEK8sSystemImageInterfaceMock struct { // Name is the name argument value. Name string // Sync is the sync argument value. - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } // AddLifecycle holds details about calls to the AddLifecycle method. AddLifecycle []struct { @@ -961,7 +869,7 @@ type RKEK8sSystemImageInterfaceMock struct { // Name is the name argument value. Name string // Lifecycle is the lifecycle argument value. - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle } // Controller holds details about calls to the Controller method. Controller []struct { @@ -969,7 +877,7 @@ type RKEK8sSystemImageInterfaceMock struct { // Create holds details about calls to the Create method. Create []struct { // In1 is the in1 argument value. - In1 *v3.RKEK8sSystemImage + In1 *v3.RkeK8sSystemImage } // Delete holds details about calls to the Delete method. Delete []struct { @@ -1028,7 +936,7 @@ type RKEK8sSystemImageInterfaceMock struct { // Update holds details about calls to the Update method. Update []struct { // In1 is the in1 argument value. - In1 *v3.RKEK8sSystemImage + In1 *v3.RkeK8sSystemImage } // Watch holds details about calls to the Watch method. Watch []struct { @@ -1039,16 +947,16 @@ type RKEK8sSystemImageInterfaceMock struct { } // AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc. -func (mock *RKEK8sSystemImageInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEK8sSystemImageHandlerFunc) { +func (mock *RkeK8sSystemImageInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RkeK8sSystemImageHandlerFunc) { if mock.AddClusterScopedFeatureHandlerFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.AddClusterScopedFeatureHandlerFunc: method is nil but RKEK8sSystemImageInterface.AddClusterScopedFeatureHandler was just called") + panic("RkeK8sSystemImageInterfaceMock.AddClusterScopedFeatureHandlerFunc: method is nil but RkeK8sSystemImageInterface.AddClusterScopedFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc }{ Ctx: ctx, Enabled: enabled, @@ -1056,46 +964,46 @@ func (mock *RKEK8sSystemImageInterfaceMock) AddClusterScopedFeatureHandler(ctx c ClusterName: clusterName, Sync: sync, } - lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureHandler.Lock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedFeatureHandler.Lock() mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) - lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureHandler.Unlock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedFeatureHandler.Unlock() mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, sync) } // AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.AddClusterScopedFeatureHandlerCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.AddClusterScopedFeatureHandlerCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } - lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureHandler.RLock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedFeatureHandler.RLock() calls = mock.calls.AddClusterScopedFeatureHandler - lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureHandler.RUnlock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedFeatureHandler.RUnlock() return calls } // AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc. -func (mock *RKEK8sSystemImageInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEK8sSystemImageLifecycle) { +func (mock *RkeK8sSystemImageInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RkeK8sSystemImageLifecycle) { if mock.AddClusterScopedFeatureLifecycleFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.AddClusterScopedFeatureLifecycleFunc: method is nil but RKEK8sSystemImageInterface.AddClusterScopedFeatureLifecycle was just called") + panic("RkeK8sSystemImageInterfaceMock.AddClusterScopedFeatureLifecycleFunc: method is nil but RkeK8sSystemImageInterface.AddClusterScopedFeatureLifecycle was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle }{ Ctx: ctx, Enabled: enabled, @@ -1103,346 +1011,346 @@ func (mock *RKEK8sSystemImageInterfaceMock) AddClusterScopedFeatureLifecycle(ctx ClusterName: clusterName, Lifecycle: lifecycle, } - lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.Lock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.Lock() mock.calls.AddClusterScopedFeatureLifecycle = append(mock.calls.AddClusterScopedFeatureLifecycle, callInfo) - lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.Unlock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.Unlock() mock.AddClusterScopedFeatureLifecycleFunc(ctx, enabled, name, clusterName, lifecycle) } // AddClusterScopedFeatureLifecycleCalls gets all the calls that were made to AddClusterScopedFeatureLifecycle. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.AddClusterScopedFeatureLifecycleCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.AddClusterScopedFeatureLifecycleCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle } { var calls []struct { Ctx context.Context Enabled func() bool Name string ClusterName string - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle } - lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.RLock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.RLock() calls = mock.calls.AddClusterScopedFeatureLifecycle - lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock() return calls } // AddClusterScopedHandler calls AddClusterScopedHandlerFunc. -func (mock *RKEK8sSystemImageInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.RKEK8sSystemImageHandlerFunc) { +func (mock *RkeK8sSystemImageInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.RkeK8sSystemImageHandlerFunc) { if mock.AddClusterScopedHandlerFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.AddClusterScopedHandlerFunc: method is nil but RKEK8sSystemImageInterface.AddClusterScopedHandler was just called") + panic("RkeK8sSystemImageInterfaceMock.AddClusterScopedHandlerFunc: method is nil but RkeK8sSystemImageInterface.AddClusterScopedHandler was just called") } callInfo := struct { Ctx context.Context Name string ClusterName string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc }{ Ctx: ctx, Name: name, ClusterName: clusterName, Sync: sync, } - lockRKEK8sSystemImageInterfaceMockAddClusterScopedHandler.Lock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedHandler.Lock() mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) - lockRKEK8sSystemImageInterfaceMockAddClusterScopedHandler.Unlock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedHandler.Unlock() mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) } // AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.AddClusterScopedHandlerCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) AddClusterScopedHandlerCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.AddClusterScopedHandlerCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) AddClusterScopedHandlerCalls() []struct { Ctx context.Context Name string ClusterName string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } { var calls []struct { Ctx context.Context Name string ClusterName string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } - lockRKEK8sSystemImageInterfaceMockAddClusterScopedHandler.RLock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedHandler.RLock() calls = mock.calls.AddClusterScopedHandler - lockRKEK8sSystemImageInterfaceMockAddClusterScopedHandler.RUnlock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedHandler.RUnlock() return calls } // AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. -func (mock *RKEK8sSystemImageInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.RKEK8sSystemImageLifecycle) { +func (mock *RkeK8sSystemImageInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.RkeK8sSystemImageLifecycle) { if mock.AddClusterScopedLifecycleFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but RKEK8sSystemImageInterface.AddClusterScopedLifecycle was just called") + panic("RkeK8sSystemImageInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but RkeK8sSystemImageInterface.AddClusterScopedLifecycle was just called") } callInfo := struct { Ctx context.Context Name string ClusterName string - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle }{ Ctx: ctx, Name: name, ClusterName: clusterName, Lifecycle: lifecycle, } - lockRKEK8sSystemImageInterfaceMockAddClusterScopedLifecycle.Lock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedLifecycle.Lock() mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) - lockRKEK8sSystemImageInterfaceMockAddClusterScopedLifecycle.Unlock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedLifecycle.Unlock() mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) } // AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.AddClusterScopedLifecycleCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) AddClusterScopedLifecycleCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.AddClusterScopedLifecycleCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) AddClusterScopedLifecycleCalls() []struct { Ctx context.Context Name string ClusterName string - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle } { var calls []struct { Ctx context.Context Name string ClusterName string - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle } - lockRKEK8sSystemImageInterfaceMockAddClusterScopedLifecycle.RLock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedLifecycle.RLock() calls = mock.calls.AddClusterScopedLifecycle - lockRKEK8sSystemImageInterfaceMockAddClusterScopedLifecycle.RUnlock() + lockRkeK8sSystemImageInterfaceMockAddClusterScopedLifecycle.RUnlock() return calls } // AddFeatureHandler calls AddFeatureHandlerFunc. -func (mock *RKEK8sSystemImageInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sSystemImageHandlerFunc) { +func (mock *RkeK8sSystemImageInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RkeK8sSystemImageHandlerFunc) { if mock.AddFeatureHandlerFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.AddFeatureHandlerFunc: method is nil but RKEK8sSystemImageInterface.AddFeatureHandler was just called") + panic("RkeK8sSystemImageInterfaceMock.AddFeatureHandlerFunc: method is nil but RkeK8sSystemImageInterface.AddFeatureHandler was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc }{ Ctx: ctx, Enabled: enabled, Name: name, Sync: sync, } - lockRKEK8sSystemImageInterfaceMockAddFeatureHandler.Lock() + lockRkeK8sSystemImageInterfaceMockAddFeatureHandler.Lock() mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) - lockRKEK8sSystemImageInterfaceMockAddFeatureHandler.Unlock() + lockRkeK8sSystemImageInterfaceMockAddFeatureHandler.Unlock() mock.AddFeatureHandlerFunc(ctx, enabled, name, sync) } // AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.AddFeatureHandlerCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) AddFeatureHandlerCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.AddFeatureHandlerCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) AddFeatureHandlerCalls() []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } { var calls []struct { Ctx context.Context Enabled func() bool Name string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } - lockRKEK8sSystemImageInterfaceMockAddFeatureHandler.RLock() + lockRkeK8sSystemImageInterfaceMockAddFeatureHandler.RLock() calls = mock.calls.AddFeatureHandler - lockRKEK8sSystemImageInterfaceMockAddFeatureHandler.RUnlock() + lockRkeK8sSystemImageInterfaceMockAddFeatureHandler.RUnlock() return calls } // AddFeatureLifecycle calls AddFeatureLifecycleFunc. -func (mock *RKEK8sSystemImageInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEK8sSystemImageLifecycle) { +func (mock *RkeK8sSystemImageInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v3.RkeK8sSystemImageLifecycle) { if mock.AddFeatureLifecycleFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.AddFeatureLifecycleFunc: method is nil but RKEK8sSystemImageInterface.AddFeatureLifecycle was just called") + panic("RkeK8sSystemImageInterfaceMock.AddFeatureLifecycleFunc: method is nil but RkeK8sSystemImageInterface.AddFeatureLifecycle was just called") } callInfo := struct { Ctx context.Context Enabled func() bool Name string - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle }{ Ctx: ctx, Enabled: enabled, Name: name, Lifecycle: lifecycle, } - lockRKEK8sSystemImageInterfaceMockAddFeatureLifecycle.Lock() + lockRkeK8sSystemImageInterfaceMockAddFeatureLifecycle.Lock() mock.calls.AddFeatureLifecycle = append(mock.calls.AddFeatureLifecycle, callInfo) - lockRKEK8sSystemImageInterfaceMockAddFeatureLifecycle.Unlock() + lockRkeK8sSystemImageInterfaceMockAddFeatureLifecycle.Unlock() mock.AddFeatureLifecycleFunc(ctx, enabled, name, lifecycle) } // AddFeatureLifecycleCalls gets all the calls that were made to AddFeatureLifecycle. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.AddFeatureLifecycleCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) AddFeatureLifecycleCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.AddFeatureLifecycleCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) AddFeatureLifecycleCalls() []struct { Ctx context.Context Enabled func() bool Name string - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle } { var calls []struct { Ctx context.Context Enabled func() bool Name string - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle } - lockRKEK8sSystemImageInterfaceMockAddFeatureLifecycle.RLock() + lockRkeK8sSystemImageInterfaceMockAddFeatureLifecycle.RLock() calls = mock.calls.AddFeatureLifecycle - lockRKEK8sSystemImageInterfaceMockAddFeatureLifecycle.RUnlock() + lockRkeK8sSystemImageInterfaceMockAddFeatureLifecycle.RUnlock() return calls } // AddHandler calls AddHandlerFunc. -func (mock *RKEK8sSystemImageInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.RKEK8sSystemImageHandlerFunc) { +func (mock *RkeK8sSystemImageInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.RkeK8sSystemImageHandlerFunc) { if mock.AddHandlerFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.AddHandlerFunc: method is nil but RKEK8sSystemImageInterface.AddHandler was just called") + panic("RkeK8sSystemImageInterfaceMock.AddHandlerFunc: method is nil but RkeK8sSystemImageInterface.AddHandler was just called") } callInfo := struct { Ctx context.Context Name string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc }{ Ctx: ctx, Name: name, Sync: sync, } - lockRKEK8sSystemImageInterfaceMockAddHandler.Lock() + lockRkeK8sSystemImageInterfaceMockAddHandler.Lock() mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) - lockRKEK8sSystemImageInterfaceMockAddHandler.Unlock() + lockRkeK8sSystemImageInterfaceMockAddHandler.Unlock() mock.AddHandlerFunc(ctx, name, sync) } // AddHandlerCalls gets all the calls that were made to AddHandler. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.AddHandlerCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) AddHandlerCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.AddHandlerCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) AddHandlerCalls() []struct { Ctx context.Context Name string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } { var calls []struct { Ctx context.Context Name string - Sync v3.RKEK8sSystemImageHandlerFunc + Sync v3.RkeK8sSystemImageHandlerFunc } - lockRKEK8sSystemImageInterfaceMockAddHandler.RLock() + lockRkeK8sSystemImageInterfaceMockAddHandler.RLock() calls = mock.calls.AddHandler - lockRKEK8sSystemImageInterfaceMockAddHandler.RUnlock() + lockRkeK8sSystemImageInterfaceMockAddHandler.RUnlock() return calls } // AddLifecycle calls AddLifecycleFunc. -func (mock *RKEK8sSystemImageInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.RKEK8sSystemImageLifecycle) { +func (mock *RkeK8sSystemImageInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.RkeK8sSystemImageLifecycle) { if mock.AddLifecycleFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.AddLifecycleFunc: method is nil but RKEK8sSystemImageInterface.AddLifecycle was just called") + panic("RkeK8sSystemImageInterfaceMock.AddLifecycleFunc: method is nil but RkeK8sSystemImageInterface.AddLifecycle was just called") } callInfo := struct { Ctx context.Context Name string - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle }{ Ctx: ctx, Name: name, Lifecycle: lifecycle, } - lockRKEK8sSystemImageInterfaceMockAddLifecycle.Lock() + lockRkeK8sSystemImageInterfaceMockAddLifecycle.Lock() mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) - lockRKEK8sSystemImageInterfaceMockAddLifecycle.Unlock() + lockRkeK8sSystemImageInterfaceMockAddLifecycle.Unlock() mock.AddLifecycleFunc(ctx, name, lifecycle) } // AddLifecycleCalls gets all the calls that were made to AddLifecycle. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.AddLifecycleCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) AddLifecycleCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.AddLifecycleCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) AddLifecycleCalls() []struct { Ctx context.Context Name string - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle } { var calls []struct { Ctx context.Context Name string - Lifecycle v3.RKEK8sSystemImageLifecycle + Lifecycle v3.RkeK8sSystemImageLifecycle } - lockRKEK8sSystemImageInterfaceMockAddLifecycle.RLock() + lockRkeK8sSystemImageInterfaceMockAddLifecycle.RLock() calls = mock.calls.AddLifecycle - lockRKEK8sSystemImageInterfaceMockAddLifecycle.RUnlock() + lockRkeK8sSystemImageInterfaceMockAddLifecycle.RUnlock() return calls } // Controller calls ControllerFunc. -func (mock *RKEK8sSystemImageInterfaceMock) Controller() v3.RKEK8sSystemImageController { +func (mock *RkeK8sSystemImageInterfaceMock) Controller() v3.RkeK8sSystemImageController { if mock.ControllerFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.ControllerFunc: method is nil but RKEK8sSystemImageInterface.Controller was just called") + panic("RkeK8sSystemImageInterfaceMock.ControllerFunc: method is nil but RkeK8sSystemImageInterface.Controller was just called") } callInfo := struct { }{} - lockRKEK8sSystemImageInterfaceMockController.Lock() + lockRkeK8sSystemImageInterfaceMockController.Lock() mock.calls.Controller = append(mock.calls.Controller, callInfo) - lockRKEK8sSystemImageInterfaceMockController.Unlock() + lockRkeK8sSystemImageInterfaceMockController.Unlock() return mock.ControllerFunc() } // ControllerCalls gets all the calls that were made to Controller. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.ControllerCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) ControllerCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.ControllerCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) ControllerCalls() []struct { } { var calls []struct { } - lockRKEK8sSystemImageInterfaceMockController.RLock() + lockRkeK8sSystemImageInterfaceMockController.RLock() calls = mock.calls.Controller - lockRKEK8sSystemImageInterfaceMockController.RUnlock() + lockRkeK8sSystemImageInterfaceMockController.RUnlock() return calls } // Create calls CreateFunc. -func (mock *RKEK8sSystemImageInterfaceMock) Create(in1 *v3.RKEK8sSystemImage) (*v3.RKEK8sSystemImage, error) { +func (mock *RkeK8sSystemImageInterfaceMock) Create(in1 *v3.RkeK8sSystemImage) (*v3.RkeK8sSystemImage, error) { if mock.CreateFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.CreateFunc: method is nil but RKEK8sSystemImageInterface.Create was just called") + panic("RkeK8sSystemImageInterfaceMock.CreateFunc: method is nil but RkeK8sSystemImageInterface.Create was just called") } callInfo := struct { - In1 *v3.RKEK8sSystemImage + In1 *v3.RkeK8sSystemImage }{ In1: in1, } - lockRKEK8sSystemImageInterfaceMockCreate.Lock() + lockRkeK8sSystemImageInterfaceMockCreate.Lock() mock.calls.Create = append(mock.calls.Create, callInfo) - lockRKEK8sSystemImageInterfaceMockCreate.Unlock() + lockRkeK8sSystemImageInterfaceMockCreate.Unlock() return mock.CreateFunc(in1) } // CreateCalls gets all the calls that were made to Create. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.CreateCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) CreateCalls() []struct { - In1 *v3.RKEK8sSystemImage +// len(mockedRkeK8sSystemImageInterface.CreateCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) CreateCalls() []struct { + In1 *v3.RkeK8sSystemImage } { var calls []struct { - In1 *v3.RKEK8sSystemImage + In1 *v3.RkeK8sSystemImage } - lockRKEK8sSystemImageInterfaceMockCreate.RLock() + lockRkeK8sSystemImageInterfaceMockCreate.RLock() calls = mock.calls.Create - lockRKEK8sSystemImageInterfaceMockCreate.RUnlock() + lockRkeK8sSystemImageInterfaceMockCreate.RUnlock() return calls } // Delete calls DeleteFunc. -func (mock *RKEK8sSystemImageInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { +func (mock *RkeK8sSystemImageInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { if mock.DeleteFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.DeleteFunc: method is nil but RKEK8sSystemImageInterface.Delete was just called") + panic("RkeK8sSystemImageInterfaceMock.DeleteFunc: method is nil but RkeK8sSystemImageInterface.Delete was just called") } callInfo := struct { Name string @@ -1451,16 +1359,16 @@ func (mock *RKEK8sSystemImageInterfaceMock) Delete(name string, options *v1.Dele Name: name, Options: options, } - lockRKEK8sSystemImageInterfaceMockDelete.Lock() + lockRkeK8sSystemImageInterfaceMockDelete.Lock() mock.calls.Delete = append(mock.calls.Delete, callInfo) - lockRKEK8sSystemImageInterfaceMockDelete.Unlock() + lockRkeK8sSystemImageInterfaceMockDelete.Unlock() return mock.DeleteFunc(name, options) } // DeleteCalls gets all the calls that were made to Delete. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.DeleteCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) DeleteCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.DeleteCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) DeleteCalls() []struct { Name string Options *v1.DeleteOptions } { @@ -1468,16 +1376,16 @@ func (mock *RKEK8sSystemImageInterfaceMock) DeleteCalls() []struct { Name string Options *v1.DeleteOptions } - lockRKEK8sSystemImageInterfaceMockDelete.RLock() + lockRkeK8sSystemImageInterfaceMockDelete.RLock() calls = mock.calls.Delete - lockRKEK8sSystemImageInterfaceMockDelete.RUnlock() + lockRkeK8sSystemImageInterfaceMockDelete.RUnlock() return calls } // DeleteCollection calls DeleteCollectionFunc. -func (mock *RKEK8sSystemImageInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +func (mock *RkeK8sSystemImageInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { if mock.DeleteCollectionFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.DeleteCollectionFunc: method is nil but RKEK8sSystemImageInterface.DeleteCollection was just called") + panic("RkeK8sSystemImageInterfaceMock.DeleteCollectionFunc: method is nil but RkeK8sSystemImageInterface.DeleteCollection was just called") } callInfo := struct { DeleteOpts *v1.DeleteOptions @@ -1486,16 +1394,16 @@ func (mock *RKEK8sSystemImageInterfaceMock) DeleteCollection(deleteOpts *v1.Dele DeleteOpts: deleteOpts, ListOpts: listOpts, } - lockRKEK8sSystemImageInterfaceMockDeleteCollection.Lock() + lockRkeK8sSystemImageInterfaceMockDeleteCollection.Lock() mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) - lockRKEK8sSystemImageInterfaceMockDeleteCollection.Unlock() + lockRkeK8sSystemImageInterfaceMockDeleteCollection.Unlock() return mock.DeleteCollectionFunc(deleteOpts, listOpts) } // DeleteCollectionCalls gets all the calls that were made to DeleteCollection. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.DeleteCollectionCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) DeleteCollectionCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.DeleteCollectionCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) DeleteCollectionCalls() []struct { DeleteOpts *v1.DeleteOptions ListOpts v1.ListOptions } { @@ -1503,16 +1411,16 @@ func (mock *RKEK8sSystemImageInterfaceMock) DeleteCollectionCalls() []struct { DeleteOpts *v1.DeleteOptions ListOpts v1.ListOptions } - lockRKEK8sSystemImageInterfaceMockDeleteCollection.RLock() + lockRkeK8sSystemImageInterfaceMockDeleteCollection.RLock() calls = mock.calls.DeleteCollection - lockRKEK8sSystemImageInterfaceMockDeleteCollection.RUnlock() + lockRkeK8sSystemImageInterfaceMockDeleteCollection.RUnlock() return calls } // DeleteNamespaced calls DeleteNamespacedFunc. -func (mock *RKEK8sSystemImageInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { +func (mock *RkeK8sSystemImageInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { if mock.DeleteNamespacedFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.DeleteNamespacedFunc: method is nil but RKEK8sSystemImageInterface.DeleteNamespaced was just called") + panic("RkeK8sSystemImageInterfaceMock.DeleteNamespacedFunc: method is nil but RkeK8sSystemImageInterface.DeleteNamespaced was just called") } callInfo := struct { Namespace string @@ -1523,16 +1431,16 @@ func (mock *RKEK8sSystemImageInterfaceMock) DeleteNamespaced(namespace string, n Name: name, Options: options, } - lockRKEK8sSystemImageInterfaceMockDeleteNamespaced.Lock() + lockRkeK8sSystemImageInterfaceMockDeleteNamespaced.Lock() mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) - lockRKEK8sSystemImageInterfaceMockDeleteNamespaced.Unlock() + lockRkeK8sSystemImageInterfaceMockDeleteNamespaced.Unlock() return mock.DeleteNamespacedFunc(namespace, name, options) } // DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.DeleteNamespacedCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) DeleteNamespacedCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.DeleteNamespacedCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) DeleteNamespacedCalls() []struct { Namespace string Name string Options *v1.DeleteOptions @@ -1542,16 +1450,16 @@ func (mock *RKEK8sSystemImageInterfaceMock) DeleteNamespacedCalls() []struct { Name string Options *v1.DeleteOptions } - lockRKEK8sSystemImageInterfaceMockDeleteNamespaced.RLock() + lockRkeK8sSystemImageInterfaceMockDeleteNamespaced.RLock() calls = mock.calls.DeleteNamespaced - lockRKEK8sSystemImageInterfaceMockDeleteNamespaced.RUnlock() + lockRkeK8sSystemImageInterfaceMockDeleteNamespaced.RUnlock() return calls } // Get calls GetFunc. -func (mock *RKEK8sSystemImageInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.RKEK8sSystemImage, error) { +func (mock *RkeK8sSystemImageInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.RkeK8sSystemImage, error) { if mock.GetFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.GetFunc: method is nil but RKEK8sSystemImageInterface.Get was just called") + panic("RkeK8sSystemImageInterfaceMock.GetFunc: method is nil but RkeK8sSystemImageInterface.Get was just called") } callInfo := struct { Name string @@ -1560,16 +1468,16 @@ func (mock *RKEK8sSystemImageInterfaceMock) Get(name string, opts v1.GetOptions) Name: name, Opts: opts, } - lockRKEK8sSystemImageInterfaceMockGet.Lock() + lockRkeK8sSystemImageInterfaceMockGet.Lock() mock.calls.Get = append(mock.calls.Get, callInfo) - lockRKEK8sSystemImageInterfaceMockGet.Unlock() + lockRkeK8sSystemImageInterfaceMockGet.Unlock() return mock.GetFunc(name, opts) } // GetCalls gets all the calls that were made to Get. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.GetCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) GetCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.GetCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) GetCalls() []struct { Name string Opts v1.GetOptions } { @@ -1577,16 +1485,16 @@ func (mock *RKEK8sSystemImageInterfaceMock) GetCalls() []struct { Name string Opts v1.GetOptions } - lockRKEK8sSystemImageInterfaceMockGet.RLock() + lockRkeK8sSystemImageInterfaceMockGet.RLock() calls = mock.calls.Get - lockRKEK8sSystemImageInterfaceMockGet.RUnlock() + lockRkeK8sSystemImageInterfaceMockGet.RUnlock() return calls } // GetNamespaced calls GetNamespacedFunc. -func (mock *RKEK8sSystemImageInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.RKEK8sSystemImage, error) { +func (mock *RkeK8sSystemImageInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.RkeK8sSystemImage, error) { if mock.GetNamespacedFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.GetNamespacedFunc: method is nil but RKEK8sSystemImageInterface.GetNamespaced was just called") + panic("RkeK8sSystemImageInterfaceMock.GetNamespacedFunc: method is nil but RkeK8sSystemImageInterface.GetNamespaced was just called") } callInfo := struct { Namespace string @@ -1597,16 +1505,16 @@ func (mock *RKEK8sSystemImageInterfaceMock) GetNamespaced(namespace string, name Name: name, Opts: opts, } - lockRKEK8sSystemImageInterfaceMockGetNamespaced.Lock() + lockRkeK8sSystemImageInterfaceMockGetNamespaced.Lock() mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) - lockRKEK8sSystemImageInterfaceMockGetNamespaced.Unlock() + lockRkeK8sSystemImageInterfaceMockGetNamespaced.Unlock() return mock.GetNamespacedFunc(namespace, name, opts) } // GetNamespacedCalls gets all the calls that were made to GetNamespaced. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.GetNamespacedCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) GetNamespacedCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.GetNamespacedCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) GetNamespacedCalls() []struct { Namespace string Name string Opts v1.GetOptions @@ -1616,47 +1524,47 @@ func (mock *RKEK8sSystemImageInterfaceMock) GetNamespacedCalls() []struct { Name string Opts v1.GetOptions } - lockRKEK8sSystemImageInterfaceMockGetNamespaced.RLock() + lockRkeK8sSystemImageInterfaceMockGetNamespaced.RLock() calls = mock.calls.GetNamespaced - lockRKEK8sSystemImageInterfaceMockGetNamespaced.RUnlock() + lockRkeK8sSystemImageInterfaceMockGetNamespaced.RUnlock() return calls } // List calls ListFunc. -func (mock *RKEK8sSystemImageInterfaceMock) List(opts v1.ListOptions) (*v3.RKEK8sSystemImageList, error) { +func (mock *RkeK8sSystemImageInterfaceMock) List(opts v1.ListOptions) (*v3.RkeK8sSystemImageList, error) { if mock.ListFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.ListFunc: method is nil but RKEK8sSystemImageInterface.List was just called") + panic("RkeK8sSystemImageInterfaceMock.ListFunc: method is nil but RkeK8sSystemImageInterface.List was just called") } callInfo := struct { Opts v1.ListOptions }{ Opts: opts, } - lockRKEK8sSystemImageInterfaceMockList.Lock() + lockRkeK8sSystemImageInterfaceMockList.Lock() mock.calls.List = append(mock.calls.List, callInfo) - lockRKEK8sSystemImageInterfaceMockList.Unlock() + lockRkeK8sSystemImageInterfaceMockList.Unlock() return mock.ListFunc(opts) } // ListCalls gets all the calls that were made to List. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.ListCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) ListCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.ListCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) ListCalls() []struct { Opts v1.ListOptions } { var calls []struct { Opts v1.ListOptions } - lockRKEK8sSystemImageInterfaceMockList.RLock() + lockRkeK8sSystemImageInterfaceMockList.RLock() calls = mock.calls.List - lockRKEK8sSystemImageInterfaceMockList.RUnlock() + lockRkeK8sSystemImageInterfaceMockList.RUnlock() return calls } // ListNamespaced calls ListNamespacedFunc. -func (mock *RKEK8sSystemImageInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v3.RKEK8sSystemImageList, error) { +func (mock *RkeK8sSystemImageInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v3.RkeK8sSystemImageList, error) { if mock.ListNamespacedFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.ListNamespacedFunc: method is nil but RKEK8sSystemImageInterface.ListNamespaced was just called") + panic("RkeK8sSystemImageInterfaceMock.ListNamespacedFunc: method is nil but RkeK8sSystemImageInterface.ListNamespaced was just called") } callInfo := struct { Namespace string @@ -1665,16 +1573,16 @@ func (mock *RKEK8sSystemImageInterfaceMock) ListNamespaced(namespace string, opt Namespace: namespace, Opts: opts, } - lockRKEK8sSystemImageInterfaceMockListNamespaced.Lock() + lockRkeK8sSystemImageInterfaceMockListNamespaced.Lock() mock.calls.ListNamespaced = append(mock.calls.ListNamespaced, callInfo) - lockRKEK8sSystemImageInterfaceMockListNamespaced.Unlock() + lockRkeK8sSystemImageInterfaceMockListNamespaced.Unlock() return mock.ListNamespacedFunc(namespace, opts) } // ListNamespacedCalls gets all the calls that were made to ListNamespaced. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.ListNamespacedCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) ListNamespacedCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.ListNamespacedCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) ListNamespacedCalls() []struct { Namespace string Opts v1.ListOptions } { @@ -1682,164 +1590,164 @@ func (mock *RKEK8sSystemImageInterfaceMock) ListNamespacedCalls() []struct { Namespace string Opts v1.ListOptions } - lockRKEK8sSystemImageInterfaceMockListNamespaced.RLock() + lockRkeK8sSystemImageInterfaceMockListNamespaced.RLock() calls = mock.calls.ListNamespaced - lockRKEK8sSystemImageInterfaceMockListNamespaced.RUnlock() + lockRkeK8sSystemImageInterfaceMockListNamespaced.RUnlock() return calls } // ObjectClient calls ObjectClientFunc. -func (mock *RKEK8sSystemImageInterfaceMock) ObjectClient() *objectclient.ObjectClient { +func (mock *RkeK8sSystemImageInterfaceMock) ObjectClient() *objectclient.ObjectClient { if mock.ObjectClientFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.ObjectClientFunc: method is nil but RKEK8sSystemImageInterface.ObjectClient was just called") + panic("RkeK8sSystemImageInterfaceMock.ObjectClientFunc: method is nil but RkeK8sSystemImageInterface.ObjectClient was just called") } callInfo := struct { }{} - lockRKEK8sSystemImageInterfaceMockObjectClient.Lock() + lockRkeK8sSystemImageInterfaceMockObjectClient.Lock() mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) - lockRKEK8sSystemImageInterfaceMockObjectClient.Unlock() + lockRkeK8sSystemImageInterfaceMockObjectClient.Unlock() return mock.ObjectClientFunc() } // ObjectClientCalls gets all the calls that were made to ObjectClient. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.ObjectClientCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) ObjectClientCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.ObjectClientCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) ObjectClientCalls() []struct { } { var calls []struct { } - lockRKEK8sSystemImageInterfaceMockObjectClient.RLock() + lockRkeK8sSystemImageInterfaceMockObjectClient.RLock() calls = mock.calls.ObjectClient - lockRKEK8sSystemImageInterfaceMockObjectClient.RUnlock() + lockRkeK8sSystemImageInterfaceMockObjectClient.RUnlock() return calls } // Update calls UpdateFunc. -func (mock *RKEK8sSystemImageInterfaceMock) Update(in1 *v3.RKEK8sSystemImage) (*v3.RKEK8sSystemImage, error) { +func (mock *RkeK8sSystemImageInterfaceMock) Update(in1 *v3.RkeK8sSystemImage) (*v3.RkeK8sSystemImage, error) { if mock.UpdateFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.UpdateFunc: method is nil but RKEK8sSystemImageInterface.Update was just called") + panic("RkeK8sSystemImageInterfaceMock.UpdateFunc: method is nil but RkeK8sSystemImageInterface.Update was just called") } callInfo := struct { - In1 *v3.RKEK8sSystemImage + In1 *v3.RkeK8sSystemImage }{ In1: in1, } - lockRKEK8sSystemImageInterfaceMockUpdate.Lock() + lockRkeK8sSystemImageInterfaceMockUpdate.Lock() mock.calls.Update = append(mock.calls.Update, callInfo) - lockRKEK8sSystemImageInterfaceMockUpdate.Unlock() + lockRkeK8sSystemImageInterfaceMockUpdate.Unlock() return mock.UpdateFunc(in1) } // UpdateCalls gets all the calls that were made to Update. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.UpdateCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) UpdateCalls() []struct { - In1 *v3.RKEK8sSystemImage +// len(mockedRkeK8sSystemImageInterface.UpdateCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) UpdateCalls() []struct { + In1 *v3.RkeK8sSystemImage } { var calls []struct { - In1 *v3.RKEK8sSystemImage + In1 *v3.RkeK8sSystemImage } - lockRKEK8sSystemImageInterfaceMockUpdate.RLock() + lockRkeK8sSystemImageInterfaceMockUpdate.RLock() calls = mock.calls.Update - lockRKEK8sSystemImageInterfaceMockUpdate.RUnlock() + lockRkeK8sSystemImageInterfaceMockUpdate.RUnlock() return calls } // Watch calls WatchFunc. -func (mock *RKEK8sSystemImageInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { +func (mock *RkeK8sSystemImageInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { if mock.WatchFunc == nil { - panic("RKEK8sSystemImageInterfaceMock.WatchFunc: method is nil but RKEK8sSystemImageInterface.Watch was just called") + panic("RkeK8sSystemImageInterfaceMock.WatchFunc: method is nil but RkeK8sSystemImageInterface.Watch was just called") } callInfo := struct { Opts v1.ListOptions }{ Opts: opts, } - lockRKEK8sSystemImageInterfaceMockWatch.Lock() + lockRkeK8sSystemImageInterfaceMockWatch.Lock() mock.calls.Watch = append(mock.calls.Watch, callInfo) - lockRKEK8sSystemImageInterfaceMockWatch.Unlock() + lockRkeK8sSystemImageInterfaceMockWatch.Unlock() return mock.WatchFunc(opts) } // WatchCalls gets all the calls that were made to Watch. // Check the length with: -// len(mockedRKEK8sSystemImageInterface.WatchCalls()) -func (mock *RKEK8sSystemImageInterfaceMock) WatchCalls() []struct { +// len(mockedRkeK8sSystemImageInterface.WatchCalls()) +func (mock *RkeK8sSystemImageInterfaceMock) WatchCalls() []struct { Opts v1.ListOptions } { var calls []struct { Opts v1.ListOptions } - lockRKEK8sSystemImageInterfaceMockWatch.RLock() + lockRkeK8sSystemImageInterfaceMockWatch.RLock() calls = mock.calls.Watch - lockRKEK8sSystemImageInterfaceMockWatch.RUnlock() + lockRkeK8sSystemImageInterfaceMockWatch.RUnlock() return calls } var ( - lockRKEK8sSystemImagesGetterMockRKEK8sSystemImages sync.RWMutex + lockRkeK8sSystemImagesGetterMockRkeK8sSystemImages sync.RWMutex ) -// Ensure, that RKEK8sSystemImagesGetterMock does implement RKEK8sSystemImagesGetter. +// Ensure, that RkeK8sSystemImagesGetterMock does implement RkeK8sSystemImagesGetter. // If this is not the case, regenerate this file with moq. -var _ v3.RKEK8sSystemImagesGetter = &RKEK8sSystemImagesGetterMock{} +var _ v3.RkeK8sSystemImagesGetter = &RkeK8sSystemImagesGetterMock{} -// RKEK8sSystemImagesGetterMock is a mock implementation of RKEK8sSystemImagesGetter. +// RkeK8sSystemImagesGetterMock is a mock implementation of RkeK8sSystemImagesGetter. // -// func TestSomethingThatUsesRKEK8sSystemImagesGetter(t *testing.T) { +// func TestSomethingThatUsesRkeK8sSystemImagesGetter(t *testing.T) { // -// // make and configure a mocked RKEK8sSystemImagesGetter -// mockedRKEK8sSystemImagesGetter := &RKEK8sSystemImagesGetterMock{ -// RKEK8sSystemImagesFunc: func(namespace string) v3.RKEK8sSystemImageInterface { -// panic("mock out the RKEK8sSystemImages method") +// // make and configure a mocked RkeK8sSystemImagesGetter +// mockedRkeK8sSystemImagesGetter := &RkeK8sSystemImagesGetterMock{ +// RkeK8sSystemImagesFunc: func(namespace string) v3.RkeK8sSystemImageInterface { +// panic("mock out the RkeK8sSystemImages method") // }, // } // -// // use mockedRKEK8sSystemImagesGetter in code that requires RKEK8sSystemImagesGetter +// // use mockedRkeK8sSystemImagesGetter in code that requires RkeK8sSystemImagesGetter // // and then make assertions. // // } -type RKEK8sSystemImagesGetterMock struct { - // RKEK8sSystemImagesFunc mocks the RKEK8sSystemImages method. - RKEK8sSystemImagesFunc func(namespace string) v3.RKEK8sSystemImageInterface +type RkeK8sSystemImagesGetterMock struct { + // RkeK8sSystemImagesFunc mocks the RkeK8sSystemImages method. + RkeK8sSystemImagesFunc func(namespace string) v3.RkeK8sSystemImageInterface // calls tracks calls to the methods. calls struct { - // RKEK8sSystemImages holds details about calls to the RKEK8sSystemImages method. - RKEK8sSystemImages []struct { + // RkeK8sSystemImages holds details about calls to the RkeK8sSystemImages method. + RkeK8sSystemImages []struct { // Namespace is the namespace argument value. Namespace string } } } -// RKEK8sSystemImages calls RKEK8sSystemImagesFunc. -func (mock *RKEK8sSystemImagesGetterMock) RKEK8sSystemImages(namespace string) v3.RKEK8sSystemImageInterface { - if mock.RKEK8sSystemImagesFunc == nil { - panic("RKEK8sSystemImagesGetterMock.RKEK8sSystemImagesFunc: method is nil but RKEK8sSystemImagesGetter.RKEK8sSystemImages was just called") +// RkeK8sSystemImages calls RkeK8sSystemImagesFunc. +func (mock *RkeK8sSystemImagesGetterMock) RkeK8sSystemImages(namespace string) v3.RkeK8sSystemImageInterface { + if mock.RkeK8sSystemImagesFunc == nil { + panic("RkeK8sSystemImagesGetterMock.RkeK8sSystemImagesFunc: method is nil but RkeK8sSystemImagesGetter.RkeK8sSystemImages was just called") } callInfo := struct { Namespace string }{ Namespace: namespace, } - lockRKEK8sSystemImagesGetterMockRKEK8sSystemImages.Lock() - mock.calls.RKEK8sSystemImages = append(mock.calls.RKEK8sSystemImages, callInfo) - lockRKEK8sSystemImagesGetterMockRKEK8sSystemImages.Unlock() - return mock.RKEK8sSystemImagesFunc(namespace) + lockRkeK8sSystemImagesGetterMockRkeK8sSystemImages.Lock() + mock.calls.RkeK8sSystemImages = append(mock.calls.RkeK8sSystemImages, callInfo) + lockRkeK8sSystemImagesGetterMockRkeK8sSystemImages.Unlock() + return mock.RkeK8sSystemImagesFunc(namespace) } -// RKEK8sSystemImagesCalls gets all the calls that were made to RKEK8sSystemImages. +// RkeK8sSystemImagesCalls gets all the calls that were made to RkeK8sSystemImages. // Check the length with: -// len(mockedRKEK8sSystemImagesGetter.RKEK8sSystemImagesCalls()) -func (mock *RKEK8sSystemImagesGetterMock) RKEK8sSystemImagesCalls() []struct { +// len(mockedRkeK8sSystemImagesGetter.RkeK8sSystemImagesCalls()) +func (mock *RkeK8sSystemImagesGetterMock) RkeK8sSystemImagesCalls() []struct { Namespace string } { var calls []struct { Namespace string } - lockRKEK8sSystemImagesGetterMockRKEK8sSystemImages.RLock() - calls = mock.calls.RKEK8sSystemImages - lockRKEK8sSystemImagesGetterMockRKEK8sSystemImages.RUnlock() + lockRkeK8sSystemImagesGetterMockRkeK8sSystemImages.RLock() + calls = mock.calls.RkeK8sSystemImages + lockRkeK8sSystemImagesGetterMockRkeK8sSystemImages.RUnlock() return calls } diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_role_template_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_role_template_mock.go index d65b07bb..2c89de17 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_role_template_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_role_template_mock.go @@ -150,8 +150,6 @@ var ( lockRoleTemplateControllerMockGeneric sync.RWMutex lockRoleTemplateControllerMockInformer sync.RWMutex lockRoleTemplateControllerMockLister sync.RWMutex - lockRoleTemplateControllerMockStart sync.RWMutex - lockRoleTemplateControllerMockSync sync.RWMutex ) // Ensure, that RoleTemplateControllerMock does implement RoleTemplateController. @@ -191,12 +189,6 @@ var _ v3.RoleTemplateController = &RoleTemplateControllerMock{} // ListerFunc: func() v3.RoleTemplateLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedRoleTemplateController in code that requires RoleTemplateController @@ -231,12 +223,6 @@ type RoleTemplateControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.RoleTemplateLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type RoleTemplateControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *RoleTemplateControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *RoleTemplateControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("RoleTemplateControllerMock.StartFunc: method is nil but RoleTemplateController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockRoleTemplateControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockRoleTemplateControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedRoleTemplateController.StartCalls()) -func (mock *RoleTemplateControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockRoleTemplateControllerMockStart.RLock() - calls = mock.calls.Start - lockRoleTemplateControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *RoleTemplateControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("RoleTemplateControllerMock.SyncFunc: method is nil but RoleTemplateController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockRoleTemplateControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockRoleTemplateControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedRoleTemplateController.SyncCalls()) -func (mock *RoleTemplateControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockRoleTemplateControllerMockSync.RLock() - calls = mock.calls.Sync - lockRoleTemplateControllerMockSync.RUnlock() - return calls -} - var ( lockRoleTemplateInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockRoleTemplateInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_setting_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_setting_mock.go index f763d01e..4661c154 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_setting_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_setting_mock.go @@ -150,8 +150,6 @@ var ( lockSettingControllerMockGeneric sync.RWMutex lockSettingControllerMockInformer sync.RWMutex lockSettingControllerMockLister sync.RWMutex - lockSettingControllerMockStart sync.RWMutex - lockSettingControllerMockSync sync.RWMutex ) // Ensure, that SettingControllerMock does implement SettingController. @@ -191,12 +189,6 @@ var _ v3.SettingController = &SettingControllerMock{} // ListerFunc: func() v3.SettingLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedSettingController in code that requires SettingController @@ -231,12 +223,6 @@ type SettingControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.SettingLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type SettingControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *SettingControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *SettingControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("SettingControllerMock.StartFunc: method is nil but SettingController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockSettingControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockSettingControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedSettingController.StartCalls()) -func (mock *SettingControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockSettingControllerMockStart.RLock() - calls = mock.calls.Start - lockSettingControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *SettingControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("SettingControllerMock.SyncFunc: method is nil but SettingController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockSettingControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockSettingControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedSettingController.SyncCalls()) -func (mock *SettingControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockSettingControllerMockSync.RLock() - calls = mock.calls.Sync - lockSettingControllerMockSync.RUnlock() - return calls -} - var ( lockSettingInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockSettingInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_template_content_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_template_content_mock.go index 9cb2cf3e..63ddae92 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_template_content_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_template_content_mock.go @@ -150,8 +150,6 @@ var ( lockTemplateContentControllerMockGeneric sync.RWMutex lockTemplateContentControllerMockInformer sync.RWMutex lockTemplateContentControllerMockLister sync.RWMutex - lockTemplateContentControllerMockStart sync.RWMutex - lockTemplateContentControllerMockSync sync.RWMutex ) // Ensure, that TemplateContentControllerMock does implement TemplateContentController. @@ -191,12 +189,6 @@ var _ v3.TemplateContentController = &TemplateContentControllerMock{} // ListerFunc: func() v3.TemplateContentLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedTemplateContentController in code that requires TemplateContentController @@ -231,12 +223,6 @@ type TemplateContentControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.TemplateContentLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type TemplateContentControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *TemplateContentControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *TemplateContentControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("TemplateContentControllerMock.StartFunc: method is nil but TemplateContentController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockTemplateContentControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockTemplateContentControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedTemplateContentController.StartCalls()) -func (mock *TemplateContentControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockTemplateContentControllerMockStart.RLock() - calls = mock.calls.Start - lockTemplateContentControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *TemplateContentControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("TemplateContentControllerMock.SyncFunc: method is nil but TemplateContentController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockTemplateContentControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockTemplateContentControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedTemplateContentController.SyncCalls()) -func (mock *TemplateContentControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockTemplateContentControllerMockSync.RLock() - calls = mock.calls.Sync - lockTemplateContentControllerMockSync.RUnlock() - return calls -} - var ( lockTemplateContentInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockTemplateContentInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_template_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_template_mock.go index c1b04990..353cc7cb 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_template_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_template_mock.go @@ -150,8 +150,6 @@ var ( lockTemplateControllerMockGeneric sync.RWMutex lockTemplateControllerMockInformer sync.RWMutex lockTemplateControllerMockLister sync.RWMutex - lockTemplateControllerMockStart sync.RWMutex - lockTemplateControllerMockSync sync.RWMutex ) // Ensure, that TemplateControllerMock does implement TemplateController. @@ -191,12 +189,6 @@ var _ v3.TemplateController = &TemplateControllerMock{} // ListerFunc: func() v3.TemplateLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedTemplateController in code that requires TemplateController @@ -231,12 +223,6 @@ type TemplateControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.TemplateLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type TemplateControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *TemplateControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *TemplateControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("TemplateControllerMock.StartFunc: method is nil but TemplateController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockTemplateControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockTemplateControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedTemplateController.StartCalls()) -func (mock *TemplateControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockTemplateControllerMockStart.RLock() - calls = mock.calls.Start - lockTemplateControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *TemplateControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("TemplateControllerMock.SyncFunc: method is nil but TemplateController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockTemplateControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockTemplateControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedTemplateController.SyncCalls()) -func (mock *TemplateControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockTemplateControllerMockSync.RLock() - calls = mock.calls.Sync - lockTemplateControllerMockSync.RUnlock() - return calls -} - var ( lockTemplateInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockTemplateInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_template_version_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_template_version_mock.go index e1aa1b1d..fd18f85b 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_template_version_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_template_version_mock.go @@ -150,8 +150,6 @@ var ( lockTemplateVersionControllerMockGeneric sync.RWMutex lockTemplateVersionControllerMockInformer sync.RWMutex lockTemplateVersionControllerMockLister sync.RWMutex - lockTemplateVersionControllerMockStart sync.RWMutex - lockTemplateVersionControllerMockSync sync.RWMutex ) // Ensure, that TemplateVersionControllerMock does implement TemplateVersionController. @@ -191,12 +189,6 @@ var _ v3.TemplateVersionController = &TemplateVersionControllerMock{} // ListerFunc: func() v3.TemplateVersionLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedTemplateVersionController in code that requires TemplateVersionController @@ -231,12 +223,6 @@ type TemplateVersionControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.TemplateVersionLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type TemplateVersionControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *TemplateVersionControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *TemplateVersionControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("TemplateVersionControllerMock.StartFunc: method is nil but TemplateVersionController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockTemplateVersionControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockTemplateVersionControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedTemplateVersionController.StartCalls()) -func (mock *TemplateVersionControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockTemplateVersionControllerMockStart.RLock() - calls = mock.calls.Start - lockTemplateVersionControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *TemplateVersionControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("TemplateVersionControllerMock.SyncFunc: method is nil but TemplateVersionController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockTemplateVersionControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockTemplateVersionControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedTemplateVersionController.SyncCalls()) -func (mock *TemplateVersionControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockTemplateVersionControllerMockSync.RLock() - calls = mock.calls.Sync - lockTemplateVersionControllerMockSync.RUnlock() - return calls -} - var ( lockTemplateVersionInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockTemplateVersionInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_token_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_token_mock.go index 79619b5f..6fc6df37 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_token_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_token_mock.go @@ -150,8 +150,6 @@ var ( lockTokenControllerMockGeneric sync.RWMutex lockTokenControllerMockInformer sync.RWMutex lockTokenControllerMockLister sync.RWMutex - lockTokenControllerMockStart sync.RWMutex - lockTokenControllerMockSync sync.RWMutex ) // Ensure, that TokenControllerMock does implement TokenController. @@ -191,12 +189,6 @@ var _ v3.TokenController = &TokenControllerMock{} // ListerFunc: func() v3.TokenLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedTokenController in code that requires TokenController @@ -231,12 +223,6 @@ type TokenControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.TokenLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type TokenControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *TokenControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *TokenControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("TokenControllerMock.StartFunc: method is nil but TokenController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockTokenControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockTokenControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedTokenController.StartCalls()) -func (mock *TokenControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockTokenControllerMockStart.RLock() - calls = mock.calls.Start - lockTokenControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *TokenControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("TokenControllerMock.SyncFunc: method is nil but TokenController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockTokenControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockTokenControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedTokenController.SyncCalls()) -func (mock *TokenControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockTokenControllerMockSync.RLock() - calls = mock.calls.Sync - lockTokenControllerMockSync.RUnlock() - return calls -} - var ( lockTokenInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockTokenInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_user_attribute_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_user_attribute_mock.go index 20f059be..a2355a04 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_user_attribute_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_user_attribute_mock.go @@ -150,8 +150,6 @@ var ( lockUserAttributeControllerMockGeneric sync.RWMutex lockUserAttributeControllerMockInformer sync.RWMutex lockUserAttributeControllerMockLister sync.RWMutex - lockUserAttributeControllerMockStart sync.RWMutex - lockUserAttributeControllerMockSync sync.RWMutex ) // Ensure, that UserAttributeControllerMock does implement UserAttributeController. @@ -191,12 +189,6 @@ var _ v3.UserAttributeController = &UserAttributeControllerMock{} // ListerFunc: func() v3.UserAttributeLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedUserAttributeController in code that requires UserAttributeController @@ -231,12 +223,6 @@ type UserAttributeControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.UserAttributeLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type UserAttributeControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *UserAttributeControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *UserAttributeControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("UserAttributeControllerMock.StartFunc: method is nil but UserAttributeController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockUserAttributeControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockUserAttributeControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedUserAttributeController.StartCalls()) -func (mock *UserAttributeControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockUserAttributeControllerMockStart.RLock() - calls = mock.calls.Start - lockUserAttributeControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *UserAttributeControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("UserAttributeControllerMock.SyncFunc: method is nil but UserAttributeController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockUserAttributeControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockUserAttributeControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedUserAttributeController.SyncCalls()) -func (mock *UserAttributeControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockUserAttributeControllerMockSync.RLock() - calls = mock.calls.Sync - lockUserAttributeControllerMockSync.RUnlock() - return calls -} - var ( lockUserAttributeInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockUserAttributeInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_user_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_user_mock.go index 8dcfe485..3760eb25 100644 --- a/apis/management.cattle.io/v3/fakes/zz_generated_user_mock.go +++ b/apis/management.cattle.io/v3/fakes/zz_generated_user_mock.go @@ -150,8 +150,6 @@ var ( lockUserControllerMockGeneric sync.RWMutex lockUserControllerMockInformer sync.RWMutex lockUserControllerMockLister sync.RWMutex - lockUserControllerMockStart sync.RWMutex - lockUserControllerMockSync sync.RWMutex ) // Ensure, that UserControllerMock does implement UserController. @@ -191,12 +189,6 @@ var _ v3.UserController = &UserControllerMock{} // ListerFunc: func() v3.UserLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedUserController in code that requires UserController @@ -231,12 +223,6 @@ type UserControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.UserLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type UserControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *UserControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *UserControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("UserControllerMock.StartFunc: method is nil but UserController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockUserControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockUserControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedUserController.StartCalls()) -func (mock *UserControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockUserControllerMockStart.RLock() - calls = mock.calls.Start - lockUserControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *UserControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("UserControllerMock.SyncFunc: method is nil but UserController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockUserControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockUserControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedUserController.SyncCalls()) -func (mock *UserControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockUserControllerMockSync.RLock() - calls = mock.calls.Sync - lockUserControllerMockSync.RUnlock() - return calls -} - var ( lockUserInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockUserInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go b/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go index 09762674..90f64ff7 100644 --- a/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_auth_config_controller.go @@ -73,8 +73,6 @@ type AuthConfigController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler AuthConfigHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type AuthConfigInterface interface { @@ -125,7 +123,7 @@ func (l *authConfigLister) Get(namespace, name string) (*AuthConfig, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: AuthConfigGroupVersionKind.Group, - Resource: "authConfig", + Resource: AuthConfigGroupVersionResource.Resource, }, key) } return obj.(*AuthConfig), nil @@ -209,25 +207,12 @@ func (c authConfigFactory) List() runtime.Object { } func (s *authConfigClient) Controller() AuthConfigController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.authConfigControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(AuthConfigGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(AuthConfigGroupVersionResource, AuthConfigGroupVersionKind.Kind, false)) - c = &authConfigController{ + return &authConfigController{ GenericController: genericController, } - - s.client.authConfigControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type authConfigClient struct { @@ -261,6 +246,11 @@ func (s *authConfigClient) Update(o *AuthConfig) (*AuthConfig, error) { return obj.(*AuthConfig), err } +func (s *authConfigClient) UpdateStatus(o *AuthConfig) (*AuthConfig, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*AuthConfig), err +} + func (s *authConfigClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_catalog_controller.go b/apis/management.cattle.io/v3/zz_generated_catalog_controller.go index 74ed2d7b..bee22148 100644 --- a/apis/management.cattle.io/v3/zz_generated_catalog_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_catalog_controller.go @@ -73,8 +73,6 @@ type CatalogController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CatalogHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CatalogInterface interface { @@ -125,7 +123,7 @@ func (l *catalogLister) Get(namespace, name string) (*Catalog, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CatalogGroupVersionKind.Group, - Resource: "catalog", + Resource: CatalogGroupVersionResource.Resource, }, key) } return obj.(*Catalog), nil @@ -209,25 +207,12 @@ func (c catalogFactory) List() runtime.Object { } func (s *catalogClient) Controller() CatalogController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.catalogControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CatalogGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CatalogGroupVersionResource, CatalogGroupVersionKind.Kind, false)) - c = &catalogController{ + return &catalogController{ GenericController: genericController, } - - s.client.catalogControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type catalogClient struct { @@ -261,6 +246,11 @@ func (s *catalogClient) Update(o *Catalog) (*Catalog, error) { return obj.(*Catalog), err } +func (s *catalogClient) UpdateStatus(o *Catalog) (*Catalog, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Catalog), err +} + func (s *catalogClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_catalog_template_controller.go b/apis/management.cattle.io/v3/zz_generated_catalog_template_controller.go index ee0a6c71..59f69b43 100644 --- a/apis/management.cattle.io/v3/zz_generated_catalog_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_catalog_template_controller.go @@ -74,8 +74,6 @@ type CatalogTemplateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CatalogTemplateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CatalogTemplateInterface interface { @@ -126,7 +124,7 @@ func (l *catalogTemplateLister) Get(namespace, name string) (*CatalogTemplate, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CatalogTemplateGroupVersionKind.Group, - Resource: "catalogTemplate", + Resource: CatalogTemplateGroupVersionResource.Resource, }, key) } return obj.(*CatalogTemplate), nil @@ -210,25 +208,12 @@ func (c catalogTemplateFactory) List() runtime.Object { } func (s *catalogTemplateClient) Controller() CatalogTemplateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.catalogTemplateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CatalogTemplateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CatalogTemplateGroupVersionResource, CatalogTemplateGroupVersionKind.Kind, true)) - c = &catalogTemplateController{ + return &catalogTemplateController{ GenericController: genericController, } - - s.client.catalogTemplateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type catalogTemplateClient struct { @@ -262,6 +247,11 @@ func (s *catalogTemplateClient) Update(o *CatalogTemplate) (*CatalogTemplate, er return obj.(*CatalogTemplate), err } +func (s *catalogTemplateClient) UpdateStatus(o *CatalogTemplate) (*CatalogTemplate, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*CatalogTemplate), err +} + func (s *catalogTemplateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_catalog_template_version_controller.go b/apis/management.cattle.io/v3/zz_generated_catalog_template_version_controller.go index b914b590..3cb8283c 100644 --- a/apis/management.cattle.io/v3/zz_generated_catalog_template_version_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_catalog_template_version_controller.go @@ -74,8 +74,6 @@ type CatalogTemplateVersionController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CatalogTemplateVersionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CatalogTemplateVersionInterface interface { @@ -126,7 +124,7 @@ func (l *catalogTemplateVersionLister) Get(namespace, name string) (*CatalogTemp if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CatalogTemplateVersionGroupVersionKind.Group, - Resource: "catalogTemplateVersion", + Resource: CatalogTemplateVersionGroupVersionResource.Resource, }, key) } return obj.(*CatalogTemplateVersion), nil @@ -210,25 +208,12 @@ func (c catalogTemplateVersionFactory) List() runtime.Object { } func (s *catalogTemplateVersionClient) Controller() CatalogTemplateVersionController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.catalogTemplateVersionControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CatalogTemplateVersionGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CatalogTemplateVersionGroupVersionResource, CatalogTemplateVersionGroupVersionKind.Kind, true)) - c = &catalogTemplateVersionController{ + return &catalogTemplateVersionController{ GenericController: genericController, } - - s.client.catalogTemplateVersionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type catalogTemplateVersionClient struct { @@ -262,6 +247,11 @@ func (s *catalogTemplateVersionClient) Update(o *CatalogTemplateVersion) (*Catal return obj.(*CatalogTemplateVersion), err } +func (s *catalogTemplateVersionClient) UpdateStatus(o *CatalogTemplateVersion) (*CatalogTemplateVersion, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*CatalogTemplateVersion), err +} + func (s *catalogTemplateVersionClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cis_benchmark_version_controller.go b/apis/management.cattle.io/v3/zz_generated_cis_benchmark_version_controller.go index 4e7066fb..e7eafcde 100644 --- a/apis/management.cattle.io/v3/zz_generated_cis_benchmark_version_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cis_benchmark_version_controller.go @@ -74,8 +74,6 @@ type CisBenchmarkVersionController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CisBenchmarkVersionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CisBenchmarkVersionInterface interface { @@ -126,7 +124,7 @@ func (l *cisBenchmarkVersionLister) Get(namespace, name string) (*CisBenchmarkVe if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CisBenchmarkVersionGroupVersionKind.Group, - Resource: "cisBenchmarkVersion", + Resource: CisBenchmarkVersionGroupVersionResource.Resource, }, key) } return obj.(*CisBenchmarkVersion), nil @@ -210,25 +208,12 @@ func (c cisBenchmarkVersionFactory) List() runtime.Object { } func (s *cisBenchmarkVersionClient) Controller() CisBenchmarkVersionController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.cisBenchmarkVersionControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CisBenchmarkVersionGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CisBenchmarkVersionGroupVersionResource, CisBenchmarkVersionGroupVersionKind.Kind, true)) - c = &cisBenchmarkVersionController{ + return &cisBenchmarkVersionController{ GenericController: genericController, } - - s.client.cisBenchmarkVersionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type cisBenchmarkVersionClient struct { @@ -262,6 +247,11 @@ func (s *cisBenchmarkVersionClient) Update(o *CisBenchmarkVersion) (*CisBenchmar return obj.(*CisBenchmarkVersion), err } +func (s *cisBenchmarkVersionClient) UpdateStatus(o *CisBenchmarkVersion) (*CisBenchmarkVersion, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*CisBenchmarkVersion), err +} + func (s *cisBenchmarkVersionClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cis_config_controller.go b/apis/management.cattle.io/v3/zz_generated_cis_config_controller.go index f79cdb58..e3be34f8 100644 --- a/apis/management.cattle.io/v3/zz_generated_cis_config_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cis_config_controller.go @@ -74,8 +74,6 @@ type CisConfigController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CisConfigHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CisConfigInterface interface { @@ -126,7 +124,7 @@ func (l *cisConfigLister) Get(namespace, name string) (*CisConfig, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CisConfigGroupVersionKind.Group, - Resource: "cisConfig", + Resource: CisConfigGroupVersionResource.Resource, }, key) } return obj.(*CisConfig), nil @@ -210,25 +208,12 @@ func (c cisConfigFactory) List() runtime.Object { } func (s *cisConfigClient) Controller() CisConfigController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.cisConfigControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CisConfigGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CisConfigGroupVersionResource, CisConfigGroupVersionKind.Kind, true)) - c = &cisConfigController{ + return &cisConfigController{ GenericController: genericController, } - - s.client.cisConfigControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type cisConfigClient struct { @@ -262,6 +247,11 @@ func (s *cisConfigClient) Update(o *CisConfig) (*CisConfig, error) { return obj.(*CisConfig), err } +func (s *cisConfigClient) UpdateStatus(o *CisConfig) (*CisConfig, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*CisConfig), err +} + func (s *cisConfigClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cloud_credential_controller.go b/apis/management.cattle.io/v3/zz_generated_cloud_credential_controller.go index d6a4ef15..8bec06a9 100644 --- a/apis/management.cattle.io/v3/zz_generated_cloud_credential_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cloud_credential_controller.go @@ -74,8 +74,6 @@ type CloudCredentialController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CloudCredentialHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CloudCredentialInterface interface { @@ -126,7 +124,7 @@ func (l *cloudCredentialLister) Get(namespace, name string) (*CloudCredential, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CloudCredentialGroupVersionKind.Group, - Resource: "cloudCredential", + Resource: CloudCredentialGroupVersionResource.Resource, }, key) } return obj.(*CloudCredential), nil @@ -210,25 +208,12 @@ func (c cloudCredentialFactory) List() runtime.Object { } func (s *cloudCredentialClient) Controller() CloudCredentialController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.cloudCredentialControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CloudCredentialGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CloudCredentialGroupVersionResource, CloudCredentialGroupVersionKind.Kind, true)) - c = &cloudCredentialController{ + return &cloudCredentialController{ GenericController: genericController, } - - s.client.cloudCredentialControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type cloudCredentialClient struct { @@ -262,6 +247,11 @@ func (s *cloudCredentialClient) Update(o *CloudCredential) (*CloudCredential, er return obj.(*CloudCredential), err } +func (s *cloudCredentialClient) UpdateStatus(o *CloudCredential) (*CloudCredential, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*CloudCredential), err +} + func (s *cloudCredentialClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go index 7181a824..74a589dc 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_alert_controller.go @@ -74,8 +74,6 @@ type ClusterAlertController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterAlertHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterAlertInterface interface { @@ -126,7 +124,7 @@ func (l *clusterAlertLister) Get(namespace, name string) (*ClusterAlert, error) if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterAlertGroupVersionKind.Group, - Resource: "clusterAlert", + Resource: ClusterAlertGroupVersionResource.Resource, }, key) } return obj.(*ClusterAlert), nil @@ -210,25 +208,12 @@ func (c clusterAlertFactory) List() runtime.Object { } func (s *clusterAlertClient) Controller() ClusterAlertController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterAlertControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterAlertGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterAlertGroupVersionResource, ClusterAlertGroupVersionKind.Kind, true)) - c = &clusterAlertController{ + return &clusterAlertController{ GenericController: genericController, } - - s.client.clusterAlertControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterAlertClient struct { @@ -262,6 +247,11 @@ func (s *clusterAlertClient) Update(o *ClusterAlert) (*ClusterAlert, error) { return obj.(*ClusterAlert), err } +func (s *clusterAlertClient) UpdateStatus(o *ClusterAlert) (*ClusterAlert, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterAlert), err +} + func (s *clusterAlertClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_alert_group_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_alert_group_controller.go index fccd0033..f0b1b773 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_alert_group_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_alert_group_controller.go @@ -74,8 +74,6 @@ type ClusterAlertGroupController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterAlertGroupHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterAlertGroupInterface interface { @@ -126,7 +124,7 @@ func (l *clusterAlertGroupLister) Get(namespace, name string) (*ClusterAlertGrou if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterAlertGroupGroupVersionKind.Group, - Resource: "clusterAlertGroup", + Resource: ClusterAlertGroupGroupVersionResource.Resource, }, key) } return obj.(*ClusterAlertGroup), nil @@ -210,25 +208,12 @@ func (c clusterAlertGroupFactory) List() runtime.Object { } func (s *clusterAlertGroupClient) Controller() ClusterAlertGroupController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterAlertGroupControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterAlertGroupGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterAlertGroupGroupVersionResource, ClusterAlertGroupGroupVersionKind.Kind, true)) - c = &clusterAlertGroupController{ + return &clusterAlertGroupController{ GenericController: genericController, } - - s.client.clusterAlertGroupControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterAlertGroupClient struct { @@ -262,6 +247,11 @@ func (s *clusterAlertGroupClient) Update(o *ClusterAlertGroup) (*ClusterAlertGro return obj.(*ClusterAlertGroup), err } +func (s *clusterAlertGroupClient) UpdateStatus(o *ClusterAlertGroup) (*ClusterAlertGroup, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterAlertGroup), err +} + func (s *clusterAlertGroupClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_alert_rule_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_alert_rule_controller.go index 7a216bf0..439c2fdd 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_alert_rule_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_alert_rule_controller.go @@ -74,8 +74,6 @@ type ClusterAlertRuleController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterAlertRuleHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterAlertRuleInterface interface { @@ -126,7 +124,7 @@ func (l *clusterAlertRuleLister) Get(namespace, name string) (*ClusterAlertRule, if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterAlertRuleGroupVersionKind.Group, - Resource: "clusterAlertRule", + Resource: ClusterAlertRuleGroupVersionResource.Resource, }, key) } return obj.(*ClusterAlertRule), nil @@ -210,25 +208,12 @@ func (c clusterAlertRuleFactory) List() runtime.Object { } func (s *clusterAlertRuleClient) Controller() ClusterAlertRuleController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterAlertRuleControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterAlertRuleGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterAlertRuleGroupVersionResource, ClusterAlertRuleGroupVersionKind.Kind, true)) - c = &clusterAlertRuleController{ + return &clusterAlertRuleController{ GenericController: genericController, } - - s.client.clusterAlertRuleControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterAlertRuleClient struct { @@ -262,6 +247,11 @@ func (s *clusterAlertRuleClient) Update(o *ClusterAlertRule) (*ClusterAlertRule, return obj.(*ClusterAlertRule), err } +func (s *clusterAlertRuleClient) UpdateStatus(o *ClusterAlertRule) (*ClusterAlertRule, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterAlertRule), err +} + func (s *clusterAlertRuleClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go index 3d68d153..d793e9ca 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_catalog_controller.go @@ -74,8 +74,6 @@ type ClusterCatalogController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterCatalogHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterCatalogInterface interface { @@ -126,7 +124,7 @@ func (l *clusterCatalogLister) Get(namespace, name string) (*ClusterCatalog, err if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterCatalogGroupVersionKind.Group, - Resource: "clusterCatalog", + Resource: ClusterCatalogGroupVersionResource.Resource, }, key) } return obj.(*ClusterCatalog), nil @@ -210,25 +208,12 @@ func (c clusterCatalogFactory) List() runtime.Object { } func (s *clusterCatalogClient) Controller() ClusterCatalogController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterCatalogControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterCatalogGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterCatalogGroupVersionResource, ClusterCatalogGroupVersionKind.Kind, true)) - c = &clusterCatalogController{ + return &clusterCatalogController{ GenericController: genericController, } - - s.client.clusterCatalogControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterCatalogClient struct { @@ -262,6 +247,11 @@ func (s *clusterCatalogClient) Update(o *ClusterCatalog) (*ClusterCatalog, error return obj.(*ClusterCatalog), err } +func (s *clusterCatalogClient) UpdateStatus(o *ClusterCatalog) (*ClusterCatalog, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterCatalog), err +} + func (s *clusterCatalogClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_controller.go index 2779a97a..c6034149 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_controller.go @@ -73,8 +73,6 @@ type ClusterController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterInterface interface { @@ -125,7 +123,7 @@ func (l *clusterLister) Get(namespace, name string) (*Cluster, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterGroupVersionKind.Group, - Resource: "cluster", + Resource: ClusterGroupVersionResource.Resource, }, key) } return obj.(*Cluster), nil @@ -209,25 +207,12 @@ func (c clusterFactory) List() runtime.Object { } func (s *clusterClient) Controller() ClusterController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterGroupVersionResource, ClusterGroupVersionKind.Kind, false)) - c = &clusterController{ + return &clusterController{ GenericController: genericController, } - - s.client.clusterControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterClient struct { @@ -261,6 +246,11 @@ func (s *clusterClient) Update(o *Cluster) (*Cluster, error) { return obj.(*Cluster), err } +func (s *clusterClient) UpdateStatus(o *Cluster) (*Cluster, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Cluster), err +} + func (s *clusterClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go index 67c653e7..6fe1b8ac 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_logging_controller.go @@ -74,8 +74,6 @@ type ClusterLoggingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterLoggingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterLoggingInterface interface { @@ -126,7 +124,7 @@ func (l *clusterLoggingLister) Get(namespace, name string) (*ClusterLogging, err if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterLoggingGroupVersionKind.Group, - Resource: "clusterLogging", + Resource: ClusterLoggingGroupVersionResource.Resource, }, key) } return obj.(*ClusterLogging), nil @@ -210,25 +208,12 @@ func (c clusterLoggingFactory) List() runtime.Object { } func (s *clusterLoggingClient) Controller() ClusterLoggingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterLoggingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterLoggingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterLoggingGroupVersionResource, ClusterLoggingGroupVersionKind.Kind, true)) - c = &clusterLoggingController{ + return &clusterLoggingController{ GenericController: genericController, } - - s.client.clusterLoggingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterLoggingClient struct { @@ -262,6 +247,11 @@ func (s *clusterLoggingClient) Update(o *ClusterLogging) (*ClusterLogging, error return obj.(*ClusterLogging), err } +func (s *clusterLoggingClient) UpdateStatus(o *ClusterLogging) (*ClusterLogging, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterLogging), err +} + func (s *clusterLoggingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_monitor_graph_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_monitor_graph_controller.go index 6189d472..ddbe56a1 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_monitor_graph_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_monitor_graph_controller.go @@ -74,8 +74,6 @@ type ClusterMonitorGraphController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterMonitorGraphHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterMonitorGraphInterface interface { @@ -126,7 +124,7 @@ func (l *clusterMonitorGraphLister) Get(namespace, name string) (*ClusterMonitor if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterMonitorGraphGroupVersionKind.Group, - Resource: "clusterMonitorGraph", + Resource: ClusterMonitorGraphGroupVersionResource.Resource, }, key) } return obj.(*ClusterMonitorGraph), nil @@ -210,25 +208,12 @@ func (c clusterMonitorGraphFactory) List() runtime.Object { } func (s *clusterMonitorGraphClient) Controller() ClusterMonitorGraphController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterMonitorGraphControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterMonitorGraphGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterMonitorGraphGroupVersionResource, ClusterMonitorGraphGroupVersionKind.Kind, true)) - c = &clusterMonitorGraphController{ + return &clusterMonitorGraphController{ GenericController: genericController, } - - s.client.clusterMonitorGraphControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterMonitorGraphClient struct { @@ -262,6 +247,11 @@ func (s *clusterMonitorGraphClient) Update(o *ClusterMonitorGraph) (*ClusterMoni return obj.(*ClusterMonitorGraph), err } +func (s *clusterMonitorGraphClient) UpdateStatus(o *ClusterMonitorGraph) (*ClusterMonitorGraph, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterMonitorGraph), err +} + func (s *clusterMonitorGraphClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go index 1d0545bd..47117d00 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_registration_token_controller.go @@ -74,8 +74,6 @@ type ClusterRegistrationTokenController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterRegistrationTokenHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterRegistrationTokenInterface interface { @@ -126,7 +124,7 @@ func (l *clusterRegistrationTokenLister) Get(namespace, name string) (*ClusterRe if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterRegistrationTokenGroupVersionKind.Group, - Resource: "clusterRegistrationToken", + Resource: ClusterRegistrationTokenGroupVersionResource.Resource, }, key) } return obj.(*ClusterRegistrationToken), nil @@ -210,25 +208,12 @@ func (c clusterRegistrationTokenFactory) List() runtime.Object { } func (s *clusterRegistrationTokenClient) Controller() ClusterRegistrationTokenController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterRegistrationTokenControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterRegistrationTokenGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterRegistrationTokenGroupVersionResource, ClusterRegistrationTokenGroupVersionKind.Kind, true)) - c = &clusterRegistrationTokenController{ + return &clusterRegistrationTokenController{ GenericController: genericController, } - - s.client.clusterRegistrationTokenControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterRegistrationTokenClient struct { @@ -262,6 +247,11 @@ func (s *clusterRegistrationTokenClient) Update(o *ClusterRegistrationToken) (*C return obj.(*ClusterRegistrationToken), err } +func (s *clusterRegistrationTokenClient) UpdateStatus(o *ClusterRegistrationToken) (*ClusterRegistrationToken, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterRegistrationToken), err +} + func (s *clusterRegistrationTokenClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go index 4ffe1a88..27628ec6 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_role_template_binding_controller.go @@ -74,8 +74,6 @@ type ClusterRoleTemplateBindingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterRoleTemplateBindingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterRoleTemplateBindingInterface interface { @@ -126,7 +124,7 @@ func (l *clusterRoleTemplateBindingLister) Get(namespace, name string) (*Cluster if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterRoleTemplateBindingGroupVersionKind.Group, - Resource: "clusterRoleTemplateBinding", + Resource: ClusterRoleTemplateBindingGroupVersionResource.Resource, }, key) } return obj.(*ClusterRoleTemplateBinding), nil @@ -210,25 +208,12 @@ func (c clusterRoleTemplateBindingFactory) List() runtime.Object { } func (s *clusterRoleTemplateBindingClient) Controller() ClusterRoleTemplateBindingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterRoleTemplateBindingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterRoleTemplateBindingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterRoleTemplateBindingGroupVersionResource, ClusterRoleTemplateBindingGroupVersionKind.Kind, true)) - c = &clusterRoleTemplateBindingController{ + return &clusterRoleTemplateBindingController{ GenericController: genericController, } - - s.client.clusterRoleTemplateBindingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterRoleTemplateBindingClient struct { @@ -262,6 +247,11 @@ func (s *clusterRoleTemplateBindingClient) Update(o *ClusterRoleTemplateBinding) return obj.(*ClusterRoleTemplateBinding), err } +func (s *clusterRoleTemplateBindingClient) UpdateStatus(o *ClusterRoleTemplateBinding) (*ClusterRoleTemplateBinding, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterRoleTemplateBinding), err +} + func (s *clusterRoleTemplateBindingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_scan_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_scan_controller.go index d3c09849..5f11149f 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_scan_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_scan_controller.go @@ -74,8 +74,6 @@ type ClusterScanController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterScanHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterScanInterface interface { @@ -126,7 +124,7 @@ func (l *clusterScanLister) Get(namespace, name string) (*ClusterScan, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterScanGroupVersionKind.Group, - Resource: "clusterScan", + Resource: ClusterScanGroupVersionResource.Resource, }, key) } return obj.(*ClusterScan), nil @@ -210,25 +208,12 @@ func (c clusterScanFactory) List() runtime.Object { } func (s *clusterScanClient) Controller() ClusterScanController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterScanControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterScanGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterScanGroupVersionResource, ClusterScanGroupVersionKind.Kind, true)) - c = &clusterScanController{ + return &clusterScanController{ GenericController: genericController, } - - s.client.clusterScanControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterScanClient struct { @@ -262,6 +247,11 @@ func (s *clusterScanClient) Update(o *ClusterScan) (*ClusterScan, error) { return obj.(*ClusterScan), err } +func (s *clusterScanClient) UpdateStatus(o *ClusterScan) (*ClusterScan, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterScan), err +} + func (s *clusterScanClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_template_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_template_controller.go index 2c761d14..40b237a2 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_template_controller.go @@ -74,8 +74,6 @@ type ClusterTemplateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterTemplateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterTemplateInterface interface { @@ -126,7 +124,7 @@ func (l *clusterTemplateLister) Get(namespace, name string) (*ClusterTemplate, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterTemplateGroupVersionKind.Group, - Resource: "clusterTemplate", + Resource: ClusterTemplateGroupVersionResource.Resource, }, key) } return obj.(*ClusterTemplate), nil @@ -210,25 +208,12 @@ func (c clusterTemplateFactory) List() runtime.Object { } func (s *clusterTemplateClient) Controller() ClusterTemplateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterTemplateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterTemplateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterTemplateGroupVersionResource, ClusterTemplateGroupVersionKind.Kind, true)) - c = &clusterTemplateController{ + return &clusterTemplateController{ GenericController: genericController, } - - s.client.clusterTemplateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterTemplateClient struct { @@ -262,6 +247,11 @@ func (s *clusterTemplateClient) Update(o *ClusterTemplate) (*ClusterTemplate, er return obj.(*ClusterTemplate), err } +func (s *clusterTemplateClient) UpdateStatus(o *ClusterTemplate) (*ClusterTemplate, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterTemplate), err +} + func (s *clusterTemplateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_cluster_template_revision_controller.go b/apis/management.cattle.io/v3/zz_generated_cluster_template_revision_controller.go index 03a3c2c9..4ee8828f 100644 --- a/apis/management.cattle.io/v3/zz_generated_cluster_template_revision_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_cluster_template_revision_controller.go @@ -74,8 +74,6 @@ type ClusterTemplateRevisionController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterTemplateRevisionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterTemplateRevisionInterface interface { @@ -126,7 +124,7 @@ func (l *clusterTemplateRevisionLister) Get(namespace, name string) (*ClusterTem if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterTemplateRevisionGroupVersionKind.Group, - Resource: "clusterTemplateRevision", + Resource: ClusterTemplateRevisionGroupVersionResource.Resource, }, key) } return obj.(*ClusterTemplateRevision), nil @@ -210,25 +208,12 @@ func (c clusterTemplateRevisionFactory) List() runtime.Object { } func (s *clusterTemplateRevisionClient) Controller() ClusterTemplateRevisionController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterTemplateRevisionControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterTemplateRevisionGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterTemplateRevisionGroupVersionResource, ClusterTemplateRevisionGroupVersionKind.Kind, true)) - c = &clusterTemplateRevisionController{ + return &clusterTemplateRevisionController{ GenericController: genericController, } - - s.client.clusterTemplateRevisionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterTemplateRevisionClient struct { @@ -262,6 +247,11 @@ func (s *clusterTemplateRevisionClient) Update(o *ClusterTemplateRevision) (*Clu return obj.(*ClusterTemplateRevision), err } +func (s *clusterTemplateRevisionClient) UpdateStatus(o *ClusterTemplateRevision) (*ClusterTemplateRevision, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ClusterTemplateRevision), err +} + func (s *clusterTemplateRevisionClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go b/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go index be0395cd..4b14844a 100644 --- a/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_compose_config_controller.go @@ -73,8 +73,6 @@ type ComposeConfigController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ComposeConfigHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ComposeConfigInterface interface { @@ -125,7 +123,7 @@ func (l *composeConfigLister) Get(namespace, name string) (*ComposeConfig, error if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ComposeConfigGroupVersionKind.Group, - Resource: "composeConfig", + Resource: ComposeConfigGroupVersionResource.Resource, }, key) } return obj.(*ComposeConfig), nil @@ -209,25 +207,12 @@ func (c composeConfigFactory) List() runtime.Object { } func (s *composeConfigClient) Controller() ComposeConfigController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.composeConfigControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ComposeConfigGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ComposeConfigGroupVersionResource, ComposeConfigGroupVersionKind.Kind, false)) - c = &composeConfigController{ + return &composeConfigController{ GenericController: genericController, } - - s.client.composeConfigControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type composeConfigClient struct { @@ -261,6 +246,11 @@ func (s *composeConfigClient) Update(o *ComposeConfig) (*ComposeConfig, error) { return obj.(*ComposeConfig), err } +func (s *composeConfigClient) UpdateStatus(o *ComposeConfig) (*ComposeConfig, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ComposeConfig), err +} + func (s *composeConfigClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_deepcopy.go b/apis/management.cattle.io/v3/zz_generated_deepcopy.go index 40f0ed56..52a40e15 100644 --- a/apis/management.cattle.io/v3/zz_generated_deepcopy.go +++ b/apis/management.cattle.io/v3/zz_generated_deepcopy.go @@ -3843,68 +3843,6 @@ func (in *GlobalAwsOpts) DeepCopy() *GlobalAwsOpts { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalDNS) DeepCopyInto(out *GlobalDNS) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.Spec.DeepCopyInto(&out.Spec) - in.Status.DeepCopyInto(&out.Status) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDNS. -func (in *GlobalDNS) DeepCopy() *GlobalDNS { - if in == nil { - return nil - } - out := new(GlobalDNS) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GlobalDNS) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GlobalDNSList) DeepCopyInto(out *GlobalDNSList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]GlobalDNS, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDNSList. -func (in *GlobalDNSList) DeepCopy() *GlobalDNSList { - if in == nil { - return nil - } - out := new(GlobalDNSList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *GlobalDNSList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GlobalDNSProvider) DeepCopyInto(out *GlobalDNSProvider) { *out = *in @@ -4064,6 +4002,68 @@ func (in *GlobalDNSStatus) DeepCopy() *GlobalDNSStatus { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalDns) DeepCopyInto(out *GlobalDns) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDns. +func (in *GlobalDns) DeepCopy() *GlobalDns { + if in == nil { + return nil + } + out := new(GlobalDns) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GlobalDns) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GlobalDnsList) DeepCopyInto(out *GlobalDnsList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]GlobalDns, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GlobalDnsList. +func (in *GlobalDnsList) DeepCopy() *GlobalDnsList { + if in == nil { + return nil + } + out := new(GlobalDnsList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *GlobalDnsList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GlobalOpenstackOpts) DeepCopyInto(out *GlobalOpenstackOpts) { *out = *in @@ -8326,66 +8326,6 @@ func (in *Question) DeepCopy() *Question { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEAddon) DeepCopyInto(out *RKEAddon) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEAddon. -func (in *RKEAddon) DeepCopy() *RKEAddon { - if in == nil { - return nil - } - out := new(RKEAddon) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RKEAddon) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEAddonList) DeepCopyInto(out *RKEAddonList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RKEAddon, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEAddonList. -func (in *RKEAddonList) DeepCopy() *RKEAddonList { - if in == nil { - return nil - } - out := new(RKEAddonList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RKEAddonList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RKEConfigNode) DeepCopyInto(out *RKEConfigNode) { *out = *in @@ -8497,128 +8437,6 @@ func (in *RKEConfigServices) DeepCopy() *RKEConfigServices { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEK8sServiceOption) DeepCopyInto(out *RKEK8sServiceOption) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - in.ServiceOptions.DeepCopyInto(&out.ServiceOptions) - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEK8sServiceOption. -func (in *RKEK8sServiceOption) DeepCopy() *RKEK8sServiceOption { - if in == nil { - return nil - } - out := new(RKEK8sServiceOption) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RKEK8sServiceOption) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEK8sServiceOptionList) DeepCopyInto(out *RKEK8sServiceOptionList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RKEK8sServiceOption, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEK8sServiceOptionList. -func (in *RKEK8sServiceOptionList) DeepCopy() *RKEK8sServiceOptionList { - if in == nil { - return nil - } - out := new(RKEK8sServiceOptionList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RKEK8sServiceOptionList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEK8sSystemImage) DeepCopyInto(out *RKEK8sSystemImage) { - *out = *in - out.Namespaced = in.Namespaced - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.SystemImages = in.SystemImages - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEK8sSystemImage. -func (in *RKEK8sSystemImage) DeepCopy() *RKEK8sSystemImage { - if in == nil { - return nil - } - out := new(RKEK8sSystemImage) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RKEK8sSystemImage) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RKEK8sSystemImageList) DeepCopyInto(out *RKEK8sSystemImageList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]RKEK8sSystemImage, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEK8sSystemImageList. -func (in *RKEK8sSystemImageList) DeepCopy() *RKEK8sSystemImageList { - if in == nil { - return nil - } - out := new(RKEK8sSystemImageList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RKEK8sSystemImageList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RKEPlan) DeepCopyInto(out *RKEPlan) { *out = *in @@ -8800,6 +8618,188 @@ func (in *RestoreFromEtcdBackupInput) DeepCopy() *RestoreFromEtcdBackupInput { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RkeAddon) DeepCopyInto(out *RkeAddon) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeAddon. +func (in *RkeAddon) DeepCopy() *RkeAddon { + if in == nil { + return nil + } + out := new(RkeAddon) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RkeAddon) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RkeAddonList) DeepCopyInto(out *RkeAddonList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RkeAddon, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeAddonList. +func (in *RkeAddonList) DeepCopy() *RkeAddonList { + if in == nil { + return nil + } + out := new(RkeAddonList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RkeAddonList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RkeK8sServiceOption) DeepCopyInto(out *RkeK8sServiceOption) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.ServiceOptions.DeepCopyInto(&out.ServiceOptions) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sServiceOption. +func (in *RkeK8sServiceOption) DeepCopy() *RkeK8sServiceOption { + if in == nil { + return nil + } + out := new(RkeK8sServiceOption) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RkeK8sServiceOption) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RkeK8sServiceOptionList) DeepCopyInto(out *RkeK8sServiceOptionList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RkeK8sServiceOption, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sServiceOptionList. +func (in *RkeK8sServiceOptionList) DeepCopy() *RkeK8sServiceOptionList { + if in == nil { + return nil + } + out := new(RkeK8sServiceOptionList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RkeK8sServiceOptionList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RkeK8sSystemImage) DeepCopyInto(out *RkeK8sSystemImage) { + *out = *in + out.Namespaced = in.Namespaced + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + out.SystemImages = in.SystemImages + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sSystemImage. +func (in *RkeK8sSystemImage) DeepCopy() *RkeK8sSystemImage { + if in == nil { + return nil + } + out := new(RkeK8sSystemImage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RkeK8sSystemImage) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *RkeK8sSystemImageList) DeepCopyInto(out *RkeK8sSystemImageList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RkeK8sSystemImage, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RkeK8sSystemImageList. +func (in *RkeK8sSystemImageList) DeepCopy() *RkeK8sSystemImageList { + if in == nil { + return nil + } + out := new(RkeK8sSystemImageList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RkeK8sSystemImageList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RoleTemplate) DeepCopyInto(out *RoleTemplate) { *out = *in diff --git a/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go b/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go index c715f2a9..75f082ae 100644 --- a/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_dynamic_schema_controller.go @@ -73,8 +73,6 @@ type DynamicSchemaController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler DynamicSchemaHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type DynamicSchemaInterface interface { @@ -125,7 +123,7 @@ func (l *dynamicSchemaLister) Get(namespace, name string) (*DynamicSchema, error if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: DynamicSchemaGroupVersionKind.Group, - Resource: "dynamicSchema", + Resource: DynamicSchemaGroupVersionResource.Resource, }, key) } return obj.(*DynamicSchema), nil @@ -209,25 +207,12 @@ func (c dynamicSchemaFactory) List() runtime.Object { } func (s *dynamicSchemaClient) Controller() DynamicSchemaController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.dynamicSchemaControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(DynamicSchemaGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(DynamicSchemaGroupVersionResource, DynamicSchemaGroupVersionKind.Kind, false)) - c = &dynamicSchemaController{ + return &dynamicSchemaController{ GenericController: genericController, } - - s.client.dynamicSchemaControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type dynamicSchemaClient struct { @@ -261,6 +246,11 @@ func (s *dynamicSchemaClient) Update(o *DynamicSchema) (*DynamicSchema, error) { return obj.(*DynamicSchema), err } +func (s *dynamicSchemaClient) UpdateStatus(o *DynamicSchema) (*DynamicSchema, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*DynamicSchema), err +} + func (s *dynamicSchemaClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_etcd_backup_controller.go b/apis/management.cattle.io/v3/zz_generated_etcd_backup_controller.go index ecc23dde..a1f1b51a 100644 --- a/apis/management.cattle.io/v3/zz_generated_etcd_backup_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_etcd_backup_controller.go @@ -74,8 +74,6 @@ type EtcdBackupController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler EtcdBackupHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type EtcdBackupInterface interface { @@ -126,7 +124,7 @@ func (l *etcdBackupLister) Get(namespace, name string) (*EtcdBackup, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: EtcdBackupGroupVersionKind.Group, - Resource: "etcdBackup", + Resource: EtcdBackupGroupVersionResource.Resource, }, key) } return obj.(*EtcdBackup), nil @@ -210,25 +208,12 @@ func (c etcdBackupFactory) List() runtime.Object { } func (s *etcdBackupClient) Controller() EtcdBackupController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.etcdBackupControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(EtcdBackupGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(EtcdBackupGroupVersionResource, EtcdBackupGroupVersionKind.Kind, true)) - c = &etcdBackupController{ + return &etcdBackupController{ GenericController: genericController, } - - s.client.etcdBackupControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type etcdBackupClient struct { @@ -262,6 +247,11 @@ func (s *etcdBackupClient) Update(o *EtcdBackup) (*EtcdBackup, error) { return obj.(*EtcdBackup), err } +func (s *etcdBackupClient) UpdateStatus(o *EtcdBackup) (*EtcdBackup, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*EtcdBackup), err +} + func (s *etcdBackupClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_feature_controller.go b/apis/management.cattle.io/v3/zz_generated_feature_controller.go index 5744c310..4ecbe377 100644 --- a/apis/management.cattle.io/v3/zz_generated_feature_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_feature_controller.go @@ -73,8 +73,6 @@ type FeatureController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler FeatureHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type FeatureInterface interface { @@ -125,7 +123,7 @@ func (l *featureLister) Get(namespace, name string) (*Feature, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: FeatureGroupVersionKind.Group, - Resource: "feature", + Resource: FeatureGroupVersionResource.Resource, }, key) } return obj.(*Feature), nil @@ -209,25 +207,12 @@ func (c featureFactory) List() runtime.Object { } func (s *featureClient) Controller() FeatureController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.featureControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(FeatureGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(FeatureGroupVersionResource, FeatureGroupVersionKind.Kind, false)) - c = &featureController{ + return &featureController{ GenericController: genericController, } - - s.client.featureControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type featureClient struct { @@ -261,6 +246,11 @@ func (s *featureClient) Update(o *Feature) (*Feature, error) { return obj.(*Feature), err } +func (s *featureClient) UpdateStatus(o *Feature) (*Feature, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Feature), err +} + func (s *featureClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_global_dns_controller.go b/apis/management.cattle.io/v3/zz_generated_global_dns_controller.go index ec769bdf..e6581f94 100644 --- a/apis/management.cattle.io/v3/zz_generated_global_dns_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_global_dns_controller.go @@ -18,20 +18,20 @@ import ( ) var ( - GlobalDNSGroupVersionKind = schema.GroupVersionKind{ + GlobalDnsGroupVersionKind = schema.GroupVersionKind{ Version: Version, Group: GroupName, - Kind: "GlobalDNS", + Kind: "GlobalDns", } - GlobalDNSResource = metav1.APIResource{ + GlobalDnsResource = metav1.APIResource{ Name: "globaldnses", SingularName: "globaldns", Namespaced: true, - Kind: GlobalDNSGroupVersionKind.Kind, + Kind: GlobalDnsGroupVersionKind.Kind, } - GlobalDNSGroupVersionResource = schema.GroupVersionResource{ + GlobalDnsGroupVersionResource = schema.GroupVersionResource{ Group: GroupName, Version: Version, Resource: "globaldnses", @@ -39,80 +39,78 @@ var ( ) func init() { - resource.Put(GlobalDNSGroupVersionResource) + resource.Put(GlobalDnsGroupVersionResource) } -func NewGlobalDNS(namespace, name string, obj GlobalDNS) *GlobalDNS { - obj.APIVersion, obj.Kind = GlobalDNSGroupVersionKind.ToAPIVersionAndKind() +func NewGlobalDns(namespace, name string, obj GlobalDns) *GlobalDns { + obj.APIVersion, obj.Kind = GlobalDnsGroupVersionKind.ToAPIVersionAndKind() obj.Name = name obj.Namespace = namespace return &obj } -type GlobalDNSList struct { +type GlobalDnsList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []GlobalDNS `json:"items"` + Items []GlobalDns `json:"items"` } -type GlobalDNSHandlerFunc func(key string, obj *GlobalDNS) (runtime.Object, error) +type GlobalDnsHandlerFunc func(key string, obj *GlobalDns) (runtime.Object, error) -type GlobalDNSChangeHandlerFunc func(obj *GlobalDNS) (runtime.Object, error) +type GlobalDnsChangeHandlerFunc func(obj *GlobalDns) (runtime.Object, error) -type GlobalDNSLister interface { - List(namespace string, selector labels.Selector) (ret []*GlobalDNS, err error) - Get(namespace, name string) (*GlobalDNS, error) +type GlobalDnsLister interface { + List(namespace string, selector labels.Selector) (ret []*GlobalDns, err error) + Get(namespace, name string) (*GlobalDns, error) } -type GlobalDNSController interface { +type GlobalDnsController interface { Generic() controller.GenericController Informer() cache.SharedIndexInformer - Lister() GlobalDNSLister - AddHandler(ctx context.Context, name string, handler GlobalDNSHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync GlobalDNSHandlerFunc) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler GlobalDNSHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler GlobalDNSHandlerFunc) + Lister() GlobalDnsLister + AddHandler(ctx context.Context, name string, handler GlobalDnsHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync GlobalDnsHandlerFunc) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler GlobalDnsHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler GlobalDnsHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } -type GlobalDNSInterface interface { +type GlobalDnsInterface interface { ObjectClient() *objectclient.ObjectClient - Create(*GlobalDNS) (*GlobalDNS, error) - GetNamespaced(namespace, name string, opts metav1.GetOptions) (*GlobalDNS, error) - Get(name string, opts metav1.GetOptions) (*GlobalDNS, error) - Update(*GlobalDNS) (*GlobalDNS, error) + Create(*GlobalDns) (*GlobalDns, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*GlobalDns, error) + Get(name string, opts metav1.GetOptions) (*GlobalDns, error) + Update(*GlobalDns) (*GlobalDns, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*GlobalDNSList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*GlobalDNSList, error) + List(opts metav1.ListOptions) (*GlobalDnsList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*GlobalDnsList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error - Controller() GlobalDNSController - AddHandler(ctx context.Context, name string, sync GlobalDNSHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync GlobalDNSHandlerFunc) - AddLifecycle(ctx context.Context, name string, lifecycle GlobalDNSLifecycle) - AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle GlobalDNSLifecycle) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync GlobalDNSHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync GlobalDNSHandlerFunc) - AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle GlobalDNSLifecycle) - AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle GlobalDNSLifecycle) + Controller() GlobalDnsController + AddHandler(ctx context.Context, name string, sync GlobalDnsHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync GlobalDnsHandlerFunc) + AddLifecycle(ctx context.Context, name string, lifecycle GlobalDnsLifecycle) + AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle GlobalDnsLifecycle) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync GlobalDnsHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync GlobalDnsHandlerFunc) + AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle GlobalDnsLifecycle) + AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle GlobalDnsLifecycle) } type globalDnsLister struct { controller *globalDnsController } -func (l *globalDnsLister) List(namespace string, selector labels.Selector) (ret []*GlobalDNS, err error) { +func (l *globalDnsLister) List(namespace string, selector labels.Selector) (ret []*GlobalDns, err error) { err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { - ret = append(ret, obj.(*GlobalDNS)) + ret = append(ret, obj.(*GlobalDns)) }) return } -func (l *globalDnsLister) Get(namespace, name string) (*GlobalDNS, error) { +func (l *globalDnsLister) Get(namespace, name string) (*GlobalDns, error) { var key string if namespace != "" { key = namespace + "/" + name @@ -125,11 +123,11 @@ func (l *globalDnsLister) Get(namespace, name string) (*GlobalDNS, error) { } if !exists { return nil, errors.NewNotFound(schema.GroupResource{ - Group: GlobalDNSGroupVersionKind.Group, - Resource: "globalDns", + Group: GlobalDnsGroupVersionKind.Group, + Resource: GlobalDnsGroupVersionResource.Resource, }, key) } - return obj.(*GlobalDNS), nil + return obj.(*GlobalDns), nil } type globalDnsController struct { @@ -140,17 +138,17 @@ func (c *globalDnsController) Generic() controller.GenericController { return c.GenericController } -func (c *globalDnsController) Lister() GlobalDNSLister { +func (c *globalDnsController) Lister() GlobalDnsLister { return &globalDnsLister{ controller: c, } } -func (c *globalDnsController) AddHandler(ctx context.Context, name string, handler GlobalDNSHandlerFunc) { +func (c *globalDnsController) AddHandler(ctx context.Context, name string, handler GlobalDnsHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*GlobalDNS); ok { + } else if v, ok := obj.(*GlobalDns); ok { return handler(key, v) } else { return nil, nil @@ -158,13 +156,13 @@ func (c *globalDnsController) AddHandler(ctx context.Context, name string, handl }) } -func (c *globalDnsController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler GlobalDNSHandlerFunc) { +func (c *globalDnsController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler GlobalDnsHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*GlobalDNS); ok { + } else if v, ok := obj.(*GlobalDns); ok { return handler(key, v) } else { return nil, nil @@ -172,11 +170,11 @@ func (c *globalDnsController) AddFeatureHandler(ctx context.Context, enabled fun }) } -func (c *globalDnsController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler GlobalDNSHandlerFunc) { +func (c *globalDnsController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler GlobalDnsHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*GlobalDNS); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*GlobalDns); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -184,13 +182,13 @@ func (c *globalDnsController) AddClusterScopedHandler(ctx context.Context, name, }) } -func (c *globalDnsController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler GlobalDNSHandlerFunc) { +func (c *globalDnsController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler GlobalDnsHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*GlobalDNS); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*GlobalDns); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -202,64 +200,56 @@ type globalDnsFactory struct { } func (c globalDnsFactory) Object() runtime.Object { - return &GlobalDNS{} + return &GlobalDns{} } func (c globalDnsFactory) List() runtime.Object { - return &GlobalDNSList{} + return &GlobalDnsList{} } -func (s *globalDnsClient) Controller() GlobalDNSController { - s.client.Lock() - defer s.client.Unlock() +func (s *globalDnsClient) Controller() GlobalDnsController { + genericController := controller.NewGenericController(GlobalDnsGroupVersionKind.Kind+"Controller", + s.client.controllerFactory.ForResourceKind(GlobalDnsGroupVersionResource, GlobalDnsGroupVersionKind.Kind, true)) - c, ok := s.client.globalDnsControllers[s.ns] - if ok { - return c - } - - genericController := controller.NewGenericController(GlobalDNSGroupVersionKind.Kind+"Controller", - s.objectClient) - - c = &globalDnsController{ + return &globalDnsController{ GenericController: genericController, } - - s.client.globalDnsControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type globalDnsClient struct { client *Client ns string objectClient *objectclient.ObjectClient - controller GlobalDNSController + controller GlobalDnsController } func (s *globalDnsClient) ObjectClient() *objectclient.ObjectClient { return s.objectClient } -func (s *globalDnsClient) Create(o *GlobalDNS) (*GlobalDNS, error) { +func (s *globalDnsClient) Create(o *GlobalDns) (*GlobalDns, error) { obj, err := s.objectClient.Create(o) - return obj.(*GlobalDNS), err + return obj.(*GlobalDns), err } -func (s *globalDnsClient) Get(name string, opts metav1.GetOptions) (*GlobalDNS, error) { +func (s *globalDnsClient) Get(name string, opts metav1.GetOptions) (*GlobalDns, error) { obj, err := s.objectClient.Get(name, opts) - return obj.(*GlobalDNS), err + return obj.(*GlobalDns), err } -func (s *globalDnsClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*GlobalDNS, error) { +func (s *globalDnsClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*GlobalDns, error) { obj, err := s.objectClient.GetNamespaced(namespace, name, opts) - return obj.(*GlobalDNS), err + return obj.(*GlobalDns), err } -func (s *globalDnsClient) Update(o *GlobalDNS) (*GlobalDNS, error) { +func (s *globalDnsClient) Update(o *GlobalDns) (*GlobalDns, error) { obj, err := s.objectClient.Update(o.Name, o) - return obj.(*GlobalDNS), err + return obj.(*GlobalDns), err +} + +func (s *globalDnsClient) UpdateStatus(o *GlobalDns) (*GlobalDns, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*GlobalDns), err } func (s *globalDnsClient) Delete(name string, options *metav1.DeleteOptions) error { @@ -270,14 +260,14 @@ func (s *globalDnsClient) DeleteNamespaced(namespace, name string, options *meta return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *globalDnsClient) List(opts metav1.ListOptions) (*GlobalDNSList, error) { +func (s *globalDnsClient) List(opts metav1.ListOptions) (*GlobalDnsList, error) { obj, err := s.objectClient.List(opts) - return obj.(*GlobalDNSList), err + return obj.(*GlobalDnsList), err } -func (s *globalDnsClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*GlobalDNSList, error) { +func (s *globalDnsClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*GlobalDnsList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*GlobalDNSList), err + return obj.(*GlobalDnsList), err } func (s *globalDnsClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { @@ -285,47 +275,47 @@ func (s *globalDnsClient) Watch(opts metav1.ListOptions) (watch.Interface, error } // Patch applies the patch and returns the patched deployment. -func (s *globalDnsClient) Patch(o *GlobalDNS, patchType types.PatchType, data []byte, subresources ...string) (*GlobalDNS, error) { +func (s *globalDnsClient) Patch(o *GlobalDns, patchType types.PatchType, data []byte, subresources ...string) (*GlobalDns, error) { obj, err := s.objectClient.Patch(o.Name, o, patchType, data, subresources...) - return obj.(*GlobalDNS), err + return obj.(*GlobalDns), err } func (s *globalDnsClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { return s.objectClient.DeleteCollection(deleteOpts, listOpts) } -func (s *globalDnsClient) AddHandler(ctx context.Context, name string, sync GlobalDNSHandlerFunc) { +func (s *globalDnsClient) AddHandler(ctx context.Context, name string, sync GlobalDnsHandlerFunc) { s.Controller().AddHandler(ctx, name, sync) } -func (s *globalDnsClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync GlobalDNSHandlerFunc) { +func (s *globalDnsClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync GlobalDnsHandlerFunc) { s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *globalDnsClient) AddLifecycle(ctx context.Context, name string, lifecycle GlobalDNSLifecycle) { - sync := NewGlobalDNSLifecycleAdapter(name, false, s, lifecycle) +func (s *globalDnsClient) AddLifecycle(ctx context.Context, name string, lifecycle GlobalDnsLifecycle) { + sync := NewGlobalDnsLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddHandler(ctx, name, sync) } -func (s *globalDnsClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle GlobalDNSLifecycle) { - sync := NewGlobalDNSLifecycleAdapter(name, false, s, lifecycle) +func (s *globalDnsClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle GlobalDnsLifecycle) { + sync := NewGlobalDnsLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *globalDnsClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync GlobalDNSHandlerFunc) { +func (s *globalDnsClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync GlobalDnsHandlerFunc) { s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *globalDnsClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync GlobalDNSHandlerFunc) { +func (s *globalDnsClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync GlobalDnsHandlerFunc) { s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } -func (s *globalDnsClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle GlobalDNSLifecycle) { - sync := NewGlobalDNSLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *globalDnsClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle GlobalDnsLifecycle) { + sync := NewGlobalDnsLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *globalDnsClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle GlobalDNSLifecycle) { - sync := NewGlobalDNSLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *globalDnsClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle GlobalDnsLifecycle) { + sync := NewGlobalDnsLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } diff --git a/apis/management.cattle.io/v3/zz_generated_global_dns_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_global_dns_lifecycle_adapter.go index 90645722..4ff04fb0 100644 --- a/apis/management.cattle.io/v3/zz_generated_global_dns_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_global_dns_lifecycle_adapter.go @@ -6,14 +6,14 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) -type GlobalDNSLifecycle interface { - Create(obj *GlobalDNS) (runtime.Object, error) - Remove(obj *GlobalDNS) (runtime.Object, error) - Updated(obj *GlobalDNS) (runtime.Object, error) +type GlobalDnsLifecycle interface { + Create(obj *GlobalDns) (runtime.Object, error) + Remove(obj *GlobalDns) (runtime.Object, error) + Updated(obj *GlobalDns) (runtime.Object, error) } type globalDnsLifecycleAdapter struct { - lifecycle GlobalDNSLifecycle + lifecycle GlobalDnsLifecycle } func (w *globalDnsLifecycleAdapter) HasCreate() bool { @@ -27,7 +27,7 @@ func (w *globalDnsLifecycleAdapter) HasFinalize() bool { } func (w *globalDnsLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Create(obj.(*GlobalDNS)) + o, err := w.lifecycle.Create(obj.(*GlobalDns)) if o == nil { return nil, err } @@ -35,7 +35,7 @@ func (w *globalDnsLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, } func (w *globalDnsLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Remove(obj.(*GlobalDNS)) + o, err := w.lifecycle.Remove(obj.(*GlobalDns)) if o == nil { return nil, err } @@ -43,20 +43,20 @@ func (w *globalDnsLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object } func (w *globalDnsLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Updated(obj.(*GlobalDNS)) + o, err := w.lifecycle.Updated(obj.(*GlobalDns)) if o == nil { return nil, err } return o, err } -func NewGlobalDNSLifecycleAdapter(name string, clusterScoped bool, client GlobalDNSInterface, l GlobalDNSLifecycle) GlobalDNSHandlerFunc { +func NewGlobalDnsLifecycleAdapter(name string, clusterScoped bool, client GlobalDnsInterface, l GlobalDnsLifecycle) GlobalDnsHandlerFunc { if clusterScoped { - resource.PutClusterScoped(GlobalDNSGroupVersionResource) + resource.PutClusterScoped(GlobalDnsGroupVersionResource) } adapter := &globalDnsLifecycleAdapter{lifecycle: l} syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) - return func(key string, obj *GlobalDNS) (runtime.Object, error) { + return func(key string, obj *GlobalDns) (runtime.Object, error) { newObj, err := syncFn(key, obj) if o, ok := newObj.(runtime.Object); ok { return o, err diff --git a/apis/management.cattle.io/v3/zz_generated_global_dns_provider_controller.go b/apis/management.cattle.io/v3/zz_generated_global_dns_provider_controller.go index d8383cd5..e561159a 100644 --- a/apis/management.cattle.io/v3/zz_generated_global_dns_provider_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_global_dns_provider_controller.go @@ -74,8 +74,6 @@ type GlobalDNSProviderController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler GlobalDNSProviderHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type GlobalDNSProviderInterface interface { @@ -126,7 +124,7 @@ func (l *globalDnsProviderLister) Get(namespace, name string) (*GlobalDNSProvide if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: GlobalDNSProviderGroupVersionKind.Group, - Resource: "globalDnsProvider", + Resource: GlobalDNSProviderGroupVersionResource.Resource, }, key) } return obj.(*GlobalDNSProvider), nil @@ -210,25 +208,12 @@ func (c globalDnsProviderFactory) List() runtime.Object { } func (s *globalDnsProviderClient) Controller() GlobalDNSProviderController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.globalDnsProviderControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(GlobalDNSProviderGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(GlobalDNSProviderGroupVersionResource, GlobalDNSProviderGroupVersionKind.Kind, true)) - c = &globalDnsProviderController{ + return &globalDnsProviderController{ GenericController: genericController, } - - s.client.globalDnsProviderControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type globalDnsProviderClient struct { @@ -262,6 +247,11 @@ func (s *globalDnsProviderClient) Update(o *GlobalDNSProvider) (*GlobalDNSProvid return obj.(*GlobalDNSProvider), err } +func (s *globalDnsProviderClient) UpdateStatus(o *GlobalDNSProvider) (*GlobalDNSProvider, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*GlobalDNSProvider), err +} + func (s *globalDnsProviderClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go b/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go index 94893b07..76f07d97 100644 --- a/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_global_role_binding_controller.go @@ -73,8 +73,6 @@ type GlobalRoleBindingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler GlobalRoleBindingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type GlobalRoleBindingInterface interface { @@ -125,7 +123,7 @@ func (l *globalRoleBindingLister) Get(namespace, name string) (*GlobalRoleBindin if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: GlobalRoleBindingGroupVersionKind.Group, - Resource: "globalRoleBinding", + Resource: GlobalRoleBindingGroupVersionResource.Resource, }, key) } return obj.(*GlobalRoleBinding), nil @@ -209,25 +207,12 @@ func (c globalRoleBindingFactory) List() runtime.Object { } func (s *globalRoleBindingClient) Controller() GlobalRoleBindingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.globalRoleBindingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(GlobalRoleBindingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(GlobalRoleBindingGroupVersionResource, GlobalRoleBindingGroupVersionKind.Kind, false)) - c = &globalRoleBindingController{ + return &globalRoleBindingController{ GenericController: genericController, } - - s.client.globalRoleBindingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type globalRoleBindingClient struct { @@ -261,6 +246,11 @@ func (s *globalRoleBindingClient) Update(o *GlobalRoleBinding) (*GlobalRoleBindi return obj.(*GlobalRoleBinding), err } +func (s *globalRoleBindingClient) UpdateStatus(o *GlobalRoleBinding) (*GlobalRoleBinding, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*GlobalRoleBinding), err +} + func (s *globalRoleBindingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_global_role_controller.go b/apis/management.cattle.io/v3/zz_generated_global_role_controller.go index f485d4e6..cf36addc 100644 --- a/apis/management.cattle.io/v3/zz_generated_global_role_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_global_role_controller.go @@ -73,8 +73,6 @@ type GlobalRoleController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler GlobalRoleHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type GlobalRoleInterface interface { @@ -125,7 +123,7 @@ func (l *globalRoleLister) Get(namespace, name string) (*GlobalRole, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: GlobalRoleGroupVersionKind.Group, - Resource: "globalRole", + Resource: GlobalRoleGroupVersionResource.Resource, }, key) } return obj.(*GlobalRole), nil @@ -209,25 +207,12 @@ func (c globalRoleFactory) List() runtime.Object { } func (s *globalRoleClient) Controller() GlobalRoleController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.globalRoleControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(GlobalRoleGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(GlobalRoleGroupVersionResource, GlobalRoleGroupVersionKind.Kind, false)) - c = &globalRoleController{ + return &globalRoleController{ GenericController: genericController, } - - s.client.globalRoleControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type globalRoleClient struct { @@ -261,6 +246,11 @@ func (s *globalRoleClient) Update(o *GlobalRole) (*GlobalRole, error) { return obj.(*GlobalRole), err } +func (s *globalRoleClient) UpdateStatus(o *GlobalRole) (*GlobalRole, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*GlobalRole), err +} + func (s *globalRoleClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_group_controller.go b/apis/management.cattle.io/v3/zz_generated_group_controller.go index f21c0a71..8863e9af 100644 --- a/apis/management.cattle.io/v3/zz_generated_group_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_group_controller.go @@ -73,8 +73,6 @@ type GroupController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler GroupHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type GroupInterface interface { @@ -125,7 +123,7 @@ func (l *groupLister) Get(namespace, name string) (*Group, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: GroupGroupVersionKind.Group, - Resource: "group", + Resource: GroupGroupVersionResource.Resource, }, key) } return obj.(*Group), nil @@ -209,25 +207,12 @@ func (c groupFactory) List() runtime.Object { } func (s *groupClient) Controller() GroupController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.groupControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(GroupGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(GroupGroupVersionResource, GroupGroupVersionKind.Kind, false)) - c = &groupController{ + return &groupController{ GenericController: genericController, } - - s.client.groupControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type groupClient struct { @@ -261,6 +246,11 @@ func (s *groupClient) Update(o *Group) (*Group, error) { return obj.(*Group), err } +func (s *groupClient) UpdateStatus(o *Group) (*Group, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Group), err +} + func (s *groupClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_group_member_controller.go b/apis/management.cattle.io/v3/zz_generated_group_member_controller.go index 10f2567b..82407970 100644 --- a/apis/management.cattle.io/v3/zz_generated_group_member_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_group_member_controller.go @@ -73,8 +73,6 @@ type GroupMemberController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler GroupMemberHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type GroupMemberInterface interface { @@ -125,7 +123,7 @@ func (l *groupMemberLister) Get(namespace, name string) (*GroupMember, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: GroupMemberGroupVersionKind.Group, - Resource: "groupMember", + Resource: GroupMemberGroupVersionResource.Resource, }, key) } return obj.(*GroupMember), nil @@ -209,25 +207,12 @@ func (c groupMemberFactory) List() runtime.Object { } func (s *groupMemberClient) Controller() GroupMemberController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.groupMemberControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(GroupMemberGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(GroupMemberGroupVersionResource, GroupMemberGroupVersionKind.Kind, false)) - c = &groupMemberController{ + return &groupMemberController{ GenericController: genericController, } - - s.client.groupMemberControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type groupMemberClient struct { @@ -261,6 +246,11 @@ func (s *groupMemberClient) Update(o *GroupMember) (*GroupMember, error) { return obj.(*GroupMember), err } +func (s *groupMemberClient) UpdateStatus(o *GroupMember) (*GroupMember, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*GroupMember), err +} + func (s *groupMemberClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_k8s_client.go b/apis/management.cattle.io/v3/zz_generated_k8s_client.go index 12a6a134..80784acf 100644 --- a/apis/management.cattle.io/v3/zz_generated_k8s_client.go +++ b/apis/management.cattle.io/v3/zz_generated_k8s_client.go @@ -1,25 +1,14 @@ package v3 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" ) -type ( - contextKeyType struct{} - contextClientsKeyType struct{} -) - type Interface interface { - RESTClient() rest.Interface - controller.Starter - NodePoolsGetter NodesGetter NodeDriversGetter @@ -67,7 +56,7 @@ type Interface interface { ClusterCatalogsGetter MultiClusterAppsGetter MultiClusterAppRevisionsGetter - GlobalDNSsGetter + GlobalDnsesGetter GlobalDNSProvidersGetter KontainerDriversGetter EtcdBackupsGetter @@ -78,180 +67,44 @@ type Interface interface { CloudCredentialsGetter ClusterTemplatesGetter ClusterTemplateRevisionsGetter - RKEK8sSystemImagesGetter - RKEK8sServiceOptionsGetter - RKEAddonsGetter + RkeK8sSystemImagesGetter + RkeK8sServiceOptionsGetter + RkeAddonsGetter CisConfigsGetter CisBenchmarkVersionsGetter } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - nodePoolControllers map[string]NodePoolController - nodeControllers map[string]NodeController - nodeDriverControllers map[string]NodeDriverController - nodeTemplateControllers map[string]NodeTemplateController - projectControllers map[string]ProjectController - globalRoleControllers map[string]GlobalRoleController - globalRoleBindingControllers map[string]GlobalRoleBindingController - roleTemplateControllers map[string]RoleTemplateController - podSecurityPolicyTemplateControllers map[string]PodSecurityPolicyTemplateController - podSecurityPolicyTemplateProjectBindingControllers map[string]PodSecurityPolicyTemplateProjectBindingController - clusterRoleTemplateBindingControllers map[string]ClusterRoleTemplateBindingController - projectRoleTemplateBindingControllers map[string]ProjectRoleTemplateBindingController - clusterControllers map[string]ClusterController - clusterRegistrationTokenControllers map[string]ClusterRegistrationTokenController - catalogControllers map[string]CatalogController - templateControllers map[string]TemplateController - catalogTemplateControllers map[string]CatalogTemplateController - catalogTemplateVersionControllers map[string]CatalogTemplateVersionController - templateVersionControllers map[string]TemplateVersionController - templateContentControllers map[string]TemplateContentController - groupControllers map[string]GroupController - groupMemberControllers map[string]GroupMemberController - principalControllers map[string]PrincipalController - userControllers map[string]UserController - authConfigControllers map[string]AuthConfigController - ldapConfigControllers map[string]LdapConfigController - tokenControllers map[string]TokenController - dynamicSchemaControllers map[string]DynamicSchemaController - preferenceControllers map[string]PreferenceController - userAttributeControllers map[string]UserAttributeController - projectNetworkPolicyControllers map[string]ProjectNetworkPolicyController - clusterLoggingControllers map[string]ClusterLoggingController - projectLoggingControllers map[string]ProjectLoggingController - settingControllers map[string]SettingController - featureControllers map[string]FeatureController - clusterAlertControllers map[string]ClusterAlertController - projectAlertControllers map[string]ProjectAlertController - notifierControllers map[string]NotifierController - clusterAlertGroupControllers map[string]ClusterAlertGroupController - projectAlertGroupControllers map[string]ProjectAlertGroupController - clusterAlertRuleControllers map[string]ClusterAlertRuleController - projectAlertRuleControllers map[string]ProjectAlertRuleController - composeConfigControllers map[string]ComposeConfigController - projectCatalogControllers map[string]ProjectCatalogController - clusterCatalogControllers map[string]ClusterCatalogController - multiClusterAppControllers map[string]MultiClusterAppController - multiClusterAppRevisionControllers map[string]MultiClusterAppRevisionController - globalDnsControllers map[string]GlobalDNSController - globalDnsProviderControllers map[string]GlobalDNSProviderController - kontainerDriverControllers map[string]KontainerDriverController - etcdBackupControllers map[string]EtcdBackupController - clusterScanControllers map[string]ClusterScanController - monitorMetricControllers map[string]MonitorMetricController - clusterMonitorGraphControllers map[string]ClusterMonitorGraphController - projectMonitorGraphControllers map[string]ProjectMonitorGraphController - cloudCredentialControllers map[string]CloudCredentialController - clusterTemplateControllers map[string]ClusterTemplateController - clusterTemplateRevisionControllers map[string]ClusterTemplateRevisionController - rkeK8sSystemImageControllers map[string]RKEK8sSystemImageController - rkeK8sServiceOptionControllers map[string]RKEK8sServiceOptionController - rkeAddonControllers map[string]RKEAddonController - cisConfigControllers map[string]CisConfigController - cisBenchmarkVersionControllers map[string]CisBenchmarkVersionController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer +func NewForConfig(cfg rest.Config) (Interface, error) { + scheme := runtime.NewScheme() + if err := AddToScheme(scheme); err != nil { + return nil, err } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) + controllerFactory, err := controller.NewSharedControllerFactoryFromConfig(&cfg, scheme) if err != nil { return nil, err } + return NewFromControllerFactory(controllerFactory) +} +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - nodePoolControllers: map[string]NodePoolController{}, - nodeControllers: map[string]NodeController{}, - nodeDriverControllers: map[string]NodeDriverController{}, - nodeTemplateControllers: map[string]NodeTemplateController{}, - projectControllers: map[string]ProjectController{}, - globalRoleControllers: map[string]GlobalRoleController{}, - globalRoleBindingControllers: map[string]GlobalRoleBindingController{}, - roleTemplateControllers: map[string]RoleTemplateController{}, - podSecurityPolicyTemplateControllers: map[string]PodSecurityPolicyTemplateController{}, - podSecurityPolicyTemplateProjectBindingControllers: map[string]PodSecurityPolicyTemplateProjectBindingController{}, - clusterRoleTemplateBindingControllers: map[string]ClusterRoleTemplateBindingController{}, - projectRoleTemplateBindingControllers: map[string]ProjectRoleTemplateBindingController{}, - clusterControllers: map[string]ClusterController{}, - clusterRegistrationTokenControllers: map[string]ClusterRegistrationTokenController{}, - catalogControllers: map[string]CatalogController{}, - templateControllers: map[string]TemplateController{}, - catalogTemplateControllers: map[string]CatalogTemplateController{}, - catalogTemplateVersionControllers: map[string]CatalogTemplateVersionController{}, - templateVersionControllers: map[string]TemplateVersionController{}, - templateContentControllers: map[string]TemplateContentController{}, - groupControllers: map[string]GroupController{}, - groupMemberControllers: map[string]GroupMemberController{}, - principalControllers: map[string]PrincipalController{}, - userControllers: map[string]UserController{}, - authConfigControllers: map[string]AuthConfigController{}, - ldapConfigControllers: map[string]LdapConfigController{}, - tokenControllers: map[string]TokenController{}, - dynamicSchemaControllers: map[string]DynamicSchemaController{}, - preferenceControllers: map[string]PreferenceController{}, - userAttributeControllers: map[string]UserAttributeController{}, - projectNetworkPolicyControllers: map[string]ProjectNetworkPolicyController{}, - clusterLoggingControllers: map[string]ClusterLoggingController{}, - projectLoggingControllers: map[string]ProjectLoggingController{}, - settingControllers: map[string]SettingController{}, - featureControllers: map[string]FeatureController{}, - clusterAlertControllers: map[string]ClusterAlertController{}, - projectAlertControllers: map[string]ProjectAlertController{}, - notifierControllers: map[string]NotifierController{}, - clusterAlertGroupControllers: map[string]ClusterAlertGroupController{}, - projectAlertGroupControllers: map[string]ProjectAlertGroupController{}, - clusterAlertRuleControllers: map[string]ClusterAlertRuleController{}, - projectAlertRuleControllers: map[string]ProjectAlertRuleController{}, - composeConfigControllers: map[string]ComposeConfigController{}, - projectCatalogControllers: map[string]ProjectCatalogController{}, - clusterCatalogControllers: map[string]ClusterCatalogController{}, - multiClusterAppControllers: map[string]MultiClusterAppController{}, - multiClusterAppRevisionControllers: map[string]MultiClusterAppRevisionController{}, - globalDnsControllers: map[string]GlobalDNSController{}, - globalDnsProviderControllers: map[string]GlobalDNSProviderController{}, - kontainerDriverControllers: map[string]KontainerDriverController{}, - etcdBackupControllers: map[string]EtcdBackupController{}, - clusterScanControllers: map[string]ClusterScanController{}, - monitorMetricControllers: map[string]MonitorMetricController{}, - clusterMonitorGraphControllers: map[string]ClusterMonitorGraphController{}, - projectMonitorGraphControllers: map[string]ProjectMonitorGraphController{}, - cloudCredentialControllers: map[string]CloudCredentialController{}, - clusterTemplateControllers: map[string]ClusterTemplateController{}, - clusterTemplateRevisionControllers: map[string]ClusterTemplateRevisionController{}, - rkeK8sSystemImageControllers: map[string]RKEK8sSystemImageController{}, - rkeK8sServiceOptionControllers: map[string]RKEK8sServiceOptionController{}, - rkeAddonControllers: map[string]RKEAddonController{}, - cisConfigControllers: map[string]CisConfigController{}, - cisBenchmarkVersionControllers: map[string]CisBenchmarkVersionController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type NodePoolsGetter interface { NodePools(namespace string) NodePoolInterface } func (c *Client) NodePools(namespace string) NodePoolInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NodePoolResource, NodePoolGroupVersionKind, nodePoolFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NodePoolGroupVersionResource, NodePoolGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NodePoolResource, NodePoolGroupVersionKind, nodePoolFactory{}) return &nodePoolClient{ ns: namespace, client: c, @@ -264,7 +117,8 @@ type NodesGetter interface { } func (c *Client) Nodes(namespace string) NodeInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NodeResource, NodeGroupVersionKind, nodeFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NodeGroupVersionResource, NodeGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NodeResource, NodeGroupVersionKind, nodeFactory{}) return &nodeClient{ ns: namespace, client: c, @@ -277,7 +131,8 @@ type NodeDriversGetter interface { } func (c *Client) NodeDrivers(namespace string) NodeDriverInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NodeDriverResource, NodeDriverGroupVersionKind, nodeDriverFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NodeDriverGroupVersionResource, NodeDriverGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NodeDriverResource, NodeDriverGroupVersionKind, nodeDriverFactory{}) return &nodeDriverClient{ ns: namespace, client: c, @@ -290,7 +145,8 @@ type NodeTemplatesGetter interface { } func (c *Client) NodeTemplates(namespace string) NodeTemplateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NodeTemplateResource, NodeTemplateGroupVersionKind, nodeTemplateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NodeTemplateGroupVersionResource, NodeTemplateGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NodeTemplateResource, NodeTemplateGroupVersionKind, nodeTemplateFactory{}) return &nodeTemplateClient{ ns: namespace, client: c, @@ -303,7 +159,8 @@ type ProjectsGetter interface { } func (c *Client) Projects(namespace string) ProjectInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectResource, ProjectGroupVersionKind, projectFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectGroupVersionResource, ProjectGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectResource, ProjectGroupVersionKind, projectFactory{}) return &projectClient{ ns: namespace, client: c, @@ -316,7 +173,8 @@ type GlobalRolesGetter interface { } func (c *Client) GlobalRoles(namespace string) GlobalRoleInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &GlobalRoleResource, GlobalRoleGroupVersionKind, globalRoleFactory{}) + sharedClient := c.clientFactory.ForResourceKind(GlobalRoleGroupVersionResource, GlobalRoleGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &GlobalRoleResource, GlobalRoleGroupVersionKind, globalRoleFactory{}) return &globalRoleClient{ ns: namespace, client: c, @@ -329,7 +187,8 @@ type GlobalRoleBindingsGetter interface { } func (c *Client) GlobalRoleBindings(namespace string) GlobalRoleBindingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &GlobalRoleBindingResource, GlobalRoleBindingGroupVersionKind, globalRoleBindingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(GlobalRoleBindingGroupVersionResource, GlobalRoleBindingGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &GlobalRoleBindingResource, GlobalRoleBindingGroupVersionKind, globalRoleBindingFactory{}) return &globalRoleBindingClient{ ns: namespace, client: c, @@ -342,7 +201,8 @@ type RoleTemplatesGetter interface { } func (c *Client) RoleTemplates(namespace string) RoleTemplateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RoleTemplateResource, RoleTemplateGroupVersionKind, roleTemplateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(RoleTemplateGroupVersionResource, RoleTemplateGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &RoleTemplateResource, RoleTemplateGroupVersionKind, roleTemplateFactory{}) return &roleTemplateClient{ ns: namespace, client: c, @@ -355,7 +215,8 @@ type PodSecurityPolicyTemplatesGetter interface { } func (c *Client) PodSecurityPolicyTemplates(namespace string) PodSecurityPolicyTemplateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PodSecurityPolicyTemplateResource, PodSecurityPolicyTemplateGroupVersionKind, podSecurityPolicyTemplateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PodSecurityPolicyTemplateGroupVersionResource, PodSecurityPolicyTemplateGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PodSecurityPolicyTemplateResource, PodSecurityPolicyTemplateGroupVersionKind, podSecurityPolicyTemplateFactory{}) return &podSecurityPolicyTemplateClient{ ns: namespace, client: c, @@ -368,7 +229,8 @@ type PodSecurityPolicyTemplateProjectBindingsGetter interface { } func (c *Client) PodSecurityPolicyTemplateProjectBindings(namespace string) PodSecurityPolicyTemplateProjectBindingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PodSecurityPolicyTemplateProjectBindingResource, PodSecurityPolicyTemplateProjectBindingGroupVersionKind, podSecurityPolicyTemplateProjectBindingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PodSecurityPolicyTemplateProjectBindingGroupVersionResource, PodSecurityPolicyTemplateProjectBindingGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PodSecurityPolicyTemplateProjectBindingResource, PodSecurityPolicyTemplateProjectBindingGroupVersionKind, podSecurityPolicyTemplateProjectBindingFactory{}) return &podSecurityPolicyTemplateProjectBindingClient{ ns: namespace, client: c, @@ -381,7 +243,8 @@ type ClusterRoleTemplateBindingsGetter interface { } func (c *Client) ClusterRoleTemplateBindings(namespace string) ClusterRoleTemplateBindingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterRoleTemplateBindingResource, ClusterRoleTemplateBindingGroupVersionKind, clusterRoleTemplateBindingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterRoleTemplateBindingGroupVersionResource, ClusterRoleTemplateBindingGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterRoleTemplateBindingResource, ClusterRoleTemplateBindingGroupVersionKind, clusterRoleTemplateBindingFactory{}) return &clusterRoleTemplateBindingClient{ ns: namespace, client: c, @@ -394,7 +257,8 @@ type ProjectRoleTemplateBindingsGetter interface { } func (c *Client) ProjectRoleTemplateBindings(namespace string) ProjectRoleTemplateBindingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectRoleTemplateBindingResource, ProjectRoleTemplateBindingGroupVersionKind, projectRoleTemplateBindingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectRoleTemplateBindingGroupVersionResource, ProjectRoleTemplateBindingGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectRoleTemplateBindingResource, ProjectRoleTemplateBindingGroupVersionKind, projectRoleTemplateBindingFactory{}) return &projectRoleTemplateBindingClient{ ns: namespace, client: c, @@ -407,7 +271,8 @@ type ClustersGetter interface { } func (c *Client) Clusters(namespace string) ClusterInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterResource, ClusterGroupVersionKind, clusterFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterGroupVersionResource, ClusterGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterResource, ClusterGroupVersionKind, clusterFactory{}) return &clusterClient{ ns: namespace, client: c, @@ -420,7 +285,8 @@ type ClusterRegistrationTokensGetter interface { } func (c *Client) ClusterRegistrationTokens(namespace string) ClusterRegistrationTokenInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterRegistrationTokenResource, ClusterRegistrationTokenGroupVersionKind, clusterRegistrationTokenFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterRegistrationTokenGroupVersionResource, ClusterRegistrationTokenGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterRegistrationTokenResource, ClusterRegistrationTokenGroupVersionKind, clusterRegistrationTokenFactory{}) return &clusterRegistrationTokenClient{ ns: namespace, client: c, @@ -433,7 +299,8 @@ type CatalogsGetter interface { } func (c *Client) Catalogs(namespace string) CatalogInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CatalogResource, CatalogGroupVersionKind, catalogFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CatalogGroupVersionResource, CatalogGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CatalogResource, CatalogGroupVersionKind, catalogFactory{}) return &catalogClient{ ns: namespace, client: c, @@ -446,7 +313,8 @@ type TemplatesGetter interface { } func (c *Client) Templates(namespace string) TemplateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &TemplateResource, TemplateGroupVersionKind, templateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(TemplateGroupVersionResource, TemplateGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &TemplateResource, TemplateGroupVersionKind, templateFactory{}) return &templateClient{ ns: namespace, client: c, @@ -459,7 +327,8 @@ type CatalogTemplatesGetter interface { } func (c *Client) CatalogTemplates(namespace string) CatalogTemplateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CatalogTemplateResource, CatalogTemplateGroupVersionKind, catalogTemplateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CatalogTemplateGroupVersionResource, CatalogTemplateGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CatalogTemplateResource, CatalogTemplateGroupVersionKind, catalogTemplateFactory{}) return &catalogTemplateClient{ ns: namespace, client: c, @@ -472,7 +341,8 @@ type CatalogTemplateVersionsGetter interface { } func (c *Client) CatalogTemplateVersions(namespace string) CatalogTemplateVersionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CatalogTemplateVersionResource, CatalogTemplateVersionGroupVersionKind, catalogTemplateVersionFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CatalogTemplateVersionGroupVersionResource, CatalogTemplateVersionGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CatalogTemplateVersionResource, CatalogTemplateVersionGroupVersionKind, catalogTemplateVersionFactory{}) return &catalogTemplateVersionClient{ ns: namespace, client: c, @@ -485,7 +355,8 @@ type TemplateVersionsGetter interface { } func (c *Client) TemplateVersions(namespace string) TemplateVersionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &TemplateVersionResource, TemplateVersionGroupVersionKind, templateVersionFactory{}) + sharedClient := c.clientFactory.ForResourceKind(TemplateVersionGroupVersionResource, TemplateVersionGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &TemplateVersionResource, TemplateVersionGroupVersionKind, templateVersionFactory{}) return &templateVersionClient{ ns: namespace, client: c, @@ -498,7 +369,8 @@ type TemplateContentsGetter interface { } func (c *Client) TemplateContents(namespace string) TemplateContentInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &TemplateContentResource, TemplateContentGroupVersionKind, templateContentFactory{}) + sharedClient := c.clientFactory.ForResourceKind(TemplateContentGroupVersionResource, TemplateContentGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &TemplateContentResource, TemplateContentGroupVersionKind, templateContentFactory{}) return &templateContentClient{ ns: namespace, client: c, @@ -511,7 +383,8 @@ type GroupsGetter interface { } func (c *Client) Groups(namespace string) GroupInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &GroupResource, GroupGroupVersionKind, groupFactory{}) + sharedClient := c.clientFactory.ForResourceKind(GroupGroupVersionResource, GroupGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &GroupResource, GroupGroupVersionKind, groupFactory{}) return &groupClient{ ns: namespace, client: c, @@ -524,7 +397,8 @@ type GroupMembersGetter interface { } func (c *Client) GroupMembers(namespace string) GroupMemberInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &GroupMemberResource, GroupMemberGroupVersionKind, groupMemberFactory{}) + sharedClient := c.clientFactory.ForResourceKind(GroupMemberGroupVersionResource, GroupMemberGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &GroupMemberResource, GroupMemberGroupVersionKind, groupMemberFactory{}) return &groupMemberClient{ ns: namespace, client: c, @@ -537,7 +411,8 @@ type PrincipalsGetter interface { } func (c *Client) Principals(namespace string) PrincipalInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PrincipalResource, PrincipalGroupVersionKind, principalFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PrincipalGroupVersionResource, PrincipalGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PrincipalResource, PrincipalGroupVersionKind, principalFactory{}) return &principalClient{ ns: namespace, client: c, @@ -550,7 +425,8 @@ type UsersGetter interface { } func (c *Client) Users(namespace string) UserInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &UserResource, UserGroupVersionKind, userFactory{}) + sharedClient := c.clientFactory.ForResourceKind(UserGroupVersionResource, UserGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &UserResource, UserGroupVersionKind, userFactory{}) return &userClient{ ns: namespace, client: c, @@ -563,7 +439,8 @@ type AuthConfigsGetter interface { } func (c *Client) AuthConfigs(namespace string) AuthConfigInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &AuthConfigResource, AuthConfigGroupVersionKind, authConfigFactory{}) + sharedClient := c.clientFactory.ForResourceKind(AuthConfigGroupVersionResource, AuthConfigGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &AuthConfigResource, AuthConfigGroupVersionKind, authConfigFactory{}) return &authConfigClient{ ns: namespace, client: c, @@ -576,7 +453,8 @@ type LdapConfigsGetter interface { } func (c *Client) LdapConfigs(namespace string) LdapConfigInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &LdapConfigResource, LdapConfigGroupVersionKind, ldapConfigFactory{}) + sharedClient := c.clientFactory.ForResourceKind(LdapConfigGroupVersionResource, LdapConfigGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &LdapConfigResource, LdapConfigGroupVersionKind, ldapConfigFactory{}) return &ldapConfigClient{ ns: namespace, client: c, @@ -589,7 +467,8 @@ type TokensGetter interface { } func (c *Client) Tokens(namespace string) TokenInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &TokenResource, TokenGroupVersionKind, tokenFactory{}) + sharedClient := c.clientFactory.ForResourceKind(TokenGroupVersionResource, TokenGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &TokenResource, TokenGroupVersionKind, tokenFactory{}) return &tokenClient{ ns: namespace, client: c, @@ -602,7 +481,8 @@ type DynamicSchemasGetter interface { } func (c *Client) DynamicSchemas(namespace string) DynamicSchemaInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &DynamicSchemaResource, DynamicSchemaGroupVersionKind, dynamicSchemaFactory{}) + sharedClient := c.clientFactory.ForResourceKind(DynamicSchemaGroupVersionResource, DynamicSchemaGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &DynamicSchemaResource, DynamicSchemaGroupVersionKind, dynamicSchemaFactory{}) return &dynamicSchemaClient{ ns: namespace, client: c, @@ -615,7 +495,8 @@ type PreferencesGetter interface { } func (c *Client) Preferences(namespace string) PreferenceInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PreferenceResource, PreferenceGroupVersionKind, preferenceFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PreferenceGroupVersionResource, PreferenceGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PreferenceResource, PreferenceGroupVersionKind, preferenceFactory{}) return &preferenceClient{ ns: namespace, client: c, @@ -628,7 +509,8 @@ type UserAttributesGetter interface { } func (c *Client) UserAttributes(namespace string) UserAttributeInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &UserAttributeResource, UserAttributeGroupVersionKind, userAttributeFactory{}) + sharedClient := c.clientFactory.ForResourceKind(UserAttributeGroupVersionResource, UserAttributeGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &UserAttributeResource, UserAttributeGroupVersionKind, userAttributeFactory{}) return &userAttributeClient{ ns: namespace, client: c, @@ -641,7 +523,8 @@ type ProjectNetworkPoliciesGetter interface { } func (c *Client) ProjectNetworkPolicies(namespace string) ProjectNetworkPolicyInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectNetworkPolicyResource, ProjectNetworkPolicyGroupVersionKind, projectNetworkPolicyFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectNetworkPolicyGroupVersionResource, ProjectNetworkPolicyGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectNetworkPolicyResource, ProjectNetworkPolicyGroupVersionKind, projectNetworkPolicyFactory{}) return &projectNetworkPolicyClient{ ns: namespace, client: c, @@ -654,7 +537,8 @@ type ClusterLoggingsGetter interface { } func (c *Client) ClusterLoggings(namespace string) ClusterLoggingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterLoggingResource, ClusterLoggingGroupVersionKind, clusterLoggingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterLoggingGroupVersionResource, ClusterLoggingGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterLoggingResource, ClusterLoggingGroupVersionKind, clusterLoggingFactory{}) return &clusterLoggingClient{ ns: namespace, client: c, @@ -667,7 +551,8 @@ type ProjectLoggingsGetter interface { } func (c *Client) ProjectLoggings(namespace string) ProjectLoggingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectLoggingResource, ProjectLoggingGroupVersionKind, projectLoggingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectLoggingGroupVersionResource, ProjectLoggingGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectLoggingResource, ProjectLoggingGroupVersionKind, projectLoggingFactory{}) return &projectLoggingClient{ ns: namespace, client: c, @@ -680,7 +565,8 @@ type SettingsGetter interface { } func (c *Client) Settings(namespace string) SettingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SettingResource, SettingGroupVersionKind, settingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(SettingGroupVersionResource, SettingGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &SettingResource, SettingGroupVersionKind, settingFactory{}) return &settingClient{ ns: namespace, client: c, @@ -693,7 +579,8 @@ type FeaturesGetter interface { } func (c *Client) Features(namespace string) FeatureInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &FeatureResource, FeatureGroupVersionKind, featureFactory{}) + sharedClient := c.clientFactory.ForResourceKind(FeatureGroupVersionResource, FeatureGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &FeatureResource, FeatureGroupVersionKind, featureFactory{}) return &featureClient{ ns: namespace, client: c, @@ -706,7 +593,8 @@ type ClusterAlertsGetter interface { } func (c *Client) ClusterAlerts(namespace string) ClusterAlertInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterAlertResource, ClusterAlertGroupVersionKind, clusterAlertFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterAlertGroupVersionResource, ClusterAlertGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterAlertResource, ClusterAlertGroupVersionKind, clusterAlertFactory{}) return &clusterAlertClient{ ns: namespace, client: c, @@ -719,7 +607,8 @@ type ProjectAlertsGetter interface { } func (c *Client) ProjectAlerts(namespace string) ProjectAlertInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectAlertResource, ProjectAlertGroupVersionKind, projectAlertFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectAlertGroupVersionResource, ProjectAlertGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectAlertResource, ProjectAlertGroupVersionKind, projectAlertFactory{}) return &projectAlertClient{ ns: namespace, client: c, @@ -732,7 +621,8 @@ type NotifiersGetter interface { } func (c *Client) Notifiers(namespace string) NotifierInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NotifierResource, NotifierGroupVersionKind, notifierFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NotifierGroupVersionResource, NotifierGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NotifierResource, NotifierGroupVersionKind, notifierFactory{}) return ¬ifierClient{ ns: namespace, client: c, @@ -745,7 +635,8 @@ type ClusterAlertGroupsGetter interface { } func (c *Client) ClusterAlertGroups(namespace string) ClusterAlertGroupInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterAlertGroupResource, ClusterAlertGroupGroupVersionKind, clusterAlertGroupFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterAlertGroupGroupVersionResource, ClusterAlertGroupGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterAlertGroupResource, ClusterAlertGroupGroupVersionKind, clusterAlertGroupFactory{}) return &clusterAlertGroupClient{ ns: namespace, client: c, @@ -758,7 +649,8 @@ type ProjectAlertGroupsGetter interface { } func (c *Client) ProjectAlertGroups(namespace string) ProjectAlertGroupInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectAlertGroupResource, ProjectAlertGroupGroupVersionKind, projectAlertGroupFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectAlertGroupGroupVersionResource, ProjectAlertGroupGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectAlertGroupResource, ProjectAlertGroupGroupVersionKind, projectAlertGroupFactory{}) return &projectAlertGroupClient{ ns: namespace, client: c, @@ -771,7 +663,8 @@ type ClusterAlertRulesGetter interface { } func (c *Client) ClusterAlertRules(namespace string) ClusterAlertRuleInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterAlertRuleResource, ClusterAlertRuleGroupVersionKind, clusterAlertRuleFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterAlertRuleGroupVersionResource, ClusterAlertRuleGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterAlertRuleResource, ClusterAlertRuleGroupVersionKind, clusterAlertRuleFactory{}) return &clusterAlertRuleClient{ ns: namespace, client: c, @@ -784,7 +677,8 @@ type ProjectAlertRulesGetter interface { } func (c *Client) ProjectAlertRules(namespace string) ProjectAlertRuleInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectAlertRuleResource, ProjectAlertRuleGroupVersionKind, projectAlertRuleFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectAlertRuleGroupVersionResource, ProjectAlertRuleGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectAlertRuleResource, ProjectAlertRuleGroupVersionKind, projectAlertRuleFactory{}) return &projectAlertRuleClient{ ns: namespace, client: c, @@ -797,7 +691,8 @@ type ComposeConfigsGetter interface { } func (c *Client) ComposeConfigs(namespace string) ComposeConfigInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ComposeConfigResource, ComposeConfigGroupVersionKind, composeConfigFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ComposeConfigGroupVersionResource, ComposeConfigGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ComposeConfigResource, ComposeConfigGroupVersionKind, composeConfigFactory{}) return &composeConfigClient{ ns: namespace, client: c, @@ -810,7 +705,8 @@ type ProjectCatalogsGetter interface { } func (c *Client) ProjectCatalogs(namespace string) ProjectCatalogInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectCatalogResource, ProjectCatalogGroupVersionKind, projectCatalogFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectCatalogGroupVersionResource, ProjectCatalogGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectCatalogResource, ProjectCatalogGroupVersionKind, projectCatalogFactory{}) return &projectCatalogClient{ ns: namespace, client: c, @@ -823,7 +719,8 @@ type ClusterCatalogsGetter interface { } func (c *Client) ClusterCatalogs(namespace string) ClusterCatalogInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterCatalogResource, ClusterCatalogGroupVersionKind, clusterCatalogFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterCatalogGroupVersionResource, ClusterCatalogGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterCatalogResource, ClusterCatalogGroupVersionKind, clusterCatalogFactory{}) return &clusterCatalogClient{ ns: namespace, client: c, @@ -836,7 +733,8 @@ type MultiClusterAppsGetter interface { } func (c *Client) MultiClusterApps(namespace string) MultiClusterAppInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &MultiClusterAppResource, MultiClusterAppGroupVersionKind, multiClusterAppFactory{}) + sharedClient := c.clientFactory.ForResourceKind(MultiClusterAppGroupVersionResource, MultiClusterAppGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &MultiClusterAppResource, MultiClusterAppGroupVersionKind, multiClusterAppFactory{}) return &multiClusterAppClient{ ns: namespace, client: c, @@ -849,7 +747,8 @@ type MultiClusterAppRevisionsGetter interface { } func (c *Client) MultiClusterAppRevisions(namespace string) MultiClusterAppRevisionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &MultiClusterAppRevisionResource, MultiClusterAppRevisionGroupVersionKind, multiClusterAppRevisionFactory{}) + sharedClient := c.clientFactory.ForResourceKind(MultiClusterAppRevisionGroupVersionResource, MultiClusterAppRevisionGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &MultiClusterAppRevisionResource, MultiClusterAppRevisionGroupVersionKind, multiClusterAppRevisionFactory{}) return &multiClusterAppRevisionClient{ ns: namespace, client: c, @@ -857,12 +756,13 @@ func (c *Client) MultiClusterAppRevisions(namespace string) MultiClusterAppRevis } } -type GlobalDNSsGetter interface { - GlobalDNSs(namespace string) GlobalDNSInterface +type GlobalDnsesGetter interface { + GlobalDnses(namespace string) GlobalDnsInterface } -func (c *Client) GlobalDNSs(namespace string) GlobalDNSInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &GlobalDNSResource, GlobalDNSGroupVersionKind, globalDnsFactory{}) +func (c *Client) GlobalDnses(namespace string) GlobalDnsInterface { + sharedClient := c.clientFactory.ForResourceKind(GlobalDnsGroupVersionResource, GlobalDnsGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &GlobalDnsResource, GlobalDnsGroupVersionKind, globalDnsFactory{}) return &globalDnsClient{ ns: namespace, client: c, @@ -875,7 +775,8 @@ type GlobalDNSProvidersGetter interface { } func (c *Client) GlobalDNSProviders(namespace string) GlobalDNSProviderInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &GlobalDNSProviderResource, GlobalDNSProviderGroupVersionKind, globalDnsProviderFactory{}) + sharedClient := c.clientFactory.ForResourceKind(GlobalDNSProviderGroupVersionResource, GlobalDNSProviderGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &GlobalDNSProviderResource, GlobalDNSProviderGroupVersionKind, globalDnsProviderFactory{}) return &globalDnsProviderClient{ ns: namespace, client: c, @@ -888,7 +789,8 @@ type KontainerDriversGetter interface { } func (c *Client) KontainerDrivers(namespace string) KontainerDriverInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &KontainerDriverResource, KontainerDriverGroupVersionKind, kontainerDriverFactory{}) + sharedClient := c.clientFactory.ForResourceKind(KontainerDriverGroupVersionResource, KontainerDriverGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &KontainerDriverResource, KontainerDriverGroupVersionKind, kontainerDriverFactory{}) return &kontainerDriverClient{ ns: namespace, client: c, @@ -901,7 +803,8 @@ type EtcdBackupsGetter interface { } func (c *Client) EtcdBackups(namespace string) EtcdBackupInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &EtcdBackupResource, EtcdBackupGroupVersionKind, etcdBackupFactory{}) + sharedClient := c.clientFactory.ForResourceKind(EtcdBackupGroupVersionResource, EtcdBackupGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &EtcdBackupResource, EtcdBackupGroupVersionKind, etcdBackupFactory{}) return &etcdBackupClient{ ns: namespace, client: c, @@ -914,7 +817,8 @@ type ClusterScansGetter interface { } func (c *Client) ClusterScans(namespace string) ClusterScanInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterScanResource, ClusterScanGroupVersionKind, clusterScanFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterScanGroupVersionResource, ClusterScanGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterScanResource, ClusterScanGroupVersionKind, clusterScanFactory{}) return &clusterScanClient{ ns: namespace, client: c, @@ -927,7 +831,8 @@ type MonitorMetricsGetter interface { } func (c *Client) MonitorMetrics(namespace string) MonitorMetricInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &MonitorMetricResource, MonitorMetricGroupVersionKind, monitorMetricFactory{}) + sharedClient := c.clientFactory.ForResourceKind(MonitorMetricGroupVersionResource, MonitorMetricGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &MonitorMetricResource, MonitorMetricGroupVersionKind, monitorMetricFactory{}) return &monitorMetricClient{ ns: namespace, client: c, @@ -940,7 +845,8 @@ type ClusterMonitorGraphsGetter interface { } func (c *Client) ClusterMonitorGraphs(namespace string) ClusterMonitorGraphInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterMonitorGraphResource, ClusterMonitorGraphGroupVersionKind, clusterMonitorGraphFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterMonitorGraphGroupVersionResource, ClusterMonitorGraphGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterMonitorGraphResource, ClusterMonitorGraphGroupVersionKind, clusterMonitorGraphFactory{}) return &clusterMonitorGraphClient{ ns: namespace, client: c, @@ -953,7 +859,8 @@ type ProjectMonitorGraphsGetter interface { } func (c *Client) ProjectMonitorGraphs(namespace string) ProjectMonitorGraphInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ProjectMonitorGraphResource, ProjectMonitorGraphGroupVersionKind, projectMonitorGraphFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ProjectMonitorGraphGroupVersionResource, ProjectMonitorGraphGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ProjectMonitorGraphResource, ProjectMonitorGraphGroupVersionKind, projectMonitorGraphFactory{}) return &projectMonitorGraphClient{ ns: namespace, client: c, @@ -966,7 +873,8 @@ type CloudCredentialsGetter interface { } func (c *Client) CloudCredentials(namespace string) CloudCredentialInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CloudCredentialResource, CloudCredentialGroupVersionKind, cloudCredentialFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CloudCredentialGroupVersionResource, CloudCredentialGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CloudCredentialResource, CloudCredentialGroupVersionKind, cloudCredentialFactory{}) return &cloudCredentialClient{ ns: namespace, client: c, @@ -979,7 +887,8 @@ type ClusterTemplatesGetter interface { } func (c *Client) ClusterTemplates(namespace string) ClusterTemplateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterTemplateResource, ClusterTemplateGroupVersionKind, clusterTemplateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterTemplateGroupVersionResource, ClusterTemplateGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterTemplateResource, ClusterTemplateGroupVersionKind, clusterTemplateFactory{}) return &clusterTemplateClient{ ns: namespace, client: c, @@ -992,7 +901,8 @@ type ClusterTemplateRevisionsGetter interface { } func (c *Client) ClusterTemplateRevisions(namespace string) ClusterTemplateRevisionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterTemplateRevisionResource, ClusterTemplateRevisionGroupVersionKind, clusterTemplateRevisionFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterTemplateRevisionGroupVersionResource, ClusterTemplateRevisionGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterTemplateRevisionResource, ClusterTemplateRevisionGroupVersionKind, clusterTemplateRevisionFactory{}) return &clusterTemplateRevisionClient{ ns: namespace, client: c, @@ -1000,12 +910,13 @@ func (c *Client) ClusterTemplateRevisions(namespace string) ClusterTemplateRevis } } -type RKEK8sSystemImagesGetter interface { - RKEK8sSystemImages(namespace string) RKEK8sSystemImageInterface +type RkeK8sSystemImagesGetter interface { + RkeK8sSystemImages(namespace string) RkeK8sSystemImageInterface } -func (c *Client) RKEK8sSystemImages(namespace string) RKEK8sSystemImageInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RKEK8sSystemImageResource, RKEK8sSystemImageGroupVersionKind, rkeK8sSystemImageFactory{}) +func (c *Client) RkeK8sSystemImages(namespace string) RkeK8sSystemImageInterface { + sharedClient := c.clientFactory.ForResourceKind(RkeK8sSystemImageGroupVersionResource, RkeK8sSystemImageGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &RkeK8sSystemImageResource, RkeK8sSystemImageGroupVersionKind, rkeK8sSystemImageFactory{}) return &rkeK8sSystemImageClient{ ns: namespace, client: c, @@ -1013,12 +924,13 @@ func (c *Client) RKEK8sSystemImages(namespace string) RKEK8sSystemImageInterface } } -type RKEK8sServiceOptionsGetter interface { - RKEK8sServiceOptions(namespace string) RKEK8sServiceOptionInterface +type RkeK8sServiceOptionsGetter interface { + RkeK8sServiceOptions(namespace string) RkeK8sServiceOptionInterface } -func (c *Client) RKEK8sServiceOptions(namespace string) RKEK8sServiceOptionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RKEK8sServiceOptionResource, RKEK8sServiceOptionGroupVersionKind, rkeK8sServiceOptionFactory{}) +func (c *Client) RkeK8sServiceOptions(namespace string) RkeK8sServiceOptionInterface { + sharedClient := c.clientFactory.ForResourceKind(RkeK8sServiceOptionGroupVersionResource, RkeK8sServiceOptionGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &RkeK8sServiceOptionResource, RkeK8sServiceOptionGroupVersionKind, rkeK8sServiceOptionFactory{}) return &rkeK8sServiceOptionClient{ ns: namespace, client: c, @@ -1026,12 +938,13 @@ func (c *Client) RKEK8sServiceOptions(namespace string) RKEK8sServiceOptionInter } } -type RKEAddonsGetter interface { - RKEAddons(namespace string) RKEAddonInterface +type RkeAddonsGetter interface { + RkeAddons(namespace string) RkeAddonInterface } -func (c *Client) RKEAddons(namespace string) RKEAddonInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RKEAddonResource, RKEAddonGroupVersionKind, rkeAddonFactory{}) +func (c *Client) RkeAddons(namespace string) RkeAddonInterface { + sharedClient := c.clientFactory.ForResourceKind(RkeAddonGroupVersionResource, RkeAddonGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &RkeAddonResource, RkeAddonGroupVersionKind, rkeAddonFactory{}) return &rkeAddonClient{ ns: namespace, client: c, @@ -1044,7 +957,8 @@ type CisConfigsGetter interface { } func (c *Client) CisConfigs(namespace string) CisConfigInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CisConfigResource, CisConfigGroupVersionKind, cisConfigFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CisConfigGroupVersionResource, CisConfigGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CisConfigResource, CisConfigGroupVersionKind, cisConfigFactory{}) return &cisConfigClient{ ns: namespace, client: c, @@ -1057,7 +971,8 @@ type CisBenchmarkVersionsGetter interface { } func (c *Client) CisBenchmarkVersions(namespace string) CisBenchmarkVersionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CisBenchmarkVersionResource, CisBenchmarkVersionGroupVersionKind, cisBenchmarkVersionFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CisBenchmarkVersionGroupVersionResource, CisBenchmarkVersionGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CisBenchmarkVersionResource, CisBenchmarkVersionGroupVersionKind, cisBenchmarkVersionFactory{}) return &cisBenchmarkVersionClient{ ns: namespace, client: c, diff --git a/apis/management.cattle.io/v3/zz_generated_kontainer_driver_controller.go b/apis/management.cattle.io/v3/zz_generated_kontainer_driver_controller.go index dc310f3b..32fb60b7 100644 --- a/apis/management.cattle.io/v3/zz_generated_kontainer_driver_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_kontainer_driver_controller.go @@ -73,8 +73,6 @@ type KontainerDriverController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler KontainerDriverHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type KontainerDriverInterface interface { @@ -125,7 +123,7 @@ func (l *kontainerDriverLister) Get(namespace, name string) (*KontainerDriver, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: KontainerDriverGroupVersionKind.Group, - Resource: "kontainerDriver", + Resource: KontainerDriverGroupVersionResource.Resource, }, key) } return obj.(*KontainerDriver), nil @@ -209,25 +207,12 @@ func (c kontainerDriverFactory) List() runtime.Object { } func (s *kontainerDriverClient) Controller() KontainerDriverController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.kontainerDriverControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(KontainerDriverGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(KontainerDriverGroupVersionResource, KontainerDriverGroupVersionKind.Kind, false)) - c = &kontainerDriverController{ + return &kontainerDriverController{ GenericController: genericController, } - - s.client.kontainerDriverControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type kontainerDriverClient struct { @@ -261,6 +246,11 @@ func (s *kontainerDriverClient) Update(o *KontainerDriver) (*KontainerDriver, er return obj.(*KontainerDriver), err } +func (s *kontainerDriverClient) UpdateStatus(o *KontainerDriver) (*KontainerDriver, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*KontainerDriver), err +} + func (s *kontainerDriverClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go b/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go index c24866ac..eb52683f 100644 --- a/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_ldap_config_controller.go @@ -73,8 +73,6 @@ type LdapConfigController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler LdapConfigHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type LdapConfigInterface interface { @@ -125,7 +123,7 @@ func (l *ldapConfigLister) Get(namespace, name string) (*LdapConfig, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: LdapConfigGroupVersionKind.Group, - Resource: "ldapConfig", + Resource: LdapConfigGroupVersionResource.Resource, }, key) } return obj.(*LdapConfig), nil @@ -209,25 +207,12 @@ func (c ldapConfigFactory) List() runtime.Object { } func (s *ldapConfigClient) Controller() LdapConfigController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.ldapConfigControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(LdapConfigGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(LdapConfigGroupVersionResource, LdapConfigGroupVersionKind.Kind, false)) - c = &ldapConfigController{ + return &ldapConfigController{ GenericController: genericController, } - - s.client.ldapConfigControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type ldapConfigClient struct { @@ -261,6 +246,11 @@ func (s *ldapConfigClient) Update(o *LdapConfig) (*LdapConfig, error) { return obj.(*LdapConfig), err } +func (s *ldapConfigClient) UpdateStatus(o *LdapConfig) (*LdapConfig, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*LdapConfig), err +} + func (s *ldapConfigClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_monitor_metric_controller.go b/apis/management.cattle.io/v3/zz_generated_monitor_metric_controller.go index b8035bf6..c9b312bd 100644 --- a/apis/management.cattle.io/v3/zz_generated_monitor_metric_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_monitor_metric_controller.go @@ -74,8 +74,6 @@ type MonitorMetricController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler MonitorMetricHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type MonitorMetricInterface interface { @@ -126,7 +124,7 @@ func (l *monitorMetricLister) Get(namespace, name string) (*MonitorMetric, error if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: MonitorMetricGroupVersionKind.Group, - Resource: "monitorMetric", + Resource: MonitorMetricGroupVersionResource.Resource, }, key) } return obj.(*MonitorMetric), nil @@ -210,25 +208,12 @@ func (c monitorMetricFactory) List() runtime.Object { } func (s *monitorMetricClient) Controller() MonitorMetricController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.monitorMetricControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(MonitorMetricGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(MonitorMetricGroupVersionResource, MonitorMetricGroupVersionKind.Kind, true)) - c = &monitorMetricController{ + return &monitorMetricController{ GenericController: genericController, } - - s.client.monitorMetricControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type monitorMetricClient struct { @@ -262,6 +247,11 @@ func (s *monitorMetricClient) Update(o *MonitorMetric) (*MonitorMetric, error) { return obj.(*MonitorMetric), err } +func (s *monitorMetricClient) UpdateStatus(o *MonitorMetric) (*MonitorMetric, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*MonitorMetric), err +} + func (s *monitorMetricClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_controller.go b/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_controller.go index 823806ae..544c9aec 100644 --- a/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_controller.go @@ -74,8 +74,6 @@ type MultiClusterAppController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler MultiClusterAppHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type MultiClusterAppInterface interface { @@ -126,7 +124,7 @@ func (l *multiClusterAppLister) Get(namespace, name string) (*MultiClusterApp, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: MultiClusterAppGroupVersionKind.Group, - Resource: "multiClusterApp", + Resource: MultiClusterAppGroupVersionResource.Resource, }, key) } return obj.(*MultiClusterApp), nil @@ -210,25 +208,12 @@ func (c multiClusterAppFactory) List() runtime.Object { } func (s *multiClusterAppClient) Controller() MultiClusterAppController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.multiClusterAppControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(MultiClusterAppGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(MultiClusterAppGroupVersionResource, MultiClusterAppGroupVersionKind.Kind, true)) - c = &multiClusterAppController{ + return &multiClusterAppController{ GenericController: genericController, } - - s.client.multiClusterAppControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type multiClusterAppClient struct { @@ -262,6 +247,11 @@ func (s *multiClusterAppClient) Update(o *MultiClusterApp) (*MultiClusterApp, er return obj.(*MultiClusterApp), err } +func (s *multiClusterAppClient) UpdateStatus(o *MultiClusterApp) (*MultiClusterApp, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*MultiClusterApp), err +} + func (s *multiClusterAppClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_revision_controller.go b/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_revision_controller.go index e6b6a978..73ee74b1 100644 --- a/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_revision_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_multi_cluster_app_revision_controller.go @@ -74,8 +74,6 @@ type MultiClusterAppRevisionController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler MultiClusterAppRevisionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type MultiClusterAppRevisionInterface interface { @@ -126,7 +124,7 @@ func (l *multiClusterAppRevisionLister) Get(namespace, name string) (*MultiClust if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: MultiClusterAppRevisionGroupVersionKind.Group, - Resource: "multiClusterAppRevision", + Resource: MultiClusterAppRevisionGroupVersionResource.Resource, }, key) } return obj.(*MultiClusterAppRevision), nil @@ -210,25 +208,12 @@ func (c multiClusterAppRevisionFactory) List() runtime.Object { } func (s *multiClusterAppRevisionClient) Controller() MultiClusterAppRevisionController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.multiClusterAppRevisionControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(MultiClusterAppRevisionGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(MultiClusterAppRevisionGroupVersionResource, MultiClusterAppRevisionGroupVersionKind.Kind, true)) - c = &multiClusterAppRevisionController{ + return &multiClusterAppRevisionController{ GenericController: genericController, } - - s.client.multiClusterAppRevisionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type multiClusterAppRevisionClient struct { @@ -262,6 +247,11 @@ func (s *multiClusterAppRevisionClient) Update(o *MultiClusterAppRevision) (*Mul return obj.(*MultiClusterAppRevision), err } +func (s *multiClusterAppRevisionClient) UpdateStatus(o *MultiClusterAppRevision) (*MultiClusterAppRevision, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*MultiClusterAppRevision), err +} + func (s *multiClusterAppRevisionClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_node_controller.go b/apis/management.cattle.io/v3/zz_generated_node_controller.go index 2b9917f9..7912234f 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_node_controller.go @@ -74,8 +74,6 @@ type NodeController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NodeHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NodeInterface interface { @@ -126,7 +124,7 @@ func (l *nodeLister) Get(namespace, name string) (*Node, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NodeGroupVersionKind.Group, - Resource: "node", + Resource: NodeGroupVersionResource.Resource, }, key) } return obj.(*Node), nil @@ -210,25 +208,12 @@ func (c nodeFactory) List() runtime.Object { } func (s *nodeClient) Controller() NodeController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.nodeControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NodeGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NodeGroupVersionResource, NodeGroupVersionKind.Kind, true)) - c = &nodeController{ + return &nodeController{ GenericController: genericController, } - - s.client.nodeControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type nodeClient struct { @@ -262,6 +247,11 @@ func (s *nodeClient) Update(o *Node) (*Node, error) { return obj.(*Node), err } +func (s *nodeClient) UpdateStatus(o *Node) (*Node, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Node), err +} + func (s *nodeClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go b/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go index 246098f8..41721533 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_node_driver_controller.go @@ -73,8 +73,6 @@ type NodeDriverController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NodeDriverHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NodeDriverInterface interface { @@ -125,7 +123,7 @@ func (l *nodeDriverLister) Get(namespace, name string) (*NodeDriver, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NodeDriverGroupVersionKind.Group, - Resource: "nodeDriver", + Resource: NodeDriverGroupVersionResource.Resource, }, key) } return obj.(*NodeDriver), nil @@ -209,25 +207,12 @@ func (c nodeDriverFactory) List() runtime.Object { } func (s *nodeDriverClient) Controller() NodeDriverController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.nodeDriverControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NodeDriverGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NodeDriverGroupVersionResource, NodeDriverGroupVersionKind.Kind, false)) - c = &nodeDriverController{ + return &nodeDriverController{ GenericController: genericController, } - - s.client.nodeDriverControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type nodeDriverClient struct { @@ -261,6 +246,11 @@ func (s *nodeDriverClient) Update(o *NodeDriver) (*NodeDriver, error) { return obj.(*NodeDriver), err } +func (s *nodeDriverClient) UpdateStatus(o *NodeDriver) (*NodeDriver, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NodeDriver), err +} + func (s *nodeDriverClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go b/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go index 7c4fc5f7..4e5a16fa 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_node_pool_controller.go @@ -74,8 +74,6 @@ type NodePoolController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NodePoolHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NodePoolInterface interface { @@ -126,7 +124,7 @@ func (l *nodePoolLister) Get(namespace, name string) (*NodePool, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NodePoolGroupVersionKind.Group, - Resource: "nodePool", + Resource: NodePoolGroupVersionResource.Resource, }, key) } return obj.(*NodePool), nil @@ -210,25 +208,12 @@ func (c nodePoolFactory) List() runtime.Object { } func (s *nodePoolClient) Controller() NodePoolController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.nodePoolControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NodePoolGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NodePoolGroupVersionResource, NodePoolGroupVersionKind.Kind, true)) - c = &nodePoolController{ + return &nodePoolController{ GenericController: genericController, } - - s.client.nodePoolControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type nodePoolClient struct { @@ -262,6 +247,11 @@ func (s *nodePoolClient) Update(o *NodePool) (*NodePool, error) { return obj.(*NodePool), err } +func (s *nodePoolClient) UpdateStatus(o *NodePool) (*NodePool, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NodePool), err +} + func (s *nodePoolClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_node_template_controller.go b/apis/management.cattle.io/v3/zz_generated_node_template_controller.go index 90c9ac27..d3df689b 100644 --- a/apis/management.cattle.io/v3/zz_generated_node_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_node_template_controller.go @@ -74,8 +74,6 @@ type NodeTemplateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NodeTemplateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NodeTemplateInterface interface { @@ -126,7 +124,7 @@ func (l *nodeTemplateLister) Get(namespace, name string) (*NodeTemplate, error) if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NodeTemplateGroupVersionKind.Group, - Resource: "nodeTemplate", + Resource: NodeTemplateGroupVersionResource.Resource, }, key) } return obj.(*NodeTemplate), nil @@ -210,25 +208,12 @@ func (c nodeTemplateFactory) List() runtime.Object { } func (s *nodeTemplateClient) Controller() NodeTemplateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.nodeTemplateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NodeTemplateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NodeTemplateGroupVersionResource, NodeTemplateGroupVersionKind.Kind, true)) - c = &nodeTemplateController{ + return &nodeTemplateController{ GenericController: genericController, } - - s.client.nodeTemplateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type nodeTemplateClient struct { @@ -262,6 +247,11 @@ func (s *nodeTemplateClient) Update(o *NodeTemplate) (*NodeTemplate, error) { return obj.(*NodeTemplate), err } +func (s *nodeTemplateClient) UpdateStatus(o *NodeTemplate) (*NodeTemplate, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NodeTemplate), err +} + func (s *nodeTemplateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_notifier_controller.go b/apis/management.cattle.io/v3/zz_generated_notifier_controller.go index 43aa3e40..f0e11af1 100644 --- a/apis/management.cattle.io/v3/zz_generated_notifier_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_notifier_controller.go @@ -74,8 +74,6 @@ type NotifierController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NotifierHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NotifierInterface interface { @@ -126,7 +124,7 @@ func (l *notifierLister) Get(namespace, name string) (*Notifier, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NotifierGroupVersionKind.Group, - Resource: "notifier", + Resource: NotifierGroupVersionResource.Resource, }, key) } return obj.(*Notifier), nil @@ -210,25 +208,12 @@ func (c notifierFactory) List() runtime.Object { } func (s *notifierClient) Controller() NotifierController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.notifierControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NotifierGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NotifierGroupVersionResource, NotifierGroupVersionKind.Kind, true)) - c = ¬ifierController{ + return ¬ifierController{ GenericController: genericController, } - - s.client.notifierControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type notifierClient struct { @@ -262,6 +247,11 @@ func (s *notifierClient) Update(o *Notifier) (*Notifier, error) { return obj.(*Notifier), err } +func (s *notifierClient) UpdateStatus(o *Notifier) (*Notifier, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Notifier), err +} + func (s *notifierClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go index acbc5f37..baa26d1e 100644 --- a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_controller.go @@ -73,8 +73,6 @@ type PodSecurityPolicyTemplateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PodSecurityPolicyTemplateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PodSecurityPolicyTemplateInterface interface { @@ -125,7 +123,7 @@ func (l *podSecurityPolicyTemplateLister) Get(namespace, name string) (*PodSecur if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PodSecurityPolicyTemplateGroupVersionKind.Group, - Resource: "podSecurityPolicyTemplate", + Resource: PodSecurityPolicyTemplateGroupVersionResource.Resource, }, key) } return obj.(*PodSecurityPolicyTemplate), nil @@ -209,25 +207,12 @@ func (c podSecurityPolicyTemplateFactory) List() runtime.Object { } func (s *podSecurityPolicyTemplateClient) Controller() PodSecurityPolicyTemplateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.podSecurityPolicyTemplateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PodSecurityPolicyTemplateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PodSecurityPolicyTemplateGroupVersionResource, PodSecurityPolicyTemplateGroupVersionKind.Kind, false)) - c = &podSecurityPolicyTemplateController{ + return &podSecurityPolicyTemplateController{ GenericController: genericController, } - - s.client.podSecurityPolicyTemplateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type podSecurityPolicyTemplateClient struct { @@ -261,6 +246,11 @@ func (s *podSecurityPolicyTemplateClient) Update(o *PodSecurityPolicyTemplate) ( return obj.(*PodSecurityPolicyTemplate), err } +func (s *podSecurityPolicyTemplateClient) UpdateStatus(o *PodSecurityPolicyTemplate) (*PodSecurityPolicyTemplate, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*PodSecurityPolicyTemplate), err +} + func (s *podSecurityPolicyTemplateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go index 0258b24c..4654308d 100644 --- a/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_pod_security_policy_template_project_binding_controller.go @@ -74,8 +74,6 @@ type PodSecurityPolicyTemplateProjectBindingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PodSecurityPolicyTemplateProjectBindingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PodSecurityPolicyTemplateProjectBindingInterface interface { @@ -126,7 +124,7 @@ func (l *podSecurityPolicyTemplateProjectBindingLister) Get(namespace, name stri if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PodSecurityPolicyTemplateProjectBindingGroupVersionKind.Group, - Resource: "podSecurityPolicyTemplateProjectBinding", + Resource: PodSecurityPolicyTemplateProjectBindingGroupVersionResource.Resource, }, key) } return obj.(*PodSecurityPolicyTemplateProjectBinding), nil @@ -210,25 +208,12 @@ func (c podSecurityPolicyTemplateProjectBindingFactory) List() runtime.Object { } func (s *podSecurityPolicyTemplateProjectBindingClient) Controller() PodSecurityPolicyTemplateProjectBindingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.podSecurityPolicyTemplateProjectBindingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PodSecurityPolicyTemplateProjectBindingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PodSecurityPolicyTemplateProjectBindingGroupVersionResource, PodSecurityPolicyTemplateProjectBindingGroupVersionKind.Kind, true)) - c = &podSecurityPolicyTemplateProjectBindingController{ + return &podSecurityPolicyTemplateProjectBindingController{ GenericController: genericController, } - - s.client.podSecurityPolicyTemplateProjectBindingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type podSecurityPolicyTemplateProjectBindingClient struct { @@ -262,6 +247,11 @@ func (s *podSecurityPolicyTemplateProjectBindingClient) Update(o *PodSecurityPol return obj.(*PodSecurityPolicyTemplateProjectBinding), err } +func (s *podSecurityPolicyTemplateProjectBindingClient) UpdateStatus(o *PodSecurityPolicyTemplateProjectBinding) (*PodSecurityPolicyTemplateProjectBinding, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*PodSecurityPolicyTemplateProjectBinding), err +} + func (s *podSecurityPolicyTemplateProjectBindingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_preference_controller.go b/apis/management.cattle.io/v3/zz_generated_preference_controller.go index 4476d048..a2a72a6b 100644 --- a/apis/management.cattle.io/v3/zz_generated_preference_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_preference_controller.go @@ -74,8 +74,6 @@ type PreferenceController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PreferenceHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PreferenceInterface interface { @@ -126,7 +124,7 @@ func (l *preferenceLister) Get(namespace, name string) (*Preference, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PreferenceGroupVersionKind.Group, - Resource: "preference", + Resource: PreferenceGroupVersionResource.Resource, }, key) } return obj.(*Preference), nil @@ -210,25 +208,12 @@ func (c preferenceFactory) List() runtime.Object { } func (s *preferenceClient) Controller() PreferenceController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.preferenceControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PreferenceGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PreferenceGroupVersionResource, PreferenceGroupVersionKind.Kind, true)) - c = &preferenceController{ + return &preferenceController{ GenericController: genericController, } - - s.client.preferenceControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type preferenceClient struct { @@ -262,6 +247,11 @@ func (s *preferenceClient) Update(o *Preference) (*Preference, error) { return obj.(*Preference), err } +func (s *preferenceClient) UpdateStatus(o *Preference) (*Preference, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Preference), err +} + func (s *preferenceClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_principal_controller.go b/apis/management.cattle.io/v3/zz_generated_principal_controller.go index 6a25fb1b..fe8d9d94 100644 --- a/apis/management.cattle.io/v3/zz_generated_principal_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_principal_controller.go @@ -73,8 +73,6 @@ type PrincipalController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PrincipalHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PrincipalInterface interface { @@ -125,7 +123,7 @@ func (l *principalLister) Get(namespace, name string) (*Principal, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PrincipalGroupVersionKind.Group, - Resource: "principal", + Resource: PrincipalGroupVersionResource.Resource, }, key) } return obj.(*Principal), nil @@ -209,25 +207,12 @@ func (c principalFactory) List() runtime.Object { } func (s *principalClient) Controller() PrincipalController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.principalControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PrincipalGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PrincipalGroupVersionResource, PrincipalGroupVersionKind.Kind, false)) - c = &principalController{ + return &principalController{ GenericController: genericController, } - - s.client.principalControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type principalClient struct { @@ -261,6 +246,11 @@ func (s *principalClient) Update(o *Principal) (*Principal, error) { return obj.(*Principal), err } +func (s *principalClient) UpdateStatus(o *Principal) (*Principal, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Principal), err +} + func (s *principalClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go b/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go index 0dac80d4..ca84a986 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_alert_controller.go @@ -74,8 +74,6 @@ type ProjectAlertController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectAlertHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectAlertInterface interface { @@ -126,7 +124,7 @@ func (l *projectAlertLister) Get(namespace, name string) (*ProjectAlert, error) if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectAlertGroupVersionKind.Group, - Resource: "projectAlert", + Resource: ProjectAlertGroupVersionResource.Resource, }, key) } return obj.(*ProjectAlert), nil @@ -210,25 +208,12 @@ func (c projectAlertFactory) List() runtime.Object { } func (s *projectAlertClient) Controller() ProjectAlertController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectAlertControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectAlertGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectAlertGroupVersionResource, ProjectAlertGroupVersionKind.Kind, true)) - c = &projectAlertController{ + return &projectAlertController{ GenericController: genericController, } - - s.client.projectAlertControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectAlertClient struct { @@ -262,6 +247,11 @@ func (s *projectAlertClient) Update(o *ProjectAlert) (*ProjectAlert, error) { return obj.(*ProjectAlert), err } +func (s *projectAlertClient) UpdateStatus(o *ProjectAlert) (*ProjectAlert, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectAlert), err +} + func (s *projectAlertClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_project_alert_group_controller.go b/apis/management.cattle.io/v3/zz_generated_project_alert_group_controller.go index 74a6f316..2591881f 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_alert_group_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_alert_group_controller.go @@ -74,8 +74,6 @@ type ProjectAlertGroupController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectAlertGroupHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectAlertGroupInterface interface { @@ -126,7 +124,7 @@ func (l *projectAlertGroupLister) Get(namespace, name string) (*ProjectAlertGrou if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectAlertGroupGroupVersionKind.Group, - Resource: "projectAlertGroup", + Resource: ProjectAlertGroupGroupVersionResource.Resource, }, key) } return obj.(*ProjectAlertGroup), nil @@ -210,25 +208,12 @@ func (c projectAlertGroupFactory) List() runtime.Object { } func (s *projectAlertGroupClient) Controller() ProjectAlertGroupController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectAlertGroupControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectAlertGroupGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectAlertGroupGroupVersionResource, ProjectAlertGroupGroupVersionKind.Kind, true)) - c = &projectAlertGroupController{ + return &projectAlertGroupController{ GenericController: genericController, } - - s.client.projectAlertGroupControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectAlertGroupClient struct { @@ -262,6 +247,11 @@ func (s *projectAlertGroupClient) Update(o *ProjectAlertGroup) (*ProjectAlertGro return obj.(*ProjectAlertGroup), err } +func (s *projectAlertGroupClient) UpdateStatus(o *ProjectAlertGroup) (*ProjectAlertGroup, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectAlertGroup), err +} + func (s *projectAlertGroupClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_project_alert_rule_controller.go b/apis/management.cattle.io/v3/zz_generated_project_alert_rule_controller.go index b1b471ba..afa41f40 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_alert_rule_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_alert_rule_controller.go @@ -74,8 +74,6 @@ type ProjectAlertRuleController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectAlertRuleHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectAlertRuleInterface interface { @@ -126,7 +124,7 @@ func (l *projectAlertRuleLister) Get(namespace, name string) (*ProjectAlertRule, if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectAlertRuleGroupVersionKind.Group, - Resource: "projectAlertRule", + Resource: ProjectAlertRuleGroupVersionResource.Resource, }, key) } return obj.(*ProjectAlertRule), nil @@ -210,25 +208,12 @@ func (c projectAlertRuleFactory) List() runtime.Object { } func (s *projectAlertRuleClient) Controller() ProjectAlertRuleController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectAlertRuleControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectAlertRuleGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectAlertRuleGroupVersionResource, ProjectAlertRuleGroupVersionKind.Kind, true)) - c = &projectAlertRuleController{ + return &projectAlertRuleController{ GenericController: genericController, } - - s.client.projectAlertRuleControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectAlertRuleClient struct { @@ -262,6 +247,11 @@ func (s *projectAlertRuleClient) Update(o *ProjectAlertRule) (*ProjectAlertRule, return obj.(*ProjectAlertRule), err } +func (s *projectAlertRuleClient) UpdateStatus(o *ProjectAlertRule) (*ProjectAlertRule, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectAlertRule), err +} + func (s *projectAlertRuleClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go b/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go index 731ecb3f..70dd4254 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_catalog_controller.go @@ -74,8 +74,6 @@ type ProjectCatalogController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectCatalogHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectCatalogInterface interface { @@ -126,7 +124,7 @@ func (l *projectCatalogLister) Get(namespace, name string) (*ProjectCatalog, err if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectCatalogGroupVersionKind.Group, - Resource: "projectCatalog", + Resource: ProjectCatalogGroupVersionResource.Resource, }, key) } return obj.(*ProjectCatalog), nil @@ -210,25 +208,12 @@ func (c projectCatalogFactory) List() runtime.Object { } func (s *projectCatalogClient) Controller() ProjectCatalogController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectCatalogControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectCatalogGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectCatalogGroupVersionResource, ProjectCatalogGroupVersionKind.Kind, true)) - c = &projectCatalogController{ + return &projectCatalogController{ GenericController: genericController, } - - s.client.projectCatalogControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectCatalogClient struct { @@ -262,6 +247,11 @@ func (s *projectCatalogClient) Update(o *ProjectCatalog) (*ProjectCatalog, error return obj.(*ProjectCatalog), err } +func (s *projectCatalogClient) UpdateStatus(o *ProjectCatalog) (*ProjectCatalog, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectCatalog), err +} + func (s *projectCatalogClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_project_controller.go b/apis/management.cattle.io/v3/zz_generated_project_controller.go index 061381ed..354076fc 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_controller.go @@ -74,8 +74,6 @@ type ProjectController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectInterface interface { @@ -126,7 +124,7 @@ func (l *projectLister) Get(namespace, name string) (*Project, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectGroupVersionKind.Group, - Resource: "project", + Resource: ProjectGroupVersionResource.Resource, }, key) } return obj.(*Project), nil @@ -210,25 +208,12 @@ func (c projectFactory) List() runtime.Object { } func (s *projectClient) Controller() ProjectController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectGroupVersionResource, ProjectGroupVersionKind.Kind, true)) - c = &projectController{ + return &projectController{ GenericController: genericController, } - - s.client.projectControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectClient struct { @@ -262,6 +247,11 @@ func (s *projectClient) Update(o *Project) (*Project, error) { return obj.(*Project), err } +func (s *projectClient) UpdateStatus(o *Project) (*Project, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Project), err +} + func (s *projectClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go b/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go index f3f6afd1..233ae385 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_logging_controller.go @@ -74,8 +74,6 @@ type ProjectLoggingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectLoggingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectLoggingInterface interface { @@ -126,7 +124,7 @@ func (l *projectLoggingLister) Get(namespace, name string) (*ProjectLogging, err if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectLoggingGroupVersionKind.Group, - Resource: "projectLogging", + Resource: ProjectLoggingGroupVersionResource.Resource, }, key) } return obj.(*ProjectLogging), nil @@ -210,25 +208,12 @@ func (c projectLoggingFactory) List() runtime.Object { } func (s *projectLoggingClient) Controller() ProjectLoggingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectLoggingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectLoggingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectLoggingGroupVersionResource, ProjectLoggingGroupVersionKind.Kind, true)) - c = &projectLoggingController{ + return &projectLoggingController{ GenericController: genericController, } - - s.client.projectLoggingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectLoggingClient struct { @@ -262,6 +247,11 @@ func (s *projectLoggingClient) Update(o *ProjectLogging) (*ProjectLogging, error return obj.(*ProjectLogging), err } +func (s *projectLoggingClient) UpdateStatus(o *ProjectLogging) (*ProjectLogging, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectLogging), err +} + func (s *projectLoggingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_project_monitor_graph_controller.go b/apis/management.cattle.io/v3/zz_generated_project_monitor_graph_controller.go index d34eef31..ddbcbe4b 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_monitor_graph_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_monitor_graph_controller.go @@ -74,8 +74,6 @@ type ProjectMonitorGraphController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectMonitorGraphHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectMonitorGraphInterface interface { @@ -126,7 +124,7 @@ func (l *projectMonitorGraphLister) Get(namespace, name string) (*ProjectMonitor if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectMonitorGraphGroupVersionKind.Group, - Resource: "projectMonitorGraph", + Resource: ProjectMonitorGraphGroupVersionResource.Resource, }, key) } return obj.(*ProjectMonitorGraph), nil @@ -210,25 +208,12 @@ func (c projectMonitorGraphFactory) List() runtime.Object { } func (s *projectMonitorGraphClient) Controller() ProjectMonitorGraphController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectMonitorGraphControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectMonitorGraphGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectMonitorGraphGroupVersionResource, ProjectMonitorGraphGroupVersionKind.Kind, true)) - c = &projectMonitorGraphController{ + return &projectMonitorGraphController{ GenericController: genericController, } - - s.client.projectMonitorGraphControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectMonitorGraphClient struct { @@ -262,6 +247,11 @@ func (s *projectMonitorGraphClient) Update(o *ProjectMonitorGraph) (*ProjectMoni return obj.(*ProjectMonitorGraph), err } +func (s *projectMonitorGraphClient) UpdateStatus(o *ProjectMonitorGraph) (*ProjectMonitorGraph, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectMonitorGraph), err +} + func (s *projectMonitorGraphClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go b/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go index b9ae1907..c1511cc3 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_network_policy_controller.go @@ -74,8 +74,6 @@ type ProjectNetworkPolicyController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectNetworkPolicyHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectNetworkPolicyInterface interface { @@ -126,7 +124,7 @@ func (l *projectNetworkPolicyLister) Get(namespace, name string) (*ProjectNetwor if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectNetworkPolicyGroupVersionKind.Group, - Resource: "projectNetworkPolicy", + Resource: ProjectNetworkPolicyGroupVersionResource.Resource, }, key) } return obj.(*ProjectNetworkPolicy), nil @@ -210,25 +208,12 @@ func (c projectNetworkPolicyFactory) List() runtime.Object { } func (s *projectNetworkPolicyClient) Controller() ProjectNetworkPolicyController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectNetworkPolicyControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectNetworkPolicyGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectNetworkPolicyGroupVersionResource, ProjectNetworkPolicyGroupVersionKind.Kind, true)) - c = &projectNetworkPolicyController{ + return &projectNetworkPolicyController{ GenericController: genericController, } - - s.client.projectNetworkPolicyControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectNetworkPolicyClient struct { @@ -262,6 +247,11 @@ func (s *projectNetworkPolicyClient) Update(o *ProjectNetworkPolicy) (*ProjectNe return obj.(*ProjectNetworkPolicy), err } +func (s *projectNetworkPolicyClient) UpdateStatus(o *ProjectNetworkPolicy) (*ProjectNetworkPolicy, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectNetworkPolicy), err +} + func (s *projectNetworkPolicyClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go b/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go index 4e3d6d3f..92debebd 100644 --- a/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_project_role_template_binding_controller.go @@ -74,8 +74,6 @@ type ProjectRoleTemplateBindingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ProjectRoleTemplateBindingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ProjectRoleTemplateBindingInterface interface { @@ -126,7 +124,7 @@ func (l *projectRoleTemplateBindingLister) Get(namespace, name string) (*Project if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ProjectRoleTemplateBindingGroupVersionKind.Group, - Resource: "projectRoleTemplateBinding", + Resource: ProjectRoleTemplateBindingGroupVersionResource.Resource, }, key) } return obj.(*ProjectRoleTemplateBinding), nil @@ -210,25 +208,12 @@ func (c projectRoleTemplateBindingFactory) List() runtime.Object { } func (s *projectRoleTemplateBindingClient) Controller() ProjectRoleTemplateBindingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.projectRoleTemplateBindingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ProjectRoleTemplateBindingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ProjectRoleTemplateBindingGroupVersionResource, ProjectRoleTemplateBindingGroupVersionKind.Kind, true)) - c = &projectRoleTemplateBindingController{ + return &projectRoleTemplateBindingController{ GenericController: genericController, } - - s.client.projectRoleTemplateBindingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type projectRoleTemplateBindingClient struct { @@ -262,6 +247,11 @@ func (s *projectRoleTemplateBindingClient) Update(o *ProjectRoleTemplateBinding) return obj.(*ProjectRoleTemplateBinding), err } +func (s *projectRoleTemplateBindingClient) UpdateStatus(o *ProjectRoleTemplateBinding) (*ProjectRoleTemplateBinding, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ProjectRoleTemplateBinding), err +} + func (s *projectRoleTemplateBindingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_rke_addon_controller.go b/apis/management.cattle.io/v3/zz_generated_rke_addon_controller.go index dafcfe21..f6e3a546 100644 --- a/apis/management.cattle.io/v3/zz_generated_rke_addon_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_rke_addon_controller.go @@ -18,20 +18,20 @@ import ( ) var ( - RKEAddonGroupVersionKind = schema.GroupVersionKind{ + RkeAddonGroupVersionKind = schema.GroupVersionKind{ Version: Version, Group: GroupName, - Kind: "RKEAddon", + Kind: "RkeAddon", } - RKEAddonResource = metav1.APIResource{ + RkeAddonResource = metav1.APIResource{ Name: "rkeaddons", SingularName: "rkeaddon", Namespaced: true, - Kind: RKEAddonGroupVersionKind.Kind, + Kind: RkeAddonGroupVersionKind.Kind, } - RKEAddonGroupVersionResource = schema.GroupVersionResource{ + RkeAddonGroupVersionResource = schema.GroupVersionResource{ Group: GroupName, Version: Version, Resource: "rkeaddons", @@ -39,80 +39,78 @@ var ( ) func init() { - resource.Put(RKEAddonGroupVersionResource) + resource.Put(RkeAddonGroupVersionResource) } -func NewRKEAddon(namespace, name string, obj RKEAddon) *RKEAddon { - obj.APIVersion, obj.Kind = RKEAddonGroupVersionKind.ToAPIVersionAndKind() +func NewRkeAddon(namespace, name string, obj RkeAddon) *RkeAddon { + obj.APIVersion, obj.Kind = RkeAddonGroupVersionKind.ToAPIVersionAndKind() obj.Name = name obj.Namespace = namespace return &obj } -type RKEAddonList struct { +type RkeAddonList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []RKEAddon `json:"items"` + Items []RkeAddon `json:"items"` } -type RKEAddonHandlerFunc func(key string, obj *RKEAddon) (runtime.Object, error) +type RkeAddonHandlerFunc func(key string, obj *RkeAddon) (runtime.Object, error) -type RKEAddonChangeHandlerFunc func(obj *RKEAddon) (runtime.Object, error) +type RkeAddonChangeHandlerFunc func(obj *RkeAddon) (runtime.Object, error) -type RKEAddonLister interface { - List(namespace string, selector labels.Selector) (ret []*RKEAddon, err error) - Get(namespace, name string) (*RKEAddon, error) +type RkeAddonLister interface { + List(namespace string, selector labels.Selector) (ret []*RkeAddon, err error) + Get(namespace, name string) (*RkeAddon, error) } -type RKEAddonController interface { +type RkeAddonController interface { Generic() controller.GenericController Informer() cache.SharedIndexInformer - Lister() RKEAddonLister - AddHandler(ctx context.Context, name string, handler RKEAddonHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEAddonHandlerFunc) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler RKEAddonHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RKEAddonHandlerFunc) + Lister() RkeAddonLister + AddHandler(ctx context.Context, name string, handler RkeAddonHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeAddonHandlerFunc) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler RkeAddonHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RkeAddonHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } -type RKEAddonInterface interface { +type RkeAddonInterface interface { ObjectClient() *objectclient.ObjectClient - Create(*RKEAddon) (*RKEAddon, error) - GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEAddon, error) - Get(name string, opts metav1.GetOptions) (*RKEAddon, error) - Update(*RKEAddon) (*RKEAddon, error) + Create(*RkeAddon) (*RkeAddon, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RkeAddon, error) + Get(name string, opts metav1.GetOptions) (*RkeAddon, error) + Update(*RkeAddon) (*RkeAddon, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*RKEAddonList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*RKEAddonList, error) + List(opts metav1.ListOptions) (*RkeAddonList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*RkeAddonList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error - Controller() RKEAddonController - AddHandler(ctx context.Context, name string, sync RKEAddonHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEAddonHandlerFunc) - AddLifecycle(ctx context.Context, name string, lifecycle RKEAddonLifecycle) - AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEAddonLifecycle) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEAddonHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEAddonHandlerFunc) - AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEAddonLifecycle) - AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEAddonLifecycle) + Controller() RkeAddonController + AddHandler(ctx context.Context, name string, sync RkeAddonHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeAddonHandlerFunc) + AddLifecycle(ctx context.Context, name string, lifecycle RkeAddonLifecycle) + AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RkeAddonLifecycle) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RkeAddonHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RkeAddonHandlerFunc) + AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RkeAddonLifecycle) + AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RkeAddonLifecycle) } type rkeAddonLister struct { controller *rkeAddonController } -func (l *rkeAddonLister) List(namespace string, selector labels.Selector) (ret []*RKEAddon, err error) { +func (l *rkeAddonLister) List(namespace string, selector labels.Selector) (ret []*RkeAddon, err error) { err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { - ret = append(ret, obj.(*RKEAddon)) + ret = append(ret, obj.(*RkeAddon)) }) return } -func (l *rkeAddonLister) Get(namespace, name string) (*RKEAddon, error) { +func (l *rkeAddonLister) Get(namespace, name string) (*RkeAddon, error) { var key string if namespace != "" { key = namespace + "/" + name @@ -125,11 +123,11 @@ func (l *rkeAddonLister) Get(namespace, name string) (*RKEAddon, error) { } if !exists { return nil, errors.NewNotFound(schema.GroupResource{ - Group: RKEAddonGroupVersionKind.Group, - Resource: "rkeAddon", + Group: RkeAddonGroupVersionKind.Group, + Resource: RkeAddonGroupVersionResource.Resource, }, key) } - return obj.(*RKEAddon), nil + return obj.(*RkeAddon), nil } type rkeAddonController struct { @@ -140,17 +138,17 @@ func (c *rkeAddonController) Generic() controller.GenericController { return c.GenericController } -func (c *rkeAddonController) Lister() RKEAddonLister { +func (c *rkeAddonController) Lister() RkeAddonLister { return &rkeAddonLister{ controller: c, } } -func (c *rkeAddonController) AddHandler(ctx context.Context, name string, handler RKEAddonHandlerFunc) { +func (c *rkeAddonController) AddHandler(ctx context.Context, name string, handler RkeAddonHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEAddon); ok { + } else if v, ok := obj.(*RkeAddon); ok { return handler(key, v) } else { return nil, nil @@ -158,13 +156,13 @@ func (c *rkeAddonController) AddHandler(ctx context.Context, name string, handle }) } -func (c *rkeAddonController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler RKEAddonHandlerFunc) { +func (c *rkeAddonController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler RkeAddonHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEAddon); ok { + } else if v, ok := obj.(*RkeAddon); ok { return handler(key, v) } else { return nil, nil @@ -172,11 +170,11 @@ func (c *rkeAddonController) AddFeatureHandler(ctx context.Context, enabled func }) } -func (c *rkeAddonController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RKEAddonHandlerFunc) { +func (c *rkeAddonController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RkeAddonHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEAddon); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*RkeAddon); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -184,13 +182,13 @@ func (c *rkeAddonController) AddClusterScopedHandler(ctx context.Context, name, }) } -func (c *rkeAddonController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RKEAddonHandlerFunc) { +func (c *rkeAddonController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RkeAddonHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEAddon); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*RkeAddon); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -202,64 +200,56 @@ type rkeAddonFactory struct { } func (c rkeAddonFactory) Object() runtime.Object { - return &RKEAddon{} + return &RkeAddon{} } func (c rkeAddonFactory) List() runtime.Object { - return &RKEAddonList{} + return &RkeAddonList{} } -func (s *rkeAddonClient) Controller() RKEAddonController { - s.client.Lock() - defer s.client.Unlock() +func (s *rkeAddonClient) Controller() RkeAddonController { + genericController := controller.NewGenericController(RkeAddonGroupVersionKind.Kind+"Controller", + s.client.controllerFactory.ForResourceKind(RkeAddonGroupVersionResource, RkeAddonGroupVersionKind.Kind, true)) - c, ok := s.client.rkeAddonControllers[s.ns] - if ok { - return c - } - - genericController := controller.NewGenericController(RKEAddonGroupVersionKind.Kind+"Controller", - s.objectClient) - - c = &rkeAddonController{ + return &rkeAddonController{ GenericController: genericController, } - - s.client.rkeAddonControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type rkeAddonClient struct { client *Client ns string objectClient *objectclient.ObjectClient - controller RKEAddonController + controller RkeAddonController } func (s *rkeAddonClient) ObjectClient() *objectclient.ObjectClient { return s.objectClient } -func (s *rkeAddonClient) Create(o *RKEAddon) (*RKEAddon, error) { +func (s *rkeAddonClient) Create(o *RkeAddon) (*RkeAddon, error) { obj, err := s.objectClient.Create(o) - return obj.(*RKEAddon), err + return obj.(*RkeAddon), err } -func (s *rkeAddonClient) Get(name string, opts metav1.GetOptions) (*RKEAddon, error) { +func (s *rkeAddonClient) Get(name string, opts metav1.GetOptions) (*RkeAddon, error) { obj, err := s.objectClient.Get(name, opts) - return obj.(*RKEAddon), err + return obj.(*RkeAddon), err } -func (s *rkeAddonClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEAddon, error) { +func (s *rkeAddonClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RkeAddon, error) { obj, err := s.objectClient.GetNamespaced(namespace, name, opts) - return obj.(*RKEAddon), err + return obj.(*RkeAddon), err } -func (s *rkeAddonClient) Update(o *RKEAddon) (*RKEAddon, error) { +func (s *rkeAddonClient) Update(o *RkeAddon) (*RkeAddon, error) { obj, err := s.objectClient.Update(o.Name, o) - return obj.(*RKEAddon), err + return obj.(*RkeAddon), err +} + +func (s *rkeAddonClient) UpdateStatus(o *RkeAddon) (*RkeAddon, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*RkeAddon), err } func (s *rkeAddonClient) Delete(name string, options *metav1.DeleteOptions) error { @@ -270,14 +260,14 @@ func (s *rkeAddonClient) DeleteNamespaced(namespace, name string, options *metav return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *rkeAddonClient) List(opts metav1.ListOptions) (*RKEAddonList, error) { +func (s *rkeAddonClient) List(opts metav1.ListOptions) (*RkeAddonList, error) { obj, err := s.objectClient.List(opts) - return obj.(*RKEAddonList), err + return obj.(*RkeAddonList), err } -func (s *rkeAddonClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*RKEAddonList, error) { +func (s *rkeAddonClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*RkeAddonList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*RKEAddonList), err + return obj.(*RkeAddonList), err } func (s *rkeAddonClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { @@ -285,47 +275,47 @@ func (s *rkeAddonClient) Watch(opts metav1.ListOptions) (watch.Interface, error) } // Patch applies the patch and returns the patched deployment. -func (s *rkeAddonClient) Patch(o *RKEAddon, patchType types.PatchType, data []byte, subresources ...string) (*RKEAddon, error) { +func (s *rkeAddonClient) Patch(o *RkeAddon, patchType types.PatchType, data []byte, subresources ...string) (*RkeAddon, error) { obj, err := s.objectClient.Patch(o.Name, o, patchType, data, subresources...) - return obj.(*RKEAddon), err + return obj.(*RkeAddon), err } func (s *rkeAddonClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { return s.objectClient.DeleteCollection(deleteOpts, listOpts) } -func (s *rkeAddonClient) AddHandler(ctx context.Context, name string, sync RKEAddonHandlerFunc) { +func (s *rkeAddonClient) AddHandler(ctx context.Context, name string, sync RkeAddonHandlerFunc) { s.Controller().AddHandler(ctx, name, sync) } -func (s *rkeAddonClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEAddonHandlerFunc) { +func (s *rkeAddonClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeAddonHandlerFunc) { s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *rkeAddonClient) AddLifecycle(ctx context.Context, name string, lifecycle RKEAddonLifecycle) { - sync := NewRKEAddonLifecycleAdapter(name, false, s, lifecycle) +func (s *rkeAddonClient) AddLifecycle(ctx context.Context, name string, lifecycle RkeAddonLifecycle) { + sync := NewRkeAddonLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddHandler(ctx, name, sync) } -func (s *rkeAddonClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEAddonLifecycle) { - sync := NewRKEAddonLifecycleAdapter(name, false, s, lifecycle) +func (s *rkeAddonClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RkeAddonLifecycle) { + sync := NewRkeAddonLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *rkeAddonClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEAddonHandlerFunc) { +func (s *rkeAddonClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RkeAddonHandlerFunc) { s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *rkeAddonClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEAddonHandlerFunc) { +func (s *rkeAddonClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RkeAddonHandlerFunc) { s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } -func (s *rkeAddonClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEAddonLifecycle) { - sync := NewRKEAddonLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *rkeAddonClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RkeAddonLifecycle) { + sync := NewRkeAddonLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *rkeAddonClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEAddonLifecycle) { - sync := NewRKEAddonLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *rkeAddonClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RkeAddonLifecycle) { + sync := NewRkeAddonLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } diff --git a/apis/management.cattle.io/v3/zz_generated_rke_addon_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_rke_addon_lifecycle_adapter.go index bd027df0..4d260aef 100644 --- a/apis/management.cattle.io/v3/zz_generated_rke_addon_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_rke_addon_lifecycle_adapter.go @@ -6,14 +6,14 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) -type RKEAddonLifecycle interface { - Create(obj *RKEAddon) (runtime.Object, error) - Remove(obj *RKEAddon) (runtime.Object, error) - Updated(obj *RKEAddon) (runtime.Object, error) +type RkeAddonLifecycle interface { + Create(obj *RkeAddon) (runtime.Object, error) + Remove(obj *RkeAddon) (runtime.Object, error) + Updated(obj *RkeAddon) (runtime.Object, error) } type rkeAddonLifecycleAdapter struct { - lifecycle RKEAddonLifecycle + lifecycle RkeAddonLifecycle } func (w *rkeAddonLifecycleAdapter) HasCreate() bool { @@ -27,7 +27,7 @@ func (w *rkeAddonLifecycleAdapter) HasFinalize() bool { } func (w *rkeAddonLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Create(obj.(*RKEAddon)) + o, err := w.lifecycle.Create(obj.(*RkeAddon)) if o == nil { return nil, err } @@ -35,7 +35,7 @@ func (w *rkeAddonLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, e } func (w *rkeAddonLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Remove(obj.(*RKEAddon)) + o, err := w.lifecycle.Remove(obj.(*RkeAddon)) if o == nil { return nil, err } @@ -43,20 +43,20 @@ func (w *rkeAddonLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, } func (w *rkeAddonLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Updated(obj.(*RKEAddon)) + o, err := w.lifecycle.Updated(obj.(*RkeAddon)) if o == nil { return nil, err } return o, err } -func NewRKEAddonLifecycleAdapter(name string, clusterScoped bool, client RKEAddonInterface, l RKEAddonLifecycle) RKEAddonHandlerFunc { +func NewRkeAddonLifecycleAdapter(name string, clusterScoped bool, client RkeAddonInterface, l RkeAddonLifecycle) RkeAddonHandlerFunc { if clusterScoped { - resource.PutClusterScoped(RKEAddonGroupVersionResource) + resource.PutClusterScoped(RkeAddonGroupVersionResource) } adapter := &rkeAddonLifecycleAdapter{lifecycle: l} syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) - return func(key string, obj *RKEAddon) (runtime.Object, error) { + return func(key string, obj *RkeAddon) (runtime.Object, error) { newObj, err := syncFn(key, obj) if o, ok := newObj.(runtime.Object); ok { return o, err diff --git a/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_controller.go b/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_controller.go index 19b2c581..6618dd36 100644 --- a/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_controller.go @@ -18,20 +18,20 @@ import ( ) var ( - RKEK8sServiceOptionGroupVersionKind = schema.GroupVersionKind{ + RkeK8sServiceOptionGroupVersionKind = schema.GroupVersionKind{ Version: Version, Group: GroupName, - Kind: "RKEK8sServiceOption", + Kind: "RkeK8sServiceOption", } - RKEK8sServiceOptionResource = metav1.APIResource{ + RkeK8sServiceOptionResource = metav1.APIResource{ Name: "rkek8sserviceoptions", SingularName: "rkek8sserviceoption", Namespaced: true, - Kind: RKEK8sServiceOptionGroupVersionKind.Kind, + Kind: RkeK8sServiceOptionGroupVersionKind.Kind, } - RKEK8sServiceOptionGroupVersionResource = schema.GroupVersionResource{ + RkeK8sServiceOptionGroupVersionResource = schema.GroupVersionResource{ Group: GroupName, Version: Version, Resource: "rkek8sserviceoptions", @@ -39,80 +39,78 @@ var ( ) func init() { - resource.Put(RKEK8sServiceOptionGroupVersionResource) + resource.Put(RkeK8sServiceOptionGroupVersionResource) } -func NewRKEK8sServiceOption(namespace, name string, obj RKEK8sServiceOption) *RKEK8sServiceOption { - obj.APIVersion, obj.Kind = RKEK8sServiceOptionGroupVersionKind.ToAPIVersionAndKind() +func NewRkeK8sServiceOption(namespace, name string, obj RkeK8sServiceOption) *RkeK8sServiceOption { + obj.APIVersion, obj.Kind = RkeK8sServiceOptionGroupVersionKind.ToAPIVersionAndKind() obj.Name = name obj.Namespace = namespace return &obj } -type RKEK8sServiceOptionList struct { +type RkeK8sServiceOptionList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []RKEK8sServiceOption `json:"items"` + Items []RkeK8sServiceOption `json:"items"` } -type RKEK8sServiceOptionHandlerFunc func(key string, obj *RKEK8sServiceOption) (runtime.Object, error) +type RkeK8sServiceOptionHandlerFunc func(key string, obj *RkeK8sServiceOption) (runtime.Object, error) -type RKEK8sServiceOptionChangeHandlerFunc func(obj *RKEK8sServiceOption) (runtime.Object, error) +type RkeK8sServiceOptionChangeHandlerFunc func(obj *RkeK8sServiceOption) (runtime.Object, error) -type RKEK8sServiceOptionLister interface { - List(namespace string, selector labels.Selector) (ret []*RKEK8sServiceOption, err error) - Get(namespace, name string) (*RKEK8sServiceOption, error) +type RkeK8sServiceOptionLister interface { + List(namespace string, selector labels.Selector) (ret []*RkeK8sServiceOption, err error) + Get(namespace, name string) (*RkeK8sServiceOption, error) } -type RKEK8sServiceOptionController interface { +type RkeK8sServiceOptionController interface { Generic() controller.GenericController Informer() cache.SharedIndexInformer - Lister() RKEK8sServiceOptionLister - AddHandler(ctx context.Context, name string, handler RKEK8sServiceOptionHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sServiceOptionHandlerFunc) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler RKEK8sServiceOptionHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RKEK8sServiceOptionHandlerFunc) + Lister() RkeK8sServiceOptionLister + AddHandler(ctx context.Context, name string, handler RkeK8sServiceOptionHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeK8sServiceOptionHandlerFunc) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler RkeK8sServiceOptionHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RkeK8sServiceOptionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } -type RKEK8sServiceOptionInterface interface { +type RkeK8sServiceOptionInterface interface { ObjectClient() *objectclient.ObjectClient - Create(*RKEK8sServiceOption) (*RKEK8sServiceOption, error) - GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEK8sServiceOption, error) - Get(name string, opts metav1.GetOptions) (*RKEK8sServiceOption, error) - Update(*RKEK8sServiceOption) (*RKEK8sServiceOption, error) + Create(*RkeK8sServiceOption) (*RkeK8sServiceOption, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RkeK8sServiceOption, error) + Get(name string, opts metav1.GetOptions) (*RkeK8sServiceOption, error) + Update(*RkeK8sServiceOption) (*RkeK8sServiceOption, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*RKEK8sServiceOptionList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*RKEK8sServiceOptionList, error) + List(opts metav1.ListOptions) (*RkeK8sServiceOptionList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*RkeK8sServiceOptionList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error - Controller() RKEK8sServiceOptionController - AddHandler(ctx context.Context, name string, sync RKEK8sServiceOptionHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sServiceOptionHandlerFunc) - AddLifecycle(ctx context.Context, name string, lifecycle RKEK8sServiceOptionLifecycle) - AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEK8sServiceOptionLifecycle) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEK8sServiceOptionHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEK8sServiceOptionHandlerFunc) - AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEK8sServiceOptionLifecycle) - AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEK8sServiceOptionLifecycle) + Controller() RkeK8sServiceOptionController + AddHandler(ctx context.Context, name string, sync RkeK8sServiceOptionHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeK8sServiceOptionHandlerFunc) + AddLifecycle(ctx context.Context, name string, lifecycle RkeK8sServiceOptionLifecycle) + AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RkeK8sServiceOptionLifecycle) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RkeK8sServiceOptionHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RkeK8sServiceOptionHandlerFunc) + AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RkeK8sServiceOptionLifecycle) + AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RkeK8sServiceOptionLifecycle) } type rkeK8sServiceOptionLister struct { controller *rkeK8sServiceOptionController } -func (l *rkeK8sServiceOptionLister) List(namespace string, selector labels.Selector) (ret []*RKEK8sServiceOption, err error) { +func (l *rkeK8sServiceOptionLister) List(namespace string, selector labels.Selector) (ret []*RkeK8sServiceOption, err error) { err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { - ret = append(ret, obj.(*RKEK8sServiceOption)) + ret = append(ret, obj.(*RkeK8sServiceOption)) }) return } -func (l *rkeK8sServiceOptionLister) Get(namespace, name string) (*RKEK8sServiceOption, error) { +func (l *rkeK8sServiceOptionLister) Get(namespace, name string) (*RkeK8sServiceOption, error) { var key string if namespace != "" { key = namespace + "/" + name @@ -125,11 +123,11 @@ func (l *rkeK8sServiceOptionLister) Get(namespace, name string) (*RKEK8sServiceO } if !exists { return nil, errors.NewNotFound(schema.GroupResource{ - Group: RKEK8sServiceOptionGroupVersionKind.Group, - Resource: "rkeK8sServiceOption", + Group: RkeK8sServiceOptionGroupVersionKind.Group, + Resource: RkeK8sServiceOptionGroupVersionResource.Resource, }, key) } - return obj.(*RKEK8sServiceOption), nil + return obj.(*RkeK8sServiceOption), nil } type rkeK8sServiceOptionController struct { @@ -140,17 +138,17 @@ func (c *rkeK8sServiceOptionController) Generic() controller.GenericController { return c.GenericController } -func (c *rkeK8sServiceOptionController) Lister() RKEK8sServiceOptionLister { +func (c *rkeK8sServiceOptionController) Lister() RkeK8sServiceOptionLister { return &rkeK8sServiceOptionLister{ controller: c, } } -func (c *rkeK8sServiceOptionController) AddHandler(ctx context.Context, name string, handler RKEK8sServiceOptionHandlerFunc) { +func (c *rkeK8sServiceOptionController) AddHandler(ctx context.Context, name string, handler RkeK8sServiceOptionHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sServiceOption); ok { + } else if v, ok := obj.(*RkeK8sServiceOption); ok { return handler(key, v) } else { return nil, nil @@ -158,13 +156,13 @@ func (c *rkeK8sServiceOptionController) AddHandler(ctx context.Context, name str }) } -func (c *rkeK8sServiceOptionController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler RKEK8sServiceOptionHandlerFunc) { +func (c *rkeK8sServiceOptionController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler RkeK8sServiceOptionHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sServiceOption); ok { + } else if v, ok := obj.(*RkeK8sServiceOption); ok { return handler(key, v) } else { return nil, nil @@ -172,11 +170,11 @@ func (c *rkeK8sServiceOptionController) AddFeatureHandler(ctx context.Context, e }) } -func (c *rkeK8sServiceOptionController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RKEK8sServiceOptionHandlerFunc) { +func (c *rkeK8sServiceOptionController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RkeK8sServiceOptionHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sServiceOption); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*RkeK8sServiceOption); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -184,13 +182,13 @@ func (c *rkeK8sServiceOptionController) AddClusterScopedHandler(ctx context.Cont }) } -func (c *rkeK8sServiceOptionController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RKEK8sServiceOptionHandlerFunc) { +func (c *rkeK8sServiceOptionController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RkeK8sServiceOptionHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sServiceOption); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*RkeK8sServiceOption); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -202,64 +200,56 @@ type rkeK8sServiceOptionFactory struct { } func (c rkeK8sServiceOptionFactory) Object() runtime.Object { - return &RKEK8sServiceOption{} + return &RkeK8sServiceOption{} } func (c rkeK8sServiceOptionFactory) List() runtime.Object { - return &RKEK8sServiceOptionList{} + return &RkeK8sServiceOptionList{} } -func (s *rkeK8sServiceOptionClient) Controller() RKEK8sServiceOptionController { - s.client.Lock() - defer s.client.Unlock() +func (s *rkeK8sServiceOptionClient) Controller() RkeK8sServiceOptionController { + genericController := controller.NewGenericController(RkeK8sServiceOptionGroupVersionKind.Kind+"Controller", + s.client.controllerFactory.ForResourceKind(RkeK8sServiceOptionGroupVersionResource, RkeK8sServiceOptionGroupVersionKind.Kind, true)) - c, ok := s.client.rkeK8sServiceOptionControllers[s.ns] - if ok { - return c - } - - genericController := controller.NewGenericController(RKEK8sServiceOptionGroupVersionKind.Kind+"Controller", - s.objectClient) - - c = &rkeK8sServiceOptionController{ + return &rkeK8sServiceOptionController{ GenericController: genericController, } - - s.client.rkeK8sServiceOptionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type rkeK8sServiceOptionClient struct { client *Client ns string objectClient *objectclient.ObjectClient - controller RKEK8sServiceOptionController + controller RkeK8sServiceOptionController } func (s *rkeK8sServiceOptionClient) ObjectClient() *objectclient.ObjectClient { return s.objectClient } -func (s *rkeK8sServiceOptionClient) Create(o *RKEK8sServiceOption) (*RKEK8sServiceOption, error) { +func (s *rkeK8sServiceOptionClient) Create(o *RkeK8sServiceOption) (*RkeK8sServiceOption, error) { obj, err := s.objectClient.Create(o) - return obj.(*RKEK8sServiceOption), err + return obj.(*RkeK8sServiceOption), err } -func (s *rkeK8sServiceOptionClient) Get(name string, opts metav1.GetOptions) (*RKEK8sServiceOption, error) { +func (s *rkeK8sServiceOptionClient) Get(name string, opts metav1.GetOptions) (*RkeK8sServiceOption, error) { obj, err := s.objectClient.Get(name, opts) - return obj.(*RKEK8sServiceOption), err + return obj.(*RkeK8sServiceOption), err } -func (s *rkeK8sServiceOptionClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEK8sServiceOption, error) { +func (s *rkeK8sServiceOptionClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RkeK8sServiceOption, error) { obj, err := s.objectClient.GetNamespaced(namespace, name, opts) - return obj.(*RKEK8sServiceOption), err + return obj.(*RkeK8sServiceOption), err } -func (s *rkeK8sServiceOptionClient) Update(o *RKEK8sServiceOption) (*RKEK8sServiceOption, error) { +func (s *rkeK8sServiceOptionClient) Update(o *RkeK8sServiceOption) (*RkeK8sServiceOption, error) { obj, err := s.objectClient.Update(o.Name, o) - return obj.(*RKEK8sServiceOption), err + return obj.(*RkeK8sServiceOption), err +} + +func (s *rkeK8sServiceOptionClient) UpdateStatus(o *RkeK8sServiceOption) (*RkeK8sServiceOption, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*RkeK8sServiceOption), err } func (s *rkeK8sServiceOptionClient) Delete(name string, options *metav1.DeleteOptions) error { @@ -270,14 +260,14 @@ func (s *rkeK8sServiceOptionClient) DeleteNamespaced(namespace, name string, opt return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *rkeK8sServiceOptionClient) List(opts metav1.ListOptions) (*RKEK8sServiceOptionList, error) { +func (s *rkeK8sServiceOptionClient) List(opts metav1.ListOptions) (*RkeK8sServiceOptionList, error) { obj, err := s.objectClient.List(opts) - return obj.(*RKEK8sServiceOptionList), err + return obj.(*RkeK8sServiceOptionList), err } -func (s *rkeK8sServiceOptionClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*RKEK8sServiceOptionList, error) { +func (s *rkeK8sServiceOptionClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*RkeK8sServiceOptionList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*RKEK8sServiceOptionList), err + return obj.(*RkeK8sServiceOptionList), err } func (s *rkeK8sServiceOptionClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { @@ -285,47 +275,47 @@ func (s *rkeK8sServiceOptionClient) Watch(opts metav1.ListOptions) (watch.Interf } // Patch applies the patch and returns the patched deployment. -func (s *rkeK8sServiceOptionClient) Patch(o *RKEK8sServiceOption, patchType types.PatchType, data []byte, subresources ...string) (*RKEK8sServiceOption, error) { +func (s *rkeK8sServiceOptionClient) Patch(o *RkeK8sServiceOption, patchType types.PatchType, data []byte, subresources ...string) (*RkeK8sServiceOption, error) { obj, err := s.objectClient.Patch(o.Name, o, patchType, data, subresources...) - return obj.(*RKEK8sServiceOption), err + return obj.(*RkeK8sServiceOption), err } func (s *rkeK8sServiceOptionClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { return s.objectClient.DeleteCollection(deleteOpts, listOpts) } -func (s *rkeK8sServiceOptionClient) AddHandler(ctx context.Context, name string, sync RKEK8sServiceOptionHandlerFunc) { +func (s *rkeK8sServiceOptionClient) AddHandler(ctx context.Context, name string, sync RkeK8sServiceOptionHandlerFunc) { s.Controller().AddHandler(ctx, name, sync) } -func (s *rkeK8sServiceOptionClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sServiceOptionHandlerFunc) { +func (s *rkeK8sServiceOptionClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeK8sServiceOptionHandlerFunc) { s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *rkeK8sServiceOptionClient) AddLifecycle(ctx context.Context, name string, lifecycle RKEK8sServiceOptionLifecycle) { - sync := NewRKEK8sServiceOptionLifecycleAdapter(name, false, s, lifecycle) +func (s *rkeK8sServiceOptionClient) AddLifecycle(ctx context.Context, name string, lifecycle RkeK8sServiceOptionLifecycle) { + sync := NewRkeK8sServiceOptionLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddHandler(ctx, name, sync) } -func (s *rkeK8sServiceOptionClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEK8sServiceOptionLifecycle) { - sync := NewRKEK8sServiceOptionLifecycleAdapter(name, false, s, lifecycle) +func (s *rkeK8sServiceOptionClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RkeK8sServiceOptionLifecycle) { + sync := NewRkeK8sServiceOptionLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *rkeK8sServiceOptionClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEK8sServiceOptionHandlerFunc) { +func (s *rkeK8sServiceOptionClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RkeK8sServiceOptionHandlerFunc) { s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *rkeK8sServiceOptionClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEK8sServiceOptionHandlerFunc) { +func (s *rkeK8sServiceOptionClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RkeK8sServiceOptionHandlerFunc) { s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } -func (s *rkeK8sServiceOptionClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEK8sServiceOptionLifecycle) { - sync := NewRKEK8sServiceOptionLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *rkeK8sServiceOptionClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RkeK8sServiceOptionLifecycle) { + sync := NewRkeK8sServiceOptionLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *rkeK8sServiceOptionClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEK8sServiceOptionLifecycle) { - sync := NewRKEK8sServiceOptionLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *rkeK8sServiceOptionClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RkeK8sServiceOptionLifecycle) { + sync := NewRkeK8sServiceOptionLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } diff --git a/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_lifecycle_adapter.go index 92100c4c..b6361733 100644 --- a/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_lifecycle_adapter.go @@ -6,14 +6,14 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) -type RKEK8sServiceOptionLifecycle interface { - Create(obj *RKEK8sServiceOption) (runtime.Object, error) - Remove(obj *RKEK8sServiceOption) (runtime.Object, error) - Updated(obj *RKEK8sServiceOption) (runtime.Object, error) +type RkeK8sServiceOptionLifecycle interface { + Create(obj *RkeK8sServiceOption) (runtime.Object, error) + Remove(obj *RkeK8sServiceOption) (runtime.Object, error) + Updated(obj *RkeK8sServiceOption) (runtime.Object, error) } type rkeK8sServiceOptionLifecycleAdapter struct { - lifecycle RKEK8sServiceOptionLifecycle + lifecycle RkeK8sServiceOptionLifecycle } func (w *rkeK8sServiceOptionLifecycleAdapter) HasCreate() bool { @@ -27,7 +27,7 @@ func (w *rkeK8sServiceOptionLifecycleAdapter) HasFinalize() bool { } func (w *rkeK8sServiceOptionLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Create(obj.(*RKEK8sServiceOption)) + o, err := w.lifecycle.Create(obj.(*RkeK8sServiceOption)) if o == nil { return nil, err } @@ -35,7 +35,7 @@ func (w *rkeK8sServiceOptionLifecycleAdapter) Create(obj runtime.Object) (runtim } func (w *rkeK8sServiceOptionLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Remove(obj.(*RKEK8sServiceOption)) + o, err := w.lifecycle.Remove(obj.(*RkeK8sServiceOption)) if o == nil { return nil, err } @@ -43,20 +43,20 @@ func (w *rkeK8sServiceOptionLifecycleAdapter) Finalize(obj runtime.Object) (runt } func (w *rkeK8sServiceOptionLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Updated(obj.(*RKEK8sServiceOption)) + o, err := w.lifecycle.Updated(obj.(*RkeK8sServiceOption)) if o == nil { return nil, err } return o, err } -func NewRKEK8sServiceOptionLifecycleAdapter(name string, clusterScoped bool, client RKEK8sServiceOptionInterface, l RKEK8sServiceOptionLifecycle) RKEK8sServiceOptionHandlerFunc { +func NewRkeK8sServiceOptionLifecycleAdapter(name string, clusterScoped bool, client RkeK8sServiceOptionInterface, l RkeK8sServiceOptionLifecycle) RkeK8sServiceOptionHandlerFunc { if clusterScoped { - resource.PutClusterScoped(RKEK8sServiceOptionGroupVersionResource) + resource.PutClusterScoped(RkeK8sServiceOptionGroupVersionResource) } adapter := &rkeK8sServiceOptionLifecycleAdapter{lifecycle: l} syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) - return func(key string, obj *RKEK8sServiceOption) (runtime.Object, error) { + return func(key string, obj *RkeK8sServiceOption) (runtime.Object, error) { newObj, err := syncFn(key, obj) if o, ok := newObj.(runtime.Object); ok { return o, err diff --git a/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_controller.go b/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_controller.go index abd4b47c..358544b4 100644 --- a/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_controller.go @@ -18,20 +18,20 @@ import ( ) var ( - RKEK8sSystemImageGroupVersionKind = schema.GroupVersionKind{ + RkeK8sSystemImageGroupVersionKind = schema.GroupVersionKind{ Version: Version, Group: GroupName, - Kind: "RKEK8sSystemImage", + Kind: "RkeK8sSystemImage", } - RKEK8sSystemImageResource = metav1.APIResource{ + RkeK8sSystemImageResource = metav1.APIResource{ Name: "rkek8ssystemimages", SingularName: "rkek8ssystemimage", Namespaced: true, - Kind: RKEK8sSystemImageGroupVersionKind.Kind, + Kind: RkeK8sSystemImageGroupVersionKind.Kind, } - RKEK8sSystemImageGroupVersionResource = schema.GroupVersionResource{ + RkeK8sSystemImageGroupVersionResource = schema.GroupVersionResource{ Group: GroupName, Version: Version, Resource: "rkek8ssystemimages", @@ -39,80 +39,78 @@ var ( ) func init() { - resource.Put(RKEK8sSystemImageGroupVersionResource) + resource.Put(RkeK8sSystemImageGroupVersionResource) } -func NewRKEK8sSystemImage(namespace, name string, obj RKEK8sSystemImage) *RKEK8sSystemImage { - obj.APIVersion, obj.Kind = RKEK8sSystemImageGroupVersionKind.ToAPIVersionAndKind() +func NewRkeK8sSystemImage(namespace, name string, obj RkeK8sSystemImage) *RkeK8sSystemImage { + obj.APIVersion, obj.Kind = RkeK8sSystemImageGroupVersionKind.ToAPIVersionAndKind() obj.Name = name obj.Namespace = namespace return &obj } -type RKEK8sSystemImageList struct { +type RkeK8sSystemImageList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` - Items []RKEK8sSystemImage `json:"items"` + Items []RkeK8sSystemImage `json:"items"` } -type RKEK8sSystemImageHandlerFunc func(key string, obj *RKEK8sSystemImage) (runtime.Object, error) +type RkeK8sSystemImageHandlerFunc func(key string, obj *RkeK8sSystemImage) (runtime.Object, error) -type RKEK8sSystemImageChangeHandlerFunc func(obj *RKEK8sSystemImage) (runtime.Object, error) +type RkeK8sSystemImageChangeHandlerFunc func(obj *RkeK8sSystemImage) (runtime.Object, error) -type RKEK8sSystemImageLister interface { - List(namespace string, selector labels.Selector) (ret []*RKEK8sSystemImage, err error) - Get(namespace, name string) (*RKEK8sSystemImage, error) +type RkeK8sSystemImageLister interface { + List(namespace string, selector labels.Selector) (ret []*RkeK8sSystemImage, err error) + Get(namespace, name string) (*RkeK8sSystemImage, error) } -type RKEK8sSystemImageController interface { +type RkeK8sSystemImageController interface { Generic() controller.GenericController Informer() cache.SharedIndexInformer - Lister() RKEK8sSystemImageLister - AddHandler(ctx context.Context, name string, handler RKEK8sSystemImageHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sSystemImageHandlerFunc) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler RKEK8sSystemImageHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RKEK8sSystemImageHandlerFunc) + Lister() RkeK8sSystemImageLister + AddHandler(ctx context.Context, name string, handler RkeK8sSystemImageHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeK8sSystemImageHandlerFunc) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler RkeK8sSystemImageHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RkeK8sSystemImageHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } -type RKEK8sSystemImageInterface interface { +type RkeK8sSystemImageInterface interface { ObjectClient() *objectclient.ObjectClient - Create(*RKEK8sSystemImage) (*RKEK8sSystemImage, error) - GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEK8sSystemImage, error) - Get(name string, opts metav1.GetOptions) (*RKEK8sSystemImage, error) - Update(*RKEK8sSystemImage) (*RKEK8sSystemImage, error) + Create(*RkeK8sSystemImage) (*RkeK8sSystemImage, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RkeK8sSystemImage, error) + Get(name string, opts metav1.GetOptions) (*RkeK8sSystemImage, error) + Update(*RkeK8sSystemImage) (*RkeK8sSystemImage, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*RKEK8sSystemImageList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*RKEK8sSystemImageList, error) + List(opts metav1.ListOptions) (*RkeK8sSystemImageList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*RkeK8sSystemImageList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error - Controller() RKEK8sSystemImageController - AddHandler(ctx context.Context, name string, sync RKEK8sSystemImageHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sSystemImageHandlerFunc) - AddLifecycle(ctx context.Context, name string, lifecycle RKEK8sSystemImageLifecycle) - AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEK8sSystemImageLifecycle) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEK8sSystemImageHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEK8sSystemImageHandlerFunc) - AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEK8sSystemImageLifecycle) - AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEK8sSystemImageLifecycle) + Controller() RkeK8sSystemImageController + AddHandler(ctx context.Context, name string, sync RkeK8sSystemImageHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeK8sSystemImageHandlerFunc) + AddLifecycle(ctx context.Context, name string, lifecycle RkeK8sSystemImageLifecycle) + AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RkeK8sSystemImageLifecycle) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RkeK8sSystemImageHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RkeK8sSystemImageHandlerFunc) + AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RkeK8sSystemImageLifecycle) + AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RkeK8sSystemImageLifecycle) } type rkeK8sSystemImageLister struct { controller *rkeK8sSystemImageController } -func (l *rkeK8sSystemImageLister) List(namespace string, selector labels.Selector) (ret []*RKEK8sSystemImage, err error) { +func (l *rkeK8sSystemImageLister) List(namespace string, selector labels.Selector) (ret []*RkeK8sSystemImage, err error) { err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { - ret = append(ret, obj.(*RKEK8sSystemImage)) + ret = append(ret, obj.(*RkeK8sSystemImage)) }) return } -func (l *rkeK8sSystemImageLister) Get(namespace, name string) (*RKEK8sSystemImage, error) { +func (l *rkeK8sSystemImageLister) Get(namespace, name string) (*RkeK8sSystemImage, error) { var key string if namespace != "" { key = namespace + "/" + name @@ -125,11 +123,11 @@ func (l *rkeK8sSystemImageLister) Get(namespace, name string) (*RKEK8sSystemImag } if !exists { return nil, errors.NewNotFound(schema.GroupResource{ - Group: RKEK8sSystemImageGroupVersionKind.Group, - Resource: "rkeK8sSystemImage", + Group: RkeK8sSystemImageGroupVersionKind.Group, + Resource: RkeK8sSystemImageGroupVersionResource.Resource, }, key) } - return obj.(*RKEK8sSystemImage), nil + return obj.(*RkeK8sSystemImage), nil } type rkeK8sSystemImageController struct { @@ -140,17 +138,17 @@ func (c *rkeK8sSystemImageController) Generic() controller.GenericController { return c.GenericController } -func (c *rkeK8sSystemImageController) Lister() RKEK8sSystemImageLister { +func (c *rkeK8sSystemImageController) Lister() RkeK8sSystemImageLister { return &rkeK8sSystemImageLister{ controller: c, } } -func (c *rkeK8sSystemImageController) AddHandler(ctx context.Context, name string, handler RKEK8sSystemImageHandlerFunc) { +func (c *rkeK8sSystemImageController) AddHandler(ctx context.Context, name string, handler RkeK8sSystemImageHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sSystemImage); ok { + } else if v, ok := obj.(*RkeK8sSystemImage); ok { return handler(key, v) } else { return nil, nil @@ -158,13 +156,13 @@ func (c *rkeK8sSystemImageController) AddHandler(ctx context.Context, name strin }) } -func (c *rkeK8sSystemImageController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler RKEK8sSystemImageHandlerFunc) { +func (c *rkeK8sSystemImageController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler RkeK8sSystemImageHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sSystemImage); ok { + } else if v, ok := obj.(*RkeK8sSystemImage); ok { return handler(key, v) } else { return nil, nil @@ -172,11 +170,11 @@ func (c *rkeK8sSystemImageController) AddFeatureHandler(ctx context.Context, ena }) } -func (c *rkeK8sSystemImageController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RKEK8sSystemImageHandlerFunc) { +func (c *rkeK8sSystemImageController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RkeK8sSystemImageHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sSystemImage); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*RkeK8sSystemImage); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -184,13 +182,13 @@ func (c *rkeK8sSystemImageController) AddClusterScopedHandler(ctx context.Contex }) } -func (c *rkeK8sSystemImageController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RKEK8sSystemImageHandlerFunc) { +func (c *rkeK8sSystemImageController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RkeK8sSystemImageHandlerFunc) { c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { if !enabled() { return nil, nil } else if obj == nil { return handler(key, nil) - } else if v, ok := obj.(*RKEK8sSystemImage); ok && controller.ObjectInCluster(cluster, obj) { + } else if v, ok := obj.(*RkeK8sSystemImage); ok && controller.ObjectInCluster(cluster, obj) { return handler(key, v) } else { return nil, nil @@ -202,64 +200,56 @@ type rkeK8sSystemImageFactory struct { } func (c rkeK8sSystemImageFactory) Object() runtime.Object { - return &RKEK8sSystemImage{} + return &RkeK8sSystemImage{} } func (c rkeK8sSystemImageFactory) List() runtime.Object { - return &RKEK8sSystemImageList{} + return &RkeK8sSystemImageList{} } -func (s *rkeK8sSystemImageClient) Controller() RKEK8sSystemImageController { - s.client.Lock() - defer s.client.Unlock() +func (s *rkeK8sSystemImageClient) Controller() RkeK8sSystemImageController { + genericController := controller.NewGenericController(RkeK8sSystemImageGroupVersionKind.Kind+"Controller", + s.client.controllerFactory.ForResourceKind(RkeK8sSystemImageGroupVersionResource, RkeK8sSystemImageGroupVersionKind.Kind, true)) - c, ok := s.client.rkeK8sSystemImageControllers[s.ns] - if ok { - return c - } - - genericController := controller.NewGenericController(RKEK8sSystemImageGroupVersionKind.Kind+"Controller", - s.objectClient) - - c = &rkeK8sSystemImageController{ + return &rkeK8sSystemImageController{ GenericController: genericController, } - - s.client.rkeK8sSystemImageControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type rkeK8sSystemImageClient struct { client *Client ns string objectClient *objectclient.ObjectClient - controller RKEK8sSystemImageController + controller RkeK8sSystemImageController } func (s *rkeK8sSystemImageClient) ObjectClient() *objectclient.ObjectClient { return s.objectClient } -func (s *rkeK8sSystemImageClient) Create(o *RKEK8sSystemImage) (*RKEK8sSystemImage, error) { +func (s *rkeK8sSystemImageClient) Create(o *RkeK8sSystemImage) (*RkeK8sSystemImage, error) { obj, err := s.objectClient.Create(o) - return obj.(*RKEK8sSystemImage), err + return obj.(*RkeK8sSystemImage), err } -func (s *rkeK8sSystemImageClient) Get(name string, opts metav1.GetOptions) (*RKEK8sSystemImage, error) { +func (s *rkeK8sSystemImageClient) Get(name string, opts metav1.GetOptions) (*RkeK8sSystemImage, error) { obj, err := s.objectClient.Get(name, opts) - return obj.(*RKEK8sSystemImage), err + return obj.(*RkeK8sSystemImage), err } -func (s *rkeK8sSystemImageClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEK8sSystemImage, error) { +func (s *rkeK8sSystemImageClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RkeK8sSystemImage, error) { obj, err := s.objectClient.GetNamespaced(namespace, name, opts) - return obj.(*RKEK8sSystemImage), err + return obj.(*RkeK8sSystemImage), err } -func (s *rkeK8sSystemImageClient) Update(o *RKEK8sSystemImage) (*RKEK8sSystemImage, error) { +func (s *rkeK8sSystemImageClient) Update(o *RkeK8sSystemImage) (*RkeK8sSystemImage, error) { obj, err := s.objectClient.Update(o.Name, o) - return obj.(*RKEK8sSystemImage), err + return obj.(*RkeK8sSystemImage), err +} + +func (s *rkeK8sSystemImageClient) UpdateStatus(o *RkeK8sSystemImage) (*RkeK8sSystemImage, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*RkeK8sSystemImage), err } func (s *rkeK8sSystemImageClient) Delete(name string, options *metav1.DeleteOptions) error { @@ -270,14 +260,14 @@ func (s *rkeK8sSystemImageClient) DeleteNamespaced(namespace, name string, optio return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *rkeK8sSystemImageClient) List(opts metav1.ListOptions) (*RKEK8sSystemImageList, error) { +func (s *rkeK8sSystemImageClient) List(opts metav1.ListOptions) (*RkeK8sSystemImageList, error) { obj, err := s.objectClient.List(opts) - return obj.(*RKEK8sSystemImageList), err + return obj.(*RkeK8sSystemImageList), err } -func (s *rkeK8sSystemImageClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*RKEK8sSystemImageList, error) { +func (s *rkeK8sSystemImageClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*RkeK8sSystemImageList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*RKEK8sSystemImageList), err + return obj.(*RkeK8sSystemImageList), err } func (s *rkeK8sSystemImageClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { @@ -285,47 +275,47 @@ func (s *rkeK8sSystemImageClient) Watch(opts metav1.ListOptions) (watch.Interfac } // Patch applies the patch and returns the patched deployment. -func (s *rkeK8sSystemImageClient) Patch(o *RKEK8sSystemImage, patchType types.PatchType, data []byte, subresources ...string) (*RKEK8sSystemImage, error) { +func (s *rkeK8sSystemImageClient) Patch(o *RkeK8sSystemImage, patchType types.PatchType, data []byte, subresources ...string) (*RkeK8sSystemImage, error) { obj, err := s.objectClient.Patch(o.Name, o, patchType, data, subresources...) - return obj.(*RKEK8sSystemImage), err + return obj.(*RkeK8sSystemImage), err } func (s *rkeK8sSystemImageClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { return s.objectClient.DeleteCollection(deleteOpts, listOpts) } -func (s *rkeK8sSystemImageClient) AddHandler(ctx context.Context, name string, sync RKEK8sSystemImageHandlerFunc) { +func (s *rkeK8sSystemImageClient) AddHandler(ctx context.Context, name string, sync RkeK8sSystemImageHandlerFunc) { s.Controller().AddHandler(ctx, name, sync) } -func (s *rkeK8sSystemImageClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sSystemImageHandlerFunc) { +func (s *rkeK8sSystemImageClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RkeK8sSystemImageHandlerFunc) { s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *rkeK8sSystemImageClient) AddLifecycle(ctx context.Context, name string, lifecycle RKEK8sSystemImageLifecycle) { - sync := NewRKEK8sSystemImageLifecycleAdapter(name, false, s, lifecycle) +func (s *rkeK8sSystemImageClient) AddLifecycle(ctx context.Context, name string, lifecycle RkeK8sSystemImageLifecycle) { + sync := NewRkeK8sSystemImageLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddHandler(ctx, name, sync) } -func (s *rkeK8sSystemImageClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEK8sSystemImageLifecycle) { - sync := NewRKEK8sSystemImageLifecycleAdapter(name, false, s, lifecycle) +func (s *rkeK8sSystemImageClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RkeK8sSystemImageLifecycle) { + sync := NewRkeK8sSystemImageLifecycleAdapter(name, false, s, lifecycle) s.Controller().AddFeatureHandler(ctx, enabled, name, sync) } -func (s *rkeK8sSystemImageClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEK8sSystemImageHandlerFunc) { +func (s *rkeK8sSystemImageClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RkeK8sSystemImageHandlerFunc) { s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *rkeK8sSystemImageClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEK8sSystemImageHandlerFunc) { +func (s *rkeK8sSystemImageClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RkeK8sSystemImageHandlerFunc) { s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } -func (s *rkeK8sSystemImageClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEK8sSystemImageLifecycle) { - sync := NewRKEK8sSystemImageLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *rkeK8sSystemImageClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RkeK8sSystemImageLifecycle) { + sync := NewRkeK8sSystemImageLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) } -func (s *rkeK8sSystemImageClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEK8sSystemImageLifecycle) { - sync := NewRKEK8sSystemImageLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) +func (s *rkeK8sSystemImageClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RkeK8sSystemImageLifecycle) { + sync := NewRkeK8sSystemImageLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) } diff --git a/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_lifecycle_adapter.go index e88af380..5d5a9dc1 100644 --- a/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_lifecycle_adapter.go +++ b/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_lifecycle_adapter.go @@ -6,14 +6,14 @@ import ( "k8s.io/apimachinery/pkg/runtime" ) -type RKEK8sSystemImageLifecycle interface { - Create(obj *RKEK8sSystemImage) (runtime.Object, error) - Remove(obj *RKEK8sSystemImage) (runtime.Object, error) - Updated(obj *RKEK8sSystemImage) (runtime.Object, error) +type RkeK8sSystemImageLifecycle interface { + Create(obj *RkeK8sSystemImage) (runtime.Object, error) + Remove(obj *RkeK8sSystemImage) (runtime.Object, error) + Updated(obj *RkeK8sSystemImage) (runtime.Object, error) } type rkeK8sSystemImageLifecycleAdapter struct { - lifecycle RKEK8sSystemImageLifecycle + lifecycle RkeK8sSystemImageLifecycle } func (w *rkeK8sSystemImageLifecycleAdapter) HasCreate() bool { @@ -27,7 +27,7 @@ func (w *rkeK8sSystemImageLifecycleAdapter) HasFinalize() bool { } func (w *rkeK8sSystemImageLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Create(obj.(*RKEK8sSystemImage)) + o, err := w.lifecycle.Create(obj.(*RkeK8sSystemImage)) if o == nil { return nil, err } @@ -35,7 +35,7 @@ func (w *rkeK8sSystemImageLifecycleAdapter) Create(obj runtime.Object) (runtime. } func (w *rkeK8sSystemImageLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Remove(obj.(*RKEK8sSystemImage)) + o, err := w.lifecycle.Remove(obj.(*RkeK8sSystemImage)) if o == nil { return nil, err } @@ -43,20 +43,20 @@ func (w *rkeK8sSystemImageLifecycleAdapter) Finalize(obj runtime.Object) (runtim } func (w *rkeK8sSystemImageLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Updated(obj.(*RKEK8sSystemImage)) + o, err := w.lifecycle.Updated(obj.(*RkeK8sSystemImage)) if o == nil { return nil, err } return o, err } -func NewRKEK8sSystemImageLifecycleAdapter(name string, clusterScoped bool, client RKEK8sSystemImageInterface, l RKEK8sSystemImageLifecycle) RKEK8sSystemImageHandlerFunc { +func NewRkeK8sSystemImageLifecycleAdapter(name string, clusterScoped bool, client RkeK8sSystemImageInterface, l RkeK8sSystemImageLifecycle) RkeK8sSystemImageHandlerFunc { if clusterScoped { - resource.PutClusterScoped(RKEK8sSystemImageGroupVersionResource) + resource.PutClusterScoped(RkeK8sSystemImageGroupVersionResource) } adapter := &rkeK8sSystemImageLifecycleAdapter{lifecycle: l} syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) - return func(key string, obj *RKEK8sSystemImage) (runtime.Object, error) { + return func(key string, obj *RkeK8sSystemImage) (runtime.Object, error) { newObj, err := syncFn(key, obj) if o, ok := newObj.(runtime.Object); ok { return o, err diff --git a/apis/management.cattle.io/v3/zz_generated_role_template_controller.go b/apis/management.cattle.io/v3/zz_generated_role_template_controller.go index f61abaa1..fbd9e400 100644 --- a/apis/management.cattle.io/v3/zz_generated_role_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_role_template_controller.go @@ -73,8 +73,6 @@ type RoleTemplateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RoleTemplateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type RoleTemplateInterface interface { @@ -125,7 +123,7 @@ func (l *roleTemplateLister) Get(namespace, name string) (*RoleTemplate, error) if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: RoleTemplateGroupVersionKind.Group, - Resource: "roleTemplate", + Resource: RoleTemplateGroupVersionResource.Resource, }, key) } return obj.(*RoleTemplate), nil @@ -209,25 +207,12 @@ func (c roleTemplateFactory) List() runtime.Object { } func (s *roleTemplateClient) Controller() RoleTemplateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.roleTemplateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(RoleTemplateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(RoleTemplateGroupVersionResource, RoleTemplateGroupVersionKind.Kind, false)) - c = &roleTemplateController{ + return &roleTemplateController{ GenericController: genericController, } - - s.client.roleTemplateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type roleTemplateClient struct { @@ -261,6 +246,11 @@ func (s *roleTemplateClient) Update(o *RoleTemplate) (*RoleTemplate, error) { return obj.(*RoleTemplate), err } +func (s *roleTemplateClient) UpdateStatus(o *RoleTemplate) (*RoleTemplate, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*RoleTemplate), err +} + func (s *roleTemplateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_scheme.go b/apis/management.cattle.io/v3/zz_generated_scheme.go index 5cb495f5..31393239 100644 --- a/apis/management.cattle.io/v3/zz_generated_scheme.go +++ b/apis/management.cattle.io/v3/zz_generated_scheme.go @@ -93,6 +93,7 @@ func addKnownTypes(scheme *runtime.Scheme) error { &Preference{}, &PreferenceList{}, &UserAttribute{}, + &UserAttributeList{}, &ProjectNetworkPolicy{}, &ProjectNetworkPolicyList{}, &ClusterLogging{}, @@ -127,8 +128,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &MultiClusterAppList{}, &MultiClusterAppRevision{}, &MultiClusterAppRevisionList{}, - &GlobalDNS{}, - &GlobalDNSList{}, + &GlobalDns{}, + &GlobalDnsList{}, &GlobalDNSProvider{}, &GlobalDNSProviderList{}, &KontainerDriver{}, @@ -149,12 +150,12 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ClusterTemplateList{}, &ClusterTemplateRevision{}, &ClusterTemplateRevisionList{}, - &RKEK8sSystemImage{}, - &RKEK8sSystemImageList{}, - &RKEK8sServiceOption{}, - &RKEK8sServiceOptionList{}, - &RKEAddon{}, - &RKEAddonList{}, + &RkeK8sSystemImage{}, + &RkeK8sSystemImageList{}, + &RkeK8sServiceOption{}, + &RkeK8sServiceOptionList{}, + &RkeAddon{}, + &RkeAddonList{}, &CisConfig{}, &CisConfigList{}, &CisBenchmarkVersion{}, diff --git a/apis/management.cattle.io/v3/zz_generated_setting_controller.go b/apis/management.cattle.io/v3/zz_generated_setting_controller.go index 70ce9c91..5f36d855 100644 --- a/apis/management.cattle.io/v3/zz_generated_setting_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_setting_controller.go @@ -73,8 +73,6 @@ type SettingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler SettingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type SettingInterface interface { @@ -125,7 +123,7 @@ func (l *settingLister) Get(namespace, name string) (*Setting, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: SettingGroupVersionKind.Group, - Resource: "setting", + Resource: SettingGroupVersionResource.Resource, }, key) } return obj.(*Setting), nil @@ -209,25 +207,12 @@ func (c settingFactory) List() runtime.Object { } func (s *settingClient) Controller() SettingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.settingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(SettingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(SettingGroupVersionResource, SettingGroupVersionKind.Kind, false)) - c = &settingController{ + return &settingController{ GenericController: genericController, } - - s.client.settingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type settingClient struct { @@ -261,6 +246,11 @@ func (s *settingClient) Update(o *Setting) (*Setting, error) { return obj.(*Setting), err } +func (s *settingClient) UpdateStatus(o *Setting) (*Setting, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Setting), err +} + func (s *settingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_template_content_controller.go b/apis/management.cattle.io/v3/zz_generated_template_content_controller.go index 63b0e880..6e9c875f 100644 --- a/apis/management.cattle.io/v3/zz_generated_template_content_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_template_content_controller.go @@ -73,8 +73,6 @@ type TemplateContentController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler TemplateContentHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type TemplateContentInterface interface { @@ -125,7 +123,7 @@ func (l *templateContentLister) Get(namespace, name string) (*TemplateContent, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: TemplateContentGroupVersionKind.Group, - Resource: "templateContent", + Resource: TemplateContentGroupVersionResource.Resource, }, key) } return obj.(*TemplateContent), nil @@ -209,25 +207,12 @@ func (c templateContentFactory) List() runtime.Object { } func (s *templateContentClient) Controller() TemplateContentController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.templateContentControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(TemplateContentGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(TemplateContentGroupVersionResource, TemplateContentGroupVersionKind.Kind, false)) - c = &templateContentController{ + return &templateContentController{ GenericController: genericController, } - - s.client.templateContentControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type templateContentClient struct { @@ -261,6 +246,11 @@ func (s *templateContentClient) Update(o *TemplateContent) (*TemplateContent, er return obj.(*TemplateContent), err } +func (s *templateContentClient) UpdateStatus(o *TemplateContent) (*TemplateContent, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*TemplateContent), err +} + func (s *templateContentClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_template_controller.go b/apis/management.cattle.io/v3/zz_generated_template_controller.go index 805093f0..de65fc8c 100644 --- a/apis/management.cattle.io/v3/zz_generated_template_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_template_controller.go @@ -73,8 +73,6 @@ type TemplateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler TemplateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type TemplateInterface interface { @@ -125,7 +123,7 @@ func (l *templateLister) Get(namespace, name string) (*Template, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: TemplateGroupVersionKind.Group, - Resource: "template", + Resource: TemplateGroupVersionResource.Resource, }, key) } return obj.(*Template), nil @@ -209,25 +207,12 @@ func (c templateFactory) List() runtime.Object { } func (s *templateClient) Controller() TemplateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.templateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(TemplateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(TemplateGroupVersionResource, TemplateGroupVersionKind.Kind, false)) - c = &templateController{ + return &templateController{ GenericController: genericController, } - - s.client.templateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type templateClient struct { @@ -261,6 +246,11 @@ func (s *templateClient) Update(o *Template) (*Template, error) { return obj.(*Template), err } +func (s *templateClient) UpdateStatus(o *Template) (*Template, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Template), err +} + func (s *templateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_template_version_controller.go b/apis/management.cattle.io/v3/zz_generated_template_version_controller.go index 0eae5e60..5702da31 100644 --- a/apis/management.cattle.io/v3/zz_generated_template_version_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_template_version_controller.go @@ -73,8 +73,6 @@ type TemplateVersionController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler TemplateVersionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type TemplateVersionInterface interface { @@ -125,7 +123,7 @@ func (l *templateVersionLister) Get(namespace, name string) (*TemplateVersion, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: TemplateVersionGroupVersionKind.Group, - Resource: "templateVersion", + Resource: TemplateVersionGroupVersionResource.Resource, }, key) } return obj.(*TemplateVersion), nil @@ -209,25 +207,12 @@ func (c templateVersionFactory) List() runtime.Object { } func (s *templateVersionClient) Controller() TemplateVersionController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.templateVersionControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(TemplateVersionGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(TemplateVersionGroupVersionResource, TemplateVersionGroupVersionKind.Kind, false)) - c = &templateVersionController{ + return &templateVersionController{ GenericController: genericController, } - - s.client.templateVersionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type templateVersionClient struct { @@ -261,6 +246,11 @@ func (s *templateVersionClient) Update(o *TemplateVersion) (*TemplateVersion, er return obj.(*TemplateVersion), err } +func (s *templateVersionClient) UpdateStatus(o *TemplateVersion) (*TemplateVersion, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*TemplateVersion), err +} + func (s *templateVersionClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_token_controller.go b/apis/management.cattle.io/v3/zz_generated_token_controller.go index 23e9694d..c2211c9b 100644 --- a/apis/management.cattle.io/v3/zz_generated_token_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_token_controller.go @@ -73,8 +73,6 @@ type TokenController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler TokenHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type TokenInterface interface { @@ -125,7 +123,7 @@ func (l *tokenLister) Get(namespace, name string) (*Token, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: TokenGroupVersionKind.Group, - Resource: "token", + Resource: TokenGroupVersionResource.Resource, }, key) } return obj.(*Token), nil @@ -209,25 +207,12 @@ func (c tokenFactory) List() runtime.Object { } func (s *tokenClient) Controller() TokenController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.tokenControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(TokenGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(TokenGroupVersionResource, TokenGroupVersionKind.Kind, false)) - c = &tokenController{ + return &tokenController{ GenericController: genericController, } - - s.client.tokenControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type tokenClient struct { @@ -261,6 +246,11 @@ func (s *tokenClient) Update(o *Token) (*Token, error) { return obj.(*Token), err } +func (s *tokenClient) UpdateStatus(o *Token) (*Token, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Token), err +} + func (s *tokenClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go b/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go index 04595870..6acc633f 100644 --- a/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_user_attribute_controller.go @@ -73,8 +73,6 @@ type UserAttributeController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler UserAttributeHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type UserAttributeInterface interface { @@ -125,7 +123,7 @@ func (l *userAttributeLister) Get(namespace, name string) (*UserAttribute, error if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: UserAttributeGroupVersionKind.Group, - Resource: "userAttribute", + Resource: UserAttributeGroupVersionResource.Resource, }, key) } return obj.(*UserAttribute), nil @@ -209,25 +207,12 @@ func (c userAttributeFactory) List() runtime.Object { } func (s *userAttributeClient) Controller() UserAttributeController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.userAttributeControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(UserAttributeGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(UserAttributeGroupVersionResource, UserAttributeGroupVersionKind.Kind, false)) - c = &userAttributeController{ + return &userAttributeController{ GenericController: genericController, } - - s.client.userAttributeControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type userAttributeClient struct { @@ -261,6 +246,11 @@ func (s *userAttributeClient) Update(o *UserAttribute) (*UserAttribute, error) { return obj.(*UserAttribute), err } +func (s *userAttributeClient) UpdateStatus(o *UserAttribute) (*UserAttribute, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*UserAttribute), err +} + func (s *userAttributeClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3/zz_generated_user_controller.go b/apis/management.cattle.io/v3/zz_generated_user_controller.go index 2ee252ba..051007c4 100644 --- a/apis/management.cattle.io/v3/zz_generated_user_controller.go +++ b/apis/management.cattle.io/v3/zz_generated_user_controller.go @@ -73,8 +73,6 @@ type UserController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler UserHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type UserInterface interface { @@ -125,7 +123,7 @@ func (l *userLister) Get(namespace, name string) (*User, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: UserGroupVersionKind.Group, - Resource: "user", + Resource: UserGroupVersionResource.Resource, }, key) } return obj.(*User), nil @@ -209,25 +207,12 @@ func (c userFactory) List() runtime.Object { } func (s *userClient) Controller() UserController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.userControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(UserGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(UserGroupVersionResource, UserGroupVersionKind.Kind, false)) - c = &userController{ + return &userController{ GenericController: genericController, } - - s.client.userControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type userClient struct { @@ -261,6 +246,11 @@ func (s *userClient) Update(o *User) (*User, error) { return obj.(*User), err } +func (s *userClient) UpdateStatus(o *User) (*User, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*User), err +} + func (s *userClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3public/fakes/zz_generated_auth_provider_mock.go b/apis/management.cattle.io/v3public/fakes/zz_generated_auth_provider_mock.go index ee4cba58..a25b4bba 100644 --- a/apis/management.cattle.io/v3public/fakes/zz_generated_auth_provider_mock.go +++ b/apis/management.cattle.io/v3public/fakes/zz_generated_auth_provider_mock.go @@ -150,8 +150,6 @@ var ( lockAuthProviderControllerMockGeneric sync.RWMutex lockAuthProviderControllerMockInformer sync.RWMutex lockAuthProviderControllerMockLister sync.RWMutex - lockAuthProviderControllerMockStart sync.RWMutex - lockAuthProviderControllerMockSync sync.RWMutex ) // Ensure, that AuthProviderControllerMock does implement AuthProviderController. @@ -191,12 +189,6 @@ var _ v3public.AuthProviderController = &AuthProviderControllerMock{} // ListerFunc: func() v3public.AuthProviderLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedAuthProviderController in code that requires AuthProviderController @@ -231,12 +223,6 @@ type AuthProviderControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3public.AuthProviderLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type AuthProviderControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *AuthProviderControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *AuthProviderControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("AuthProviderControllerMock.StartFunc: method is nil but AuthProviderController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockAuthProviderControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockAuthProviderControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedAuthProviderController.StartCalls()) -func (mock *AuthProviderControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockAuthProviderControllerMockStart.RLock() - calls = mock.calls.Start - lockAuthProviderControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *AuthProviderControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("AuthProviderControllerMock.SyncFunc: method is nil but AuthProviderController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockAuthProviderControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockAuthProviderControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedAuthProviderController.SyncCalls()) -func (mock *AuthProviderControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockAuthProviderControllerMockSync.RLock() - calls = mock.calls.Sync - lockAuthProviderControllerMockSync.RUnlock() - return calls -} - var ( lockAuthProviderInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockAuthProviderInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/management.cattle.io/v3public/zz_generated_auth_provider_controller.go b/apis/management.cattle.io/v3public/zz_generated_auth_provider_controller.go index 69385c0e..699991cb 100644 --- a/apis/management.cattle.io/v3public/zz_generated_auth_provider_controller.go +++ b/apis/management.cattle.io/v3public/zz_generated_auth_provider_controller.go @@ -73,8 +73,6 @@ type AuthProviderController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler AuthProviderHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type AuthProviderInterface interface { @@ -125,7 +123,7 @@ func (l *authProviderLister) Get(namespace, name string) (*AuthProvider, error) if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: AuthProviderGroupVersionKind.Group, - Resource: "authProvider", + Resource: AuthProviderGroupVersionResource.Resource, }, key) } return obj.(*AuthProvider), nil @@ -209,25 +207,12 @@ func (c authProviderFactory) List() runtime.Object { } func (s *authProviderClient) Controller() AuthProviderController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.authProviderControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(AuthProviderGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(AuthProviderGroupVersionResource, AuthProviderGroupVersionKind.Kind, false)) - c = &authProviderController{ + return &authProviderController{ GenericController: genericController, } - - s.client.authProviderControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type authProviderClient struct { @@ -261,6 +246,11 @@ func (s *authProviderClient) Update(o *AuthProvider) (*AuthProvider, error) { return obj.(*AuthProvider), err } +func (s *authProviderClient) UpdateStatus(o *AuthProvider) (*AuthProvider, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*AuthProvider), err +} + func (s *authProviderClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/management.cattle.io/v3public/zz_generated_k8s_client.go b/apis/management.cattle.io/v3public/zz_generated_k8s_client.go index f5a10c73..b477b935 100644 --- a/apis/management.cattle.io/v3public/zz_generated_k8s_client.go +++ b/apis/management.cattle.io/v3public/zz_generated_k8s_client.go @@ -1,71 +1,48 @@ package v3public import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" ) -type ( - contextKeyType struct{} - contextClientsKeyType struct{} -) - type Interface interface { - RESTClient() rest.Interface - controller.Starter - AuthProvidersGetter } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - authProviderControllers map[string]AuthProviderController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer +func NewForConfig(cfg rest.Config) (Interface, error) { + scheme := runtime.NewScheme() + if err := AddToScheme(scheme); err != nil { + return nil, err } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) + controllerFactory, err := controller.NewSharedControllerFactoryFromConfig(&cfg, scheme) if err != nil { return nil, err } + return NewFromControllerFactory(controllerFactory) +} +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - authProviderControllers: map[string]AuthProviderController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type AuthProvidersGetter interface { AuthProviders(namespace string) AuthProviderInterface } func (c *Client) AuthProviders(namespace string) AuthProviderInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &AuthProviderResource, AuthProviderGroupVersionKind, authProviderFactory{}) + sharedClient := c.clientFactory.ForResourceKind(AuthProviderGroupVersionResource, AuthProviderGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &AuthProviderResource, AuthProviderGroupVersionKind, authProviderFactory{}) return &authProviderClient{ ns: namespace, client: c, diff --git a/apis/monitoring.coreos.com/v1/fakes/zz_generated_alertmanager_mock.go b/apis/monitoring.coreos.com/v1/fakes/zz_generated_alertmanager_mock.go index 36f3a940..3ad4b20a 100644 --- a/apis/monitoring.coreos.com/v1/fakes/zz_generated_alertmanager_mock.go +++ b/apis/monitoring.coreos.com/v1/fakes/zz_generated_alertmanager_mock.go @@ -151,8 +151,6 @@ var ( lockAlertmanagerControllerMockGeneric sync.RWMutex lockAlertmanagerControllerMockInformer sync.RWMutex lockAlertmanagerControllerMockLister sync.RWMutex - lockAlertmanagerControllerMockStart sync.RWMutex - lockAlertmanagerControllerMockSync sync.RWMutex ) // Ensure, that AlertmanagerControllerMock does implement AlertmanagerController. @@ -192,12 +190,6 @@ var _ v1a.AlertmanagerController = &AlertmanagerControllerMock{} // ListerFunc: func() v1a.AlertmanagerLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedAlertmanagerController in code that requires AlertmanagerController @@ -232,12 +224,6 @@ type AlertmanagerControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.AlertmanagerLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type AlertmanagerControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *AlertmanagerControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *AlertmanagerControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("AlertmanagerControllerMock.StartFunc: method is nil but AlertmanagerController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockAlertmanagerControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockAlertmanagerControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedAlertmanagerController.StartCalls()) -func (mock *AlertmanagerControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockAlertmanagerControllerMockStart.RLock() - calls = mock.calls.Start - lockAlertmanagerControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *AlertmanagerControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("AlertmanagerControllerMock.SyncFunc: method is nil but AlertmanagerController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockAlertmanagerControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockAlertmanagerControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedAlertmanagerController.SyncCalls()) -func (mock *AlertmanagerControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockAlertmanagerControllerMockSync.RLock() - calls = mock.calls.Sync - lockAlertmanagerControllerMockSync.RUnlock() - return calls -} - var ( lockAlertmanagerInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockAlertmanagerInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.AlertmanagerInterface = &AlertmanagerInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Alertmanager, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.AlertmanagerList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.AlertmanagerList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.AlertmanagerList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.AlertmanagerList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type AlertmanagerInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Alertmanager, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.AlertmanagerList, error) + ListFunc func(opts v1b.ListOptions) (*v1.AlertmanagerList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.AlertmanagerList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.AlertmanagerList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *AlertmanagerInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *AlertmanagerInterfaceMock) List(opts v1b.ListOptions) (*v1a.AlertmanagerList, error) { +func (mock *AlertmanagerInterfaceMock) List(opts v1b.ListOptions) (*v1.AlertmanagerList, error) { if mock.ListFunc == nil { panic("AlertmanagerInterfaceMock.ListFunc: method is nil but AlertmanagerInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *AlertmanagerInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *AlertmanagerInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.AlertmanagerList, error) { +func (mock *AlertmanagerInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.AlertmanagerList, error) { if mock.ListNamespacedFunc == nil { panic("AlertmanagerInterfaceMock.ListNamespacedFunc: method is nil but AlertmanagerInterface.ListNamespaced was just called") } diff --git a/apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_mock.go b/apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_mock.go index 77a0b932..e302ec2f 100644 --- a/apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_mock.go +++ b/apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_mock.go @@ -151,8 +151,6 @@ var ( lockPrometheusControllerMockGeneric sync.RWMutex lockPrometheusControllerMockInformer sync.RWMutex lockPrometheusControllerMockLister sync.RWMutex - lockPrometheusControllerMockStart sync.RWMutex - lockPrometheusControllerMockSync sync.RWMutex ) // Ensure, that PrometheusControllerMock does implement PrometheusController. @@ -192,12 +190,6 @@ var _ v1a.PrometheusController = &PrometheusControllerMock{} // ListerFunc: func() v1a.PrometheusLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedPrometheusController in code that requires PrometheusController @@ -232,12 +224,6 @@ type PrometheusControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.PrometheusLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type PrometheusControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *PrometheusControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *PrometheusControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("PrometheusControllerMock.StartFunc: method is nil but PrometheusController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockPrometheusControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockPrometheusControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedPrometheusController.StartCalls()) -func (mock *PrometheusControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockPrometheusControllerMockStart.RLock() - calls = mock.calls.Start - lockPrometheusControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *PrometheusControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("PrometheusControllerMock.SyncFunc: method is nil but PrometheusController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockPrometheusControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockPrometheusControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedPrometheusController.SyncCalls()) -func (mock *PrometheusControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockPrometheusControllerMockSync.RLock() - calls = mock.calls.Sync - lockPrometheusControllerMockSync.RUnlock() - return calls -} - var ( lockPrometheusInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockPrometheusInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.PrometheusInterface = &PrometheusInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Prometheus, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.PrometheusList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.PrometheusList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.PrometheusList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.PrometheusList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type PrometheusInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Prometheus, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.PrometheusList, error) + ListFunc func(opts v1b.ListOptions) (*v1.PrometheusList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.PrometheusList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.PrometheusList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *PrometheusInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *PrometheusInterfaceMock) List(opts v1b.ListOptions) (*v1a.PrometheusList, error) { +func (mock *PrometheusInterfaceMock) List(opts v1b.ListOptions) (*v1.PrometheusList, error) { if mock.ListFunc == nil { panic("PrometheusInterfaceMock.ListFunc: method is nil but PrometheusInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *PrometheusInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *PrometheusInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.PrometheusList, error) { +func (mock *PrometheusInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.PrometheusList, error) { if mock.ListNamespacedFunc == nil { panic("PrometheusInterfaceMock.ListNamespacedFunc: method is nil but PrometheusInterface.ListNamespaced was just called") } diff --git a/apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_rule_mock.go b/apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_rule_mock.go index 60364abf..a1859b8e 100644 --- a/apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_rule_mock.go +++ b/apis/monitoring.coreos.com/v1/fakes/zz_generated_prometheus_rule_mock.go @@ -151,8 +151,6 @@ var ( lockPrometheusRuleControllerMockGeneric sync.RWMutex lockPrometheusRuleControllerMockInformer sync.RWMutex lockPrometheusRuleControllerMockLister sync.RWMutex - lockPrometheusRuleControllerMockStart sync.RWMutex - lockPrometheusRuleControllerMockSync sync.RWMutex ) // Ensure, that PrometheusRuleControllerMock does implement PrometheusRuleController. @@ -192,12 +190,6 @@ var _ v1a.PrometheusRuleController = &PrometheusRuleControllerMock{} // ListerFunc: func() v1a.PrometheusRuleLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedPrometheusRuleController in code that requires PrometheusRuleController @@ -232,12 +224,6 @@ type PrometheusRuleControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.PrometheusRuleLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type PrometheusRuleControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *PrometheusRuleControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *PrometheusRuleControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("PrometheusRuleControllerMock.StartFunc: method is nil but PrometheusRuleController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockPrometheusRuleControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockPrometheusRuleControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedPrometheusRuleController.StartCalls()) -func (mock *PrometheusRuleControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockPrometheusRuleControllerMockStart.RLock() - calls = mock.calls.Start - lockPrometheusRuleControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *PrometheusRuleControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("PrometheusRuleControllerMock.SyncFunc: method is nil but PrometheusRuleController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockPrometheusRuleControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockPrometheusRuleControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedPrometheusRuleController.SyncCalls()) -func (mock *PrometheusRuleControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockPrometheusRuleControllerMockSync.RLock() - calls = mock.calls.Sync - lockPrometheusRuleControllerMockSync.RUnlock() - return calls -} - var ( lockPrometheusRuleInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockPrometheusRuleInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.PrometheusRuleInterface = &PrometheusRuleInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.PrometheusRule, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.PrometheusRuleList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.PrometheusRuleList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.PrometheusRuleList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.PrometheusRuleList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type PrometheusRuleInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.PrometheusRule, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.PrometheusRuleList, error) + ListFunc func(opts v1b.ListOptions) (*v1.PrometheusRuleList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.PrometheusRuleList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.PrometheusRuleList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *PrometheusRuleInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *PrometheusRuleInterfaceMock) List(opts v1b.ListOptions) (*v1a.PrometheusRuleList, error) { +func (mock *PrometheusRuleInterfaceMock) List(opts v1b.ListOptions) (*v1.PrometheusRuleList, error) { if mock.ListFunc == nil { panic("PrometheusRuleInterfaceMock.ListFunc: method is nil but PrometheusRuleInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *PrometheusRuleInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *PrometheusRuleInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.PrometheusRuleList, error) { +func (mock *PrometheusRuleInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.PrometheusRuleList, error) { if mock.ListNamespacedFunc == nil { panic("PrometheusRuleInterfaceMock.ListNamespacedFunc: method is nil but PrometheusRuleInterface.ListNamespaced was just called") } diff --git a/apis/monitoring.coreos.com/v1/fakes/zz_generated_service_monitor_mock.go b/apis/monitoring.coreos.com/v1/fakes/zz_generated_service_monitor_mock.go index 5760887d..2310231e 100644 --- a/apis/monitoring.coreos.com/v1/fakes/zz_generated_service_monitor_mock.go +++ b/apis/monitoring.coreos.com/v1/fakes/zz_generated_service_monitor_mock.go @@ -151,8 +151,6 @@ var ( lockServiceMonitorControllerMockGeneric sync.RWMutex lockServiceMonitorControllerMockInformer sync.RWMutex lockServiceMonitorControllerMockLister sync.RWMutex - lockServiceMonitorControllerMockStart sync.RWMutex - lockServiceMonitorControllerMockSync sync.RWMutex ) // Ensure, that ServiceMonitorControllerMock does implement ServiceMonitorController. @@ -192,12 +190,6 @@ var _ v1a.ServiceMonitorController = &ServiceMonitorControllerMock{} // ListerFunc: func() v1a.ServiceMonitorLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedServiceMonitorController in code that requires ServiceMonitorController @@ -232,12 +224,6 @@ type ServiceMonitorControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.ServiceMonitorLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type ServiceMonitorControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *ServiceMonitorControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ServiceMonitorControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ServiceMonitorControllerMock.StartFunc: method is nil but ServiceMonitorController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockServiceMonitorControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockServiceMonitorControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedServiceMonitorController.StartCalls()) -func (mock *ServiceMonitorControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockServiceMonitorControllerMockStart.RLock() - calls = mock.calls.Start - lockServiceMonitorControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ServiceMonitorControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ServiceMonitorControllerMock.SyncFunc: method is nil but ServiceMonitorController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockServiceMonitorControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockServiceMonitorControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedServiceMonitorController.SyncCalls()) -func (mock *ServiceMonitorControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockServiceMonitorControllerMockSync.RLock() - calls = mock.calls.Sync - lockServiceMonitorControllerMockSync.RUnlock() - return calls -} - var ( lockServiceMonitorInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockServiceMonitorInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.ServiceMonitorInterface = &ServiceMonitorInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ServiceMonitor, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.ServiceMonitorList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.ServiceMonitorList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ServiceMonitorList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ServiceMonitorList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type ServiceMonitorInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ServiceMonitor, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.ServiceMonitorList, error) + ListFunc func(opts v1b.ListOptions) (*v1.ServiceMonitorList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ServiceMonitorList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ServiceMonitorList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *ServiceMonitorInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *ServiceMonitorInterfaceMock) List(opts v1b.ListOptions) (*v1a.ServiceMonitorList, error) { +func (mock *ServiceMonitorInterfaceMock) List(opts v1b.ListOptions) (*v1.ServiceMonitorList, error) { if mock.ListFunc == nil { panic("ServiceMonitorInterfaceMock.ListFunc: method is nil but ServiceMonitorInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *ServiceMonitorInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *ServiceMonitorInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ServiceMonitorList, error) { +func (mock *ServiceMonitorInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ServiceMonitorList, error) { if mock.ListNamespacedFunc == nil { panic("ServiceMonitorInterfaceMock.ListNamespacedFunc: method is nil but ServiceMonitorInterface.ListNamespaced was just called") } diff --git a/apis/monitoring.coreos.com/v1/zz_generated_alertmanager_controller.go b/apis/monitoring.coreos.com/v1/zz_generated_alertmanager_controller.go index 5459dbe7..73f02736 100644 --- a/apis/monitoring.coreos.com/v1/zz_generated_alertmanager_controller.go +++ b/apis/monitoring.coreos.com/v1/zz_generated_alertmanager_controller.go @@ -50,12 +50,6 @@ func NewAlertmanager(namespace, name string, obj v1.Alertmanager) *v1.Alertmanag return &obj } -type AlertmanagerList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Alertmanager `json:"items"` -} - type AlertmanagerHandlerFunc func(key string, obj *v1.Alertmanager) (runtime.Object, error) type AlertmanagerChangeHandlerFunc func(obj *v1.Alertmanager) (runtime.Object, error) @@ -75,8 +69,6 @@ type AlertmanagerController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler AlertmanagerHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type AlertmanagerInterface interface { @@ -87,8 +79,8 @@ type AlertmanagerInterface interface { Update(*v1.Alertmanager) (*v1.Alertmanager, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*AlertmanagerList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*AlertmanagerList, error) + List(opts metav1.ListOptions) (*v1.AlertmanagerList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.AlertmanagerList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() AlertmanagerController @@ -127,7 +119,7 @@ func (l *alertmanagerLister) Get(namespace, name string) (*v1.Alertmanager, erro if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: AlertmanagerGroupVersionKind.Group, - Resource: "alertmanager", + Resource: AlertmanagerGroupVersionResource.Resource, }, key) } return obj.(*v1.Alertmanager), nil @@ -207,29 +199,16 @@ func (c alertmanagerFactory) Object() runtime.Object { } func (c alertmanagerFactory) List() runtime.Object { - return &AlertmanagerList{} + return &v1.AlertmanagerList{} } func (s *alertmanagerClient) Controller() AlertmanagerController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.alertmanagerControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(AlertmanagerGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(AlertmanagerGroupVersionResource, AlertmanagerGroupVersionKind.Kind, true)) - c = &alertmanagerController{ + return &alertmanagerController{ GenericController: genericController, } - - s.client.alertmanagerControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type alertmanagerClient struct { @@ -263,6 +242,11 @@ func (s *alertmanagerClient) Update(o *v1.Alertmanager) (*v1.Alertmanager, error return obj.(*v1.Alertmanager), err } +func (s *alertmanagerClient) UpdateStatus(o *v1.Alertmanager) (*v1.Alertmanager, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.Alertmanager), err +} + func (s *alertmanagerClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *alertmanagerClient) DeleteNamespaced(namespace, name string, options *m return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *alertmanagerClient) List(opts metav1.ListOptions) (*AlertmanagerList, error) { +func (s *alertmanagerClient) List(opts metav1.ListOptions) (*v1.AlertmanagerList, error) { obj, err := s.objectClient.List(opts) - return obj.(*AlertmanagerList), err + return obj.(*v1.AlertmanagerList), err } -func (s *alertmanagerClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*AlertmanagerList, error) { +func (s *alertmanagerClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.AlertmanagerList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*AlertmanagerList), err + return obj.(*v1.AlertmanagerList), err } func (s *alertmanagerClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/monitoring.coreos.com/v1/zz_generated_deepcopy.go b/apis/monitoring.coreos.com/v1/zz_generated_deepcopy.go deleted file mode 100644 index 6d809377..00000000 --- a/apis/monitoring.coreos.com/v1/zz_generated_deepcopy.go +++ /dev/null @@ -1,138 +0,0 @@ -package v1 - -import ( - monitoringv1 "github.com/coreos/prometheus-operator/pkg/apis/monitoring/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *AlertmanagerList) DeepCopyInto(out *AlertmanagerList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]monitoringv1.Alertmanager, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AlertmanagerList. -func (in *AlertmanagerList) DeepCopy() *AlertmanagerList { - if in == nil { - return nil - } - out := new(AlertmanagerList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *AlertmanagerList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrometheusList) DeepCopyInto(out *PrometheusList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]monitoringv1.Prometheus, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusList. -func (in *PrometheusList) DeepCopy() *PrometheusList { - if in == nil { - return nil - } - out := new(PrometheusList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PrometheusList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PrometheusRuleList) DeepCopyInto(out *PrometheusRuleList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]monitoringv1.PrometheusRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PrometheusRuleList. -func (in *PrometheusRuleList) DeepCopy() *PrometheusRuleList { - if in == nil { - return nil - } - out := new(PrometheusRuleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PrometheusRuleList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ServiceMonitorList) DeepCopyInto(out *ServiceMonitorList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]monitoringv1.ServiceMonitor, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ServiceMonitorList. -func (in *ServiceMonitorList) DeepCopy() *ServiceMonitorList { - if in == nil { - return nil - } - out := new(ServiceMonitorList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ServiceMonitorList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/apis/monitoring.coreos.com/v1/zz_generated_k8s_client.go b/apis/monitoring.coreos.com/v1/zz_generated_k8s_client.go index d313965c..3e996828 100644 --- a/apis/monitoring.coreos.com/v1/zz_generated_k8s_client.go +++ b/apis/monitoring.coreos.com/v1/zz_generated_k8s_client.go @@ -1,25 +1,12 @@ package v1 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" - "k8s.io/client-go/rest" -) - -type ( - contextKeyType struct{} - contextClientsKeyType struct{} ) type Interface interface { - RESTClient() rest.Interface - controller.Starter - PrometheusesGetter AlertmanagersGetter PrometheusRulesGetter @@ -27,54 +14,24 @@ type Interface interface { } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - prometheusControllers map[string]PrometheusController - alertmanagerControllers map[string]AlertmanagerController - prometheusRuleControllers map[string]PrometheusRuleController - serviceMonitorControllers map[string]ServiceMonitorController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer - } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) - if err != nil { - return nil, err - } - +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - prometheusControllers: map[string]PrometheusController{}, - alertmanagerControllers: map[string]AlertmanagerController{}, - prometheusRuleControllers: map[string]PrometheusRuleController{}, - serviceMonitorControllers: map[string]ServiceMonitorController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type PrometheusesGetter interface { Prometheuses(namespace string) PrometheusInterface } func (c *Client) Prometheuses(namespace string) PrometheusInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PrometheusResource, PrometheusGroupVersionKind, prometheusFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PrometheusGroupVersionResource, PrometheusGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PrometheusResource, PrometheusGroupVersionKind, prometheusFactory{}) return &prometheusClient{ ns: namespace, client: c, @@ -87,7 +44,8 @@ type AlertmanagersGetter interface { } func (c *Client) Alertmanagers(namespace string) AlertmanagerInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &AlertmanagerResource, AlertmanagerGroupVersionKind, alertmanagerFactory{}) + sharedClient := c.clientFactory.ForResourceKind(AlertmanagerGroupVersionResource, AlertmanagerGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &AlertmanagerResource, AlertmanagerGroupVersionKind, alertmanagerFactory{}) return &alertmanagerClient{ ns: namespace, client: c, @@ -100,7 +58,8 @@ type PrometheusRulesGetter interface { } func (c *Client) PrometheusRules(namespace string) PrometheusRuleInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PrometheusRuleResource, PrometheusRuleGroupVersionKind, prometheusRuleFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PrometheusRuleGroupVersionResource, PrometheusRuleGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PrometheusRuleResource, PrometheusRuleGroupVersionKind, prometheusRuleFactory{}) return &prometheusRuleClient{ ns: namespace, client: c, @@ -113,7 +72,8 @@ type ServiceMonitorsGetter interface { } func (c *Client) ServiceMonitors(namespace string) ServiceMonitorInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ServiceMonitorResource, ServiceMonitorGroupVersionKind, serviceMonitorFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ServiceMonitorGroupVersionResource, ServiceMonitorGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ServiceMonitorResource, ServiceMonitorGroupVersionKind, serviceMonitorFactory{}) return &serviceMonitorClient{ ns: namespace, client: c, diff --git a/apis/monitoring.coreos.com/v1/zz_generated_prometheus_controller.go b/apis/monitoring.coreos.com/v1/zz_generated_prometheus_controller.go index cb7833f3..29c96563 100644 --- a/apis/monitoring.coreos.com/v1/zz_generated_prometheus_controller.go +++ b/apis/monitoring.coreos.com/v1/zz_generated_prometheus_controller.go @@ -50,12 +50,6 @@ func NewPrometheus(namespace, name string, obj v1.Prometheus) *v1.Prometheus { return &obj } -type PrometheusList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Prometheus `json:"items"` -} - type PrometheusHandlerFunc func(key string, obj *v1.Prometheus) (runtime.Object, error) type PrometheusChangeHandlerFunc func(obj *v1.Prometheus) (runtime.Object, error) @@ -75,8 +69,6 @@ type PrometheusController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PrometheusHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PrometheusInterface interface { @@ -87,8 +79,8 @@ type PrometheusInterface interface { Update(*v1.Prometheus) (*v1.Prometheus, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*PrometheusList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*PrometheusList, error) + List(opts metav1.ListOptions) (*v1.PrometheusList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.PrometheusList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() PrometheusController @@ -127,7 +119,7 @@ func (l *prometheusLister) Get(namespace, name string) (*v1.Prometheus, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PrometheusGroupVersionKind.Group, - Resource: "prometheus", + Resource: PrometheusGroupVersionResource.Resource, }, key) } return obj.(*v1.Prometheus), nil @@ -207,29 +199,16 @@ func (c prometheusFactory) Object() runtime.Object { } func (c prometheusFactory) List() runtime.Object { - return &PrometheusList{} + return &v1.PrometheusList{} } func (s *prometheusClient) Controller() PrometheusController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.prometheusControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PrometheusGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PrometheusGroupVersionResource, PrometheusGroupVersionKind.Kind, true)) - c = &prometheusController{ + return &prometheusController{ GenericController: genericController, } - - s.client.prometheusControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type prometheusClient struct { @@ -263,6 +242,11 @@ func (s *prometheusClient) Update(o *v1.Prometheus) (*v1.Prometheus, error) { return obj.(*v1.Prometheus), err } +func (s *prometheusClient) UpdateStatus(o *v1.Prometheus) (*v1.Prometheus, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.Prometheus), err +} + func (s *prometheusClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *prometheusClient) DeleteNamespaced(namespace, name string, options *met return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *prometheusClient) List(opts metav1.ListOptions) (*PrometheusList, error) { +func (s *prometheusClient) List(opts metav1.ListOptions) (*v1.PrometheusList, error) { obj, err := s.objectClient.List(opts) - return obj.(*PrometheusList), err + return obj.(*v1.PrometheusList), err } -func (s *prometheusClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*PrometheusList, error) { +func (s *prometheusClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.PrometheusList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*PrometheusList), err + return obj.(*v1.PrometheusList), err } func (s *prometheusClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/monitoring.coreos.com/v1/zz_generated_prometheus_rule_controller.go b/apis/monitoring.coreos.com/v1/zz_generated_prometheus_rule_controller.go index 2428effa..b81b9f42 100644 --- a/apis/monitoring.coreos.com/v1/zz_generated_prometheus_rule_controller.go +++ b/apis/monitoring.coreos.com/v1/zz_generated_prometheus_rule_controller.go @@ -50,12 +50,6 @@ func NewPrometheusRule(namespace, name string, obj v1.PrometheusRule) *v1.Promet return &obj } -type PrometheusRuleList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.PrometheusRule `json:"items"` -} - type PrometheusRuleHandlerFunc func(key string, obj *v1.PrometheusRule) (runtime.Object, error) type PrometheusRuleChangeHandlerFunc func(obj *v1.PrometheusRule) (runtime.Object, error) @@ -75,8 +69,6 @@ type PrometheusRuleController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PrometheusRuleHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PrometheusRuleInterface interface { @@ -87,8 +79,8 @@ type PrometheusRuleInterface interface { Update(*v1.PrometheusRule) (*v1.PrometheusRule, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*PrometheusRuleList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*PrometheusRuleList, error) + List(opts metav1.ListOptions) (*v1.PrometheusRuleList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.PrometheusRuleList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() PrometheusRuleController @@ -127,7 +119,7 @@ func (l *prometheusRuleLister) Get(namespace, name string) (*v1.PrometheusRule, if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PrometheusRuleGroupVersionKind.Group, - Resource: "prometheusRule", + Resource: PrometheusRuleGroupVersionResource.Resource, }, key) } return obj.(*v1.PrometheusRule), nil @@ -207,29 +199,16 @@ func (c prometheusRuleFactory) Object() runtime.Object { } func (c prometheusRuleFactory) List() runtime.Object { - return &PrometheusRuleList{} + return &v1.PrometheusRuleList{} } func (s *prometheusRuleClient) Controller() PrometheusRuleController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.prometheusRuleControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PrometheusRuleGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PrometheusRuleGroupVersionResource, PrometheusRuleGroupVersionKind.Kind, true)) - c = &prometheusRuleController{ + return &prometheusRuleController{ GenericController: genericController, } - - s.client.prometheusRuleControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type prometheusRuleClient struct { @@ -263,6 +242,11 @@ func (s *prometheusRuleClient) Update(o *v1.PrometheusRule) (*v1.PrometheusRule, return obj.(*v1.PrometheusRule), err } +func (s *prometheusRuleClient) UpdateStatus(o *v1.PrometheusRule) (*v1.PrometheusRule, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.PrometheusRule), err +} + func (s *prometheusRuleClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *prometheusRuleClient) DeleteNamespaced(namespace, name string, options return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *prometheusRuleClient) List(opts metav1.ListOptions) (*PrometheusRuleList, error) { +func (s *prometheusRuleClient) List(opts metav1.ListOptions) (*v1.PrometheusRuleList, error) { obj, err := s.objectClient.List(opts) - return obj.(*PrometheusRuleList), err + return obj.(*v1.PrometheusRuleList), err } -func (s *prometheusRuleClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*PrometheusRuleList, error) { +func (s *prometheusRuleClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.PrometheusRuleList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*PrometheusRuleList), err + return obj.(*v1.PrometheusRuleList), err } func (s *prometheusRuleClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/monitoring.coreos.com/v1/zz_generated_scheme.go b/apis/monitoring.coreos.com/v1/zz_generated_scheme.go index 618f255d..af34e010 100644 --- a/apis/monitoring.coreos.com/v1/zz_generated_scheme.go +++ b/apis/monitoring.coreos.com/v1/zz_generated_scheme.go @@ -1,8 +1,6 @@ package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -23,22 +21,3 @@ func Kind(kind string) schema.GroupKind { func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - // TODO this gets cleaned up when the types are fixed - scheme.AddKnownTypes(SchemeGroupVersion, - - &PrometheusList{}, - &AlertmanagerList{}, - &PrometheusRuleList{}, - &ServiceMonitorList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/apis/monitoring.coreos.com/v1/zz_generated_service_monitor_controller.go b/apis/monitoring.coreos.com/v1/zz_generated_service_monitor_controller.go index b5c04123..57b45889 100644 --- a/apis/monitoring.coreos.com/v1/zz_generated_service_monitor_controller.go +++ b/apis/monitoring.coreos.com/v1/zz_generated_service_monitor_controller.go @@ -50,12 +50,6 @@ func NewServiceMonitor(namespace, name string, obj v1.ServiceMonitor) *v1.Servic return &obj } -type ServiceMonitorList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ServiceMonitor `json:"items"` -} - type ServiceMonitorHandlerFunc func(key string, obj *v1.ServiceMonitor) (runtime.Object, error) type ServiceMonitorChangeHandlerFunc func(obj *v1.ServiceMonitor) (runtime.Object, error) @@ -75,8 +69,6 @@ type ServiceMonitorController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ServiceMonitorHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ServiceMonitorInterface interface { @@ -87,8 +79,8 @@ type ServiceMonitorInterface interface { Update(*v1.ServiceMonitor) (*v1.ServiceMonitor, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*ServiceMonitorList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*ServiceMonitorList, error) + List(opts metav1.ListOptions) (*v1.ServiceMonitorList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ServiceMonitorList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() ServiceMonitorController @@ -127,7 +119,7 @@ func (l *serviceMonitorLister) Get(namespace, name string) (*v1.ServiceMonitor, if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ServiceMonitorGroupVersionKind.Group, - Resource: "serviceMonitor", + Resource: ServiceMonitorGroupVersionResource.Resource, }, key) } return obj.(*v1.ServiceMonitor), nil @@ -207,29 +199,16 @@ func (c serviceMonitorFactory) Object() runtime.Object { } func (c serviceMonitorFactory) List() runtime.Object { - return &ServiceMonitorList{} + return &v1.ServiceMonitorList{} } func (s *serviceMonitorClient) Controller() ServiceMonitorController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.serviceMonitorControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ServiceMonitorGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ServiceMonitorGroupVersionResource, ServiceMonitorGroupVersionKind.Kind, true)) - c = &serviceMonitorController{ + return &serviceMonitorController{ GenericController: genericController, } - - s.client.serviceMonitorControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type serviceMonitorClient struct { @@ -263,6 +242,11 @@ func (s *serviceMonitorClient) Update(o *v1.ServiceMonitor) (*v1.ServiceMonitor, return obj.(*v1.ServiceMonitor), err } +func (s *serviceMonitorClient) UpdateStatus(o *v1.ServiceMonitor) (*v1.ServiceMonitor, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.ServiceMonitor), err +} + func (s *serviceMonitorClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *serviceMonitorClient) DeleteNamespaced(namespace, name string, options return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *serviceMonitorClient) List(opts metav1.ListOptions) (*ServiceMonitorList, error) { +func (s *serviceMonitorClient) List(opts metav1.ListOptions) (*v1.ServiceMonitorList, error) { obj, err := s.objectClient.List(opts) - return obj.(*ServiceMonitorList), err + return obj.(*v1.ServiceMonitorList), err } -func (s *serviceMonitorClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ServiceMonitorList, error) { +func (s *serviceMonitorClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ServiceMonitorList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*ServiceMonitorList), err + return obj.(*v1.ServiceMonitorList), err } func (s *serviceMonitorClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/networking.istio.io/v1alpha3/fakes/zz_generated_destination_rule_mock.go b/apis/networking.istio.io/v1alpha3/fakes/zz_generated_destination_rule_mock.go index c53fb944..f720dedc 100644 --- a/apis/networking.istio.io/v1alpha3/fakes/zz_generated_destination_rule_mock.go +++ b/apis/networking.istio.io/v1alpha3/fakes/zz_generated_destination_rule_mock.go @@ -151,8 +151,6 @@ var ( lockDestinationRuleControllerMockGeneric sync.RWMutex lockDestinationRuleControllerMockInformer sync.RWMutex lockDestinationRuleControllerMockLister sync.RWMutex - lockDestinationRuleControllerMockStart sync.RWMutex - lockDestinationRuleControllerMockSync sync.RWMutex ) // Ensure, that DestinationRuleControllerMock does implement DestinationRuleController. @@ -192,12 +190,6 @@ var _ v1alpha3a.DestinationRuleController = &DestinationRuleControllerMock{} // ListerFunc: func() v1alpha3a.DestinationRuleLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedDestinationRuleController in code that requires DestinationRuleController @@ -232,12 +224,6 @@ type DestinationRuleControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1alpha3a.DestinationRuleLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type DestinationRuleControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *DestinationRuleControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *DestinationRuleControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("DestinationRuleControllerMock.StartFunc: method is nil but DestinationRuleController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockDestinationRuleControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockDestinationRuleControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedDestinationRuleController.StartCalls()) -func (mock *DestinationRuleControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockDestinationRuleControllerMockStart.RLock() - calls = mock.calls.Start - lockDestinationRuleControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *DestinationRuleControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("DestinationRuleControllerMock.SyncFunc: method is nil but DestinationRuleController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockDestinationRuleControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockDestinationRuleControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedDestinationRuleController.SyncCalls()) -func (mock *DestinationRuleControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockDestinationRuleControllerMockSync.RLock() - calls = mock.calls.Sync - lockDestinationRuleControllerMockSync.RUnlock() - return calls -} - var ( lockDestinationRuleInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockDestinationRuleInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1alpha3a.DestinationRuleInterface = &DestinationRuleInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v1alpha3.DestinationRule, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1.ListOptions) (*v1alpha3a.DestinationRuleList, error) { +// ListFunc: func(opts v1.ListOptions) (*v1alpha3.DestinationRuleList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v1alpha3a.DestinationRuleList, error) { +// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v1alpha3.DestinationRuleList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type DestinationRuleInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v1alpha3.DestinationRule, error) // ListFunc mocks the List method. - ListFunc func(opts v1.ListOptions) (*v1alpha3a.DestinationRuleList, error) + ListFunc func(opts v1.ListOptions) (*v1alpha3.DestinationRuleList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1alpha3a.DestinationRuleList, error) + ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1alpha3.DestinationRuleList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *DestinationRuleInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *DestinationRuleInterfaceMock) List(opts v1.ListOptions) (*v1alpha3a.DestinationRuleList, error) { +func (mock *DestinationRuleInterfaceMock) List(opts v1.ListOptions) (*v1alpha3.DestinationRuleList, error) { if mock.ListFunc == nil { panic("DestinationRuleInterfaceMock.ListFunc: method is nil but DestinationRuleInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *DestinationRuleInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *DestinationRuleInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1alpha3a.DestinationRuleList, error) { +func (mock *DestinationRuleInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1alpha3.DestinationRuleList, error) { if mock.ListNamespacedFunc == nil { panic("DestinationRuleInterfaceMock.ListNamespacedFunc: method is nil but DestinationRuleInterface.ListNamespaced was just called") } diff --git a/apis/networking.istio.io/v1alpha3/fakes/zz_generated_virtual_service_mock.go b/apis/networking.istio.io/v1alpha3/fakes/zz_generated_virtual_service_mock.go index cb3cca5e..8e3e3d60 100644 --- a/apis/networking.istio.io/v1alpha3/fakes/zz_generated_virtual_service_mock.go +++ b/apis/networking.istio.io/v1alpha3/fakes/zz_generated_virtual_service_mock.go @@ -151,8 +151,6 @@ var ( lockVirtualServiceControllerMockGeneric sync.RWMutex lockVirtualServiceControllerMockInformer sync.RWMutex lockVirtualServiceControllerMockLister sync.RWMutex - lockVirtualServiceControllerMockStart sync.RWMutex - lockVirtualServiceControllerMockSync sync.RWMutex ) // Ensure, that VirtualServiceControllerMock does implement VirtualServiceController. @@ -192,12 +190,6 @@ var _ v1alpha3a.VirtualServiceController = &VirtualServiceControllerMock{} // ListerFunc: func() v1alpha3a.VirtualServiceLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedVirtualServiceController in code that requires VirtualServiceController @@ -232,12 +224,6 @@ type VirtualServiceControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1alpha3a.VirtualServiceLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type VirtualServiceControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *VirtualServiceControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *VirtualServiceControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("VirtualServiceControllerMock.StartFunc: method is nil but VirtualServiceController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockVirtualServiceControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockVirtualServiceControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedVirtualServiceController.StartCalls()) -func (mock *VirtualServiceControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockVirtualServiceControllerMockStart.RLock() - calls = mock.calls.Start - lockVirtualServiceControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *VirtualServiceControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("VirtualServiceControllerMock.SyncFunc: method is nil but VirtualServiceController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockVirtualServiceControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockVirtualServiceControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedVirtualServiceController.SyncCalls()) -func (mock *VirtualServiceControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockVirtualServiceControllerMockSync.RLock() - calls = mock.calls.Sync - lockVirtualServiceControllerMockSync.RUnlock() - return calls -} - var ( lockVirtualServiceInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockVirtualServiceInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1alpha3a.VirtualServiceInterface = &VirtualServiceInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v1alpha3.VirtualService, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1.ListOptions) (*v1alpha3a.VirtualServiceList, error) { +// ListFunc: func(opts v1.ListOptions) (*v1alpha3.VirtualServiceList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v1alpha3a.VirtualServiceList, error) { +// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v1alpha3.VirtualServiceList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type VirtualServiceInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v1alpha3.VirtualService, error) // ListFunc mocks the List method. - ListFunc func(opts v1.ListOptions) (*v1alpha3a.VirtualServiceList, error) + ListFunc func(opts v1.ListOptions) (*v1alpha3.VirtualServiceList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1alpha3a.VirtualServiceList, error) + ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1alpha3.VirtualServiceList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *VirtualServiceInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *VirtualServiceInterfaceMock) List(opts v1.ListOptions) (*v1alpha3a.VirtualServiceList, error) { +func (mock *VirtualServiceInterfaceMock) List(opts v1.ListOptions) (*v1alpha3.VirtualServiceList, error) { if mock.ListFunc == nil { panic("VirtualServiceInterfaceMock.ListFunc: method is nil but VirtualServiceInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *VirtualServiceInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *VirtualServiceInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1alpha3a.VirtualServiceList, error) { +func (mock *VirtualServiceInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1alpha3.VirtualServiceList, error) { if mock.ListNamespacedFunc == nil { panic("VirtualServiceInterfaceMock.ListNamespacedFunc: method is nil but VirtualServiceInterface.ListNamespaced was just called") } diff --git a/apis/networking.istio.io/v1alpha3/zz_generated_deepcopy.go b/apis/networking.istio.io/v1alpha3/zz_generated_deepcopy.go deleted file mode 100644 index f12240db..00000000 --- a/apis/networking.istio.io/v1alpha3/zz_generated_deepcopy.go +++ /dev/null @@ -1,72 +0,0 @@ -package v1alpha3 - -import ( - istiov1alpha3 "github.com/knative/pkg/apis/istio/v1alpha3" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *DestinationRuleList) DeepCopyInto(out *DestinationRuleList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]istiov1alpha3.DestinationRule, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DestinationRuleList. -func (in *DestinationRuleList) DeepCopy() *DestinationRuleList { - if in == nil { - return nil - } - out := new(DestinationRuleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *DestinationRuleList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *VirtualServiceList) DeepCopyInto(out *VirtualServiceList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]istiov1alpha3.VirtualService, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new VirtualServiceList. -func (in *VirtualServiceList) DeepCopy() *VirtualServiceList { - if in == nil { - return nil - } - out := new(VirtualServiceList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *VirtualServiceList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/apis/networking.istio.io/v1alpha3/zz_generated_destination_rule_controller.go b/apis/networking.istio.io/v1alpha3/zz_generated_destination_rule_controller.go index 9e9480ba..6006d6ce 100644 --- a/apis/networking.istio.io/v1alpha3/zz_generated_destination_rule_controller.go +++ b/apis/networking.istio.io/v1alpha3/zz_generated_destination_rule_controller.go @@ -50,12 +50,6 @@ func NewDestinationRule(namespace, name string, obj v1alpha3.DestinationRule) *v return &obj } -type DestinationRuleList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1alpha3.DestinationRule `json:"items"` -} - type DestinationRuleHandlerFunc func(key string, obj *v1alpha3.DestinationRule) (runtime.Object, error) type DestinationRuleChangeHandlerFunc func(obj *v1alpha3.DestinationRule) (runtime.Object, error) @@ -75,8 +69,6 @@ type DestinationRuleController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler DestinationRuleHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type DestinationRuleInterface interface { @@ -87,8 +79,8 @@ type DestinationRuleInterface interface { Update(*v1alpha3.DestinationRule) (*v1alpha3.DestinationRule, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*DestinationRuleList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*DestinationRuleList, error) + List(opts metav1.ListOptions) (*v1alpha3.DestinationRuleList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1alpha3.DestinationRuleList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() DestinationRuleController @@ -127,7 +119,7 @@ func (l *destinationRuleLister) Get(namespace, name string) (*v1alpha3.Destinati if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: DestinationRuleGroupVersionKind.Group, - Resource: "destinationRule", + Resource: DestinationRuleGroupVersionResource.Resource, }, key) } return obj.(*v1alpha3.DestinationRule), nil @@ -207,29 +199,16 @@ func (c destinationRuleFactory) Object() runtime.Object { } func (c destinationRuleFactory) List() runtime.Object { - return &DestinationRuleList{} + return &v1alpha3.DestinationRuleList{} } func (s *destinationRuleClient) Controller() DestinationRuleController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.destinationRuleControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(DestinationRuleGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(DestinationRuleGroupVersionResource, DestinationRuleGroupVersionKind.Kind, true)) - c = &destinationRuleController{ + return &destinationRuleController{ GenericController: genericController, } - - s.client.destinationRuleControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type destinationRuleClient struct { @@ -263,6 +242,11 @@ func (s *destinationRuleClient) Update(o *v1alpha3.DestinationRule) (*v1alpha3.D return obj.(*v1alpha3.DestinationRule), err } +func (s *destinationRuleClient) UpdateStatus(o *v1alpha3.DestinationRule) (*v1alpha3.DestinationRule, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1alpha3.DestinationRule), err +} + func (s *destinationRuleClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *destinationRuleClient) DeleteNamespaced(namespace, name string, options return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *destinationRuleClient) List(opts metav1.ListOptions) (*DestinationRuleList, error) { +func (s *destinationRuleClient) List(opts metav1.ListOptions) (*v1alpha3.DestinationRuleList, error) { obj, err := s.objectClient.List(opts) - return obj.(*DestinationRuleList), err + return obj.(*v1alpha3.DestinationRuleList), err } -func (s *destinationRuleClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*DestinationRuleList, error) { +func (s *destinationRuleClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1alpha3.DestinationRuleList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*DestinationRuleList), err + return obj.(*v1alpha3.DestinationRuleList), err } func (s *destinationRuleClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/networking.istio.io/v1alpha3/zz_generated_k8s_client.go b/apis/networking.istio.io/v1alpha3/zz_generated_k8s_client.go index 28b9c26c..fe4225d3 100644 --- a/apis/networking.istio.io/v1alpha3/zz_generated_k8s_client.go +++ b/apis/networking.istio.io/v1alpha3/zz_generated_k8s_client.go @@ -1,74 +1,35 @@ package v1alpha3 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" - "k8s.io/client-go/rest" -) - -type ( - contextKeyType struct{} - contextClientsKeyType struct{} ) type Interface interface { - RESTClient() rest.Interface - controller.Starter - VirtualServicesGetter DestinationRulesGetter } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - virtualServiceControllers map[string]VirtualServiceController - destinationRuleControllers map[string]DestinationRuleController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer - } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) - if err != nil { - return nil, err - } - +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - virtualServiceControllers: map[string]VirtualServiceController{}, - destinationRuleControllers: map[string]DestinationRuleController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type VirtualServicesGetter interface { VirtualServices(namespace string) VirtualServiceInterface } func (c *Client) VirtualServices(namespace string) VirtualServiceInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &VirtualServiceResource, VirtualServiceGroupVersionKind, virtualServiceFactory{}) + sharedClient := c.clientFactory.ForResourceKind(VirtualServiceGroupVersionResource, VirtualServiceGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &VirtualServiceResource, VirtualServiceGroupVersionKind, virtualServiceFactory{}) return &virtualServiceClient{ ns: namespace, client: c, @@ -81,7 +42,8 @@ type DestinationRulesGetter interface { } func (c *Client) DestinationRules(namespace string) DestinationRuleInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &DestinationRuleResource, DestinationRuleGroupVersionKind, destinationRuleFactory{}) + sharedClient := c.clientFactory.ForResourceKind(DestinationRuleGroupVersionResource, DestinationRuleGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &DestinationRuleResource, DestinationRuleGroupVersionKind, destinationRuleFactory{}) return &destinationRuleClient{ ns: namespace, client: c, diff --git a/apis/networking.istio.io/v1alpha3/zz_generated_scheme.go b/apis/networking.istio.io/v1alpha3/zz_generated_scheme.go index acf8eb74..16280116 100644 --- a/apis/networking.istio.io/v1alpha3/zz_generated_scheme.go +++ b/apis/networking.istio.io/v1alpha3/zz_generated_scheme.go @@ -1,8 +1,6 @@ package v1alpha3 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -23,20 +21,3 @@ func Kind(kind string) schema.GroupKind { func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - // TODO this gets cleaned up when the types are fixed - scheme.AddKnownTypes(SchemeGroupVersion, - - &VirtualServiceList{}, - &DestinationRuleList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/apis/networking.istio.io/v1alpha3/zz_generated_virtual_service_controller.go b/apis/networking.istio.io/v1alpha3/zz_generated_virtual_service_controller.go index bb33e2bf..ce829948 100644 --- a/apis/networking.istio.io/v1alpha3/zz_generated_virtual_service_controller.go +++ b/apis/networking.istio.io/v1alpha3/zz_generated_virtual_service_controller.go @@ -50,12 +50,6 @@ func NewVirtualService(namespace, name string, obj v1alpha3.VirtualService) *v1a return &obj } -type VirtualServiceList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1alpha3.VirtualService `json:"items"` -} - type VirtualServiceHandlerFunc func(key string, obj *v1alpha3.VirtualService) (runtime.Object, error) type VirtualServiceChangeHandlerFunc func(obj *v1alpha3.VirtualService) (runtime.Object, error) @@ -75,8 +69,6 @@ type VirtualServiceController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler VirtualServiceHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type VirtualServiceInterface interface { @@ -87,8 +79,8 @@ type VirtualServiceInterface interface { Update(*v1alpha3.VirtualService) (*v1alpha3.VirtualService, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*VirtualServiceList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*VirtualServiceList, error) + List(opts metav1.ListOptions) (*v1alpha3.VirtualServiceList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1alpha3.VirtualServiceList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() VirtualServiceController @@ -127,7 +119,7 @@ func (l *virtualServiceLister) Get(namespace, name string) (*v1alpha3.VirtualSer if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: VirtualServiceGroupVersionKind.Group, - Resource: "virtualService", + Resource: VirtualServiceGroupVersionResource.Resource, }, key) } return obj.(*v1alpha3.VirtualService), nil @@ -207,29 +199,16 @@ func (c virtualServiceFactory) Object() runtime.Object { } func (c virtualServiceFactory) List() runtime.Object { - return &VirtualServiceList{} + return &v1alpha3.VirtualServiceList{} } func (s *virtualServiceClient) Controller() VirtualServiceController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.virtualServiceControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(VirtualServiceGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(VirtualServiceGroupVersionResource, VirtualServiceGroupVersionKind.Kind, true)) - c = &virtualServiceController{ + return &virtualServiceController{ GenericController: genericController, } - - s.client.virtualServiceControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type virtualServiceClient struct { @@ -263,6 +242,11 @@ func (s *virtualServiceClient) Update(o *v1alpha3.VirtualService) (*v1alpha3.Vir return obj.(*v1alpha3.VirtualService), err } +func (s *virtualServiceClient) UpdateStatus(o *v1alpha3.VirtualService) (*v1alpha3.VirtualService, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1alpha3.VirtualService), err +} + func (s *virtualServiceClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *virtualServiceClient) DeleteNamespaced(namespace, name string, options return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *virtualServiceClient) List(opts metav1.ListOptions) (*VirtualServiceList, error) { +func (s *virtualServiceClient) List(opts metav1.ListOptions) (*v1alpha3.VirtualServiceList, error) { obj, err := s.objectClient.List(opts) - return obj.(*VirtualServiceList), err + return obj.(*v1alpha3.VirtualServiceList), err } -func (s *virtualServiceClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*VirtualServiceList, error) { +func (s *virtualServiceClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1alpha3.VirtualServiceList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*VirtualServiceList), err + return obj.(*v1alpha3.VirtualServiceList), err } func (s *virtualServiceClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/networking.k8s.io/v1/fakes/zz_generated_network_policy_mock.go b/apis/networking.k8s.io/v1/fakes/zz_generated_network_policy_mock.go index de46c20e..0b830aeb 100644 --- a/apis/networking.k8s.io/v1/fakes/zz_generated_network_policy_mock.go +++ b/apis/networking.k8s.io/v1/fakes/zz_generated_network_policy_mock.go @@ -151,8 +151,6 @@ var ( lockNetworkPolicyControllerMockGeneric sync.RWMutex lockNetworkPolicyControllerMockInformer sync.RWMutex lockNetworkPolicyControllerMockLister sync.RWMutex - lockNetworkPolicyControllerMockStart sync.RWMutex - lockNetworkPolicyControllerMockSync sync.RWMutex ) // Ensure, that NetworkPolicyControllerMock does implement NetworkPolicyController. @@ -192,12 +190,6 @@ var _ v1a.NetworkPolicyController = &NetworkPolicyControllerMock{} // ListerFunc: func() v1a.NetworkPolicyLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedNetworkPolicyController in code that requires NetworkPolicyController @@ -232,12 +224,6 @@ type NetworkPolicyControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.NetworkPolicyLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type NetworkPolicyControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *NetworkPolicyControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *NetworkPolicyControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("NetworkPolicyControllerMock.StartFunc: method is nil but NetworkPolicyController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockNetworkPolicyControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockNetworkPolicyControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedNetworkPolicyController.StartCalls()) -func (mock *NetworkPolicyControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockNetworkPolicyControllerMockStart.RLock() - calls = mock.calls.Start - lockNetworkPolicyControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *NetworkPolicyControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("NetworkPolicyControllerMock.SyncFunc: method is nil but NetworkPolicyController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockNetworkPolicyControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockNetworkPolicyControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedNetworkPolicyController.SyncCalls()) -func (mock *NetworkPolicyControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockNetworkPolicyControllerMockSync.RLock() - calls = mock.calls.Sync - lockNetworkPolicyControllerMockSync.RUnlock() - return calls -} - var ( lockNetworkPolicyInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockNetworkPolicyInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.NetworkPolicyInterface = &NetworkPolicyInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.NetworkPolicy, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.NetworkPolicyList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.NetworkPolicyList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.NetworkPolicyList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.NetworkPolicyList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type NetworkPolicyInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.NetworkPolicy, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.NetworkPolicyList, error) + ListFunc func(opts v1b.ListOptions) (*v1.NetworkPolicyList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.NetworkPolicyList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.NetworkPolicyList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *NetworkPolicyInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *NetworkPolicyInterfaceMock) List(opts v1b.ListOptions) (*v1a.NetworkPolicyList, error) { +func (mock *NetworkPolicyInterfaceMock) List(opts v1b.ListOptions) (*v1.NetworkPolicyList, error) { if mock.ListFunc == nil { panic("NetworkPolicyInterfaceMock.ListFunc: method is nil but NetworkPolicyInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *NetworkPolicyInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *NetworkPolicyInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.NetworkPolicyList, error) { +func (mock *NetworkPolicyInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.NetworkPolicyList, error) { if mock.ListNamespacedFunc == nil { panic("NetworkPolicyInterfaceMock.ListNamespacedFunc: method is nil but NetworkPolicyInterface.ListNamespaced was just called") } diff --git a/apis/networking.k8s.io/v1/zz_generated_deepcopy.go b/apis/networking.k8s.io/v1/zz_generated_deepcopy.go deleted file mode 100644 index e3e23428..00000000 --- a/apis/networking.k8s.io/v1/zz_generated_deepcopy.go +++ /dev/null @@ -1,39 +0,0 @@ -package v1 - -import ( - networkingv1 "k8s.io/api/networking/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *NetworkPolicyList) DeepCopyInto(out *NetworkPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]networkingv1.NetworkPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NetworkPolicyList. -func (in *NetworkPolicyList) DeepCopy() *NetworkPolicyList { - if in == nil { - return nil - } - out := new(NetworkPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *NetworkPolicyList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/apis/networking.k8s.io/v1/zz_generated_k8s_client.go b/apis/networking.k8s.io/v1/zz_generated_k8s_client.go index 590b48dd..3ec5c212 100644 --- a/apis/networking.k8s.io/v1/zz_generated_k8s_client.go +++ b/apis/networking.k8s.io/v1/zz_generated_k8s_client.go @@ -1,71 +1,34 @@ package v1 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" - "k8s.io/client-go/rest" -) - -type ( - contextKeyType struct{} - contextClientsKeyType struct{} ) type Interface interface { - RESTClient() rest.Interface - controller.Starter - NetworkPoliciesGetter } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - networkPolicyControllers map[string]NetworkPolicyController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer - } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) - if err != nil { - return nil, err - } - +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - networkPolicyControllers: map[string]NetworkPolicyController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type NetworkPoliciesGetter interface { NetworkPolicies(namespace string) NetworkPolicyInterface } func (c *Client) NetworkPolicies(namespace string) NetworkPolicyInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NetworkPolicyResource, NetworkPolicyGroupVersionKind, networkPolicyFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NetworkPolicyGroupVersionResource, NetworkPolicyGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NetworkPolicyResource, NetworkPolicyGroupVersionKind, networkPolicyFactory{}) return &networkPolicyClient{ ns: namespace, client: c, diff --git a/apis/networking.k8s.io/v1/zz_generated_network_policy_controller.go b/apis/networking.k8s.io/v1/zz_generated_network_policy_controller.go index ecee3262..51f50c7e 100644 --- a/apis/networking.k8s.io/v1/zz_generated_network_policy_controller.go +++ b/apis/networking.k8s.io/v1/zz_generated_network_policy_controller.go @@ -50,12 +50,6 @@ func NewNetworkPolicy(namespace, name string, obj v1.NetworkPolicy) *v1.NetworkP return &obj } -type NetworkPolicyList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.NetworkPolicy `json:"items"` -} - type NetworkPolicyHandlerFunc func(key string, obj *v1.NetworkPolicy) (runtime.Object, error) type NetworkPolicyChangeHandlerFunc func(obj *v1.NetworkPolicy) (runtime.Object, error) @@ -75,8 +69,6 @@ type NetworkPolicyController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NetworkPolicyHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NetworkPolicyInterface interface { @@ -87,8 +79,8 @@ type NetworkPolicyInterface interface { Update(*v1.NetworkPolicy) (*v1.NetworkPolicy, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*NetworkPolicyList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*NetworkPolicyList, error) + List(opts metav1.ListOptions) (*v1.NetworkPolicyList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.NetworkPolicyList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() NetworkPolicyController @@ -127,7 +119,7 @@ func (l *networkPolicyLister) Get(namespace, name string) (*v1.NetworkPolicy, er if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NetworkPolicyGroupVersionKind.Group, - Resource: "networkPolicy", + Resource: NetworkPolicyGroupVersionResource.Resource, }, key) } return obj.(*v1.NetworkPolicy), nil @@ -207,29 +199,16 @@ func (c networkPolicyFactory) Object() runtime.Object { } func (c networkPolicyFactory) List() runtime.Object { - return &NetworkPolicyList{} + return &v1.NetworkPolicyList{} } func (s *networkPolicyClient) Controller() NetworkPolicyController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.networkPolicyControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NetworkPolicyGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NetworkPolicyGroupVersionResource, NetworkPolicyGroupVersionKind.Kind, true)) - c = &networkPolicyController{ + return &networkPolicyController{ GenericController: genericController, } - - s.client.networkPolicyControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type networkPolicyClient struct { @@ -263,6 +242,11 @@ func (s *networkPolicyClient) Update(o *v1.NetworkPolicy) (*v1.NetworkPolicy, er return obj.(*v1.NetworkPolicy), err } +func (s *networkPolicyClient) UpdateStatus(o *v1.NetworkPolicy) (*v1.NetworkPolicy, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.NetworkPolicy), err +} + func (s *networkPolicyClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *networkPolicyClient) DeleteNamespaced(namespace, name string, options * return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *networkPolicyClient) List(opts metav1.ListOptions) (*NetworkPolicyList, error) { +func (s *networkPolicyClient) List(opts metav1.ListOptions) (*v1.NetworkPolicyList, error) { obj, err := s.objectClient.List(opts) - return obj.(*NetworkPolicyList), err + return obj.(*v1.NetworkPolicyList), err } -func (s *networkPolicyClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*NetworkPolicyList, error) { +func (s *networkPolicyClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.NetworkPolicyList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*NetworkPolicyList), err + return obj.(*v1.NetworkPolicyList), err } func (s *networkPolicyClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/networking.k8s.io/v1/zz_generated_scheme.go b/apis/networking.k8s.io/v1/zz_generated_scheme.go index 108333ea..5d7413c5 100644 --- a/apis/networking.k8s.io/v1/zz_generated_scheme.go +++ b/apis/networking.k8s.io/v1/zz_generated_scheme.go @@ -1,8 +1,6 @@ package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -23,19 +21,3 @@ func Kind(kind string) schema.GroupKind { func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - // TODO this gets cleaned up when the types are fixed - scheme.AddKnownTypes(SchemeGroupVersion, - - &NetworkPolicyList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/apis/policy/v1beta1/fakes/zz_generated_pod_security_policy_mock.go b/apis/policy/v1beta1/fakes/zz_generated_pod_security_policy_mock.go index eeef8daa..105b725f 100644 --- a/apis/policy/v1beta1/fakes/zz_generated_pod_security_policy_mock.go +++ b/apis/policy/v1beta1/fakes/zz_generated_pod_security_policy_mock.go @@ -151,8 +151,6 @@ var ( lockPodSecurityPolicyControllerMockGeneric sync.RWMutex lockPodSecurityPolicyControllerMockInformer sync.RWMutex lockPodSecurityPolicyControllerMockLister sync.RWMutex - lockPodSecurityPolicyControllerMockStart sync.RWMutex - lockPodSecurityPolicyControllerMockSync sync.RWMutex ) // Ensure, that PodSecurityPolicyControllerMock does implement PodSecurityPolicyController. @@ -192,12 +190,6 @@ var _ v1beta1a.PodSecurityPolicyController = &PodSecurityPolicyControllerMock{} // ListerFunc: func() v1beta1a.PodSecurityPolicyLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedPodSecurityPolicyController in code that requires PodSecurityPolicyController @@ -232,12 +224,6 @@ type PodSecurityPolicyControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1beta1a.PodSecurityPolicyLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type PodSecurityPolicyControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *PodSecurityPolicyControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *PodSecurityPolicyControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("PodSecurityPolicyControllerMock.StartFunc: method is nil but PodSecurityPolicyController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockPodSecurityPolicyControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockPodSecurityPolicyControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedPodSecurityPolicyController.StartCalls()) -func (mock *PodSecurityPolicyControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockPodSecurityPolicyControllerMockStart.RLock() - calls = mock.calls.Start - lockPodSecurityPolicyControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *PodSecurityPolicyControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("PodSecurityPolicyControllerMock.SyncFunc: method is nil but PodSecurityPolicyController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockPodSecurityPolicyControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockPodSecurityPolicyControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedPodSecurityPolicyController.SyncCalls()) -func (mock *PodSecurityPolicyControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockPodSecurityPolicyControllerMockSync.RLock() - calls = mock.calls.Sync - lockPodSecurityPolicyControllerMockSync.RUnlock() - return calls -} - var ( lockPodSecurityPolicyInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockPodSecurityPolicyInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1beta1a.PodSecurityPolicyInterface = &PodSecurityPolicyInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1.ListOptions) (*v1beta1a.PodSecurityPolicyList, error) { +// ListFunc: func(opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v1beta1a.PodSecurityPolicyList, error) { +// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type PodSecurityPolicyInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v1beta1.PodSecurityPolicy, error) // ListFunc mocks the List method. - ListFunc func(opts v1.ListOptions) (*v1beta1a.PodSecurityPolicyList, error) + ListFunc func(opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1beta1a.PodSecurityPolicyList, error) + ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *PodSecurityPolicyInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *PodSecurityPolicyInterfaceMock) List(opts v1.ListOptions) (*v1beta1a.PodSecurityPolicyList, error) { +func (mock *PodSecurityPolicyInterfaceMock) List(opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) { if mock.ListFunc == nil { panic("PodSecurityPolicyInterfaceMock.ListFunc: method is nil but PodSecurityPolicyInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *PodSecurityPolicyInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *PodSecurityPolicyInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1beta1a.PodSecurityPolicyList, error) { +func (mock *PodSecurityPolicyInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) { if mock.ListNamespacedFunc == nil { panic("PodSecurityPolicyInterfaceMock.ListNamespacedFunc: method is nil but PodSecurityPolicyInterface.ListNamespaced was just called") } diff --git a/apis/policy/v1beta1/zz_generated_deepcopy.go b/apis/policy/v1beta1/zz_generated_deepcopy.go deleted file mode 100644 index 04e5b2c2..00000000 --- a/apis/policy/v1beta1/zz_generated_deepcopy.go +++ /dev/null @@ -1,39 +0,0 @@ -package v1beta1 - -import ( - policyv1beta1 "k8s.io/api/policy/v1beta1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *PodSecurityPolicyList) DeepCopyInto(out *PodSecurityPolicyList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]policyv1beta1.PodSecurityPolicy, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PodSecurityPolicyList. -func (in *PodSecurityPolicyList) DeepCopy() *PodSecurityPolicyList { - if in == nil { - return nil - } - out := new(PodSecurityPolicyList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *PodSecurityPolicyList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/apis/policy/v1beta1/zz_generated_k8s_client.go b/apis/policy/v1beta1/zz_generated_k8s_client.go index 917d5f50..25f8267d 100644 --- a/apis/policy/v1beta1/zz_generated_k8s_client.go +++ b/apis/policy/v1beta1/zz_generated_k8s_client.go @@ -1,71 +1,34 @@ package v1beta1 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" - "k8s.io/client-go/rest" -) - -type ( - contextKeyType struct{} - contextClientsKeyType struct{} ) type Interface interface { - RESTClient() rest.Interface - controller.Starter - PodSecurityPoliciesGetter } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - podSecurityPolicyControllers map[string]PodSecurityPolicyController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer - } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) - if err != nil { - return nil, err - } - +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - podSecurityPolicyControllers: map[string]PodSecurityPolicyController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type PodSecurityPoliciesGetter interface { PodSecurityPolicies(namespace string) PodSecurityPolicyInterface } func (c *Client) PodSecurityPolicies(namespace string) PodSecurityPolicyInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PodSecurityPolicyResource, PodSecurityPolicyGroupVersionKind, podSecurityPolicyFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PodSecurityPolicyGroupVersionResource, PodSecurityPolicyGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PodSecurityPolicyResource, PodSecurityPolicyGroupVersionKind, podSecurityPolicyFactory{}) return &podSecurityPolicyClient{ ns: namespace, client: c, diff --git a/apis/policy/v1beta1/zz_generated_pod_security_policy_controller.go b/apis/policy/v1beta1/zz_generated_pod_security_policy_controller.go index 911259b0..a65e79ef 100644 --- a/apis/policy/v1beta1/zz_generated_pod_security_policy_controller.go +++ b/apis/policy/v1beta1/zz_generated_pod_security_policy_controller.go @@ -49,12 +49,6 @@ func NewPodSecurityPolicy(namespace, name string, obj v1beta1.PodSecurityPolicy) return &obj } -type PodSecurityPolicyList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1beta1.PodSecurityPolicy `json:"items"` -} - type PodSecurityPolicyHandlerFunc func(key string, obj *v1beta1.PodSecurityPolicy) (runtime.Object, error) type PodSecurityPolicyChangeHandlerFunc func(obj *v1beta1.PodSecurityPolicy) (runtime.Object, error) @@ -74,8 +68,6 @@ type PodSecurityPolicyController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PodSecurityPolicyHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PodSecurityPolicyInterface interface { @@ -86,8 +78,8 @@ type PodSecurityPolicyInterface interface { Update(*v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*PodSecurityPolicyList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*PodSecurityPolicyList, error) + List(opts metav1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() PodSecurityPolicyController @@ -126,7 +118,7 @@ func (l *podSecurityPolicyLister) Get(namespace, name string) (*v1beta1.PodSecur if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PodSecurityPolicyGroupVersionKind.Group, - Resource: "podSecurityPolicy", + Resource: PodSecurityPolicyGroupVersionResource.Resource, }, key) } return obj.(*v1beta1.PodSecurityPolicy), nil @@ -206,29 +198,16 @@ func (c podSecurityPolicyFactory) Object() runtime.Object { } func (c podSecurityPolicyFactory) List() runtime.Object { - return &PodSecurityPolicyList{} + return &v1beta1.PodSecurityPolicyList{} } func (s *podSecurityPolicyClient) Controller() PodSecurityPolicyController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.podSecurityPolicyControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PodSecurityPolicyGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PodSecurityPolicyGroupVersionResource, PodSecurityPolicyGroupVersionKind.Kind, false)) - c = &podSecurityPolicyController{ + return &podSecurityPolicyController{ GenericController: genericController, } - - s.client.podSecurityPolicyControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type podSecurityPolicyClient struct { @@ -262,6 +241,11 @@ func (s *podSecurityPolicyClient) Update(o *v1beta1.PodSecurityPolicy) (*v1beta1 return obj.(*v1beta1.PodSecurityPolicy), err } +func (s *podSecurityPolicyClient) UpdateStatus(o *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1beta1.PodSecurityPolicy), err +} + func (s *podSecurityPolicyClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -270,14 +254,14 @@ func (s *podSecurityPolicyClient) DeleteNamespaced(namespace, name string, optio return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *podSecurityPolicyClient) List(opts metav1.ListOptions) (*PodSecurityPolicyList, error) { +func (s *podSecurityPolicyClient) List(opts metav1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) { obj, err := s.objectClient.List(opts) - return obj.(*PodSecurityPolicyList), err + return obj.(*v1beta1.PodSecurityPolicyList), err } -func (s *podSecurityPolicyClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*PodSecurityPolicyList, error) { +func (s *podSecurityPolicyClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1beta1.PodSecurityPolicyList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*PodSecurityPolicyList), err + return obj.(*v1beta1.PodSecurityPolicyList), err } func (s *podSecurityPolicyClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/policy/v1beta1/zz_generated_scheme.go b/apis/policy/v1beta1/zz_generated_scheme.go index be2c7c03..e1385567 100644 --- a/apis/policy/v1beta1/zz_generated_scheme.go +++ b/apis/policy/v1beta1/zz_generated_scheme.go @@ -1,8 +1,6 @@ package v1beta1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -23,19 +21,3 @@ func Kind(kind string) schema.GroupKind { func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - // TODO this gets cleaned up when the types are fixed - scheme.AddKnownTypes(SchemeGroupVersion, - - &PodSecurityPolicyList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_app_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_app_mock.go index 9c4f07d4..bdd34c02 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_app_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_app_mock.go @@ -150,8 +150,6 @@ var ( lockAppControllerMockGeneric sync.RWMutex lockAppControllerMockInformer sync.RWMutex lockAppControllerMockLister sync.RWMutex - lockAppControllerMockStart sync.RWMutex - lockAppControllerMockSync sync.RWMutex ) // Ensure, that AppControllerMock does implement AppController. @@ -191,12 +189,6 @@ var _ v3.AppController = &AppControllerMock{} // ListerFunc: func() v3.AppLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedAppController in code that requires AppController @@ -231,12 +223,6 @@ type AppControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.AppLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type AppControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *AppControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *AppControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("AppControllerMock.StartFunc: method is nil but AppController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockAppControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockAppControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedAppController.StartCalls()) -func (mock *AppControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockAppControllerMockStart.RLock() - calls = mock.calls.Start - lockAppControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *AppControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("AppControllerMock.SyncFunc: method is nil but AppController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockAppControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockAppControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedAppController.SyncCalls()) -func (mock *AppControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockAppControllerMockSync.RLock() - calls = mock.calls.Sync - lockAppControllerMockSync.RUnlock() - return calls -} - var ( lockAppInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockAppInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_app_revision_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_app_revision_mock.go index 6e00a56c..5f894fd2 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_app_revision_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_app_revision_mock.go @@ -150,8 +150,6 @@ var ( lockAppRevisionControllerMockGeneric sync.RWMutex lockAppRevisionControllerMockInformer sync.RWMutex lockAppRevisionControllerMockLister sync.RWMutex - lockAppRevisionControllerMockStart sync.RWMutex - lockAppRevisionControllerMockSync sync.RWMutex ) // Ensure, that AppRevisionControllerMock does implement AppRevisionController. @@ -191,12 +189,6 @@ var _ v3.AppRevisionController = &AppRevisionControllerMock{} // ListerFunc: func() v3.AppRevisionLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedAppRevisionController in code that requires AppRevisionController @@ -231,12 +223,6 @@ type AppRevisionControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.AppRevisionLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type AppRevisionControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *AppRevisionControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *AppRevisionControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("AppRevisionControllerMock.StartFunc: method is nil but AppRevisionController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockAppRevisionControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockAppRevisionControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedAppRevisionController.StartCalls()) -func (mock *AppRevisionControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockAppRevisionControllerMockStart.RLock() - calls = mock.calls.Start - lockAppRevisionControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *AppRevisionControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("AppRevisionControllerMock.SyncFunc: method is nil but AppRevisionController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockAppRevisionControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockAppRevisionControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedAppRevisionController.SyncCalls()) -func (mock *AppRevisionControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockAppRevisionControllerMockSync.RLock() - calls = mock.calls.Sync - lockAppRevisionControllerMockSync.RUnlock() - return calls -} - var ( lockAppRevisionInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockAppRevisionInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_basic_auth_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_basic_auth_mock.go index 9ab89702..b18d2f47 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_basic_auth_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_basic_auth_mock.go @@ -150,8 +150,6 @@ var ( lockBasicAuthControllerMockGeneric sync.RWMutex lockBasicAuthControllerMockInformer sync.RWMutex lockBasicAuthControllerMockLister sync.RWMutex - lockBasicAuthControllerMockStart sync.RWMutex - lockBasicAuthControllerMockSync sync.RWMutex ) // Ensure, that BasicAuthControllerMock does implement BasicAuthController. @@ -191,12 +189,6 @@ var _ v3.BasicAuthController = &BasicAuthControllerMock{} // ListerFunc: func() v3.BasicAuthLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedBasicAuthController in code that requires BasicAuthController @@ -231,12 +223,6 @@ type BasicAuthControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.BasicAuthLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type BasicAuthControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *BasicAuthControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *BasicAuthControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("BasicAuthControllerMock.StartFunc: method is nil but BasicAuthController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockBasicAuthControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockBasicAuthControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedBasicAuthController.StartCalls()) -func (mock *BasicAuthControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockBasicAuthControllerMockStart.RLock() - calls = mock.calls.Start - lockBasicAuthControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *BasicAuthControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("BasicAuthControllerMock.SyncFunc: method is nil but BasicAuthController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockBasicAuthControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockBasicAuthControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedBasicAuthController.SyncCalls()) -func (mock *BasicAuthControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockBasicAuthControllerMockSync.RLock() - calls = mock.calls.Sync - lockBasicAuthControllerMockSync.RUnlock() - return calls -} - var ( lockBasicAuthInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockBasicAuthInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_certificate_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_certificate_mock.go index 9c405235..48ca5de1 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_certificate_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_certificate_mock.go @@ -150,8 +150,6 @@ var ( lockCertificateControllerMockGeneric sync.RWMutex lockCertificateControllerMockInformer sync.RWMutex lockCertificateControllerMockLister sync.RWMutex - lockCertificateControllerMockStart sync.RWMutex - lockCertificateControllerMockSync sync.RWMutex ) // Ensure, that CertificateControllerMock does implement CertificateController. @@ -191,12 +189,6 @@ var _ v3.CertificateController = &CertificateControllerMock{} // ListerFunc: func() v3.CertificateLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedCertificateController in code that requires CertificateController @@ -231,12 +223,6 @@ type CertificateControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.CertificateLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type CertificateControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *CertificateControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *CertificateControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("CertificateControllerMock.StartFunc: method is nil but CertificateController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockCertificateControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockCertificateControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedCertificateController.StartCalls()) -func (mock *CertificateControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockCertificateControllerMockStart.RLock() - calls = mock.calls.Start - lockCertificateControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *CertificateControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("CertificateControllerMock.SyncFunc: method is nil but CertificateController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockCertificateControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockCertificateControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedCertificateController.SyncCalls()) -func (mock *CertificateControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockCertificateControllerMockSync.RLock() - calls = mock.calls.Sync - lockCertificateControllerMockSync.RUnlock() - return calls -} - var ( lockCertificateInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockCertificateInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_docker_credential_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_docker_credential_mock.go index 86a742a9..a639dddd 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_docker_credential_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_docker_credential_mock.go @@ -150,8 +150,6 @@ var ( lockDockerCredentialControllerMockGeneric sync.RWMutex lockDockerCredentialControllerMockInformer sync.RWMutex lockDockerCredentialControllerMockLister sync.RWMutex - lockDockerCredentialControllerMockStart sync.RWMutex - lockDockerCredentialControllerMockSync sync.RWMutex ) // Ensure, that DockerCredentialControllerMock does implement DockerCredentialController. @@ -191,12 +189,6 @@ var _ v3.DockerCredentialController = &DockerCredentialControllerMock{} // ListerFunc: func() v3.DockerCredentialLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedDockerCredentialController in code that requires DockerCredentialController @@ -231,12 +223,6 @@ type DockerCredentialControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.DockerCredentialLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type DockerCredentialControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *DockerCredentialControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *DockerCredentialControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("DockerCredentialControllerMock.StartFunc: method is nil but DockerCredentialController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockDockerCredentialControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockDockerCredentialControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedDockerCredentialController.StartCalls()) -func (mock *DockerCredentialControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockDockerCredentialControllerMockStart.RLock() - calls = mock.calls.Start - lockDockerCredentialControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *DockerCredentialControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("DockerCredentialControllerMock.SyncFunc: method is nil but DockerCredentialController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockDockerCredentialControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockDockerCredentialControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedDockerCredentialController.SyncCalls()) -func (mock *DockerCredentialControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockDockerCredentialControllerMockSync.RLock() - calls = mock.calls.Sync - lockDockerCredentialControllerMockSync.RUnlock() - return calls -} - var ( lockDockerCredentialInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockDockerCredentialInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_basic_auth_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_basic_auth_mock.go index 92e71573..4465dd14 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_basic_auth_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_basic_auth_mock.go @@ -150,8 +150,6 @@ var ( lockNamespacedBasicAuthControllerMockGeneric sync.RWMutex lockNamespacedBasicAuthControllerMockInformer sync.RWMutex lockNamespacedBasicAuthControllerMockLister sync.RWMutex - lockNamespacedBasicAuthControllerMockStart sync.RWMutex - lockNamespacedBasicAuthControllerMockSync sync.RWMutex ) // Ensure, that NamespacedBasicAuthControllerMock does implement NamespacedBasicAuthController. @@ -191,12 +189,6 @@ var _ v3.NamespacedBasicAuthController = &NamespacedBasicAuthControllerMock{} // ListerFunc: func() v3.NamespacedBasicAuthLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedNamespacedBasicAuthController in code that requires NamespacedBasicAuthController @@ -231,12 +223,6 @@ type NamespacedBasicAuthControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.NamespacedBasicAuthLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type NamespacedBasicAuthControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *NamespacedBasicAuthControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *NamespacedBasicAuthControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("NamespacedBasicAuthControllerMock.StartFunc: method is nil but NamespacedBasicAuthController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockNamespacedBasicAuthControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockNamespacedBasicAuthControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedNamespacedBasicAuthController.StartCalls()) -func (mock *NamespacedBasicAuthControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockNamespacedBasicAuthControllerMockStart.RLock() - calls = mock.calls.Start - lockNamespacedBasicAuthControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *NamespacedBasicAuthControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("NamespacedBasicAuthControllerMock.SyncFunc: method is nil but NamespacedBasicAuthController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockNamespacedBasicAuthControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockNamespacedBasicAuthControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedNamespacedBasicAuthController.SyncCalls()) -func (mock *NamespacedBasicAuthControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockNamespacedBasicAuthControllerMockSync.RLock() - calls = mock.calls.Sync - lockNamespacedBasicAuthControllerMockSync.RUnlock() - return calls -} - var ( lockNamespacedBasicAuthInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockNamespacedBasicAuthInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_certificate_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_certificate_mock.go index 1f8a9023..7d41876f 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_certificate_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_certificate_mock.go @@ -150,8 +150,6 @@ var ( lockNamespacedCertificateControllerMockGeneric sync.RWMutex lockNamespacedCertificateControllerMockInformer sync.RWMutex lockNamespacedCertificateControllerMockLister sync.RWMutex - lockNamespacedCertificateControllerMockStart sync.RWMutex - lockNamespacedCertificateControllerMockSync sync.RWMutex ) // Ensure, that NamespacedCertificateControllerMock does implement NamespacedCertificateController. @@ -191,12 +189,6 @@ var _ v3.NamespacedCertificateController = &NamespacedCertificateControllerMock{ // ListerFunc: func() v3.NamespacedCertificateLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedNamespacedCertificateController in code that requires NamespacedCertificateController @@ -231,12 +223,6 @@ type NamespacedCertificateControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.NamespacedCertificateLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type NamespacedCertificateControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *NamespacedCertificateControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *NamespacedCertificateControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("NamespacedCertificateControllerMock.StartFunc: method is nil but NamespacedCertificateController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockNamespacedCertificateControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockNamespacedCertificateControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedNamespacedCertificateController.StartCalls()) -func (mock *NamespacedCertificateControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockNamespacedCertificateControllerMockStart.RLock() - calls = mock.calls.Start - lockNamespacedCertificateControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *NamespacedCertificateControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("NamespacedCertificateControllerMock.SyncFunc: method is nil but NamespacedCertificateController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockNamespacedCertificateControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockNamespacedCertificateControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedNamespacedCertificateController.SyncCalls()) -func (mock *NamespacedCertificateControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockNamespacedCertificateControllerMockSync.RLock() - calls = mock.calls.Sync - lockNamespacedCertificateControllerMockSync.RUnlock() - return calls -} - var ( lockNamespacedCertificateInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockNamespacedCertificateInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_docker_credential_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_docker_credential_mock.go index bbe2337e..d7dd26e6 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_docker_credential_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_docker_credential_mock.go @@ -150,8 +150,6 @@ var ( lockNamespacedDockerCredentialControllerMockGeneric sync.RWMutex lockNamespacedDockerCredentialControllerMockInformer sync.RWMutex lockNamespacedDockerCredentialControllerMockLister sync.RWMutex - lockNamespacedDockerCredentialControllerMockStart sync.RWMutex - lockNamespacedDockerCredentialControllerMockSync sync.RWMutex ) // Ensure, that NamespacedDockerCredentialControllerMock does implement NamespacedDockerCredentialController. @@ -191,12 +189,6 @@ var _ v3.NamespacedDockerCredentialController = &NamespacedDockerCredentialContr // ListerFunc: func() v3.NamespacedDockerCredentialLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedNamespacedDockerCredentialController in code that requires NamespacedDockerCredentialController @@ -231,12 +223,6 @@ type NamespacedDockerCredentialControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.NamespacedDockerCredentialLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type NamespacedDockerCredentialControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *NamespacedDockerCredentialControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *NamespacedDockerCredentialControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("NamespacedDockerCredentialControllerMock.StartFunc: method is nil but NamespacedDockerCredentialController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockNamespacedDockerCredentialControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockNamespacedDockerCredentialControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedNamespacedDockerCredentialController.StartCalls()) -func (mock *NamespacedDockerCredentialControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockNamespacedDockerCredentialControllerMockStart.RLock() - calls = mock.calls.Start - lockNamespacedDockerCredentialControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *NamespacedDockerCredentialControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("NamespacedDockerCredentialControllerMock.SyncFunc: method is nil but NamespacedDockerCredentialController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockNamespacedDockerCredentialControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockNamespacedDockerCredentialControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedNamespacedDockerCredentialController.SyncCalls()) -func (mock *NamespacedDockerCredentialControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockNamespacedDockerCredentialControllerMockSync.RLock() - calls = mock.calls.Sync - lockNamespacedDockerCredentialControllerMockSync.RUnlock() - return calls -} - var ( lockNamespacedDockerCredentialInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockNamespacedDockerCredentialInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_service_account_token_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_service_account_token_mock.go index ecbc775b..9ecd917a 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_service_account_token_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_service_account_token_mock.go @@ -150,8 +150,6 @@ var ( lockNamespacedServiceAccountTokenControllerMockGeneric sync.RWMutex lockNamespacedServiceAccountTokenControllerMockInformer sync.RWMutex lockNamespacedServiceAccountTokenControllerMockLister sync.RWMutex - lockNamespacedServiceAccountTokenControllerMockStart sync.RWMutex - lockNamespacedServiceAccountTokenControllerMockSync sync.RWMutex ) // Ensure, that NamespacedServiceAccountTokenControllerMock does implement NamespacedServiceAccountTokenController. @@ -191,12 +189,6 @@ var _ v3.NamespacedServiceAccountTokenController = &NamespacedServiceAccountToke // ListerFunc: func() v3.NamespacedServiceAccountTokenLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedNamespacedServiceAccountTokenController in code that requires NamespacedServiceAccountTokenController @@ -231,12 +223,6 @@ type NamespacedServiceAccountTokenControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.NamespacedServiceAccountTokenLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type NamespacedServiceAccountTokenControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *NamespacedServiceAccountTokenControllerMock) ListerCalls() []struct return calls } -// Start calls StartFunc. -func (mock *NamespacedServiceAccountTokenControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("NamespacedServiceAccountTokenControllerMock.StartFunc: method is nil but NamespacedServiceAccountTokenController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockNamespacedServiceAccountTokenControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockNamespacedServiceAccountTokenControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedNamespacedServiceAccountTokenController.StartCalls()) -func (mock *NamespacedServiceAccountTokenControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockNamespacedServiceAccountTokenControllerMockStart.RLock() - calls = mock.calls.Start - lockNamespacedServiceAccountTokenControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *NamespacedServiceAccountTokenControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("NamespacedServiceAccountTokenControllerMock.SyncFunc: method is nil but NamespacedServiceAccountTokenController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockNamespacedServiceAccountTokenControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockNamespacedServiceAccountTokenControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedNamespacedServiceAccountTokenController.SyncCalls()) -func (mock *NamespacedServiceAccountTokenControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockNamespacedServiceAccountTokenControllerMockSync.RLock() - calls = mock.calls.Sync - lockNamespacedServiceAccountTokenControllerMockSync.RUnlock() - return calls -} - var ( lockNamespacedServiceAccountTokenInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockNamespacedServiceAccountTokenInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_ssh_auth_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_ssh_auth_mock.go index 2bd2f583..71c4072c 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_ssh_auth_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_namespaced_ssh_auth_mock.go @@ -150,8 +150,6 @@ var ( lockNamespacedSSHAuthControllerMockGeneric sync.RWMutex lockNamespacedSSHAuthControllerMockInformer sync.RWMutex lockNamespacedSSHAuthControllerMockLister sync.RWMutex - lockNamespacedSSHAuthControllerMockStart sync.RWMutex - lockNamespacedSSHAuthControllerMockSync sync.RWMutex ) // Ensure, that NamespacedSSHAuthControllerMock does implement NamespacedSSHAuthController. @@ -191,12 +189,6 @@ var _ v3.NamespacedSSHAuthController = &NamespacedSSHAuthControllerMock{} // ListerFunc: func() v3.NamespacedSSHAuthLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedNamespacedSSHAuthController in code that requires NamespacedSSHAuthController @@ -231,12 +223,6 @@ type NamespacedSSHAuthControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.NamespacedSSHAuthLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type NamespacedSSHAuthControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *NamespacedSSHAuthControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *NamespacedSSHAuthControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("NamespacedSSHAuthControllerMock.StartFunc: method is nil but NamespacedSSHAuthController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockNamespacedSSHAuthControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockNamespacedSSHAuthControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedNamespacedSSHAuthController.StartCalls()) -func (mock *NamespacedSSHAuthControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockNamespacedSSHAuthControllerMockStart.RLock() - calls = mock.calls.Start - lockNamespacedSSHAuthControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *NamespacedSSHAuthControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("NamespacedSSHAuthControllerMock.SyncFunc: method is nil but NamespacedSSHAuthController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockNamespacedSSHAuthControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockNamespacedSSHAuthControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedNamespacedSSHAuthController.SyncCalls()) -func (mock *NamespacedSSHAuthControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockNamespacedSSHAuthControllerMockSync.RLock() - calls = mock.calls.Sync - lockNamespacedSSHAuthControllerMockSync.RUnlock() - return calls -} - var ( lockNamespacedSSHAuthInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockNamespacedSSHAuthInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_execution_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_execution_mock.go index 2672b4fc..bccf9ed7 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_execution_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_execution_mock.go @@ -150,8 +150,6 @@ var ( lockPipelineExecutionControllerMockGeneric sync.RWMutex lockPipelineExecutionControllerMockInformer sync.RWMutex lockPipelineExecutionControllerMockLister sync.RWMutex - lockPipelineExecutionControllerMockStart sync.RWMutex - lockPipelineExecutionControllerMockSync sync.RWMutex ) // Ensure, that PipelineExecutionControllerMock does implement PipelineExecutionController. @@ -191,12 +189,6 @@ var _ v3.PipelineExecutionController = &PipelineExecutionControllerMock{} // ListerFunc: func() v3.PipelineExecutionLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedPipelineExecutionController in code that requires PipelineExecutionController @@ -231,12 +223,6 @@ type PipelineExecutionControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.PipelineExecutionLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type PipelineExecutionControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *PipelineExecutionControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *PipelineExecutionControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("PipelineExecutionControllerMock.StartFunc: method is nil but PipelineExecutionController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockPipelineExecutionControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockPipelineExecutionControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedPipelineExecutionController.StartCalls()) -func (mock *PipelineExecutionControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockPipelineExecutionControllerMockStart.RLock() - calls = mock.calls.Start - lockPipelineExecutionControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *PipelineExecutionControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("PipelineExecutionControllerMock.SyncFunc: method is nil but PipelineExecutionController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockPipelineExecutionControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockPipelineExecutionControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedPipelineExecutionController.SyncCalls()) -func (mock *PipelineExecutionControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockPipelineExecutionControllerMockSync.RLock() - calls = mock.calls.Sync - lockPipelineExecutionControllerMockSync.RUnlock() - return calls -} - var ( lockPipelineExecutionInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockPipelineExecutionInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_mock.go index ee879925..941aa61e 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_mock.go @@ -150,8 +150,6 @@ var ( lockPipelineControllerMockGeneric sync.RWMutex lockPipelineControllerMockInformer sync.RWMutex lockPipelineControllerMockLister sync.RWMutex - lockPipelineControllerMockStart sync.RWMutex - lockPipelineControllerMockSync sync.RWMutex ) // Ensure, that PipelineControllerMock does implement PipelineController. @@ -191,12 +189,6 @@ var _ v3.PipelineController = &PipelineControllerMock{} // ListerFunc: func() v3.PipelineLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedPipelineController in code that requires PipelineController @@ -231,12 +223,6 @@ type PipelineControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.PipelineLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type PipelineControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *PipelineControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *PipelineControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("PipelineControllerMock.StartFunc: method is nil but PipelineController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockPipelineControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockPipelineControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedPipelineController.StartCalls()) -func (mock *PipelineControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockPipelineControllerMockStart.RLock() - calls = mock.calls.Start - lockPipelineControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *PipelineControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("PipelineControllerMock.SyncFunc: method is nil but PipelineController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockPipelineControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockPipelineControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedPipelineController.SyncCalls()) -func (mock *PipelineControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockPipelineControllerMockSync.RLock() - calls = mock.calls.Sync - lockPipelineControllerMockSync.RUnlock() - return calls -} - var ( lockPipelineInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockPipelineInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_setting_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_setting_mock.go index 650b40b6..2917b6b5 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_setting_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_pipeline_setting_mock.go @@ -150,8 +150,6 @@ var ( lockPipelineSettingControllerMockGeneric sync.RWMutex lockPipelineSettingControllerMockInformer sync.RWMutex lockPipelineSettingControllerMockLister sync.RWMutex - lockPipelineSettingControllerMockStart sync.RWMutex - lockPipelineSettingControllerMockSync sync.RWMutex ) // Ensure, that PipelineSettingControllerMock does implement PipelineSettingController. @@ -191,12 +189,6 @@ var _ v3.PipelineSettingController = &PipelineSettingControllerMock{} // ListerFunc: func() v3.PipelineSettingLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedPipelineSettingController in code that requires PipelineSettingController @@ -231,12 +223,6 @@ type PipelineSettingControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.PipelineSettingLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type PipelineSettingControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *PipelineSettingControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *PipelineSettingControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("PipelineSettingControllerMock.StartFunc: method is nil but PipelineSettingController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockPipelineSettingControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockPipelineSettingControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedPipelineSettingController.StartCalls()) -func (mock *PipelineSettingControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockPipelineSettingControllerMockStart.RLock() - calls = mock.calls.Start - lockPipelineSettingControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *PipelineSettingControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("PipelineSettingControllerMock.SyncFunc: method is nil but PipelineSettingController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockPipelineSettingControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockPipelineSettingControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedPipelineSettingController.SyncCalls()) -func (mock *PipelineSettingControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockPipelineSettingControllerMockSync.RLock() - calls = mock.calls.Sync - lockPipelineSettingControllerMockSync.RUnlock() - return calls -} - var ( lockPipelineSettingInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockPipelineSettingInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_service_account_token_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_service_account_token_mock.go index 3f7e20a4..2181a879 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_service_account_token_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_service_account_token_mock.go @@ -150,8 +150,6 @@ var ( lockServiceAccountTokenControllerMockGeneric sync.RWMutex lockServiceAccountTokenControllerMockInformer sync.RWMutex lockServiceAccountTokenControllerMockLister sync.RWMutex - lockServiceAccountTokenControllerMockStart sync.RWMutex - lockServiceAccountTokenControllerMockSync sync.RWMutex ) // Ensure, that ServiceAccountTokenControllerMock does implement ServiceAccountTokenController. @@ -191,12 +189,6 @@ var _ v3.ServiceAccountTokenController = &ServiceAccountTokenControllerMock{} // ListerFunc: func() v3.ServiceAccountTokenLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedServiceAccountTokenController in code that requires ServiceAccountTokenController @@ -231,12 +223,6 @@ type ServiceAccountTokenControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.ServiceAccountTokenLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type ServiceAccountTokenControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *ServiceAccountTokenControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ServiceAccountTokenControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ServiceAccountTokenControllerMock.StartFunc: method is nil but ServiceAccountTokenController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockServiceAccountTokenControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockServiceAccountTokenControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedServiceAccountTokenController.StartCalls()) -func (mock *ServiceAccountTokenControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockServiceAccountTokenControllerMockStart.RLock() - calls = mock.calls.Start - lockServiceAccountTokenControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ServiceAccountTokenControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ServiceAccountTokenControllerMock.SyncFunc: method is nil but ServiceAccountTokenController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockServiceAccountTokenControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockServiceAccountTokenControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedServiceAccountTokenController.SyncCalls()) -func (mock *ServiceAccountTokenControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockServiceAccountTokenControllerMockSync.RLock() - calls = mock.calls.Sync - lockServiceAccountTokenControllerMockSync.RUnlock() - return calls -} - var ( lockServiceAccountTokenInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockServiceAccountTokenInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_source_code_credential_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_credential_mock.go index a763588f..bdf127e9 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_source_code_credential_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_credential_mock.go @@ -150,8 +150,6 @@ var ( lockSourceCodeCredentialControllerMockGeneric sync.RWMutex lockSourceCodeCredentialControllerMockInformer sync.RWMutex lockSourceCodeCredentialControllerMockLister sync.RWMutex - lockSourceCodeCredentialControllerMockStart sync.RWMutex - lockSourceCodeCredentialControllerMockSync sync.RWMutex ) // Ensure, that SourceCodeCredentialControllerMock does implement SourceCodeCredentialController. @@ -191,12 +189,6 @@ var _ v3.SourceCodeCredentialController = &SourceCodeCredentialControllerMock{} // ListerFunc: func() v3.SourceCodeCredentialLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedSourceCodeCredentialController in code that requires SourceCodeCredentialController @@ -231,12 +223,6 @@ type SourceCodeCredentialControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.SourceCodeCredentialLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type SourceCodeCredentialControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *SourceCodeCredentialControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *SourceCodeCredentialControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("SourceCodeCredentialControllerMock.StartFunc: method is nil but SourceCodeCredentialController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockSourceCodeCredentialControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockSourceCodeCredentialControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedSourceCodeCredentialController.StartCalls()) -func (mock *SourceCodeCredentialControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockSourceCodeCredentialControllerMockStart.RLock() - calls = mock.calls.Start - lockSourceCodeCredentialControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *SourceCodeCredentialControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("SourceCodeCredentialControllerMock.SyncFunc: method is nil but SourceCodeCredentialController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockSourceCodeCredentialControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockSourceCodeCredentialControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedSourceCodeCredentialController.SyncCalls()) -func (mock *SourceCodeCredentialControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockSourceCodeCredentialControllerMockSync.RLock() - calls = mock.calls.Sync - lockSourceCodeCredentialControllerMockSync.RUnlock() - return calls -} - var ( lockSourceCodeCredentialInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockSourceCodeCredentialInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_config_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_config_mock.go index 5c3a4953..852d9ddb 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_config_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_config_mock.go @@ -150,8 +150,6 @@ var ( lockSourceCodeProviderConfigControllerMockGeneric sync.RWMutex lockSourceCodeProviderConfigControllerMockInformer sync.RWMutex lockSourceCodeProviderConfigControllerMockLister sync.RWMutex - lockSourceCodeProviderConfigControllerMockStart sync.RWMutex - lockSourceCodeProviderConfigControllerMockSync sync.RWMutex ) // Ensure, that SourceCodeProviderConfigControllerMock does implement SourceCodeProviderConfigController. @@ -191,12 +189,6 @@ var _ v3.SourceCodeProviderConfigController = &SourceCodeProviderConfigControlle // ListerFunc: func() v3.SourceCodeProviderConfigLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedSourceCodeProviderConfigController in code that requires SourceCodeProviderConfigController @@ -231,12 +223,6 @@ type SourceCodeProviderConfigControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.SourceCodeProviderConfigLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type SourceCodeProviderConfigControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *SourceCodeProviderConfigControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *SourceCodeProviderConfigControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("SourceCodeProviderConfigControllerMock.StartFunc: method is nil but SourceCodeProviderConfigController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockSourceCodeProviderConfigControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockSourceCodeProviderConfigControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedSourceCodeProviderConfigController.StartCalls()) -func (mock *SourceCodeProviderConfigControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockSourceCodeProviderConfigControllerMockStart.RLock() - calls = mock.calls.Start - lockSourceCodeProviderConfigControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *SourceCodeProviderConfigControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("SourceCodeProviderConfigControllerMock.SyncFunc: method is nil but SourceCodeProviderConfigController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockSourceCodeProviderConfigControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockSourceCodeProviderConfigControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedSourceCodeProviderConfigController.SyncCalls()) -func (mock *SourceCodeProviderConfigControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockSourceCodeProviderConfigControllerMockSync.RLock() - calls = mock.calls.Sync - lockSourceCodeProviderConfigControllerMockSync.RUnlock() - return calls -} - var ( lockSourceCodeProviderConfigInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockSourceCodeProviderConfigInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_mock.go index e55258e7..b1107435 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_provider_mock.go @@ -150,8 +150,6 @@ var ( lockSourceCodeProviderControllerMockGeneric sync.RWMutex lockSourceCodeProviderControllerMockInformer sync.RWMutex lockSourceCodeProviderControllerMockLister sync.RWMutex - lockSourceCodeProviderControllerMockStart sync.RWMutex - lockSourceCodeProviderControllerMockSync sync.RWMutex ) // Ensure, that SourceCodeProviderControllerMock does implement SourceCodeProviderController. @@ -191,12 +189,6 @@ var _ v3.SourceCodeProviderController = &SourceCodeProviderControllerMock{} // ListerFunc: func() v3.SourceCodeProviderLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedSourceCodeProviderController in code that requires SourceCodeProviderController @@ -231,12 +223,6 @@ type SourceCodeProviderControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.SourceCodeProviderLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type SourceCodeProviderControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *SourceCodeProviderControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *SourceCodeProviderControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("SourceCodeProviderControllerMock.StartFunc: method is nil but SourceCodeProviderController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockSourceCodeProviderControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockSourceCodeProviderControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedSourceCodeProviderController.StartCalls()) -func (mock *SourceCodeProviderControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockSourceCodeProviderControllerMockStart.RLock() - calls = mock.calls.Start - lockSourceCodeProviderControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *SourceCodeProviderControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("SourceCodeProviderControllerMock.SyncFunc: method is nil but SourceCodeProviderController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockSourceCodeProviderControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockSourceCodeProviderControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedSourceCodeProviderController.SyncCalls()) -func (mock *SourceCodeProviderControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockSourceCodeProviderControllerMockSync.RLock() - calls = mock.calls.Sync - lockSourceCodeProviderControllerMockSync.RUnlock() - return calls -} - var ( lockSourceCodeProviderInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockSourceCodeProviderInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_source_code_repository_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_repository_mock.go index 28046057..b18a2357 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_source_code_repository_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_source_code_repository_mock.go @@ -150,8 +150,6 @@ var ( lockSourceCodeRepositoryControllerMockGeneric sync.RWMutex lockSourceCodeRepositoryControllerMockInformer sync.RWMutex lockSourceCodeRepositoryControllerMockLister sync.RWMutex - lockSourceCodeRepositoryControllerMockStart sync.RWMutex - lockSourceCodeRepositoryControllerMockSync sync.RWMutex ) // Ensure, that SourceCodeRepositoryControllerMock does implement SourceCodeRepositoryController. @@ -191,12 +189,6 @@ var _ v3.SourceCodeRepositoryController = &SourceCodeRepositoryControllerMock{} // ListerFunc: func() v3.SourceCodeRepositoryLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedSourceCodeRepositoryController in code that requires SourceCodeRepositoryController @@ -231,12 +223,6 @@ type SourceCodeRepositoryControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.SourceCodeRepositoryLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type SourceCodeRepositoryControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *SourceCodeRepositoryControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *SourceCodeRepositoryControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("SourceCodeRepositoryControllerMock.StartFunc: method is nil but SourceCodeRepositoryController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockSourceCodeRepositoryControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockSourceCodeRepositoryControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedSourceCodeRepositoryController.StartCalls()) -func (mock *SourceCodeRepositoryControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockSourceCodeRepositoryControllerMockStart.RLock() - calls = mock.calls.Start - lockSourceCodeRepositoryControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *SourceCodeRepositoryControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("SourceCodeRepositoryControllerMock.SyncFunc: method is nil but SourceCodeRepositoryController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockSourceCodeRepositoryControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockSourceCodeRepositoryControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedSourceCodeRepositoryController.SyncCalls()) -func (mock *SourceCodeRepositoryControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockSourceCodeRepositoryControllerMockSync.RLock() - calls = mock.calls.Sync - lockSourceCodeRepositoryControllerMockSync.RUnlock() - return calls -} - var ( lockSourceCodeRepositoryInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockSourceCodeRepositoryInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_ssh_auth_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_ssh_auth_mock.go index 02b366b5..89a9c13b 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_ssh_auth_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_ssh_auth_mock.go @@ -150,8 +150,6 @@ var ( lockSSHAuthControllerMockGeneric sync.RWMutex lockSSHAuthControllerMockInformer sync.RWMutex lockSSHAuthControllerMockLister sync.RWMutex - lockSSHAuthControllerMockStart sync.RWMutex - lockSSHAuthControllerMockSync sync.RWMutex ) // Ensure, that SSHAuthControllerMock does implement SSHAuthController. @@ -191,12 +189,6 @@ var _ v3.SSHAuthController = &SSHAuthControllerMock{} // ListerFunc: func() v3.SSHAuthLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedSSHAuthController in code that requires SSHAuthController @@ -231,12 +223,6 @@ type SSHAuthControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.SSHAuthLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type SSHAuthControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *SSHAuthControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *SSHAuthControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("SSHAuthControllerMock.StartFunc: method is nil but SSHAuthController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockSSHAuthControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockSSHAuthControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedSSHAuthController.StartCalls()) -func (mock *SSHAuthControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockSSHAuthControllerMockStart.RLock() - calls = mock.calls.Start - lockSSHAuthControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *SSHAuthControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("SSHAuthControllerMock.SyncFunc: method is nil but SSHAuthController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockSSHAuthControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockSSHAuthControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedSSHAuthController.SyncCalls()) -func (mock *SSHAuthControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockSSHAuthControllerMockSync.RLock() - calls = mock.calls.Sync - lockSSHAuthControllerMockSync.RUnlock() - return calls -} - var ( lockSSHAuthInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockSSHAuthInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/fakes/zz_generated_workload_mock.go b/apis/project.cattle.io/v3/fakes/zz_generated_workload_mock.go index 06e85658..0e83a107 100644 --- a/apis/project.cattle.io/v3/fakes/zz_generated_workload_mock.go +++ b/apis/project.cattle.io/v3/fakes/zz_generated_workload_mock.go @@ -150,8 +150,6 @@ var ( lockWorkloadControllerMockGeneric sync.RWMutex lockWorkloadControllerMockInformer sync.RWMutex lockWorkloadControllerMockLister sync.RWMutex - lockWorkloadControllerMockStart sync.RWMutex - lockWorkloadControllerMockSync sync.RWMutex ) // Ensure, that WorkloadControllerMock does implement WorkloadController. @@ -191,12 +189,6 @@ var _ v3.WorkloadController = &WorkloadControllerMock{} // ListerFunc: func() v3.WorkloadLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedWorkloadController in code that requires WorkloadController @@ -231,12 +223,6 @@ type WorkloadControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v3.WorkloadLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -308,18 +294,6 @@ type WorkloadControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -647,72 +621,6 @@ func (mock *WorkloadControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *WorkloadControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("WorkloadControllerMock.StartFunc: method is nil but WorkloadController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockWorkloadControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockWorkloadControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedWorkloadController.StartCalls()) -func (mock *WorkloadControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockWorkloadControllerMockStart.RLock() - calls = mock.calls.Start - lockWorkloadControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *WorkloadControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("WorkloadControllerMock.SyncFunc: method is nil but WorkloadController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockWorkloadControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockWorkloadControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedWorkloadController.SyncCalls()) -func (mock *WorkloadControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockWorkloadControllerMockSync.RLock() - calls = mock.calls.Sync - lockWorkloadControllerMockSync.RUnlock() - return calls -} - var ( lockWorkloadInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockWorkloadInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex diff --git a/apis/project.cattle.io/v3/zz_generated_app_controller.go b/apis/project.cattle.io/v3/zz_generated_app_controller.go index 95b429e8..ead9e7de 100644 --- a/apis/project.cattle.io/v3/zz_generated_app_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_app_controller.go @@ -74,8 +74,6 @@ type AppController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler AppHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type AppInterface interface { @@ -126,7 +124,7 @@ func (l *appLister) Get(namespace, name string) (*App, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: AppGroupVersionKind.Group, - Resource: "app", + Resource: AppGroupVersionResource.Resource, }, key) } return obj.(*App), nil @@ -210,25 +208,12 @@ func (c appFactory) List() runtime.Object { } func (s *appClient) Controller() AppController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.appControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(AppGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(AppGroupVersionResource, AppGroupVersionKind.Kind, true)) - c = &appController{ + return &appController{ GenericController: genericController, } - - s.client.appControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type appClient struct { @@ -262,6 +247,11 @@ func (s *appClient) Update(o *App) (*App, error) { return obj.(*App), err } +func (s *appClient) UpdateStatus(o *App) (*App, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*App), err +} + func (s *appClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go b/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go index fe14914e..a609bc20 100644 --- a/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_app_revision_controller.go @@ -74,8 +74,6 @@ type AppRevisionController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler AppRevisionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type AppRevisionInterface interface { @@ -126,7 +124,7 @@ func (l *appRevisionLister) Get(namespace, name string) (*AppRevision, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: AppRevisionGroupVersionKind.Group, - Resource: "appRevision", + Resource: AppRevisionGroupVersionResource.Resource, }, key) } return obj.(*AppRevision), nil @@ -210,25 +208,12 @@ func (c appRevisionFactory) List() runtime.Object { } func (s *appRevisionClient) Controller() AppRevisionController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.appRevisionControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(AppRevisionGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(AppRevisionGroupVersionResource, AppRevisionGroupVersionKind.Kind, true)) - c = &appRevisionController{ + return &appRevisionController{ GenericController: genericController, } - - s.client.appRevisionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type appRevisionClient struct { @@ -262,6 +247,11 @@ func (s *appRevisionClient) Update(o *AppRevision) (*AppRevision, error) { return obj.(*AppRevision), err } +func (s *appRevisionClient) UpdateStatus(o *AppRevision) (*AppRevision, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*AppRevision), err +} + func (s *appRevisionClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go b/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go index 01437ce5..4bc6cc88 100644 --- a/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_basic_auth_controller.go @@ -74,8 +74,6 @@ type BasicAuthController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler BasicAuthHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type BasicAuthInterface interface { @@ -126,7 +124,7 @@ func (l *basicAuthLister) Get(namespace, name string) (*BasicAuth, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: BasicAuthGroupVersionKind.Group, - Resource: "basicAuth", + Resource: BasicAuthGroupVersionResource.Resource, }, key) } return obj.(*BasicAuth), nil @@ -210,25 +208,12 @@ func (c basicAuthFactory) List() runtime.Object { } func (s *basicAuthClient) Controller() BasicAuthController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.basicAuthControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(BasicAuthGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(BasicAuthGroupVersionResource, BasicAuthGroupVersionKind.Kind, true)) - c = &basicAuthController{ + return &basicAuthController{ GenericController: genericController, } - - s.client.basicAuthControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type basicAuthClient struct { @@ -262,6 +247,11 @@ func (s *basicAuthClient) Update(o *BasicAuth) (*BasicAuth, error) { return obj.(*BasicAuth), err } +func (s *basicAuthClient) UpdateStatus(o *BasicAuth) (*BasicAuth, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*BasicAuth), err +} + func (s *basicAuthClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_certificate_controller.go b/apis/project.cattle.io/v3/zz_generated_certificate_controller.go index 09b9b5c6..cfe2fa87 100644 --- a/apis/project.cattle.io/v3/zz_generated_certificate_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_certificate_controller.go @@ -74,8 +74,6 @@ type CertificateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler CertificateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type CertificateInterface interface { @@ -126,7 +124,7 @@ func (l *certificateLister) Get(namespace, name string) (*Certificate, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: CertificateGroupVersionKind.Group, - Resource: "certificate", + Resource: CertificateGroupVersionResource.Resource, }, key) } return obj.(*Certificate), nil @@ -210,25 +208,12 @@ func (c certificateFactory) List() runtime.Object { } func (s *certificateClient) Controller() CertificateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.certificateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(CertificateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(CertificateGroupVersionResource, CertificateGroupVersionKind.Kind, true)) - c = &certificateController{ + return &certificateController{ GenericController: genericController, } - - s.client.certificateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type certificateClient struct { @@ -262,6 +247,11 @@ func (s *certificateClient) Update(o *Certificate) (*Certificate, error) { return obj.(*Certificate), err } +func (s *certificateClient) UpdateStatus(o *Certificate) (*Certificate, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Certificate), err +} + func (s *certificateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go b/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go index 4709658e..9b337f7d 100644 --- a/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_docker_credential_controller.go @@ -74,8 +74,6 @@ type DockerCredentialController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler DockerCredentialHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type DockerCredentialInterface interface { @@ -126,7 +124,7 @@ func (l *dockerCredentialLister) Get(namespace, name string) (*DockerCredential, if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: DockerCredentialGroupVersionKind.Group, - Resource: "dockerCredential", + Resource: DockerCredentialGroupVersionResource.Resource, }, key) } return obj.(*DockerCredential), nil @@ -210,25 +208,12 @@ func (c dockerCredentialFactory) List() runtime.Object { } func (s *dockerCredentialClient) Controller() DockerCredentialController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.dockerCredentialControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(DockerCredentialGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(DockerCredentialGroupVersionResource, DockerCredentialGroupVersionKind.Kind, true)) - c = &dockerCredentialController{ + return &dockerCredentialController{ GenericController: genericController, } - - s.client.dockerCredentialControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type dockerCredentialClient struct { @@ -262,6 +247,11 @@ func (s *dockerCredentialClient) Update(o *DockerCredential) (*DockerCredential, return obj.(*DockerCredential), err } +func (s *dockerCredentialClient) UpdateStatus(o *DockerCredential) (*DockerCredential, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*DockerCredential), err +} + func (s *dockerCredentialClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_k8s_client.go b/apis/project.cattle.io/v3/zz_generated_k8s_client.go index 2ae3b928..a046f50c 100644 --- a/apis/project.cattle.io/v3/zz_generated_k8s_client.go +++ b/apis/project.cattle.io/v3/zz_generated_k8s_client.go @@ -1,25 +1,14 @@ package v3 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" + "k8s.io/apimachinery/pkg/runtime" "k8s.io/client-go/rest" ) -type ( - contextKeyType struct{} - contextClientsKeyType struct{} -) - type Interface interface { - RESTClient() rest.Interface - controller.Starter - ServiceAccountTokensGetter DockerCredentialsGetter CertificatesGetter @@ -43,86 +32,36 @@ type Interface interface { } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - serviceAccountTokenControllers map[string]ServiceAccountTokenController - dockerCredentialControllers map[string]DockerCredentialController - certificateControllers map[string]CertificateController - basicAuthControllers map[string]BasicAuthController - sshAuthControllers map[string]SSHAuthController - namespacedServiceAccountTokenControllers map[string]NamespacedServiceAccountTokenController - namespacedDockerCredentialControllers map[string]NamespacedDockerCredentialController - namespacedCertificateControllers map[string]NamespacedCertificateController - namespacedBasicAuthControllers map[string]NamespacedBasicAuthController - namespacedSshAuthControllers map[string]NamespacedSSHAuthController - workloadControllers map[string]WorkloadController - appControllers map[string]AppController - appRevisionControllers map[string]AppRevisionController - sourceCodeProviderControllers map[string]SourceCodeProviderController - sourceCodeProviderConfigControllers map[string]SourceCodeProviderConfigController - sourceCodeCredentialControllers map[string]SourceCodeCredentialController - pipelineControllers map[string]PipelineController - pipelineExecutionControllers map[string]PipelineExecutionController - pipelineSettingControllers map[string]PipelineSettingController - sourceCodeRepositoryControllers map[string]SourceCodeRepositoryController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer +func NewForConfig(cfg rest.Config) (Interface, error) { + scheme := runtime.NewScheme() + if err := AddToScheme(scheme); err != nil { + return nil, err } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) + controllerFactory, err := controller.NewSharedControllerFactoryFromConfig(&cfg, scheme) if err != nil { return nil, err } + return NewFromControllerFactory(controllerFactory) +} +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - serviceAccountTokenControllers: map[string]ServiceAccountTokenController{}, - dockerCredentialControllers: map[string]DockerCredentialController{}, - certificateControllers: map[string]CertificateController{}, - basicAuthControllers: map[string]BasicAuthController{}, - sshAuthControllers: map[string]SSHAuthController{}, - namespacedServiceAccountTokenControllers: map[string]NamespacedServiceAccountTokenController{}, - namespacedDockerCredentialControllers: map[string]NamespacedDockerCredentialController{}, - namespacedCertificateControllers: map[string]NamespacedCertificateController{}, - namespacedBasicAuthControllers: map[string]NamespacedBasicAuthController{}, - namespacedSshAuthControllers: map[string]NamespacedSSHAuthController{}, - workloadControllers: map[string]WorkloadController{}, - appControllers: map[string]AppController{}, - appRevisionControllers: map[string]AppRevisionController{}, - sourceCodeProviderControllers: map[string]SourceCodeProviderController{}, - sourceCodeProviderConfigControllers: map[string]SourceCodeProviderConfigController{}, - sourceCodeCredentialControllers: map[string]SourceCodeCredentialController{}, - pipelineControllers: map[string]PipelineController{}, - pipelineExecutionControllers: map[string]PipelineExecutionController{}, - pipelineSettingControllers: map[string]PipelineSettingController{}, - sourceCodeRepositoryControllers: map[string]SourceCodeRepositoryController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type ServiceAccountTokensGetter interface { ServiceAccountTokens(namespace string) ServiceAccountTokenInterface } func (c *Client) ServiceAccountTokens(namespace string) ServiceAccountTokenInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ServiceAccountTokenResource, ServiceAccountTokenGroupVersionKind, serviceAccountTokenFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ServiceAccountTokenGroupVersionResource, ServiceAccountTokenGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ServiceAccountTokenResource, ServiceAccountTokenGroupVersionKind, serviceAccountTokenFactory{}) return &serviceAccountTokenClient{ ns: namespace, client: c, @@ -135,7 +74,8 @@ type DockerCredentialsGetter interface { } func (c *Client) DockerCredentials(namespace string) DockerCredentialInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &DockerCredentialResource, DockerCredentialGroupVersionKind, dockerCredentialFactory{}) + sharedClient := c.clientFactory.ForResourceKind(DockerCredentialGroupVersionResource, DockerCredentialGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &DockerCredentialResource, DockerCredentialGroupVersionKind, dockerCredentialFactory{}) return &dockerCredentialClient{ ns: namespace, client: c, @@ -148,7 +88,8 @@ type CertificatesGetter interface { } func (c *Client) Certificates(namespace string) CertificateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &CertificateResource, CertificateGroupVersionKind, certificateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(CertificateGroupVersionResource, CertificateGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &CertificateResource, CertificateGroupVersionKind, certificateFactory{}) return &certificateClient{ ns: namespace, client: c, @@ -161,7 +102,8 @@ type BasicAuthsGetter interface { } func (c *Client) BasicAuths(namespace string) BasicAuthInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &BasicAuthResource, BasicAuthGroupVersionKind, basicAuthFactory{}) + sharedClient := c.clientFactory.ForResourceKind(BasicAuthGroupVersionResource, BasicAuthGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &BasicAuthResource, BasicAuthGroupVersionKind, basicAuthFactory{}) return &basicAuthClient{ ns: namespace, client: c, @@ -174,7 +116,8 @@ type SSHAuthsGetter interface { } func (c *Client) SSHAuths(namespace string) SSHAuthInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SSHAuthResource, SSHAuthGroupVersionKind, sshAuthFactory{}) + sharedClient := c.clientFactory.ForResourceKind(SSHAuthGroupVersionResource, SSHAuthGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &SSHAuthResource, SSHAuthGroupVersionKind, sshAuthFactory{}) return &sshAuthClient{ ns: namespace, client: c, @@ -187,7 +130,8 @@ type NamespacedServiceAccountTokensGetter interface { } func (c *Client) NamespacedServiceAccountTokens(namespace string) NamespacedServiceAccountTokenInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NamespacedServiceAccountTokenResource, NamespacedServiceAccountTokenGroupVersionKind, namespacedServiceAccountTokenFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NamespacedServiceAccountTokenGroupVersionResource, NamespacedServiceAccountTokenGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NamespacedServiceAccountTokenResource, NamespacedServiceAccountTokenGroupVersionKind, namespacedServiceAccountTokenFactory{}) return &namespacedServiceAccountTokenClient{ ns: namespace, client: c, @@ -200,7 +144,8 @@ type NamespacedDockerCredentialsGetter interface { } func (c *Client) NamespacedDockerCredentials(namespace string) NamespacedDockerCredentialInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NamespacedDockerCredentialResource, NamespacedDockerCredentialGroupVersionKind, namespacedDockerCredentialFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NamespacedDockerCredentialGroupVersionResource, NamespacedDockerCredentialGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NamespacedDockerCredentialResource, NamespacedDockerCredentialGroupVersionKind, namespacedDockerCredentialFactory{}) return &namespacedDockerCredentialClient{ ns: namespace, client: c, @@ -213,7 +158,8 @@ type NamespacedCertificatesGetter interface { } func (c *Client) NamespacedCertificates(namespace string) NamespacedCertificateInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NamespacedCertificateResource, NamespacedCertificateGroupVersionKind, namespacedCertificateFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NamespacedCertificateGroupVersionResource, NamespacedCertificateGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NamespacedCertificateResource, NamespacedCertificateGroupVersionKind, namespacedCertificateFactory{}) return &namespacedCertificateClient{ ns: namespace, client: c, @@ -226,7 +172,8 @@ type NamespacedBasicAuthsGetter interface { } func (c *Client) NamespacedBasicAuths(namespace string) NamespacedBasicAuthInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NamespacedBasicAuthResource, NamespacedBasicAuthGroupVersionKind, namespacedBasicAuthFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NamespacedBasicAuthGroupVersionResource, NamespacedBasicAuthGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NamespacedBasicAuthResource, NamespacedBasicAuthGroupVersionKind, namespacedBasicAuthFactory{}) return &namespacedBasicAuthClient{ ns: namespace, client: c, @@ -239,7 +186,8 @@ type NamespacedSSHAuthsGetter interface { } func (c *Client) NamespacedSSHAuths(namespace string) NamespacedSSHAuthInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &NamespacedSSHAuthResource, NamespacedSSHAuthGroupVersionKind, namespacedSshAuthFactory{}) + sharedClient := c.clientFactory.ForResourceKind(NamespacedSSHAuthGroupVersionResource, NamespacedSSHAuthGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &NamespacedSSHAuthResource, NamespacedSSHAuthGroupVersionKind, namespacedSshAuthFactory{}) return &namespacedSshAuthClient{ ns: namespace, client: c, @@ -252,7 +200,8 @@ type WorkloadsGetter interface { } func (c *Client) Workloads(namespace string) WorkloadInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &WorkloadResource, WorkloadGroupVersionKind, workloadFactory{}) + sharedClient := c.clientFactory.ForResourceKind(WorkloadGroupVersionResource, WorkloadGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &WorkloadResource, WorkloadGroupVersionKind, workloadFactory{}) return &workloadClient{ ns: namespace, client: c, @@ -265,7 +214,8 @@ type AppsGetter interface { } func (c *Client) Apps(namespace string) AppInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &AppResource, AppGroupVersionKind, appFactory{}) + sharedClient := c.clientFactory.ForResourceKind(AppGroupVersionResource, AppGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &AppResource, AppGroupVersionKind, appFactory{}) return &appClient{ ns: namespace, client: c, @@ -278,7 +228,8 @@ type AppRevisionsGetter interface { } func (c *Client) AppRevisions(namespace string) AppRevisionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &AppRevisionResource, AppRevisionGroupVersionKind, appRevisionFactory{}) + sharedClient := c.clientFactory.ForResourceKind(AppRevisionGroupVersionResource, AppRevisionGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &AppRevisionResource, AppRevisionGroupVersionKind, appRevisionFactory{}) return &appRevisionClient{ ns: namespace, client: c, @@ -291,7 +242,8 @@ type SourceCodeProvidersGetter interface { } func (c *Client) SourceCodeProviders(namespace string) SourceCodeProviderInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SourceCodeProviderResource, SourceCodeProviderGroupVersionKind, sourceCodeProviderFactory{}) + sharedClient := c.clientFactory.ForResourceKind(SourceCodeProviderGroupVersionResource, SourceCodeProviderGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &SourceCodeProviderResource, SourceCodeProviderGroupVersionKind, sourceCodeProviderFactory{}) return &sourceCodeProviderClient{ ns: namespace, client: c, @@ -304,7 +256,8 @@ type SourceCodeProviderConfigsGetter interface { } func (c *Client) SourceCodeProviderConfigs(namespace string) SourceCodeProviderConfigInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SourceCodeProviderConfigResource, SourceCodeProviderConfigGroupVersionKind, sourceCodeProviderConfigFactory{}) + sharedClient := c.clientFactory.ForResourceKind(SourceCodeProviderConfigGroupVersionResource, SourceCodeProviderConfigGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &SourceCodeProviderConfigResource, SourceCodeProviderConfigGroupVersionKind, sourceCodeProviderConfigFactory{}) return &sourceCodeProviderConfigClient{ ns: namespace, client: c, @@ -317,7 +270,8 @@ type SourceCodeCredentialsGetter interface { } func (c *Client) SourceCodeCredentials(namespace string) SourceCodeCredentialInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SourceCodeCredentialResource, SourceCodeCredentialGroupVersionKind, sourceCodeCredentialFactory{}) + sharedClient := c.clientFactory.ForResourceKind(SourceCodeCredentialGroupVersionResource, SourceCodeCredentialGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &SourceCodeCredentialResource, SourceCodeCredentialGroupVersionKind, sourceCodeCredentialFactory{}) return &sourceCodeCredentialClient{ ns: namespace, client: c, @@ -330,7 +284,8 @@ type PipelinesGetter interface { } func (c *Client) Pipelines(namespace string) PipelineInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PipelineResource, PipelineGroupVersionKind, pipelineFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PipelineGroupVersionResource, PipelineGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PipelineResource, PipelineGroupVersionKind, pipelineFactory{}) return &pipelineClient{ ns: namespace, client: c, @@ -343,7 +298,8 @@ type PipelineExecutionsGetter interface { } func (c *Client) PipelineExecutions(namespace string) PipelineExecutionInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PipelineExecutionResource, PipelineExecutionGroupVersionKind, pipelineExecutionFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PipelineExecutionGroupVersionResource, PipelineExecutionGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PipelineExecutionResource, PipelineExecutionGroupVersionKind, pipelineExecutionFactory{}) return &pipelineExecutionClient{ ns: namespace, client: c, @@ -356,7 +312,8 @@ type PipelineSettingsGetter interface { } func (c *Client) PipelineSettings(namespace string) PipelineSettingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &PipelineSettingResource, PipelineSettingGroupVersionKind, pipelineSettingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(PipelineSettingGroupVersionResource, PipelineSettingGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &PipelineSettingResource, PipelineSettingGroupVersionKind, pipelineSettingFactory{}) return &pipelineSettingClient{ ns: namespace, client: c, @@ -369,7 +326,8 @@ type SourceCodeRepositoriesGetter interface { } func (c *Client) SourceCodeRepositories(namespace string) SourceCodeRepositoryInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &SourceCodeRepositoryResource, SourceCodeRepositoryGroupVersionKind, sourceCodeRepositoryFactory{}) + sharedClient := c.clientFactory.ForResourceKind(SourceCodeRepositoryGroupVersionResource, SourceCodeRepositoryGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &SourceCodeRepositoryResource, SourceCodeRepositoryGroupVersionKind, sourceCodeRepositoryFactory{}) return &sourceCodeRepositoryClient{ ns: namespace, client: c, diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go index 9ec0753f..77427da6 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_basic_auth_controller.go @@ -74,8 +74,6 @@ type NamespacedBasicAuthController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NamespacedBasicAuthHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NamespacedBasicAuthInterface interface { @@ -126,7 +124,7 @@ func (l *namespacedBasicAuthLister) Get(namespace, name string) (*NamespacedBasi if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NamespacedBasicAuthGroupVersionKind.Group, - Resource: "namespacedBasicAuth", + Resource: NamespacedBasicAuthGroupVersionResource.Resource, }, key) } return obj.(*NamespacedBasicAuth), nil @@ -210,25 +208,12 @@ func (c namespacedBasicAuthFactory) List() runtime.Object { } func (s *namespacedBasicAuthClient) Controller() NamespacedBasicAuthController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.namespacedBasicAuthControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NamespacedBasicAuthGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NamespacedBasicAuthGroupVersionResource, NamespacedBasicAuthGroupVersionKind.Kind, true)) - c = &namespacedBasicAuthController{ + return &namespacedBasicAuthController{ GenericController: genericController, } - - s.client.namespacedBasicAuthControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type namespacedBasicAuthClient struct { @@ -262,6 +247,11 @@ func (s *namespacedBasicAuthClient) Update(o *NamespacedBasicAuth) (*NamespacedB return obj.(*NamespacedBasicAuth), err } +func (s *namespacedBasicAuthClient) UpdateStatus(o *NamespacedBasicAuth) (*NamespacedBasicAuth, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NamespacedBasicAuth), err +} + func (s *namespacedBasicAuthClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go index 12bec14c..ee3eb4e4 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_certificate_controller.go @@ -74,8 +74,6 @@ type NamespacedCertificateController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NamespacedCertificateHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NamespacedCertificateInterface interface { @@ -126,7 +124,7 @@ func (l *namespacedCertificateLister) Get(namespace, name string) (*NamespacedCe if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NamespacedCertificateGroupVersionKind.Group, - Resource: "namespacedCertificate", + Resource: NamespacedCertificateGroupVersionResource.Resource, }, key) } return obj.(*NamespacedCertificate), nil @@ -210,25 +208,12 @@ func (c namespacedCertificateFactory) List() runtime.Object { } func (s *namespacedCertificateClient) Controller() NamespacedCertificateController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.namespacedCertificateControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NamespacedCertificateGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NamespacedCertificateGroupVersionResource, NamespacedCertificateGroupVersionKind.Kind, true)) - c = &namespacedCertificateController{ + return &namespacedCertificateController{ GenericController: genericController, } - - s.client.namespacedCertificateControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type namespacedCertificateClient struct { @@ -262,6 +247,11 @@ func (s *namespacedCertificateClient) Update(o *NamespacedCertificate) (*Namespa return obj.(*NamespacedCertificate), err } +func (s *namespacedCertificateClient) UpdateStatus(o *NamespacedCertificate) (*NamespacedCertificate, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NamespacedCertificate), err +} + func (s *namespacedCertificateClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go index a5ec5520..838c4e2f 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_docker_credential_controller.go @@ -74,8 +74,6 @@ type NamespacedDockerCredentialController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NamespacedDockerCredentialHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NamespacedDockerCredentialInterface interface { @@ -126,7 +124,7 @@ func (l *namespacedDockerCredentialLister) Get(namespace, name string) (*Namespa if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NamespacedDockerCredentialGroupVersionKind.Group, - Resource: "namespacedDockerCredential", + Resource: NamespacedDockerCredentialGroupVersionResource.Resource, }, key) } return obj.(*NamespacedDockerCredential), nil @@ -210,25 +208,12 @@ func (c namespacedDockerCredentialFactory) List() runtime.Object { } func (s *namespacedDockerCredentialClient) Controller() NamespacedDockerCredentialController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.namespacedDockerCredentialControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NamespacedDockerCredentialGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NamespacedDockerCredentialGroupVersionResource, NamespacedDockerCredentialGroupVersionKind.Kind, true)) - c = &namespacedDockerCredentialController{ + return &namespacedDockerCredentialController{ GenericController: genericController, } - - s.client.namespacedDockerCredentialControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type namespacedDockerCredentialClient struct { @@ -262,6 +247,11 @@ func (s *namespacedDockerCredentialClient) Update(o *NamespacedDockerCredential) return obj.(*NamespacedDockerCredential), err } +func (s *namespacedDockerCredentialClient) UpdateStatus(o *NamespacedDockerCredential) (*NamespacedDockerCredential, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NamespacedDockerCredential), err +} + func (s *namespacedDockerCredentialClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go index 7164a29b..89430d2c 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_service_account_token_controller.go @@ -74,8 +74,6 @@ type NamespacedServiceAccountTokenController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NamespacedServiceAccountTokenHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NamespacedServiceAccountTokenInterface interface { @@ -126,7 +124,7 @@ func (l *namespacedServiceAccountTokenLister) Get(namespace, name string) (*Name if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NamespacedServiceAccountTokenGroupVersionKind.Group, - Resource: "namespacedServiceAccountToken", + Resource: NamespacedServiceAccountTokenGroupVersionResource.Resource, }, key) } return obj.(*NamespacedServiceAccountToken), nil @@ -210,25 +208,12 @@ func (c namespacedServiceAccountTokenFactory) List() runtime.Object { } func (s *namespacedServiceAccountTokenClient) Controller() NamespacedServiceAccountTokenController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.namespacedServiceAccountTokenControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NamespacedServiceAccountTokenGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NamespacedServiceAccountTokenGroupVersionResource, NamespacedServiceAccountTokenGroupVersionKind.Kind, true)) - c = &namespacedServiceAccountTokenController{ + return &namespacedServiceAccountTokenController{ GenericController: genericController, } - - s.client.namespacedServiceAccountTokenControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type namespacedServiceAccountTokenClient struct { @@ -262,6 +247,11 @@ func (s *namespacedServiceAccountTokenClient) Update(o *NamespacedServiceAccount return obj.(*NamespacedServiceAccountToken), err } +func (s *namespacedServiceAccountTokenClient) UpdateStatus(o *NamespacedServiceAccountToken) (*NamespacedServiceAccountToken, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NamespacedServiceAccountToken), err +} + func (s *namespacedServiceAccountTokenClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go b/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go index cfce8e25..7b93f8df 100644 --- a/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_namespaced_ssh_auth_controller.go @@ -74,8 +74,6 @@ type NamespacedSSHAuthController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler NamespacedSSHAuthHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type NamespacedSSHAuthInterface interface { @@ -126,7 +124,7 @@ func (l *namespacedSshAuthLister) Get(namespace, name string) (*NamespacedSSHAut if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: NamespacedSSHAuthGroupVersionKind.Group, - Resource: "namespacedSshAuth", + Resource: NamespacedSSHAuthGroupVersionResource.Resource, }, key) } return obj.(*NamespacedSSHAuth), nil @@ -210,25 +208,12 @@ func (c namespacedSshAuthFactory) List() runtime.Object { } func (s *namespacedSshAuthClient) Controller() NamespacedSSHAuthController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.namespacedSshAuthControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(NamespacedSSHAuthGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(NamespacedSSHAuthGroupVersionResource, NamespacedSSHAuthGroupVersionKind.Kind, true)) - c = &namespacedSshAuthController{ + return &namespacedSshAuthController{ GenericController: genericController, } - - s.client.namespacedSshAuthControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type namespacedSshAuthClient struct { @@ -262,6 +247,11 @@ func (s *namespacedSshAuthClient) Update(o *NamespacedSSHAuth) (*NamespacedSSHAu return obj.(*NamespacedSSHAuth), err } +func (s *namespacedSshAuthClient) UpdateStatus(o *NamespacedSSHAuth) (*NamespacedSSHAuth, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*NamespacedSSHAuth), err +} + func (s *namespacedSshAuthClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go b/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go index 36ca535e..27bc4c14 100644 --- a/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_pipeline_controller.go @@ -74,8 +74,6 @@ type PipelineController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PipelineHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PipelineInterface interface { @@ -126,7 +124,7 @@ func (l *pipelineLister) Get(namespace, name string) (*Pipeline, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PipelineGroupVersionKind.Group, - Resource: "pipeline", + Resource: PipelineGroupVersionResource.Resource, }, key) } return obj.(*Pipeline), nil @@ -210,25 +208,12 @@ func (c pipelineFactory) List() runtime.Object { } func (s *pipelineClient) Controller() PipelineController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.pipelineControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PipelineGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PipelineGroupVersionResource, PipelineGroupVersionKind.Kind, true)) - c = &pipelineController{ + return &pipelineController{ GenericController: genericController, } - - s.client.pipelineControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type pipelineClient struct { @@ -262,6 +247,11 @@ func (s *pipelineClient) Update(o *Pipeline) (*Pipeline, error) { return obj.(*Pipeline), err } +func (s *pipelineClient) UpdateStatus(o *Pipeline) (*Pipeline, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Pipeline), err +} + func (s *pipelineClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go b/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go index 3721e17b..a2ae6a98 100644 --- a/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_pipeline_execution_controller.go @@ -74,8 +74,6 @@ type PipelineExecutionController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PipelineExecutionHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PipelineExecutionInterface interface { @@ -126,7 +124,7 @@ func (l *pipelineExecutionLister) Get(namespace, name string) (*PipelineExecutio if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PipelineExecutionGroupVersionKind.Group, - Resource: "pipelineExecution", + Resource: PipelineExecutionGroupVersionResource.Resource, }, key) } return obj.(*PipelineExecution), nil @@ -210,25 +208,12 @@ func (c pipelineExecutionFactory) List() runtime.Object { } func (s *pipelineExecutionClient) Controller() PipelineExecutionController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.pipelineExecutionControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PipelineExecutionGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PipelineExecutionGroupVersionResource, PipelineExecutionGroupVersionKind.Kind, true)) - c = &pipelineExecutionController{ + return &pipelineExecutionController{ GenericController: genericController, } - - s.client.pipelineExecutionControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type pipelineExecutionClient struct { @@ -262,6 +247,11 @@ func (s *pipelineExecutionClient) Update(o *PipelineExecution) (*PipelineExecuti return obj.(*PipelineExecution), err } +func (s *pipelineExecutionClient) UpdateStatus(o *PipelineExecution) (*PipelineExecution, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*PipelineExecution), err +} + func (s *pipelineExecutionClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go b/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go index b7f83691..b8cdf459 100644 --- a/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_pipeline_setting_controller.go @@ -74,8 +74,6 @@ type PipelineSettingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler PipelineSettingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type PipelineSettingInterface interface { @@ -126,7 +124,7 @@ func (l *pipelineSettingLister) Get(namespace, name string) (*PipelineSetting, e if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: PipelineSettingGroupVersionKind.Group, - Resource: "pipelineSetting", + Resource: PipelineSettingGroupVersionResource.Resource, }, key) } return obj.(*PipelineSetting), nil @@ -210,25 +208,12 @@ func (c pipelineSettingFactory) List() runtime.Object { } func (s *pipelineSettingClient) Controller() PipelineSettingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.pipelineSettingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(PipelineSettingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(PipelineSettingGroupVersionResource, PipelineSettingGroupVersionKind.Kind, true)) - c = &pipelineSettingController{ + return &pipelineSettingController{ GenericController: genericController, } - - s.client.pipelineSettingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type pipelineSettingClient struct { @@ -262,6 +247,11 @@ func (s *pipelineSettingClient) Update(o *PipelineSetting) (*PipelineSetting, er return obj.(*PipelineSetting), err } +func (s *pipelineSettingClient) UpdateStatus(o *PipelineSetting) (*PipelineSetting, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*PipelineSetting), err +} + func (s *pipelineSettingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go b/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go index 4c6a421a..ae045ebf 100644 --- a/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_service_account_token_controller.go @@ -74,8 +74,6 @@ type ServiceAccountTokenController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ServiceAccountTokenHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ServiceAccountTokenInterface interface { @@ -126,7 +124,7 @@ func (l *serviceAccountTokenLister) Get(namespace, name string) (*ServiceAccount if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ServiceAccountTokenGroupVersionKind.Group, - Resource: "serviceAccountToken", + Resource: ServiceAccountTokenGroupVersionResource.Resource, }, key) } return obj.(*ServiceAccountToken), nil @@ -210,25 +208,12 @@ func (c serviceAccountTokenFactory) List() runtime.Object { } func (s *serviceAccountTokenClient) Controller() ServiceAccountTokenController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.serviceAccountTokenControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ServiceAccountTokenGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ServiceAccountTokenGroupVersionResource, ServiceAccountTokenGroupVersionKind.Kind, true)) - c = &serviceAccountTokenController{ + return &serviceAccountTokenController{ GenericController: genericController, } - - s.client.serviceAccountTokenControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type serviceAccountTokenClient struct { @@ -262,6 +247,11 @@ func (s *serviceAccountTokenClient) Update(o *ServiceAccountToken) (*ServiceAcco return obj.(*ServiceAccountToken), err } +func (s *serviceAccountTokenClient) UpdateStatus(o *ServiceAccountToken) (*ServiceAccountToken, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*ServiceAccountToken), err +} + func (s *serviceAccountTokenClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go b/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go index dea0d3e4..3508e344 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_credential_controller.go @@ -74,8 +74,6 @@ type SourceCodeCredentialController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler SourceCodeCredentialHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type SourceCodeCredentialInterface interface { @@ -126,7 +124,7 @@ func (l *sourceCodeCredentialLister) Get(namespace, name string) (*SourceCodeCre if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: SourceCodeCredentialGroupVersionKind.Group, - Resource: "sourceCodeCredential", + Resource: SourceCodeCredentialGroupVersionResource.Resource, }, key) } return obj.(*SourceCodeCredential), nil @@ -210,25 +208,12 @@ func (c sourceCodeCredentialFactory) List() runtime.Object { } func (s *sourceCodeCredentialClient) Controller() SourceCodeCredentialController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.sourceCodeCredentialControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(SourceCodeCredentialGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(SourceCodeCredentialGroupVersionResource, SourceCodeCredentialGroupVersionKind.Kind, true)) - c = &sourceCodeCredentialController{ + return &sourceCodeCredentialController{ GenericController: genericController, } - - s.client.sourceCodeCredentialControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type sourceCodeCredentialClient struct { @@ -262,6 +247,11 @@ func (s *sourceCodeCredentialClient) Update(o *SourceCodeCredential) (*SourceCod return obj.(*SourceCodeCredential), err } +func (s *sourceCodeCredentialClient) UpdateStatus(o *SourceCodeCredential) (*SourceCodeCredential, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*SourceCodeCredential), err +} + func (s *sourceCodeCredentialClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go b/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go index b8713aef..5ad9a638 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_provider_config_controller.go @@ -74,8 +74,6 @@ type SourceCodeProviderConfigController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler SourceCodeProviderConfigHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type SourceCodeProviderConfigInterface interface { @@ -126,7 +124,7 @@ func (l *sourceCodeProviderConfigLister) Get(namespace, name string) (*SourceCod if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: SourceCodeProviderConfigGroupVersionKind.Group, - Resource: "sourceCodeProviderConfig", + Resource: SourceCodeProviderConfigGroupVersionResource.Resource, }, key) } return obj.(*SourceCodeProviderConfig), nil @@ -210,25 +208,12 @@ func (c sourceCodeProviderConfigFactory) List() runtime.Object { } func (s *sourceCodeProviderConfigClient) Controller() SourceCodeProviderConfigController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.sourceCodeProviderConfigControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(SourceCodeProviderConfigGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(SourceCodeProviderConfigGroupVersionResource, SourceCodeProviderConfigGroupVersionKind.Kind, true)) - c = &sourceCodeProviderConfigController{ + return &sourceCodeProviderConfigController{ GenericController: genericController, } - - s.client.sourceCodeProviderConfigControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type sourceCodeProviderConfigClient struct { @@ -262,6 +247,11 @@ func (s *sourceCodeProviderConfigClient) Update(o *SourceCodeProviderConfig) (*S return obj.(*SourceCodeProviderConfig), err } +func (s *sourceCodeProviderConfigClient) UpdateStatus(o *SourceCodeProviderConfig) (*SourceCodeProviderConfig, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*SourceCodeProviderConfig), err +} + func (s *sourceCodeProviderConfigClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go b/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go index cd25bcb2..50bc2057 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_provider_controller.go @@ -73,8 +73,6 @@ type SourceCodeProviderController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler SourceCodeProviderHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type SourceCodeProviderInterface interface { @@ -125,7 +123,7 @@ func (l *sourceCodeProviderLister) Get(namespace, name string) (*SourceCodeProvi if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: SourceCodeProviderGroupVersionKind.Group, - Resource: "sourceCodeProvider", + Resource: SourceCodeProviderGroupVersionResource.Resource, }, key) } return obj.(*SourceCodeProvider), nil @@ -209,25 +207,12 @@ func (c sourceCodeProviderFactory) List() runtime.Object { } func (s *sourceCodeProviderClient) Controller() SourceCodeProviderController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.sourceCodeProviderControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(SourceCodeProviderGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(SourceCodeProviderGroupVersionResource, SourceCodeProviderGroupVersionKind.Kind, false)) - c = &sourceCodeProviderController{ + return &sourceCodeProviderController{ GenericController: genericController, } - - s.client.sourceCodeProviderControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type sourceCodeProviderClient struct { @@ -261,6 +246,11 @@ func (s *sourceCodeProviderClient) Update(o *SourceCodeProvider) (*SourceCodePro return obj.(*SourceCodeProvider), err } +func (s *sourceCodeProviderClient) UpdateStatus(o *SourceCodeProvider) (*SourceCodeProvider, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*SourceCodeProvider), err +} + func (s *sourceCodeProviderClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go b/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go index 44d304a5..31c6aeff 100644 --- a/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_source_code_repository_controller.go @@ -74,8 +74,6 @@ type SourceCodeRepositoryController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler SourceCodeRepositoryHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type SourceCodeRepositoryInterface interface { @@ -126,7 +124,7 @@ func (l *sourceCodeRepositoryLister) Get(namespace, name string) (*SourceCodeRep if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: SourceCodeRepositoryGroupVersionKind.Group, - Resource: "sourceCodeRepository", + Resource: SourceCodeRepositoryGroupVersionResource.Resource, }, key) } return obj.(*SourceCodeRepository), nil @@ -210,25 +208,12 @@ func (c sourceCodeRepositoryFactory) List() runtime.Object { } func (s *sourceCodeRepositoryClient) Controller() SourceCodeRepositoryController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.sourceCodeRepositoryControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(SourceCodeRepositoryGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(SourceCodeRepositoryGroupVersionResource, SourceCodeRepositoryGroupVersionKind.Kind, true)) - c = &sourceCodeRepositoryController{ + return &sourceCodeRepositoryController{ GenericController: genericController, } - - s.client.sourceCodeRepositoryControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type sourceCodeRepositoryClient struct { @@ -262,6 +247,11 @@ func (s *sourceCodeRepositoryClient) Update(o *SourceCodeRepository) (*SourceCod return obj.(*SourceCodeRepository), err } +func (s *sourceCodeRepositoryClient) UpdateStatus(o *SourceCodeRepository) (*SourceCodeRepository, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*SourceCodeRepository), err +} + func (s *sourceCodeRepositoryClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go b/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go index 4f1d7e31..8e615c42 100644 --- a/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_ssh_auth_controller.go @@ -74,8 +74,6 @@ type SSHAuthController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler SSHAuthHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type SSHAuthInterface interface { @@ -126,7 +124,7 @@ func (l *sshAuthLister) Get(namespace, name string) (*SSHAuth, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: SSHAuthGroupVersionKind.Group, - Resource: "sshAuth", + Resource: SSHAuthGroupVersionResource.Resource, }, key) } return obj.(*SSHAuth), nil @@ -210,25 +208,12 @@ func (c sshAuthFactory) List() runtime.Object { } func (s *sshAuthClient) Controller() SSHAuthController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.sshAuthControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(SSHAuthGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(SSHAuthGroupVersionResource, SSHAuthGroupVersionKind.Kind, true)) - c = &sshAuthController{ + return &sshAuthController{ GenericController: genericController, } - - s.client.sshAuthControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type sshAuthClient struct { @@ -262,6 +247,11 @@ func (s *sshAuthClient) Update(o *SSHAuth) (*SSHAuth, error) { return obj.(*SSHAuth), err } +func (s *sshAuthClient) UpdateStatus(o *SSHAuth) (*SSHAuth, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*SSHAuth), err +} + func (s *sshAuthClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/project.cattle.io/v3/zz_generated_workload_controller.go b/apis/project.cattle.io/v3/zz_generated_workload_controller.go index 6f38d91b..9cba1303 100644 --- a/apis/project.cattle.io/v3/zz_generated_workload_controller.go +++ b/apis/project.cattle.io/v3/zz_generated_workload_controller.go @@ -74,8 +74,6 @@ type WorkloadController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler WorkloadHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type WorkloadInterface interface { @@ -126,7 +124,7 @@ func (l *workloadLister) Get(namespace, name string) (*Workload, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: WorkloadGroupVersionKind.Group, - Resource: "workload", + Resource: WorkloadGroupVersionResource.Resource, }, key) } return obj.(*Workload), nil @@ -210,25 +208,12 @@ func (c workloadFactory) List() runtime.Object { } func (s *workloadClient) Controller() WorkloadController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.workloadControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(WorkloadGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(WorkloadGroupVersionResource, WorkloadGroupVersionKind.Kind, true)) - c = &workloadController{ + return &workloadController{ GenericController: genericController, } - - s.client.workloadControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type workloadClient struct { @@ -262,6 +247,11 @@ func (s *workloadClient) Update(o *Workload) (*Workload, error) { return obj.(*Workload), err } +func (s *workloadClient) UpdateStatus(o *Workload) (*Workload, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*Workload), err +} + func (s *workloadClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } diff --git a/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_binding_mock.go b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_binding_mock.go index 431c076f..efbf68fa 100644 --- a/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_binding_mock.go +++ b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_binding_mock.go @@ -151,8 +151,6 @@ var ( lockClusterRoleBindingControllerMockGeneric sync.RWMutex lockClusterRoleBindingControllerMockInformer sync.RWMutex lockClusterRoleBindingControllerMockLister sync.RWMutex - lockClusterRoleBindingControllerMockStart sync.RWMutex - lockClusterRoleBindingControllerMockSync sync.RWMutex ) // Ensure, that ClusterRoleBindingControllerMock does implement ClusterRoleBindingController. @@ -192,12 +190,6 @@ var _ v1a.ClusterRoleBindingController = &ClusterRoleBindingControllerMock{} // ListerFunc: func() v1a.ClusterRoleBindingLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterRoleBindingController in code that requires ClusterRoleBindingController @@ -232,12 +224,6 @@ type ClusterRoleBindingControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.ClusterRoleBindingLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type ClusterRoleBindingControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *ClusterRoleBindingControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterRoleBindingControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterRoleBindingControllerMock.StartFunc: method is nil but ClusterRoleBindingController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterRoleBindingControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterRoleBindingControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterRoleBindingController.StartCalls()) -func (mock *ClusterRoleBindingControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterRoleBindingControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterRoleBindingControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterRoleBindingControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterRoleBindingControllerMock.SyncFunc: method is nil but ClusterRoleBindingController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterRoleBindingControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterRoleBindingControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterRoleBindingController.SyncCalls()) -func (mock *ClusterRoleBindingControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterRoleBindingControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterRoleBindingControllerMockSync.RUnlock() - return calls -} - var ( lockClusterRoleBindingInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterRoleBindingInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.ClusterRoleBindingInterface = &ClusterRoleBindingInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ClusterRoleBinding, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.ClusterRoleBindingList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.ClusterRoleBindingList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ClusterRoleBindingList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ClusterRoleBindingList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type ClusterRoleBindingInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ClusterRoleBinding, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.ClusterRoleBindingList, error) + ListFunc func(opts v1b.ListOptions) (*v1.ClusterRoleBindingList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ClusterRoleBindingList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ClusterRoleBindingList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *ClusterRoleBindingInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *ClusterRoleBindingInterfaceMock) List(opts v1b.ListOptions) (*v1a.ClusterRoleBindingList, error) { +func (mock *ClusterRoleBindingInterfaceMock) List(opts v1b.ListOptions) (*v1.ClusterRoleBindingList, error) { if mock.ListFunc == nil { panic("ClusterRoleBindingInterfaceMock.ListFunc: method is nil but ClusterRoleBindingInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *ClusterRoleBindingInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *ClusterRoleBindingInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ClusterRoleBindingList, error) { +func (mock *ClusterRoleBindingInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ClusterRoleBindingList, error) { if mock.ListNamespacedFunc == nil { panic("ClusterRoleBindingInterfaceMock.ListNamespacedFunc: method is nil but ClusterRoleBindingInterface.ListNamespaced was just called") } diff --git a/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_mock.go b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_mock.go index 3af4da90..643863b1 100644 --- a/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_mock.go +++ b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_cluster_role_mock.go @@ -151,8 +151,6 @@ var ( lockClusterRoleControllerMockGeneric sync.RWMutex lockClusterRoleControllerMockInformer sync.RWMutex lockClusterRoleControllerMockLister sync.RWMutex - lockClusterRoleControllerMockStart sync.RWMutex - lockClusterRoleControllerMockSync sync.RWMutex ) // Ensure, that ClusterRoleControllerMock does implement ClusterRoleController. @@ -192,12 +190,6 @@ var _ v1a.ClusterRoleController = &ClusterRoleControllerMock{} // ListerFunc: func() v1a.ClusterRoleLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedClusterRoleController in code that requires ClusterRoleController @@ -232,12 +224,6 @@ type ClusterRoleControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.ClusterRoleLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type ClusterRoleControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *ClusterRoleControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *ClusterRoleControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ClusterRoleControllerMock.StartFunc: method is nil but ClusterRoleController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockClusterRoleControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockClusterRoleControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedClusterRoleController.StartCalls()) -func (mock *ClusterRoleControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockClusterRoleControllerMockStart.RLock() - calls = mock.calls.Start - lockClusterRoleControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ClusterRoleControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ClusterRoleControllerMock.SyncFunc: method is nil but ClusterRoleController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockClusterRoleControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockClusterRoleControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedClusterRoleController.SyncCalls()) -func (mock *ClusterRoleControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockClusterRoleControllerMockSync.RLock() - calls = mock.calls.Sync - lockClusterRoleControllerMockSync.RUnlock() - return calls -} - var ( lockClusterRoleInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockClusterRoleInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.ClusterRoleInterface = &ClusterRoleInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.ClusterRole, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.ClusterRoleList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.ClusterRoleList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.ClusterRoleList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.ClusterRoleList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type ClusterRoleInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.ClusterRole, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.ClusterRoleList, error) + ListFunc func(opts v1b.ListOptions) (*v1.ClusterRoleList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.ClusterRoleList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.ClusterRoleList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *ClusterRoleInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *ClusterRoleInterfaceMock) List(opts v1b.ListOptions) (*v1a.ClusterRoleList, error) { +func (mock *ClusterRoleInterfaceMock) List(opts v1b.ListOptions) (*v1.ClusterRoleList, error) { if mock.ListFunc == nil { panic("ClusterRoleInterfaceMock.ListFunc: method is nil but ClusterRoleInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *ClusterRoleInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *ClusterRoleInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.ClusterRoleList, error) { +func (mock *ClusterRoleInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.ClusterRoleList, error) { if mock.ListNamespacedFunc == nil { panic("ClusterRoleInterfaceMock.ListNamespacedFunc: method is nil but ClusterRoleInterface.ListNamespaced was just called") } diff --git a/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_binding_mock.go b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_binding_mock.go index 418cbc55..6b082bb7 100644 --- a/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_binding_mock.go +++ b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_binding_mock.go @@ -151,8 +151,6 @@ var ( lockRoleBindingControllerMockGeneric sync.RWMutex lockRoleBindingControllerMockInformer sync.RWMutex lockRoleBindingControllerMockLister sync.RWMutex - lockRoleBindingControllerMockStart sync.RWMutex - lockRoleBindingControllerMockSync sync.RWMutex ) // Ensure, that RoleBindingControllerMock does implement RoleBindingController. @@ -192,12 +190,6 @@ var _ v1a.RoleBindingController = &RoleBindingControllerMock{} // ListerFunc: func() v1a.RoleBindingLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedRoleBindingController in code that requires RoleBindingController @@ -232,12 +224,6 @@ type RoleBindingControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.RoleBindingLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type RoleBindingControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *RoleBindingControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *RoleBindingControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("RoleBindingControllerMock.StartFunc: method is nil but RoleBindingController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockRoleBindingControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockRoleBindingControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedRoleBindingController.StartCalls()) -func (mock *RoleBindingControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockRoleBindingControllerMockStart.RLock() - calls = mock.calls.Start - lockRoleBindingControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *RoleBindingControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("RoleBindingControllerMock.SyncFunc: method is nil but RoleBindingController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockRoleBindingControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockRoleBindingControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedRoleBindingController.SyncCalls()) -func (mock *RoleBindingControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockRoleBindingControllerMockSync.RLock() - calls = mock.calls.Sync - lockRoleBindingControllerMockSync.RUnlock() - return calls -} - var ( lockRoleBindingInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockRoleBindingInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.RoleBindingInterface = &RoleBindingInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.RoleBinding, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.RoleBindingList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.RoleBindingList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.RoleBindingList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.RoleBindingList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type RoleBindingInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.RoleBinding, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.RoleBindingList, error) + ListFunc func(opts v1b.ListOptions) (*v1.RoleBindingList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.RoleBindingList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.RoleBindingList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *RoleBindingInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *RoleBindingInterfaceMock) List(opts v1b.ListOptions) (*v1a.RoleBindingList, error) { +func (mock *RoleBindingInterfaceMock) List(opts v1b.ListOptions) (*v1.RoleBindingList, error) { if mock.ListFunc == nil { panic("RoleBindingInterfaceMock.ListFunc: method is nil but RoleBindingInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *RoleBindingInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *RoleBindingInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.RoleBindingList, error) { +func (mock *RoleBindingInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.RoleBindingList, error) { if mock.ListNamespacedFunc == nil { panic("RoleBindingInterfaceMock.ListNamespacedFunc: method is nil but RoleBindingInterface.ListNamespaced was just called") } diff --git a/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_mock.go b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_mock.go index f7a36ff2..e2cca9b9 100644 --- a/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_mock.go +++ b/apis/rbac.authorization.k8s.io/v1/fakes/zz_generated_role_mock.go @@ -151,8 +151,6 @@ var ( lockRoleControllerMockGeneric sync.RWMutex lockRoleControllerMockInformer sync.RWMutex lockRoleControllerMockLister sync.RWMutex - lockRoleControllerMockStart sync.RWMutex - lockRoleControllerMockSync sync.RWMutex ) // Ensure, that RoleControllerMock does implement RoleController. @@ -192,12 +190,6 @@ var _ v1a.RoleController = &RoleControllerMock{} // ListerFunc: func() v1a.RoleLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedRoleController in code that requires RoleController @@ -232,12 +224,6 @@ type RoleControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.RoleLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type RoleControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *RoleControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *RoleControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("RoleControllerMock.StartFunc: method is nil but RoleController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockRoleControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockRoleControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedRoleController.StartCalls()) -func (mock *RoleControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockRoleControllerMockStart.RLock() - calls = mock.calls.Start - lockRoleControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *RoleControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("RoleControllerMock.SyncFunc: method is nil but RoleController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockRoleControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockRoleControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedRoleController.SyncCalls()) -func (mock *RoleControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockRoleControllerMockSync.RLock() - calls = mock.calls.Sync - lockRoleControllerMockSync.RUnlock() - return calls -} - var ( lockRoleInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockRoleInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.RoleInterface = &RoleInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.Role, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.RoleList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.RoleList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.RoleList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.RoleList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type RoleInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.Role, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.RoleList, error) + ListFunc func(opts v1b.ListOptions) (*v1.RoleList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.RoleList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.RoleList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *RoleInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *RoleInterfaceMock) List(opts v1b.ListOptions) (*v1a.RoleList, error) { +func (mock *RoleInterfaceMock) List(opts v1b.ListOptions) (*v1.RoleList, error) { if mock.ListFunc == nil { panic("RoleInterfaceMock.ListFunc: method is nil but RoleInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *RoleInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *RoleInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.RoleList, error) { +func (mock *RoleInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.RoleList, error) { if mock.ListNamespacedFunc == nil { panic("RoleInterfaceMock.ListNamespacedFunc: method is nil but RoleInterface.ListNamespaced was just called") } diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_controller.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_controller.go index 6236c877..35bb526a 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_controller.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_binding_controller.go @@ -49,12 +49,6 @@ func NewClusterRoleBinding(namespace, name string, obj v1.ClusterRoleBinding) *v return &obj } -type ClusterRoleBindingList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ClusterRoleBinding `json:"items"` -} - type ClusterRoleBindingHandlerFunc func(key string, obj *v1.ClusterRoleBinding) (runtime.Object, error) type ClusterRoleBindingChangeHandlerFunc func(obj *v1.ClusterRoleBinding) (runtime.Object, error) @@ -74,8 +68,6 @@ type ClusterRoleBindingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterRoleBindingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterRoleBindingInterface interface { @@ -86,8 +78,8 @@ type ClusterRoleBindingInterface interface { Update(*v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*ClusterRoleBindingList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*ClusterRoleBindingList, error) + List(opts metav1.ListOptions) (*v1.ClusterRoleBindingList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ClusterRoleBindingList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() ClusterRoleBindingController @@ -126,7 +118,7 @@ func (l *clusterRoleBindingLister) Get(namespace, name string) (*v1.ClusterRoleB if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterRoleBindingGroupVersionKind.Group, - Resource: "clusterRoleBinding", + Resource: ClusterRoleBindingGroupVersionResource.Resource, }, key) } return obj.(*v1.ClusterRoleBinding), nil @@ -206,29 +198,16 @@ func (c clusterRoleBindingFactory) Object() runtime.Object { } func (c clusterRoleBindingFactory) List() runtime.Object { - return &ClusterRoleBindingList{} + return &v1.ClusterRoleBindingList{} } func (s *clusterRoleBindingClient) Controller() ClusterRoleBindingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterRoleBindingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterRoleBindingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterRoleBindingGroupVersionResource, ClusterRoleBindingGroupVersionKind.Kind, false)) - c = &clusterRoleBindingController{ + return &clusterRoleBindingController{ GenericController: genericController, } - - s.client.clusterRoleBindingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterRoleBindingClient struct { @@ -262,6 +241,11 @@ func (s *clusterRoleBindingClient) Update(o *v1.ClusterRoleBinding) (*v1.Cluster return obj.(*v1.ClusterRoleBinding), err } +func (s *clusterRoleBindingClient) UpdateStatus(o *v1.ClusterRoleBinding) (*v1.ClusterRoleBinding, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.ClusterRoleBinding), err +} + func (s *clusterRoleBindingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -270,14 +254,14 @@ func (s *clusterRoleBindingClient) DeleteNamespaced(namespace, name string, opti return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *clusterRoleBindingClient) List(opts metav1.ListOptions) (*ClusterRoleBindingList, error) { +func (s *clusterRoleBindingClient) List(opts metav1.ListOptions) (*v1.ClusterRoleBindingList, error) { obj, err := s.objectClient.List(opts) - return obj.(*ClusterRoleBindingList), err + return obj.(*v1.ClusterRoleBindingList), err } -func (s *clusterRoleBindingClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ClusterRoleBindingList, error) { +func (s *clusterRoleBindingClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ClusterRoleBindingList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*ClusterRoleBindingList), err + return obj.(*v1.ClusterRoleBindingList), err } func (s *clusterRoleBindingClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_controller.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_controller.go index 7c8d74fe..a01250d6 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_controller.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_cluster_role_controller.go @@ -49,12 +49,6 @@ func NewClusterRole(namespace, name string, obj v1.ClusterRole) *v1.ClusterRole return &obj } -type ClusterRoleList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.ClusterRole `json:"items"` -} - type ClusterRoleHandlerFunc func(key string, obj *v1.ClusterRole) (runtime.Object, error) type ClusterRoleChangeHandlerFunc func(obj *v1.ClusterRole) (runtime.Object, error) @@ -74,8 +68,6 @@ type ClusterRoleController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterRoleHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type ClusterRoleInterface interface { @@ -86,8 +78,8 @@ type ClusterRoleInterface interface { Update(*v1.ClusterRole) (*v1.ClusterRole, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*ClusterRoleList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*ClusterRoleList, error) + List(opts metav1.ListOptions) (*v1.ClusterRoleList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ClusterRoleList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() ClusterRoleController @@ -126,7 +118,7 @@ func (l *clusterRoleLister) Get(namespace, name string) (*v1.ClusterRole, error) if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: ClusterRoleGroupVersionKind.Group, - Resource: "clusterRole", + Resource: ClusterRoleGroupVersionResource.Resource, }, key) } return obj.(*v1.ClusterRole), nil @@ -206,29 +198,16 @@ func (c clusterRoleFactory) Object() runtime.Object { } func (c clusterRoleFactory) List() runtime.Object { - return &ClusterRoleList{} + return &v1.ClusterRoleList{} } func (s *clusterRoleClient) Controller() ClusterRoleController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.clusterRoleControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(ClusterRoleGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(ClusterRoleGroupVersionResource, ClusterRoleGroupVersionKind.Kind, false)) - c = &clusterRoleController{ + return &clusterRoleController{ GenericController: genericController, } - - s.client.clusterRoleControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type clusterRoleClient struct { @@ -262,6 +241,11 @@ func (s *clusterRoleClient) Update(o *v1.ClusterRole) (*v1.ClusterRole, error) { return obj.(*v1.ClusterRole), err } +func (s *clusterRoleClient) UpdateStatus(o *v1.ClusterRole) (*v1.ClusterRole, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.ClusterRole), err +} + func (s *clusterRoleClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -270,14 +254,14 @@ func (s *clusterRoleClient) DeleteNamespaced(namespace, name string, options *me return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *clusterRoleClient) List(opts metav1.ListOptions) (*ClusterRoleList, error) { +func (s *clusterRoleClient) List(opts metav1.ListOptions) (*v1.ClusterRoleList, error) { obj, err := s.objectClient.List(opts) - return obj.(*ClusterRoleList), err + return obj.(*v1.ClusterRoleList), err } -func (s *clusterRoleClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ClusterRoleList, error) { +func (s *clusterRoleClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.ClusterRoleList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*ClusterRoleList), err + return obj.(*v1.ClusterRoleList), err } func (s *clusterRoleClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_deepcopy.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_deepcopy.go deleted file mode 100644 index bed46a57..00000000 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_deepcopy.go +++ /dev/null @@ -1,138 +0,0 @@ -package v1 - -import ( - rbacv1 "k8s.io/api/rbac/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRoleBindingList) DeepCopyInto(out *ClusterRoleBindingList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]rbacv1.ClusterRoleBinding, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleBindingList. -func (in *ClusterRoleBindingList) DeepCopy() *ClusterRoleBindingList { - if in == nil { - return nil - } - out := new(ClusterRoleBindingList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterRoleBindingList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ClusterRoleList) DeepCopyInto(out *ClusterRoleList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]rbacv1.ClusterRole, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClusterRoleList. -func (in *ClusterRoleList) DeepCopy() *ClusterRoleList { - if in == nil { - return nil - } - out := new(ClusterRoleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ClusterRoleList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RoleBindingList) DeepCopyInto(out *RoleBindingList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]rbacv1.RoleBinding, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleBindingList. -func (in *RoleBindingList) DeepCopy() *RoleBindingList { - if in == nil { - return nil - } - out := new(RoleBindingList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RoleBindingList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *RoleList) DeepCopyInto(out *RoleList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]rbacv1.Role, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RoleList. -func (in *RoleList) DeepCopy() *RoleList { - if in == nil { - return nil - } - out := new(RoleList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *RoleList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_k8s_client.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_k8s_client.go index ef1247a3..cceace80 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_k8s_client.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_k8s_client.go @@ -1,25 +1,12 @@ package v1 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" - "k8s.io/client-go/rest" -) - -type ( - contextKeyType struct{} - contextClientsKeyType struct{} ) type Interface interface { - RESTClient() rest.Interface - controller.Starter - ClusterRoleBindingsGetter ClusterRolesGetter RoleBindingsGetter @@ -27,54 +14,24 @@ type Interface interface { } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - clusterRoleBindingControllers map[string]ClusterRoleBindingController - clusterRoleControllers map[string]ClusterRoleController - roleBindingControllers map[string]RoleBindingController - roleControllers map[string]RoleController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer - } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) - if err != nil { - return nil, err - } - +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - clusterRoleBindingControllers: map[string]ClusterRoleBindingController{}, - clusterRoleControllers: map[string]ClusterRoleController{}, - roleBindingControllers: map[string]RoleBindingController{}, - roleControllers: map[string]RoleController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type ClusterRoleBindingsGetter interface { ClusterRoleBindings(namespace string) ClusterRoleBindingInterface } func (c *Client) ClusterRoleBindings(namespace string) ClusterRoleBindingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterRoleBindingResource, ClusterRoleBindingGroupVersionKind, clusterRoleBindingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterRoleBindingGroupVersionResource, ClusterRoleBindingGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterRoleBindingResource, ClusterRoleBindingGroupVersionKind, clusterRoleBindingFactory{}) return &clusterRoleBindingClient{ ns: namespace, client: c, @@ -87,7 +44,8 @@ type ClusterRolesGetter interface { } func (c *Client) ClusterRoles(namespace string) ClusterRoleInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ClusterRoleResource, ClusterRoleGroupVersionKind, clusterRoleFactory{}) + sharedClient := c.clientFactory.ForResourceKind(ClusterRoleGroupVersionResource, ClusterRoleGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &ClusterRoleResource, ClusterRoleGroupVersionKind, clusterRoleFactory{}) return &clusterRoleClient{ ns: namespace, client: c, @@ -100,7 +58,8 @@ type RoleBindingsGetter interface { } func (c *Client) RoleBindings(namespace string) RoleBindingInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RoleBindingResource, RoleBindingGroupVersionKind, roleBindingFactory{}) + sharedClient := c.clientFactory.ForResourceKind(RoleBindingGroupVersionResource, RoleBindingGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &RoleBindingResource, RoleBindingGroupVersionKind, roleBindingFactory{}) return &roleBindingClient{ ns: namespace, client: c, @@ -113,7 +72,8 @@ type RolesGetter interface { } func (c *Client) Roles(namespace string) RoleInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RoleResource, RoleGroupVersionKind, roleFactory{}) + sharedClient := c.clientFactory.ForResourceKind(RoleGroupVersionResource, RoleGroupVersionKind.Kind, true) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &RoleResource, RoleGroupVersionKind, roleFactory{}) return &roleClient{ ns: namespace, client: c, diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_controller.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_controller.go index f6f67f5f..51019c83 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_controller.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_binding_controller.go @@ -50,12 +50,6 @@ func NewRoleBinding(namespace, name string, obj v1.RoleBinding) *v1.RoleBinding return &obj } -type RoleBindingList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.RoleBinding `json:"items"` -} - type RoleBindingHandlerFunc func(key string, obj *v1.RoleBinding) (runtime.Object, error) type RoleBindingChangeHandlerFunc func(obj *v1.RoleBinding) (runtime.Object, error) @@ -75,8 +69,6 @@ type RoleBindingController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RoleBindingHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type RoleBindingInterface interface { @@ -87,8 +79,8 @@ type RoleBindingInterface interface { Update(*v1.RoleBinding) (*v1.RoleBinding, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*RoleBindingList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*RoleBindingList, error) + List(opts metav1.ListOptions) (*v1.RoleBindingList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.RoleBindingList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() RoleBindingController @@ -127,7 +119,7 @@ func (l *roleBindingLister) Get(namespace, name string) (*v1.RoleBinding, error) if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: RoleBindingGroupVersionKind.Group, - Resource: "roleBinding", + Resource: RoleBindingGroupVersionResource.Resource, }, key) } return obj.(*v1.RoleBinding), nil @@ -207,29 +199,16 @@ func (c roleBindingFactory) Object() runtime.Object { } func (c roleBindingFactory) List() runtime.Object { - return &RoleBindingList{} + return &v1.RoleBindingList{} } func (s *roleBindingClient) Controller() RoleBindingController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.roleBindingControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(RoleBindingGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(RoleBindingGroupVersionResource, RoleBindingGroupVersionKind.Kind, true)) - c = &roleBindingController{ + return &roleBindingController{ GenericController: genericController, } - - s.client.roleBindingControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type roleBindingClient struct { @@ -263,6 +242,11 @@ func (s *roleBindingClient) Update(o *v1.RoleBinding) (*v1.RoleBinding, error) { return obj.(*v1.RoleBinding), err } +func (s *roleBindingClient) UpdateStatus(o *v1.RoleBinding) (*v1.RoleBinding, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.RoleBinding), err +} + func (s *roleBindingClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *roleBindingClient) DeleteNamespaced(namespace, name string, options *me return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *roleBindingClient) List(opts metav1.ListOptions) (*RoleBindingList, error) { +func (s *roleBindingClient) List(opts metav1.ListOptions) (*v1.RoleBindingList, error) { obj, err := s.objectClient.List(opts) - return obj.(*RoleBindingList), err + return obj.(*v1.RoleBindingList), err } -func (s *roleBindingClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*RoleBindingList, error) { +func (s *roleBindingClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.RoleBindingList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*RoleBindingList), err + return obj.(*v1.RoleBindingList), err } func (s *roleBindingClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_controller.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_controller.go index 3c48d3d8..5d1f67bb 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_role_controller.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_role_controller.go @@ -50,12 +50,6 @@ func NewRole(namespace, name string, obj v1.Role) *v1.Role { return &obj } -type RoleList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.Role `json:"items"` -} - type RoleHandlerFunc func(key string, obj *v1.Role) (runtime.Object, error) type RoleChangeHandlerFunc func(obj *v1.Role) (runtime.Object, error) @@ -75,8 +69,6 @@ type RoleController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RoleHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type RoleInterface interface { @@ -87,8 +79,8 @@ type RoleInterface interface { Update(*v1.Role) (*v1.Role, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*RoleList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*RoleList, error) + List(opts metav1.ListOptions) (*v1.RoleList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.RoleList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() RoleController @@ -127,7 +119,7 @@ func (l *roleLister) Get(namespace, name string) (*v1.Role, error) { if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: RoleGroupVersionKind.Group, - Resource: "role", + Resource: RoleGroupVersionResource.Resource, }, key) } return obj.(*v1.Role), nil @@ -207,29 +199,16 @@ func (c roleFactory) Object() runtime.Object { } func (c roleFactory) List() runtime.Object { - return &RoleList{} + return &v1.RoleList{} } func (s *roleClient) Controller() RoleController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.roleControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(RoleGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(RoleGroupVersionResource, RoleGroupVersionKind.Kind, true)) - c = &roleController{ + return &roleController{ GenericController: genericController, } - - s.client.roleControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type roleClient struct { @@ -263,6 +242,11 @@ func (s *roleClient) Update(o *v1.Role) (*v1.Role, error) { return obj.(*v1.Role), err } +func (s *roleClient) UpdateStatus(o *v1.Role) (*v1.Role, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.Role), err +} + func (s *roleClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -271,14 +255,14 @@ func (s *roleClient) DeleteNamespaced(namespace, name string, options *metav1.De return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *roleClient) List(opts metav1.ListOptions) (*RoleList, error) { +func (s *roleClient) List(opts metav1.ListOptions) (*v1.RoleList, error) { obj, err := s.objectClient.List(opts) - return obj.(*RoleList), err + return obj.(*v1.RoleList), err } -func (s *roleClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*RoleList, error) { +func (s *roleClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.RoleList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*RoleList), err + return obj.(*v1.RoleList), err } func (s *roleClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/apis/rbac.authorization.k8s.io/v1/zz_generated_scheme.go b/apis/rbac.authorization.k8s.io/v1/zz_generated_scheme.go index 3f9ba918..a43ea121 100644 --- a/apis/rbac.authorization.k8s.io/v1/zz_generated_scheme.go +++ b/apis/rbac.authorization.k8s.io/v1/zz_generated_scheme.go @@ -1,8 +1,6 @@ package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -23,22 +21,3 @@ func Kind(kind string) schema.GroupKind { func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - // TODO this gets cleaned up when the types are fixed - scheme.AddKnownTypes(SchemeGroupVersion, - - &ClusterRoleBindingList{}, - &ClusterRoleList{}, - &RoleBindingList{}, - &RoleList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/apis/storage.k8s.io/v1/fakes/zz_generated_storage_class_mock.go b/apis/storage.k8s.io/v1/fakes/zz_generated_storage_class_mock.go index 8e165cc3..dc4827e4 100644 --- a/apis/storage.k8s.io/v1/fakes/zz_generated_storage_class_mock.go +++ b/apis/storage.k8s.io/v1/fakes/zz_generated_storage_class_mock.go @@ -151,8 +151,6 @@ var ( lockStorageClassControllerMockGeneric sync.RWMutex lockStorageClassControllerMockInformer sync.RWMutex lockStorageClassControllerMockLister sync.RWMutex - lockStorageClassControllerMockStart sync.RWMutex - lockStorageClassControllerMockSync sync.RWMutex ) // Ensure, that StorageClassControllerMock does implement StorageClassController. @@ -192,12 +190,6 @@ var _ v1a.StorageClassController = &StorageClassControllerMock{} // ListerFunc: func() v1a.StorageClassLister { // panic("mock out the Lister method") // }, -// StartFunc: func(ctx context.Context, threadiness int) error { -// panic("mock out the Start method") -// }, -// SyncFunc: func(ctx context.Context) error { -// panic("mock out the Sync method") -// }, // } // // // use mockedStorageClassController in code that requires StorageClassController @@ -232,12 +224,6 @@ type StorageClassControllerMock struct { // ListerFunc mocks the Lister method. ListerFunc func() v1a.StorageClassLister - // StartFunc mocks the Start method. - StartFunc func(ctx context.Context, threadiness int) error - - // SyncFunc mocks the Sync method. - SyncFunc func(ctx context.Context) error - // calls tracks calls to the methods. calls struct { // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. @@ -309,18 +295,6 @@ type StorageClassControllerMock struct { // Lister holds details about calls to the Lister method. Lister []struct { } - // Start holds details about calls to the Start method. - Start []struct { - // Ctx is the ctx argument value. - Ctx context.Context - // Threadiness is the threadiness argument value. - Threadiness int - } - // Sync holds details about calls to the Sync method. - Sync []struct { - // Ctx is the ctx argument value. - Ctx context.Context - } } } @@ -648,72 +622,6 @@ func (mock *StorageClassControllerMock) ListerCalls() []struct { return calls } -// Start calls StartFunc. -func (mock *StorageClassControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("StorageClassControllerMock.StartFunc: method is nil but StorageClassController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockStorageClassControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockStorageClassControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedStorageClassController.StartCalls()) -func (mock *StorageClassControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockStorageClassControllerMockStart.RLock() - calls = mock.calls.Start - lockStorageClassControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *StorageClassControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("StorageClassControllerMock.SyncFunc: method is nil but StorageClassController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockStorageClassControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockStorageClassControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedStorageClassController.SyncCalls()) -func (mock *StorageClassControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockStorageClassControllerMockSync.RLock() - calls = mock.calls.Sync - lockStorageClassControllerMockSync.RUnlock() - return calls -} - var ( lockStorageClassInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex lockStorageClassInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex @@ -792,10 +700,10 @@ var _ v1a.StorageClassInterface = &StorageClassInterfaceMock{} // GetNamespacedFunc: func(namespace string, name string, opts v1b.GetOptions) (*v1.StorageClass, error) { // panic("mock out the GetNamespaced method") // }, -// ListFunc: func(opts v1b.ListOptions) (*v1a.StorageClassList, error) { +// ListFunc: func(opts v1b.ListOptions) (*v1.StorageClassList, error) { // panic("mock out the List method") // }, -// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1a.StorageClassList, error) { +// ListNamespacedFunc: func(namespace string, opts v1b.ListOptions) (*v1.StorageClassList, error) { // panic("mock out the ListNamespaced method") // }, // ObjectClientFunc: func() *objectclient.ObjectClient { @@ -860,10 +768,10 @@ type StorageClassInterfaceMock struct { GetNamespacedFunc func(namespace string, name string, opts v1b.GetOptions) (*v1.StorageClass, error) // ListFunc mocks the List method. - ListFunc func(opts v1b.ListOptions) (*v1a.StorageClassList, error) + ListFunc func(opts v1b.ListOptions) (*v1.StorageClassList, error) // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1a.StorageClassList, error) + ListNamespacedFunc func(namespace string, opts v1b.ListOptions) (*v1.StorageClassList, error) // ObjectClientFunc mocks the ObjectClient method. ObjectClientFunc func() *objectclient.ObjectClient @@ -1624,7 +1532,7 @@ func (mock *StorageClassInterfaceMock) GetNamespacedCalls() []struct { } // List calls ListFunc. -func (mock *StorageClassInterfaceMock) List(opts v1b.ListOptions) (*v1a.StorageClassList, error) { +func (mock *StorageClassInterfaceMock) List(opts v1b.ListOptions) (*v1.StorageClassList, error) { if mock.ListFunc == nil { panic("StorageClassInterfaceMock.ListFunc: method is nil but StorageClassInterface.List was just called") } @@ -1655,7 +1563,7 @@ func (mock *StorageClassInterfaceMock) ListCalls() []struct { } // ListNamespaced calls ListNamespacedFunc. -func (mock *StorageClassInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1a.StorageClassList, error) { +func (mock *StorageClassInterfaceMock) ListNamespaced(namespace string, opts v1b.ListOptions) (*v1.StorageClassList, error) { if mock.ListNamespacedFunc == nil { panic("StorageClassInterfaceMock.ListNamespacedFunc: method is nil but StorageClassInterface.ListNamespaced was just called") } diff --git a/apis/storage.k8s.io/v1/zz_generated_deepcopy.go b/apis/storage.k8s.io/v1/zz_generated_deepcopy.go deleted file mode 100644 index 451557d7..00000000 --- a/apis/storage.k8s.io/v1/zz_generated_deepcopy.go +++ /dev/null @@ -1,39 +0,0 @@ -package v1 - -import ( - storagev1 "k8s.io/api/storage/v1" - runtime "k8s.io/apimachinery/pkg/runtime" -) - -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *StorageClassList) DeepCopyInto(out *StorageClassList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]storagev1.StorageClass, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StorageClassList. -func (in *StorageClassList) DeepCopy() *StorageClassList { - if in == nil { - return nil - } - out := new(StorageClassList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *StorageClassList) DeepCopyObject() runtime.Object { - if c := in.DeepCopy(); c != nil { - return c - } - return nil -} diff --git a/apis/storage.k8s.io/v1/zz_generated_k8s_client.go b/apis/storage.k8s.io/v1/zz_generated_k8s_client.go index 1a2895d9..1954ea40 100644 --- a/apis/storage.k8s.io/v1/zz_generated_k8s_client.go +++ b/apis/storage.k8s.io/v1/zz_generated_k8s_client.go @@ -1,71 +1,34 @@ package v1 import ( - "context" - "sync" - - "github.com/rancher/norman/controller" + "github.com/rancher/lasso/pkg/client" + "github.com/rancher/lasso/pkg/controller" "github.com/rancher/norman/objectclient" - "github.com/rancher/norman/objectclient/dynamic" - "github.com/rancher/norman/restwatch" - "k8s.io/client-go/rest" -) - -type ( - contextKeyType struct{} - contextClientsKeyType struct{} ) type Interface interface { - RESTClient() rest.Interface - controller.Starter - StorageClassesGetter } type Client struct { - sync.Mutex - restClient rest.Interface - starters []controller.Starter - - storageClassControllers map[string]StorageClassController + controllerFactory controller.SharedControllerFactory + clientFactory client.SharedClientFactory } -func NewForConfig(config rest.Config) (Interface, error) { - if config.NegotiatedSerializer == nil { - config.NegotiatedSerializer = dynamic.NegotiatedSerializer - } - - restClient, err := restwatch.UnversionedRESTClientFor(&config) - if err != nil { - return nil, err - } - +func NewFromControllerFactory(factory controller.SharedControllerFactory) (Interface, error) { return &Client{ - restClient: restClient, - - storageClassControllers: map[string]StorageClassController{}, + controllerFactory: factory, + clientFactory: factory.SharedCacheFactory().SharedClientFactory(), }, nil } -func (c *Client) RESTClient() rest.Interface { - return c.restClient -} - -func (c *Client) Sync(ctx context.Context) error { - return controller.Sync(ctx, c.starters...) -} - -func (c *Client) Start(ctx context.Context, threadiness int) error { - return controller.Start(ctx, threadiness, c.starters...) -} - type StorageClassesGetter interface { StorageClasses(namespace string) StorageClassInterface } func (c *Client) StorageClasses(namespace string) StorageClassInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &StorageClassResource, StorageClassGroupVersionKind, storageClassFactory{}) + sharedClient := c.clientFactory.ForResourceKind(StorageClassGroupVersionResource, StorageClassGroupVersionKind.Kind, false) + objectClient := objectclient.NewObjectClient(namespace, sharedClient, &StorageClassResource, StorageClassGroupVersionKind, storageClassFactory{}) return &storageClassClient{ ns: namespace, client: c, diff --git a/apis/storage.k8s.io/v1/zz_generated_scheme.go b/apis/storage.k8s.io/v1/zz_generated_scheme.go index 3ab02617..8e55ae1d 100644 --- a/apis/storage.k8s.io/v1/zz_generated_scheme.go +++ b/apis/storage.k8s.io/v1/zz_generated_scheme.go @@ -1,8 +1,6 @@ package v1 import ( - metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" - "k8s.io/apimachinery/pkg/runtime" "k8s.io/apimachinery/pkg/runtime/schema" ) @@ -23,19 +21,3 @@ func Kind(kind string) schema.GroupKind { func Resource(resource string) schema.GroupResource { return SchemeGroupVersion.WithResource(resource).GroupResource() } - -var ( - SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) - AddToScheme = SchemeBuilder.AddToScheme -) - -// Adds the list of known types to api.Scheme. -func addKnownTypes(scheme *runtime.Scheme) error { - // TODO this gets cleaned up when the types are fixed - scheme.AddKnownTypes(SchemeGroupVersion, - - &StorageClassList{}, - ) - metav1.AddToGroupVersion(scheme, SchemeGroupVersion) - return nil -} diff --git a/apis/storage.k8s.io/v1/zz_generated_storage_class_controller.go b/apis/storage.k8s.io/v1/zz_generated_storage_class_controller.go index d8aa1263..0634ea68 100644 --- a/apis/storage.k8s.io/v1/zz_generated_storage_class_controller.go +++ b/apis/storage.k8s.io/v1/zz_generated_storage_class_controller.go @@ -49,12 +49,6 @@ func NewStorageClass(namespace, name string, obj v1.StorageClass) *v1.StorageCla return &obj } -type StorageClassList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []v1.StorageClass `json:"items"` -} - type StorageClassHandlerFunc func(key string, obj *v1.StorageClass) (runtime.Object, error) type StorageClassChangeHandlerFunc func(obj *v1.StorageClass) (runtime.Object, error) @@ -74,8 +68,6 @@ type StorageClassController interface { AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler StorageClassHandlerFunc) Enqueue(namespace, name string) EnqueueAfter(namespace, name string, after time.Duration) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error } type StorageClassInterface interface { @@ -86,8 +78,8 @@ type StorageClassInterface interface { Update(*v1.StorageClass) (*v1.StorageClass, error) Delete(name string, options *metav1.DeleteOptions) error DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*StorageClassList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*StorageClassList, error) + List(opts metav1.ListOptions) (*v1.StorageClassList, error) + ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.StorageClassList, error) Watch(opts metav1.ListOptions) (watch.Interface, error) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error Controller() StorageClassController @@ -126,7 +118,7 @@ func (l *storageClassLister) Get(namespace, name string) (*v1.StorageClass, erro if !exists { return nil, errors.NewNotFound(schema.GroupResource{ Group: StorageClassGroupVersionKind.Group, - Resource: "storageClass", + Resource: StorageClassGroupVersionResource.Resource, }, key) } return obj.(*v1.StorageClass), nil @@ -206,29 +198,16 @@ func (c storageClassFactory) Object() runtime.Object { } func (c storageClassFactory) List() runtime.Object { - return &StorageClassList{} + return &v1.StorageClassList{} } func (s *storageClassClient) Controller() StorageClassController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.storageClassControllers[s.ns] - if ok { - return c - } - genericController := controller.NewGenericController(StorageClassGroupVersionKind.Kind+"Controller", - s.objectClient) + s.client.controllerFactory.ForResourceKind(StorageClassGroupVersionResource, StorageClassGroupVersionKind.Kind, false)) - c = &storageClassController{ + return &storageClassController{ GenericController: genericController, } - - s.client.storageClassControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c } type storageClassClient struct { @@ -262,6 +241,11 @@ func (s *storageClassClient) Update(o *v1.StorageClass) (*v1.StorageClass, error return obj.(*v1.StorageClass), err } +func (s *storageClassClient) UpdateStatus(o *v1.StorageClass) (*v1.StorageClass, error) { + obj, err := s.objectClient.UpdateStatus(o.Name, o) + return obj.(*v1.StorageClass), err +} + func (s *storageClassClient) Delete(name string, options *metav1.DeleteOptions) error { return s.objectClient.Delete(name, options) } @@ -270,14 +254,14 @@ func (s *storageClassClient) DeleteNamespaced(namespace, name string, options *m return s.objectClient.DeleteNamespaced(namespace, name, options) } -func (s *storageClassClient) List(opts metav1.ListOptions) (*StorageClassList, error) { +func (s *storageClassClient) List(opts metav1.ListOptions) (*v1.StorageClassList, error) { obj, err := s.objectClient.List(opts) - return obj.(*StorageClassList), err + return obj.(*v1.StorageClassList), err } -func (s *storageClassClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*StorageClassList, error) { +func (s *storageClassClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*v1.StorageClassList, error) { obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*StorageClassList), err + return obj.(*v1.StorageClassList), err } func (s *storageClassClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { diff --git a/client/management/v3/zz_generated_client.go b/client/management/v3/zz_generated_client.go index 1a3acf52..11eca52c 100644 --- a/client/management/v3/zz_generated_client.go +++ b/client/management/v3/zz_generated_client.go @@ -53,7 +53,7 @@ type Client struct { ClusterCatalog ClusterCatalogOperations MultiClusterApp MultiClusterAppOperations MultiClusterAppRevision MultiClusterAppRevisionOperations - GlobalDNS GlobalDNSOperations + GlobalDns GlobalDnsOperations GlobalDNSProvider GlobalDNSProviderOperations KontainerDriver KontainerDriverOperations EtcdBackup EtcdBackupOperations @@ -65,9 +65,9 @@ type Client struct { ManagementSecret ManagementSecretOperations ClusterTemplate ClusterTemplateOperations ClusterTemplateRevision ClusterTemplateRevisionOperations - RKEK8sSystemImage RKEK8sSystemImageOperations - RKEK8sServiceOption RKEK8sServiceOptionOperations - RKEAddon RKEAddonOperations + RkeK8sSystemImage RkeK8sSystemImageOperations + RkeK8sServiceOption RkeK8sServiceOptionOperations + RkeAddon RkeAddonOperations CisConfig CisConfigOperations CisBenchmarkVersion CisBenchmarkVersionOperations } @@ -128,7 +128,7 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) { client.ClusterCatalog = newClusterCatalogClient(client) client.MultiClusterApp = newMultiClusterAppClient(client) client.MultiClusterAppRevision = newMultiClusterAppRevisionClient(client) - client.GlobalDNS = newGlobalDNSClient(client) + client.GlobalDns = newGlobalDnsClient(client) client.GlobalDNSProvider = newGlobalDNSProviderClient(client) client.KontainerDriver = newKontainerDriverClient(client) client.EtcdBackup = newEtcdBackupClient(client) @@ -140,9 +140,9 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) { 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.RkeK8sSystemImage = newRkeK8sSystemImageClient(client) + client.RkeK8sServiceOption = newRkeK8sServiceOptionClient(client) + client.RkeAddon = newRkeAddonClient(client) client.CisConfig = newCisConfigClient(client) client.CisBenchmarkVersion = newCisBenchmarkVersionClient(client) diff --git a/client/management/v3/zz_generated_global_dns.go b/client/management/v3/zz_generated_global_dns.go index 28d6f9d6..2de8450e 100644 --- a/client/management/v3/zz_generated_global_dns.go +++ b/client/management/v3/zz_generated_global_dns.go @@ -5,28 +5,28 @@ import ( ) 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" + 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 { +type GlobalDns struct { types.Resource Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` Created string `json:"created,omitempty" yaml:"created,omitempty"` @@ -48,63 +48,63 @@ type GlobalDNS struct { UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` } -type GlobalDNSCollection struct { +type GlobalDnsCollection struct { types.Collection - Data []GlobalDNS `json:"data,omitempty"` - client *GlobalDNSClient + Data []GlobalDns `json:"data,omitempty"` + client *GlobalDnsClient } -type GlobalDNSClient struct { +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 +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 + ActionAddProjects(resource *GlobalDns, input *UpdateGlobalDNSTargetsInput) error - ActionRemoveProjects(resource *GlobalDNS, input *UpdateGlobalDNSTargetsInput) error + ActionRemoveProjects(resource *GlobalDns, input *UpdateGlobalDNSTargetsInput) error } -func newGlobalDNSClient(apiClient *Client) *GlobalDNSClient { - return &GlobalDNSClient{ +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) +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) +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) +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) +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{} +func (c *GlobalDnsClient) ListAll(opts *types.ListOpts) (*GlobalDnsCollection, error) { + resp := &GlobalDnsCollection{} resp, err := c.List(opts) if err != nil { return resp, err @@ -121,9 +121,9 @@ func (c *GlobalDNSClient) ListAll(opts *types.ListOpts) (*GlobalDNSCollection, e return resp, err } -func (cc *GlobalDNSCollection) Next() (*GlobalDNSCollection, error) { +func (cc *GlobalDnsCollection) Next() (*GlobalDnsCollection, error) { if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { - resp := &GlobalDNSCollection{} + resp := &GlobalDnsCollection{} err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) resp.client = cc.client return resp, err @@ -131,22 +131,22 @@ func (cc *GlobalDNSCollection) Next() (*GlobalDNSCollection, error) { return nil, nil } -func (c *GlobalDNSClient) ByID(id string) (*GlobalDNS, error) { - resp := &GlobalDNS{} - err := c.apiClient.Ops.DoByID(GlobalDNSType, id, resp) +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) 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) +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) +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/client/management/v3/zz_generated_rke_addon.go b/client/management/v3/zz_generated_rke_addon.go index a41db1ea..67719eed 100644 --- a/client/management/v3/zz_generated_rke_addon.go +++ b/client/management/v3/zz_generated_rke_addon.go @@ -5,19 +5,19 @@ import ( ) const ( - RKEAddonType = "rkeAddon" - RKEAddonFieldAnnotations = "annotations" - RKEAddonFieldCreated = "created" - RKEAddonFieldCreatorID = "creatorId" - RKEAddonFieldLabels = "labels" - RKEAddonFieldName = "name" - RKEAddonFieldOwnerReferences = "ownerReferences" - RKEAddonFieldRemoved = "removed" - RKEAddonFieldTemplate = "template" - RKEAddonFieldUUID = "uuid" + RkeAddonType = "rkeAddon" + RkeAddonFieldAnnotations = "annotations" + RkeAddonFieldCreated = "created" + RkeAddonFieldCreatorID = "creatorId" + RkeAddonFieldLabels = "labels" + RkeAddonFieldName = "name" + RkeAddonFieldOwnerReferences = "ownerReferences" + RkeAddonFieldRemoved = "removed" + RkeAddonFieldTemplate = "template" + RkeAddonFieldUUID = "uuid" ) -type RKEAddon struct { +type RkeAddon struct { types.Resource Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` Created string `json:"created,omitempty" yaml:"created,omitempty"` @@ -30,59 +30,59 @@ type RKEAddon struct { UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` } -type RKEAddonCollection struct { +type RkeAddonCollection struct { types.Collection - Data []RKEAddon `json:"data,omitempty"` - client *RKEAddonClient + Data []RkeAddon `json:"data,omitempty"` + client *RkeAddonClient } -type RKEAddonClient struct { +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 +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{ +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) +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) +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) +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) +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{} +func (c *RkeAddonClient) ListAll(opts *types.ListOpts) (*RkeAddonCollection, error) { + resp := &RkeAddonCollection{} resp, err := c.List(opts) if err != nil { return resp, err @@ -99,9 +99,9 @@ func (c *RKEAddonClient) ListAll(opts *types.ListOpts) (*RKEAddonCollection, err return resp, err } -func (cc *RKEAddonCollection) Next() (*RKEAddonCollection, error) { +func (cc *RkeAddonCollection) Next() (*RkeAddonCollection, error) { if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { - resp := &RKEAddonCollection{} + resp := &RkeAddonCollection{} err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) resp.client = cc.client return resp, err @@ -109,12 +109,12 @@ func (cc *RKEAddonCollection) Next() (*RKEAddonCollection, error) { return nil, nil } -func (c *RKEAddonClient) ByID(id string) (*RKEAddon, error) { - resp := &RKEAddon{} - err := c.apiClient.Ops.DoByID(RKEAddonType, id, resp) +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) +func (c *RkeAddonClient) Delete(container *RkeAddon) error { + return c.apiClient.Ops.DoResourceDelete(RkeAddonType, &container.Resource) } diff --git a/client/management/v3/zz_generated_rke_k8s_service_option.go b/client/management/v3/zz_generated_rke_k8s_service_option.go index a8f4a335..6c5173f0 100644 --- a/client/management/v3/zz_generated_rke_k8s_service_option.go +++ b/client/management/v3/zz_generated_rke_k8s_service_option.go @@ -5,19 +5,19 @@ import ( ) const ( - RKEK8sServiceOptionType = "rkeK8sServiceOption" - RKEK8sServiceOptionFieldAnnotations = "annotations" - RKEK8sServiceOptionFieldCreated = "created" - RKEK8sServiceOptionFieldCreatorID = "creatorId" - RKEK8sServiceOptionFieldLabels = "labels" - RKEK8sServiceOptionFieldName = "name" - RKEK8sServiceOptionFieldOwnerReferences = "ownerReferences" - RKEK8sServiceOptionFieldRemoved = "removed" - RKEK8sServiceOptionFieldServiceOptions = "serviceOptions" - RKEK8sServiceOptionFieldUUID = "uuid" + RkeK8sServiceOptionType = "rkeK8sServiceOption" + RkeK8sServiceOptionFieldAnnotations = "annotations" + RkeK8sServiceOptionFieldCreated = "created" + RkeK8sServiceOptionFieldCreatorID = "creatorId" + RkeK8sServiceOptionFieldLabels = "labels" + RkeK8sServiceOptionFieldName = "name" + RkeK8sServiceOptionFieldOwnerReferences = "ownerReferences" + RkeK8sServiceOptionFieldRemoved = "removed" + RkeK8sServiceOptionFieldServiceOptions = "serviceOptions" + RkeK8sServiceOptionFieldUUID = "uuid" ) -type RKEK8sServiceOption struct { +type RkeK8sServiceOption struct { types.Resource Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` Created string `json:"created,omitempty" yaml:"created,omitempty"` @@ -30,59 +30,59 @@ type RKEK8sServiceOption struct { UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` } -type RKEK8sServiceOptionCollection struct { +type RkeK8sServiceOptionCollection struct { types.Collection - Data []RKEK8sServiceOption `json:"data,omitempty"` - client *RKEK8sServiceOptionClient + Data []RkeK8sServiceOption `json:"data,omitempty"` + client *RkeK8sServiceOptionClient } -type RKEK8sServiceOptionClient struct { +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 +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{ +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) +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) +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) +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) +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{} +func (c *RkeK8sServiceOptionClient) ListAll(opts *types.ListOpts) (*RkeK8sServiceOptionCollection, error) { + resp := &RkeK8sServiceOptionCollection{} resp, err := c.List(opts) if err != nil { return resp, err @@ -99,9 +99,9 @@ func (c *RKEK8sServiceOptionClient) ListAll(opts *types.ListOpts) (*RKEK8sServic return resp, err } -func (cc *RKEK8sServiceOptionCollection) Next() (*RKEK8sServiceOptionCollection, error) { +func (cc *RkeK8sServiceOptionCollection) Next() (*RkeK8sServiceOptionCollection, error) { if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { - resp := &RKEK8sServiceOptionCollection{} + resp := &RkeK8sServiceOptionCollection{} err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) resp.client = cc.client return resp, err @@ -109,12 +109,12 @@ func (cc *RKEK8sServiceOptionCollection) Next() (*RKEK8sServiceOptionCollection, return nil, nil } -func (c *RKEK8sServiceOptionClient) ByID(id string) (*RKEK8sServiceOption, error) { - resp := &RKEK8sServiceOption{} - err := c.apiClient.Ops.DoByID(RKEK8sServiceOptionType, id, resp) +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) +func (c *RkeK8sServiceOptionClient) Delete(container *RkeK8sServiceOption) error { + return c.apiClient.Ops.DoResourceDelete(RkeK8sServiceOptionType, &container.Resource) } diff --git a/client/management/v3/zz_generated_rke_k8s_system_image.go b/client/management/v3/zz_generated_rke_k8s_system_image.go index 7c2d0885..3fb0e153 100644 --- a/client/management/v3/zz_generated_rke_k8s_system_image.go +++ b/client/management/v3/zz_generated_rke_k8s_system_image.go @@ -5,19 +5,19 @@ import ( ) const ( - RKEK8sSystemImageType = "rkeK8sSystemImage" - RKEK8sSystemImageFieldAnnotations = "annotations" - RKEK8sSystemImageFieldCreated = "created" - RKEK8sSystemImageFieldCreatorID = "creatorId" - RKEK8sSystemImageFieldLabels = "labels" - RKEK8sSystemImageFieldName = "name" - RKEK8sSystemImageFieldOwnerReferences = "ownerReferences" - RKEK8sSystemImageFieldRemoved = "removed" - RKEK8sSystemImageFieldSystemImages = "systemImages" - RKEK8sSystemImageFieldUUID = "uuid" + RkeK8sSystemImageType = "rkeK8sSystemImage" + RkeK8sSystemImageFieldAnnotations = "annotations" + RkeK8sSystemImageFieldCreated = "created" + RkeK8sSystemImageFieldCreatorID = "creatorId" + RkeK8sSystemImageFieldLabels = "labels" + RkeK8sSystemImageFieldName = "name" + RkeK8sSystemImageFieldOwnerReferences = "ownerReferences" + RkeK8sSystemImageFieldRemoved = "removed" + RkeK8sSystemImageFieldSystemImages = "systemImages" + RkeK8sSystemImageFieldUUID = "uuid" ) -type RKEK8sSystemImage struct { +type RkeK8sSystemImage struct { types.Resource Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` Created string `json:"created,omitempty" yaml:"created,omitempty"` @@ -30,59 +30,59 @@ type RKEK8sSystemImage struct { UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` } -type RKEK8sSystemImageCollection struct { +type RkeK8sSystemImageCollection struct { types.Collection - Data []RKEK8sSystemImage `json:"data,omitempty"` - client *RKEK8sSystemImageClient + Data []RkeK8sSystemImage `json:"data,omitempty"` + client *RkeK8sSystemImageClient } -type RKEK8sSystemImageClient struct { +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 +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{ +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) +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) +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) +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) +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{} +func (c *RkeK8sSystemImageClient) ListAll(opts *types.ListOpts) (*RkeK8sSystemImageCollection, error) { + resp := &RkeK8sSystemImageCollection{} resp, err := c.List(opts) if err != nil { return resp, err @@ -99,9 +99,9 @@ func (c *RKEK8sSystemImageClient) ListAll(opts *types.ListOpts) (*RKEK8sSystemIm return resp, err } -func (cc *RKEK8sSystemImageCollection) Next() (*RKEK8sSystemImageCollection, error) { +func (cc *RkeK8sSystemImageCollection) Next() (*RkeK8sSystemImageCollection, error) { if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { - resp := &RKEK8sSystemImageCollection{} + resp := &RkeK8sSystemImageCollection{} err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) resp.client = cc.client return resp, err @@ -109,12 +109,12 @@ func (cc *RKEK8sSystemImageCollection) Next() (*RKEK8sSystemImageCollection, err return nil, nil } -func (c *RKEK8sSystemImageClient) ByID(id string) (*RKEK8sSystemImage, error) { - resp := &RKEK8sSystemImage{} - err := c.apiClient.Ops.DoByID(RKEK8sSystemImageType, id, resp) +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) +func (c *RkeK8sSystemImageClient) Delete(container *RkeK8sSystemImage) error { + return c.apiClient.Ops.DoResourceDelete(RkeK8sSystemImageType, &container.Resource) } diff --git a/compose/zz_generated_compose.go b/compose/zz_generated_compose.go index fc94dfd0..1b49e2ac 100644 --- a/compose/zz_generated_compose.go +++ b/compose/zz_generated_compose.go @@ -53,7 +53,7 @@ type Config struct { ClusterCatalogs map[string]managementClient.ClusterCatalog `json:"clusterCatalogs,omitempty" yaml:"clusterCatalogs,omitempty"` MultiClusterApps map[string]managementClient.MultiClusterApp `json:"multiClusterApps,omitempty" yaml:"multiClusterApps,omitempty"` MultiClusterAppRevisions map[string]managementClient.MultiClusterAppRevision `json:"multiClusterAppRevisions,omitempty" yaml:"multiClusterAppRevisions,omitempty"` - GlobalDNSs map[string]managementClient.GlobalDNS `json:"globalDnses,omitempty" yaml:"globalDnses,omitempty"` + GlobalDnss map[string]managementClient.GlobalDns `json:"globalDnses,omitempty" yaml:"globalDnses,omitempty"` GlobalDNSProviders map[string]managementClient.GlobalDNSProvider `json:"globalDnsProviders,omitempty" yaml:"globalDnsProviders,omitempty"` KontainerDrivers map[string]managementClient.KontainerDriver `json:"kontainerDrivers,omitempty" yaml:"kontainerDrivers,omitempty"` EtcdBackups map[string]managementClient.EtcdBackup `json:"etcdBackups,omitempty" yaml:"etcdBackups,omitempty"` @@ -64,9 +64,9 @@ type Config struct { ManagementSecrets map[string]managementClient.ManagementSecret `json:"managementSecrets,omitempty" yaml:"managementSecrets,omitempty"` ClusterTemplates map[string]managementClient.ClusterTemplate `json:"clusterTemplates,omitempty" yaml:"clusterTemplates,omitempty"` ClusterTemplateRevisions map[string]managementClient.ClusterTemplateRevision `json:"clusterTemplateRevisions,omitempty" yaml:"clusterTemplateRevisions,omitempty"` - RKEK8sSystemImages map[string]managementClient.RKEK8sSystemImage `json:"rkeK8sSystemImages,omitempty" yaml:"rkeK8sSystemImages,omitempty"` - RKEK8sServiceOptions map[string]managementClient.RKEK8sServiceOption `json:"rkeK8sServiceOptions,omitempty" yaml:"rkeK8sServiceOptions,omitempty"` - RKEAddons map[string]managementClient.RKEAddon `json:"rkeAddons,omitempty" yaml:"rkeAddons,omitempty"` + RkeK8sSystemImages map[string]managementClient.RkeK8sSystemImage `json:"rkeK8sSystemImages,omitempty" yaml:"rkeK8sSystemImages,omitempty"` + RkeK8sServiceOptions map[string]managementClient.RkeK8sServiceOption `json:"rkeK8sServiceOptions,omitempty" yaml:"rkeK8sServiceOptions,omitempty"` + RkeAddons map[string]managementClient.RkeAddon `json:"rkeAddons,omitempty" yaml:"rkeAddons,omitempty"` CisConfigs map[string]managementClient.CisConfig `json:"cisConfigs,omitempty" yaml:"cisConfigs,omitempty"` CisBenchmarkVersions map[string]managementClient.CisBenchmarkVersion `json:"cisBenchmarkVersions,omitempty" yaml:"cisBenchmarkVersions,omitempty"`