From 7c47f85c089c16fb312ad12c96ea09478a5d6d99 Mon Sep 17 00:00:00 2001 From: kinarashah Date: Thu, 27 Jun 2019 11:53:52 -0700 Subject: [PATCH] go generate --- .../v3/fakes/zz_generated_rke_addon_mock.go | 1740 +++++++++++++++++ ...z_generated_rke_k8s_service_option_mock.go | 1740 +++++++++++++++++ .../zz_generated_rke_k8s_system_image_mock.go | 1740 +++++++++++++++++ ...rated_rke_k8s_windows_system_image_mock.go | 1740 +++++++++++++++++ .../v3/zz_generated_deepcopy.go | 259 +++ .../v3/zz_generated_k8s_client.go | 80 + .../v3/zz_generated_rke_addon_controller.go | 505 +++++ ...z_generated_rke_addon_lifecycle_adapter.go | 62 + ...rated_rke_k8s_service_option_controller.go | 505 +++++ ...ke_k8s_service_option_lifecycle_adapter.go | 62 + ...nerated_rke_k8s_system_image_controller.go | 505 +++++ ..._rke_k8s_system_image_lifecycle_adapter.go | 62 + ...rke_k8s_windows_system_image_controller.go | 505 +++++ ..._windows_system_image_lifecycle_adapter.go | 62 + .../v3/zz_generated_scheme.go | 8 + client/management/v3/zz_generated_client.go | 8 + ...z_generated_kubernetes_services_options.go | 18 + .../management/v3/zz_generated_rke_addon.go | 101 + .../v3/zz_generated_rke_k8s_service_option.go | 101 + .../v3/zz_generated_rke_k8s_system_image.go | 101 + ..._generated_rke_k8s_windows_system_image.go | 101 + .../v3/zz_generated_windows_system_images.go | 20 + compose/zz_generated_compose.go | 4 + 23 files changed, 10029 insertions(+) create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_rke_addon_mock.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_service_option_mock.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_system_image_mock.go create mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_windows_system_image_mock.go create mode 100644 apis/management.cattle.io/v3/zz_generated_rke_addon_controller.go create mode 100644 apis/management.cattle.io/v3/zz_generated_rke_addon_lifecycle_adapter.go create mode 100644 apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_controller.go create mode 100644 apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_lifecycle_adapter.go create mode 100644 apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_controller.go create mode 100644 apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_lifecycle_adapter.go create mode 100644 apis/management.cattle.io/v3/zz_generated_rke_k8s_windows_system_image_controller.go create mode 100644 apis/management.cattle.io/v3/zz_generated_rke_k8s_windows_system_image_lifecycle_adapter.go create mode 100644 client/management/v3/zz_generated_kubernetes_services_options.go create mode 100644 client/management/v3/zz_generated_rke_addon.go create mode 100644 client/management/v3/zz_generated_rke_k8s_service_option.go create mode 100644 client/management/v3/zz_generated_rke_k8s_system_image.go create mode 100644 client/management/v3/zz_generated_rke_k8s_windows_system_image.go create mode 100644 client/management/v3/zz_generated_windows_system_images.go 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 new file mode 100644 index 00000000..658ae622 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_rke_addon_mock.go @@ -0,0 +1,1740 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockRKEAddonListerMockGet sync.RWMutex + lockRKEAddonListerMockList sync.RWMutex +) + +// Ensure, that RKEAddonListerMock does implement RKEAddonLister. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEAddonLister = &RKEAddonListerMock{} + +// RKEAddonListerMock is a mock implementation of RKEAddonLister. +// +// func TestSomethingThatUsesRKEAddonLister(t *testing.T) { +// +// // 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) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedRKEAddonLister in code that requires RKEAddonLister +// // and then make assertions. +// +// } +type RKEAddonListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.RKEAddon, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.RKEAddon, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +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") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockRKEAddonListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + 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 { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockRKEAddonListerMockGet.RLock() + calls = mock.calls.Get + lockRKEAddonListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +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") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockRKEAddonListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + 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 { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockRKEAddonListerMockList.RLock() + calls = mock.calls.List + lockRKEAddonListerMockList.RUnlock() + return calls +} + +var ( + lockRKEAddonControllerMockAddClusterScopedFeatureHandler sync.RWMutex + lockRKEAddonControllerMockAddClusterScopedHandler sync.RWMutex + lockRKEAddonControllerMockAddFeatureHandler sync.RWMutex + lockRKEAddonControllerMockAddHandler sync.RWMutex + lockRKEAddonControllerMockEnqueue sync.RWMutex + lockRKEAddonControllerMockGeneric sync.RWMutex + lockRKEAddonControllerMockInformer sync.RWMutex + lockRKEAddonControllerMockLister sync.RWMutex + lockRKEAddonControllerMockStart sync.RWMutex + lockRKEAddonControllerMockSync sync.RWMutex +) + +// Ensure, that RKEAddonControllerMock does implement RKEAddonController. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEAddonController = &RKEAddonControllerMock{} + +// RKEAddonControllerMock is a mock implementation of RKEAddonController. +// +// 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) { +// panic("mock out the AddClusterScopedFeatureHandler method") +// }, +// 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) { +// panic("mock out the AddFeatureHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.RKEAddonHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// 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 +// // and then make assertions. +// +// } +type RKEAddonControllerMock struct { + // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. + 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) + + // AddFeatureHandlerFunc mocks the AddFeatureHandler method. + 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) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + 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 + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. + AddClusterScopedFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.RKEAddonHandlerFunc + } + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.RKEAddonHandlerFunc + } + // AddFeatureHandler holds details about calls to the AddFeatureHandler method. + AddFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.RKEAddonHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.RKEAddonHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []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) { + if mock.AddClusterScopedFeatureHandlerFunc == nil { + 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 + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockRKEAddonControllerMockAddClusterScopedFeatureHandler.Lock() + mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Handler v3.RKEAddonHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Handler v3.RKEAddonHandlerFunc + } + lockRKEAddonControllerMockAddClusterScopedFeatureHandler.RLock() + calls = mock.calls.AddClusterScopedFeatureHandler + lockRKEAddonControllerMockAddClusterScopedFeatureHandler.RUnlock() + return calls +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.RKEAddonHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockRKEAddonControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + 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 { + Ctx context.Context + Name string + ClusterName string + Handler v3.RKEAddonHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.RKEAddonHandlerFunc + } + lockRKEAddonControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockRKEAddonControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddFeatureHandler calls AddFeatureHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEAddonHandlerFunc + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + Sync: sync, + } + lockRKEAddonControllerMockAddFeatureHandler.Lock() + mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEAddonHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEAddonHandlerFunc + } + lockRKEAddonControllerMockAddFeatureHandler.RLock() + calls = mock.calls.AddFeatureHandler + lockRKEAddonControllerMockAddFeatureHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.RKEAddonHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockRKEAddonControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + 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 { + Ctx context.Context + Name string + Handler v3.RKEAddonHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.RKEAddonHandlerFunc + } + lockRKEAddonControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockRKEAddonControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *RKEAddonControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("RKEAddonControllerMock.EnqueueFunc: method is nil but RKEAddonController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockRKEAddonControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + 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 { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockRKEAddonControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockRKEAddonControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *RKEAddonControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("RKEAddonControllerMock.GenericFunc: method is nil but RKEAddonController.Generic was just called") + } + callInfo := struct { + }{} + lockRKEAddonControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + 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 { +} { + var calls []struct { + } + lockRKEAddonControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockRKEAddonControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *RKEAddonControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("RKEAddonControllerMock.InformerFunc: method is nil but RKEAddonController.Informer was just called") + } + callInfo := struct { + }{} + lockRKEAddonControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + 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 { +} { + var calls []struct { + } + lockRKEAddonControllerMockInformer.RLock() + calls = mock.calls.Informer + lockRKEAddonControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *RKEAddonControllerMock) Lister() v3.RKEAddonLister { + if mock.ListerFunc == nil { + panic("RKEAddonControllerMock.ListerFunc: method is nil but RKEAddonController.Lister was just called") + } + callInfo := struct { + }{} + lockRKEAddonControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + 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 { +} { + var calls []struct { + } + 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() + 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 + lockRKEAddonInterfaceMockObjectClient sync.RWMutex + lockRKEAddonInterfaceMockUpdate sync.RWMutex + lockRKEAddonInterfaceMockWatch sync.RWMutex +) + +// Ensure, that RKEAddonInterfaceMock does implement RKEAddonInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEAddonInterface = &RKEAddonInterfaceMock{} + +// RKEAddonInterfaceMock is a mock implementation of RKEAddonInterface. +// +// 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) { +// panic("mock out the AddClusterScopedFeatureHandler method") +// }, +// 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) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// 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) { +// panic("mock out the AddFeatureHandler method") +// }, +// 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) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.RKEAddonLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.RKEAddonController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.RKEAddon) (*v3.RKEAddon, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// 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) { +// panic("mock out the Get method") +// }, +// 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) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.RKEAddon) (*v3.RKEAddon, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedRKEAddonInterface in code that requires RKEAddonInterface +// // and then make assertions. +// +// } +type RKEAddonInterfaceMock struct { + // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. + 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) + + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + 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) + + // AddFeatureHandlerFunc mocks the AddFeatureHandler method. + 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) + + // AddHandlerFunc mocks the AddHandler method. + 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) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.RKEAddonController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.RKEAddon) (*v3.RKEAddon, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + 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) + + // GetNamespacedFunc mocks the GetNamespaced method. + 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) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.RKEAddon) (*v3.RKEAddon, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. + AddClusterScopedFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.RKEAddonHandlerFunc + } + // AddClusterScopedFeatureLifecycle holds details about calls to the AddClusterScopedFeatureLifecycle method. + AddClusterScopedFeatureLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEAddonLifecycle + } + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.RKEAddonHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEAddonLifecycle + } + // AddFeatureHandler holds details about calls to the AddFeatureHandler method. + AddFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.RKEAddonHandlerFunc + } + // AddFeatureLifecycle holds details about calls to the AddFeatureLifecycle method. + AddFeatureLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEAddonLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.RKEAddonHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEAddonLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.RKEAddon + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.RKEAddon + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Sync v3.RKEAddonHandlerFunc + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockRKEAddonInterfaceMockAddClusterScopedFeatureHandler.Lock() + mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Sync v3.RKEAddonHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Sync v3.RKEAddonHandlerFunc + } + lockRKEAddonInterfaceMockAddClusterScopedFeatureHandler.RLock() + calls = mock.calls.AddClusterScopedFeatureHandler + lockRKEAddonInterfaceMockAddClusterScopedFeatureHandler.RUnlock() + return calls +} + +// AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Lifecycle v3.RKEAddonLifecycle + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockRKEAddonInterfaceMockAddClusterScopedFeatureLifecycle.Lock() + mock.calls.AddClusterScopedFeatureLifecycle = append(mock.calls.AddClusterScopedFeatureLifecycle, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Lifecycle v3.RKEAddonLifecycle +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Lifecycle v3.RKEAddonLifecycle + } + lockRKEAddonInterfaceMockAddClusterScopedFeatureLifecycle.RLock() + calls = mock.calls.AddClusterScopedFeatureLifecycle + lockRKEAddonInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock() + return calls +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.RKEAddonHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockRKEAddonInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + 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 { + Ctx context.Context + Name string + ClusterName string + Sync v3.RKEAddonHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.RKEAddonHandlerFunc + } + lockRKEAddonInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockRKEAddonInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RKEAddonLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockRKEAddonInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + 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 { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RKEAddonLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RKEAddonLifecycle + } + lockRKEAddonInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockRKEAddonInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddFeatureHandler calls AddFeatureHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEAddonHandlerFunc + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + Sync: sync, + } + lockRKEAddonInterfaceMockAddFeatureHandler.Lock() + mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEAddonHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEAddonHandlerFunc + } + lockRKEAddonInterfaceMockAddFeatureHandler.RLock() + calls = mock.calls.AddFeatureHandler + lockRKEAddonInterfaceMockAddFeatureHandler.RUnlock() + return calls +} + +// AddFeatureLifecycle calls AddFeatureLifecycleFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + Lifecycle v3.RKEAddonLifecycle + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + Lifecycle: lifecycle, + } + lockRKEAddonInterfaceMockAddFeatureLifecycle.Lock() + mock.calls.AddFeatureLifecycle = append(mock.calls.AddFeatureLifecycle, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + Lifecycle v3.RKEAddonLifecycle +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + Lifecycle v3.RKEAddonLifecycle + } + lockRKEAddonInterfaceMockAddFeatureLifecycle.RLock() + calls = mock.calls.AddFeatureLifecycle + lockRKEAddonInterfaceMockAddFeatureLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.RKEAddonHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockRKEAddonInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + 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 { + Ctx context.Context + Name string + Sync v3.RKEAddonHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.RKEAddonHandlerFunc + } + lockRKEAddonInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockRKEAddonInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.RKEAddonLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockRKEAddonInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + 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 { + Ctx context.Context + Name string + Lifecycle v3.RKEAddonLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.RKEAddonLifecycle + } + lockRKEAddonInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockRKEAddonInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *RKEAddonInterfaceMock) Controller() v3.RKEAddonController { + if mock.ControllerFunc == nil { + panic("RKEAddonInterfaceMock.ControllerFunc: method is nil but RKEAddonInterface.Controller was just called") + } + callInfo := struct { + }{} + lockRKEAddonInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + 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 { +} { + var calls []struct { + } + lockRKEAddonInterfaceMockController.RLock() + calls = mock.calls.Controller + lockRKEAddonInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +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") + } + callInfo := struct { + In1 *v3.RKEAddon + }{ + In1: in1, + } + lockRKEAddonInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + 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 +} { + var calls []struct { + In1 *v3.RKEAddon + } + lockRKEAddonInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockRKEAddonInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +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") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockRKEAddonInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + 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 { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockRKEAddonInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockRKEAddonInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +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") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockRKEAddonInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + 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 { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockRKEAddonInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockRKEAddonInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +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") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockRKEAddonInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + 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 { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockRKEAddonInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockRKEAddonInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +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") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockRKEAddonInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + 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 { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockRKEAddonInterfaceMockGet.RLock() + calls = mock.calls.Get + lockRKEAddonInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +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") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockRKEAddonInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + 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 { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockRKEAddonInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockRKEAddonInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +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") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockRKEAddonInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + 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 { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockRKEAddonInterfaceMockList.RLock() + calls = mock.calls.List + lockRKEAddonInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *RKEAddonInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("RKEAddonInterfaceMock.ObjectClientFunc: method is nil but RKEAddonInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockRKEAddonInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + 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 { +} { + var calls []struct { + } + lockRKEAddonInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockRKEAddonInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +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") + } + callInfo := struct { + In1 *v3.RKEAddon + }{ + In1: in1, + } + lockRKEAddonInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + 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 +} { + var calls []struct { + In1 *v3.RKEAddon + } + lockRKEAddonInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockRKEAddonInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +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") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockRKEAddonInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + 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 { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockRKEAddonInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockRKEAddonInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockRKEAddonsGetterMockRKEAddons sync.RWMutex +) + +// Ensure, that RKEAddonsGetterMock does implement RKEAddonsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEAddonsGetter = &RKEAddonsGetterMock{} + +// RKEAddonsGetterMock is a mock implementation of RKEAddonsGetter. +// +// 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") +// }, +// } +// +// // 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 + + // calls tracks calls to the methods. + calls 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") + } + callInfo := struct { + Namespace string + }{ + Namespace: 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. +// Check the length with: +// len(mockedRKEAddonsGetter.RKEAddonsCalls()) +func (mock *RKEAddonsGetterMock) RKEAddonsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + 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 new file mode 100644 index 00000000..07896ab0 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_service_option_mock.go @@ -0,0 +1,1740 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockRKEK8sServiceOptionListerMockGet sync.RWMutex + lockRKEK8sServiceOptionListerMockList sync.RWMutex +) + +// Ensure, that RKEK8sServiceOptionListerMock does implement RKEK8sServiceOptionLister. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEK8sServiceOptionLister = &RKEK8sServiceOptionListerMock{} + +// RKEK8sServiceOptionListerMock is a mock implementation of RKEK8sServiceOptionLister. +// +// func TestSomethingThatUsesRKEK8sServiceOptionLister(t *testing.T) { +// +// // 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) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedRKEK8sServiceOptionLister in code that requires RKEK8sServiceOptionLister +// // and then make assertions. +// +// } +type RKEK8sServiceOptionListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.RKEK8sServiceOption, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.RKEK8sServiceOption, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +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") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockRKEK8sServiceOptionListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + 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 { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockRKEK8sServiceOptionListerMockGet.RLock() + calls = mock.calls.Get + lockRKEK8sServiceOptionListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +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") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockRKEK8sServiceOptionListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + 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 { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockRKEK8sServiceOptionListerMockList.RLock() + calls = mock.calls.List + lockRKEK8sServiceOptionListerMockList.RUnlock() + return calls +} + +var ( + lockRKEK8sServiceOptionControllerMockAddClusterScopedFeatureHandler sync.RWMutex + lockRKEK8sServiceOptionControllerMockAddClusterScopedHandler sync.RWMutex + lockRKEK8sServiceOptionControllerMockAddFeatureHandler sync.RWMutex + lockRKEK8sServiceOptionControllerMockAddHandler sync.RWMutex + lockRKEK8sServiceOptionControllerMockEnqueue sync.RWMutex + lockRKEK8sServiceOptionControllerMockGeneric sync.RWMutex + lockRKEK8sServiceOptionControllerMockInformer sync.RWMutex + lockRKEK8sServiceOptionControllerMockLister sync.RWMutex + lockRKEK8sServiceOptionControllerMockStart sync.RWMutex + lockRKEK8sServiceOptionControllerMockSync sync.RWMutex +) + +// Ensure, that RKEK8sServiceOptionControllerMock does implement RKEK8sServiceOptionController. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEK8sServiceOptionController = &RKEK8sServiceOptionControllerMock{} + +// RKEK8sServiceOptionControllerMock is a mock implementation of RKEK8sServiceOptionController. +// +// 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) { +// panic("mock out the AddClusterScopedFeatureHandler method") +// }, +// 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) { +// panic("mock out the AddFeatureHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.RKEK8sServiceOptionHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// 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 +// // and then make assertions. +// +// } +type RKEK8sServiceOptionControllerMock struct { + // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. + 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) + + // AddFeatureHandlerFunc mocks the AddFeatureHandler method. + 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) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + 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 + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. + AddClusterScopedFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.RKEK8sServiceOptionHandlerFunc + } + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.RKEK8sServiceOptionHandlerFunc + } + // AddFeatureHandler holds details about calls to the AddFeatureHandler method. + AddFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.RKEK8sServiceOptionHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.RKEK8sServiceOptionHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []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) { + if mock.AddClusterScopedFeatureHandlerFunc == nil { + 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 + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockRKEK8sServiceOptionControllerMockAddClusterScopedFeatureHandler.Lock() + mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Handler v3.RKEK8sServiceOptionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Handler v3.RKEK8sServiceOptionHandlerFunc + } + lockRKEK8sServiceOptionControllerMockAddClusterScopedFeatureHandler.RLock() + calls = mock.calls.AddClusterScopedFeatureHandler + lockRKEK8sServiceOptionControllerMockAddClusterScopedFeatureHandler.RUnlock() + return calls +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.RKEK8sServiceOptionHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockRKEK8sServiceOptionControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + 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 { + Ctx context.Context + Name string + ClusterName string + Handler v3.RKEK8sServiceOptionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.RKEK8sServiceOptionHandlerFunc + } + lockRKEK8sServiceOptionControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockRKEK8sServiceOptionControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddFeatureHandler calls AddFeatureHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sServiceOptionHandlerFunc + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + Sync: sync, + } + lockRKEK8sServiceOptionControllerMockAddFeatureHandler.Lock() + mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sServiceOptionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sServiceOptionHandlerFunc + } + lockRKEK8sServiceOptionControllerMockAddFeatureHandler.RLock() + calls = mock.calls.AddFeatureHandler + lockRKEK8sServiceOptionControllerMockAddFeatureHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.RKEK8sServiceOptionHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockRKEK8sServiceOptionControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + 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 { + Ctx context.Context + Name string + Handler v3.RKEK8sServiceOptionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.RKEK8sServiceOptionHandlerFunc + } + lockRKEK8sServiceOptionControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockRKEK8sServiceOptionControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *RKEK8sServiceOptionControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("RKEK8sServiceOptionControllerMock.EnqueueFunc: method is nil but RKEK8sServiceOptionController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockRKEK8sServiceOptionControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + 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 { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockRKEK8sServiceOptionControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockRKEK8sServiceOptionControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *RKEK8sServiceOptionControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("RKEK8sServiceOptionControllerMock.GenericFunc: method is nil but RKEK8sServiceOptionController.Generic was just called") + } + callInfo := struct { + }{} + lockRKEK8sServiceOptionControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + 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 { +} { + var calls []struct { + } + lockRKEK8sServiceOptionControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockRKEK8sServiceOptionControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *RKEK8sServiceOptionControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("RKEK8sServiceOptionControllerMock.InformerFunc: method is nil but RKEK8sServiceOptionController.Informer was just called") + } + callInfo := struct { + }{} + lockRKEK8sServiceOptionControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + 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 { +} { + var calls []struct { + } + lockRKEK8sServiceOptionControllerMockInformer.RLock() + calls = mock.calls.Informer + lockRKEK8sServiceOptionControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *RKEK8sServiceOptionControllerMock) Lister() v3.RKEK8sServiceOptionLister { + if mock.ListerFunc == nil { + panic("RKEK8sServiceOptionControllerMock.ListerFunc: method is nil but RKEK8sServiceOptionController.Lister was just called") + } + callInfo := struct { + }{} + lockRKEK8sServiceOptionControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + 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 { +} { + var calls []struct { + } + 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() + 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 + lockRKEK8sServiceOptionInterfaceMockObjectClient sync.RWMutex + lockRKEK8sServiceOptionInterfaceMockUpdate sync.RWMutex + lockRKEK8sServiceOptionInterfaceMockWatch sync.RWMutex +) + +// Ensure, that RKEK8sServiceOptionInterfaceMock does implement RKEK8sServiceOptionInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEK8sServiceOptionInterface = &RKEK8sServiceOptionInterfaceMock{} + +// RKEK8sServiceOptionInterfaceMock is a mock implementation of RKEK8sServiceOptionInterface. +// +// 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) { +// panic("mock out the AddClusterScopedFeatureHandler method") +// }, +// 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) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// 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) { +// panic("mock out the AddFeatureHandler method") +// }, +// 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) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.RKEK8sServiceOptionLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.RKEK8sServiceOptionController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.RKEK8sServiceOption) (*v3.RKEK8sServiceOption, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// 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) { +// panic("mock out the Get method") +// }, +// 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) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.RKEK8sServiceOption) (*v3.RKEK8sServiceOption, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedRKEK8sServiceOptionInterface in code that requires RKEK8sServiceOptionInterface +// // and then make assertions. +// +// } +type RKEK8sServiceOptionInterfaceMock struct { + // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. + 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) + + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + 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) + + // AddFeatureHandlerFunc mocks the AddFeatureHandler method. + 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) + + // AddHandlerFunc mocks the AddHandler method. + 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) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.RKEK8sServiceOptionController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.RKEK8sServiceOption) (*v3.RKEK8sServiceOption, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + 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) + + // GetNamespacedFunc mocks the GetNamespaced method. + 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) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.RKEK8sServiceOption) (*v3.RKEK8sServiceOption, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. + AddClusterScopedFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.RKEK8sServiceOptionHandlerFunc + } + // AddClusterScopedFeatureLifecycle holds details about calls to the AddClusterScopedFeatureLifecycle method. + AddClusterScopedFeatureLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEK8sServiceOptionLifecycle + } + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.RKEK8sServiceOptionHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEK8sServiceOptionLifecycle + } + // AddFeatureHandler holds details about calls to the AddFeatureHandler method. + AddFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.RKEK8sServiceOptionHandlerFunc + } + // AddFeatureLifecycle holds details about calls to the AddFeatureLifecycle method. + AddFeatureLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEK8sServiceOptionLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.RKEK8sServiceOptionHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEK8sServiceOptionLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.RKEK8sServiceOption + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.RKEK8sServiceOption + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Sync v3.RKEK8sServiceOptionHandlerFunc + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureHandler.Lock() + mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Sync v3.RKEK8sServiceOptionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Sync v3.RKEK8sServiceOptionHandlerFunc + } + lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureHandler.RLock() + calls = mock.calls.AddClusterScopedFeatureHandler + lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureHandler.RUnlock() + return calls +} + +// AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Lifecycle v3.RKEK8sServiceOptionLifecycle + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureLifecycle.Lock() + mock.calls.AddClusterScopedFeatureLifecycle = append(mock.calls.AddClusterScopedFeatureLifecycle, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Lifecycle v3.RKEK8sServiceOptionLifecycle +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Lifecycle v3.RKEK8sServiceOptionLifecycle + } + lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureLifecycle.RLock() + calls = mock.calls.AddClusterScopedFeatureLifecycle + lockRKEK8sServiceOptionInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock() + return calls +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.RKEK8sServiceOptionHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockRKEK8sServiceOptionInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + 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 { + Ctx context.Context + Name string + ClusterName string + Sync v3.RKEK8sServiceOptionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.RKEK8sServiceOptionHandlerFunc + } + lockRKEK8sServiceOptionInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockRKEK8sServiceOptionInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RKEK8sServiceOptionLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockRKEK8sServiceOptionInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + 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 { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RKEK8sServiceOptionLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RKEK8sServiceOptionLifecycle + } + lockRKEK8sServiceOptionInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockRKEK8sServiceOptionInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddFeatureHandler calls AddFeatureHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sServiceOptionHandlerFunc + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + Sync: sync, + } + lockRKEK8sServiceOptionInterfaceMockAddFeatureHandler.Lock() + mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sServiceOptionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sServiceOptionHandlerFunc + } + lockRKEK8sServiceOptionInterfaceMockAddFeatureHandler.RLock() + calls = mock.calls.AddFeatureHandler + lockRKEK8sServiceOptionInterfaceMockAddFeatureHandler.RUnlock() + return calls +} + +// AddFeatureLifecycle calls AddFeatureLifecycleFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + Lifecycle v3.RKEK8sServiceOptionLifecycle + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + Lifecycle: lifecycle, + } + lockRKEK8sServiceOptionInterfaceMockAddFeatureLifecycle.Lock() + mock.calls.AddFeatureLifecycle = append(mock.calls.AddFeatureLifecycle, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + Lifecycle v3.RKEK8sServiceOptionLifecycle +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + Lifecycle v3.RKEK8sServiceOptionLifecycle + } + lockRKEK8sServiceOptionInterfaceMockAddFeatureLifecycle.RLock() + calls = mock.calls.AddFeatureLifecycle + lockRKEK8sServiceOptionInterfaceMockAddFeatureLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.RKEK8sServiceOptionHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockRKEK8sServiceOptionInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + 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 { + Ctx context.Context + Name string + Sync v3.RKEK8sServiceOptionHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.RKEK8sServiceOptionHandlerFunc + } + lockRKEK8sServiceOptionInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockRKEK8sServiceOptionInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.RKEK8sServiceOptionLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockRKEK8sServiceOptionInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + 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 { + Ctx context.Context + Name string + Lifecycle v3.RKEK8sServiceOptionLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.RKEK8sServiceOptionLifecycle + } + lockRKEK8sServiceOptionInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockRKEK8sServiceOptionInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *RKEK8sServiceOptionInterfaceMock) Controller() v3.RKEK8sServiceOptionController { + if mock.ControllerFunc == nil { + panic("RKEK8sServiceOptionInterfaceMock.ControllerFunc: method is nil but RKEK8sServiceOptionInterface.Controller was just called") + } + callInfo := struct { + }{} + lockRKEK8sServiceOptionInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + 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 { +} { + var calls []struct { + } + lockRKEK8sServiceOptionInterfaceMockController.RLock() + calls = mock.calls.Controller + lockRKEK8sServiceOptionInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +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") + } + callInfo := struct { + In1 *v3.RKEK8sServiceOption + }{ + In1: in1, + } + lockRKEK8sServiceOptionInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + 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 +} { + var calls []struct { + In1 *v3.RKEK8sServiceOption + } + lockRKEK8sServiceOptionInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockRKEK8sServiceOptionInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +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") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockRKEK8sServiceOptionInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + 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 { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockRKEK8sServiceOptionInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockRKEK8sServiceOptionInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +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") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockRKEK8sServiceOptionInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + 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 { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockRKEK8sServiceOptionInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockRKEK8sServiceOptionInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +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") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockRKEK8sServiceOptionInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + 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 { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockRKEK8sServiceOptionInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockRKEK8sServiceOptionInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +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") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockRKEK8sServiceOptionInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + 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 { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockRKEK8sServiceOptionInterfaceMockGet.RLock() + calls = mock.calls.Get + lockRKEK8sServiceOptionInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +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") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockRKEK8sServiceOptionInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + 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 { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockRKEK8sServiceOptionInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockRKEK8sServiceOptionInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +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") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockRKEK8sServiceOptionInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + 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 { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockRKEK8sServiceOptionInterfaceMockList.RLock() + calls = mock.calls.List + lockRKEK8sServiceOptionInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *RKEK8sServiceOptionInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("RKEK8sServiceOptionInterfaceMock.ObjectClientFunc: method is nil but RKEK8sServiceOptionInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockRKEK8sServiceOptionInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + 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 { +} { + var calls []struct { + } + lockRKEK8sServiceOptionInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockRKEK8sServiceOptionInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +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") + } + callInfo := struct { + In1 *v3.RKEK8sServiceOption + }{ + In1: in1, + } + lockRKEK8sServiceOptionInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + 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 +} { + var calls []struct { + In1 *v3.RKEK8sServiceOption + } + lockRKEK8sServiceOptionInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockRKEK8sServiceOptionInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +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") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockRKEK8sServiceOptionInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + 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 { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockRKEK8sServiceOptionInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockRKEK8sServiceOptionInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockRKEK8sServiceOptionsGetterMockRKEK8sServiceOptions sync.RWMutex +) + +// Ensure, that RKEK8sServiceOptionsGetterMock does implement RKEK8sServiceOptionsGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEK8sServiceOptionsGetter = &RKEK8sServiceOptionsGetterMock{} + +// RKEK8sServiceOptionsGetterMock is a mock implementation of RKEK8sServiceOptionsGetter. +// +// 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") +// }, +// } +// +// // 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 + + // calls tracks calls to the methods. + calls 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") + } + callInfo := struct { + Namespace string + }{ + Namespace: 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. +// Check the length with: +// len(mockedRKEK8sServiceOptionsGetter.RKEK8sServiceOptionsCalls()) +func (mock *RKEK8sServiceOptionsGetterMock) RKEK8sServiceOptionsCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + 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 new file mode 100644 index 00000000..cbc4d767 --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_system_image_mock.go @@ -0,0 +1,1740 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockRKEK8sSystemImageListerMockGet sync.RWMutex + lockRKEK8sSystemImageListerMockList sync.RWMutex +) + +// Ensure, that RKEK8sSystemImageListerMock does implement RKEK8sSystemImageLister. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEK8sSystemImageLister = &RKEK8sSystemImageListerMock{} + +// RKEK8sSystemImageListerMock is a mock implementation of RKEK8sSystemImageLister. +// +// func TestSomethingThatUsesRKEK8sSystemImageLister(t *testing.T) { +// +// // 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) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedRKEK8sSystemImageLister in code that requires RKEK8sSystemImageLister +// // and then make assertions. +// +// } +type RKEK8sSystemImageListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.RKEK8sSystemImage, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.RKEK8sSystemImage, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +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") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockRKEK8sSystemImageListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + 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 { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockRKEK8sSystemImageListerMockGet.RLock() + calls = mock.calls.Get + lockRKEK8sSystemImageListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +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") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockRKEK8sSystemImageListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + 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 { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockRKEK8sSystemImageListerMockList.RLock() + calls = mock.calls.List + lockRKEK8sSystemImageListerMockList.RUnlock() + return calls +} + +var ( + lockRKEK8sSystemImageControllerMockAddClusterScopedFeatureHandler sync.RWMutex + lockRKEK8sSystemImageControllerMockAddClusterScopedHandler sync.RWMutex + lockRKEK8sSystemImageControllerMockAddFeatureHandler sync.RWMutex + lockRKEK8sSystemImageControllerMockAddHandler sync.RWMutex + lockRKEK8sSystemImageControllerMockEnqueue sync.RWMutex + lockRKEK8sSystemImageControllerMockGeneric sync.RWMutex + lockRKEK8sSystemImageControllerMockInformer sync.RWMutex + lockRKEK8sSystemImageControllerMockLister sync.RWMutex + lockRKEK8sSystemImageControllerMockStart sync.RWMutex + lockRKEK8sSystemImageControllerMockSync sync.RWMutex +) + +// Ensure, that RKEK8sSystemImageControllerMock does implement RKEK8sSystemImageController. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEK8sSystemImageController = &RKEK8sSystemImageControllerMock{} + +// RKEK8sSystemImageControllerMock is a mock implementation of RKEK8sSystemImageController. +// +// 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) { +// panic("mock out the AddClusterScopedFeatureHandler method") +// }, +// 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) { +// panic("mock out the AddFeatureHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.RKEK8sSystemImageHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// 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 +// // and then make assertions. +// +// } +type RKEK8sSystemImageControllerMock struct { + // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. + 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) + + // AddFeatureHandlerFunc mocks the AddFeatureHandler method. + 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) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + 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 + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. + AddClusterScopedFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.RKEK8sSystemImageHandlerFunc + } + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.RKEK8sSystemImageHandlerFunc + } + // AddFeatureHandler holds details about calls to the AddFeatureHandler method. + AddFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.RKEK8sSystemImageHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.RKEK8sSystemImageHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []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) { + if mock.AddClusterScopedFeatureHandlerFunc == nil { + 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 + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockRKEK8sSystemImageControllerMockAddClusterScopedFeatureHandler.Lock() + mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Handler v3.RKEK8sSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Handler v3.RKEK8sSystemImageHandlerFunc + } + lockRKEK8sSystemImageControllerMockAddClusterScopedFeatureHandler.RLock() + calls = mock.calls.AddClusterScopedFeatureHandler + lockRKEK8sSystemImageControllerMockAddClusterScopedFeatureHandler.RUnlock() + return calls +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.RKEK8sSystemImageHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockRKEK8sSystemImageControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + 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 { + Ctx context.Context + Name string + ClusterName string + Handler v3.RKEK8sSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.RKEK8sSystemImageHandlerFunc + } + lockRKEK8sSystemImageControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockRKEK8sSystemImageControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddFeatureHandler calls AddFeatureHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sSystemImageHandlerFunc + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + Sync: sync, + } + lockRKEK8sSystemImageControllerMockAddFeatureHandler.Lock() + mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sSystemImageHandlerFunc + } + lockRKEK8sSystemImageControllerMockAddFeatureHandler.RLock() + calls = mock.calls.AddFeatureHandler + lockRKEK8sSystemImageControllerMockAddFeatureHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.RKEK8sSystemImageHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockRKEK8sSystemImageControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + 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 { + Ctx context.Context + Name string + Handler v3.RKEK8sSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.RKEK8sSystemImageHandlerFunc + } + lockRKEK8sSystemImageControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockRKEK8sSystemImageControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *RKEK8sSystemImageControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("RKEK8sSystemImageControllerMock.EnqueueFunc: method is nil but RKEK8sSystemImageController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockRKEK8sSystemImageControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + 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 { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockRKEK8sSystemImageControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockRKEK8sSystemImageControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *RKEK8sSystemImageControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("RKEK8sSystemImageControllerMock.GenericFunc: method is nil but RKEK8sSystemImageController.Generic was just called") + } + callInfo := struct { + }{} + lockRKEK8sSystemImageControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + 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 { +} { + var calls []struct { + } + lockRKEK8sSystemImageControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockRKEK8sSystemImageControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *RKEK8sSystemImageControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("RKEK8sSystemImageControllerMock.InformerFunc: method is nil but RKEK8sSystemImageController.Informer was just called") + } + callInfo := struct { + }{} + lockRKEK8sSystemImageControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + 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 { +} { + var calls []struct { + } + lockRKEK8sSystemImageControllerMockInformer.RLock() + calls = mock.calls.Informer + lockRKEK8sSystemImageControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *RKEK8sSystemImageControllerMock) Lister() v3.RKEK8sSystemImageLister { + if mock.ListerFunc == nil { + panic("RKEK8sSystemImageControllerMock.ListerFunc: method is nil but RKEK8sSystemImageController.Lister was just called") + } + callInfo := struct { + }{} + lockRKEK8sSystemImageControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + 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 { +} { + var calls []struct { + } + 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() + 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 + lockRKEK8sSystemImageInterfaceMockObjectClient sync.RWMutex + lockRKEK8sSystemImageInterfaceMockUpdate sync.RWMutex + lockRKEK8sSystemImageInterfaceMockWatch sync.RWMutex +) + +// Ensure, that RKEK8sSystemImageInterfaceMock does implement RKEK8sSystemImageInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEK8sSystemImageInterface = &RKEK8sSystemImageInterfaceMock{} + +// RKEK8sSystemImageInterfaceMock is a mock implementation of RKEK8sSystemImageInterface. +// +// 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) { +// panic("mock out the AddClusterScopedFeatureHandler method") +// }, +// 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) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// 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) { +// panic("mock out the AddFeatureHandler method") +// }, +// 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) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.RKEK8sSystemImageLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.RKEK8sSystemImageController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.RKEK8sSystemImage) (*v3.RKEK8sSystemImage, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// 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) { +// panic("mock out the Get method") +// }, +// 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) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.RKEK8sSystemImage) (*v3.RKEK8sSystemImage, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedRKEK8sSystemImageInterface in code that requires RKEK8sSystemImageInterface +// // and then make assertions. +// +// } +type RKEK8sSystemImageInterfaceMock struct { + // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. + 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) + + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + 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) + + // AddFeatureHandlerFunc mocks the AddFeatureHandler method. + 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) + + // AddHandlerFunc mocks the AddHandler method. + 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) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.RKEK8sSystemImageController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.RKEK8sSystemImage) (*v3.RKEK8sSystemImage, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + 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) + + // GetNamespacedFunc mocks the GetNamespaced method. + 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) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.RKEK8sSystemImage) (*v3.RKEK8sSystemImage, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. + AddClusterScopedFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.RKEK8sSystemImageHandlerFunc + } + // AddClusterScopedFeatureLifecycle holds details about calls to the AddClusterScopedFeatureLifecycle method. + AddClusterScopedFeatureLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEK8sSystemImageLifecycle + } + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.RKEK8sSystemImageHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEK8sSystemImageLifecycle + } + // AddFeatureHandler holds details about calls to the AddFeatureHandler method. + AddFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.RKEK8sSystemImageHandlerFunc + } + // AddFeatureLifecycle holds details about calls to the AddFeatureLifecycle method. + AddFeatureLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEK8sSystemImageLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.RKEK8sSystemImageHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEK8sSystemImageLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.RKEK8sSystemImage + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.RKEK8sSystemImage + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Sync v3.RKEK8sSystemImageHandlerFunc + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureHandler.Lock() + mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Sync v3.RKEK8sSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Sync v3.RKEK8sSystemImageHandlerFunc + } + lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureHandler.RLock() + calls = mock.calls.AddClusterScopedFeatureHandler + lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureHandler.RUnlock() + return calls +} + +// AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Lifecycle v3.RKEK8sSystemImageLifecycle + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.Lock() + mock.calls.AddClusterScopedFeatureLifecycle = append(mock.calls.AddClusterScopedFeatureLifecycle, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Lifecycle v3.RKEK8sSystemImageLifecycle +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Lifecycle v3.RKEK8sSystemImageLifecycle + } + lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.RLock() + calls = mock.calls.AddClusterScopedFeatureLifecycle + lockRKEK8sSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock() + return calls +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.RKEK8sSystemImageHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockRKEK8sSystemImageInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + 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 { + Ctx context.Context + Name string + ClusterName string + Sync v3.RKEK8sSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.RKEK8sSystemImageHandlerFunc + } + lockRKEK8sSystemImageInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockRKEK8sSystemImageInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RKEK8sSystemImageLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockRKEK8sSystemImageInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + 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 { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RKEK8sSystemImageLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RKEK8sSystemImageLifecycle + } + lockRKEK8sSystemImageInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockRKEK8sSystemImageInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddFeatureHandler calls AddFeatureHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sSystemImageHandlerFunc + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + Sync: sync, + } + lockRKEK8sSystemImageInterfaceMockAddFeatureHandler.Lock() + mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sSystemImageHandlerFunc + } + lockRKEK8sSystemImageInterfaceMockAddFeatureHandler.RLock() + calls = mock.calls.AddFeatureHandler + lockRKEK8sSystemImageInterfaceMockAddFeatureHandler.RUnlock() + return calls +} + +// AddFeatureLifecycle calls AddFeatureLifecycleFunc. +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") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + Lifecycle v3.RKEK8sSystemImageLifecycle + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + Lifecycle: lifecycle, + } + lockRKEK8sSystemImageInterfaceMockAddFeatureLifecycle.Lock() + mock.calls.AddFeatureLifecycle = append(mock.calls.AddFeatureLifecycle, callInfo) + 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 { + Ctx context.Context + Enabled func() bool + Name string + Lifecycle v3.RKEK8sSystemImageLifecycle +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + Lifecycle v3.RKEK8sSystemImageLifecycle + } + lockRKEK8sSystemImageInterfaceMockAddFeatureLifecycle.RLock() + calls = mock.calls.AddFeatureLifecycle + lockRKEK8sSystemImageInterfaceMockAddFeatureLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.RKEK8sSystemImageHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockRKEK8sSystemImageInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + 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 { + Ctx context.Context + Name string + Sync v3.RKEK8sSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.RKEK8sSystemImageHandlerFunc + } + lockRKEK8sSystemImageInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockRKEK8sSystemImageInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +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") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.RKEK8sSystemImageLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockRKEK8sSystemImageInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + 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 { + Ctx context.Context + Name string + Lifecycle v3.RKEK8sSystemImageLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.RKEK8sSystemImageLifecycle + } + lockRKEK8sSystemImageInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockRKEK8sSystemImageInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *RKEK8sSystemImageInterfaceMock) Controller() v3.RKEK8sSystemImageController { + if mock.ControllerFunc == nil { + panic("RKEK8sSystemImageInterfaceMock.ControllerFunc: method is nil but RKEK8sSystemImageInterface.Controller was just called") + } + callInfo := struct { + }{} + lockRKEK8sSystemImageInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + 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 { +} { + var calls []struct { + } + lockRKEK8sSystemImageInterfaceMockController.RLock() + calls = mock.calls.Controller + lockRKEK8sSystemImageInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +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") + } + callInfo := struct { + In1 *v3.RKEK8sSystemImage + }{ + In1: in1, + } + lockRKEK8sSystemImageInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + 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 +} { + var calls []struct { + In1 *v3.RKEK8sSystemImage + } + lockRKEK8sSystemImageInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockRKEK8sSystemImageInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +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") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockRKEK8sSystemImageInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + 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 { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockRKEK8sSystemImageInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockRKEK8sSystemImageInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +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") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockRKEK8sSystemImageInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + 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 { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockRKEK8sSystemImageInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockRKEK8sSystemImageInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +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") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockRKEK8sSystemImageInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + 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 { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockRKEK8sSystemImageInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockRKEK8sSystemImageInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +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") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockRKEK8sSystemImageInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + 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 { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockRKEK8sSystemImageInterfaceMockGet.RLock() + calls = mock.calls.Get + lockRKEK8sSystemImageInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +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") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockRKEK8sSystemImageInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + 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 { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockRKEK8sSystemImageInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockRKEK8sSystemImageInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +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") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockRKEK8sSystemImageInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + 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 { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockRKEK8sSystemImageInterfaceMockList.RLock() + calls = mock.calls.List + lockRKEK8sSystemImageInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *RKEK8sSystemImageInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("RKEK8sSystemImageInterfaceMock.ObjectClientFunc: method is nil but RKEK8sSystemImageInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockRKEK8sSystemImageInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + 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 { +} { + var calls []struct { + } + lockRKEK8sSystemImageInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockRKEK8sSystemImageInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +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") + } + callInfo := struct { + In1 *v3.RKEK8sSystemImage + }{ + In1: in1, + } + lockRKEK8sSystemImageInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + 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 +} { + var calls []struct { + In1 *v3.RKEK8sSystemImage + } + lockRKEK8sSystemImageInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockRKEK8sSystemImageInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +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") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockRKEK8sSystemImageInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + 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 { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockRKEK8sSystemImageInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockRKEK8sSystemImageInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockRKEK8sSystemImagesGetterMockRKEK8sSystemImages sync.RWMutex +) + +// Ensure, that RKEK8sSystemImagesGetterMock does implement RKEK8sSystemImagesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEK8sSystemImagesGetter = &RKEK8sSystemImagesGetterMock{} + +// RKEK8sSystemImagesGetterMock is a mock implementation of RKEK8sSystemImagesGetter. +// +// 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") +// }, +// } +// +// // 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 + + // calls tracks calls to the methods. + calls 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") + } + callInfo := struct { + Namespace string + }{ + Namespace: 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. +// Check the length with: +// len(mockedRKEK8sSystemImagesGetter.RKEK8sSystemImagesCalls()) +func (mock *RKEK8sSystemImagesGetterMock) RKEK8sSystemImagesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockRKEK8sSystemImagesGetterMockRKEK8sSystemImages.RLock() + calls = mock.calls.RKEK8sSystemImages + lockRKEK8sSystemImagesGetterMockRKEK8sSystemImages.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_windows_system_image_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_windows_system_image_mock.go new file mode 100644 index 00000000..acfe859b --- /dev/null +++ b/apis/management.cattle.io/v3/fakes/zz_generated_rke_k8s_windows_system_image_mock.go @@ -0,0 +1,1740 @@ +// Code generated by moq; DO NOT EDIT. +// github.com/matryer/moq + +package fakes + +import ( + context "context" + sync "sync" + + controller "github.com/rancher/norman/controller" + objectclient "github.com/rancher/norman/objectclient" + v3 "github.com/rancher/types/apis/management.cattle.io/v3" + v1 "k8s.io/apimachinery/pkg/apis/meta/v1" + labels "k8s.io/apimachinery/pkg/labels" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +var ( + lockRKEK8sWindowsSystemImageListerMockGet sync.RWMutex + lockRKEK8sWindowsSystemImageListerMockList sync.RWMutex +) + +// Ensure, that RKEK8sWindowsSystemImageListerMock does implement RKEK8sWindowsSystemImageLister. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEK8sWindowsSystemImageLister = &RKEK8sWindowsSystemImageListerMock{} + +// RKEK8sWindowsSystemImageListerMock is a mock implementation of RKEK8sWindowsSystemImageLister. +// +// func TestSomethingThatUsesRKEK8sWindowsSystemImageLister(t *testing.T) { +// +// // make and configure a mocked RKEK8sWindowsSystemImageLister +// mockedRKEK8sWindowsSystemImageLister := &RKEK8sWindowsSystemImageListerMock{ +// GetFunc: func(namespace string, name string) (*v3.RKEK8sWindowsSystemImage, error) { +// panic("mock out the Get method") +// }, +// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.RKEK8sWindowsSystemImage, error) { +// panic("mock out the List method") +// }, +// } +// +// // use mockedRKEK8sWindowsSystemImageLister in code that requires RKEK8sWindowsSystemImageLister +// // and then make assertions. +// +// } +type RKEK8sWindowsSystemImageListerMock struct { + // GetFunc mocks the Get method. + GetFunc func(namespace string, name string) (*v3.RKEK8sWindowsSystemImage, error) + + // ListFunc mocks the List method. + ListFunc func(namespace string, selector labels.Selector) ([]*v3.RKEK8sWindowsSystemImage, error) + + // calls tracks calls to the methods. + calls struct { + // Get holds details about calls to the Get method. + Get []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // List holds details about calls to the List method. + List []struct { + // Namespace is the namespace argument value. + Namespace string + // Selector is the selector argument value. + Selector labels.Selector + } + } +} + +// Get calls GetFunc. +func (mock *RKEK8sWindowsSystemImageListerMock) Get(namespace string, name string) (*v3.RKEK8sWindowsSystemImage, error) { + if mock.GetFunc == nil { + panic("RKEK8sWindowsSystemImageListerMock.GetFunc: method is nil but RKEK8sWindowsSystemImageLister.Get was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockRKEK8sWindowsSystemImageListerMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockRKEK8sWindowsSystemImageListerMockGet.Unlock() + return mock.GetFunc(namespace, name) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageLister.GetCalls()) +func (mock *RKEK8sWindowsSystemImageListerMock) GetCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockRKEK8sWindowsSystemImageListerMockGet.RLock() + calls = mock.calls.Get + lockRKEK8sWindowsSystemImageListerMockGet.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *RKEK8sWindowsSystemImageListerMock) List(namespace string, selector labels.Selector) ([]*v3.RKEK8sWindowsSystemImage, error) { + if mock.ListFunc == nil { + panic("RKEK8sWindowsSystemImageListerMock.ListFunc: method is nil but RKEK8sWindowsSystemImageLister.List was just called") + } + callInfo := struct { + Namespace string + Selector labels.Selector + }{ + Namespace: namespace, + Selector: selector, + } + lockRKEK8sWindowsSystemImageListerMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockRKEK8sWindowsSystemImageListerMockList.Unlock() + return mock.ListFunc(namespace, selector) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageLister.ListCalls()) +func (mock *RKEK8sWindowsSystemImageListerMock) ListCalls() []struct { + Namespace string + Selector labels.Selector +} { + var calls []struct { + Namespace string + Selector labels.Selector + } + lockRKEK8sWindowsSystemImageListerMockList.RLock() + calls = mock.calls.List + lockRKEK8sWindowsSystemImageListerMockList.RUnlock() + return calls +} + +var ( + lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedFeatureHandler sync.RWMutex + lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedHandler sync.RWMutex + lockRKEK8sWindowsSystemImageControllerMockAddFeatureHandler sync.RWMutex + lockRKEK8sWindowsSystemImageControllerMockAddHandler sync.RWMutex + lockRKEK8sWindowsSystemImageControllerMockEnqueue sync.RWMutex + lockRKEK8sWindowsSystemImageControllerMockGeneric sync.RWMutex + lockRKEK8sWindowsSystemImageControllerMockInformer sync.RWMutex + lockRKEK8sWindowsSystemImageControllerMockLister sync.RWMutex + lockRKEK8sWindowsSystemImageControllerMockStart sync.RWMutex + lockRKEK8sWindowsSystemImageControllerMockSync sync.RWMutex +) + +// Ensure, that RKEK8sWindowsSystemImageControllerMock does implement RKEK8sWindowsSystemImageController. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEK8sWindowsSystemImageController = &RKEK8sWindowsSystemImageControllerMock{} + +// RKEK8sWindowsSystemImageControllerMock is a mock implementation of RKEK8sWindowsSystemImageController. +// +// func TestSomethingThatUsesRKEK8sWindowsSystemImageController(t *testing.T) { +// +// // make and configure a mocked RKEK8sWindowsSystemImageController +// mockedRKEK8sWindowsSystemImageController := &RKEK8sWindowsSystemImageControllerMock{ +// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) { +// panic("mock out the AddClusterScopedFeatureHandler method") +// }, +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { +// panic("mock out the AddFeatureHandler method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// EnqueueFunc: func(namespace string, name string) { +// panic("mock out the Enqueue method") +// }, +// GenericFunc: func() controller.GenericController { +// panic("mock out the Generic method") +// }, +// InformerFunc: func() cache.SharedIndexInformer { +// panic("mock out the Informer method") +// }, +// ListerFunc: func() v3.RKEK8sWindowsSystemImageLister { +// 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 mockedRKEK8sWindowsSystemImageController in code that requires RKEK8sWindowsSystemImageController +// // and then make assertions. +// +// } +type RKEK8sWindowsSystemImageControllerMock struct { + // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. + AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) + + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) + + // AddFeatureHandlerFunc mocks the AddFeatureHandler method. + AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) + + // EnqueueFunc mocks the Enqueue method. + EnqueueFunc func(namespace string, name string) + + // GenericFunc mocks the Generic method. + GenericFunc func() controller.GenericController + + // InformerFunc mocks the Informer method. + InformerFunc func() cache.SharedIndexInformer + + // ListerFunc mocks the Lister method. + ListerFunc func() v3.RKEK8sWindowsSystemImageLister + + // 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. + AddClusterScopedFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.RKEK8sWindowsSystemImageHandlerFunc + } + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Handler is the handler argument value. + Handler v3.RKEK8sWindowsSystemImageHandlerFunc + } + // AddFeatureHandler holds details about calls to the AddFeatureHandler method. + AddFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Handler is the handler argument value. + Handler v3.RKEK8sWindowsSystemImageHandlerFunc + } + // Enqueue holds details about calls to the Enqueue method. + Enqueue []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + } + // Generic holds details about calls to the Generic method. + Generic []struct { + } + // Informer holds details about calls to the Informer method. + Informer []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 *RKEK8sWindowsSystemImageControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) { + if mock.AddClusterScopedFeatureHandlerFunc == nil { + panic("RKEK8sWindowsSystemImageControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but RKEK8sWindowsSystemImageController.AddClusterScopedFeatureHandler was just called") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Handler v3.RKEK8sWindowsSystemImageHandlerFunc + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedFeatureHandler.Lock() + mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) + lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedFeatureHandler.Unlock() + mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, handler) +} + +// AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageController.AddClusterScopedFeatureHandlerCalls()) +func (mock *RKEK8sWindowsSystemImageControllerMock) AddClusterScopedFeatureHandlerCalls() []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Handler v3.RKEK8sWindowsSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Handler v3.RKEK8sWindowsSystemImageHandlerFunc + } + lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedFeatureHandler.RLock() + calls = mock.calls.AddClusterScopedFeatureHandler + lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedFeatureHandler.RUnlock() + return calls +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *RKEK8sWindowsSystemImageControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("RKEK8sWindowsSystemImageControllerMock.AddClusterScopedHandlerFunc: method is nil but RKEK8sWindowsSystemImageController.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.RKEK8sWindowsSystemImageHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Handler: handler, + } + lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageController.AddClusterScopedHandlerCalls()) +func (mock *RKEK8sWindowsSystemImageControllerMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.RKEK8sWindowsSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Handler v3.RKEK8sWindowsSystemImageHandlerFunc + } + lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockRKEK8sWindowsSystemImageControllerMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddFeatureHandler calls AddFeatureHandlerFunc. +func (mock *RKEK8sWindowsSystemImageControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { + if mock.AddFeatureHandlerFunc == nil { + panic("RKEK8sWindowsSystemImageControllerMock.AddFeatureHandlerFunc: method is nil but RKEK8sWindowsSystemImageController.AddFeatureHandler was just called") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + Sync: sync, + } + lockRKEK8sWindowsSystemImageControllerMockAddFeatureHandler.Lock() + mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) + lockRKEK8sWindowsSystemImageControllerMockAddFeatureHandler.Unlock() + mock.AddFeatureHandlerFunc(ctx, enabled, name, sync) +} + +// AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageController.AddFeatureHandlerCalls()) +func (mock *RKEK8sWindowsSystemImageControllerMock) AddFeatureHandlerCalls() []struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + } + lockRKEK8sWindowsSystemImageControllerMockAddFeatureHandler.RLock() + calls = mock.calls.AddFeatureHandler + lockRKEK8sWindowsSystemImageControllerMockAddFeatureHandler.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *RKEK8sWindowsSystemImageControllerMock) AddHandler(ctx context.Context, name string, handler v3.RKEK8sWindowsSystemImageHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("RKEK8sWindowsSystemImageControllerMock.AddHandlerFunc: method is nil but RKEK8sWindowsSystemImageController.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Handler v3.RKEK8sWindowsSystemImageHandlerFunc + }{ + Ctx: ctx, + Name: name, + Handler: handler, + } + lockRKEK8sWindowsSystemImageControllerMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockRKEK8sWindowsSystemImageControllerMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, handler) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageController.AddHandlerCalls()) +func (mock *RKEK8sWindowsSystemImageControllerMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Handler v3.RKEK8sWindowsSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Handler v3.RKEK8sWindowsSystemImageHandlerFunc + } + lockRKEK8sWindowsSystemImageControllerMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockRKEK8sWindowsSystemImageControllerMockAddHandler.RUnlock() + return calls +} + +// Enqueue calls EnqueueFunc. +func (mock *RKEK8sWindowsSystemImageControllerMock) Enqueue(namespace string, name string) { + if mock.EnqueueFunc == nil { + panic("RKEK8sWindowsSystemImageControllerMock.EnqueueFunc: method is nil but RKEK8sWindowsSystemImageController.Enqueue was just called") + } + callInfo := struct { + Namespace string + Name string + }{ + Namespace: namespace, + Name: name, + } + lockRKEK8sWindowsSystemImageControllerMockEnqueue.Lock() + mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) + lockRKEK8sWindowsSystemImageControllerMockEnqueue.Unlock() + mock.EnqueueFunc(namespace, name) +} + +// EnqueueCalls gets all the calls that were made to Enqueue. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageController.EnqueueCalls()) +func (mock *RKEK8sWindowsSystemImageControllerMock) EnqueueCalls() []struct { + Namespace string + Name string +} { + var calls []struct { + Namespace string + Name string + } + lockRKEK8sWindowsSystemImageControllerMockEnqueue.RLock() + calls = mock.calls.Enqueue + lockRKEK8sWindowsSystemImageControllerMockEnqueue.RUnlock() + return calls +} + +// Generic calls GenericFunc. +func (mock *RKEK8sWindowsSystemImageControllerMock) Generic() controller.GenericController { + if mock.GenericFunc == nil { + panic("RKEK8sWindowsSystemImageControllerMock.GenericFunc: method is nil but RKEK8sWindowsSystemImageController.Generic was just called") + } + callInfo := struct { + }{} + lockRKEK8sWindowsSystemImageControllerMockGeneric.Lock() + mock.calls.Generic = append(mock.calls.Generic, callInfo) + lockRKEK8sWindowsSystemImageControllerMockGeneric.Unlock() + return mock.GenericFunc() +} + +// GenericCalls gets all the calls that were made to Generic. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageController.GenericCalls()) +func (mock *RKEK8sWindowsSystemImageControllerMock) GenericCalls() []struct { +} { + var calls []struct { + } + lockRKEK8sWindowsSystemImageControllerMockGeneric.RLock() + calls = mock.calls.Generic + lockRKEK8sWindowsSystemImageControllerMockGeneric.RUnlock() + return calls +} + +// Informer calls InformerFunc. +func (mock *RKEK8sWindowsSystemImageControllerMock) Informer() cache.SharedIndexInformer { + if mock.InformerFunc == nil { + panic("RKEK8sWindowsSystemImageControllerMock.InformerFunc: method is nil but RKEK8sWindowsSystemImageController.Informer was just called") + } + callInfo := struct { + }{} + lockRKEK8sWindowsSystemImageControllerMockInformer.Lock() + mock.calls.Informer = append(mock.calls.Informer, callInfo) + lockRKEK8sWindowsSystemImageControllerMockInformer.Unlock() + return mock.InformerFunc() +} + +// InformerCalls gets all the calls that were made to Informer. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageController.InformerCalls()) +func (mock *RKEK8sWindowsSystemImageControllerMock) InformerCalls() []struct { +} { + var calls []struct { + } + lockRKEK8sWindowsSystemImageControllerMockInformer.RLock() + calls = mock.calls.Informer + lockRKEK8sWindowsSystemImageControllerMockInformer.RUnlock() + return calls +} + +// Lister calls ListerFunc. +func (mock *RKEK8sWindowsSystemImageControllerMock) Lister() v3.RKEK8sWindowsSystemImageLister { + if mock.ListerFunc == nil { + panic("RKEK8sWindowsSystemImageControllerMock.ListerFunc: method is nil but RKEK8sWindowsSystemImageController.Lister was just called") + } + callInfo := struct { + }{} + lockRKEK8sWindowsSystemImageControllerMockLister.Lock() + mock.calls.Lister = append(mock.calls.Lister, callInfo) + lockRKEK8sWindowsSystemImageControllerMockLister.Unlock() + return mock.ListerFunc() +} + +// ListerCalls gets all the calls that were made to Lister. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageController.ListerCalls()) +func (mock *RKEK8sWindowsSystemImageControllerMock) ListerCalls() []struct { +} { + var calls []struct { + } + lockRKEK8sWindowsSystemImageControllerMockLister.RLock() + calls = mock.calls.Lister + lockRKEK8sWindowsSystemImageControllerMockLister.RUnlock() + return calls +} + +// Start calls StartFunc. +func (mock *RKEK8sWindowsSystemImageControllerMock) Start(ctx context.Context, threadiness int) error { + if mock.StartFunc == nil { + panic("RKEK8sWindowsSystemImageControllerMock.StartFunc: method is nil but RKEK8sWindowsSystemImageController.Start was just called") + } + callInfo := struct { + Ctx context.Context + Threadiness int + }{ + Ctx: ctx, + Threadiness: threadiness, + } + lockRKEK8sWindowsSystemImageControllerMockStart.Lock() + mock.calls.Start = append(mock.calls.Start, callInfo) + lockRKEK8sWindowsSystemImageControllerMockStart.Unlock() + return mock.StartFunc(ctx, threadiness) +} + +// StartCalls gets all the calls that were made to Start. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageController.StartCalls()) +func (mock *RKEK8sWindowsSystemImageControllerMock) StartCalls() []struct { + Ctx context.Context + Threadiness int +} { + var calls []struct { + Ctx context.Context + Threadiness int + } + lockRKEK8sWindowsSystemImageControllerMockStart.RLock() + calls = mock.calls.Start + lockRKEK8sWindowsSystemImageControllerMockStart.RUnlock() + return calls +} + +// Sync calls SyncFunc. +func (mock *RKEK8sWindowsSystemImageControllerMock) Sync(ctx context.Context) error { + if mock.SyncFunc == nil { + panic("RKEK8sWindowsSystemImageControllerMock.SyncFunc: method is nil but RKEK8sWindowsSystemImageController.Sync was just called") + } + callInfo := struct { + Ctx context.Context + }{ + Ctx: ctx, + } + lockRKEK8sWindowsSystemImageControllerMockSync.Lock() + mock.calls.Sync = append(mock.calls.Sync, callInfo) + lockRKEK8sWindowsSystemImageControllerMockSync.Unlock() + return mock.SyncFunc(ctx) +} + +// SyncCalls gets all the calls that were made to Sync. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageController.SyncCalls()) +func (mock *RKEK8sWindowsSystemImageControllerMock) SyncCalls() []struct { + Ctx context.Context +} { + var calls []struct { + Ctx context.Context + } + lockRKEK8sWindowsSystemImageControllerMockSync.RLock() + calls = mock.calls.Sync + lockRKEK8sWindowsSystemImageControllerMockSync.RUnlock() + return calls +} + +var ( + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedHandler sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedLifecycle sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureHandler sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureLifecycle sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockAddHandler sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockAddLifecycle sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockController sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockCreate sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockDelete sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockDeleteCollection sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockDeleteNamespaced sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockGet sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockGetNamespaced sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockList sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockObjectClient sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockUpdate sync.RWMutex + lockRKEK8sWindowsSystemImageInterfaceMockWatch sync.RWMutex +) + +// Ensure, that RKEK8sWindowsSystemImageInterfaceMock does implement RKEK8sWindowsSystemImageInterface. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEK8sWindowsSystemImageInterface = &RKEK8sWindowsSystemImageInterfaceMock{} + +// RKEK8sWindowsSystemImageInterfaceMock is a mock implementation of RKEK8sWindowsSystemImageInterface. +// +// func TestSomethingThatUsesRKEK8sWindowsSystemImageInterface(t *testing.T) { +// +// // make and configure a mocked RKEK8sWindowsSystemImageInterface +// mockedRKEK8sWindowsSystemImageInterface := &RKEK8sWindowsSystemImageInterfaceMock{ +// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { +// panic("mock out the AddClusterScopedFeatureHandler method") +// }, +// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { +// panic("mock out the AddClusterScopedFeatureLifecycle method") +// }, +// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { +// panic("mock out the AddClusterScopedHandler method") +// }, +// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { +// panic("mock out the AddClusterScopedLifecycle method") +// }, +// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { +// panic("mock out the AddFeatureHandler method") +// }, +// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { +// panic("mock out the AddFeatureLifecycle method") +// }, +// AddHandlerFunc: func(ctx context.Context, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { +// panic("mock out the AddHandler method") +// }, +// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { +// panic("mock out the AddLifecycle method") +// }, +// ControllerFunc: func() v3.RKEK8sWindowsSystemImageController { +// panic("mock out the Controller method") +// }, +// CreateFunc: func(in1 *v3.RKEK8sWindowsSystemImage) (*v3.RKEK8sWindowsSystemImage, error) { +// panic("mock out the Create method") +// }, +// DeleteFunc: func(name string, options *v1.DeleteOptions) error { +// panic("mock out the Delete method") +// }, +// DeleteCollectionFunc: func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { +// panic("mock out the DeleteCollection method") +// }, +// DeleteNamespacedFunc: func(namespace string, name string, options *v1.DeleteOptions) error { +// panic("mock out the DeleteNamespaced method") +// }, +// GetFunc: func(name string, opts v1.GetOptions) (*v3.RKEK8sWindowsSystemImage, error) { +// panic("mock out the Get method") +// }, +// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.RKEK8sWindowsSystemImage, error) { +// panic("mock out the GetNamespaced method") +// }, +// ListFunc: func(opts v1.ListOptions) (*v3.RKEK8sWindowsSystemImageList, error) { +// panic("mock out the List method") +// }, +// ObjectClientFunc: func() *objectclient.ObjectClient { +// panic("mock out the ObjectClient method") +// }, +// UpdateFunc: func(in1 *v3.RKEK8sWindowsSystemImage) (*v3.RKEK8sWindowsSystemImage, error) { +// panic("mock out the Update method") +// }, +// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { +// panic("mock out the Watch method") +// }, +// } +// +// // use mockedRKEK8sWindowsSystemImageInterface in code that requires RKEK8sWindowsSystemImageInterface +// // and then make assertions. +// +// } +type RKEK8sWindowsSystemImageInterfaceMock struct { + // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. + AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) + + // AddClusterScopedFeatureLifecycleFunc mocks the AddClusterScopedFeatureLifecycle method. + AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) + + // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. + AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) + + // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. + AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) + + // AddFeatureHandlerFunc mocks the AddFeatureHandler method. + AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) + + // AddFeatureLifecycleFunc mocks the AddFeatureLifecycle method. + AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) + + // AddHandlerFunc mocks the AddHandler method. + AddHandlerFunc func(ctx context.Context, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) + + // AddLifecycleFunc mocks the AddLifecycle method. + AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) + + // ControllerFunc mocks the Controller method. + ControllerFunc func() v3.RKEK8sWindowsSystemImageController + + // CreateFunc mocks the Create method. + CreateFunc func(in1 *v3.RKEK8sWindowsSystemImage) (*v3.RKEK8sWindowsSystemImage, error) + + // DeleteFunc mocks the Delete method. + DeleteFunc func(name string, options *v1.DeleteOptions) error + + // DeleteCollectionFunc mocks the DeleteCollection method. + DeleteCollectionFunc func(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error + + // DeleteNamespacedFunc mocks the DeleteNamespaced method. + DeleteNamespacedFunc func(namespace string, name string, options *v1.DeleteOptions) error + + // GetFunc mocks the Get method. + GetFunc func(name string, opts v1.GetOptions) (*v3.RKEK8sWindowsSystemImage, error) + + // GetNamespacedFunc mocks the GetNamespaced method. + GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.RKEK8sWindowsSystemImage, error) + + // ListFunc mocks the List method. + ListFunc func(opts v1.ListOptions) (*v3.RKEK8sWindowsSystemImageList, error) + + // ObjectClientFunc mocks the ObjectClient method. + ObjectClientFunc func() *objectclient.ObjectClient + + // UpdateFunc mocks the Update method. + UpdateFunc func(in1 *v3.RKEK8sWindowsSystemImage) (*v3.RKEK8sWindowsSystemImage, error) + + // WatchFunc mocks the Watch method. + WatchFunc func(opts v1.ListOptions) (watch.Interface, error) + + // calls tracks calls to the methods. + calls struct { + // AddClusterScopedFeatureHandler holds details about calls to the AddClusterScopedFeatureHandler method. + AddClusterScopedFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + } + // AddClusterScopedFeatureLifecycle holds details about calls to the AddClusterScopedFeatureLifecycle method. + AddClusterScopedFeatureLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle + } + // AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method. + AddClusterScopedHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Sync is the sync argument value. + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + } + // AddClusterScopedLifecycle holds details about calls to the AddClusterScopedLifecycle method. + AddClusterScopedLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // ClusterName is the clusterName argument value. + ClusterName string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle + } + // AddFeatureHandler holds details about calls to the AddFeatureHandler method. + AddFeatureHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + } + // AddFeatureLifecycle holds details about calls to the AddFeatureLifecycle method. + AddFeatureLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Enabled is the enabled argument value. + Enabled func() bool + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle + } + // AddHandler holds details about calls to the AddHandler method. + AddHandler []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Sync is the sync argument value. + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + } + // AddLifecycle holds details about calls to the AddLifecycle method. + AddLifecycle []struct { + // Ctx is the ctx argument value. + Ctx context.Context + // Name is the name argument value. + Name string + // Lifecycle is the lifecycle argument value. + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle + } + // Controller holds details about calls to the Controller method. + Controller []struct { + } + // Create holds details about calls to the Create method. + Create []struct { + // In1 is the in1 argument value. + In1 *v3.RKEK8sWindowsSystemImage + } + // Delete holds details about calls to the Delete method. + Delete []struct { + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // DeleteCollection holds details about calls to the DeleteCollection method. + DeleteCollection []struct { + // DeleteOpts is the deleteOpts argument value. + DeleteOpts *v1.DeleteOptions + // ListOpts is the listOpts argument value. + ListOpts v1.ListOptions + } + // DeleteNamespaced holds details about calls to the DeleteNamespaced method. + DeleteNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Options is the options argument value. + Options *v1.DeleteOptions + } + // Get holds details about calls to the Get method. + Get []struct { + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // GetNamespaced holds details about calls to the GetNamespaced method. + GetNamespaced []struct { + // Namespace is the namespace argument value. + Namespace string + // Name is the name argument value. + Name string + // Opts is the opts argument value. + Opts v1.GetOptions + } + // List holds details about calls to the List method. + List []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + // ObjectClient holds details about calls to the ObjectClient method. + ObjectClient []struct { + } + // Update holds details about calls to the Update method. + Update []struct { + // In1 is the in1 argument value. + In1 *v3.RKEK8sWindowsSystemImage + } + // Watch holds details about calls to the Watch method. + Watch []struct { + // Opts is the opts argument value. + Opts v1.ListOptions + } + } +} + +// AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { + if mock.AddClusterScopedFeatureHandlerFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.AddClusterScopedFeatureHandlerFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddClusterScopedFeatureHandler was just called") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureHandler.Lock() + mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureHandler.Unlock() + mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, sync) +} + +// AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.AddClusterScopedFeatureHandlerCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + } + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureHandler.RLock() + calls = mock.calls.AddClusterScopedFeatureHandler + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureHandler.RUnlock() + return calls +} + +// AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { + if mock.AddClusterScopedFeatureLifecycleFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.AddClusterScopedFeatureLifecycleFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddClusterScopedFeatureLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.Lock() + mock.calls.AddClusterScopedFeatureLifecycle = append(mock.calls.AddClusterScopedFeatureLifecycle, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.Unlock() + mock.AddClusterScopedFeatureLifecycleFunc(ctx, enabled, name, clusterName, lifecycle) +} + +// AddClusterScopedFeatureLifecycleCalls gets all the calls that were made to AddClusterScopedFeatureLifecycle. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.AddClusterScopedFeatureLifecycleCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + ClusterName string + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle + } + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.RLock() + calls = mock.calls.AddClusterScopedFeatureLifecycle + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock() + return calls +} + +// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { + if mock.AddClusterScopedHandlerFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.AddClusterScopedHandlerFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddClusterScopedHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Sync: sync, + } + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedHandler.Lock() + mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedHandler.Unlock() + mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) +} + +// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.AddClusterScopedHandlerCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedHandlerCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + } + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedHandler.RLock() + calls = mock.calls.AddClusterScopedHandler + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedHandler.RUnlock() + return calls +} + +// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { + if mock.AddClusterScopedLifecycleFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddClusterScopedLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle + }{ + Ctx: ctx, + Name: name, + ClusterName: clusterName, + Lifecycle: lifecycle, + } + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedLifecycle.Lock() + mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedLifecycle.Unlock() + mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) +} + +// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.AddClusterScopedLifecycleCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddClusterScopedLifecycleCalls() []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + ClusterName string + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle + } + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedLifecycle.RLock() + calls = mock.calls.AddClusterScopedLifecycle + lockRKEK8sWindowsSystemImageInterfaceMockAddClusterScopedLifecycle.RUnlock() + return calls +} + +// AddFeatureHandler calls AddFeatureHandlerFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { + if mock.AddFeatureHandlerFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.AddFeatureHandlerFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddFeatureHandler was just called") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + Sync: sync, + } + lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureHandler.Lock() + mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureHandler.Unlock() + mock.AddFeatureHandlerFunc(ctx, enabled, name, sync) +} + +// AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.AddFeatureHandlerCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddFeatureHandlerCalls() []struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + } + lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureHandler.RLock() + calls = mock.calls.AddFeatureHandler + lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureHandler.RUnlock() + return calls +} + +// AddFeatureLifecycle calls AddFeatureLifecycleFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { + if mock.AddFeatureLifecycleFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.AddFeatureLifecycleFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddFeatureLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Enabled func() bool + Name string + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle + }{ + Ctx: ctx, + Enabled: enabled, + Name: name, + Lifecycle: lifecycle, + } + lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureLifecycle.Lock() + mock.calls.AddFeatureLifecycle = append(mock.calls.AddFeatureLifecycle, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureLifecycle.Unlock() + mock.AddFeatureLifecycleFunc(ctx, enabled, name, lifecycle) +} + +// AddFeatureLifecycleCalls gets all the calls that were made to AddFeatureLifecycle. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.AddFeatureLifecycleCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddFeatureLifecycleCalls() []struct { + Ctx context.Context + Enabled func() bool + Name string + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle +} { + var calls []struct { + Ctx context.Context + Enabled func() bool + Name string + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle + } + lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureLifecycle.RLock() + calls = mock.calls.AddFeatureLifecycle + lockRKEK8sWindowsSystemImageInterfaceMockAddFeatureLifecycle.RUnlock() + return calls +} + +// AddHandler calls AddHandlerFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.RKEK8sWindowsSystemImageHandlerFunc) { + if mock.AddHandlerFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.AddHandlerFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddHandler was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + }{ + Ctx: ctx, + Name: name, + Sync: sync, + } + lockRKEK8sWindowsSystemImageInterfaceMockAddHandler.Lock() + mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockAddHandler.Unlock() + mock.AddHandlerFunc(ctx, name, sync) +} + +// AddHandlerCalls gets all the calls that were made to AddHandler. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.AddHandlerCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddHandlerCalls() []struct { + Ctx context.Context + Name string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc +} { + var calls []struct { + Ctx context.Context + Name string + Sync v3.RKEK8sWindowsSystemImageHandlerFunc + } + lockRKEK8sWindowsSystemImageInterfaceMockAddHandler.RLock() + calls = mock.calls.AddHandler + lockRKEK8sWindowsSystemImageInterfaceMockAddHandler.RUnlock() + return calls +} + +// AddLifecycle calls AddLifecycleFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.RKEK8sWindowsSystemImageLifecycle) { + if mock.AddLifecycleFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.AddLifecycleFunc: method is nil but RKEK8sWindowsSystemImageInterface.AddLifecycle was just called") + } + callInfo := struct { + Ctx context.Context + Name string + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle + }{ + Ctx: ctx, + Name: name, + Lifecycle: lifecycle, + } + lockRKEK8sWindowsSystemImageInterfaceMockAddLifecycle.Lock() + mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockAddLifecycle.Unlock() + mock.AddLifecycleFunc(ctx, name, lifecycle) +} + +// AddLifecycleCalls gets all the calls that were made to AddLifecycle. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.AddLifecycleCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) AddLifecycleCalls() []struct { + Ctx context.Context + Name string + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle +} { + var calls []struct { + Ctx context.Context + Name string + Lifecycle v3.RKEK8sWindowsSystemImageLifecycle + } + lockRKEK8sWindowsSystemImageInterfaceMockAddLifecycle.RLock() + calls = mock.calls.AddLifecycle + lockRKEK8sWindowsSystemImageInterfaceMockAddLifecycle.RUnlock() + return calls +} + +// Controller calls ControllerFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) Controller() v3.RKEK8sWindowsSystemImageController { + if mock.ControllerFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.ControllerFunc: method is nil but RKEK8sWindowsSystemImageInterface.Controller was just called") + } + callInfo := struct { + }{} + lockRKEK8sWindowsSystemImageInterfaceMockController.Lock() + mock.calls.Controller = append(mock.calls.Controller, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockController.Unlock() + return mock.ControllerFunc() +} + +// ControllerCalls gets all the calls that were made to Controller. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.ControllerCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) ControllerCalls() []struct { +} { + var calls []struct { + } + lockRKEK8sWindowsSystemImageInterfaceMockController.RLock() + calls = mock.calls.Controller + lockRKEK8sWindowsSystemImageInterfaceMockController.RUnlock() + return calls +} + +// Create calls CreateFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) Create(in1 *v3.RKEK8sWindowsSystemImage) (*v3.RKEK8sWindowsSystemImage, error) { + if mock.CreateFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.CreateFunc: method is nil but RKEK8sWindowsSystemImageInterface.Create was just called") + } + callInfo := struct { + In1 *v3.RKEK8sWindowsSystemImage + }{ + In1: in1, + } + lockRKEK8sWindowsSystemImageInterfaceMockCreate.Lock() + mock.calls.Create = append(mock.calls.Create, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockCreate.Unlock() + return mock.CreateFunc(in1) +} + +// CreateCalls gets all the calls that were made to Create. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.CreateCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) CreateCalls() []struct { + In1 *v3.RKEK8sWindowsSystemImage +} { + var calls []struct { + In1 *v3.RKEK8sWindowsSystemImage + } + lockRKEK8sWindowsSystemImageInterfaceMockCreate.RLock() + calls = mock.calls.Create + lockRKEK8sWindowsSystemImageInterfaceMockCreate.RUnlock() + return calls +} + +// Delete calls DeleteFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { + if mock.DeleteFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.DeleteFunc: method is nil but RKEK8sWindowsSystemImageInterface.Delete was just called") + } + callInfo := struct { + Name string + Options *v1.DeleteOptions + }{ + Name: name, + Options: options, + } + lockRKEK8sWindowsSystemImageInterfaceMockDelete.Lock() + mock.calls.Delete = append(mock.calls.Delete, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockDelete.Unlock() + return mock.DeleteFunc(name, options) +} + +// DeleteCalls gets all the calls that were made to Delete. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.DeleteCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) DeleteCalls() []struct { + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Name string + Options *v1.DeleteOptions + } + lockRKEK8sWindowsSystemImageInterfaceMockDelete.RLock() + calls = mock.calls.Delete + lockRKEK8sWindowsSystemImageInterfaceMockDelete.RUnlock() + return calls +} + +// DeleteCollection calls DeleteCollectionFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { + if mock.DeleteCollectionFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.DeleteCollectionFunc: method is nil but RKEK8sWindowsSystemImageInterface.DeleteCollection was just called") + } + callInfo := struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + }{ + DeleteOpts: deleteOpts, + ListOpts: listOpts, + } + lockRKEK8sWindowsSystemImageInterfaceMockDeleteCollection.Lock() + mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockDeleteCollection.Unlock() + return mock.DeleteCollectionFunc(deleteOpts, listOpts) +} + +// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.DeleteCollectionCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) DeleteCollectionCalls() []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions +} { + var calls []struct { + DeleteOpts *v1.DeleteOptions + ListOpts v1.ListOptions + } + lockRKEK8sWindowsSystemImageInterfaceMockDeleteCollection.RLock() + calls = mock.calls.DeleteCollection + lockRKEK8sWindowsSystemImageInterfaceMockDeleteCollection.RUnlock() + return calls +} + +// DeleteNamespaced calls DeleteNamespacedFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { + if mock.DeleteNamespacedFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.DeleteNamespacedFunc: method is nil but RKEK8sWindowsSystemImageInterface.DeleteNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Options *v1.DeleteOptions + }{ + Namespace: namespace, + Name: name, + Options: options, + } + lockRKEK8sWindowsSystemImageInterfaceMockDeleteNamespaced.Lock() + mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockDeleteNamespaced.Unlock() + return mock.DeleteNamespacedFunc(namespace, name, options) +} + +// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.DeleteNamespacedCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) DeleteNamespacedCalls() []struct { + Namespace string + Name string + Options *v1.DeleteOptions +} { + var calls []struct { + Namespace string + Name string + Options *v1.DeleteOptions + } + lockRKEK8sWindowsSystemImageInterfaceMockDeleteNamespaced.RLock() + calls = mock.calls.DeleteNamespaced + lockRKEK8sWindowsSystemImageInterfaceMockDeleteNamespaced.RUnlock() + return calls +} + +// Get calls GetFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.RKEK8sWindowsSystemImage, error) { + if mock.GetFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.GetFunc: method is nil but RKEK8sWindowsSystemImageInterface.Get was just called") + } + callInfo := struct { + Name string + Opts v1.GetOptions + }{ + Name: name, + Opts: opts, + } + lockRKEK8sWindowsSystemImageInterfaceMockGet.Lock() + mock.calls.Get = append(mock.calls.Get, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockGet.Unlock() + return mock.GetFunc(name, opts) +} + +// GetCalls gets all the calls that were made to Get. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.GetCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) GetCalls() []struct { + Name string + Opts v1.GetOptions +} { + var calls []struct { + Name string + Opts v1.GetOptions + } + lockRKEK8sWindowsSystemImageInterfaceMockGet.RLock() + calls = mock.calls.Get + lockRKEK8sWindowsSystemImageInterfaceMockGet.RUnlock() + return calls +} + +// GetNamespaced calls GetNamespacedFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.RKEK8sWindowsSystemImage, error) { + if mock.GetNamespacedFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.GetNamespacedFunc: method is nil but RKEK8sWindowsSystemImageInterface.GetNamespaced was just called") + } + callInfo := struct { + Namespace string + Name string + Opts v1.GetOptions + }{ + Namespace: namespace, + Name: name, + Opts: opts, + } + lockRKEK8sWindowsSystemImageInterfaceMockGetNamespaced.Lock() + mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockGetNamespaced.Unlock() + return mock.GetNamespacedFunc(namespace, name, opts) +} + +// GetNamespacedCalls gets all the calls that were made to GetNamespaced. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.GetNamespacedCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) GetNamespacedCalls() []struct { + Namespace string + Name string + Opts v1.GetOptions +} { + var calls []struct { + Namespace string + Name string + Opts v1.GetOptions + } + lockRKEK8sWindowsSystemImageInterfaceMockGetNamespaced.RLock() + calls = mock.calls.GetNamespaced + lockRKEK8sWindowsSystemImageInterfaceMockGetNamespaced.RUnlock() + return calls +} + +// List calls ListFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) List(opts v1.ListOptions) (*v3.RKEK8sWindowsSystemImageList, error) { + if mock.ListFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.ListFunc: method is nil but RKEK8sWindowsSystemImageInterface.List was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockRKEK8sWindowsSystemImageInterfaceMockList.Lock() + mock.calls.List = append(mock.calls.List, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockList.Unlock() + return mock.ListFunc(opts) +} + +// ListCalls gets all the calls that were made to List. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.ListCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) ListCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockRKEK8sWindowsSystemImageInterfaceMockList.RLock() + calls = mock.calls.List + lockRKEK8sWindowsSystemImageInterfaceMockList.RUnlock() + return calls +} + +// ObjectClient calls ObjectClientFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) ObjectClient() *objectclient.ObjectClient { + if mock.ObjectClientFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.ObjectClientFunc: method is nil but RKEK8sWindowsSystemImageInterface.ObjectClient was just called") + } + callInfo := struct { + }{} + lockRKEK8sWindowsSystemImageInterfaceMockObjectClient.Lock() + mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockObjectClient.Unlock() + return mock.ObjectClientFunc() +} + +// ObjectClientCalls gets all the calls that were made to ObjectClient. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.ObjectClientCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) ObjectClientCalls() []struct { +} { + var calls []struct { + } + lockRKEK8sWindowsSystemImageInterfaceMockObjectClient.RLock() + calls = mock.calls.ObjectClient + lockRKEK8sWindowsSystemImageInterfaceMockObjectClient.RUnlock() + return calls +} + +// Update calls UpdateFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) Update(in1 *v3.RKEK8sWindowsSystemImage) (*v3.RKEK8sWindowsSystemImage, error) { + if mock.UpdateFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.UpdateFunc: method is nil but RKEK8sWindowsSystemImageInterface.Update was just called") + } + callInfo := struct { + In1 *v3.RKEK8sWindowsSystemImage + }{ + In1: in1, + } + lockRKEK8sWindowsSystemImageInterfaceMockUpdate.Lock() + mock.calls.Update = append(mock.calls.Update, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockUpdate.Unlock() + return mock.UpdateFunc(in1) +} + +// UpdateCalls gets all the calls that were made to Update. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.UpdateCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) UpdateCalls() []struct { + In1 *v3.RKEK8sWindowsSystemImage +} { + var calls []struct { + In1 *v3.RKEK8sWindowsSystemImage + } + lockRKEK8sWindowsSystemImageInterfaceMockUpdate.RLock() + calls = mock.calls.Update + lockRKEK8sWindowsSystemImageInterfaceMockUpdate.RUnlock() + return calls +} + +// Watch calls WatchFunc. +func (mock *RKEK8sWindowsSystemImageInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { + if mock.WatchFunc == nil { + panic("RKEK8sWindowsSystemImageInterfaceMock.WatchFunc: method is nil but RKEK8sWindowsSystemImageInterface.Watch was just called") + } + callInfo := struct { + Opts v1.ListOptions + }{ + Opts: opts, + } + lockRKEK8sWindowsSystemImageInterfaceMockWatch.Lock() + mock.calls.Watch = append(mock.calls.Watch, callInfo) + lockRKEK8sWindowsSystemImageInterfaceMockWatch.Unlock() + return mock.WatchFunc(opts) +} + +// WatchCalls gets all the calls that were made to Watch. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImageInterface.WatchCalls()) +func (mock *RKEK8sWindowsSystemImageInterfaceMock) WatchCalls() []struct { + Opts v1.ListOptions +} { + var calls []struct { + Opts v1.ListOptions + } + lockRKEK8sWindowsSystemImageInterfaceMockWatch.RLock() + calls = mock.calls.Watch + lockRKEK8sWindowsSystemImageInterfaceMockWatch.RUnlock() + return calls +} + +var ( + lockRKEK8sWindowsSystemImagesGetterMockRKEK8sWindowsSystemImages sync.RWMutex +) + +// Ensure, that RKEK8sWindowsSystemImagesGetterMock does implement RKEK8sWindowsSystemImagesGetter. +// If this is not the case, regenerate this file with moq. +var _ v3.RKEK8sWindowsSystemImagesGetter = &RKEK8sWindowsSystemImagesGetterMock{} + +// RKEK8sWindowsSystemImagesGetterMock is a mock implementation of RKEK8sWindowsSystemImagesGetter. +// +// func TestSomethingThatUsesRKEK8sWindowsSystemImagesGetter(t *testing.T) { +// +// // make and configure a mocked RKEK8sWindowsSystemImagesGetter +// mockedRKEK8sWindowsSystemImagesGetter := &RKEK8sWindowsSystemImagesGetterMock{ +// RKEK8sWindowsSystemImagesFunc: func(namespace string) v3.RKEK8sWindowsSystemImageInterface { +// panic("mock out the RKEK8sWindowsSystemImages method") +// }, +// } +// +// // use mockedRKEK8sWindowsSystemImagesGetter in code that requires RKEK8sWindowsSystemImagesGetter +// // and then make assertions. +// +// } +type RKEK8sWindowsSystemImagesGetterMock struct { + // RKEK8sWindowsSystemImagesFunc mocks the RKEK8sWindowsSystemImages method. + RKEK8sWindowsSystemImagesFunc func(namespace string) v3.RKEK8sWindowsSystemImageInterface + + // calls tracks calls to the methods. + calls struct { + // RKEK8sWindowsSystemImages holds details about calls to the RKEK8sWindowsSystemImages method. + RKEK8sWindowsSystemImages []struct { + // Namespace is the namespace argument value. + Namespace string + } + } +} + +// RKEK8sWindowsSystemImages calls RKEK8sWindowsSystemImagesFunc. +func (mock *RKEK8sWindowsSystemImagesGetterMock) RKEK8sWindowsSystemImages(namespace string) v3.RKEK8sWindowsSystemImageInterface { + if mock.RKEK8sWindowsSystemImagesFunc == nil { + panic("RKEK8sWindowsSystemImagesGetterMock.RKEK8sWindowsSystemImagesFunc: method is nil but RKEK8sWindowsSystemImagesGetter.RKEK8sWindowsSystemImages was just called") + } + callInfo := struct { + Namespace string + }{ + Namespace: namespace, + } + lockRKEK8sWindowsSystemImagesGetterMockRKEK8sWindowsSystemImages.Lock() + mock.calls.RKEK8sWindowsSystemImages = append(mock.calls.RKEK8sWindowsSystemImages, callInfo) + lockRKEK8sWindowsSystemImagesGetterMockRKEK8sWindowsSystemImages.Unlock() + return mock.RKEK8sWindowsSystemImagesFunc(namespace) +} + +// RKEK8sWindowsSystemImagesCalls gets all the calls that were made to RKEK8sWindowsSystemImages. +// Check the length with: +// len(mockedRKEK8sWindowsSystemImagesGetter.RKEK8sWindowsSystemImagesCalls()) +func (mock *RKEK8sWindowsSystemImagesGetterMock) RKEK8sWindowsSystemImagesCalls() []struct { + Namespace string +} { + var calls []struct { + Namespace string + } + lockRKEK8sWindowsSystemImagesGetterMockRKEK8sWindowsSystemImages.RLock() + calls = mock.calls.RKEK8sWindowsSystemImages + lockRKEK8sWindowsSystemImagesGetterMockRKEK8sWindowsSystemImages.RUnlock() + return calls +} diff --git a/apis/management.cattle.io/v3/zz_generated_deepcopy.go b/apis/management.cattle.io/v3/zz_generated_deepcopy.go index 0bed2773..7377319c 100644 --- a/apis/management.cattle.io/v3/zz_generated_deepcopy.go +++ b/apis/management.cattle.io/v3/zz_generated_deepcopy.go @@ -4002,6 +4002,22 @@ func (in *IngressConfig) DeepCopy() *IngressConfig { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *K8sVersionInfo) DeepCopyInto(out *K8sVersionInfo) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new K8sVersionInfo. +func (in *K8sVersionInfo) DeepCopy() *K8sVersionInfo { + if in == nil { + return nil + } + out := new(K8sVersionInfo) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *KafkaConfig) DeepCopyInto(out *KafkaConfig) { *out = *in @@ -7591,6 +7607,66 @@ 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 + out.ListMeta = in.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 @@ -7688,6 +7764,189 @@ 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 + out.ListMeta = in.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 + out.ListMeta = in.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 *RKEK8sWindowsSystemImage) DeepCopyInto(out *RKEK8sWindowsSystemImage) { + *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 RKEK8sWindowsSystemImage. +func (in *RKEK8sWindowsSystemImage) DeepCopy() *RKEK8sWindowsSystemImage { + if in == nil { + return nil + } + out := new(RKEK8sWindowsSystemImage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RKEK8sWindowsSystemImage) 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 *RKEK8sWindowsSystemImageList) DeepCopyInto(out *RKEK8sWindowsSystemImageList) { + *out = *in + out.TypeMeta = in.TypeMeta + out.ListMeta = in.ListMeta + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]RKEK8sWindowsSystemImage, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RKEK8sWindowsSystemImageList. +func (in *RKEK8sWindowsSystemImageList) DeepCopy() *RKEK8sWindowsSystemImageList { + if in == nil { + return nil + } + out := new(RKEK8sWindowsSystemImageList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *RKEK8sWindowsSystemImageList) 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 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 ef92288c..4d455f75 100644 --- a/apis/management.cattle.io/v3/zz_generated_k8s_client.go +++ b/apis/management.cattle.io/v3/zz_generated_k8s_client.go @@ -79,6 +79,10 @@ type Interface interface { CloudCredentialsGetter ClusterTemplatesGetter ClusterTemplateRevisionsGetter + RKEK8sSystemImagesGetter + RKEK8sServiceOptionsGetter + RKEAddonsGetter + RKEK8sWindowsSystemImagesGetter } type Clients struct { @@ -143,6 +147,10 @@ type Clients struct { CloudCredential CloudCredentialClient ClusterTemplate ClusterTemplateClient ClusterTemplateRevision ClusterTemplateRevisionClient + RKEK8sSystemImage RKEK8sSystemImageClient + RKEK8sServiceOption RKEK8sServiceOptionClient + RKEAddon RKEAddonClient + RKEK8sWindowsSystemImage RKEK8sWindowsSystemImageClient } type Client struct { @@ -209,6 +217,10 @@ type Client struct { cloudCredentialControllers map[string]CloudCredentialController clusterTemplateControllers map[string]ClusterTemplateController clusterTemplateRevisionControllers map[string]ClusterTemplateRevisionController + rkeK8sSystemImageControllers map[string]RKEK8sSystemImageController + rkeK8sServiceOptionControllers map[string]RKEK8sServiceOptionController + rkeAddonControllers map[string]RKEAddonController + rkeK8sWindowsSystemImageControllers map[string]RKEK8sWindowsSystemImageController } func Factory(ctx context.Context, config rest.Config) (context.Context, controller.Starter, error) { @@ -421,6 +433,18 @@ func NewClientsFromInterface(iface Interface) *Clients { ClusterTemplateRevision: &clusterTemplateRevisionClient2{ iface: iface.ClusterTemplateRevisions(""), }, + RKEK8sSystemImage: &rkeK8sSystemImageClient2{ + iface: iface.RKEK8sSystemImages(""), + }, + RKEK8sServiceOption: &rkeK8sServiceOptionClient2{ + iface: iface.RKEK8sServiceOptions(""), + }, + RKEAddon: &rkeAddonClient2{ + iface: iface.RKEAddons(""), + }, + RKEK8sWindowsSystemImage: &rkeK8sWindowsSystemImageClient2{ + iface: iface.RKEK8sWindowsSystemImages(""), + }, } } @@ -496,6 +520,10 @@ func NewForConfig(config rest.Config) (Interface, error) { cloudCredentialControllers: map[string]CloudCredentialController{}, clusterTemplateControllers: map[string]ClusterTemplateController{}, clusterTemplateRevisionControllers: map[string]ClusterTemplateRevisionController{}, + rkeK8sSystemImageControllers: map[string]RKEK8sSystemImageController{}, + rkeK8sServiceOptionControllers: map[string]RKEK8sServiceOptionController{}, + rkeAddonControllers: map[string]RKEAddonController{}, + rkeK8sWindowsSystemImageControllers: map[string]RKEK8sWindowsSystemImageController{}, }, nil } @@ -1277,3 +1305,55 @@ func (c *Client) ClusterTemplateRevisions(namespace string) ClusterTemplateRevis objectClient: objectClient, } } + +type RKEK8sSystemImagesGetter interface { + RKEK8sSystemImages(namespace string) RKEK8sSystemImageInterface +} + +func (c *Client) RKEK8sSystemImages(namespace string) RKEK8sSystemImageInterface { + objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RKEK8sSystemImageResource, RKEK8sSystemImageGroupVersionKind, rkeK8sSystemImageFactory{}) + return &rkeK8sSystemImageClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + +type RKEK8sServiceOptionsGetter interface { + RKEK8sServiceOptions(namespace string) RKEK8sServiceOptionInterface +} + +func (c *Client) RKEK8sServiceOptions(namespace string) RKEK8sServiceOptionInterface { + objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RKEK8sServiceOptionResource, RKEK8sServiceOptionGroupVersionKind, rkeK8sServiceOptionFactory{}) + return &rkeK8sServiceOptionClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + +type RKEAddonsGetter interface { + RKEAddons(namespace string) RKEAddonInterface +} + +func (c *Client) RKEAddons(namespace string) RKEAddonInterface { + objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RKEAddonResource, RKEAddonGroupVersionKind, rkeAddonFactory{}) + return &rkeAddonClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} + +type RKEK8sWindowsSystemImagesGetter interface { + RKEK8sWindowsSystemImages(namespace string) RKEK8sWindowsSystemImageInterface +} + +func (c *Client) RKEK8sWindowsSystemImages(namespace string) RKEK8sWindowsSystemImageInterface { + objectClient := objectclient.NewObjectClient(namespace, c.restClient, &RKEK8sWindowsSystemImageResource, RKEK8sWindowsSystemImageGroupVersionKind, rkeK8sWindowsSystemImageFactory{}) + return &rkeK8sWindowsSystemImageClient{ + ns: namespace, + client: c, + objectClient: objectClient, + } +} 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 new file mode 100644 index 00000000..0d70352e --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_rke_addon_controller.go @@ -0,0 +1,505 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/controller" + "github.com/rancher/norman/objectclient" + "github.com/rancher/norman/resource" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + RKEAddonGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "RKEAddon", + } + RKEAddonResource = metav1.APIResource{ + Name: "rkeaddons", + SingularName: "rkeaddon", + Namespaced: true, + + Kind: RKEAddonGroupVersionKind.Kind, + } + + RKEAddonGroupVersionResource = schema.GroupVersionResource{ + Group: GroupName, + Version: Version, + Resource: "rkeaddons", + } +) + +func init() { + resource.Put(RKEAddonGroupVersionResource) +} + +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 { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []RKEAddon `json:"items"` +} + +type RKEAddonHandlerFunc func(key string, 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 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) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +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) + Delete(name string, options *metav1.DeleteOptions) error + DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error + List(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) +} + +type rkeAddonLister struct { + controller *rkeAddonController +} + +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)) + }) + return +} + +func (l *rkeAddonLister) Get(namespace, name string) (*RKEAddon, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: RKEAddonGroupVersionKind.Group, + Resource: "rkeAddon", + }, key) + } + return obj.(*RKEAddon), nil +} + +type rkeAddonController struct { + controller.GenericController +} + +func (c *rkeAddonController) Generic() controller.GenericController { + return c.GenericController +} + +func (c *rkeAddonController) Lister() RKEAddonLister { + return &rkeAddonLister{ + controller: c, + } +} + +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 { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +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 { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +func (c *rkeAddonController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RKEAddonHandlerFunc) { + resource.PutClusterScoped(RKEAddonGroupVersionResource) + 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) { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +func (c *rkeAddonController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RKEAddonHandlerFunc) { + resource.PutClusterScoped(RKEAddonGroupVersionResource) + 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) { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +type rkeAddonFactory struct { +} + +func (c rkeAddonFactory) Object() runtime.Object { + return &RKEAddon{} +} + +func (c rkeAddonFactory) List() runtime.Object { + return &RKEAddonList{} +} + +func (s *rkeAddonClient) Controller() RKEAddonController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.rkeAddonControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(RKEAddonGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &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 +} + +func (s *rkeAddonClient) ObjectClient() *objectclient.ObjectClient { + return s.objectClient +} + +func (s *rkeAddonClient) Create(o *RKEAddon) (*RKEAddon, error) { + obj, err := s.objectClient.Create(o) + return obj.(*RKEAddon), err +} + +func (s *rkeAddonClient) Get(name string, opts metav1.GetOptions) (*RKEAddon, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*RKEAddon), err +} + +func (s *rkeAddonClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEAddon, error) { + obj, err := s.objectClient.GetNamespaced(namespace, name, opts) + return obj.(*RKEAddon), err +} + +func (s *rkeAddonClient) Update(o *RKEAddon) (*RKEAddon, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*RKEAddon), err +} + +func (s *rkeAddonClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *rkeAddonClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { + return s.objectClient.DeleteNamespaced(namespace, name, options) +} + +func (s *rkeAddonClient) List(opts metav1.ListOptions) (*RKEAddonList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*RKEAddonList), err +} + +func (s *rkeAddonClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +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 +} + +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) { + s.Controller().AddHandler(ctx, name, sync) +} + +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) + 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) + s.Controller().AddFeatureHandler(ctx, enabled, name, sync) +} + +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) { + 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) + 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) + s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) +} + +type RKEAddonIndexer func(obj *RKEAddon) ([]string, error) + +type RKEAddonClientCache interface { + Get(namespace, name string) (*RKEAddon, error) + List(namespace string, selector labels.Selector) ([]*RKEAddon, error) + + Index(name string, indexer RKEAddonIndexer) + GetIndexed(name, key string) ([]*RKEAddon, error) +} + +type RKEAddonClient interface { + Create(*RKEAddon) (*RKEAddon, error) + Get(namespace, name string, opts metav1.GetOptions) (*RKEAddon, error) + Update(*RKEAddon) (*RKEAddon, error) + Delete(namespace, name string, options *metav1.DeleteOptions) error + List(namespace string, opts metav1.ListOptions) (*RKEAddonList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + + Cache() RKEAddonClientCache + + OnCreate(ctx context.Context, name string, sync RKEAddonChangeHandlerFunc) + OnChange(ctx context.Context, name string, sync RKEAddonChangeHandlerFunc) + OnRemove(ctx context.Context, name string, sync RKEAddonChangeHandlerFunc) + Enqueue(namespace, name string) + + Generic() controller.GenericController + ObjectClient() *objectclient.ObjectClient + Interface() RKEAddonInterface +} + +type rkeAddonClientCache struct { + client *rkeAddonClient2 +} + +type rkeAddonClient2 struct { + iface RKEAddonInterface + controller RKEAddonController +} + +func (n *rkeAddonClient2) Interface() RKEAddonInterface { + return n.iface +} + +func (n *rkeAddonClient2) Generic() controller.GenericController { + return n.iface.Controller().Generic() +} + +func (n *rkeAddonClient2) ObjectClient() *objectclient.ObjectClient { + return n.Interface().ObjectClient() +} + +func (n *rkeAddonClient2) Enqueue(namespace, name string) { + n.iface.Controller().Enqueue(namespace, name) +} + +func (n *rkeAddonClient2) Create(obj *RKEAddon) (*RKEAddon, error) { + return n.iface.Create(obj) +} + +func (n *rkeAddonClient2) Get(namespace, name string, opts metav1.GetOptions) (*RKEAddon, error) { + return n.iface.GetNamespaced(namespace, name, opts) +} + +func (n *rkeAddonClient2) Update(obj *RKEAddon) (*RKEAddon, error) { + return n.iface.Update(obj) +} + +func (n *rkeAddonClient2) Delete(namespace, name string, options *metav1.DeleteOptions) error { + return n.iface.DeleteNamespaced(namespace, name, options) +} + +func (n *rkeAddonClient2) List(namespace string, opts metav1.ListOptions) (*RKEAddonList, error) { + return n.iface.List(opts) +} + +func (n *rkeAddonClient2) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return n.iface.Watch(opts) +} + +func (n *rkeAddonClientCache) Get(namespace, name string) (*RKEAddon, error) { + return n.client.controller.Lister().Get(namespace, name) +} + +func (n *rkeAddonClientCache) List(namespace string, selector labels.Selector) ([]*RKEAddon, error) { + return n.client.controller.Lister().List(namespace, selector) +} + +func (n *rkeAddonClient2) Cache() RKEAddonClientCache { + n.loadController() + return &rkeAddonClientCache{ + client: n, + } +} + +func (n *rkeAddonClient2) OnCreate(ctx context.Context, name string, sync RKEAddonChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name+"-create", &rkeAddonLifecycleDelegate{create: sync}) +} + +func (n *rkeAddonClient2) OnChange(ctx context.Context, name string, sync RKEAddonChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name+"-change", &rkeAddonLifecycleDelegate{update: sync}) +} + +func (n *rkeAddonClient2) OnRemove(ctx context.Context, name string, sync RKEAddonChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name, &rkeAddonLifecycleDelegate{remove: sync}) +} + +func (n *rkeAddonClientCache) Index(name string, indexer RKEAddonIndexer) { + err := n.client.controller.Informer().GetIndexer().AddIndexers(map[string]cache.IndexFunc{ + name: func(obj interface{}) ([]string, error) { + if v, ok := obj.(*RKEAddon); ok { + return indexer(v) + } + return nil, nil + }, + }) + + if err != nil { + panic(err) + } +} + +func (n *rkeAddonClientCache) GetIndexed(name, key string) ([]*RKEAddon, error) { + var result []*RKEAddon + objs, err := n.client.controller.Informer().GetIndexer().ByIndex(name, key) + if err != nil { + return nil, err + } + for _, obj := range objs { + if v, ok := obj.(*RKEAddon); ok { + result = append(result, v) + } + } + + return result, nil +} + +func (n *rkeAddonClient2) loadController() { + if n.controller == nil { + n.controller = n.iface.Controller() + } +} + +type rkeAddonLifecycleDelegate struct { + create RKEAddonChangeHandlerFunc + update RKEAddonChangeHandlerFunc + remove RKEAddonChangeHandlerFunc +} + +func (n *rkeAddonLifecycleDelegate) HasCreate() bool { + return n.create != nil +} + +func (n *rkeAddonLifecycleDelegate) Create(obj *RKEAddon) (runtime.Object, error) { + if n.create == nil { + return obj, nil + } + return n.create(obj) +} + +func (n *rkeAddonLifecycleDelegate) HasFinalize() bool { + return n.remove != nil +} + +func (n *rkeAddonLifecycleDelegate) Remove(obj *RKEAddon) (runtime.Object, error) { + if n.remove == nil { + return obj, nil + } + return n.remove(obj) +} + +func (n *rkeAddonLifecycleDelegate) Updated(obj *RKEAddon) (runtime.Object, error) { + if n.update == nil { + return obj, nil + } + return n.update(obj) +} 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 new file mode 100644 index 00000000..2cb06f7d --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_rke_addon_lifecycle_adapter.go @@ -0,0 +1,62 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "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 rkeAddonLifecycleAdapter struct { + lifecycle RKEAddonLifecycle +} + +func (w *rkeAddonLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *rkeAddonLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + +func (w *rkeAddonLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*RKEAddon)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *rkeAddonLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*RKEAddon)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *rkeAddonLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + 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 { + adapter := &rkeAddonLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) + return func(key string, obj *RKEAddon) (runtime.Object, error) { + newObj, err := syncFn(key, obj) + if o, ok := newObj.(runtime.Object); ok { + return o, err + } + return nil, 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 new file mode 100644 index 00000000..1e4ed07e --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_controller.go @@ -0,0 +1,505 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/controller" + "github.com/rancher/norman/objectclient" + "github.com/rancher/norman/resource" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + RKEK8sServiceOptionGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "RKEK8sServiceOption", + } + RKEK8sServiceOptionResource = metav1.APIResource{ + Name: "rkek8sserviceoptions", + SingularName: "rkek8sserviceoption", + Namespaced: true, + + Kind: RKEK8sServiceOptionGroupVersionKind.Kind, + } + + RKEK8sServiceOptionGroupVersionResource = schema.GroupVersionResource{ + Group: GroupName, + Version: Version, + Resource: "rkek8sserviceoptions", + } +) + +func init() { + resource.Put(RKEK8sServiceOptionGroupVersionResource) +} + +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 { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []RKEK8sServiceOption `json:"items"` +} + +type RKEK8sServiceOptionHandlerFunc func(key string, 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 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) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +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) + Delete(name string, options *metav1.DeleteOptions) error + DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error + List(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) +} + +type rkeK8sServiceOptionLister struct { + controller *rkeK8sServiceOptionController +} + +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)) + }) + return +} + +func (l *rkeK8sServiceOptionLister) Get(namespace, name string) (*RKEK8sServiceOption, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: RKEK8sServiceOptionGroupVersionKind.Group, + Resource: "rkeK8sServiceOption", + }, key) + } + return obj.(*RKEK8sServiceOption), nil +} + +type rkeK8sServiceOptionController struct { + controller.GenericController +} + +func (c *rkeK8sServiceOptionController) Generic() controller.GenericController { + return c.GenericController +} + +func (c *rkeK8sServiceOptionController) Lister() RKEK8sServiceOptionLister { + return &rkeK8sServiceOptionLister{ + controller: c, + } +} + +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 { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +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 { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +func (c *rkeK8sServiceOptionController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RKEK8sServiceOptionHandlerFunc) { + resource.PutClusterScoped(RKEK8sServiceOptionGroupVersionResource) + 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) { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +func (c *rkeK8sServiceOptionController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RKEK8sServiceOptionHandlerFunc) { + resource.PutClusterScoped(RKEK8sServiceOptionGroupVersionResource) + 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) { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +type rkeK8sServiceOptionFactory struct { +} + +func (c rkeK8sServiceOptionFactory) Object() runtime.Object { + return &RKEK8sServiceOption{} +} + +func (c rkeK8sServiceOptionFactory) List() runtime.Object { + return &RKEK8sServiceOptionList{} +} + +func (s *rkeK8sServiceOptionClient) Controller() RKEK8sServiceOptionController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.rkeK8sServiceOptionControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(RKEK8sServiceOptionGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &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 +} + +func (s *rkeK8sServiceOptionClient) ObjectClient() *objectclient.ObjectClient { + return s.objectClient +} + +func (s *rkeK8sServiceOptionClient) Create(o *RKEK8sServiceOption) (*RKEK8sServiceOption, error) { + obj, err := s.objectClient.Create(o) + return obj.(*RKEK8sServiceOption), err +} + +func (s *rkeK8sServiceOptionClient) Get(name string, opts metav1.GetOptions) (*RKEK8sServiceOption, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*RKEK8sServiceOption), err +} + +func (s *rkeK8sServiceOptionClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEK8sServiceOption, error) { + obj, err := s.objectClient.GetNamespaced(namespace, name, opts) + return obj.(*RKEK8sServiceOption), err +} + +func (s *rkeK8sServiceOptionClient) Update(o *RKEK8sServiceOption) (*RKEK8sServiceOption, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*RKEK8sServiceOption), err +} + +func (s *rkeK8sServiceOptionClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *rkeK8sServiceOptionClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { + return s.objectClient.DeleteNamespaced(namespace, name, options) +} + +func (s *rkeK8sServiceOptionClient) List(opts metav1.ListOptions) (*RKEK8sServiceOptionList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*RKEK8sServiceOptionList), err +} + +func (s *rkeK8sServiceOptionClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +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 +} + +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) { + s.Controller().AddHandler(ctx, name, sync) +} + +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) + 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) + s.Controller().AddFeatureHandler(ctx, enabled, name, sync) +} + +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) { + 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) + 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) + s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) +} + +type RKEK8sServiceOptionIndexer func(obj *RKEK8sServiceOption) ([]string, error) + +type RKEK8sServiceOptionClientCache interface { + Get(namespace, name string) (*RKEK8sServiceOption, error) + List(namespace string, selector labels.Selector) ([]*RKEK8sServiceOption, error) + + Index(name string, indexer RKEK8sServiceOptionIndexer) + GetIndexed(name, key string) ([]*RKEK8sServiceOption, error) +} + +type RKEK8sServiceOptionClient interface { + Create(*RKEK8sServiceOption) (*RKEK8sServiceOption, error) + Get(namespace, name string, opts metav1.GetOptions) (*RKEK8sServiceOption, error) + Update(*RKEK8sServiceOption) (*RKEK8sServiceOption, error) + Delete(namespace, name string, options *metav1.DeleteOptions) error + List(namespace string, opts metav1.ListOptions) (*RKEK8sServiceOptionList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + + Cache() RKEK8sServiceOptionClientCache + + OnCreate(ctx context.Context, name string, sync RKEK8sServiceOptionChangeHandlerFunc) + OnChange(ctx context.Context, name string, sync RKEK8sServiceOptionChangeHandlerFunc) + OnRemove(ctx context.Context, name string, sync RKEK8sServiceOptionChangeHandlerFunc) + Enqueue(namespace, name string) + + Generic() controller.GenericController + ObjectClient() *objectclient.ObjectClient + Interface() RKEK8sServiceOptionInterface +} + +type rkeK8sServiceOptionClientCache struct { + client *rkeK8sServiceOptionClient2 +} + +type rkeK8sServiceOptionClient2 struct { + iface RKEK8sServiceOptionInterface + controller RKEK8sServiceOptionController +} + +func (n *rkeK8sServiceOptionClient2) Interface() RKEK8sServiceOptionInterface { + return n.iface +} + +func (n *rkeK8sServiceOptionClient2) Generic() controller.GenericController { + return n.iface.Controller().Generic() +} + +func (n *rkeK8sServiceOptionClient2) ObjectClient() *objectclient.ObjectClient { + return n.Interface().ObjectClient() +} + +func (n *rkeK8sServiceOptionClient2) Enqueue(namespace, name string) { + n.iface.Controller().Enqueue(namespace, name) +} + +func (n *rkeK8sServiceOptionClient2) Create(obj *RKEK8sServiceOption) (*RKEK8sServiceOption, error) { + return n.iface.Create(obj) +} + +func (n *rkeK8sServiceOptionClient2) Get(namespace, name string, opts metav1.GetOptions) (*RKEK8sServiceOption, error) { + return n.iface.GetNamespaced(namespace, name, opts) +} + +func (n *rkeK8sServiceOptionClient2) Update(obj *RKEK8sServiceOption) (*RKEK8sServiceOption, error) { + return n.iface.Update(obj) +} + +func (n *rkeK8sServiceOptionClient2) Delete(namespace, name string, options *metav1.DeleteOptions) error { + return n.iface.DeleteNamespaced(namespace, name, options) +} + +func (n *rkeK8sServiceOptionClient2) List(namespace string, opts metav1.ListOptions) (*RKEK8sServiceOptionList, error) { + return n.iface.List(opts) +} + +func (n *rkeK8sServiceOptionClient2) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return n.iface.Watch(opts) +} + +func (n *rkeK8sServiceOptionClientCache) Get(namespace, name string) (*RKEK8sServiceOption, error) { + return n.client.controller.Lister().Get(namespace, name) +} + +func (n *rkeK8sServiceOptionClientCache) List(namespace string, selector labels.Selector) ([]*RKEK8sServiceOption, error) { + return n.client.controller.Lister().List(namespace, selector) +} + +func (n *rkeK8sServiceOptionClient2) Cache() RKEK8sServiceOptionClientCache { + n.loadController() + return &rkeK8sServiceOptionClientCache{ + client: n, + } +} + +func (n *rkeK8sServiceOptionClient2) OnCreate(ctx context.Context, name string, sync RKEK8sServiceOptionChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name+"-create", &rkeK8sServiceOptionLifecycleDelegate{create: sync}) +} + +func (n *rkeK8sServiceOptionClient2) OnChange(ctx context.Context, name string, sync RKEK8sServiceOptionChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name+"-change", &rkeK8sServiceOptionLifecycleDelegate{update: sync}) +} + +func (n *rkeK8sServiceOptionClient2) OnRemove(ctx context.Context, name string, sync RKEK8sServiceOptionChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name, &rkeK8sServiceOptionLifecycleDelegate{remove: sync}) +} + +func (n *rkeK8sServiceOptionClientCache) Index(name string, indexer RKEK8sServiceOptionIndexer) { + err := n.client.controller.Informer().GetIndexer().AddIndexers(map[string]cache.IndexFunc{ + name: func(obj interface{}) ([]string, error) { + if v, ok := obj.(*RKEK8sServiceOption); ok { + return indexer(v) + } + return nil, nil + }, + }) + + if err != nil { + panic(err) + } +} + +func (n *rkeK8sServiceOptionClientCache) GetIndexed(name, key string) ([]*RKEK8sServiceOption, error) { + var result []*RKEK8sServiceOption + objs, err := n.client.controller.Informer().GetIndexer().ByIndex(name, key) + if err != nil { + return nil, err + } + for _, obj := range objs { + if v, ok := obj.(*RKEK8sServiceOption); ok { + result = append(result, v) + } + } + + return result, nil +} + +func (n *rkeK8sServiceOptionClient2) loadController() { + if n.controller == nil { + n.controller = n.iface.Controller() + } +} + +type rkeK8sServiceOptionLifecycleDelegate struct { + create RKEK8sServiceOptionChangeHandlerFunc + update RKEK8sServiceOptionChangeHandlerFunc + remove RKEK8sServiceOptionChangeHandlerFunc +} + +func (n *rkeK8sServiceOptionLifecycleDelegate) HasCreate() bool { + return n.create != nil +} + +func (n *rkeK8sServiceOptionLifecycleDelegate) Create(obj *RKEK8sServiceOption) (runtime.Object, error) { + if n.create == nil { + return obj, nil + } + return n.create(obj) +} + +func (n *rkeK8sServiceOptionLifecycleDelegate) HasFinalize() bool { + return n.remove != nil +} + +func (n *rkeK8sServiceOptionLifecycleDelegate) Remove(obj *RKEK8sServiceOption) (runtime.Object, error) { + if n.remove == nil { + return obj, nil + } + return n.remove(obj) +} + +func (n *rkeK8sServiceOptionLifecycleDelegate) Updated(obj *RKEK8sServiceOption) (runtime.Object, error) { + if n.update == nil { + return obj, nil + } + return n.update(obj) +} 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 new file mode 100644 index 00000000..4578da52 --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_rke_k8s_service_option_lifecycle_adapter.go @@ -0,0 +1,62 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "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 rkeK8sServiceOptionLifecycleAdapter struct { + lifecycle RKEK8sServiceOptionLifecycle +} + +func (w *rkeK8sServiceOptionLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *rkeK8sServiceOptionLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + +func (w *rkeK8sServiceOptionLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*RKEK8sServiceOption)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *rkeK8sServiceOptionLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*RKEK8sServiceOption)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *rkeK8sServiceOptionLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + 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 { + adapter := &rkeK8sServiceOptionLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) + return func(key string, obj *RKEK8sServiceOption) (runtime.Object, error) { + newObj, err := syncFn(key, obj) + if o, ok := newObj.(runtime.Object); ok { + return o, err + } + return nil, 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 new file mode 100644 index 00000000..86afcfc5 --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_controller.go @@ -0,0 +1,505 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/controller" + "github.com/rancher/norman/objectclient" + "github.com/rancher/norman/resource" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + RKEK8sSystemImageGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "RKEK8sSystemImage", + } + RKEK8sSystemImageResource = metav1.APIResource{ + Name: "rkek8ssystemimages", + SingularName: "rkek8ssystemimage", + Namespaced: true, + + Kind: RKEK8sSystemImageGroupVersionKind.Kind, + } + + RKEK8sSystemImageGroupVersionResource = schema.GroupVersionResource{ + Group: GroupName, + Version: Version, + Resource: "rkek8ssystemimages", + } +) + +func init() { + resource.Put(RKEK8sSystemImageGroupVersionResource) +} + +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 { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []RKEK8sSystemImage `json:"items"` +} + +type RKEK8sSystemImageHandlerFunc func(key string, 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 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) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +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) + Delete(name string, options *metav1.DeleteOptions) error + DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error + List(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) +} + +type rkeK8sSystemImageLister struct { + controller *rkeK8sSystemImageController +} + +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)) + }) + return +} + +func (l *rkeK8sSystemImageLister) Get(namespace, name string) (*RKEK8sSystemImage, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: RKEK8sSystemImageGroupVersionKind.Group, + Resource: "rkeK8sSystemImage", + }, key) + } + return obj.(*RKEK8sSystemImage), nil +} + +type rkeK8sSystemImageController struct { + controller.GenericController +} + +func (c *rkeK8sSystemImageController) Generic() controller.GenericController { + return c.GenericController +} + +func (c *rkeK8sSystemImageController) Lister() RKEK8sSystemImageLister { + return &rkeK8sSystemImageLister{ + controller: c, + } +} + +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 { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +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 { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +func (c *rkeK8sSystemImageController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RKEK8sSystemImageHandlerFunc) { + resource.PutClusterScoped(RKEK8sSystemImageGroupVersionResource) + 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) { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +func (c *rkeK8sSystemImageController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RKEK8sSystemImageHandlerFunc) { + resource.PutClusterScoped(RKEK8sSystemImageGroupVersionResource) + 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) { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +type rkeK8sSystemImageFactory struct { +} + +func (c rkeK8sSystemImageFactory) Object() runtime.Object { + return &RKEK8sSystemImage{} +} + +func (c rkeK8sSystemImageFactory) List() runtime.Object { + return &RKEK8sSystemImageList{} +} + +func (s *rkeK8sSystemImageClient) Controller() RKEK8sSystemImageController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.rkeK8sSystemImageControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(RKEK8sSystemImageGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &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 +} + +func (s *rkeK8sSystemImageClient) ObjectClient() *objectclient.ObjectClient { + return s.objectClient +} + +func (s *rkeK8sSystemImageClient) Create(o *RKEK8sSystemImage) (*RKEK8sSystemImage, error) { + obj, err := s.objectClient.Create(o) + return obj.(*RKEK8sSystemImage), err +} + +func (s *rkeK8sSystemImageClient) Get(name string, opts metav1.GetOptions) (*RKEK8sSystemImage, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*RKEK8sSystemImage), err +} + +func (s *rkeK8sSystemImageClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEK8sSystemImage, error) { + obj, err := s.objectClient.GetNamespaced(namespace, name, opts) + return obj.(*RKEK8sSystemImage), err +} + +func (s *rkeK8sSystemImageClient) Update(o *RKEK8sSystemImage) (*RKEK8sSystemImage, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*RKEK8sSystemImage), err +} + +func (s *rkeK8sSystemImageClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *rkeK8sSystemImageClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { + return s.objectClient.DeleteNamespaced(namespace, name, options) +} + +func (s *rkeK8sSystemImageClient) List(opts metav1.ListOptions) (*RKEK8sSystemImageList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*RKEK8sSystemImageList), err +} + +func (s *rkeK8sSystemImageClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +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 +} + +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) { + s.Controller().AddHandler(ctx, name, sync) +} + +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) + 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) + s.Controller().AddFeatureHandler(ctx, enabled, name, sync) +} + +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) { + 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) + 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) + s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) +} + +type RKEK8sSystemImageIndexer func(obj *RKEK8sSystemImage) ([]string, error) + +type RKEK8sSystemImageClientCache interface { + Get(namespace, name string) (*RKEK8sSystemImage, error) + List(namespace string, selector labels.Selector) ([]*RKEK8sSystemImage, error) + + Index(name string, indexer RKEK8sSystemImageIndexer) + GetIndexed(name, key string) ([]*RKEK8sSystemImage, error) +} + +type RKEK8sSystemImageClient interface { + Create(*RKEK8sSystemImage) (*RKEK8sSystemImage, error) + Get(namespace, name string, opts metav1.GetOptions) (*RKEK8sSystemImage, error) + Update(*RKEK8sSystemImage) (*RKEK8sSystemImage, error) + Delete(namespace, name string, options *metav1.DeleteOptions) error + List(namespace string, opts metav1.ListOptions) (*RKEK8sSystemImageList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + + Cache() RKEK8sSystemImageClientCache + + OnCreate(ctx context.Context, name string, sync RKEK8sSystemImageChangeHandlerFunc) + OnChange(ctx context.Context, name string, sync RKEK8sSystemImageChangeHandlerFunc) + OnRemove(ctx context.Context, name string, sync RKEK8sSystemImageChangeHandlerFunc) + Enqueue(namespace, name string) + + Generic() controller.GenericController + ObjectClient() *objectclient.ObjectClient + Interface() RKEK8sSystemImageInterface +} + +type rkeK8sSystemImageClientCache struct { + client *rkeK8sSystemImageClient2 +} + +type rkeK8sSystemImageClient2 struct { + iface RKEK8sSystemImageInterface + controller RKEK8sSystemImageController +} + +func (n *rkeK8sSystemImageClient2) Interface() RKEK8sSystemImageInterface { + return n.iface +} + +func (n *rkeK8sSystemImageClient2) Generic() controller.GenericController { + return n.iface.Controller().Generic() +} + +func (n *rkeK8sSystemImageClient2) ObjectClient() *objectclient.ObjectClient { + return n.Interface().ObjectClient() +} + +func (n *rkeK8sSystemImageClient2) Enqueue(namespace, name string) { + n.iface.Controller().Enqueue(namespace, name) +} + +func (n *rkeK8sSystemImageClient2) Create(obj *RKEK8sSystemImage) (*RKEK8sSystemImage, error) { + return n.iface.Create(obj) +} + +func (n *rkeK8sSystemImageClient2) Get(namespace, name string, opts metav1.GetOptions) (*RKEK8sSystemImage, error) { + return n.iface.GetNamespaced(namespace, name, opts) +} + +func (n *rkeK8sSystemImageClient2) Update(obj *RKEK8sSystemImage) (*RKEK8sSystemImage, error) { + return n.iface.Update(obj) +} + +func (n *rkeK8sSystemImageClient2) Delete(namespace, name string, options *metav1.DeleteOptions) error { + return n.iface.DeleteNamespaced(namespace, name, options) +} + +func (n *rkeK8sSystemImageClient2) List(namespace string, opts metav1.ListOptions) (*RKEK8sSystemImageList, error) { + return n.iface.List(opts) +} + +func (n *rkeK8sSystemImageClient2) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return n.iface.Watch(opts) +} + +func (n *rkeK8sSystemImageClientCache) Get(namespace, name string) (*RKEK8sSystemImage, error) { + return n.client.controller.Lister().Get(namespace, name) +} + +func (n *rkeK8sSystemImageClientCache) List(namespace string, selector labels.Selector) ([]*RKEK8sSystemImage, error) { + return n.client.controller.Lister().List(namespace, selector) +} + +func (n *rkeK8sSystemImageClient2) Cache() RKEK8sSystemImageClientCache { + n.loadController() + return &rkeK8sSystemImageClientCache{ + client: n, + } +} + +func (n *rkeK8sSystemImageClient2) OnCreate(ctx context.Context, name string, sync RKEK8sSystemImageChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name+"-create", &rkeK8sSystemImageLifecycleDelegate{create: sync}) +} + +func (n *rkeK8sSystemImageClient2) OnChange(ctx context.Context, name string, sync RKEK8sSystemImageChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name+"-change", &rkeK8sSystemImageLifecycleDelegate{update: sync}) +} + +func (n *rkeK8sSystemImageClient2) OnRemove(ctx context.Context, name string, sync RKEK8sSystemImageChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name, &rkeK8sSystemImageLifecycleDelegate{remove: sync}) +} + +func (n *rkeK8sSystemImageClientCache) Index(name string, indexer RKEK8sSystemImageIndexer) { + err := n.client.controller.Informer().GetIndexer().AddIndexers(map[string]cache.IndexFunc{ + name: func(obj interface{}) ([]string, error) { + if v, ok := obj.(*RKEK8sSystemImage); ok { + return indexer(v) + } + return nil, nil + }, + }) + + if err != nil { + panic(err) + } +} + +func (n *rkeK8sSystemImageClientCache) GetIndexed(name, key string) ([]*RKEK8sSystemImage, error) { + var result []*RKEK8sSystemImage + objs, err := n.client.controller.Informer().GetIndexer().ByIndex(name, key) + if err != nil { + return nil, err + } + for _, obj := range objs { + if v, ok := obj.(*RKEK8sSystemImage); ok { + result = append(result, v) + } + } + + return result, nil +} + +func (n *rkeK8sSystemImageClient2) loadController() { + if n.controller == nil { + n.controller = n.iface.Controller() + } +} + +type rkeK8sSystemImageLifecycleDelegate struct { + create RKEK8sSystemImageChangeHandlerFunc + update RKEK8sSystemImageChangeHandlerFunc + remove RKEK8sSystemImageChangeHandlerFunc +} + +func (n *rkeK8sSystemImageLifecycleDelegate) HasCreate() bool { + return n.create != nil +} + +func (n *rkeK8sSystemImageLifecycleDelegate) Create(obj *RKEK8sSystemImage) (runtime.Object, error) { + if n.create == nil { + return obj, nil + } + return n.create(obj) +} + +func (n *rkeK8sSystemImageLifecycleDelegate) HasFinalize() bool { + return n.remove != nil +} + +func (n *rkeK8sSystemImageLifecycleDelegate) Remove(obj *RKEK8sSystemImage) (runtime.Object, error) { + if n.remove == nil { + return obj, nil + } + return n.remove(obj) +} + +func (n *rkeK8sSystemImageLifecycleDelegate) Updated(obj *RKEK8sSystemImage) (runtime.Object, error) { + if n.update == nil { + return obj, nil + } + return n.update(obj) +} 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 new file mode 100644 index 00000000..52763f10 --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_rke_k8s_system_image_lifecycle_adapter.go @@ -0,0 +1,62 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "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 rkeK8sSystemImageLifecycleAdapter struct { + lifecycle RKEK8sSystemImageLifecycle +} + +func (w *rkeK8sSystemImageLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *rkeK8sSystemImageLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + +func (w *rkeK8sSystemImageLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*RKEK8sSystemImage)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *rkeK8sSystemImageLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*RKEK8sSystemImage)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *rkeK8sSystemImageLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + 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 { + adapter := &rkeK8sSystemImageLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) + return func(key string, obj *RKEK8sSystemImage) (runtime.Object, error) { + newObj, err := syncFn(key, obj) + if o, ok := newObj.(runtime.Object); ok { + return o, err + } + return nil, err + } +} diff --git a/apis/management.cattle.io/v3/zz_generated_rke_k8s_windows_system_image_controller.go b/apis/management.cattle.io/v3/zz_generated_rke_k8s_windows_system_image_controller.go new file mode 100644 index 00000000..467f16f2 --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_rke_k8s_windows_system_image_controller.go @@ -0,0 +1,505 @@ +package v3 + +import ( + "context" + + "github.com/rancher/norman/controller" + "github.com/rancher/norman/objectclient" + "github.com/rancher/norman/resource" + "k8s.io/apimachinery/pkg/api/errors" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/apimachinery/pkg/labels" + "k8s.io/apimachinery/pkg/runtime" + "k8s.io/apimachinery/pkg/runtime/schema" + "k8s.io/apimachinery/pkg/types" + "k8s.io/apimachinery/pkg/watch" + "k8s.io/client-go/tools/cache" +) + +var ( + RKEK8sWindowsSystemImageGroupVersionKind = schema.GroupVersionKind{ + Version: Version, + Group: GroupName, + Kind: "RKEK8sWindowsSystemImage", + } + RKEK8sWindowsSystemImageResource = metav1.APIResource{ + Name: "rkek8swindowssystemimages", + SingularName: "rkek8swindowssystemimage", + Namespaced: true, + + Kind: RKEK8sWindowsSystemImageGroupVersionKind.Kind, + } + + RKEK8sWindowsSystemImageGroupVersionResource = schema.GroupVersionResource{ + Group: GroupName, + Version: Version, + Resource: "rkek8swindowssystemimages", + } +) + +func init() { + resource.Put(RKEK8sWindowsSystemImageGroupVersionResource) +} + +func NewRKEK8sWindowsSystemImage(namespace, name string, obj RKEK8sWindowsSystemImage) *RKEK8sWindowsSystemImage { + obj.APIVersion, obj.Kind = RKEK8sWindowsSystemImageGroupVersionKind.ToAPIVersionAndKind() + obj.Name = name + obj.Namespace = namespace + return &obj +} + +type RKEK8sWindowsSystemImageList struct { + metav1.TypeMeta `json:",inline"` + metav1.ListMeta `json:"metadata,omitempty"` + Items []RKEK8sWindowsSystemImage `json:"items"` +} + +type RKEK8sWindowsSystemImageHandlerFunc func(key string, obj *RKEK8sWindowsSystemImage) (runtime.Object, error) + +type RKEK8sWindowsSystemImageChangeHandlerFunc func(obj *RKEK8sWindowsSystemImage) (runtime.Object, error) + +type RKEK8sWindowsSystemImageLister interface { + List(namespace string, selector labels.Selector) (ret []*RKEK8sWindowsSystemImage, err error) + Get(namespace, name string) (*RKEK8sWindowsSystemImage, error) +} + +type RKEK8sWindowsSystemImageController interface { + Generic() controller.GenericController + Informer() cache.SharedIndexInformer + Lister() RKEK8sWindowsSystemImageLister + AddHandler(ctx context.Context, name string, handler RKEK8sWindowsSystemImageHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sWindowsSystemImageHandlerFunc) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler RKEK8sWindowsSystemImageHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler RKEK8sWindowsSystemImageHandlerFunc) + Enqueue(namespace, name string) + Sync(ctx context.Context) error + Start(ctx context.Context, threadiness int) error +} + +type RKEK8sWindowsSystemImageInterface interface { + ObjectClient() *objectclient.ObjectClient + Create(*RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) + GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEK8sWindowsSystemImage, error) + Get(name string, opts metav1.GetOptions) (*RKEK8sWindowsSystemImage, error) + Update(*RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) + Delete(name string, options *metav1.DeleteOptions) error + DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error + List(opts metav1.ListOptions) (*RKEK8sWindowsSystemImageList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error + Controller() RKEK8sWindowsSystemImageController + AddHandler(ctx context.Context, name string, sync RKEK8sWindowsSystemImageHandlerFunc) + AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sWindowsSystemImageHandlerFunc) + AddLifecycle(ctx context.Context, name string, lifecycle RKEK8sWindowsSystemImageLifecycle) + AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEK8sWindowsSystemImageLifecycle) + AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEK8sWindowsSystemImageHandlerFunc) + AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEK8sWindowsSystemImageHandlerFunc) + AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEK8sWindowsSystemImageLifecycle) + AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEK8sWindowsSystemImageLifecycle) +} + +type rkeK8sWindowsSystemImageLister struct { + controller *rkeK8sWindowsSystemImageController +} + +func (l *rkeK8sWindowsSystemImageLister) List(namespace string, selector labels.Selector) (ret []*RKEK8sWindowsSystemImage, err error) { + err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { + ret = append(ret, obj.(*RKEK8sWindowsSystemImage)) + }) + return +} + +func (l *rkeK8sWindowsSystemImageLister) Get(namespace, name string) (*RKEK8sWindowsSystemImage, error) { + var key string + if namespace != "" { + key = namespace + "/" + name + } else { + key = name + } + obj, exists, err := l.controller.Informer().GetIndexer().GetByKey(key) + if err != nil { + return nil, err + } + if !exists { + return nil, errors.NewNotFound(schema.GroupResource{ + Group: RKEK8sWindowsSystemImageGroupVersionKind.Group, + Resource: "rkeK8sWindowsSystemImage", + }, key) + } + return obj.(*RKEK8sWindowsSystemImage), nil +} + +type rkeK8sWindowsSystemImageController struct { + controller.GenericController +} + +func (c *rkeK8sWindowsSystemImageController) Generic() controller.GenericController { + return c.GenericController +} + +func (c *rkeK8sWindowsSystemImageController) Lister() RKEK8sWindowsSystemImageLister { + return &rkeK8sWindowsSystemImageLister{ + controller: c, + } +} + +func (c *rkeK8sWindowsSystemImageController) AddHandler(ctx context.Context, name string, handler RKEK8sWindowsSystemImageHandlerFunc) { + c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { + if obj == nil { + return handler(key, nil) + } else if v, ok := obj.(*RKEK8sWindowsSystemImage); ok { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +func (c *rkeK8sWindowsSystemImageController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler RKEK8sWindowsSystemImageHandlerFunc) { + 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.(*RKEK8sWindowsSystemImage); ok { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +func (c *rkeK8sWindowsSystemImageController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler RKEK8sWindowsSystemImageHandlerFunc) { + resource.PutClusterScoped(RKEK8sWindowsSystemImageGroupVersionResource) + c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { + if obj == nil { + return handler(key, nil) + } else if v, ok := obj.(*RKEK8sWindowsSystemImage); ok && controller.ObjectInCluster(cluster, obj) { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +func (c *rkeK8sWindowsSystemImageController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler RKEK8sWindowsSystemImageHandlerFunc) { + resource.PutClusterScoped(RKEK8sWindowsSystemImageGroupVersionResource) + 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.(*RKEK8sWindowsSystemImage); ok && controller.ObjectInCluster(cluster, obj) { + return handler(key, v) + } else { + return nil, nil + } + }) +} + +type rkeK8sWindowsSystemImageFactory struct { +} + +func (c rkeK8sWindowsSystemImageFactory) Object() runtime.Object { + return &RKEK8sWindowsSystemImage{} +} + +func (c rkeK8sWindowsSystemImageFactory) List() runtime.Object { + return &RKEK8sWindowsSystemImageList{} +} + +func (s *rkeK8sWindowsSystemImageClient) Controller() RKEK8sWindowsSystemImageController { + s.client.Lock() + defer s.client.Unlock() + + c, ok := s.client.rkeK8sWindowsSystemImageControllers[s.ns] + if ok { + return c + } + + genericController := controller.NewGenericController(RKEK8sWindowsSystemImageGroupVersionKind.Kind+"Controller", + s.objectClient) + + c = &rkeK8sWindowsSystemImageController{ + GenericController: genericController, + } + + s.client.rkeK8sWindowsSystemImageControllers[s.ns] = c + s.client.starters = append(s.client.starters, c) + + return c +} + +type rkeK8sWindowsSystemImageClient struct { + client *Client + ns string + objectClient *objectclient.ObjectClient + controller RKEK8sWindowsSystemImageController +} + +func (s *rkeK8sWindowsSystemImageClient) ObjectClient() *objectclient.ObjectClient { + return s.objectClient +} + +func (s *rkeK8sWindowsSystemImageClient) Create(o *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) { + obj, err := s.objectClient.Create(o) + return obj.(*RKEK8sWindowsSystemImage), err +} + +func (s *rkeK8sWindowsSystemImageClient) Get(name string, opts metav1.GetOptions) (*RKEK8sWindowsSystemImage, error) { + obj, err := s.objectClient.Get(name, opts) + return obj.(*RKEK8sWindowsSystemImage), err +} + +func (s *rkeK8sWindowsSystemImageClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*RKEK8sWindowsSystemImage, error) { + obj, err := s.objectClient.GetNamespaced(namespace, name, opts) + return obj.(*RKEK8sWindowsSystemImage), err +} + +func (s *rkeK8sWindowsSystemImageClient) Update(o *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) { + obj, err := s.objectClient.Update(o.Name, o) + return obj.(*RKEK8sWindowsSystemImage), err +} + +func (s *rkeK8sWindowsSystemImageClient) Delete(name string, options *metav1.DeleteOptions) error { + return s.objectClient.Delete(name, options) +} + +func (s *rkeK8sWindowsSystemImageClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { + return s.objectClient.DeleteNamespaced(namespace, name, options) +} + +func (s *rkeK8sWindowsSystemImageClient) List(opts metav1.ListOptions) (*RKEK8sWindowsSystemImageList, error) { + obj, err := s.objectClient.List(opts) + return obj.(*RKEK8sWindowsSystemImageList), err +} + +func (s *rkeK8sWindowsSystemImageClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return s.objectClient.Watch(opts) +} + +// Patch applies the patch and returns the patched deployment. +func (s *rkeK8sWindowsSystemImageClient) Patch(o *RKEK8sWindowsSystemImage, patchType types.PatchType, data []byte, subresources ...string) (*RKEK8sWindowsSystemImage, error) { + obj, err := s.objectClient.Patch(o.Name, o, patchType, data, subresources...) + return obj.(*RKEK8sWindowsSystemImage), err +} + +func (s *rkeK8sWindowsSystemImageClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { + return s.objectClient.DeleteCollection(deleteOpts, listOpts) +} + +func (s *rkeK8sWindowsSystemImageClient) AddHandler(ctx context.Context, name string, sync RKEK8sWindowsSystemImageHandlerFunc) { + s.Controller().AddHandler(ctx, name, sync) +} + +func (s *rkeK8sWindowsSystemImageClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync RKEK8sWindowsSystemImageHandlerFunc) { + s.Controller().AddFeatureHandler(ctx, enabled, name, sync) +} + +func (s *rkeK8sWindowsSystemImageClient) AddLifecycle(ctx context.Context, name string, lifecycle RKEK8sWindowsSystemImageLifecycle) { + sync := NewRKEK8sWindowsSystemImageLifecycleAdapter(name, false, s, lifecycle) + s.Controller().AddHandler(ctx, name, sync) +} + +func (s *rkeK8sWindowsSystemImageClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle RKEK8sWindowsSystemImageLifecycle) { + sync := NewRKEK8sWindowsSystemImageLifecycleAdapter(name, false, s, lifecycle) + s.Controller().AddFeatureHandler(ctx, enabled, name, sync) +} + +func (s *rkeK8sWindowsSystemImageClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync RKEK8sWindowsSystemImageHandlerFunc) { + s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) +} + +func (s *rkeK8sWindowsSystemImageClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync RKEK8sWindowsSystemImageHandlerFunc) { + s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) +} + +func (s *rkeK8sWindowsSystemImageClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle RKEK8sWindowsSystemImageLifecycle) { + sync := NewRKEK8sWindowsSystemImageLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) + s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) +} + +func (s *rkeK8sWindowsSystemImageClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle RKEK8sWindowsSystemImageLifecycle) { + sync := NewRKEK8sWindowsSystemImageLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) + s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) +} + +type RKEK8sWindowsSystemImageIndexer func(obj *RKEK8sWindowsSystemImage) ([]string, error) + +type RKEK8sWindowsSystemImageClientCache interface { + Get(namespace, name string) (*RKEK8sWindowsSystemImage, error) + List(namespace string, selector labels.Selector) ([]*RKEK8sWindowsSystemImage, error) + + Index(name string, indexer RKEK8sWindowsSystemImageIndexer) + GetIndexed(name, key string) ([]*RKEK8sWindowsSystemImage, error) +} + +type RKEK8sWindowsSystemImageClient interface { + Create(*RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) + Get(namespace, name string, opts metav1.GetOptions) (*RKEK8sWindowsSystemImage, error) + Update(*RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) + Delete(namespace, name string, options *metav1.DeleteOptions) error + List(namespace string, opts metav1.ListOptions) (*RKEK8sWindowsSystemImageList, error) + Watch(opts metav1.ListOptions) (watch.Interface, error) + + Cache() RKEK8sWindowsSystemImageClientCache + + OnCreate(ctx context.Context, name string, sync RKEK8sWindowsSystemImageChangeHandlerFunc) + OnChange(ctx context.Context, name string, sync RKEK8sWindowsSystemImageChangeHandlerFunc) + OnRemove(ctx context.Context, name string, sync RKEK8sWindowsSystemImageChangeHandlerFunc) + Enqueue(namespace, name string) + + Generic() controller.GenericController + ObjectClient() *objectclient.ObjectClient + Interface() RKEK8sWindowsSystemImageInterface +} + +type rkeK8sWindowsSystemImageClientCache struct { + client *rkeK8sWindowsSystemImageClient2 +} + +type rkeK8sWindowsSystemImageClient2 struct { + iface RKEK8sWindowsSystemImageInterface + controller RKEK8sWindowsSystemImageController +} + +func (n *rkeK8sWindowsSystemImageClient2) Interface() RKEK8sWindowsSystemImageInterface { + return n.iface +} + +func (n *rkeK8sWindowsSystemImageClient2) Generic() controller.GenericController { + return n.iface.Controller().Generic() +} + +func (n *rkeK8sWindowsSystemImageClient2) ObjectClient() *objectclient.ObjectClient { + return n.Interface().ObjectClient() +} + +func (n *rkeK8sWindowsSystemImageClient2) Enqueue(namespace, name string) { + n.iface.Controller().Enqueue(namespace, name) +} + +func (n *rkeK8sWindowsSystemImageClient2) Create(obj *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) { + return n.iface.Create(obj) +} + +func (n *rkeK8sWindowsSystemImageClient2) Get(namespace, name string, opts metav1.GetOptions) (*RKEK8sWindowsSystemImage, error) { + return n.iface.GetNamespaced(namespace, name, opts) +} + +func (n *rkeK8sWindowsSystemImageClient2) Update(obj *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) { + return n.iface.Update(obj) +} + +func (n *rkeK8sWindowsSystemImageClient2) Delete(namespace, name string, options *metav1.DeleteOptions) error { + return n.iface.DeleteNamespaced(namespace, name, options) +} + +func (n *rkeK8sWindowsSystemImageClient2) List(namespace string, opts metav1.ListOptions) (*RKEK8sWindowsSystemImageList, error) { + return n.iface.List(opts) +} + +func (n *rkeK8sWindowsSystemImageClient2) Watch(opts metav1.ListOptions) (watch.Interface, error) { + return n.iface.Watch(opts) +} + +func (n *rkeK8sWindowsSystemImageClientCache) Get(namespace, name string) (*RKEK8sWindowsSystemImage, error) { + return n.client.controller.Lister().Get(namespace, name) +} + +func (n *rkeK8sWindowsSystemImageClientCache) List(namespace string, selector labels.Selector) ([]*RKEK8sWindowsSystemImage, error) { + return n.client.controller.Lister().List(namespace, selector) +} + +func (n *rkeK8sWindowsSystemImageClient2) Cache() RKEK8sWindowsSystemImageClientCache { + n.loadController() + return &rkeK8sWindowsSystemImageClientCache{ + client: n, + } +} + +func (n *rkeK8sWindowsSystemImageClient2) OnCreate(ctx context.Context, name string, sync RKEK8sWindowsSystemImageChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name+"-create", &rkeK8sWindowsSystemImageLifecycleDelegate{create: sync}) +} + +func (n *rkeK8sWindowsSystemImageClient2) OnChange(ctx context.Context, name string, sync RKEK8sWindowsSystemImageChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name+"-change", &rkeK8sWindowsSystemImageLifecycleDelegate{update: sync}) +} + +func (n *rkeK8sWindowsSystemImageClient2) OnRemove(ctx context.Context, name string, sync RKEK8sWindowsSystemImageChangeHandlerFunc) { + n.loadController() + n.iface.AddLifecycle(ctx, name, &rkeK8sWindowsSystemImageLifecycleDelegate{remove: sync}) +} + +func (n *rkeK8sWindowsSystemImageClientCache) Index(name string, indexer RKEK8sWindowsSystemImageIndexer) { + err := n.client.controller.Informer().GetIndexer().AddIndexers(map[string]cache.IndexFunc{ + name: func(obj interface{}) ([]string, error) { + if v, ok := obj.(*RKEK8sWindowsSystemImage); ok { + return indexer(v) + } + return nil, nil + }, + }) + + if err != nil { + panic(err) + } +} + +func (n *rkeK8sWindowsSystemImageClientCache) GetIndexed(name, key string) ([]*RKEK8sWindowsSystemImage, error) { + var result []*RKEK8sWindowsSystemImage + objs, err := n.client.controller.Informer().GetIndexer().ByIndex(name, key) + if err != nil { + return nil, err + } + for _, obj := range objs { + if v, ok := obj.(*RKEK8sWindowsSystemImage); ok { + result = append(result, v) + } + } + + return result, nil +} + +func (n *rkeK8sWindowsSystemImageClient2) loadController() { + if n.controller == nil { + n.controller = n.iface.Controller() + } +} + +type rkeK8sWindowsSystemImageLifecycleDelegate struct { + create RKEK8sWindowsSystemImageChangeHandlerFunc + update RKEK8sWindowsSystemImageChangeHandlerFunc + remove RKEK8sWindowsSystemImageChangeHandlerFunc +} + +func (n *rkeK8sWindowsSystemImageLifecycleDelegate) HasCreate() bool { + return n.create != nil +} + +func (n *rkeK8sWindowsSystemImageLifecycleDelegate) Create(obj *RKEK8sWindowsSystemImage) (runtime.Object, error) { + if n.create == nil { + return obj, nil + } + return n.create(obj) +} + +func (n *rkeK8sWindowsSystemImageLifecycleDelegate) HasFinalize() bool { + return n.remove != nil +} + +func (n *rkeK8sWindowsSystemImageLifecycleDelegate) Remove(obj *RKEK8sWindowsSystemImage) (runtime.Object, error) { + if n.remove == nil { + return obj, nil + } + return n.remove(obj) +} + +func (n *rkeK8sWindowsSystemImageLifecycleDelegate) Updated(obj *RKEK8sWindowsSystemImage) (runtime.Object, error) { + if n.update == nil { + return obj, nil + } + return n.update(obj) +} diff --git a/apis/management.cattle.io/v3/zz_generated_rke_k8s_windows_system_image_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_rke_k8s_windows_system_image_lifecycle_adapter.go new file mode 100644 index 00000000..85853aa1 --- /dev/null +++ b/apis/management.cattle.io/v3/zz_generated_rke_k8s_windows_system_image_lifecycle_adapter.go @@ -0,0 +1,62 @@ +package v3 + +import ( + "github.com/rancher/norman/lifecycle" + "k8s.io/apimachinery/pkg/runtime" +) + +type RKEK8sWindowsSystemImageLifecycle interface { + Create(obj *RKEK8sWindowsSystemImage) (runtime.Object, error) + Remove(obj *RKEK8sWindowsSystemImage) (runtime.Object, error) + Updated(obj *RKEK8sWindowsSystemImage) (runtime.Object, error) +} + +type rkeK8sWindowsSystemImageLifecycleAdapter struct { + lifecycle RKEK8sWindowsSystemImageLifecycle +} + +func (w *rkeK8sWindowsSystemImageLifecycleAdapter) HasCreate() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasCreate() +} + +func (w *rkeK8sWindowsSystemImageLifecycleAdapter) HasFinalize() bool { + o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) + return !ok || o.HasFinalize() +} + +func (w *rkeK8sWindowsSystemImageLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Create(obj.(*RKEK8sWindowsSystemImage)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *rkeK8sWindowsSystemImageLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Remove(obj.(*RKEK8sWindowsSystemImage)) + if o == nil { + return nil, err + } + return o, err +} + +func (w *rkeK8sWindowsSystemImageLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { + o, err := w.lifecycle.Updated(obj.(*RKEK8sWindowsSystemImage)) + if o == nil { + return nil, err + } + return o, err +} + +func NewRKEK8sWindowsSystemImageLifecycleAdapter(name string, clusterScoped bool, client RKEK8sWindowsSystemImageInterface, l RKEK8sWindowsSystemImageLifecycle) RKEK8sWindowsSystemImageHandlerFunc { + adapter := &rkeK8sWindowsSystemImageLifecycleAdapter{lifecycle: l} + syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) + return func(key string, obj *RKEK8sWindowsSystemImage) (runtime.Object, error) { + newObj, err := syncFn(key, obj) + if o, ok := newObj.(runtime.Object); ok { + return o, err + } + return nil, err + } +} diff --git a/apis/management.cattle.io/v3/zz_generated_scheme.go b/apis/management.cattle.io/v3/zz_generated_scheme.go index fe5c9eff..235240cd 100644 --- a/apis/management.cattle.io/v3/zz_generated_scheme.go +++ b/apis/management.cattle.io/v3/zz_generated_scheme.go @@ -151,6 +151,14 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ClusterTemplateList{}, &ClusterTemplateRevision{}, &ClusterTemplateRevisionList{}, + &RKEK8sSystemImage{}, + &RKEK8sSystemImageList{}, + &RKEK8sServiceOption{}, + &RKEK8sServiceOptionList{}, + &RKEAddon{}, + &RKEAddonList{}, + &RKEK8sWindowsSystemImage{}, + &RKEK8sWindowsSystemImageList{}, ) metav1.AddToGroupVersion(scheme, SchemeGroupVersion) return nil diff --git a/client/management/v3/zz_generated_client.go b/client/management/v3/zz_generated_client.go index ef0a91e8..b2765bb6 100644 --- a/client/management/v3/zz_generated_client.go +++ b/client/management/v3/zz_generated_client.go @@ -66,6 +66,10 @@ type Client struct { ManagementSecret ManagementSecretOperations ClusterTemplate ClusterTemplateOperations ClusterTemplateRevision ClusterTemplateRevisionOperations + RKEK8sSystemImage RKEK8sSystemImageOperations + RKEK8sServiceOption RKEK8sServiceOptionOperations + RKEAddon RKEAddonOperations + RKEK8sWindowsSystemImage RKEK8sWindowsSystemImageOperations } func NewClient(opts *clientbase.ClientOpts) (*Client, error) { @@ -137,6 +141,10 @@ 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.RKEK8sWindowsSystemImage = newRKEK8sWindowsSystemImageClient(client) return client, nil } diff --git a/client/management/v3/zz_generated_kubernetes_services_options.go b/client/management/v3/zz_generated_kubernetes_services_options.go new file mode 100644 index 00000000..de082ec0 --- /dev/null +++ b/client/management/v3/zz_generated_kubernetes_services_options.go @@ -0,0 +1,18 @@ +package client + +const ( + KubernetesServicesOptionsType = "kubernetesServicesOptions" + KubernetesServicesOptionsFieldKubeAPI = "kubeapi" + KubernetesServicesOptionsFieldKubeController = "kubeController" + KubernetesServicesOptionsFieldKubelet = "kubelet" + KubernetesServicesOptionsFieldKubeproxy = "kubeproxy" + KubernetesServicesOptionsFieldScheduler = "scheduler" +) + +type KubernetesServicesOptions struct { + KubeAPI map[string]string `json:"kubeapi,omitempty" yaml:"kubeapi,omitempty"` + KubeController map[string]string `json:"kubeController,omitempty" yaml:"kubeController,omitempty"` + Kubelet map[string]string `json:"kubelet,omitempty" yaml:"kubelet,omitempty"` + Kubeproxy map[string]string `json:"kubeproxy,omitempty" yaml:"kubeproxy,omitempty"` + Scheduler map[string]string `json:"scheduler,omitempty" yaml:"scheduler,omitempty"` +} diff --git a/client/management/v3/zz_generated_rke_addon.go b/client/management/v3/zz_generated_rke_addon.go new file mode 100644 index 00000000..08282c8d --- /dev/null +++ b/client/management/v3/zz_generated_rke_addon.go @@ -0,0 +1,101 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + RKEAddonType = "rkeAddon" + RKEAddonFieldAnnotations = "annotations" + RKEAddonFieldCreated = "created" + RKEAddonFieldCreatorID = "creatorId" + RKEAddonFieldLabels = "labels" + RKEAddonFieldName = "name" + RKEAddonFieldOwnerReferences = "ownerReferences" + RKEAddonFieldRemoved = "removed" + RKEAddonFieldTemplate = "template" + RKEAddonFieldUUID = "uuid" +) + +type RKEAddon struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + Template string `json:"template,omitempty" yaml:"template,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type RKEAddonCollection struct { + types.Collection + Data []RKEAddon `json:"data,omitempty"` + client *RKEAddonClient +} + +type RKEAddonClient struct { + apiClient *Client +} + +type RKEAddonOperations interface { + List(opts *types.ListOpts) (*RKEAddonCollection, error) + Create(opts *RKEAddon) (*RKEAddon, error) + Update(existing *RKEAddon, updates interface{}) (*RKEAddon, error) + Replace(existing *RKEAddon) (*RKEAddon, error) + ByID(id string) (*RKEAddon, error) + Delete(container *RKEAddon) error +} + +func newRKEAddonClient(apiClient *Client) *RKEAddonClient { + return &RKEAddonClient{ + apiClient: apiClient, + } +} + +func (c *RKEAddonClient) Create(container *RKEAddon) (*RKEAddon, error) { + resp := &RKEAddon{} + err := c.apiClient.Ops.DoCreate(RKEAddonType, container, resp) + return resp, err +} + +func (c *RKEAddonClient) Update(existing *RKEAddon, updates interface{}) (*RKEAddon, error) { + resp := &RKEAddon{} + err := c.apiClient.Ops.DoUpdate(RKEAddonType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RKEAddonClient) Replace(obj *RKEAddon) (*RKEAddon, error) { + resp := &RKEAddon{} + err := c.apiClient.Ops.DoReplace(RKEAddonType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *RKEAddonClient) List(opts *types.ListOpts) (*RKEAddonCollection, error) { + resp := &RKEAddonCollection{} + err := c.apiClient.Ops.DoList(RKEAddonType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *RKEAddonCollection) Next() (*RKEAddonCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RKEAddonCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *RKEAddonClient) ByID(id string) (*RKEAddon, error) { + resp := &RKEAddon{} + err := c.apiClient.Ops.DoByID(RKEAddonType, id, resp) + return resp, err +} + +func (c *RKEAddonClient) Delete(container *RKEAddon) error { + return c.apiClient.Ops.DoResourceDelete(RKEAddonType, &container.Resource) +} diff --git a/client/management/v3/zz_generated_rke_k8s_service_option.go b/client/management/v3/zz_generated_rke_k8s_service_option.go new file mode 100644 index 00000000..7647b357 --- /dev/null +++ b/client/management/v3/zz_generated_rke_k8s_service_option.go @@ -0,0 +1,101 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + RKEK8sServiceOptionType = "rkeK8sServiceOption" + RKEK8sServiceOptionFieldAnnotations = "annotations" + RKEK8sServiceOptionFieldCreated = "created" + RKEK8sServiceOptionFieldCreatorID = "creatorId" + RKEK8sServiceOptionFieldLabels = "labels" + RKEK8sServiceOptionFieldName = "name" + RKEK8sServiceOptionFieldOwnerReferences = "ownerReferences" + RKEK8sServiceOptionFieldRemoved = "removed" + RKEK8sServiceOptionFieldServiceOptions = "serviceOptions" + RKEK8sServiceOptionFieldUUID = "uuid" +) + +type RKEK8sServiceOption struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + ServiceOptions *KubernetesServicesOptions `json:"serviceOptions,omitempty" yaml:"serviceOptions,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type RKEK8sServiceOptionCollection struct { + types.Collection + Data []RKEK8sServiceOption `json:"data,omitempty"` + client *RKEK8sServiceOptionClient +} + +type RKEK8sServiceOptionClient struct { + apiClient *Client +} + +type RKEK8sServiceOptionOperations interface { + List(opts *types.ListOpts) (*RKEK8sServiceOptionCollection, error) + Create(opts *RKEK8sServiceOption) (*RKEK8sServiceOption, error) + Update(existing *RKEK8sServiceOption, updates interface{}) (*RKEK8sServiceOption, error) + Replace(existing *RKEK8sServiceOption) (*RKEK8sServiceOption, error) + ByID(id string) (*RKEK8sServiceOption, error) + Delete(container *RKEK8sServiceOption) error +} + +func newRKEK8sServiceOptionClient(apiClient *Client) *RKEK8sServiceOptionClient { + return &RKEK8sServiceOptionClient{ + apiClient: apiClient, + } +} + +func (c *RKEK8sServiceOptionClient) Create(container *RKEK8sServiceOption) (*RKEK8sServiceOption, error) { + resp := &RKEK8sServiceOption{} + err := c.apiClient.Ops.DoCreate(RKEK8sServiceOptionType, container, resp) + return resp, err +} + +func (c *RKEK8sServiceOptionClient) Update(existing *RKEK8sServiceOption, updates interface{}) (*RKEK8sServiceOption, error) { + resp := &RKEK8sServiceOption{} + err := c.apiClient.Ops.DoUpdate(RKEK8sServiceOptionType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RKEK8sServiceOptionClient) Replace(obj *RKEK8sServiceOption) (*RKEK8sServiceOption, error) { + resp := &RKEK8sServiceOption{} + err := c.apiClient.Ops.DoReplace(RKEK8sServiceOptionType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *RKEK8sServiceOptionClient) List(opts *types.ListOpts) (*RKEK8sServiceOptionCollection, error) { + resp := &RKEK8sServiceOptionCollection{} + err := c.apiClient.Ops.DoList(RKEK8sServiceOptionType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *RKEK8sServiceOptionCollection) Next() (*RKEK8sServiceOptionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RKEK8sServiceOptionCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *RKEK8sServiceOptionClient) ByID(id string) (*RKEK8sServiceOption, error) { + resp := &RKEK8sServiceOption{} + err := c.apiClient.Ops.DoByID(RKEK8sServiceOptionType, id, resp) + return resp, err +} + +func (c *RKEK8sServiceOptionClient) Delete(container *RKEK8sServiceOption) error { + return c.apiClient.Ops.DoResourceDelete(RKEK8sServiceOptionType, &container.Resource) +} diff --git a/client/management/v3/zz_generated_rke_k8s_system_image.go b/client/management/v3/zz_generated_rke_k8s_system_image.go new file mode 100644 index 00000000..b88350dd --- /dev/null +++ b/client/management/v3/zz_generated_rke_k8s_system_image.go @@ -0,0 +1,101 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + RKEK8sSystemImageType = "rkeK8sSystemImage" + RKEK8sSystemImageFieldAnnotations = "annotations" + RKEK8sSystemImageFieldCreated = "created" + RKEK8sSystemImageFieldCreatorID = "creatorId" + RKEK8sSystemImageFieldLabels = "labels" + RKEK8sSystemImageFieldName = "name" + RKEK8sSystemImageFieldOwnerReferences = "ownerReferences" + RKEK8sSystemImageFieldRemoved = "removed" + RKEK8sSystemImageFieldSystemImages = "systemImages" + RKEK8sSystemImageFieldUUID = "uuid" +) + +type RKEK8sSystemImage struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + SystemImages *RKESystemImages `json:"systemImages,omitempty" yaml:"systemImages,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type RKEK8sSystemImageCollection struct { + types.Collection + Data []RKEK8sSystemImage `json:"data,omitempty"` + client *RKEK8sSystemImageClient +} + +type RKEK8sSystemImageClient struct { + apiClient *Client +} + +type RKEK8sSystemImageOperations interface { + List(opts *types.ListOpts) (*RKEK8sSystemImageCollection, error) + Create(opts *RKEK8sSystemImage) (*RKEK8sSystemImage, error) + Update(existing *RKEK8sSystemImage, updates interface{}) (*RKEK8sSystemImage, error) + Replace(existing *RKEK8sSystemImage) (*RKEK8sSystemImage, error) + ByID(id string) (*RKEK8sSystemImage, error) + Delete(container *RKEK8sSystemImage) error +} + +func newRKEK8sSystemImageClient(apiClient *Client) *RKEK8sSystemImageClient { + return &RKEK8sSystemImageClient{ + apiClient: apiClient, + } +} + +func (c *RKEK8sSystemImageClient) Create(container *RKEK8sSystemImage) (*RKEK8sSystemImage, error) { + resp := &RKEK8sSystemImage{} + err := c.apiClient.Ops.DoCreate(RKEK8sSystemImageType, container, resp) + return resp, err +} + +func (c *RKEK8sSystemImageClient) Update(existing *RKEK8sSystemImage, updates interface{}) (*RKEK8sSystemImage, error) { + resp := &RKEK8sSystemImage{} + err := c.apiClient.Ops.DoUpdate(RKEK8sSystemImageType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RKEK8sSystemImageClient) Replace(obj *RKEK8sSystemImage) (*RKEK8sSystemImage, error) { + resp := &RKEK8sSystemImage{} + err := c.apiClient.Ops.DoReplace(RKEK8sSystemImageType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *RKEK8sSystemImageClient) List(opts *types.ListOpts) (*RKEK8sSystemImageCollection, error) { + resp := &RKEK8sSystemImageCollection{} + err := c.apiClient.Ops.DoList(RKEK8sSystemImageType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *RKEK8sSystemImageCollection) Next() (*RKEK8sSystemImageCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RKEK8sSystemImageCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *RKEK8sSystemImageClient) ByID(id string) (*RKEK8sSystemImage, error) { + resp := &RKEK8sSystemImage{} + err := c.apiClient.Ops.DoByID(RKEK8sSystemImageType, id, resp) + return resp, err +} + +func (c *RKEK8sSystemImageClient) Delete(container *RKEK8sSystemImage) error { + return c.apiClient.Ops.DoResourceDelete(RKEK8sSystemImageType, &container.Resource) +} diff --git a/client/management/v3/zz_generated_rke_k8s_windows_system_image.go b/client/management/v3/zz_generated_rke_k8s_windows_system_image.go new file mode 100644 index 00000000..4a4a5b49 --- /dev/null +++ b/client/management/v3/zz_generated_rke_k8s_windows_system_image.go @@ -0,0 +1,101 @@ +package client + +import ( + "github.com/rancher/norman/types" +) + +const ( + RKEK8sWindowsSystemImageType = "rkeK8sWindowsSystemImage" + RKEK8sWindowsSystemImageFieldAnnotations = "annotations" + RKEK8sWindowsSystemImageFieldCreated = "created" + RKEK8sWindowsSystemImageFieldCreatorID = "creatorId" + RKEK8sWindowsSystemImageFieldLabels = "labels" + RKEK8sWindowsSystemImageFieldName = "name" + RKEK8sWindowsSystemImageFieldOwnerReferences = "ownerReferences" + RKEK8sWindowsSystemImageFieldRemoved = "removed" + RKEK8sWindowsSystemImageFieldSystemImages = "windowsSystemImages" + RKEK8sWindowsSystemImageFieldUUID = "uuid" +) + +type RKEK8sWindowsSystemImage struct { + types.Resource + Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` + CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` + Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` + Name string `json:"name,omitempty" yaml:"name,omitempty"` + OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + SystemImages *WindowsSystemImages `json:"windowsSystemImages,omitempty" yaml:"windowsSystemImages,omitempty"` + UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type RKEK8sWindowsSystemImageCollection struct { + types.Collection + Data []RKEK8sWindowsSystemImage `json:"data,omitempty"` + client *RKEK8sWindowsSystemImageClient +} + +type RKEK8sWindowsSystemImageClient struct { + apiClient *Client +} + +type RKEK8sWindowsSystemImageOperations interface { + List(opts *types.ListOpts) (*RKEK8sWindowsSystemImageCollection, error) + Create(opts *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) + Update(existing *RKEK8sWindowsSystemImage, updates interface{}) (*RKEK8sWindowsSystemImage, error) + Replace(existing *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) + ByID(id string) (*RKEK8sWindowsSystemImage, error) + Delete(container *RKEK8sWindowsSystemImage) error +} + +func newRKEK8sWindowsSystemImageClient(apiClient *Client) *RKEK8sWindowsSystemImageClient { + return &RKEK8sWindowsSystemImageClient{ + apiClient: apiClient, + } +} + +func (c *RKEK8sWindowsSystemImageClient) Create(container *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) { + resp := &RKEK8sWindowsSystemImage{} + err := c.apiClient.Ops.DoCreate(RKEK8sWindowsSystemImageType, container, resp) + return resp, err +} + +func (c *RKEK8sWindowsSystemImageClient) Update(existing *RKEK8sWindowsSystemImage, updates interface{}) (*RKEK8sWindowsSystemImage, error) { + resp := &RKEK8sWindowsSystemImage{} + err := c.apiClient.Ops.DoUpdate(RKEK8sWindowsSystemImageType, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RKEK8sWindowsSystemImageClient) Replace(obj *RKEK8sWindowsSystemImage) (*RKEK8sWindowsSystemImage, error) { + resp := &RKEK8sWindowsSystemImage{} + err := c.apiClient.Ops.DoReplace(RKEK8sWindowsSystemImageType, &obj.Resource, obj, resp) + return resp, err +} + +func (c *RKEK8sWindowsSystemImageClient) List(opts *types.ListOpts) (*RKEK8sWindowsSystemImageCollection, error) { + resp := &RKEK8sWindowsSystemImageCollection{} + err := c.apiClient.Ops.DoList(RKEK8sWindowsSystemImageType, opts, resp) + resp.client = c + return resp, err +} + +func (cc *RKEK8sWindowsSystemImageCollection) Next() (*RKEK8sWindowsSystemImageCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RKEK8sWindowsSystemImageCollection{} + err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *RKEK8sWindowsSystemImageClient) ByID(id string) (*RKEK8sWindowsSystemImage, error) { + resp := &RKEK8sWindowsSystemImage{} + err := c.apiClient.Ops.DoByID(RKEK8sWindowsSystemImageType, id, resp) + return resp, err +} + +func (c *RKEK8sWindowsSystemImageClient) Delete(container *RKEK8sWindowsSystemImage) error { + return c.apiClient.Ops.DoResourceDelete(RKEK8sWindowsSystemImageType, &container.Resource) +} diff --git a/client/management/v3/zz_generated_windows_system_images.go b/client/management/v3/zz_generated_windows_system_images.go new file mode 100644 index 00000000..7af6a264 --- /dev/null +++ b/client/management/v3/zz_generated_windows_system_images.go @@ -0,0 +1,20 @@ +package client + +const ( + WindowsSystemImagesType = "windowsSystemImages" + WindowsSystemImagesFieldCalicoCNIBinaries = "calicoCniBinaries" + WindowsSystemImagesFieldCanalCNIBinaries = "canalCniBinaries" + WindowsSystemImagesFieldFlannelCNIBinaries = "flannelCniBinaries" + WindowsSystemImagesFieldKubeletPause = "kubeletPause" + WindowsSystemImagesFieldKubernetesBinaries = "kubernetesBinaries" + WindowsSystemImagesFieldNginxProxy = "nginxProxy" +) + +type WindowsSystemImages struct { + CalicoCNIBinaries string `json:"calicoCniBinaries,omitempty" yaml:"calicoCniBinaries,omitempty"` + CanalCNIBinaries string `json:"canalCniBinaries,omitempty" yaml:"canalCniBinaries,omitempty"` + FlannelCNIBinaries string `json:"flannelCniBinaries,omitempty" yaml:"flannelCniBinaries,omitempty"` + KubeletPause string `json:"kubeletPause,omitempty" yaml:"kubeletPause,omitempty"` + KubernetesBinaries string `json:"kubernetesBinaries,omitempty" yaml:"kubernetesBinaries,omitempty"` + NginxProxy string `json:"nginxProxy,omitempty" yaml:"nginxProxy,omitempty"` +} diff --git a/compose/zz_generated_compose.go b/compose/zz_generated_compose.go index c7363a20..fe8273fe 100644 --- a/compose/zz_generated_compose.go +++ b/compose/zz_generated_compose.go @@ -64,6 +64,10 @@ 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"` + RKEK8sWindowsSystemImages map[string]managementClient.RKEK8sWindowsSystemImage `json:"rkeK8sWindowsSystemImages,omitempty" yaml:"rkeK8sWindowsSystemImages,omitempty"` // Cluster Client Namespaces map[string]clusterClient.Namespace `json:"namespaces,omitempty" yaml:"namespaces,omitempty"`