From cd3f5475fcecd21fba725c43ff559f3c9ab6fd9f Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Fri, 31 Jan 2020 09:35:13 -0700 Subject: [PATCH] Update generated code --- .../fakes/zz_generated_listen_config_mock.go | 1789 ----------------- .../v3/zz_generated_deepcopy.go | 100 +- .../v3/zz_generated_k8s_client.go | 20 - .../zz_generated_listen_config_controller.go | 508 ----- ...nerated_listen_config_lifecycle_adapter.go | 66 - .../v3/zz_generated_scheme.go | 2 - client/management/v3/zz_generated_client.go | 2 - .../v3/zz_generated_github_config.go | 4 + .../v3/zz_generated_listen_config.go | 139 -- compose/zz_generated_compose.go | 1 - 10 files changed, 18 insertions(+), 2613 deletions(-) delete mode 100644 apis/management.cattle.io/v3/fakes/zz_generated_listen_config_mock.go delete mode 100644 apis/management.cattle.io/v3/zz_generated_listen_config_controller.go delete mode 100644 apis/management.cattle.io/v3/zz_generated_listen_config_lifecycle_adapter.go delete mode 100644 client/management/v3/zz_generated_listen_config.go diff --git a/apis/management.cattle.io/v3/fakes/zz_generated_listen_config_mock.go b/apis/management.cattle.io/v3/fakes/zz_generated_listen_config_mock.go deleted file mode 100644 index 70c874d5..00000000 --- a/apis/management.cattle.io/v3/fakes/zz_generated_listen_config_mock.go +++ /dev/null @@ -1,1789 +0,0 @@ -// 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 ( - lockListenConfigListerMockGet sync.RWMutex - lockListenConfigListerMockList sync.RWMutex -) - -// Ensure, that ListenConfigListerMock does implement ListenConfigLister. -// If this is not the case, regenerate this file with moq. -var _ v3.ListenConfigLister = &ListenConfigListerMock{} - -// ListenConfigListerMock is a mock implementation of ListenConfigLister. -// -// func TestSomethingThatUsesListenConfigLister(t *testing.T) { -// -// // make and configure a mocked ListenConfigLister -// mockedListenConfigLister := &ListenConfigListerMock{ -// GetFunc: func(namespace string, name string) (*v3.ListenConfig, error) { -// panic("mock out the Get method") -// }, -// ListFunc: func(namespace string, selector labels.Selector) ([]*v3.ListenConfig, error) { -// panic("mock out the List method") -// }, -// } -// -// // use mockedListenConfigLister in code that requires ListenConfigLister -// // and then make assertions. -// -// } -type ListenConfigListerMock struct { - // GetFunc mocks the Get method. - GetFunc func(namespace string, name string) (*v3.ListenConfig, error) - - // ListFunc mocks the List method. - ListFunc func(namespace string, selector labels.Selector) ([]*v3.ListenConfig, 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 *ListenConfigListerMock) Get(namespace string, name string) (*v3.ListenConfig, error) { - if mock.GetFunc == nil { - panic("ListenConfigListerMock.GetFunc: method is nil but ListenConfigLister.Get was just called") - } - callInfo := struct { - Namespace string - Name string - }{ - Namespace: namespace, - Name: name, - } - lockListenConfigListerMockGet.Lock() - mock.calls.Get = append(mock.calls.Get, callInfo) - lockListenConfigListerMockGet.Unlock() - return mock.GetFunc(namespace, name) -} - -// GetCalls gets all the calls that were made to Get. -// Check the length with: -// len(mockedListenConfigLister.GetCalls()) -func (mock *ListenConfigListerMock) GetCalls() []struct { - Namespace string - Name string -} { - var calls []struct { - Namespace string - Name string - } - lockListenConfigListerMockGet.RLock() - calls = mock.calls.Get - lockListenConfigListerMockGet.RUnlock() - return calls -} - -// List calls ListFunc. -func (mock *ListenConfigListerMock) List(namespace string, selector labels.Selector) ([]*v3.ListenConfig, error) { - if mock.ListFunc == nil { - panic("ListenConfigListerMock.ListFunc: method is nil but ListenConfigLister.List was just called") - } - callInfo := struct { - Namespace string - Selector labels.Selector - }{ - Namespace: namespace, - Selector: selector, - } - lockListenConfigListerMockList.Lock() - mock.calls.List = append(mock.calls.List, callInfo) - lockListenConfigListerMockList.Unlock() - return mock.ListFunc(namespace, selector) -} - -// ListCalls gets all the calls that were made to List. -// Check the length with: -// len(mockedListenConfigLister.ListCalls()) -func (mock *ListenConfigListerMock) ListCalls() []struct { - Namespace string - Selector labels.Selector -} { - var calls []struct { - Namespace string - Selector labels.Selector - } - lockListenConfigListerMockList.RLock() - calls = mock.calls.List - lockListenConfigListerMockList.RUnlock() - return calls -} - -var ( - lockListenConfigControllerMockAddClusterScopedFeatureHandler sync.RWMutex - lockListenConfigControllerMockAddClusterScopedHandler sync.RWMutex - lockListenConfigControllerMockAddFeatureHandler sync.RWMutex - lockListenConfigControllerMockAddHandler sync.RWMutex - lockListenConfigControllerMockEnqueue sync.RWMutex - lockListenConfigControllerMockGeneric sync.RWMutex - lockListenConfigControllerMockInformer sync.RWMutex - lockListenConfigControllerMockLister sync.RWMutex - lockListenConfigControllerMockStart sync.RWMutex - lockListenConfigControllerMockSync sync.RWMutex -) - -// Ensure, that ListenConfigControllerMock does implement ListenConfigController. -// If this is not the case, regenerate this file with moq. -var _ v3.ListenConfigController = &ListenConfigControllerMock{} - -// ListenConfigControllerMock is a mock implementation of ListenConfigController. -// -// func TestSomethingThatUsesListenConfigController(t *testing.T) { -// -// // make and configure a mocked ListenConfigController -// mockedListenConfigController := &ListenConfigControllerMock{ -// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.ListenConfigHandlerFunc) { -// panic("mock out the AddClusterScopedFeatureHandler method") -// }, -// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ListenConfigHandlerFunc) { -// panic("mock out the AddClusterScopedHandler method") -// }, -// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.ListenConfigHandlerFunc) { -// panic("mock out the AddFeatureHandler method") -// }, -// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ListenConfigHandlerFunc) { -// 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.ListenConfigLister { -// 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 mockedListenConfigController in code that requires ListenConfigController -// // and then make assertions. -// -// } -type ListenConfigControllerMock struct { - // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. - AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.ListenConfigHandlerFunc) - - // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. - AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ListenConfigHandlerFunc) - - // AddFeatureHandlerFunc mocks the AddFeatureHandler method. - AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.ListenConfigHandlerFunc) - - // AddHandlerFunc mocks the AddHandler method. - AddHandlerFunc func(ctx context.Context, name string, handler v3.ListenConfigHandlerFunc) - - // 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.ListenConfigLister - - // 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.ListenConfigHandlerFunc - } - // 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.ListenConfigHandlerFunc - } - // 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.ListenConfigHandlerFunc - } - // 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.ListenConfigHandlerFunc - } - // 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 *ListenConfigControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.ListenConfigHandlerFunc) { - if mock.AddClusterScopedFeatureHandlerFunc == nil { - panic("ListenConfigControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but ListenConfigController.AddClusterScopedFeatureHandler was just called") - } - callInfo := struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Handler v3.ListenConfigHandlerFunc - }{ - Ctx: ctx, - Enabled: enabled, - Name: name, - ClusterName: clusterName, - Handler: handler, - } - lockListenConfigControllerMockAddClusterScopedFeatureHandler.Lock() - mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) - lockListenConfigControllerMockAddClusterScopedFeatureHandler.Unlock() - mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, handler) -} - -// AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. -// Check the length with: -// len(mockedListenConfigController.AddClusterScopedFeatureHandlerCalls()) -func (mock *ListenConfigControllerMock) AddClusterScopedFeatureHandlerCalls() []struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Handler v3.ListenConfigHandlerFunc -} { - var calls []struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Handler v3.ListenConfigHandlerFunc - } - lockListenConfigControllerMockAddClusterScopedFeatureHandler.RLock() - calls = mock.calls.AddClusterScopedFeatureHandler - lockListenConfigControllerMockAddClusterScopedFeatureHandler.RUnlock() - return calls -} - -// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. -func (mock *ListenConfigControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ListenConfigHandlerFunc) { - if mock.AddClusterScopedHandlerFunc == nil { - panic("ListenConfigControllerMock.AddClusterScopedHandlerFunc: method is nil but ListenConfigController.AddClusterScopedHandler was just called") - } - callInfo := struct { - Ctx context.Context - Name string - ClusterName string - Handler v3.ListenConfigHandlerFunc - }{ - Ctx: ctx, - Name: name, - ClusterName: clusterName, - Handler: handler, - } - lockListenConfigControllerMockAddClusterScopedHandler.Lock() - mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) - lockListenConfigControllerMockAddClusterScopedHandler.Unlock() - mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, handler) -} - -// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. -// Check the length with: -// len(mockedListenConfigController.AddClusterScopedHandlerCalls()) -func (mock *ListenConfigControllerMock) AddClusterScopedHandlerCalls() []struct { - Ctx context.Context - Name string - ClusterName string - Handler v3.ListenConfigHandlerFunc -} { - var calls []struct { - Ctx context.Context - Name string - ClusterName string - Handler v3.ListenConfigHandlerFunc - } - lockListenConfigControllerMockAddClusterScopedHandler.RLock() - calls = mock.calls.AddClusterScopedHandler - lockListenConfigControllerMockAddClusterScopedHandler.RUnlock() - return calls -} - -// AddFeatureHandler calls AddFeatureHandlerFunc. -func (mock *ListenConfigControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.ListenConfigHandlerFunc) { - if mock.AddFeatureHandlerFunc == nil { - panic("ListenConfigControllerMock.AddFeatureHandlerFunc: method is nil but ListenConfigController.AddFeatureHandler was just called") - } - callInfo := struct { - Ctx context.Context - Enabled func() bool - Name string - Sync v3.ListenConfigHandlerFunc - }{ - Ctx: ctx, - Enabled: enabled, - Name: name, - Sync: sync, - } - lockListenConfigControllerMockAddFeatureHandler.Lock() - mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) - lockListenConfigControllerMockAddFeatureHandler.Unlock() - mock.AddFeatureHandlerFunc(ctx, enabled, name, sync) -} - -// AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. -// Check the length with: -// len(mockedListenConfigController.AddFeatureHandlerCalls()) -func (mock *ListenConfigControllerMock) AddFeatureHandlerCalls() []struct { - Ctx context.Context - Enabled func() bool - Name string - Sync v3.ListenConfigHandlerFunc -} { - var calls []struct { - Ctx context.Context - Enabled func() bool - Name string - Sync v3.ListenConfigHandlerFunc - } - lockListenConfigControllerMockAddFeatureHandler.RLock() - calls = mock.calls.AddFeatureHandler - lockListenConfigControllerMockAddFeatureHandler.RUnlock() - return calls -} - -// AddHandler calls AddHandlerFunc. -func (mock *ListenConfigControllerMock) AddHandler(ctx context.Context, name string, handler v3.ListenConfigHandlerFunc) { - if mock.AddHandlerFunc == nil { - panic("ListenConfigControllerMock.AddHandlerFunc: method is nil but ListenConfigController.AddHandler was just called") - } - callInfo := struct { - Ctx context.Context - Name string - Handler v3.ListenConfigHandlerFunc - }{ - Ctx: ctx, - Name: name, - Handler: handler, - } - lockListenConfigControllerMockAddHandler.Lock() - mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) - lockListenConfigControllerMockAddHandler.Unlock() - mock.AddHandlerFunc(ctx, name, handler) -} - -// AddHandlerCalls gets all the calls that were made to AddHandler. -// Check the length with: -// len(mockedListenConfigController.AddHandlerCalls()) -func (mock *ListenConfigControllerMock) AddHandlerCalls() []struct { - Ctx context.Context - Name string - Handler v3.ListenConfigHandlerFunc -} { - var calls []struct { - Ctx context.Context - Name string - Handler v3.ListenConfigHandlerFunc - } - lockListenConfigControllerMockAddHandler.RLock() - calls = mock.calls.AddHandler - lockListenConfigControllerMockAddHandler.RUnlock() - return calls -} - -// Enqueue calls EnqueueFunc. -func (mock *ListenConfigControllerMock) Enqueue(namespace string, name string) { - if mock.EnqueueFunc == nil { - panic("ListenConfigControllerMock.EnqueueFunc: method is nil but ListenConfigController.Enqueue was just called") - } - callInfo := struct { - Namespace string - Name string - }{ - Namespace: namespace, - Name: name, - } - lockListenConfigControllerMockEnqueue.Lock() - mock.calls.Enqueue = append(mock.calls.Enqueue, callInfo) - lockListenConfigControllerMockEnqueue.Unlock() - mock.EnqueueFunc(namespace, name) -} - -// EnqueueCalls gets all the calls that were made to Enqueue. -// Check the length with: -// len(mockedListenConfigController.EnqueueCalls()) -func (mock *ListenConfigControllerMock) EnqueueCalls() []struct { - Namespace string - Name string -} { - var calls []struct { - Namespace string - Name string - } - lockListenConfigControllerMockEnqueue.RLock() - calls = mock.calls.Enqueue - lockListenConfigControllerMockEnqueue.RUnlock() - return calls -} - -// Generic calls GenericFunc. -func (mock *ListenConfigControllerMock) Generic() controller.GenericController { - if mock.GenericFunc == nil { - panic("ListenConfigControllerMock.GenericFunc: method is nil but ListenConfigController.Generic was just called") - } - callInfo := struct { - }{} - lockListenConfigControllerMockGeneric.Lock() - mock.calls.Generic = append(mock.calls.Generic, callInfo) - lockListenConfigControllerMockGeneric.Unlock() - return mock.GenericFunc() -} - -// GenericCalls gets all the calls that were made to Generic. -// Check the length with: -// len(mockedListenConfigController.GenericCalls()) -func (mock *ListenConfigControllerMock) GenericCalls() []struct { -} { - var calls []struct { - } - lockListenConfigControllerMockGeneric.RLock() - calls = mock.calls.Generic - lockListenConfigControllerMockGeneric.RUnlock() - return calls -} - -// Informer calls InformerFunc. -func (mock *ListenConfigControllerMock) Informer() cache.SharedIndexInformer { - if mock.InformerFunc == nil { - panic("ListenConfigControllerMock.InformerFunc: method is nil but ListenConfigController.Informer was just called") - } - callInfo := struct { - }{} - lockListenConfigControllerMockInformer.Lock() - mock.calls.Informer = append(mock.calls.Informer, callInfo) - lockListenConfigControllerMockInformer.Unlock() - return mock.InformerFunc() -} - -// InformerCalls gets all the calls that were made to Informer. -// Check the length with: -// len(mockedListenConfigController.InformerCalls()) -func (mock *ListenConfigControllerMock) InformerCalls() []struct { -} { - var calls []struct { - } - lockListenConfigControllerMockInformer.RLock() - calls = mock.calls.Informer - lockListenConfigControllerMockInformer.RUnlock() - return calls -} - -// Lister calls ListerFunc. -func (mock *ListenConfigControllerMock) Lister() v3.ListenConfigLister { - if mock.ListerFunc == nil { - panic("ListenConfigControllerMock.ListerFunc: method is nil but ListenConfigController.Lister was just called") - } - callInfo := struct { - }{} - lockListenConfigControllerMockLister.Lock() - mock.calls.Lister = append(mock.calls.Lister, callInfo) - lockListenConfigControllerMockLister.Unlock() - return mock.ListerFunc() -} - -// ListerCalls gets all the calls that were made to Lister. -// Check the length with: -// len(mockedListenConfigController.ListerCalls()) -func (mock *ListenConfigControllerMock) ListerCalls() []struct { -} { - var calls []struct { - } - lockListenConfigControllerMockLister.RLock() - calls = mock.calls.Lister - lockListenConfigControllerMockLister.RUnlock() - return calls -} - -// Start calls StartFunc. -func (mock *ListenConfigControllerMock) Start(ctx context.Context, threadiness int) error { - if mock.StartFunc == nil { - panic("ListenConfigControllerMock.StartFunc: method is nil but ListenConfigController.Start was just called") - } - callInfo := struct { - Ctx context.Context - Threadiness int - }{ - Ctx: ctx, - Threadiness: threadiness, - } - lockListenConfigControllerMockStart.Lock() - mock.calls.Start = append(mock.calls.Start, callInfo) - lockListenConfigControllerMockStart.Unlock() - return mock.StartFunc(ctx, threadiness) -} - -// StartCalls gets all the calls that were made to Start. -// Check the length with: -// len(mockedListenConfigController.StartCalls()) -func (mock *ListenConfigControllerMock) StartCalls() []struct { - Ctx context.Context - Threadiness int -} { - var calls []struct { - Ctx context.Context - Threadiness int - } - lockListenConfigControllerMockStart.RLock() - calls = mock.calls.Start - lockListenConfigControllerMockStart.RUnlock() - return calls -} - -// Sync calls SyncFunc. -func (mock *ListenConfigControllerMock) Sync(ctx context.Context) error { - if mock.SyncFunc == nil { - panic("ListenConfigControllerMock.SyncFunc: method is nil but ListenConfigController.Sync was just called") - } - callInfo := struct { - Ctx context.Context - }{ - Ctx: ctx, - } - lockListenConfigControllerMockSync.Lock() - mock.calls.Sync = append(mock.calls.Sync, callInfo) - lockListenConfigControllerMockSync.Unlock() - return mock.SyncFunc(ctx) -} - -// SyncCalls gets all the calls that were made to Sync. -// Check the length with: -// len(mockedListenConfigController.SyncCalls()) -func (mock *ListenConfigControllerMock) SyncCalls() []struct { - Ctx context.Context -} { - var calls []struct { - Ctx context.Context - } - lockListenConfigControllerMockSync.RLock() - calls = mock.calls.Sync - lockListenConfigControllerMockSync.RUnlock() - return calls -} - -var ( - lockListenConfigInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex - lockListenConfigInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex - lockListenConfigInterfaceMockAddClusterScopedHandler sync.RWMutex - lockListenConfigInterfaceMockAddClusterScopedLifecycle sync.RWMutex - lockListenConfigInterfaceMockAddFeatureHandler sync.RWMutex - lockListenConfigInterfaceMockAddFeatureLifecycle sync.RWMutex - lockListenConfigInterfaceMockAddHandler sync.RWMutex - lockListenConfigInterfaceMockAddLifecycle sync.RWMutex - lockListenConfigInterfaceMockController sync.RWMutex - lockListenConfigInterfaceMockCreate sync.RWMutex - lockListenConfigInterfaceMockDelete sync.RWMutex - lockListenConfigInterfaceMockDeleteCollection sync.RWMutex - lockListenConfigInterfaceMockDeleteNamespaced sync.RWMutex - lockListenConfigInterfaceMockGet sync.RWMutex - lockListenConfigInterfaceMockGetNamespaced sync.RWMutex - lockListenConfigInterfaceMockList sync.RWMutex - lockListenConfigInterfaceMockListNamespaced sync.RWMutex - lockListenConfigInterfaceMockObjectClient sync.RWMutex - lockListenConfigInterfaceMockUpdate sync.RWMutex - lockListenConfigInterfaceMockWatch sync.RWMutex -) - -// Ensure, that ListenConfigInterfaceMock does implement ListenConfigInterface. -// If this is not the case, regenerate this file with moq. -var _ v3.ListenConfigInterface = &ListenConfigInterfaceMock{} - -// ListenConfigInterfaceMock is a mock implementation of ListenConfigInterface. -// -// func TestSomethingThatUsesListenConfigInterface(t *testing.T) { -// -// // make and configure a mocked ListenConfigInterface -// mockedListenConfigInterface := &ListenConfigInterfaceMock{ -// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.ListenConfigHandlerFunc) { -// panic("mock out the AddClusterScopedFeatureHandler method") -// }, -// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.ListenConfigLifecycle) { -// panic("mock out the AddClusterScopedFeatureLifecycle method") -// }, -// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ListenConfigHandlerFunc) { -// panic("mock out the AddClusterScopedHandler method") -// }, -// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ListenConfigLifecycle) { -// panic("mock out the AddClusterScopedLifecycle method") -// }, -// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.ListenConfigHandlerFunc) { -// panic("mock out the AddFeatureHandler method") -// }, -// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3.ListenConfigLifecycle) { -// panic("mock out the AddFeatureLifecycle method") -// }, -// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ListenConfigHandlerFunc) { -// panic("mock out the AddHandler method") -// }, -// AddLifecycleFunc: func(ctx context.Context, name string, lifecycle v3.ListenConfigLifecycle) { -// panic("mock out the AddLifecycle method") -// }, -// ControllerFunc: func() v3.ListenConfigController { -// panic("mock out the Controller method") -// }, -// CreateFunc: func(in1 *v3.ListenConfig) (*v3.ListenConfig, 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.ListenConfig, error) { -// panic("mock out the Get method") -// }, -// GetNamespacedFunc: func(namespace string, name string, opts v1.GetOptions) (*v3.ListenConfig, error) { -// panic("mock out the GetNamespaced method") -// }, -// ListFunc: func(opts v1.ListOptions) (*v3.ListenConfigList, error) { -// panic("mock out the List method") -// }, -// ListNamespacedFunc: func(namespace string, opts v1.ListOptions) (*v3.ListenConfigList, error) { -// panic("mock out the ListNamespaced method") -// }, -// ObjectClientFunc: func() *objectclient.ObjectClient { -// panic("mock out the ObjectClient method") -// }, -// UpdateFunc: func(in1 *v3.ListenConfig) (*v3.ListenConfig, error) { -// panic("mock out the Update method") -// }, -// WatchFunc: func(opts v1.ListOptions) (watch.Interface, error) { -// panic("mock out the Watch method") -// }, -// } -// -// // use mockedListenConfigInterface in code that requires ListenConfigInterface -// // and then make assertions. -// -// } -type ListenConfigInterfaceMock struct { - // AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method. - AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.ListenConfigHandlerFunc) - - // AddClusterScopedFeatureLifecycleFunc mocks the AddClusterScopedFeatureLifecycle method. - AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.ListenConfigLifecycle) - - // AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method. - AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ListenConfigHandlerFunc) - - // AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method. - AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ListenConfigLifecycle) - - // AddFeatureHandlerFunc mocks the AddFeatureHandler method. - AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.ListenConfigHandlerFunc) - - // AddFeatureLifecycleFunc mocks the AddFeatureLifecycle method. - AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3.ListenConfigLifecycle) - - // AddHandlerFunc mocks the AddHandler method. - AddHandlerFunc func(ctx context.Context, name string, sync v3.ListenConfigHandlerFunc) - - // AddLifecycleFunc mocks the AddLifecycle method. - AddLifecycleFunc func(ctx context.Context, name string, lifecycle v3.ListenConfigLifecycle) - - // ControllerFunc mocks the Controller method. - ControllerFunc func() v3.ListenConfigController - - // CreateFunc mocks the Create method. - CreateFunc func(in1 *v3.ListenConfig) (*v3.ListenConfig, 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.ListenConfig, error) - - // GetNamespacedFunc mocks the GetNamespaced method. - GetNamespacedFunc func(namespace string, name string, opts v1.GetOptions) (*v3.ListenConfig, error) - - // ListFunc mocks the List method. - ListFunc func(opts v1.ListOptions) (*v3.ListenConfigList, error) - - // ListNamespacedFunc mocks the ListNamespaced method. - ListNamespacedFunc func(namespace string, opts v1.ListOptions) (*v3.ListenConfigList, error) - - // ObjectClientFunc mocks the ObjectClient method. - ObjectClientFunc func() *objectclient.ObjectClient - - // UpdateFunc mocks the Update method. - UpdateFunc func(in1 *v3.ListenConfig) (*v3.ListenConfig, 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.ListenConfigHandlerFunc - } - // 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.ListenConfigLifecycle - } - // 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.ListenConfigHandlerFunc - } - // 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.ListenConfigLifecycle - } - // 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.ListenConfigHandlerFunc - } - // 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.ListenConfigLifecycle - } - // 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.ListenConfigHandlerFunc - } - // 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.ListenConfigLifecycle - } - // 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.ListenConfig - } - // 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 - } - // ListNamespaced holds details about calls to the ListNamespaced method. - ListNamespaced []struct { - // Namespace is the namespace argument value. - Namespace string - // 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.ListenConfig - } - // 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 *ListenConfigInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.ListenConfigHandlerFunc) { - if mock.AddClusterScopedFeatureHandlerFunc == nil { - panic("ListenConfigInterfaceMock.AddClusterScopedFeatureHandlerFunc: method is nil but ListenConfigInterface.AddClusterScopedFeatureHandler was just called") - } - callInfo := struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Sync v3.ListenConfigHandlerFunc - }{ - Ctx: ctx, - Enabled: enabled, - Name: name, - ClusterName: clusterName, - Sync: sync, - } - lockListenConfigInterfaceMockAddClusterScopedFeatureHandler.Lock() - mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo) - lockListenConfigInterfaceMockAddClusterScopedFeatureHandler.Unlock() - mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, sync) -} - -// AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler. -// Check the length with: -// len(mockedListenConfigInterface.AddClusterScopedFeatureHandlerCalls()) -func (mock *ListenConfigInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Sync v3.ListenConfigHandlerFunc -} { - var calls []struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Sync v3.ListenConfigHandlerFunc - } - lockListenConfigInterfaceMockAddClusterScopedFeatureHandler.RLock() - calls = mock.calls.AddClusterScopedFeatureHandler - lockListenConfigInterfaceMockAddClusterScopedFeatureHandler.RUnlock() - return calls -} - -// AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc. -func (mock *ListenConfigInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.ListenConfigLifecycle) { - if mock.AddClusterScopedFeatureLifecycleFunc == nil { - panic("ListenConfigInterfaceMock.AddClusterScopedFeatureLifecycleFunc: method is nil but ListenConfigInterface.AddClusterScopedFeatureLifecycle was just called") - } - callInfo := struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Lifecycle v3.ListenConfigLifecycle - }{ - Ctx: ctx, - Enabled: enabled, - Name: name, - ClusterName: clusterName, - Lifecycle: lifecycle, - } - lockListenConfigInterfaceMockAddClusterScopedFeatureLifecycle.Lock() - mock.calls.AddClusterScopedFeatureLifecycle = append(mock.calls.AddClusterScopedFeatureLifecycle, callInfo) - lockListenConfigInterfaceMockAddClusterScopedFeatureLifecycle.Unlock() - mock.AddClusterScopedFeatureLifecycleFunc(ctx, enabled, name, clusterName, lifecycle) -} - -// AddClusterScopedFeatureLifecycleCalls gets all the calls that were made to AddClusterScopedFeatureLifecycle. -// Check the length with: -// len(mockedListenConfigInterface.AddClusterScopedFeatureLifecycleCalls()) -func (mock *ListenConfigInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Lifecycle v3.ListenConfigLifecycle -} { - var calls []struct { - Ctx context.Context - Enabled func() bool - Name string - ClusterName string - Lifecycle v3.ListenConfigLifecycle - } - lockListenConfigInterfaceMockAddClusterScopedFeatureLifecycle.RLock() - calls = mock.calls.AddClusterScopedFeatureLifecycle - lockListenConfigInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock() - return calls -} - -// AddClusterScopedHandler calls AddClusterScopedHandlerFunc. -func (mock *ListenConfigInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ListenConfigHandlerFunc) { - if mock.AddClusterScopedHandlerFunc == nil { - panic("ListenConfigInterfaceMock.AddClusterScopedHandlerFunc: method is nil but ListenConfigInterface.AddClusterScopedHandler was just called") - } - callInfo := struct { - Ctx context.Context - Name string - ClusterName string - Sync v3.ListenConfigHandlerFunc - }{ - Ctx: ctx, - Name: name, - ClusterName: clusterName, - Sync: sync, - } - lockListenConfigInterfaceMockAddClusterScopedHandler.Lock() - mock.calls.AddClusterScopedHandler = append(mock.calls.AddClusterScopedHandler, callInfo) - lockListenConfigInterfaceMockAddClusterScopedHandler.Unlock() - mock.AddClusterScopedHandlerFunc(ctx, name, clusterName, sync) -} - -// AddClusterScopedHandlerCalls gets all the calls that were made to AddClusterScopedHandler. -// Check the length with: -// len(mockedListenConfigInterface.AddClusterScopedHandlerCalls()) -func (mock *ListenConfigInterfaceMock) AddClusterScopedHandlerCalls() []struct { - Ctx context.Context - Name string - ClusterName string - Sync v3.ListenConfigHandlerFunc -} { - var calls []struct { - Ctx context.Context - Name string - ClusterName string - Sync v3.ListenConfigHandlerFunc - } - lockListenConfigInterfaceMockAddClusterScopedHandler.RLock() - calls = mock.calls.AddClusterScopedHandler - lockListenConfigInterfaceMockAddClusterScopedHandler.RUnlock() - return calls -} - -// AddClusterScopedLifecycle calls AddClusterScopedLifecycleFunc. -func (mock *ListenConfigInterfaceMock) AddClusterScopedLifecycle(ctx context.Context, name string, clusterName string, lifecycle v3.ListenConfigLifecycle) { - if mock.AddClusterScopedLifecycleFunc == nil { - panic("ListenConfigInterfaceMock.AddClusterScopedLifecycleFunc: method is nil but ListenConfigInterface.AddClusterScopedLifecycle was just called") - } - callInfo := struct { - Ctx context.Context - Name string - ClusterName string - Lifecycle v3.ListenConfigLifecycle - }{ - Ctx: ctx, - Name: name, - ClusterName: clusterName, - Lifecycle: lifecycle, - } - lockListenConfigInterfaceMockAddClusterScopedLifecycle.Lock() - mock.calls.AddClusterScopedLifecycle = append(mock.calls.AddClusterScopedLifecycle, callInfo) - lockListenConfigInterfaceMockAddClusterScopedLifecycle.Unlock() - mock.AddClusterScopedLifecycleFunc(ctx, name, clusterName, lifecycle) -} - -// AddClusterScopedLifecycleCalls gets all the calls that were made to AddClusterScopedLifecycle. -// Check the length with: -// len(mockedListenConfigInterface.AddClusterScopedLifecycleCalls()) -func (mock *ListenConfigInterfaceMock) AddClusterScopedLifecycleCalls() []struct { - Ctx context.Context - Name string - ClusterName string - Lifecycle v3.ListenConfigLifecycle -} { - var calls []struct { - Ctx context.Context - Name string - ClusterName string - Lifecycle v3.ListenConfigLifecycle - } - lockListenConfigInterfaceMockAddClusterScopedLifecycle.RLock() - calls = mock.calls.AddClusterScopedLifecycle - lockListenConfigInterfaceMockAddClusterScopedLifecycle.RUnlock() - return calls -} - -// AddFeatureHandler calls AddFeatureHandlerFunc. -func (mock *ListenConfigInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.ListenConfigHandlerFunc) { - if mock.AddFeatureHandlerFunc == nil { - panic("ListenConfigInterfaceMock.AddFeatureHandlerFunc: method is nil but ListenConfigInterface.AddFeatureHandler was just called") - } - callInfo := struct { - Ctx context.Context - Enabled func() bool - Name string - Sync v3.ListenConfigHandlerFunc - }{ - Ctx: ctx, - Enabled: enabled, - Name: name, - Sync: sync, - } - lockListenConfigInterfaceMockAddFeatureHandler.Lock() - mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo) - lockListenConfigInterfaceMockAddFeatureHandler.Unlock() - mock.AddFeatureHandlerFunc(ctx, enabled, name, sync) -} - -// AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler. -// Check the length with: -// len(mockedListenConfigInterface.AddFeatureHandlerCalls()) -func (mock *ListenConfigInterfaceMock) AddFeatureHandlerCalls() []struct { - Ctx context.Context - Enabled func() bool - Name string - Sync v3.ListenConfigHandlerFunc -} { - var calls []struct { - Ctx context.Context - Enabled func() bool - Name string - Sync v3.ListenConfigHandlerFunc - } - lockListenConfigInterfaceMockAddFeatureHandler.RLock() - calls = mock.calls.AddFeatureHandler - lockListenConfigInterfaceMockAddFeatureHandler.RUnlock() - return calls -} - -// AddFeatureLifecycle calls AddFeatureLifecycleFunc. -func (mock *ListenConfigInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v3.ListenConfigLifecycle) { - if mock.AddFeatureLifecycleFunc == nil { - panic("ListenConfigInterfaceMock.AddFeatureLifecycleFunc: method is nil but ListenConfigInterface.AddFeatureLifecycle was just called") - } - callInfo := struct { - Ctx context.Context - Enabled func() bool - Name string - Lifecycle v3.ListenConfigLifecycle - }{ - Ctx: ctx, - Enabled: enabled, - Name: name, - Lifecycle: lifecycle, - } - lockListenConfigInterfaceMockAddFeatureLifecycle.Lock() - mock.calls.AddFeatureLifecycle = append(mock.calls.AddFeatureLifecycle, callInfo) - lockListenConfigInterfaceMockAddFeatureLifecycle.Unlock() - mock.AddFeatureLifecycleFunc(ctx, enabled, name, lifecycle) -} - -// AddFeatureLifecycleCalls gets all the calls that were made to AddFeatureLifecycle. -// Check the length with: -// len(mockedListenConfigInterface.AddFeatureLifecycleCalls()) -func (mock *ListenConfigInterfaceMock) AddFeatureLifecycleCalls() []struct { - Ctx context.Context - Enabled func() bool - Name string - Lifecycle v3.ListenConfigLifecycle -} { - var calls []struct { - Ctx context.Context - Enabled func() bool - Name string - Lifecycle v3.ListenConfigLifecycle - } - lockListenConfigInterfaceMockAddFeatureLifecycle.RLock() - calls = mock.calls.AddFeatureLifecycle - lockListenConfigInterfaceMockAddFeatureLifecycle.RUnlock() - return calls -} - -// AddHandler calls AddHandlerFunc. -func (mock *ListenConfigInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ListenConfigHandlerFunc) { - if mock.AddHandlerFunc == nil { - panic("ListenConfigInterfaceMock.AddHandlerFunc: method is nil but ListenConfigInterface.AddHandler was just called") - } - callInfo := struct { - Ctx context.Context - Name string - Sync v3.ListenConfigHandlerFunc - }{ - Ctx: ctx, - Name: name, - Sync: sync, - } - lockListenConfigInterfaceMockAddHandler.Lock() - mock.calls.AddHandler = append(mock.calls.AddHandler, callInfo) - lockListenConfigInterfaceMockAddHandler.Unlock() - mock.AddHandlerFunc(ctx, name, sync) -} - -// AddHandlerCalls gets all the calls that were made to AddHandler. -// Check the length with: -// len(mockedListenConfigInterface.AddHandlerCalls()) -func (mock *ListenConfigInterfaceMock) AddHandlerCalls() []struct { - Ctx context.Context - Name string - Sync v3.ListenConfigHandlerFunc -} { - var calls []struct { - Ctx context.Context - Name string - Sync v3.ListenConfigHandlerFunc - } - lockListenConfigInterfaceMockAddHandler.RLock() - calls = mock.calls.AddHandler - lockListenConfigInterfaceMockAddHandler.RUnlock() - return calls -} - -// AddLifecycle calls AddLifecycleFunc. -func (mock *ListenConfigInterfaceMock) AddLifecycle(ctx context.Context, name string, lifecycle v3.ListenConfigLifecycle) { - if mock.AddLifecycleFunc == nil { - panic("ListenConfigInterfaceMock.AddLifecycleFunc: method is nil but ListenConfigInterface.AddLifecycle was just called") - } - callInfo := struct { - Ctx context.Context - Name string - Lifecycle v3.ListenConfigLifecycle - }{ - Ctx: ctx, - Name: name, - Lifecycle: lifecycle, - } - lockListenConfigInterfaceMockAddLifecycle.Lock() - mock.calls.AddLifecycle = append(mock.calls.AddLifecycle, callInfo) - lockListenConfigInterfaceMockAddLifecycle.Unlock() - mock.AddLifecycleFunc(ctx, name, lifecycle) -} - -// AddLifecycleCalls gets all the calls that were made to AddLifecycle. -// Check the length with: -// len(mockedListenConfigInterface.AddLifecycleCalls()) -func (mock *ListenConfigInterfaceMock) AddLifecycleCalls() []struct { - Ctx context.Context - Name string - Lifecycle v3.ListenConfigLifecycle -} { - var calls []struct { - Ctx context.Context - Name string - Lifecycle v3.ListenConfigLifecycle - } - lockListenConfigInterfaceMockAddLifecycle.RLock() - calls = mock.calls.AddLifecycle - lockListenConfigInterfaceMockAddLifecycle.RUnlock() - return calls -} - -// Controller calls ControllerFunc. -func (mock *ListenConfigInterfaceMock) Controller() v3.ListenConfigController { - if mock.ControllerFunc == nil { - panic("ListenConfigInterfaceMock.ControllerFunc: method is nil but ListenConfigInterface.Controller was just called") - } - callInfo := struct { - }{} - lockListenConfigInterfaceMockController.Lock() - mock.calls.Controller = append(mock.calls.Controller, callInfo) - lockListenConfigInterfaceMockController.Unlock() - return mock.ControllerFunc() -} - -// ControllerCalls gets all the calls that were made to Controller. -// Check the length with: -// len(mockedListenConfigInterface.ControllerCalls()) -func (mock *ListenConfigInterfaceMock) ControllerCalls() []struct { -} { - var calls []struct { - } - lockListenConfigInterfaceMockController.RLock() - calls = mock.calls.Controller - lockListenConfigInterfaceMockController.RUnlock() - return calls -} - -// Create calls CreateFunc. -func (mock *ListenConfigInterfaceMock) Create(in1 *v3.ListenConfig) (*v3.ListenConfig, error) { - if mock.CreateFunc == nil { - panic("ListenConfigInterfaceMock.CreateFunc: method is nil but ListenConfigInterface.Create was just called") - } - callInfo := struct { - In1 *v3.ListenConfig - }{ - In1: in1, - } - lockListenConfigInterfaceMockCreate.Lock() - mock.calls.Create = append(mock.calls.Create, callInfo) - lockListenConfigInterfaceMockCreate.Unlock() - return mock.CreateFunc(in1) -} - -// CreateCalls gets all the calls that were made to Create. -// Check the length with: -// len(mockedListenConfigInterface.CreateCalls()) -func (mock *ListenConfigInterfaceMock) CreateCalls() []struct { - In1 *v3.ListenConfig -} { - var calls []struct { - In1 *v3.ListenConfig - } - lockListenConfigInterfaceMockCreate.RLock() - calls = mock.calls.Create - lockListenConfigInterfaceMockCreate.RUnlock() - return calls -} - -// Delete calls DeleteFunc. -func (mock *ListenConfigInterfaceMock) Delete(name string, options *v1.DeleteOptions) error { - if mock.DeleteFunc == nil { - panic("ListenConfigInterfaceMock.DeleteFunc: method is nil but ListenConfigInterface.Delete was just called") - } - callInfo := struct { - Name string - Options *v1.DeleteOptions - }{ - Name: name, - Options: options, - } - lockListenConfigInterfaceMockDelete.Lock() - mock.calls.Delete = append(mock.calls.Delete, callInfo) - lockListenConfigInterfaceMockDelete.Unlock() - return mock.DeleteFunc(name, options) -} - -// DeleteCalls gets all the calls that were made to Delete. -// Check the length with: -// len(mockedListenConfigInterface.DeleteCalls()) -func (mock *ListenConfigInterfaceMock) DeleteCalls() []struct { - Name string - Options *v1.DeleteOptions -} { - var calls []struct { - Name string - Options *v1.DeleteOptions - } - lockListenConfigInterfaceMockDelete.RLock() - calls = mock.calls.Delete - lockListenConfigInterfaceMockDelete.RUnlock() - return calls -} - -// DeleteCollection calls DeleteCollectionFunc. -func (mock *ListenConfigInterfaceMock) DeleteCollection(deleteOpts *v1.DeleteOptions, listOpts v1.ListOptions) error { - if mock.DeleteCollectionFunc == nil { - panic("ListenConfigInterfaceMock.DeleteCollectionFunc: method is nil but ListenConfigInterface.DeleteCollection was just called") - } - callInfo := struct { - DeleteOpts *v1.DeleteOptions - ListOpts v1.ListOptions - }{ - DeleteOpts: deleteOpts, - ListOpts: listOpts, - } - lockListenConfigInterfaceMockDeleteCollection.Lock() - mock.calls.DeleteCollection = append(mock.calls.DeleteCollection, callInfo) - lockListenConfigInterfaceMockDeleteCollection.Unlock() - return mock.DeleteCollectionFunc(deleteOpts, listOpts) -} - -// DeleteCollectionCalls gets all the calls that were made to DeleteCollection. -// Check the length with: -// len(mockedListenConfigInterface.DeleteCollectionCalls()) -func (mock *ListenConfigInterfaceMock) DeleteCollectionCalls() []struct { - DeleteOpts *v1.DeleteOptions - ListOpts v1.ListOptions -} { - var calls []struct { - DeleteOpts *v1.DeleteOptions - ListOpts v1.ListOptions - } - lockListenConfigInterfaceMockDeleteCollection.RLock() - calls = mock.calls.DeleteCollection - lockListenConfigInterfaceMockDeleteCollection.RUnlock() - return calls -} - -// DeleteNamespaced calls DeleteNamespacedFunc. -func (mock *ListenConfigInterfaceMock) DeleteNamespaced(namespace string, name string, options *v1.DeleteOptions) error { - if mock.DeleteNamespacedFunc == nil { - panic("ListenConfigInterfaceMock.DeleteNamespacedFunc: method is nil but ListenConfigInterface.DeleteNamespaced was just called") - } - callInfo := struct { - Namespace string - Name string - Options *v1.DeleteOptions - }{ - Namespace: namespace, - Name: name, - Options: options, - } - lockListenConfigInterfaceMockDeleteNamespaced.Lock() - mock.calls.DeleteNamespaced = append(mock.calls.DeleteNamespaced, callInfo) - lockListenConfigInterfaceMockDeleteNamespaced.Unlock() - return mock.DeleteNamespacedFunc(namespace, name, options) -} - -// DeleteNamespacedCalls gets all the calls that were made to DeleteNamespaced. -// Check the length with: -// len(mockedListenConfigInterface.DeleteNamespacedCalls()) -func (mock *ListenConfigInterfaceMock) DeleteNamespacedCalls() []struct { - Namespace string - Name string - Options *v1.DeleteOptions -} { - var calls []struct { - Namespace string - Name string - Options *v1.DeleteOptions - } - lockListenConfigInterfaceMockDeleteNamespaced.RLock() - calls = mock.calls.DeleteNamespaced - lockListenConfigInterfaceMockDeleteNamespaced.RUnlock() - return calls -} - -// Get calls GetFunc. -func (mock *ListenConfigInterfaceMock) Get(name string, opts v1.GetOptions) (*v3.ListenConfig, error) { - if mock.GetFunc == nil { - panic("ListenConfigInterfaceMock.GetFunc: method is nil but ListenConfigInterface.Get was just called") - } - callInfo := struct { - Name string - Opts v1.GetOptions - }{ - Name: name, - Opts: opts, - } - lockListenConfigInterfaceMockGet.Lock() - mock.calls.Get = append(mock.calls.Get, callInfo) - lockListenConfigInterfaceMockGet.Unlock() - return mock.GetFunc(name, opts) -} - -// GetCalls gets all the calls that were made to Get. -// Check the length with: -// len(mockedListenConfigInterface.GetCalls()) -func (mock *ListenConfigInterfaceMock) GetCalls() []struct { - Name string - Opts v1.GetOptions -} { - var calls []struct { - Name string - Opts v1.GetOptions - } - lockListenConfigInterfaceMockGet.RLock() - calls = mock.calls.Get - lockListenConfigInterfaceMockGet.RUnlock() - return calls -} - -// GetNamespaced calls GetNamespacedFunc. -func (mock *ListenConfigInterfaceMock) GetNamespaced(namespace string, name string, opts v1.GetOptions) (*v3.ListenConfig, error) { - if mock.GetNamespacedFunc == nil { - panic("ListenConfigInterfaceMock.GetNamespacedFunc: method is nil but ListenConfigInterface.GetNamespaced was just called") - } - callInfo := struct { - Namespace string - Name string - Opts v1.GetOptions - }{ - Namespace: namespace, - Name: name, - Opts: opts, - } - lockListenConfigInterfaceMockGetNamespaced.Lock() - mock.calls.GetNamespaced = append(mock.calls.GetNamespaced, callInfo) - lockListenConfigInterfaceMockGetNamespaced.Unlock() - return mock.GetNamespacedFunc(namespace, name, opts) -} - -// GetNamespacedCalls gets all the calls that were made to GetNamespaced. -// Check the length with: -// len(mockedListenConfigInterface.GetNamespacedCalls()) -func (mock *ListenConfigInterfaceMock) GetNamespacedCalls() []struct { - Namespace string - Name string - Opts v1.GetOptions -} { - var calls []struct { - Namespace string - Name string - Opts v1.GetOptions - } - lockListenConfigInterfaceMockGetNamespaced.RLock() - calls = mock.calls.GetNamespaced - lockListenConfigInterfaceMockGetNamespaced.RUnlock() - return calls -} - -// List calls ListFunc. -func (mock *ListenConfigInterfaceMock) List(opts v1.ListOptions) (*v3.ListenConfigList, error) { - if mock.ListFunc == nil { - panic("ListenConfigInterfaceMock.ListFunc: method is nil but ListenConfigInterface.List was just called") - } - callInfo := struct { - Opts v1.ListOptions - }{ - Opts: opts, - } - lockListenConfigInterfaceMockList.Lock() - mock.calls.List = append(mock.calls.List, callInfo) - lockListenConfigInterfaceMockList.Unlock() - return mock.ListFunc(opts) -} - -// ListCalls gets all the calls that were made to List. -// Check the length with: -// len(mockedListenConfigInterface.ListCalls()) -func (mock *ListenConfigInterfaceMock) ListCalls() []struct { - Opts v1.ListOptions -} { - var calls []struct { - Opts v1.ListOptions - } - lockListenConfigInterfaceMockList.RLock() - calls = mock.calls.List - lockListenConfigInterfaceMockList.RUnlock() - return calls -} - -// ListNamespaced calls ListNamespacedFunc. -func (mock *ListenConfigInterfaceMock) ListNamespaced(namespace string, opts v1.ListOptions) (*v3.ListenConfigList, error) { - if mock.ListNamespacedFunc == nil { - panic("ListenConfigInterfaceMock.ListNamespacedFunc: method is nil but ListenConfigInterface.ListNamespaced was just called") - } - callInfo := struct { - Namespace string - Opts v1.ListOptions - }{ - Namespace: namespace, - Opts: opts, - } - lockListenConfigInterfaceMockListNamespaced.Lock() - mock.calls.ListNamespaced = append(mock.calls.ListNamespaced, callInfo) - lockListenConfigInterfaceMockListNamespaced.Unlock() - return mock.ListNamespacedFunc(namespace, opts) -} - -// ListNamespacedCalls gets all the calls that were made to ListNamespaced. -// Check the length with: -// len(mockedListenConfigInterface.ListNamespacedCalls()) -func (mock *ListenConfigInterfaceMock) ListNamespacedCalls() []struct { - Namespace string - Opts v1.ListOptions -} { - var calls []struct { - Namespace string - Opts v1.ListOptions - } - lockListenConfigInterfaceMockListNamespaced.RLock() - calls = mock.calls.ListNamespaced - lockListenConfigInterfaceMockListNamespaced.RUnlock() - return calls -} - -// ObjectClient calls ObjectClientFunc. -func (mock *ListenConfigInterfaceMock) ObjectClient() *objectclient.ObjectClient { - if mock.ObjectClientFunc == nil { - panic("ListenConfigInterfaceMock.ObjectClientFunc: method is nil but ListenConfigInterface.ObjectClient was just called") - } - callInfo := struct { - }{} - lockListenConfigInterfaceMockObjectClient.Lock() - mock.calls.ObjectClient = append(mock.calls.ObjectClient, callInfo) - lockListenConfigInterfaceMockObjectClient.Unlock() - return mock.ObjectClientFunc() -} - -// ObjectClientCalls gets all the calls that were made to ObjectClient. -// Check the length with: -// len(mockedListenConfigInterface.ObjectClientCalls()) -func (mock *ListenConfigInterfaceMock) ObjectClientCalls() []struct { -} { - var calls []struct { - } - lockListenConfigInterfaceMockObjectClient.RLock() - calls = mock.calls.ObjectClient - lockListenConfigInterfaceMockObjectClient.RUnlock() - return calls -} - -// Update calls UpdateFunc. -func (mock *ListenConfigInterfaceMock) Update(in1 *v3.ListenConfig) (*v3.ListenConfig, error) { - if mock.UpdateFunc == nil { - panic("ListenConfigInterfaceMock.UpdateFunc: method is nil but ListenConfigInterface.Update was just called") - } - callInfo := struct { - In1 *v3.ListenConfig - }{ - In1: in1, - } - lockListenConfigInterfaceMockUpdate.Lock() - mock.calls.Update = append(mock.calls.Update, callInfo) - lockListenConfigInterfaceMockUpdate.Unlock() - return mock.UpdateFunc(in1) -} - -// UpdateCalls gets all the calls that were made to Update. -// Check the length with: -// len(mockedListenConfigInterface.UpdateCalls()) -func (mock *ListenConfigInterfaceMock) UpdateCalls() []struct { - In1 *v3.ListenConfig -} { - var calls []struct { - In1 *v3.ListenConfig - } - lockListenConfigInterfaceMockUpdate.RLock() - calls = mock.calls.Update - lockListenConfigInterfaceMockUpdate.RUnlock() - return calls -} - -// Watch calls WatchFunc. -func (mock *ListenConfigInterfaceMock) Watch(opts v1.ListOptions) (watch.Interface, error) { - if mock.WatchFunc == nil { - panic("ListenConfigInterfaceMock.WatchFunc: method is nil but ListenConfigInterface.Watch was just called") - } - callInfo := struct { - Opts v1.ListOptions - }{ - Opts: opts, - } - lockListenConfigInterfaceMockWatch.Lock() - mock.calls.Watch = append(mock.calls.Watch, callInfo) - lockListenConfigInterfaceMockWatch.Unlock() - return mock.WatchFunc(opts) -} - -// WatchCalls gets all the calls that were made to Watch. -// Check the length with: -// len(mockedListenConfigInterface.WatchCalls()) -func (mock *ListenConfigInterfaceMock) WatchCalls() []struct { - Opts v1.ListOptions -} { - var calls []struct { - Opts v1.ListOptions - } - lockListenConfigInterfaceMockWatch.RLock() - calls = mock.calls.Watch - lockListenConfigInterfaceMockWatch.RUnlock() - return calls -} - -var ( - lockListenConfigsGetterMockListenConfigs sync.RWMutex -) - -// Ensure, that ListenConfigsGetterMock does implement ListenConfigsGetter. -// If this is not the case, regenerate this file with moq. -var _ v3.ListenConfigsGetter = &ListenConfigsGetterMock{} - -// ListenConfigsGetterMock is a mock implementation of ListenConfigsGetter. -// -// func TestSomethingThatUsesListenConfigsGetter(t *testing.T) { -// -// // make and configure a mocked ListenConfigsGetter -// mockedListenConfigsGetter := &ListenConfigsGetterMock{ -// ListenConfigsFunc: func(namespace string) v3.ListenConfigInterface { -// panic("mock out the ListenConfigs method") -// }, -// } -// -// // use mockedListenConfigsGetter in code that requires ListenConfigsGetter -// // and then make assertions. -// -// } -type ListenConfigsGetterMock struct { - // ListenConfigsFunc mocks the ListenConfigs method. - ListenConfigsFunc func(namespace string) v3.ListenConfigInterface - - // calls tracks calls to the methods. - calls struct { - // ListenConfigs holds details about calls to the ListenConfigs method. - ListenConfigs []struct { - // Namespace is the namespace argument value. - Namespace string - } - } -} - -// ListenConfigs calls ListenConfigsFunc. -func (mock *ListenConfigsGetterMock) ListenConfigs(namespace string) v3.ListenConfigInterface { - if mock.ListenConfigsFunc == nil { - panic("ListenConfigsGetterMock.ListenConfigsFunc: method is nil but ListenConfigsGetter.ListenConfigs was just called") - } - callInfo := struct { - Namespace string - }{ - Namespace: namespace, - } - lockListenConfigsGetterMockListenConfigs.Lock() - mock.calls.ListenConfigs = append(mock.calls.ListenConfigs, callInfo) - lockListenConfigsGetterMockListenConfigs.Unlock() - return mock.ListenConfigsFunc(namespace) -} - -// ListenConfigsCalls gets all the calls that were made to ListenConfigs. -// Check the length with: -// len(mockedListenConfigsGetter.ListenConfigsCalls()) -func (mock *ListenConfigsGetterMock) ListenConfigsCalls() []struct { - Namespace string -} { - var calls []struct { - Namespace string - } - lockListenConfigsGetterMockListenConfigs.RLock() - calls = mock.calls.ListenConfigs - lockListenConfigsGetterMockListenConfigs.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 917e96e4..1bf78c6a 100644 --- a/apis/management.cattle.io/v3/zz_generated_deepcopy.go +++ b/apis/management.cattle.io/v3/zz_generated_deepcopy.go @@ -3594,6 +3594,20 @@ func (in *GithubConfig) DeepCopyInto(out *GithubConfig) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) in.AuthConfig.DeepCopyInto(&out.AuthConfig) + if in.AdditionalClientIDs != nil { + in, out := &in.AdditionalClientIDs, &out.AdditionalClientIDs + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } + if in.HostnameToClientID != nil { + in, out := &in.HostnameToClientID, &out.HostnameToClientID + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } return } @@ -4819,92 +4833,6 @@ func (in *ListOpts) DeepCopy() *ListOpts { return out } -// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ListenConfig) DeepCopyInto(out *ListenConfig) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - if in.Domains != nil { - in, out := &in.Domains, &out.Domains - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.TOS != nil { - in, out := &in.TOS, &out.TOS - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.KnownIPs != nil { - in, out := &in.KnownIPs, &out.KnownIPs - *out = make([]string, len(*in)) - copy(*out, *in) - } - if in.GeneratedCerts != nil { - in, out := &in.GeneratedCerts, &out.GeneratedCerts - *out = make(map[string]string, len(*in)) - for key, val := range *in { - (*out)[key] = val - } - } - if in.SubjectAlternativeNames != nil { - in, out := &in.SubjectAlternativeNames, &out.SubjectAlternativeNames - *out = make([]string, len(*in)) - copy(*out, *in) - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListenConfig. -func (in *ListenConfig) DeepCopy() *ListenConfig { - if in == nil { - return nil - } - out := new(ListenConfig) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ListenConfig) 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 *ListenConfigList) DeepCopyInto(out *ListenConfigList) { - *out = *in - out.TypeMeta = in.TypeMeta - in.ListMeta.DeepCopyInto(&out.ListMeta) - if in.Items != nil { - in, out := &in.Items, &out.Items - *out = make([]ListenConfig, len(*in)) - for i := range *in { - (*in)[i].DeepCopyInto(&(*out)[i]) - } - } - return -} - -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ListenConfigList. -func (in *ListenConfigList) DeepCopy() *ListenConfigList { - if in == nil { - return nil - } - out := new(ListenConfigList) - in.DeepCopyInto(out) - return out -} - -// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. -func (in *ListenConfigList) 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 *LoadBalancerCapabilities) DeepCopyInto(out *LoadBalancerCapabilities) { *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 f64e42c1..dd66f5c2 100644 --- a/apis/management.cattle.io/v3/zz_generated_k8s_client.go +++ b/apis/management.cattle.io/v3/zz_generated_k8s_client.go @@ -53,7 +53,6 @@ type Interface interface { ProjectNetworkPoliciesGetter ClusterLoggingsGetter ProjectLoggingsGetter - ListenConfigsGetter SettingsGetter FeaturesGetter ClusterAlertsGetter @@ -122,7 +121,6 @@ type Clients struct { ProjectNetworkPolicy ProjectNetworkPolicyClient ClusterLogging ClusterLoggingClient ProjectLogging ProjectLoggingClient - ListenConfig ListenConfigClient Setting SettingClient Feature FeatureClient ClusterAlert ClusterAlertClient @@ -193,7 +191,6 @@ type Client struct { projectNetworkPolicyControllers map[string]ProjectNetworkPolicyController clusterLoggingControllers map[string]ClusterLoggingController projectLoggingControllers map[string]ProjectLoggingController - listenConfigControllers map[string]ListenConfigController settingControllers map[string]SettingController featureControllers map[string]FeatureController clusterAlertControllers map[string]ClusterAlertController @@ -358,9 +355,6 @@ func NewClientsFromInterface(iface Interface) *Clients { ProjectLogging: &projectLoggingClient2{ iface: iface.ProjectLoggings(""), }, - ListenConfig: &listenConfigClient2{ - iface: iface.ListenConfigs(""), - }, Setting: &settingClient2{ iface: iface.Settings(""), }, @@ -500,7 +494,6 @@ func NewForConfig(config rest.Config) (Interface, error) { projectNetworkPolicyControllers: map[string]ProjectNetworkPolicyController{}, clusterLoggingControllers: map[string]ClusterLoggingController{}, projectLoggingControllers: map[string]ProjectLoggingController{}, - listenConfigControllers: map[string]ListenConfigController{}, settingControllers: map[string]SettingController{}, featureControllers: map[string]FeatureController{}, clusterAlertControllers: map[string]ClusterAlertController{}, @@ -975,19 +968,6 @@ func (c *Client) ProjectLoggings(namespace string) ProjectLoggingInterface { } } -type ListenConfigsGetter interface { - ListenConfigs(namespace string) ListenConfigInterface -} - -func (c *Client) ListenConfigs(namespace string) ListenConfigInterface { - objectClient := objectclient.NewObjectClient(namespace, c.restClient, &ListenConfigResource, ListenConfigGroupVersionKind, listenConfigFactory{}) - return &listenConfigClient{ - ns: namespace, - client: c, - objectClient: objectClient, - } -} - type SettingsGetter interface { Settings(namespace string) SettingInterface } diff --git a/apis/management.cattle.io/v3/zz_generated_listen_config_controller.go b/apis/management.cattle.io/v3/zz_generated_listen_config_controller.go deleted file mode 100644 index f04d5159..00000000 --- a/apis/management.cattle.io/v3/zz_generated_listen_config_controller.go +++ /dev/null @@ -1,508 +0,0 @@ -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 ( - ListenConfigGroupVersionKind = schema.GroupVersionKind{ - Version: Version, - Group: GroupName, - Kind: "ListenConfig", - } - ListenConfigResource = metav1.APIResource{ - Name: "listenconfigs", - SingularName: "listenconfig", - Namespaced: false, - Kind: ListenConfigGroupVersionKind.Kind, - } - - ListenConfigGroupVersionResource = schema.GroupVersionResource{ - Group: GroupName, - Version: Version, - Resource: "listenconfigs", - } -) - -func init() { - resource.Put(ListenConfigGroupVersionResource) -} - -func NewListenConfig(namespace, name string, obj ListenConfig) *ListenConfig { - obj.APIVersion, obj.Kind = ListenConfigGroupVersionKind.ToAPIVersionAndKind() - obj.Name = name - obj.Namespace = namespace - return &obj -} - -type ListenConfigList struct { - metav1.TypeMeta `json:",inline"` - metav1.ListMeta `json:"metadata,omitempty"` - Items []ListenConfig `json:"items"` -} - -type ListenConfigHandlerFunc func(key string, obj *ListenConfig) (runtime.Object, error) - -type ListenConfigChangeHandlerFunc func(obj *ListenConfig) (runtime.Object, error) - -type ListenConfigLister interface { - List(namespace string, selector labels.Selector) (ret []*ListenConfig, err error) - Get(namespace, name string) (*ListenConfig, error) -} - -type ListenConfigController interface { - Generic() controller.GenericController - Informer() cache.SharedIndexInformer - Lister() ListenConfigLister - AddHandler(ctx context.Context, name string, handler ListenConfigHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync ListenConfigHandlerFunc) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler ListenConfigHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ListenConfigHandlerFunc) - Enqueue(namespace, name string) - Sync(ctx context.Context) error - Start(ctx context.Context, threadiness int) error -} - -type ListenConfigInterface interface { - ObjectClient() *objectclient.ObjectClient - Create(*ListenConfig) (*ListenConfig, error) - GetNamespaced(namespace, name string, opts metav1.GetOptions) (*ListenConfig, error) - Get(name string, opts metav1.GetOptions) (*ListenConfig, error) - Update(*ListenConfig) (*ListenConfig, error) - Delete(name string, options *metav1.DeleteOptions) error - DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error - List(opts metav1.ListOptions) (*ListenConfigList, error) - ListNamespaced(namespace string, opts metav1.ListOptions) (*ListenConfigList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error - Controller() ListenConfigController - AddHandler(ctx context.Context, name string, sync ListenConfigHandlerFunc) - AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync ListenConfigHandlerFunc) - AddLifecycle(ctx context.Context, name string, lifecycle ListenConfigLifecycle) - AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle ListenConfigLifecycle) - AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync ListenConfigHandlerFunc) - AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync ListenConfigHandlerFunc) - AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle ListenConfigLifecycle) - AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle ListenConfigLifecycle) -} - -type listenConfigLister struct { - controller *listenConfigController -} - -func (l *listenConfigLister) List(namespace string, selector labels.Selector) (ret []*ListenConfig, err error) { - err = cache.ListAllByNamespace(l.controller.Informer().GetIndexer(), namespace, selector, func(obj interface{}) { - ret = append(ret, obj.(*ListenConfig)) - }) - return -} - -func (l *listenConfigLister) Get(namespace, name string) (*ListenConfig, 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: ListenConfigGroupVersionKind.Group, - Resource: "listenConfig", - }, key) - } - return obj.(*ListenConfig), nil -} - -type listenConfigController struct { - controller.GenericController -} - -func (c *listenConfigController) Generic() controller.GenericController { - return c.GenericController -} - -func (c *listenConfigController) Lister() ListenConfigLister { - return &listenConfigLister{ - controller: c, - } -} - -func (c *listenConfigController) AddHandler(ctx context.Context, name string, handler ListenConfigHandlerFunc) { - c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { - if obj == nil { - return handler(key, nil) - } else if v, ok := obj.(*ListenConfig); ok { - return handler(key, v) - } else { - return nil, nil - } - }) -} - -func (c *listenConfigController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler ListenConfigHandlerFunc) { - 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.(*ListenConfig); ok { - return handler(key, v) - } else { - return nil, nil - } - }) -} - -func (c *listenConfigController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler ListenConfigHandlerFunc) { - c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) { - if obj == nil { - return handler(key, nil) - } else if v, ok := obj.(*ListenConfig); ok && controller.ObjectInCluster(cluster, obj) { - return handler(key, v) - } else { - return nil, nil - } - }) -} - -func (c *listenConfigController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler ListenConfigHandlerFunc) { - 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.(*ListenConfig); ok && controller.ObjectInCluster(cluster, obj) { - return handler(key, v) - } else { - return nil, nil - } - }) -} - -type listenConfigFactory struct { -} - -func (c listenConfigFactory) Object() runtime.Object { - return &ListenConfig{} -} - -func (c listenConfigFactory) List() runtime.Object { - return &ListenConfigList{} -} - -func (s *listenConfigClient) Controller() ListenConfigController { - s.client.Lock() - defer s.client.Unlock() - - c, ok := s.client.listenConfigControllers[s.ns] - if ok { - return c - } - - genericController := controller.NewGenericController(ListenConfigGroupVersionKind.Kind+"Controller", - s.objectClient) - - c = &listenConfigController{ - GenericController: genericController, - } - - s.client.listenConfigControllers[s.ns] = c - s.client.starters = append(s.client.starters, c) - - return c -} - -type listenConfigClient struct { - client *Client - ns string - objectClient *objectclient.ObjectClient - controller ListenConfigController -} - -func (s *listenConfigClient) ObjectClient() *objectclient.ObjectClient { - return s.objectClient -} - -func (s *listenConfigClient) Create(o *ListenConfig) (*ListenConfig, error) { - obj, err := s.objectClient.Create(o) - return obj.(*ListenConfig), err -} - -func (s *listenConfigClient) Get(name string, opts metav1.GetOptions) (*ListenConfig, error) { - obj, err := s.objectClient.Get(name, opts) - return obj.(*ListenConfig), err -} - -func (s *listenConfigClient) GetNamespaced(namespace, name string, opts metav1.GetOptions) (*ListenConfig, error) { - obj, err := s.objectClient.GetNamespaced(namespace, name, opts) - return obj.(*ListenConfig), err -} - -func (s *listenConfigClient) Update(o *ListenConfig) (*ListenConfig, error) { - obj, err := s.objectClient.Update(o.Name, o) - return obj.(*ListenConfig), err -} - -func (s *listenConfigClient) Delete(name string, options *metav1.DeleteOptions) error { - return s.objectClient.Delete(name, options) -} - -func (s *listenConfigClient) DeleteNamespaced(namespace, name string, options *metav1.DeleteOptions) error { - return s.objectClient.DeleteNamespaced(namespace, name, options) -} - -func (s *listenConfigClient) List(opts metav1.ListOptions) (*ListenConfigList, error) { - obj, err := s.objectClient.List(opts) - return obj.(*ListenConfigList), err -} - -func (s *listenConfigClient) ListNamespaced(namespace string, opts metav1.ListOptions) (*ListenConfigList, error) { - obj, err := s.objectClient.ListNamespaced(namespace, opts) - return obj.(*ListenConfigList), err -} - -func (s *listenConfigClient) Watch(opts metav1.ListOptions) (watch.Interface, error) { - return s.objectClient.Watch(opts) -} - -// Patch applies the patch and returns the patched deployment. -func (s *listenConfigClient) Patch(o *ListenConfig, patchType types.PatchType, data []byte, subresources ...string) (*ListenConfig, error) { - obj, err := s.objectClient.Patch(o.Name, o, patchType, data, subresources...) - return obj.(*ListenConfig), err -} - -func (s *listenConfigClient) DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error { - return s.objectClient.DeleteCollection(deleteOpts, listOpts) -} - -func (s *listenConfigClient) AddHandler(ctx context.Context, name string, sync ListenConfigHandlerFunc) { - s.Controller().AddHandler(ctx, name, sync) -} - -func (s *listenConfigClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync ListenConfigHandlerFunc) { - s.Controller().AddFeatureHandler(ctx, enabled, name, sync) -} - -func (s *listenConfigClient) AddLifecycle(ctx context.Context, name string, lifecycle ListenConfigLifecycle) { - sync := NewListenConfigLifecycleAdapter(name, false, s, lifecycle) - s.Controller().AddHandler(ctx, name, sync) -} - -func (s *listenConfigClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle ListenConfigLifecycle) { - sync := NewListenConfigLifecycleAdapter(name, false, s, lifecycle) - s.Controller().AddFeatureHandler(ctx, enabled, name, sync) -} - -func (s *listenConfigClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync ListenConfigHandlerFunc) { - s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) -} - -func (s *listenConfigClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync ListenConfigHandlerFunc) { - s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) -} - -func (s *listenConfigClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle ListenConfigLifecycle) { - sync := NewListenConfigLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) - s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync) -} - -func (s *listenConfigClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle ListenConfigLifecycle) { - sync := NewListenConfigLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle) - s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync) -} - -type ListenConfigIndexer func(obj *ListenConfig) ([]string, error) - -type ListenConfigClientCache interface { - Get(namespace, name string) (*ListenConfig, error) - List(namespace string, selector labels.Selector) ([]*ListenConfig, error) - - Index(name string, indexer ListenConfigIndexer) - GetIndexed(name, key string) ([]*ListenConfig, error) -} - -type ListenConfigClient interface { - Create(*ListenConfig) (*ListenConfig, error) - Get(namespace, name string, opts metav1.GetOptions) (*ListenConfig, error) - Update(*ListenConfig) (*ListenConfig, error) - Delete(namespace, name string, options *metav1.DeleteOptions) error - List(namespace string, opts metav1.ListOptions) (*ListenConfigList, error) - Watch(opts metav1.ListOptions) (watch.Interface, error) - - Cache() ListenConfigClientCache - - OnCreate(ctx context.Context, name string, sync ListenConfigChangeHandlerFunc) - OnChange(ctx context.Context, name string, sync ListenConfigChangeHandlerFunc) - OnRemove(ctx context.Context, name string, sync ListenConfigChangeHandlerFunc) - Enqueue(namespace, name string) - - Generic() controller.GenericController - ObjectClient() *objectclient.ObjectClient - Interface() ListenConfigInterface -} - -type listenConfigClientCache struct { - client *listenConfigClient2 -} - -type listenConfigClient2 struct { - iface ListenConfigInterface - controller ListenConfigController -} - -func (n *listenConfigClient2) Interface() ListenConfigInterface { - return n.iface -} - -func (n *listenConfigClient2) Generic() controller.GenericController { - return n.iface.Controller().Generic() -} - -func (n *listenConfigClient2) ObjectClient() *objectclient.ObjectClient { - return n.Interface().ObjectClient() -} - -func (n *listenConfigClient2) Enqueue(namespace, name string) { - n.iface.Controller().Enqueue(namespace, name) -} - -func (n *listenConfigClient2) Create(obj *ListenConfig) (*ListenConfig, error) { - return n.iface.Create(obj) -} - -func (n *listenConfigClient2) Get(namespace, name string, opts metav1.GetOptions) (*ListenConfig, error) { - return n.iface.GetNamespaced(namespace, name, opts) -} - -func (n *listenConfigClient2) Update(obj *ListenConfig) (*ListenConfig, error) { - return n.iface.Update(obj) -} - -func (n *listenConfigClient2) Delete(namespace, name string, options *metav1.DeleteOptions) error { - return n.iface.DeleteNamespaced(namespace, name, options) -} - -func (n *listenConfigClient2) List(namespace string, opts metav1.ListOptions) (*ListenConfigList, error) { - return n.iface.List(opts) -} - -func (n *listenConfigClient2) Watch(opts metav1.ListOptions) (watch.Interface, error) { - return n.iface.Watch(opts) -} - -func (n *listenConfigClientCache) Get(namespace, name string) (*ListenConfig, error) { - return n.client.controller.Lister().Get(namespace, name) -} - -func (n *listenConfigClientCache) List(namespace string, selector labels.Selector) ([]*ListenConfig, error) { - return n.client.controller.Lister().List(namespace, selector) -} - -func (n *listenConfigClient2) Cache() ListenConfigClientCache { - n.loadController() - return &listenConfigClientCache{ - client: n, - } -} - -func (n *listenConfigClient2) OnCreate(ctx context.Context, name string, sync ListenConfigChangeHandlerFunc) { - n.loadController() - n.iface.AddLifecycle(ctx, name+"-create", &listenConfigLifecycleDelegate{create: sync}) -} - -func (n *listenConfigClient2) OnChange(ctx context.Context, name string, sync ListenConfigChangeHandlerFunc) { - n.loadController() - n.iface.AddLifecycle(ctx, name+"-change", &listenConfigLifecycleDelegate{update: sync}) -} - -func (n *listenConfigClient2) OnRemove(ctx context.Context, name string, sync ListenConfigChangeHandlerFunc) { - n.loadController() - n.iface.AddLifecycle(ctx, name, &listenConfigLifecycleDelegate{remove: sync}) -} - -func (n *listenConfigClientCache) Index(name string, indexer ListenConfigIndexer) { - err := n.client.controller.Informer().GetIndexer().AddIndexers(map[string]cache.IndexFunc{ - name: func(obj interface{}) ([]string, error) { - if v, ok := obj.(*ListenConfig); ok { - return indexer(v) - } - return nil, nil - }, - }) - - if err != nil { - panic(err) - } -} - -func (n *listenConfigClientCache) GetIndexed(name, key string) ([]*ListenConfig, error) { - var result []*ListenConfig - objs, err := n.client.controller.Informer().GetIndexer().ByIndex(name, key) - if err != nil { - return nil, err - } - for _, obj := range objs { - if v, ok := obj.(*ListenConfig); ok { - result = append(result, v) - } - } - - return result, nil -} - -func (n *listenConfigClient2) loadController() { - if n.controller == nil { - n.controller = n.iface.Controller() - } -} - -type listenConfigLifecycleDelegate struct { - create ListenConfigChangeHandlerFunc - update ListenConfigChangeHandlerFunc - remove ListenConfigChangeHandlerFunc -} - -func (n *listenConfigLifecycleDelegate) HasCreate() bool { - return n.create != nil -} - -func (n *listenConfigLifecycleDelegate) Create(obj *ListenConfig) (runtime.Object, error) { - if n.create == nil { - return obj, nil - } - return n.create(obj) -} - -func (n *listenConfigLifecycleDelegate) HasFinalize() bool { - return n.remove != nil -} - -func (n *listenConfigLifecycleDelegate) Remove(obj *ListenConfig) (runtime.Object, error) { - if n.remove == nil { - return obj, nil - } - return n.remove(obj) -} - -func (n *listenConfigLifecycleDelegate) Updated(obj *ListenConfig) (runtime.Object, error) { - if n.update == nil { - return obj, nil - } - return n.update(obj) -} diff --git a/apis/management.cattle.io/v3/zz_generated_listen_config_lifecycle_adapter.go b/apis/management.cattle.io/v3/zz_generated_listen_config_lifecycle_adapter.go deleted file mode 100644 index 3adf9d58..00000000 --- a/apis/management.cattle.io/v3/zz_generated_listen_config_lifecycle_adapter.go +++ /dev/null @@ -1,66 +0,0 @@ -package v3 - -import ( - "github.com/rancher/norman/lifecycle" - "github.com/rancher/norman/resource" - "k8s.io/apimachinery/pkg/runtime" -) - -type ListenConfigLifecycle interface { - Create(obj *ListenConfig) (runtime.Object, error) - Remove(obj *ListenConfig) (runtime.Object, error) - Updated(obj *ListenConfig) (runtime.Object, error) -} - -type listenConfigLifecycleAdapter struct { - lifecycle ListenConfigLifecycle -} - -func (w *listenConfigLifecycleAdapter) HasCreate() bool { - o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) - return !ok || o.HasCreate() -} - -func (w *listenConfigLifecycleAdapter) HasFinalize() bool { - o, ok := w.lifecycle.(lifecycle.ObjectLifecycleCondition) - return !ok || o.HasFinalize() -} - -func (w *listenConfigLifecycleAdapter) Create(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Create(obj.(*ListenConfig)) - if o == nil { - return nil, err - } - return o, err -} - -func (w *listenConfigLifecycleAdapter) Finalize(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Remove(obj.(*ListenConfig)) - if o == nil { - return nil, err - } - return o, err -} - -func (w *listenConfigLifecycleAdapter) Updated(obj runtime.Object) (runtime.Object, error) { - o, err := w.lifecycle.Updated(obj.(*ListenConfig)) - if o == nil { - return nil, err - } - return o, err -} - -func NewListenConfigLifecycleAdapter(name string, clusterScoped bool, client ListenConfigInterface, l ListenConfigLifecycle) ListenConfigHandlerFunc { - if clusterScoped { - resource.PutClusterScoped(ListenConfigGroupVersionResource) - } - adapter := &listenConfigLifecycleAdapter{lifecycle: l} - syncFn := lifecycle.NewObjectLifecycleAdapter(name, clusterScoped, adapter, client.ObjectClient()) - return func(key string, obj *ListenConfig) (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 9bb65b88..5cb495f5 100644 --- a/apis/management.cattle.io/v3/zz_generated_scheme.go +++ b/apis/management.cattle.io/v3/zz_generated_scheme.go @@ -99,8 +99,6 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ClusterLoggingList{}, &ProjectLogging{}, &ProjectLoggingList{}, - &ListenConfig{}, - &ListenConfigList{}, &Setting{}, &SettingList{}, &Feature{}, diff --git a/client/management/v3/zz_generated_client.go b/client/management/v3/zz_generated_client.go index fafa2a35..1a3acf52 100644 --- a/client/management/v3/zz_generated_client.go +++ b/client/management/v3/zz_generated_client.go @@ -39,7 +39,6 @@ type Client struct { ProjectNetworkPolicy ProjectNetworkPolicyOperations ClusterLogging ClusterLoggingOperations ProjectLogging ProjectLoggingOperations - ListenConfig ListenConfigOperations Setting SettingOperations Feature FeatureOperations ClusterAlert ClusterAlertOperations @@ -115,7 +114,6 @@ func NewClient(opts *clientbase.ClientOpts) (*Client, error) { client.ProjectNetworkPolicy = newProjectNetworkPolicyClient(client) client.ClusterLogging = newClusterLoggingClient(client) client.ProjectLogging = newProjectLoggingClient(client) - client.ListenConfig = newListenConfigClient(client) client.Setting = newSettingClient(client) client.Feature = newFeatureClient(client) client.ClusterAlert = newClusterAlertClient(client) diff --git a/client/management/v3/zz_generated_github_config.go b/client/management/v3/zz_generated_github_config.go index 1552030b..1a64cdc0 100644 --- a/client/management/v3/zz_generated_github_config.go +++ b/client/management/v3/zz_generated_github_config.go @@ -3,6 +3,7 @@ package client const ( GithubConfigType = "githubConfig" GithubConfigFieldAccessMode = "accessMode" + GithubConfigFieldAdditionalClientIDs = "additionalClientIds" GithubConfigFieldAllowedPrincipalIDs = "allowedPrincipalIds" GithubConfigFieldAnnotations = "annotations" GithubConfigFieldClientID = "clientId" @@ -11,6 +12,7 @@ const ( GithubConfigFieldCreatorID = "creatorId" GithubConfigFieldEnabled = "enabled" GithubConfigFieldHostname = "hostname" + GithubConfigFieldHostnameToClientID = "hostnameToClientId" GithubConfigFieldLabels = "labels" GithubConfigFieldName = "name" GithubConfigFieldOwnerReferences = "ownerReferences" @@ -22,6 +24,7 @@ const ( type GithubConfig struct { AccessMode string `json:"accessMode,omitempty" yaml:"accessMode,omitempty"` + AdditionalClientIDs map[string]string `json:"additionalClientIds,omitempty" yaml:"additionalClientIds,omitempty"` AllowedPrincipalIDs []string `json:"allowedPrincipalIds,omitempty" yaml:"allowedPrincipalIds,omitempty"` Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` ClientID string `json:"clientId,omitempty" yaml:"clientId,omitempty"` @@ -30,6 +33,7 @@ type GithubConfig struct { CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + HostnameToClientID map[string]string `json:"hostnameToClientId,omitempty" yaml:"hostnameToClientId,omitempty"` Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` OwnerReferences []OwnerReference `json:"ownerReferences,omitempty" yaml:"ownerReferences,omitempty"` diff --git a/client/management/v3/zz_generated_listen_config.go b/client/management/v3/zz_generated_listen_config.go deleted file mode 100644 index c19f1edb..00000000 --- a/client/management/v3/zz_generated_listen_config.go +++ /dev/null @@ -1,139 +0,0 @@ -package client - -import ( - "github.com/rancher/norman/types" -) - -const ( - ListenConfigType = "listenConfig" - ListenConfigFieldAlgorithm = "algorithm" - ListenConfigFieldAnnotations = "annotations" - ListenConfigFieldCACerts = "caCerts" - ListenConfigFieldCN = "cn" - ListenConfigFieldCert = "cert" - ListenConfigFieldCertFingerprint = "certFingerprint" - ListenConfigFieldCreated = "created" - ListenConfigFieldCreatorID = "creatorId" - ListenConfigFieldDescription = "description" - ListenConfigFieldDomains = "domains" - ListenConfigFieldEnabled = "enabled" - ListenConfigFieldExpiresAt = "expiresAt" - ListenConfigFieldGeneratedCerts = "generatedCerts" - ListenConfigFieldIssuedAt = "issuedAt" - ListenConfigFieldIssuer = "issuer" - ListenConfigFieldKey = "key" - ListenConfigFieldKeySize = "keySize" - ListenConfigFieldKnownIPs = "knownIps" - ListenConfigFieldLabels = "labels" - ListenConfigFieldMode = "mode" - ListenConfigFieldName = "name" - ListenConfigFieldOwnerReferences = "ownerReferences" - ListenConfigFieldRemoved = "removed" - ListenConfigFieldSerialNumber = "serialNumber" - ListenConfigFieldSubjectAlternativeNames = "subjectAlternativeNames" - ListenConfigFieldTOS = "tos" - ListenConfigFieldUUID = "uuid" - ListenConfigFieldVersion = "version" -) - -type ListenConfig struct { - types.Resource - Algorithm string `json:"algorithm,omitempty" yaml:"algorithm,omitempty"` - Annotations map[string]string `json:"annotations,omitempty" yaml:"annotations,omitempty"` - CACerts string `json:"caCerts,omitempty" yaml:"caCerts,omitempty"` - CN string `json:"cn,omitempty" yaml:"cn,omitempty"` - Cert string `json:"cert,omitempty" yaml:"cert,omitempty"` - CertFingerprint string `json:"certFingerprint,omitempty" yaml:"certFingerprint,omitempty"` - Created string `json:"created,omitempty" yaml:"created,omitempty"` - CreatorID string `json:"creatorId,omitempty" yaml:"creatorId,omitempty"` - Description string `json:"description,omitempty" yaml:"description,omitempty"` - Domains []string `json:"domains,omitempty" yaml:"domains,omitempty"` - Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` - ExpiresAt string `json:"expiresAt,omitempty" yaml:"expiresAt,omitempty"` - GeneratedCerts map[string]string `json:"generatedCerts,omitempty" yaml:"generatedCerts,omitempty"` - IssuedAt string `json:"issuedAt,omitempty" yaml:"issuedAt,omitempty"` - Issuer string `json:"issuer,omitempty" yaml:"issuer,omitempty"` - Key string `json:"key,omitempty" yaml:"key,omitempty"` - KeySize int64 `json:"keySize,omitempty" yaml:"keySize,omitempty"` - KnownIPs []string `json:"knownIps,omitempty" yaml:"knownIps,omitempty"` - Labels map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"` - Mode string `json:"mode,omitempty" yaml:"mode,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"` - SerialNumber string `json:"serialNumber,omitempty" yaml:"serialNumber,omitempty"` - SubjectAlternativeNames []string `json:"subjectAlternativeNames,omitempty" yaml:"subjectAlternativeNames,omitempty"` - TOS []string `json:"tos,omitempty" yaml:"tos,omitempty"` - UUID string `json:"uuid,omitempty" yaml:"uuid,omitempty"` - Version int64 `json:"version,omitempty" yaml:"version,omitempty"` -} - -type ListenConfigCollection struct { - types.Collection - Data []ListenConfig `json:"data,omitempty"` - client *ListenConfigClient -} - -type ListenConfigClient struct { - apiClient *Client -} - -type ListenConfigOperations interface { - List(opts *types.ListOpts) (*ListenConfigCollection, error) - Create(opts *ListenConfig) (*ListenConfig, error) - Update(existing *ListenConfig, updates interface{}) (*ListenConfig, error) - Replace(existing *ListenConfig) (*ListenConfig, error) - ByID(id string) (*ListenConfig, error) - Delete(container *ListenConfig) error -} - -func newListenConfigClient(apiClient *Client) *ListenConfigClient { - return &ListenConfigClient{ - apiClient: apiClient, - } -} - -func (c *ListenConfigClient) Create(container *ListenConfig) (*ListenConfig, error) { - resp := &ListenConfig{} - err := c.apiClient.Ops.DoCreate(ListenConfigType, container, resp) - return resp, err -} - -func (c *ListenConfigClient) Update(existing *ListenConfig, updates interface{}) (*ListenConfig, error) { - resp := &ListenConfig{} - err := c.apiClient.Ops.DoUpdate(ListenConfigType, &existing.Resource, updates, resp) - return resp, err -} - -func (c *ListenConfigClient) Replace(obj *ListenConfig) (*ListenConfig, error) { - resp := &ListenConfig{} - err := c.apiClient.Ops.DoReplace(ListenConfigType, &obj.Resource, obj, resp) - return resp, err -} - -func (c *ListenConfigClient) List(opts *types.ListOpts) (*ListenConfigCollection, error) { - resp := &ListenConfigCollection{} - err := c.apiClient.Ops.DoList(ListenConfigType, opts, resp) - resp.client = c - return resp, err -} - -func (cc *ListenConfigCollection) Next() (*ListenConfigCollection, error) { - if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { - resp := &ListenConfigCollection{} - err := cc.client.apiClient.Ops.DoNext(cc.Pagination.Next, resp) - resp.client = cc.client - return resp, err - } - return nil, nil -} - -func (c *ListenConfigClient) ByID(id string) (*ListenConfig, error) { - resp := &ListenConfig{} - err := c.apiClient.Ops.DoByID(ListenConfigType, id, resp) - return resp, err -} - -func (c *ListenConfigClient) Delete(container *ListenConfig) error { - return c.apiClient.Ops.DoResourceDelete(ListenConfigType, &container.Resource) -} diff --git a/compose/zz_generated_compose.go b/compose/zz_generated_compose.go index 751b28c6..fc94dfd0 100644 --- a/compose/zz_generated_compose.go +++ b/compose/zz_generated_compose.go @@ -39,7 +39,6 @@ type Config struct { Preferences map[string]managementClient.Preference `json:"preferences,omitempty" yaml:"preferences,omitempty"` ClusterLoggings map[string]managementClient.ClusterLogging `json:"clusterLoggings,omitempty" yaml:"clusterLoggings,omitempty"` ProjectLoggings map[string]managementClient.ProjectLogging `json:"projectLoggings,omitempty" yaml:"projectLoggings,omitempty"` - ListenConfigs map[string]managementClient.ListenConfig `json:"listenConfigs,omitempty" yaml:"listenConfigs,omitempty"` Settings map[string]managementClient.Setting `json:"settings,omitempty" yaml:"settings,omitempty"` Features map[string]managementClient.Feature `json:"features,omitempty" yaml:"features,omitempty"` ClusterAlerts map[string]managementClient.ClusterAlert `json:"clusterAlerts,omitempty" yaml:"clusterAlerts,omitempty"`