mirror of
https://github.com/rancher/types.git
synced 2025-09-01 13:18:20 +00:00
go generate
This commit is contained in:
@@ -140,14 +140,16 @@ func (mock *ClusterAuthTokenListerMock) ListCalls() []struct {
|
||||
}
|
||||
|
||||
var (
|
||||
lockClusterAuthTokenControllerMockAddClusterScopedHandler sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockAddHandler sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockEnqueue sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockGeneric sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockInformer sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockLister sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockStart sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockSync sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockAddClusterScopedFeatureHandler sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockAddClusterScopedHandler sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockAddFeatureHandler sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockAddHandler sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockEnqueue sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockGeneric sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockInformer sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockLister sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockStart sync.RWMutex
|
||||
lockClusterAuthTokenControllerMockSync sync.RWMutex
|
||||
)
|
||||
|
||||
// Ensure, that ClusterAuthTokenControllerMock does implement ClusterAuthTokenController.
|
||||
@@ -160,9 +162,15 @@ var _ v3.ClusterAuthTokenController = &ClusterAuthTokenControllerMock{}
|
||||
//
|
||||
// // make and configure a mocked ClusterAuthTokenController
|
||||
// mockedClusterAuthTokenController := &ClusterAuthTokenControllerMock{
|
||||
// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.ClusterAuthTokenHandlerFunc) {
|
||||
// panic("mock out the AddClusterScopedFeatureHandler method")
|
||||
// },
|
||||
// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ClusterAuthTokenHandlerFunc) {
|
||||
// panic("mock out the AddClusterScopedHandler method")
|
||||
// },
|
||||
// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.ClusterAuthTokenHandlerFunc) {
|
||||
// panic("mock out the AddFeatureHandler method")
|
||||
// },
|
||||
// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ClusterAuthTokenHandlerFunc) {
|
||||
// panic("mock out the AddHandler method")
|
||||
// },
|
||||
@@ -191,9 +199,15 @@ var _ v3.ClusterAuthTokenController = &ClusterAuthTokenControllerMock{}
|
||||
//
|
||||
// }
|
||||
type ClusterAuthTokenControllerMock struct {
|
||||
// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
|
||||
AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.ClusterAuthTokenHandlerFunc)
|
||||
|
||||
// AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method.
|
||||
AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ClusterAuthTokenHandlerFunc)
|
||||
|
||||
// AddFeatureHandlerFunc mocks the AddFeatureHandler method.
|
||||
AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.ClusterAuthTokenHandlerFunc)
|
||||
|
||||
// AddHandlerFunc mocks the AddHandler method.
|
||||
AddHandlerFunc func(ctx context.Context, name string, handler v3.ClusterAuthTokenHandlerFunc)
|
||||
|
||||
@@ -217,6 +231,19 @@ type ClusterAuthTokenControllerMock struct {
|
||||
|
||||
// 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.ClusterAuthTokenHandlerFunc
|
||||
}
|
||||
// AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method.
|
||||
AddClusterScopedHandler []struct {
|
||||
// Ctx is the ctx argument value.
|
||||
@@ -228,6 +255,17 @@ type ClusterAuthTokenControllerMock struct {
|
||||
// Handler is the handler argument value.
|
||||
Handler v3.ClusterAuthTokenHandlerFunc
|
||||
}
|
||||
// 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.ClusterAuthTokenHandlerFunc
|
||||
}
|
||||
// AddHandler holds details about calls to the AddHandler method.
|
||||
AddHandler []struct {
|
||||
// Ctx is the ctx argument value.
|
||||
@@ -268,6 +306,53 @@ type ClusterAuthTokenControllerMock struct {
|
||||
}
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc.
|
||||
func (mock *ClusterAuthTokenControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.ClusterAuthTokenHandlerFunc) {
|
||||
if mock.AddClusterScopedFeatureHandlerFunc == nil {
|
||||
panic("ClusterAuthTokenControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but ClusterAuthTokenController.AddClusterScopedFeatureHandler was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Handler v3.ClusterAuthTokenHandlerFunc
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
ClusterName: clusterName,
|
||||
Handler: handler,
|
||||
}
|
||||
lockClusterAuthTokenControllerMockAddClusterScopedFeatureHandler.Lock()
|
||||
mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo)
|
||||
lockClusterAuthTokenControllerMockAddClusterScopedFeatureHandler.Unlock()
|
||||
mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, handler)
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler.
|
||||
// Check the length with:
|
||||
// len(mockedClusterAuthTokenController.AddClusterScopedFeatureHandlerCalls())
|
||||
func (mock *ClusterAuthTokenControllerMock) AddClusterScopedFeatureHandlerCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Handler v3.ClusterAuthTokenHandlerFunc
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Handler v3.ClusterAuthTokenHandlerFunc
|
||||
}
|
||||
lockClusterAuthTokenControllerMockAddClusterScopedFeatureHandler.RLock()
|
||||
calls = mock.calls.AddClusterScopedFeatureHandler
|
||||
lockClusterAuthTokenControllerMockAddClusterScopedFeatureHandler.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddClusterScopedHandler calls AddClusterScopedHandlerFunc.
|
||||
func (mock *ClusterAuthTokenControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ClusterAuthTokenHandlerFunc) {
|
||||
if mock.AddClusterScopedHandlerFunc == nil {
|
||||
@@ -311,6 +396,49 @@ func (mock *ClusterAuthTokenControllerMock) AddClusterScopedHandlerCalls() []str
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddFeatureHandler calls AddFeatureHandlerFunc.
|
||||
func (mock *ClusterAuthTokenControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.ClusterAuthTokenHandlerFunc) {
|
||||
if mock.AddFeatureHandlerFunc == nil {
|
||||
panic("ClusterAuthTokenControllerMock.AddFeatureHandlerFunc: method is nil but ClusterAuthTokenController.AddFeatureHandler was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3.ClusterAuthTokenHandlerFunc
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
Sync: sync,
|
||||
}
|
||||
lockClusterAuthTokenControllerMockAddFeatureHandler.Lock()
|
||||
mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo)
|
||||
lockClusterAuthTokenControllerMockAddFeatureHandler.Unlock()
|
||||
mock.AddFeatureHandlerFunc(ctx, enabled, name, sync)
|
||||
}
|
||||
|
||||
// AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler.
|
||||
// Check the length with:
|
||||
// len(mockedClusterAuthTokenController.AddFeatureHandlerCalls())
|
||||
func (mock *ClusterAuthTokenControllerMock) AddFeatureHandlerCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3.ClusterAuthTokenHandlerFunc
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3.ClusterAuthTokenHandlerFunc
|
||||
}
|
||||
lockClusterAuthTokenControllerMockAddFeatureHandler.RLock()
|
||||
calls = mock.calls.AddFeatureHandler
|
||||
lockClusterAuthTokenControllerMockAddFeatureHandler.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddHandler calls AddHandlerFunc.
|
||||
func (mock *ClusterAuthTokenControllerMock) AddHandler(ctx context.Context, name string, handler v3.ClusterAuthTokenHandlerFunc) {
|
||||
if mock.AddHandlerFunc == nil {
|
||||
@@ -530,21 +658,25 @@ func (mock *ClusterAuthTokenControllerMock) SyncCalls() []struct {
|
||||
}
|
||||
|
||||
var (
|
||||
lockClusterAuthTokenInterfaceMockAddClusterScopedHandler sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockAddClusterScopedLifecycle sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockAddHandler sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockAddLifecycle sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockController sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockCreate sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockDelete sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockDeleteCollection sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockDeleteNamespaced sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockGet sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockGetNamespaced sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockList sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockObjectClient sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockUpdate sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockWatch sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockAddClusterScopedHandler sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockAddClusterScopedLifecycle sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockAddFeatureHandler sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockAddFeatureLifecycle sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockAddHandler sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockAddLifecycle sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockController sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockCreate sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockDelete sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockDeleteCollection sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockDeleteNamespaced sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockGet sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockGetNamespaced sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockList sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockObjectClient sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockUpdate sync.RWMutex
|
||||
lockClusterAuthTokenInterfaceMockWatch sync.RWMutex
|
||||
)
|
||||
|
||||
// Ensure, that ClusterAuthTokenInterfaceMock does implement ClusterAuthTokenInterface.
|
||||
@@ -557,12 +689,24 @@ var _ v3.ClusterAuthTokenInterface = &ClusterAuthTokenInterfaceMock{}
|
||||
//
|
||||
// // make and configure a mocked ClusterAuthTokenInterface
|
||||
// mockedClusterAuthTokenInterface := &ClusterAuthTokenInterfaceMock{
|
||||
// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.ClusterAuthTokenHandlerFunc) {
|
||||
// panic("mock out the AddClusterScopedFeatureHandler method")
|
||||
// },
|
||||
// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.ClusterAuthTokenLifecycle) {
|
||||
// panic("mock out the AddClusterScopedFeatureLifecycle method")
|
||||
// },
|
||||
// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ClusterAuthTokenHandlerFunc) {
|
||||
// panic("mock out the AddClusterScopedHandler method")
|
||||
// },
|
||||
// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterAuthTokenLifecycle) {
|
||||
// panic("mock out the AddClusterScopedLifecycle method")
|
||||
// },
|
||||
// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.ClusterAuthTokenHandlerFunc) {
|
||||
// panic("mock out the AddFeatureHandler method")
|
||||
// },
|
||||
// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3.ClusterAuthTokenLifecycle) {
|
||||
// panic("mock out the AddFeatureLifecycle method")
|
||||
// },
|
||||
// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ClusterAuthTokenHandlerFunc) {
|
||||
// panic("mock out the AddHandler method")
|
||||
// },
|
||||
@@ -609,12 +753,24 @@ var _ v3.ClusterAuthTokenInterface = &ClusterAuthTokenInterfaceMock{}
|
||||
//
|
||||
// }
|
||||
type ClusterAuthTokenInterfaceMock struct {
|
||||
// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
|
||||
AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.ClusterAuthTokenHandlerFunc)
|
||||
|
||||
// AddClusterScopedFeatureLifecycleFunc mocks the AddClusterScopedFeatureLifecycle method.
|
||||
AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.ClusterAuthTokenLifecycle)
|
||||
|
||||
// AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method.
|
||||
AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ClusterAuthTokenHandlerFunc)
|
||||
|
||||
// AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method.
|
||||
AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterAuthTokenLifecycle)
|
||||
|
||||
// AddFeatureHandlerFunc mocks the AddFeatureHandler method.
|
||||
AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.ClusterAuthTokenHandlerFunc)
|
||||
|
||||
// AddFeatureLifecycleFunc mocks the AddFeatureLifecycle method.
|
||||
AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3.ClusterAuthTokenLifecycle)
|
||||
|
||||
// AddHandlerFunc mocks the AddHandler method.
|
||||
AddHandlerFunc func(ctx context.Context, name string, sync v3.ClusterAuthTokenHandlerFunc)
|
||||
|
||||
@@ -656,6 +812,32 @@ type ClusterAuthTokenInterfaceMock struct {
|
||||
|
||||
// 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.ClusterAuthTokenHandlerFunc
|
||||
}
|
||||
// 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.ClusterAuthTokenLifecycle
|
||||
}
|
||||
// AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method.
|
||||
AddClusterScopedHandler []struct {
|
||||
// Ctx is the ctx argument value.
|
||||
@@ -678,6 +860,28 @@ type ClusterAuthTokenInterfaceMock struct {
|
||||
// Lifecycle is the lifecycle argument value.
|
||||
Lifecycle v3.ClusterAuthTokenLifecycle
|
||||
}
|
||||
// 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.ClusterAuthTokenHandlerFunc
|
||||
}
|
||||
// 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.ClusterAuthTokenLifecycle
|
||||
}
|
||||
// AddHandler holds details about calls to the AddHandler method.
|
||||
AddHandler []struct {
|
||||
// Ctx is the ctx argument value.
|
||||
@@ -764,6 +968,100 @@ type ClusterAuthTokenInterfaceMock struct {
|
||||
}
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc.
|
||||
func (mock *ClusterAuthTokenInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.ClusterAuthTokenHandlerFunc) {
|
||||
if mock.AddClusterScopedFeatureHandlerFunc == nil {
|
||||
panic("ClusterAuthTokenInterfaceMock.AddClusterScopedFeatureHandlerFunc: method is nil but ClusterAuthTokenInterface.AddClusterScopedFeatureHandler was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Sync v3.ClusterAuthTokenHandlerFunc
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
ClusterName: clusterName,
|
||||
Sync: sync,
|
||||
}
|
||||
lockClusterAuthTokenInterfaceMockAddClusterScopedFeatureHandler.Lock()
|
||||
mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo)
|
||||
lockClusterAuthTokenInterfaceMockAddClusterScopedFeatureHandler.Unlock()
|
||||
mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, sync)
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler.
|
||||
// Check the length with:
|
||||
// len(mockedClusterAuthTokenInterface.AddClusterScopedFeatureHandlerCalls())
|
||||
func (mock *ClusterAuthTokenInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Sync v3.ClusterAuthTokenHandlerFunc
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Sync v3.ClusterAuthTokenHandlerFunc
|
||||
}
|
||||
lockClusterAuthTokenInterfaceMockAddClusterScopedFeatureHandler.RLock()
|
||||
calls = mock.calls.AddClusterScopedFeatureHandler
|
||||
lockClusterAuthTokenInterfaceMockAddClusterScopedFeatureHandler.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc.
|
||||
func (mock *ClusterAuthTokenInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.ClusterAuthTokenLifecycle) {
|
||||
if mock.AddClusterScopedFeatureLifecycleFunc == nil {
|
||||
panic("ClusterAuthTokenInterfaceMock.AddClusterScopedFeatureLifecycleFunc: method is nil but ClusterAuthTokenInterface.AddClusterScopedFeatureLifecycle was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Lifecycle v3.ClusterAuthTokenLifecycle
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
ClusterName: clusterName,
|
||||
Lifecycle: lifecycle,
|
||||
}
|
||||
lockClusterAuthTokenInterfaceMockAddClusterScopedFeatureLifecycle.Lock()
|
||||
mock.calls.AddClusterScopedFeatureLifecycle = append(mock.calls.AddClusterScopedFeatureLifecycle, callInfo)
|
||||
lockClusterAuthTokenInterfaceMockAddClusterScopedFeatureLifecycle.Unlock()
|
||||
mock.AddClusterScopedFeatureLifecycleFunc(ctx, enabled, name, clusterName, lifecycle)
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureLifecycleCalls gets all the calls that were made to AddClusterScopedFeatureLifecycle.
|
||||
// Check the length with:
|
||||
// len(mockedClusterAuthTokenInterface.AddClusterScopedFeatureLifecycleCalls())
|
||||
func (mock *ClusterAuthTokenInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Lifecycle v3.ClusterAuthTokenLifecycle
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Lifecycle v3.ClusterAuthTokenLifecycle
|
||||
}
|
||||
lockClusterAuthTokenInterfaceMockAddClusterScopedFeatureLifecycle.RLock()
|
||||
calls = mock.calls.AddClusterScopedFeatureLifecycle
|
||||
lockClusterAuthTokenInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddClusterScopedHandler calls AddClusterScopedHandlerFunc.
|
||||
func (mock *ClusterAuthTokenInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ClusterAuthTokenHandlerFunc) {
|
||||
if mock.AddClusterScopedHandlerFunc == nil {
|
||||
@@ -850,6 +1148,92 @@ func (mock *ClusterAuthTokenInterfaceMock) AddClusterScopedLifecycleCalls() []st
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddFeatureHandler calls AddFeatureHandlerFunc.
|
||||
func (mock *ClusterAuthTokenInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.ClusterAuthTokenHandlerFunc) {
|
||||
if mock.AddFeatureHandlerFunc == nil {
|
||||
panic("ClusterAuthTokenInterfaceMock.AddFeatureHandlerFunc: method is nil but ClusterAuthTokenInterface.AddFeatureHandler was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3.ClusterAuthTokenHandlerFunc
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
Sync: sync,
|
||||
}
|
||||
lockClusterAuthTokenInterfaceMockAddFeatureHandler.Lock()
|
||||
mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo)
|
||||
lockClusterAuthTokenInterfaceMockAddFeatureHandler.Unlock()
|
||||
mock.AddFeatureHandlerFunc(ctx, enabled, name, sync)
|
||||
}
|
||||
|
||||
// AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler.
|
||||
// Check the length with:
|
||||
// len(mockedClusterAuthTokenInterface.AddFeatureHandlerCalls())
|
||||
func (mock *ClusterAuthTokenInterfaceMock) AddFeatureHandlerCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3.ClusterAuthTokenHandlerFunc
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3.ClusterAuthTokenHandlerFunc
|
||||
}
|
||||
lockClusterAuthTokenInterfaceMockAddFeatureHandler.RLock()
|
||||
calls = mock.calls.AddFeatureHandler
|
||||
lockClusterAuthTokenInterfaceMockAddFeatureHandler.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddFeatureLifecycle calls AddFeatureLifecycleFunc.
|
||||
func (mock *ClusterAuthTokenInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v3.ClusterAuthTokenLifecycle) {
|
||||
if mock.AddFeatureLifecycleFunc == nil {
|
||||
panic("ClusterAuthTokenInterfaceMock.AddFeatureLifecycleFunc: method is nil but ClusterAuthTokenInterface.AddFeatureLifecycle was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Lifecycle v3.ClusterAuthTokenLifecycle
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
Lifecycle: lifecycle,
|
||||
}
|
||||
lockClusterAuthTokenInterfaceMockAddFeatureLifecycle.Lock()
|
||||
mock.calls.AddFeatureLifecycle = append(mock.calls.AddFeatureLifecycle, callInfo)
|
||||
lockClusterAuthTokenInterfaceMockAddFeatureLifecycle.Unlock()
|
||||
mock.AddFeatureLifecycleFunc(ctx, enabled, name, lifecycle)
|
||||
}
|
||||
|
||||
// AddFeatureLifecycleCalls gets all the calls that were made to AddFeatureLifecycle.
|
||||
// Check the length with:
|
||||
// len(mockedClusterAuthTokenInterface.AddFeatureLifecycleCalls())
|
||||
func (mock *ClusterAuthTokenInterfaceMock) AddFeatureLifecycleCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Lifecycle v3.ClusterAuthTokenLifecycle
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Lifecycle v3.ClusterAuthTokenLifecycle
|
||||
}
|
||||
lockClusterAuthTokenInterfaceMockAddFeatureLifecycle.RLock()
|
||||
calls = mock.calls.AddFeatureLifecycle
|
||||
lockClusterAuthTokenInterfaceMockAddFeatureLifecycle.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddHandler calls AddHandlerFunc.
|
||||
func (mock *ClusterAuthTokenInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ClusterAuthTokenHandlerFunc) {
|
||||
if mock.AddHandlerFunc == nil {
|
||||
|
@@ -140,14 +140,16 @@ func (mock *ClusterUserAttributeListerMock) ListCalls() []struct {
|
||||
}
|
||||
|
||||
var (
|
||||
lockClusterUserAttributeControllerMockAddClusterScopedHandler sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockAddHandler sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockEnqueue sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockGeneric sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockInformer sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockLister sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockStart sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockSync sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockAddClusterScopedFeatureHandler sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockAddClusterScopedHandler sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockAddFeatureHandler sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockAddHandler sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockEnqueue sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockGeneric sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockInformer sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockLister sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockStart sync.RWMutex
|
||||
lockClusterUserAttributeControllerMockSync sync.RWMutex
|
||||
)
|
||||
|
||||
// Ensure, that ClusterUserAttributeControllerMock does implement ClusterUserAttributeController.
|
||||
@@ -160,9 +162,15 @@ var _ v3.ClusterUserAttributeController = &ClusterUserAttributeControllerMock{}
|
||||
//
|
||||
// // make and configure a mocked ClusterUserAttributeController
|
||||
// mockedClusterUserAttributeController := &ClusterUserAttributeControllerMock{
|
||||
// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.ClusterUserAttributeHandlerFunc) {
|
||||
// panic("mock out the AddClusterScopedFeatureHandler method")
|
||||
// },
|
||||
// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3.ClusterUserAttributeHandlerFunc) {
|
||||
// panic("mock out the AddClusterScopedHandler method")
|
||||
// },
|
||||
// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.ClusterUserAttributeHandlerFunc) {
|
||||
// panic("mock out the AddFeatureHandler method")
|
||||
// },
|
||||
// AddHandlerFunc: func(ctx context.Context, name string, handler v3.ClusterUserAttributeHandlerFunc) {
|
||||
// panic("mock out the AddHandler method")
|
||||
// },
|
||||
@@ -191,9 +199,15 @@ var _ v3.ClusterUserAttributeController = &ClusterUserAttributeControllerMock{}
|
||||
//
|
||||
// }
|
||||
type ClusterUserAttributeControllerMock struct {
|
||||
// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
|
||||
AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.ClusterUserAttributeHandlerFunc)
|
||||
|
||||
// AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method.
|
||||
AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3.ClusterUserAttributeHandlerFunc)
|
||||
|
||||
// AddFeatureHandlerFunc mocks the AddFeatureHandler method.
|
||||
AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.ClusterUserAttributeHandlerFunc)
|
||||
|
||||
// AddHandlerFunc mocks the AddHandler method.
|
||||
AddHandlerFunc func(ctx context.Context, name string, handler v3.ClusterUserAttributeHandlerFunc)
|
||||
|
||||
@@ -217,6 +231,19 @@ type ClusterUserAttributeControllerMock struct {
|
||||
|
||||
// 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.ClusterUserAttributeHandlerFunc
|
||||
}
|
||||
// AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method.
|
||||
AddClusterScopedHandler []struct {
|
||||
// Ctx is the ctx argument value.
|
||||
@@ -228,6 +255,17 @@ type ClusterUserAttributeControllerMock struct {
|
||||
// Handler is the handler argument value.
|
||||
Handler v3.ClusterUserAttributeHandlerFunc
|
||||
}
|
||||
// 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.ClusterUserAttributeHandlerFunc
|
||||
}
|
||||
// AddHandler holds details about calls to the AddHandler method.
|
||||
AddHandler []struct {
|
||||
// Ctx is the ctx argument value.
|
||||
@@ -268,6 +306,53 @@ type ClusterUserAttributeControllerMock struct {
|
||||
}
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc.
|
||||
func (mock *ClusterUserAttributeControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3.ClusterUserAttributeHandlerFunc) {
|
||||
if mock.AddClusterScopedFeatureHandlerFunc == nil {
|
||||
panic("ClusterUserAttributeControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but ClusterUserAttributeController.AddClusterScopedFeatureHandler was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Handler v3.ClusterUserAttributeHandlerFunc
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
ClusterName: clusterName,
|
||||
Handler: handler,
|
||||
}
|
||||
lockClusterUserAttributeControllerMockAddClusterScopedFeatureHandler.Lock()
|
||||
mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo)
|
||||
lockClusterUserAttributeControllerMockAddClusterScopedFeatureHandler.Unlock()
|
||||
mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, handler)
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler.
|
||||
// Check the length with:
|
||||
// len(mockedClusterUserAttributeController.AddClusterScopedFeatureHandlerCalls())
|
||||
func (mock *ClusterUserAttributeControllerMock) AddClusterScopedFeatureHandlerCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Handler v3.ClusterUserAttributeHandlerFunc
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Handler v3.ClusterUserAttributeHandlerFunc
|
||||
}
|
||||
lockClusterUserAttributeControllerMockAddClusterScopedFeatureHandler.RLock()
|
||||
calls = mock.calls.AddClusterScopedFeatureHandler
|
||||
lockClusterUserAttributeControllerMockAddClusterScopedFeatureHandler.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddClusterScopedHandler calls AddClusterScopedHandlerFunc.
|
||||
func (mock *ClusterUserAttributeControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3.ClusterUserAttributeHandlerFunc) {
|
||||
if mock.AddClusterScopedHandlerFunc == nil {
|
||||
@@ -311,6 +396,49 @@ func (mock *ClusterUserAttributeControllerMock) AddClusterScopedHandlerCalls() [
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddFeatureHandler calls AddFeatureHandlerFunc.
|
||||
func (mock *ClusterUserAttributeControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.ClusterUserAttributeHandlerFunc) {
|
||||
if mock.AddFeatureHandlerFunc == nil {
|
||||
panic("ClusterUserAttributeControllerMock.AddFeatureHandlerFunc: method is nil but ClusterUserAttributeController.AddFeatureHandler was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3.ClusterUserAttributeHandlerFunc
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
Sync: sync,
|
||||
}
|
||||
lockClusterUserAttributeControllerMockAddFeatureHandler.Lock()
|
||||
mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo)
|
||||
lockClusterUserAttributeControllerMockAddFeatureHandler.Unlock()
|
||||
mock.AddFeatureHandlerFunc(ctx, enabled, name, sync)
|
||||
}
|
||||
|
||||
// AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler.
|
||||
// Check the length with:
|
||||
// len(mockedClusterUserAttributeController.AddFeatureHandlerCalls())
|
||||
func (mock *ClusterUserAttributeControllerMock) AddFeatureHandlerCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3.ClusterUserAttributeHandlerFunc
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3.ClusterUserAttributeHandlerFunc
|
||||
}
|
||||
lockClusterUserAttributeControllerMockAddFeatureHandler.RLock()
|
||||
calls = mock.calls.AddFeatureHandler
|
||||
lockClusterUserAttributeControllerMockAddFeatureHandler.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddHandler calls AddHandlerFunc.
|
||||
func (mock *ClusterUserAttributeControllerMock) AddHandler(ctx context.Context, name string, handler v3.ClusterUserAttributeHandlerFunc) {
|
||||
if mock.AddHandlerFunc == nil {
|
||||
@@ -530,21 +658,25 @@ func (mock *ClusterUserAttributeControllerMock) SyncCalls() []struct {
|
||||
}
|
||||
|
||||
var (
|
||||
lockClusterUserAttributeInterfaceMockAddClusterScopedHandler sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockAddClusterScopedLifecycle sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockAddHandler sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockAddLifecycle sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockController sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockCreate sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockDelete sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockDeleteCollection sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockDeleteNamespaced sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockGet sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockGetNamespaced sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockList sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockObjectClient sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockUpdate sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockWatch sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockAddClusterScopedHandler sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockAddClusterScopedLifecycle sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockAddFeatureHandler sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockAddFeatureLifecycle sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockAddHandler sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockAddLifecycle sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockController sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockCreate sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockDelete sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockDeleteCollection sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockDeleteNamespaced sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockGet sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockGetNamespaced sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockList sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockObjectClient sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockUpdate sync.RWMutex
|
||||
lockClusterUserAttributeInterfaceMockWatch sync.RWMutex
|
||||
)
|
||||
|
||||
// Ensure, that ClusterUserAttributeInterfaceMock does implement ClusterUserAttributeInterface.
|
||||
@@ -557,12 +689,24 @@ var _ v3.ClusterUserAttributeInterface = &ClusterUserAttributeInterfaceMock{}
|
||||
//
|
||||
// // make and configure a mocked ClusterUserAttributeInterface
|
||||
// mockedClusterUserAttributeInterface := &ClusterUserAttributeInterfaceMock{
|
||||
// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.ClusterUserAttributeHandlerFunc) {
|
||||
// panic("mock out the AddClusterScopedFeatureHandler method")
|
||||
// },
|
||||
// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.ClusterUserAttributeLifecycle) {
|
||||
// panic("mock out the AddClusterScopedFeatureLifecycle method")
|
||||
// },
|
||||
// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3.ClusterUserAttributeHandlerFunc) {
|
||||
// panic("mock out the AddClusterScopedHandler method")
|
||||
// },
|
||||
// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterUserAttributeLifecycle) {
|
||||
// panic("mock out the AddClusterScopedLifecycle method")
|
||||
// },
|
||||
// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3.ClusterUserAttributeHandlerFunc) {
|
||||
// panic("mock out the AddFeatureHandler method")
|
||||
// },
|
||||
// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3.ClusterUserAttributeLifecycle) {
|
||||
// panic("mock out the AddFeatureLifecycle method")
|
||||
// },
|
||||
// AddHandlerFunc: func(ctx context.Context, name string, sync v3.ClusterUserAttributeHandlerFunc) {
|
||||
// panic("mock out the AddHandler method")
|
||||
// },
|
||||
@@ -609,12 +753,24 @@ var _ v3.ClusterUserAttributeInterface = &ClusterUserAttributeInterfaceMock{}
|
||||
//
|
||||
// }
|
||||
type ClusterUserAttributeInterfaceMock struct {
|
||||
// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
|
||||
AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.ClusterUserAttributeHandlerFunc)
|
||||
|
||||
// AddClusterScopedFeatureLifecycleFunc mocks the AddClusterScopedFeatureLifecycle method.
|
||||
AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.ClusterUserAttributeLifecycle)
|
||||
|
||||
// AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method.
|
||||
AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3.ClusterUserAttributeHandlerFunc)
|
||||
|
||||
// AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method.
|
||||
AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3.ClusterUserAttributeLifecycle)
|
||||
|
||||
// AddFeatureHandlerFunc mocks the AddFeatureHandler method.
|
||||
AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3.ClusterUserAttributeHandlerFunc)
|
||||
|
||||
// AddFeatureLifecycleFunc mocks the AddFeatureLifecycle method.
|
||||
AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3.ClusterUserAttributeLifecycle)
|
||||
|
||||
// AddHandlerFunc mocks the AddHandler method.
|
||||
AddHandlerFunc func(ctx context.Context, name string, sync v3.ClusterUserAttributeHandlerFunc)
|
||||
|
||||
@@ -656,6 +812,32 @@ type ClusterUserAttributeInterfaceMock struct {
|
||||
|
||||
// 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.ClusterUserAttributeHandlerFunc
|
||||
}
|
||||
// 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.ClusterUserAttributeLifecycle
|
||||
}
|
||||
// AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method.
|
||||
AddClusterScopedHandler []struct {
|
||||
// Ctx is the ctx argument value.
|
||||
@@ -678,6 +860,28 @@ type ClusterUserAttributeInterfaceMock struct {
|
||||
// Lifecycle is the lifecycle argument value.
|
||||
Lifecycle v3.ClusterUserAttributeLifecycle
|
||||
}
|
||||
// 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.ClusterUserAttributeHandlerFunc
|
||||
}
|
||||
// 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.ClusterUserAttributeLifecycle
|
||||
}
|
||||
// AddHandler holds details about calls to the AddHandler method.
|
||||
AddHandler []struct {
|
||||
// Ctx is the ctx argument value.
|
||||
@@ -764,6 +968,100 @@ type ClusterUserAttributeInterfaceMock struct {
|
||||
}
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc.
|
||||
func (mock *ClusterUserAttributeInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3.ClusterUserAttributeHandlerFunc) {
|
||||
if mock.AddClusterScopedFeatureHandlerFunc == nil {
|
||||
panic("ClusterUserAttributeInterfaceMock.AddClusterScopedFeatureHandlerFunc: method is nil but ClusterUserAttributeInterface.AddClusterScopedFeatureHandler was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Sync v3.ClusterUserAttributeHandlerFunc
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
ClusterName: clusterName,
|
||||
Sync: sync,
|
||||
}
|
||||
lockClusterUserAttributeInterfaceMockAddClusterScopedFeatureHandler.Lock()
|
||||
mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo)
|
||||
lockClusterUserAttributeInterfaceMockAddClusterScopedFeatureHandler.Unlock()
|
||||
mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, sync)
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler.
|
||||
// Check the length with:
|
||||
// len(mockedClusterUserAttributeInterface.AddClusterScopedFeatureHandlerCalls())
|
||||
func (mock *ClusterUserAttributeInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Sync v3.ClusterUserAttributeHandlerFunc
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Sync v3.ClusterUserAttributeHandlerFunc
|
||||
}
|
||||
lockClusterUserAttributeInterfaceMockAddClusterScopedFeatureHandler.RLock()
|
||||
calls = mock.calls.AddClusterScopedFeatureHandler
|
||||
lockClusterUserAttributeInterfaceMockAddClusterScopedFeatureHandler.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc.
|
||||
func (mock *ClusterUserAttributeInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3.ClusterUserAttributeLifecycle) {
|
||||
if mock.AddClusterScopedFeatureLifecycleFunc == nil {
|
||||
panic("ClusterUserAttributeInterfaceMock.AddClusterScopedFeatureLifecycleFunc: method is nil but ClusterUserAttributeInterface.AddClusterScopedFeatureLifecycle was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Lifecycle v3.ClusterUserAttributeLifecycle
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
ClusterName: clusterName,
|
||||
Lifecycle: lifecycle,
|
||||
}
|
||||
lockClusterUserAttributeInterfaceMockAddClusterScopedFeatureLifecycle.Lock()
|
||||
mock.calls.AddClusterScopedFeatureLifecycle = append(mock.calls.AddClusterScopedFeatureLifecycle, callInfo)
|
||||
lockClusterUserAttributeInterfaceMockAddClusterScopedFeatureLifecycle.Unlock()
|
||||
mock.AddClusterScopedFeatureLifecycleFunc(ctx, enabled, name, clusterName, lifecycle)
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureLifecycleCalls gets all the calls that were made to AddClusterScopedFeatureLifecycle.
|
||||
// Check the length with:
|
||||
// len(mockedClusterUserAttributeInterface.AddClusterScopedFeatureLifecycleCalls())
|
||||
func (mock *ClusterUserAttributeInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Lifecycle v3.ClusterUserAttributeLifecycle
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Lifecycle v3.ClusterUserAttributeLifecycle
|
||||
}
|
||||
lockClusterUserAttributeInterfaceMockAddClusterScopedFeatureLifecycle.RLock()
|
||||
calls = mock.calls.AddClusterScopedFeatureLifecycle
|
||||
lockClusterUserAttributeInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddClusterScopedHandler calls AddClusterScopedHandlerFunc.
|
||||
func (mock *ClusterUserAttributeInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3.ClusterUserAttributeHandlerFunc) {
|
||||
if mock.AddClusterScopedHandlerFunc == nil {
|
||||
@@ -850,6 +1148,92 @@ func (mock *ClusterUserAttributeInterfaceMock) AddClusterScopedLifecycleCalls()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddFeatureHandler calls AddFeatureHandlerFunc.
|
||||
func (mock *ClusterUserAttributeInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3.ClusterUserAttributeHandlerFunc) {
|
||||
if mock.AddFeatureHandlerFunc == nil {
|
||||
panic("ClusterUserAttributeInterfaceMock.AddFeatureHandlerFunc: method is nil but ClusterUserAttributeInterface.AddFeatureHandler was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3.ClusterUserAttributeHandlerFunc
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
Sync: sync,
|
||||
}
|
||||
lockClusterUserAttributeInterfaceMockAddFeatureHandler.Lock()
|
||||
mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo)
|
||||
lockClusterUserAttributeInterfaceMockAddFeatureHandler.Unlock()
|
||||
mock.AddFeatureHandlerFunc(ctx, enabled, name, sync)
|
||||
}
|
||||
|
||||
// AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler.
|
||||
// Check the length with:
|
||||
// len(mockedClusterUserAttributeInterface.AddFeatureHandlerCalls())
|
||||
func (mock *ClusterUserAttributeInterfaceMock) AddFeatureHandlerCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3.ClusterUserAttributeHandlerFunc
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3.ClusterUserAttributeHandlerFunc
|
||||
}
|
||||
lockClusterUserAttributeInterfaceMockAddFeatureHandler.RLock()
|
||||
calls = mock.calls.AddFeatureHandler
|
||||
lockClusterUserAttributeInterfaceMockAddFeatureHandler.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddFeatureLifecycle calls AddFeatureLifecycleFunc.
|
||||
func (mock *ClusterUserAttributeInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v3.ClusterUserAttributeLifecycle) {
|
||||
if mock.AddFeatureLifecycleFunc == nil {
|
||||
panic("ClusterUserAttributeInterfaceMock.AddFeatureLifecycleFunc: method is nil but ClusterUserAttributeInterface.AddFeatureLifecycle was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Lifecycle v3.ClusterUserAttributeLifecycle
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
Lifecycle: lifecycle,
|
||||
}
|
||||
lockClusterUserAttributeInterfaceMockAddFeatureLifecycle.Lock()
|
||||
mock.calls.AddFeatureLifecycle = append(mock.calls.AddFeatureLifecycle, callInfo)
|
||||
lockClusterUserAttributeInterfaceMockAddFeatureLifecycle.Unlock()
|
||||
mock.AddFeatureLifecycleFunc(ctx, enabled, name, lifecycle)
|
||||
}
|
||||
|
||||
// AddFeatureLifecycleCalls gets all the calls that were made to AddFeatureLifecycle.
|
||||
// Check the length with:
|
||||
// len(mockedClusterUserAttributeInterface.AddFeatureLifecycleCalls())
|
||||
func (mock *ClusterUserAttributeInterfaceMock) AddFeatureLifecycleCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Lifecycle v3.ClusterUserAttributeLifecycle
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Lifecycle v3.ClusterUserAttributeLifecycle
|
||||
}
|
||||
lockClusterUserAttributeInterfaceMockAddFeatureLifecycle.RLock()
|
||||
calls = mock.calls.AddFeatureLifecycle
|
||||
lockClusterUserAttributeInterfaceMockAddFeatureLifecycle.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddHandler calls AddHandlerFunc.
|
||||
func (mock *ClusterUserAttributeInterfaceMock) AddHandler(ctx context.Context, name string, sync v3.ClusterUserAttributeHandlerFunc) {
|
||||
if mock.AddHandlerFunc == nil {
|
||||
|
@@ -68,7 +68,9 @@ type ClusterAuthTokenController interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() ClusterAuthTokenLister
|
||||
AddHandler(ctx context.Context, name string, handler ClusterAuthTokenHandlerFunc)
|
||||
AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync ClusterAuthTokenHandlerFunc)
|
||||
AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler ClusterAuthTokenHandlerFunc)
|
||||
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterAuthTokenHandlerFunc)
|
||||
Enqueue(namespace, name string)
|
||||
Sync(ctx context.Context) error
|
||||
Start(ctx context.Context, threadiness int) error
|
||||
@@ -87,9 +89,13 @@ type ClusterAuthTokenInterface interface {
|
||||
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Controller() ClusterAuthTokenController
|
||||
AddHandler(ctx context.Context, name string, sync ClusterAuthTokenHandlerFunc)
|
||||
AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync ClusterAuthTokenHandlerFunc)
|
||||
AddLifecycle(ctx context.Context, name string, lifecycle ClusterAuthTokenLifecycle)
|
||||
AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle ClusterAuthTokenLifecycle)
|
||||
AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync ClusterAuthTokenHandlerFunc)
|
||||
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync ClusterAuthTokenHandlerFunc)
|
||||
AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle ClusterAuthTokenLifecycle)
|
||||
AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle ClusterAuthTokenLifecycle)
|
||||
}
|
||||
|
||||
type clusterAuthTokenLister struct {
|
||||
@@ -149,6 +155,20 @@ func (c *clusterAuthTokenController) AddHandler(ctx context.Context, name string
|
||||
})
|
||||
}
|
||||
|
||||
func (c *clusterAuthTokenController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler ClusterAuthTokenHandlerFunc) {
|
||||
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.(*ClusterAuthToken); ok {
|
||||
return handler(key, v)
|
||||
} else {
|
||||
return nil, nil
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func (c *clusterAuthTokenController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler ClusterAuthTokenHandlerFunc) {
|
||||
resource.PutClusterScoped(ClusterAuthTokenGroupVersionResource)
|
||||
c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) {
|
||||
@@ -162,6 +182,21 @@ func (c *clusterAuthTokenController) AddClusterScopedHandler(ctx context.Context
|
||||
})
|
||||
}
|
||||
|
||||
func (c *clusterAuthTokenController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler ClusterAuthTokenHandlerFunc) {
|
||||
resource.PutClusterScoped(ClusterAuthTokenGroupVersionResource)
|
||||
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.(*ClusterAuthToken); ok && controller.ObjectInCluster(cluster, obj) {
|
||||
return handler(key, v)
|
||||
} else {
|
||||
return nil, nil
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
type clusterAuthTokenFactory struct {
|
||||
}
|
||||
|
||||
@@ -257,20 +292,38 @@ func (s *clusterAuthTokenClient) AddHandler(ctx context.Context, name string, sy
|
||||
s.Controller().AddHandler(ctx, name, sync)
|
||||
}
|
||||
|
||||
func (s *clusterAuthTokenClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync ClusterAuthTokenHandlerFunc) {
|
||||
s.Controller().AddFeatureHandler(ctx, enabled, name, sync)
|
||||
}
|
||||
|
||||
func (s *clusterAuthTokenClient) AddLifecycle(ctx context.Context, name string, lifecycle ClusterAuthTokenLifecycle) {
|
||||
sync := NewClusterAuthTokenLifecycleAdapter(name, false, s, lifecycle)
|
||||
s.Controller().AddHandler(ctx, name, sync)
|
||||
}
|
||||
|
||||
func (s *clusterAuthTokenClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle ClusterAuthTokenLifecycle) {
|
||||
sync := NewClusterAuthTokenLifecycleAdapter(name, false, s, lifecycle)
|
||||
s.Controller().AddFeatureHandler(ctx, enabled, name, sync)
|
||||
}
|
||||
|
||||
func (s *clusterAuthTokenClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync ClusterAuthTokenHandlerFunc) {
|
||||
s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync)
|
||||
}
|
||||
|
||||
func (s *clusterAuthTokenClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync ClusterAuthTokenHandlerFunc) {
|
||||
s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync)
|
||||
}
|
||||
|
||||
func (s *clusterAuthTokenClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle ClusterAuthTokenLifecycle) {
|
||||
sync := NewClusterAuthTokenLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle)
|
||||
s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync)
|
||||
}
|
||||
|
||||
func (s *clusterAuthTokenClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle ClusterAuthTokenLifecycle) {
|
||||
sync := NewClusterAuthTokenLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle)
|
||||
s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync)
|
||||
}
|
||||
|
||||
type ClusterAuthTokenIndexer func(obj *ClusterAuthToken) ([]string, error)
|
||||
|
||||
type ClusterAuthTokenClientCache interface {
|
||||
|
@@ -68,7 +68,9 @@ type ClusterUserAttributeController interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() ClusterUserAttributeLister
|
||||
AddHandler(ctx context.Context, name string, handler ClusterUserAttributeHandlerFunc)
|
||||
AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync ClusterUserAttributeHandlerFunc)
|
||||
AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler ClusterUserAttributeHandlerFunc)
|
||||
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler ClusterUserAttributeHandlerFunc)
|
||||
Enqueue(namespace, name string)
|
||||
Sync(ctx context.Context) error
|
||||
Start(ctx context.Context, threadiness int) error
|
||||
@@ -87,9 +89,13 @@ type ClusterUserAttributeInterface interface {
|
||||
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Controller() ClusterUserAttributeController
|
||||
AddHandler(ctx context.Context, name string, sync ClusterUserAttributeHandlerFunc)
|
||||
AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync ClusterUserAttributeHandlerFunc)
|
||||
AddLifecycle(ctx context.Context, name string, lifecycle ClusterUserAttributeLifecycle)
|
||||
AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle ClusterUserAttributeLifecycle)
|
||||
AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync ClusterUserAttributeHandlerFunc)
|
||||
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync ClusterUserAttributeHandlerFunc)
|
||||
AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle ClusterUserAttributeLifecycle)
|
||||
AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle ClusterUserAttributeLifecycle)
|
||||
}
|
||||
|
||||
type clusterUserAttributeLister struct {
|
||||
@@ -149,6 +155,20 @@ func (c *clusterUserAttributeController) AddHandler(ctx context.Context, name st
|
||||
})
|
||||
}
|
||||
|
||||
func (c *clusterUserAttributeController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler ClusterUserAttributeHandlerFunc) {
|
||||
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.(*ClusterUserAttribute); ok {
|
||||
return handler(key, v)
|
||||
} else {
|
||||
return nil, nil
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func (c *clusterUserAttributeController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler ClusterUserAttributeHandlerFunc) {
|
||||
resource.PutClusterScoped(ClusterUserAttributeGroupVersionResource)
|
||||
c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) {
|
||||
@@ -162,6 +182,21 @@ func (c *clusterUserAttributeController) AddClusterScopedHandler(ctx context.Con
|
||||
})
|
||||
}
|
||||
|
||||
func (c *clusterUserAttributeController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler ClusterUserAttributeHandlerFunc) {
|
||||
resource.PutClusterScoped(ClusterUserAttributeGroupVersionResource)
|
||||
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.(*ClusterUserAttribute); ok && controller.ObjectInCluster(cluster, obj) {
|
||||
return handler(key, v)
|
||||
} else {
|
||||
return nil, nil
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
type clusterUserAttributeFactory struct {
|
||||
}
|
||||
|
||||
@@ -257,20 +292,38 @@ func (s *clusterUserAttributeClient) AddHandler(ctx context.Context, name string
|
||||
s.Controller().AddHandler(ctx, name, sync)
|
||||
}
|
||||
|
||||
func (s *clusterUserAttributeClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync ClusterUserAttributeHandlerFunc) {
|
||||
s.Controller().AddFeatureHandler(ctx, enabled, name, sync)
|
||||
}
|
||||
|
||||
func (s *clusterUserAttributeClient) AddLifecycle(ctx context.Context, name string, lifecycle ClusterUserAttributeLifecycle) {
|
||||
sync := NewClusterUserAttributeLifecycleAdapter(name, false, s, lifecycle)
|
||||
s.Controller().AddHandler(ctx, name, sync)
|
||||
}
|
||||
|
||||
func (s *clusterUserAttributeClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle ClusterUserAttributeLifecycle) {
|
||||
sync := NewClusterUserAttributeLifecycleAdapter(name, false, s, lifecycle)
|
||||
s.Controller().AddFeatureHandler(ctx, enabled, name, sync)
|
||||
}
|
||||
|
||||
func (s *clusterUserAttributeClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync ClusterUserAttributeHandlerFunc) {
|
||||
s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync)
|
||||
}
|
||||
|
||||
func (s *clusterUserAttributeClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync ClusterUserAttributeHandlerFunc) {
|
||||
s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync)
|
||||
}
|
||||
|
||||
func (s *clusterUserAttributeClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle ClusterUserAttributeLifecycle) {
|
||||
sync := NewClusterUserAttributeLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle)
|
||||
s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync)
|
||||
}
|
||||
|
||||
func (s *clusterUserAttributeClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle ClusterUserAttributeLifecycle) {
|
||||
sync := NewClusterUserAttributeLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle)
|
||||
s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync)
|
||||
}
|
||||
|
||||
type ClusterUserAttributeIndexer func(obj *ClusterUserAttribute) ([]string, error)
|
||||
|
||||
type ClusterUserAttributeClientCache interface {
|
||||
|
Reference in New Issue
Block a user