mirror of
https://github.com/rancher/types.git
synced 2025-09-24 19:39:13 +00:00
go generate
This commit is contained in:
@@ -140,14 +140,16 @@ func (mock *AuthProviderListerMock) ListCalls() []struct {
|
||||
}
|
||||
|
||||
var (
|
||||
lockAuthProviderControllerMockAddClusterScopedHandler sync.RWMutex
|
||||
lockAuthProviderControllerMockAddHandler sync.RWMutex
|
||||
lockAuthProviderControllerMockEnqueue sync.RWMutex
|
||||
lockAuthProviderControllerMockGeneric sync.RWMutex
|
||||
lockAuthProviderControllerMockInformer sync.RWMutex
|
||||
lockAuthProviderControllerMockLister sync.RWMutex
|
||||
lockAuthProviderControllerMockStart sync.RWMutex
|
||||
lockAuthProviderControllerMockSync sync.RWMutex
|
||||
lockAuthProviderControllerMockAddClusterScopedFeatureHandler sync.RWMutex
|
||||
lockAuthProviderControllerMockAddClusterScopedHandler sync.RWMutex
|
||||
lockAuthProviderControllerMockAddFeatureHandler sync.RWMutex
|
||||
lockAuthProviderControllerMockAddHandler sync.RWMutex
|
||||
lockAuthProviderControllerMockEnqueue sync.RWMutex
|
||||
lockAuthProviderControllerMockGeneric sync.RWMutex
|
||||
lockAuthProviderControllerMockInformer sync.RWMutex
|
||||
lockAuthProviderControllerMockLister sync.RWMutex
|
||||
lockAuthProviderControllerMockStart sync.RWMutex
|
||||
lockAuthProviderControllerMockSync sync.RWMutex
|
||||
)
|
||||
|
||||
// Ensure, that AuthProviderControllerMock does implement AuthProviderController.
|
||||
@@ -160,9 +162,15 @@ var _ v3public.AuthProviderController = &AuthProviderControllerMock{}
|
||||
//
|
||||
// // make and configure a mocked AuthProviderController
|
||||
// mockedAuthProviderController := &AuthProviderControllerMock{
|
||||
// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3public.AuthProviderHandlerFunc) {
|
||||
// panic("mock out the AddClusterScopedFeatureHandler method")
|
||||
// },
|
||||
// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, handler v3public.AuthProviderHandlerFunc) {
|
||||
// panic("mock out the AddClusterScopedHandler method")
|
||||
// },
|
||||
// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3public.AuthProviderHandlerFunc) {
|
||||
// panic("mock out the AddFeatureHandler method")
|
||||
// },
|
||||
// AddHandlerFunc: func(ctx context.Context, name string, handler v3public.AuthProviderHandlerFunc) {
|
||||
// panic("mock out the AddHandler method")
|
||||
// },
|
||||
@@ -191,9 +199,15 @@ var _ v3public.AuthProviderController = &AuthProviderControllerMock{}
|
||||
//
|
||||
// }
|
||||
type AuthProviderControllerMock struct {
|
||||
// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
|
||||
AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3public.AuthProviderHandlerFunc)
|
||||
|
||||
// AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method.
|
||||
AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, handler v3public.AuthProviderHandlerFunc)
|
||||
|
||||
// AddFeatureHandlerFunc mocks the AddFeatureHandler method.
|
||||
AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3public.AuthProviderHandlerFunc)
|
||||
|
||||
// AddHandlerFunc mocks the AddHandler method.
|
||||
AddHandlerFunc func(ctx context.Context, name string, handler v3public.AuthProviderHandlerFunc)
|
||||
|
||||
@@ -217,6 +231,19 @@ type AuthProviderControllerMock 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 v3public.AuthProviderHandlerFunc
|
||||
}
|
||||
// AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method.
|
||||
AddClusterScopedHandler []struct {
|
||||
// Ctx is the ctx argument value.
|
||||
@@ -228,6 +255,17 @@ type AuthProviderControllerMock struct {
|
||||
// Handler is the handler argument value.
|
||||
Handler v3public.AuthProviderHandlerFunc
|
||||
}
|
||||
// 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 v3public.AuthProviderHandlerFunc
|
||||
}
|
||||
// AddHandler holds details about calls to the AddHandler method.
|
||||
AddHandler []struct {
|
||||
// Ctx is the ctx argument value.
|
||||
@@ -268,6 +306,53 @@ type AuthProviderControllerMock struct {
|
||||
}
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc.
|
||||
func (mock *AuthProviderControllerMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, handler v3public.AuthProviderHandlerFunc) {
|
||||
if mock.AddClusterScopedFeatureHandlerFunc == nil {
|
||||
panic("AuthProviderControllerMock.AddClusterScopedFeatureHandlerFunc: method is nil but AuthProviderController.AddClusterScopedFeatureHandler was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Handler v3public.AuthProviderHandlerFunc
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
ClusterName: clusterName,
|
||||
Handler: handler,
|
||||
}
|
||||
lockAuthProviderControllerMockAddClusterScopedFeatureHandler.Lock()
|
||||
mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo)
|
||||
lockAuthProviderControllerMockAddClusterScopedFeatureHandler.Unlock()
|
||||
mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, handler)
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler.
|
||||
// Check the length with:
|
||||
// len(mockedAuthProviderController.AddClusterScopedFeatureHandlerCalls())
|
||||
func (mock *AuthProviderControllerMock) AddClusterScopedFeatureHandlerCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Handler v3public.AuthProviderHandlerFunc
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Handler v3public.AuthProviderHandlerFunc
|
||||
}
|
||||
lockAuthProviderControllerMockAddClusterScopedFeatureHandler.RLock()
|
||||
calls = mock.calls.AddClusterScopedFeatureHandler
|
||||
lockAuthProviderControllerMockAddClusterScopedFeatureHandler.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddClusterScopedHandler calls AddClusterScopedHandlerFunc.
|
||||
func (mock *AuthProviderControllerMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, handler v3public.AuthProviderHandlerFunc) {
|
||||
if mock.AddClusterScopedHandlerFunc == nil {
|
||||
@@ -311,6 +396,49 @@ func (mock *AuthProviderControllerMock) AddClusterScopedHandlerCalls() []struct
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddFeatureHandler calls AddFeatureHandlerFunc.
|
||||
func (mock *AuthProviderControllerMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3public.AuthProviderHandlerFunc) {
|
||||
if mock.AddFeatureHandlerFunc == nil {
|
||||
panic("AuthProviderControllerMock.AddFeatureHandlerFunc: method is nil but AuthProviderController.AddFeatureHandler was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3public.AuthProviderHandlerFunc
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
Sync: sync,
|
||||
}
|
||||
lockAuthProviderControllerMockAddFeatureHandler.Lock()
|
||||
mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo)
|
||||
lockAuthProviderControllerMockAddFeatureHandler.Unlock()
|
||||
mock.AddFeatureHandlerFunc(ctx, enabled, name, sync)
|
||||
}
|
||||
|
||||
// AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler.
|
||||
// Check the length with:
|
||||
// len(mockedAuthProviderController.AddFeatureHandlerCalls())
|
||||
func (mock *AuthProviderControllerMock) AddFeatureHandlerCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3public.AuthProviderHandlerFunc
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3public.AuthProviderHandlerFunc
|
||||
}
|
||||
lockAuthProviderControllerMockAddFeatureHandler.RLock()
|
||||
calls = mock.calls.AddFeatureHandler
|
||||
lockAuthProviderControllerMockAddFeatureHandler.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddHandler calls AddHandlerFunc.
|
||||
func (mock *AuthProviderControllerMock) AddHandler(ctx context.Context, name string, handler v3public.AuthProviderHandlerFunc) {
|
||||
if mock.AddHandlerFunc == nil {
|
||||
@@ -530,21 +658,25 @@ func (mock *AuthProviderControllerMock) SyncCalls() []struct {
|
||||
}
|
||||
|
||||
var (
|
||||
lockAuthProviderInterfaceMockAddClusterScopedHandler sync.RWMutex
|
||||
lockAuthProviderInterfaceMockAddClusterScopedLifecycle sync.RWMutex
|
||||
lockAuthProviderInterfaceMockAddHandler sync.RWMutex
|
||||
lockAuthProviderInterfaceMockAddLifecycle sync.RWMutex
|
||||
lockAuthProviderInterfaceMockController sync.RWMutex
|
||||
lockAuthProviderInterfaceMockCreate sync.RWMutex
|
||||
lockAuthProviderInterfaceMockDelete sync.RWMutex
|
||||
lockAuthProviderInterfaceMockDeleteCollection sync.RWMutex
|
||||
lockAuthProviderInterfaceMockDeleteNamespaced sync.RWMutex
|
||||
lockAuthProviderInterfaceMockGet sync.RWMutex
|
||||
lockAuthProviderInterfaceMockGetNamespaced sync.RWMutex
|
||||
lockAuthProviderInterfaceMockList sync.RWMutex
|
||||
lockAuthProviderInterfaceMockObjectClient sync.RWMutex
|
||||
lockAuthProviderInterfaceMockUpdate sync.RWMutex
|
||||
lockAuthProviderInterfaceMockWatch sync.RWMutex
|
||||
lockAuthProviderInterfaceMockAddClusterScopedFeatureHandler sync.RWMutex
|
||||
lockAuthProviderInterfaceMockAddClusterScopedFeatureLifecycle sync.RWMutex
|
||||
lockAuthProviderInterfaceMockAddClusterScopedHandler sync.RWMutex
|
||||
lockAuthProviderInterfaceMockAddClusterScopedLifecycle sync.RWMutex
|
||||
lockAuthProviderInterfaceMockAddFeatureHandler sync.RWMutex
|
||||
lockAuthProviderInterfaceMockAddFeatureLifecycle sync.RWMutex
|
||||
lockAuthProviderInterfaceMockAddHandler sync.RWMutex
|
||||
lockAuthProviderInterfaceMockAddLifecycle sync.RWMutex
|
||||
lockAuthProviderInterfaceMockController sync.RWMutex
|
||||
lockAuthProviderInterfaceMockCreate sync.RWMutex
|
||||
lockAuthProviderInterfaceMockDelete sync.RWMutex
|
||||
lockAuthProviderInterfaceMockDeleteCollection sync.RWMutex
|
||||
lockAuthProviderInterfaceMockDeleteNamespaced sync.RWMutex
|
||||
lockAuthProviderInterfaceMockGet sync.RWMutex
|
||||
lockAuthProviderInterfaceMockGetNamespaced sync.RWMutex
|
||||
lockAuthProviderInterfaceMockList sync.RWMutex
|
||||
lockAuthProviderInterfaceMockObjectClient sync.RWMutex
|
||||
lockAuthProviderInterfaceMockUpdate sync.RWMutex
|
||||
lockAuthProviderInterfaceMockWatch sync.RWMutex
|
||||
)
|
||||
|
||||
// Ensure, that AuthProviderInterfaceMock does implement AuthProviderInterface.
|
||||
@@ -557,12 +689,24 @@ var _ v3public.AuthProviderInterface = &AuthProviderInterfaceMock{}
|
||||
//
|
||||
// // make and configure a mocked AuthProviderInterface
|
||||
// mockedAuthProviderInterface := &AuthProviderInterfaceMock{
|
||||
// AddClusterScopedFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3public.AuthProviderHandlerFunc) {
|
||||
// panic("mock out the AddClusterScopedFeatureHandler method")
|
||||
// },
|
||||
// AddClusterScopedFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3public.AuthProviderLifecycle) {
|
||||
// panic("mock out the AddClusterScopedFeatureLifecycle method")
|
||||
// },
|
||||
// AddClusterScopedHandlerFunc: func(ctx context.Context, name string, clusterName string, sync v3public.AuthProviderHandlerFunc) {
|
||||
// panic("mock out the AddClusterScopedHandler method")
|
||||
// },
|
||||
// AddClusterScopedLifecycleFunc: func(ctx context.Context, name string, clusterName string, lifecycle v3public.AuthProviderLifecycle) {
|
||||
// panic("mock out the AddClusterScopedLifecycle method")
|
||||
// },
|
||||
// AddFeatureHandlerFunc: func(ctx context.Context, enabled func() bool, name string, sync v3public.AuthProviderHandlerFunc) {
|
||||
// panic("mock out the AddFeatureHandler method")
|
||||
// },
|
||||
// AddFeatureLifecycleFunc: func(ctx context.Context, enabled func() bool, name string, lifecycle v3public.AuthProviderLifecycle) {
|
||||
// panic("mock out the AddFeatureLifecycle method")
|
||||
// },
|
||||
// AddHandlerFunc: func(ctx context.Context, name string, sync v3public.AuthProviderHandlerFunc) {
|
||||
// panic("mock out the AddHandler method")
|
||||
// },
|
||||
@@ -609,12 +753,24 @@ var _ v3public.AuthProviderInterface = &AuthProviderInterfaceMock{}
|
||||
//
|
||||
// }
|
||||
type AuthProviderInterfaceMock struct {
|
||||
// AddClusterScopedFeatureHandlerFunc mocks the AddClusterScopedFeatureHandler method.
|
||||
AddClusterScopedFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3public.AuthProviderHandlerFunc)
|
||||
|
||||
// AddClusterScopedFeatureLifecycleFunc mocks the AddClusterScopedFeatureLifecycle method.
|
||||
AddClusterScopedFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3public.AuthProviderLifecycle)
|
||||
|
||||
// AddClusterScopedHandlerFunc mocks the AddClusterScopedHandler method.
|
||||
AddClusterScopedHandlerFunc func(ctx context.Context, name string, clusterName string, sync v3public.AuthProviderHandlerFunc)
|
||||
|
||||
// AddClusterScopedLifecycleFunc mocks the AddClusterScopedLifecycle method.
|
||||
AddClusterScopedLifecycleFunc func(ctx context.Context, name string, clusterName string, lifecycle v3public.AuthProviderLifecycle)
|
||||
|
||||
// AddFeatureHandlerFunc mocks the AddFeatureHandler method.
|
||||
AddFeatureHandlerFunc func(ctx context.Context, enabled func() bool, name string, sync v3public.AuthProviderHandlerFunc)
|
||||
|
||||
// AddFeatureLifecycleFunc mocks the AddFeatureLifecycle method.
|
||||
AddFeatureLifecycleFunc func(ctx context.Context, enabled func() bool, name string, lifecycle v3public.AuthProviderLifecycle)
|
||||
|
||||
// AddHandlerFunc mocks the AddHandler method.
|
||||
AddHandlerFunc func(ctx context.Context, name string, sync v3public.AuthProviderHandlerFunc)
|
||||
|
||||
@@ -656,6 +812,32 @@ type AuthProviderInterfaceMock 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 v3public.AuthProviderHandlerFunc
|
||||
}
|
||||
// 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 v3public.AuthProviderLifecycle
|
||||
}
|
||||
// AddClusterScopedHandler holds details about calls to the AddClusterScopedHandler method.
|
||||
AddClusterScopedHandler []struct {
|
||||
// Ctx is the ctx argument value.
|
||||
@@ -678,6 +860,28 @@ type AuthProviderInterfaceMock struct {
|
||||
// Lifecycle is the lifecycle argument value.
|
||||
Lifecycle v3public.AuthProviderLifecycle
|
||||
}
|
||||
// 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 v3public.AuthProviderHandlerFunc
|
||||
}
|
||||
// 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 v3public.AuthProviderLifecycle
|
||||
}
|
||||
// AddHandler holds details about calls to the AddHandler method.
|
||||
AddHandler []struct {
|
||||
// Ctx is the ctx argument value.
|
||||
@@ -764,6 +968,100 @@ type AuthProviderInterfaceMock struct {
|
||||
}
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureHandler calls AddClusterScopedFeatureHandlerFunc.
|
||||
func (mock *AuthProviderInterfaceMock) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name string, clusterName string, sync v3public.AuthProviderHandlerFunc) {
|
||||
if mock.AddClusterScopedFeatureHandlerFunc == nil {
|
||||
panic("AuthProviderInterfaceMock.AddClusterScopedFeatureHandlerFunc: method is nil but AuthProviderInterface.AddClusterScopedFeatureHandler was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Sync v3public.AuthProviderHandlerFunc
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
ClusterName: clusterName,
|
||||
Sync: sync,
|
||||
}
|
||||
lockAuthProviderInterfaceMockAddClusterScopedFeatureHandler.Lock()
|
||||
mock.calls.AddClusterScopedFeatureHandler = append(mock.calls.AddClusterScopedFeatureHandler, callInfo)
|
||||
lockAuthProviderInterfaceMockAddClusterScopedFeatureHandler.Unlock()
|
||||
mock.AddClusterScopedFeatureHandlerFunc(ctx, enabled, name, clusterName, sync)
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureHandlerCalls gets all the calls that were made to AddClusterScopedFeatureHandler.
|
||||
// Check the length with:
|
||||
// len(mockedAuthProviderInterface.AddClusterScopedFeatureHandlerCalls())
|
||||
func (mock *AuthProviderInterfaceMock) AddClusterScopedFeatureHandlerCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Sync v3public.AuthProviderHandlerFunc
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Sync v3public.AuthProviderHandlerFunc
|
||||
}
|
||||
lockAuthProviderInterfaceMockAddClusterScopedFeatureHandler.RLock()
|
||||
calls = mock.calls.AddClusterScopedFeatureHandler
|
||||
lockAuthProviderInterfaceMockAddClusterScopedFeatureHandler.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureLifecycle calls AddClusterScopedFeatureLifecycleFunc.
|
||||
func (mock *AuthProviderInterfaceMock) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name string, clusterName string, lifecycle v3public.AuthProviderLifecycle) {
|
||||
if mock.AddClusterScopedFeatureLifecycleFunc == nil {
|
||||
panic("AuthProviderInterfaceMock.AddClusterScopedFeatureLifecycleFunc: method is nil but AuthProviderInterface.AddClusterScopedFeatureLifecycle was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Lifecycle v3public.AuthProviderLifecycle
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
ClusterName: clusterName,
|
||||
Lifecycle: lifecycle,
|
||||
}
|
||||
lockAuthProviderInterfaceMockAddClusterScopedFeatureLifecycle.Lock()
|
||||
mock.calls.AddClusterScopedFeatureLifecycle = append(mock.calls.AddClusterScopedFeatureLifecycle, callInfo)
|
||||
lockAuthProviderInterfaceMockAddClusterScopedFeatureLifecycle.Unlock()
|
||||
mock.AddClusterScopedFeatureLifecycleFunc(ctx, enabled, name, clusterName, lifecycle)
|
||||
}
|
||||
|
||||
// AddClusterScopedFeatureLifecycleCalls gets all the calls that were made to AddClusterScopedFeatureLifecycle.
|
||||
// Check the length with:
|
||||
// len(mockedAuthProviderInterface.AddClusterScopedFeatureLifecycleCalls())
|
||||
func (mock *AuthProviderInterfaceMock) AddClusterScopedFeatureLifecycleCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Lifecycle v3public.AuthProviderLifecycle
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
ClusterName string
|
||||
Lifecycle v3public.AuthProviderLifecycle
|
||||
}
|
||||
lockAuthProviderInterfaceMockAddClusterScopedFeatureLifecycle.RLock()
|
||||
calls = mock.calls.AddClusterScopedFeatureLifecycle
|
||||
lockAuthProviderInterfaceMockAddClusterScopedFeatureLifecycle.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddClusterScopedHandler calls AddClusterScopedHandlerFunc.
|
||||
func (mock *AuthProviderInterfaceMock) AddClusterScopedHandler(ctx context.Context, name string, clusterName string, sync v3public.AuthProviderHandlerFunc) {
|
||||
if mock.AddClusterScopedHandlerFunc == nil {
|
||||
@@ -850,6 +1148,92 @@ func (mock *AuthProviderInterfaceMock) AddClusterScopedLifecycleCalls() []struct
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddFeatureHandler calls AddFeatureHandlerFunc.
|
||||
func (mock *AuthProviderInterfaceMock) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync v3public.AuthProviderHandlerFunc) {
|
||||
if mock.AddFeatureHandlerFunc == nil {
|
||||
panic("AuthProviderInterfaceMock.AddFeatureHandlerFunc: method is nil but AuthProviderInterface.AddFeatureHandler was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3public.AuthProviderHandlerFunc
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
Sync: sync,
|
||||
}
|
||||
lockAuthProviderInterfaceMockAddFeatureHandler.Lock()
|
||||
mock.calls.AddFeatureHandler = append(mock.calls.AddFeatureHandler, callInfo)
|
||||
lockAuthProviderInterfaceMockAddFeatureHandler.Unlock()
|
||||
mock.AddFeatureHandlerFunc(ctx, enabled, name, sync)
|
||||
}
|
||||
|
||||
// AddFeatureHandlerCalls gets all the calls that were made to AddFeatureHandler.
|
||||
// Check the length with:
|
||||
// len(mockedAuthProviderInterface.AddFeatureHandlerCalls())
|
||||
func (mock *AuthProviderInterfaceMock) AddFeatureHandlerCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3public.AuthProviderHandlerFunc
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Sync v3public.AuthProviderHandlerFunc
|
||||
}
|
||||
lockAuthProviderInterfaceMockAddFeatureHandler.RLock()
|
||||
calls = mock.calls.AddFeatureHandler
|
||||
lockAuthProviderInterfaceMockAddFeatureHandler.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddFeatureLifecycle calls AddFeatureLifecycleFunc.
|
||||
func (mock *AuthProviderInterfaceMock) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle v3public.AuthProviderLifecycle) {
|
||||
if mock.AddFeatureLifecycleFunc == nil {
|
||||
panic("AuthProviderInterfaceMock.AddFeatureLifecycleFunc: method is nil but AuthProviderInterface.AddFeatureLifecycle was just called")
|
||||
}
|
||||
callInfo := struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Lifecycle v3public.AuthProviderLifecycle
|
||||
}{
|
||||
Ctx: ctx,
|
||||
Enabled: enabled,
|
||||
Name: name,
|
||||
Lifecycle: lifecycle,
|
||||
}
|
||||
lockAuthProviderInterfaceMockAddFeatureLifecycle.Lock()
|
||||
mock.calls.AddFeatureLifecycle = append(mock.calls.AddFeatureLifecycle, callInfo)
|
||||
lockAuthProviderInterfaceMockAddFeatureLifecycle.Unlock()
|
||||
mock.AddFeatureLifecycleFunc(ctx, enabled, name, lifecycle)
|
||||
}
|
||||
|
||||
// AddFeatureLifecycleCalls gets all the calls that were made to AddFeatureLifecycle.
|
||||
// Check the length with:
|
||||
// len(mockedAuthProviderInterface.AddFeatureLifecycleCalls())
|
||||
func (mock *AuthProviderInterfaceMock) AddFeatureLifecycleCalls() []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Lifecycle v3public.AuthProviderLifecycle
|
||||
} {
|
||||
var calls []struct {
|
||||
Ctx context.Context
|
||||
Enabled func() bool
|
||||
Name string
|
||||
Lifecycle v3public.AuthProviderLifecycle
|
||||
}
|
||||
lockAuthProviderInterfaceMockAddFeatureLifecycle.RLock()
|
||||
calls = mock.calls.AddFeatureLifecycle
|
||||
lockAuthProviderInterfaceMockAddFeatureLifecycle.RUnlock()
|
||||
return calls
|
||||
}
|
||||
|
||||
// AddHandler calls AddHandlerFunc.
|
||||
func (mock *AuthProviderInterfaceMock) AddHandler(ctx context.Context, name string, sync v3public.AuthProviderHandlerFunc) {
|
||||
if mock.AddHandlerFunc == nil {
|
||||
|
@@ -67,7 +67,9 @@ type AuthProviderController interface {
|
||||
Informer() cache.SharedIndexInformer
|
||||
Lister() AuthProviderLister
|
||||
AddHandler(ctx context.Context, name string, handler AuthProviderHandlerFunc)
|
||||
AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync AuthProviderHandlerFunc)
|
||||
AddClusterScopedHandler(ctx context.Context, name, clusterName string, handler AuthProviderHandlerFunc)
|
||||
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, handler AuthProviderHandlerFunc)
|
||||
Enqueue(namespace, name string)
|
||||
Sync(ctx context.Context) error
|
||||
Start(ctx context.Context, threadiness int) error
|
||||
@@ -86,9 +88,13 @@ type AuthProviderInterface interface {
|
||||
DeleteCollection(deleteOpts *metav1.DeleteOptions, listOpts metav1.ListOptions) error
|
||||
Controller() AuthProviderController
|
||||
AddHandler(ctx context.Context, name string, sync AuthProviderHandlerFunc)
|
||||
AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync AuthProviderHandlerFunc)
|
||||
AddLifecycle(ctx context.Context, name string, lifecycle AuthProviderLifecycle)
|
||||
AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle AuthProviderLifecycle)
|
||||
AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync AuthProviderHandlerFunc)
|
||||
AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync AuthProviderHandlerFunc)
|
||||
AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle AuthProviderLifecycle)
|
||||
AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle AuthProviderLifecycle)
|
||||
}
|
||||
|
||||
type authProviderLister struct {
|
||||
@@ -148,6 +154,20 @@ func (c *authProviderController) AddHandler(ctx context.Context, name string, ha
|
||||
})
|
||||
}
|
||||
|
||||
func (c *authProviderController) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, handler AuthProviderHandlerFunc) {
|
||||
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.(*AuthProvider); ok {
|
||||
return handler(key, v)
|
||||
} else {
|
||||
return nil, nil
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func (c *authProviderController) AddClusterScopedHandler(ctx context.Context, name, cluster string, handler AuthProviderHandlerFunc) {
|
||||
resource.PutClusterScoped(AuthProviderGroupVersionResource)
|
||||
c.GenericController.AddHandler(ctx, name, func(key string, obj interface{}) (interface{}, error) {
|
||||
@@ -161,6 +181,21 @@ func (c *authProviderController) AddClusterScopedHandler(ctx context.Context, na
|
||||
})
|
||||
}
|
||||
|
||||
func (c *authProviderController) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, cluster string, handler AuthProviderHandlerFunc) {
|
||||
resource.PutClusterScoped(AuthProviderGroupVersionResource)
|
||||
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.(*AuthProvider); ok && controller.ObjectInCluster(cluster, obj) {
|
||||
return handler(key, v)
|
||||
} else {
|
||||
return nil, nil
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
type authProviderFactory struct {
|
||||
}
|
||||
|
||||
@@ -256,20 +291,38 @@ func (s *authProviderClient) AddHandler(ctx context.Context, name string, sync A
|
||||
s.Controller().AddHandler(ctx, name, sync)
|
||||
}
|
||||
|
||||
func (s *authProviderClient) AddFeatureHandler(ctx context.Context, enabled func() bool, name string, sync AuthProviderHandlerFunc) {
|
||||
s.Controller().AddFeatureHandler(ctx, enabled, name, sync)
|
||||
}
|
||||
|
||||
func (s *authProviderClient) AddLifecycle(ctx context.Context, name string, lifecycle AuthProviderLifecycle) {
|
||||
sync := NewAuthProviderLifecycleAdapter(name, false, s, lifecycle)
|
||||
s.Controller().AddHandler(ctx, name, sync)
|
||||
}
|
||||
|
||||
func (s *authProviderClient) AddFeatureLifecycle(ctx context.Context, enabled func() bool, name string, lifecycle AuthProviderLifecycle) {
|
||||
sync := NewAuthProviderLifecycleAdapter(name, false, s, lifecycle)
|
||||
s.Controller().AddFeatureHandler(ctx, enabled, name, sync)
|
||||
}
|
||||
|
||||
func (s *authProviderClient) AddClusterScopedHandler(ctx context.Context, name, clusterName string, sync AuthProviderHandlerFunc) {
|
||||
s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync)
|
||||
}
|
||||
|
||||
func (s *authProviderClient) AddClusterScopedFeatureHandler(ctx context.Context, enabled func() bool, name, clusterName string, sync AuthProviderHandlerFunc) {
|
||||
s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync)
|
||||
}
|
||||
|
||||
func (s *authProviderClient) AddClusterScopedLifecycle(ctx context.Context, name, clusterName string, lifecycle AuthProviderLifecycle) {
|
||||
sync := NewAuthProviderLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle)
|
||||
s.Controller().AddClusterScopedHandler(ctx, name, clusterName, sync)
|
||||
}
|
||||
|
||||
func (s *authProviderClient) AddClusterScopedFeatureLifecycle(ctx context.Context, enabled func() bool, name, clusterName string, lifecycle AuthProviderLifecycle) {
|
||||
sync := NewAuthProviderLifecycleAdapter(name+"_"+clusterName, true, s, lifecycle)
|
||||
s.Controller().AddClusterScopedFeatureHandler(ctx, enabled, name, clusterName, sync)
|
||||
}
|
||||
|
||||
type AuthProviderIndexer func(obj *AuthProvider) ([]string, error)
|
||||
|
||||
type AuthProviderClientCache interface {
|
||||
|
Reference in New Issue
Block a user