1
0
mirror of https://github.com/rancher/steve.git synced 2025-07-13 06:34:43 +00:00
steve/pkg/stores/sqlproxy/proxy_mocks_test.go

411 lines
17 KiB
Go
Raw Normal View History

// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/rancher/steve/pkg/stores/sqlproxy (interfaces: Cache,ClientGetter,CacheFactory,SchemaColumnSetter,RelationshipNotifier,TransformBuilder)
//
// Generated by this command:
//
// mockgen --build_flags=--mod=mod -package sqlproxy -destination ./proxy_mocks_test.go github.com/rancher/steve/pkg/stores/sqlproxy Cache,ClientGetter,CacheFactory,SchemaColumnSetter,RelationshipNotifier,TransformBuilder
//
// Package sqlproxy is a generated GoMock package.
package sqlproxy
import (
context "context"
reflect "reflect"
types "github.com/rancher/apiserver/pkg/types"
common "github.com/rancher/steve/pkg/resources/common"
factory "github.com/rancher/steve/pkg/sqlcache/informer/factory"
partition "github.com/rancher/steve/pkg/sqlcache/partition"
sqltypes "github.com/rancher/steve/pkg/sqlcache/sqltypes"
2024-06-05 17:38:15 +00:00
summary "github.com/rancher/wrangler/v3/pkg/summary"
gomock "go.uber.org/mock/gomock"
unstructured "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
schema "k8s.io/apimachinery/pkg/runtime/schema"
dynamic "k8s.io/client-go/dynamic"
kubernetes "k8s.io/client-go/kubernetes"
rest "k8s.io/client-go/rest"
cache "k8s.io/client-go/tools/cache"
)
// MockCache is a mock of Cache interface.
type MockCache struct {
ctrl *gomock.Controller
recorder *MockCacheMockRecorder
isgomock struct{}
}
// MockCacheMockRecorder is the mock recorder for MockCache.
type MockCacheMockRecorder struct {
mock *MockCache
}
// NewMockCache creates a new mock instance.
func NewMockCache(ctrl *gomock.Controller) *MockCache {
mock := &MockCache{ctrl: ctrl}
mock.recorder = &MockCacheMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCache) EXPECT() *MockCacheMockRecorder {
return m.recorder
}
// ListByOptions mocks base method.
func (m *MockCache) ListByOptions(ctx context.Context, lo *sqltypes.ListOptions, partitions []partition.Partition, namespace string) (*unstructured.UnstructuredList, int, string, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListByOptions", ctx, lo, partitions, namespace)
ret0, _ := ret[0].(*unstructured.UnstructuredList)
ret1, _ := ret[1].(int)
ret2, _ := ret[2].(string)
ret3, _ := ret[3].(error)
return ret0, ret1, ret2, ret3
}
// ListByOptions indicates an expected call of ListByOptions.
func (mr *MockCacheMockRecorder) ListByOptions(ctx, lo, partitions, namespace any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListByOptions", reflect.TypeOf((*MockCache)(nil).ListByOptions), ctx, lo, partitions, namespace)
}
// MockClientGetter is a mock of ClientGetter interface.
type MockClientGetter struct {
ctrl *gomock.Controller
recorder *MockClientGetterMockRecorder
isgomock struct{}
}
// MockClientGetterMockRecorder is the mock recorder for MockClientGetter.
type MockClientGetterMockRecorder struct {
mock *MockClientGetter
}
// NewMockClientGetter creates a new mock instance.
func NewMockClientGetter(ctrl *gomock.Controller) *MockClientGetter {
mock := &MockClientGetter{ctrl: ctrl}
mock.recorder = &MockClientGetterMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockClientGetter) EXPECT() *MockClientGetterMockRecorder {
return m.recorder
}
// AdminClient mocks base method.
func (m *MockClientGetter) AdminClient(ctx *types.APIRequest, arg1 *types.APISchema, namespace string, warningHandler rest.WarningHandler) (dynamic.ResourceInterface, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AdminClient", ctx, arg1, namespace, warningHandler)
ret0, _ := ret[0].(dynamic.ResourceInterface)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AdminClient indicates an expected call of AdminClient.
func (mr *MockClientGetterMockRecorder) AdminClient(ctx, arg1, namespace, warningHandler any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminClient", reflect.TypeOf((*MockClientGetter)(nil).AdminClient), ctx, arg1, namespace, warningHandler)
}
// AdminK8sInterface mocks base method.
func (m *MockClientGetter) AdminK8sInterface() (kubernetes.Interface, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "AdminK8sInterface")
ret0, _ := ret[0].(kubernetes.Interface)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// AdminK8sInterface indicates an expected call of AdminK8sInterface.
func (mr *MockClientGetterMockRecorder) AdminK8sInterface() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AdminK8sInterface", reflect.TypeOf((*MockClientGetter)(nil).AdminK8sInterface))
}
// Client mocks base method.
func (m *MockClientGetter) Client(ctx *types.APIRequest, arg1 *types.APISchema, namespace string, warningHandler rest.WarningHandler) (dynamic.ResourceInterface, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Client", ctx, arg1, namespace, warningHandler)
ret0, _ := ret[0].(dynamic.ResourceInterface)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Client indicates an expected call of Client.
func (mr *MockClientGetterMockRecorder) Client(ctx, arg1, namespace, warningHandler any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Client", reflect.TypeOf((*MockClientGetter)(nil).Client), ctx, arg1, namespace, warningHandler)
}
// DynamicClient mocks base method.
func (m *MockClientGetter) DynamicClient(ctx *types.APIRequest, warningHandler rest.WarningHandler) (dynamic.Interface, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "DynamicClient", ctx, warningHandler)
ret0, _ := ret[0].(dynamic.Interface)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DynamicClient indicates an expected call of DynamicClient.
func (mr *MockClientGetterMockRecorder) DynamicClient(ctx, warningHandler any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DynamicClient", reflect.TypeOf((*MockClientGetter)(nil).DynamicClient), ctx, warningHandler)
}
// IsImpersonating mocks base method.
func (m *MockClientGetter) IsImpersonating() bool {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "IsImpersonating")
ret0, _ := ret[0].(bool)
return ret0
}
// IsImpersonating indicates an expected call of IsImpersonating.
func (mr *MockClientGetterMockRecorder) IsImpersonating() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsImpersonating", reflect.TypeOf((*MockClientGetter)(nil).IsImpersonating))
}
// K8sInterface mocks base method.
func (m *MockClientGetter) K8sInterface(ctx *types.APIRequest) (kubernetes.Interface, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "K8sInterface", ctx)
ret0, _ := ret[0].(kubernetes.Interface)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// K8sInterface indicates an expected call of K8sInterface.
func (mr *MockClientGetterMockRecorder) K8sInterface(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "K8sInterface", reflect.TypeOf((*MockClientGetter)(nil).K8sInterface), ctx)
}
// TableAdminClient mocks base method.
func (m *MockClientGetter) TableAdminClient(ctx *types.APIRequest, arg1 *types.APISchema, namespace string, warningHandler rest.WarningHandler) (dynamic.ResourceInterface, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "TableAdminClient", ctx, arg1, namespace, warningHandler)
ret0, _ := ret[0].(dynamic.ResourceInterface)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// TableAdminClient indicates an expected call of TableAdminClient.
func (mr *MockClientGetterMockRecorder) TableAdminClient(ctx, arg1, namespace, warningHandler any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TableAdminClient", reflect.TypeOf((*MockClientGetter)(nil).TableAdminClient), ctx, arg1, namespace, warningHandler)
}
// TableAdminClientForWatch mocks base method.
func (m *MockClientGetter) TableAdminClientForWatch(ctx *types.APIRequest, arg1 *types.APISchema, namespace string, warningHandler rest.WarningHandler) (dynamic.ResourceInterface, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "TableAdminClientForWatch", ctx, arg1, namespace, warningHandler)
ret0, _ := ret[0].(dynamic.ResourceInterface)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// TableAdminClientForWatch indicates an expected call of TableAdminClientForWatch.
func (mr *MockClientGetterMockRecorder) TableAdminClientForWatch(ctx, arg1, namespace, warningHandler any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TableAdminClientForWatch", reflect.TypeOf((*MockClientGetter)(nil).TableAdminClientForWatch), ctx, arg1, namespace, warningHandler)
}
// TableClient mocks base method.
func (m *MockClientGetter) TableClient(ctx *types.APIRequest, arg1 *types.APISchema, namespace string, warningHandler rest.WarningHandler) (dynamic.ResourceInterface, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "TableClient", ctx, arg1, namespace, warningHandler)
ret0, _ := ret[0].(dynamic.ResourceInterface)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// TableClient indicates an expected call of TableClient.
func (mr *MockClientGetterMockRecorder) TableClient(ctx, arg1, namespace, warningHandler any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TableClient", reflect.TypeOf((*MockClientGetter)(nil).TableClient), ctx, arg1, namespace, warningHandler)
}
// TableClientForWatch mocks base method.
func (m *MockClientGetter) TableClientForWatch(ctx *types.APIRequest, arg1 *types.APISchema, namespace string, warningHandler rest.WarningHandler) (dynamic.ResourceInterface, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "TableClientForWatch", ctx, arg1, namespace, warningHandler)
ret0, _ := ret[0].(dynamic.ResourceInterface)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// TableClientForWatch indicates an expected call of TableClientForWatch.
func (mr *MockClientGetterMockRecorder) TableClientForWatch(ctx, arg1, namespace, warningHandler any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "TableClientForWatch", reflect.TypeOf((*MockClientGetter)(nil).TableClientForWatch), ctx, arg1, namespace, warningHandler)
}
// MockCacheFactory is a mock of CacheFactory interface.
type MockCacheFactory struct {
ctrl *gomock.Controller
recorder *MockCacheFactoryMockRecorder
isgomock struct{}
}
// MockCacheFactoryMockRecorder is the mock recorder for MockCacheFactory.
type MockCacheFactoryMockRecorder struct {
mock *MockCacheFactory
}
// NewMockCacheFactory creates a new mock instance.
func NewMockCacheFactory(ctrl *gomock.Controller) *MockCacheFactory {
mock := &MockCacheFactory{ctrl: ctrl}
mock.recorder = &MockCacheFactoryMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCacheFactory) EXPECT() *MockCacheFactoryMockRecorder {
return m.recorder
}
// CacheFor mocks base method.
Hard-wire external associations: 5/7: update A=>B links when instances of A change (#646) * Continue rebasing. * Wrote unit tests for external associations. * Fix the generated SQL. Some syntactic sugar (capitalizing the keywords), but use the 'ON' syntax on JOINs. * We want "management.cattle.io.projects:spec.displayName" not "...spec.clusterName" * Implement hard-wired external associations: * The table is in sqlproxy.proxy_store - externalGVKDependencies - a map of GVKs to dependencies. When the key GVK is updated, it triggers the updates in the database for the dependent GVKs, replacing fields as specified in the table. * This is done in an afterUpsert handler, but it's done after the transaction for the core GVK update is finished, because most likely the dependent GVK updates will depend on the final database values for the GVK being updated, and if we do it as part of the transaction the new values won't be committed to the database. * When an object is modified/created, check for external deps that need updating. * Stop emitting errors when joining tables if one of the tables doesn't exist. * Update unit test syntax for SQL queries. * And an override check This ensures we don't overwrite good data when pulling data from one table to another. * Drop labels, and use mgmt.cattle.io/spec.displayName There's no need to hardwire labels in proxy_store:typeSpecificIndexedFields because all labels are indexed in the shadow labels table. * Keep clusterName, add displayName for mgmt.cattle.io * Fix rebase/merge breakage. * Finish the merge: add the 'selfUpdateInfo' param where it didn't get inserted during merge. * Patch up rebase failures. * Now gomock generates named args. I give up.
2025-07-03 21:35:09 +00:00
func (m *MockCacheFactory) CacheFor(ctx context.Context, fields [][]string, externalUpdateInfo, selfUpdateInfo *sqltypes.ExternalGVKUpdates, transform cache.TransformFunc, client dynamic.ResourceInterface, gvk schema.GroupVersionKind, namespaced, watchable bool) (factory.Cache, error) {
m.ctrl.T.Helper()
Hard-wire external associations: 5/7: update A=>B links when instances of A change (#646) * Continue rebasing. * Wrote unit tests for external associations. * Fix the generated SQL. Some syntactic sugar (capitalizing the keywords), but use the 'ON' syntax on JOINs. * We want "management.cattle.io.projects:spec.displayName" not "...spec.clusterName" * Implement hard-wired external associations: * The table is in sqlproxy.proxy_store - externalGVKDependencies - a map of GVKs to dependencies. When the key GVK is updated, it triggers the updates in the database for the dependent GVKs, replacing fields as specified in the table. * This is done in an afterUpsert handler, but it's done after the transaction for the core GVK update is finished, because most likely the dependent GVK updates will depend on the final database values for the GVK being updated, and if we do it as part of the transaction the new values won't be committed to the database. * When an object is modified/created, check for external deps that need updating. * Stop emitting errors when joining tables if one of the tables doesn't exist. * Update unit test syntax for SQL queries. * And an override check This ensures we don't overwrite good data when pulling data from one table to another. * Drop labels, and use mgmt.cattle.io/spec.displayName There's no need to hardwire labels in proxy_store:typeSpecificIndexedFields because all labels are indexed in the shadow labels table. * Keep clusterName, add displayName for mgmt.cattle.io * Fix rebase/merge breakage. * Finish the merge: add the 'selfUpdateInfo' param where it didn't get inserted during merge. * Patch up rebase failures. * Now gomock generates named args. I give up.
2025-07-03 21:35:09 +00:00
ret := m.ctrl.Call(m, "CacheFor", ctx, fields, externalUpdateInfo, selfUpdateInfo, transform, client, gvk, namespaced, watchable)
ret0, _ := ret[0].(factory.Cache)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// CacheFor indicates an expected call of CacheFor.
Hard-wire external associations: 5/7: update A=>B links when instances of A change (#646) * Continue rebasing. * Wrote unit tests for external associations. * Fix the generated SQL. Some syntactic sugar (capitalizing the keywords), but use the 'ON' syntax on JOINs. * We want "management.cattle.io.projects:spec.displayName" not "...spec.clusterName" * Implement hard-wired external associations: * The table is in sqlproxy.proxy_store - externalGVKDependencies - a map of GVKs to dependencies. When the key GVK is updated, it triggers the updates in the database for the dependent GVKs, replacing fields as specified in the table. * This is done in an afterUpsert handler, but it's done after the transaction for the core GVK update is finished, because most likely the dependent GVK updates will depend on the final database values for the GVK being updated, and if we do it as part of the transaction the new values won't be committed to the database. * When an object is modified/created, check for external deps that need updating. * Stop emitting errors when joining tables if one of the tables doesn't exist. * Update unit test syntax for SQL queries. * And an override check This ensures we don't overwrite good data when pulling data from one table to another. * Drop labels, and use mgmt.cattle.io/spec.displayName There's no need to hardwire labels in proxy_store:typeSpecificIndexedFields because all labels are indexed in the shadow labels table. * Keep clusterName, add displayName for mgmt.cattle.io * Fix rebase/merge breakage. * Finish the merge: add the 'selfUpdateInfo' param where it didn't get inserted during merge. * Patch up rebase failures. * Now gomock generates named args. I give up.
2025-07-03 21:35:09 +00:00
func (mr *MockCacheFactoryMockRecorder) CacheFor(ctx, fields, externalUpdateInfo, selfUpdateInfo, transform, client, gvk, namespaced, watchable any) *gomock.Call {
mr.mock.ctrl.T.Helper()
Hard-wire external associations: 5/7: update A=>B links when instances of A change (#646) * Continue rebasing. * Wrote unit tests for external associations. * Fix the generated SQL. Some syntactic sugar (capitalizing the keywords), but use the 'ON' syntax on JOINs. * We want "management.cattle.io.projects:spec.displayName" not "...spec.clusterName" * Implement hard-wired external associations: * The table is in sqlproxy.proxy_store - externalGVKDependencies - a map of GVKs to dependencies. When the key GVK is updated, it triggers the updates in the database for the dependent GVKs, replacing fields as specified in the table. * This is done in an afterUpsert handler, but it's done after the transaction for the core GVK update is finished, because most likely the dependent GVK updates will depend on the final database values for the GVK being updated, and if we do it as part of the transaction the new values won't be committed to the database. * When an object is modified/created, check for external deps that need updating. * Stop emitting errors when joining tables if one of the tables doesn't exist. * Update unit test syntax for SQL queries. * And an override check This ensures we don't overwrite good data when pulling data from one table to another. * Drop labels, and use mgmt.cattle.io/spec.displayName There's no need to hardwire labels in proxy_store:typeSpecificIndexedFields because all labels are indexed in the shadow labels table. * Keep clusterName, add displayName for mgmt.cattle.io * Fix rebase/merge breakage. * Finish the merge: add the 'selfUpdateInfo' param where it didn't get inserted during merge. * Patch up rebase failures. * Now gomock generates named args. I give up.
2025-07-03 21:35:09 +00:00
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "CacheFor", reflect.TypeOf((*MockCacheFactory)(nil).CacheFor), ctx, fields, externalUpdateInfo, selfUpdateInfo, transform, client, gvk, namespaced, watchable)
}
// Reset mocks base method.
func (m *MockCacheFactory) Reset() error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Reset")
ret0, _ := ret[0].(error)
return ret0
}
// Reset indicates an expected call of Reset.
func (mr *MockCacheFactoryMockRecorder) Reset() *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Reset", reflect.TypeOf((*MockCacheFactory)(nil).Reset))
}
// MockSchemaColumnSetter is a mock of SchemaColumnSetter interface.
type MockSchemaColumnSetter struct {
ctrl *gomock.Controller
recorder *MockSchemaColumnSetterMockRecorder
isgomock struct{}
}
// MockSchemaColumnSetterMockRecorder is the mock recorder for MockSchemaColumnSetter.
type MockSchemaColumnSetterMockRecorder struct {
mock *MockSchemaColumnSetter
}
// NewMockSchemaColumnSetter creates a new mock instance.
func NewMockSchemaColumnSetter(ctrl *gomock.Controller) *MockSchemaColumnSetter {
mock := &MockSchemaColumnSetter{ctrl: ctrl}
mock.recorder = &MockSchemaColumnSetterMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockSchemaColumnSetter) EXPECT() *MockSchemaColumnSetterMockRecorder {
return m.recorder
}
// SetColumns mocks base method.
func (m *MockSchemaColumnSetter) SetColumns(ctx context.Context, arg1 *types.APISchema) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "SetColumns", ctx, arg1)
ret0, _ := ret[0].(error)
return ret0
}
// SetColumns indicates an expected call of SetColumns.
func (mr *MockSchemaColumnSetterMockRecorder) SetColumns(ctx, arg1 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "SetColumns", reflect.TypeOf((*MockSchemaColumnSetter)(nil).SetColumns), ctx, arg1)
}
// MockRelationshipNotifier is a mock of RelationshipNotifier interface.
type MockRelationshipNotifier struct {
ctrl *gomock.Controller
recorder *MockRelationshipNotifierMockRecorder
isgomock struct{}
}
// MockRelationshipNotifierMockRecorder is the mock recorder for MockRelationshipNotifier.
type MockRelationshipNotifierMockRecorder struct {
mock *MockRelationshipNotifier
}
// NewMockRelationshipNotifier creates a new mock instance.
func NewMockRelationshipNotifier(ctrl *gomock.Controller) *MockRelationshipNotifier {
mock := &MockRelationshipNotifier{ctrl: ctrl}
mock.recorder = &MockRelationshipNotifierMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockRelationshipNotifier) EXPECT() *MockRelationshipNotifierMockRecorder {
return m.recorder
}
// OnInboundRelationshipChange mocks base method.
func (m *MockRelationshipNotifier) OnInboundRelationshipChange(ctx context.Context, arg1 *types.APISchema, namespace string) <-chan *summary.Relationship {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "OnInboundRelationshipChange", ctx, arg1, namespace)
ret0, _ := ret[0].(<-chan *summary.Relationship)
return ret0
}
// OnInboundRelationshipChange indicates an expected call of OnInboundRelationshipChange.
func (mr *MockRelationshipNotifierMockRecorder) OnInboundRelationshipChange(ctx, arg1, namespace any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnInboundRelationshipChange", reflect.TypeOf((*MockRelationshipNotifier)(nil).OnInboundRelationshipChange), ctx, arg1, namespace)
}
// MockTransformBuilder is a mock of TransformBuilder interface.
type MockTransformBuilder struct {
ctrl *gomock.Controller
recorder *MockTransformBuilderMockRecorder
isgomock struct{}
}
// MockTransformBuilderMockRecorder is the mock recorder for MockTransformBuilder.
type MockTransformBuilderMockRecorder struct {
mock *MockTransformBuilder
}
// NewMockTransformBuilder creates a new mock instance.
func NewMockTransformBuilder(ctrl *gomock.Controller) *MockTransformBuilder {
mock := &MockTransformBuilder{ctrl: ctrl}
mock.recorder = &MockTransformBuilderMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockTransformBuilder) EXPECT() *MockTransformBuilderMockRecorder {
return m.recorder
}
// GetTransformFunc mocks base method.
func (m *MockTransformBuilder) GetTransformFunc(gvk schema.GroupVersionKind, colDefs []common.ColumnDefinition) cache.TransformFunc {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetTransformFunc", gvk, colDefs)
ret0, _ := ret[0].(cache.TransformFunc)
return ret0
}
// GetTransformFunc indicates an expected call of GetTransformFunc.
func (mr *MockTransformBuilderMockRecorder) GetTransformFunc(gvk, colDefs any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTransformFunc", reflect.TypeOf((*MockTransformBuilder)(nil).GetTransformFunc), gvk, colDefs)
}