1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-09 11:19:12 +00:00
Files
steve/pkg/schema/fake/factory.go
2025-06-20 17:53:42 +05:30

117 lines
3.6 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: github.com/rancher/steve/pkg/schema (interfaces: Factory)
//
// Generated by this command:
//
// mockgen --build_flags=--mod=mod -package fake -destination fake/factory.go github.com/rancher/steve/pkg/schema Factory
//
// Package fake is a generated GoMock package.
package fake
import (
context "context"
reflect "reflect"
types "github.com/rancher/apiserver/pkg/types"
schema "github.com/rancher/steve/pkg/schema"
gomock "go.uber.org/mock/gomock"
schema0 "k8s.io/apimachinery/pkg/runtime/schema"
user "k8s.io/apiserver/pkg/authentication/user"
)
// MockFactory is a mock of Factory interface.
type MockFactory struct {
ctrl *gomock.Controller
recorder *MockFactoryMockRecorder
isgomock struct{}
}
// MockFactoryMockRecorder is the mock recorder for MockFactory.
type MockFactoryMockRecorder struct {
mock *MockFactory
}
// NewMockFactory creates a new mock instance.
func NewMockFactory(ctrl *gomock.Controller) *MockFactory {
mock := &MockFactory{ctrl: ctrl}
mock.recorder = &MockFactoryMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockFactory) EXPECT() *MockFactoryMockRecorder {
return m.recorder
}
// AddTemplate mocks base method.
func (m *MockFactory) AddTemplate(template ...schema.Template) {
m.ctrl.T.Helper()
varargs := []any{}
for _, a := range template {
varargs = append(varargs, a)
}
m.ctrl.Call(m, "AddTemplate", varargs...)
}
// AddTemplate indicates an expected call of AddTemplate.
func (mr *MockFactoryMockRecorder) AddTemplate(template ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddTemplate", reflect.TypeOf((*MockFactory)(nil).AddTemplate), template...)
}
// ByGVK mocks base method.
func (m *MockFactory) ByGVK(gvr schema0.GroupVersionKind) string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByGVK", gvr)
ret0, _ := ret[0].(string)
return ret0
}
// ByGVK indicates an expected call of ByGVK.
func (mr *MockFactoryMockRecorder) ByGVK(gvr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByGVK", reflect.TypeOf((*MockFactory)(nil).ByGVK), gvr)
}
// ByGVR mocks base method.
func (m *MockFactory) ByGVR(gvr schema0.GroupVersionResource) string {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ByGVR", gvr)
ret0, _ := ret[0].(string)
return ret0
}
// ByGVR indicates an expected call of ByGVR.
func (mr *MockFactoryMockRecorder) ByGVR(gvr any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ByGVR", reflect.TypeOf((*MockFactory)(nil).ByGVR), gvr)
}
// OnChange mocks base method.
func (m *MockFactory) OnChange(ctx context.Context, cb func()) {
m.ctrl.T.Helper()
m.ctrl.Call(m, "OnChange", ctx, cb)
}
// OnChange indicates an expected call of OnChange.
func (mr *MockFactoryMockRecorder) OnChange(ctx, cb any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnChange", reflect.TypeOf((*MockFactory)(nil).OnChange), ctx, cb)
}
// Schemas mocks base method.
func (m *MockFactory) Schemas(arg0 user.Info) (*types.APISchemas, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Schemas", arg0)
ret0, _ := ret[0].(*types.APISchemas)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Schemas indicates an expected call of Schemas.
func (mr *MockFactoryMockRecorder) Schemas(arg0 any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Schemas", reflect.TypeOf((*MockFactory)(nil).Schemas), arg0)
}