wrangler/pkg/generic/fake/cache.go

180 lines
6.5 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: ../cache.go
//
// Generated by this command:
//
// mockgen -package fake -destination ./cache.go -source ../cache.go
//
// Package fake is a generated GoMock package.
package fake
import (
reflect "reflect"
generic "github.com/rancher/wrangler/v3/pkg/generic"
gomock "go.uber.org/mock/gomock"
labels "k8s.io/apimachinery/pkg/labels"
runtime "k8s.io/apimachinery/pkg/runtime"
)
// MockCacheInterface is a mock of CacheInterface interface.
type MockCacheInterface[T runtime.Object] struct {
ctrl *gomock.Controller
recorder *MockCacheInterfaceMockRecorder[T]
}
// MockCacheInterfaceMockRecorder is the mock recorder for MockCacheInterface.
type MockCacheInterfaceMockRecorder[T runtime.Object] struct {
mock *MockCacheInterface[T]
}
// NewMockCacheInterface creates a new mock instance.
func NewMockCacheInterface[T runtime.Object](ctrl *gomock.Controller) *MockCacheInterface[T] {
mock := &MockCacheInterface[T]{ctrl: ctrl}
mock.recorder = &MockCacheInterfaceMockRecorder[T]{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCacheInterface[T]) EXPECT() *MockCacheInterfaceMockRecorder[T] {
return m.recorder
}
// AddIndexer mocks base method.
func (m *MockCacheInterface[T]) AddIndexer(indexName string, indexer generic.Indexer[T]) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "AddIndexer", indexName, indexer)
}
// AddIndexer indicates an expected call of AddIndexer.
func (mr *MockCacheInterfaceMockRecorder[T]) AddIndexer(indexName, indexer any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddIndexer", reflect.TypeOf((*MockCacheInterface[T])(nil).AddIndexer), indexName, indexer)
}
// Get mocks base method.
func (m *MockCacheInterface[T]) Get(namespace, name string) (T, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", namespace, name)
ret0, _ := ret[0].(T)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockCacheInterfaceMockRecorder[T]) Get(namespace, name any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockCacheInterface[T])(nil).Get), namespace, name)
}
// GetByIndex mocks base method.
func (m *MockCacheInterface[T]) GetByIndex(indexName, key string) ([]T, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetByIndex", indexName, key)
ret0, _ := ret[0].([]T)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetByIndex indicates an expected call of GetByIndex.
func (mr *MockCacheInterfaceMockRecorder[T]) GetByIndex(indexName, key any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByIndex", reflect.TypeOf((*MockCacheInterface[T])(nil).GetByIndex), indexName, key)
}
// List mocks base method.
func (m *MockCacheInterface[T]) List(namespace string, selector labels.Selector) ([]T, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "List", namespace, selector)
ret0, _ := ret[0].([]T)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// List indicates an expected call of List.
func (mr *MockCacheInterfaceMockRecorder[T]) List(namespace, selector any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockCacheInterface[T])(nil).List), namespace, selector)
}
// MockNonNamespacedCacheInterface is a mock of NonNamespacedCacheInterface interface.
type MockNonNamespacedCacheInterface[T runtime.Object] struct {
ctrl *gomock.Controller
recorder *MockNonNamespacedCacheInterfaceMockRecorder[T]
}
// MockNonNamespacedCacheInterfaceMockRecorder is the mock recorder for MockNonNamespacedCacheInterface.
type MockNonNamespacedCacheInterfaceMockRecorder[T runtime.Object] struct {
mock *MockNonNamespacedCacheInterface[T]
}
// NewMockNonNamespacedCacheInterface creates a new mock instance.
func NewMockNonNamespacedCacheInterface[T runtime.Object](ctrl *gomock.Controller) *MockNonNamespacedCacheInterface[T] {
mock := &MockNonNamespacedCacheInterface[T]{ctrl: ctrl}
mock.recorder = &MockNonNamespacedCacheInterfaceMockRecorder[T]{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockNonNamespacedCacheInterface[T]) EXPECT() *MockNonNamespacedCacheInterfaceMockRecorder[T] {
return m.recorder
}
// AddIndexer mocks base method.
func (m *MockNonNamespacedCacheInterface[T]) AddIndexer(indexName string, indexer generic.Indexer[T]) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "AddIndexer", indexName, indexer)
}
// AddIndexer indicates an expected call of AddIndexer.
func (mr *MockNonNamespacedCacheInterfaceMockRecorder[T]) AddIndexer(indexName, indexer any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddIndexer", reflect.TypeOf((*MockNonNamespacedCacheInterface[T])(nil).AddIndexer), indexName, indexer)
}
// Get mocks base method.
func (m *MockNonNamespacedCacheInterface[T]) Get(name string) (T, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Get", name)
ret0, _ := ret[0].(T)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Get indicates an expected call of Get.
func (mr *MockNonNamespacedCacheInterfaceMockRecorder[T]) Get(name any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Get", reflect.TypeOf((*MockNonNamespacedCacheInterface[T])(nil).Get), name)
}
// GetByIndex mocks base method.
func (m *MockNonNamespacedCacheInterface[T]) GetByIndex(indexName, key string) ([]T, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetByIndex", indexName, key)
ret0, _ := ret[0].([]T)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetByIndex indicates an expected call of GetByIndex.
func (mr *MockNonNamespacedCacheInterfaceMockRecorder[T]) GetByIndex(indexName, key any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByIndex", reflect.TypeOf((*MockNonNamespacedCacheInterface[T])(nil).GetByIndex), indexName, key)
}
// List mocks base method.
func (m *MockNonNamespacedCacheInterface[T]) List(selector labels.Selector) ([]T, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "List", selector)
ret0, _ := ret[0].([]T)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// List indicates an expected call of List.
func (mr *MockNonNamespacedCacheInterfaceMockRecorder[T]) List(selector any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockNonNamespacedCacheInterface[T])(nil).List), selector)
}