app-cloudep-permission-server/internal/mock/model/permission_model_gen.go

116 lines
3.9 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: ./internal/model/permission_model_gen.go
//
// Generated by this command:
//
// mockgen -source=./internal/model/permission_model_gen.go -destination=./internal/mock/model/permission_model_gen.go -package=mock
//
// Package mock is a generated GoMock package.
package mock
import (
model "app-cloudep-permission-server/internal/model"
context "context"
sql "database/sql"
reflect "reflect"
gomock "go.uber.org/mock/gomock"
)
// MockpermissionModel is a mock of permissionModel interface.
type MockpermissionModel struct {
ctrl *gomock.Controller
recorder *MockpermissionModelMockRecorder
}
// MockpermissionModelMockRecorder is the mock recorder for MockpermissionModel.
type MockpermissionModelMockRecorder struct {
mock *MockpermissionModel
}
// NewMockpermissionModel creates a new mock instance.
func NewMockpermissionModel(ctrl *gomock.Controller) *MockpermissionModel {
mock := &MockpermissionModel{ctrl: ctrl}
mock.recorder = &MockpermissionModelMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockpermissionModel) EXPECT() *MockpermissionModelMockRecorder {
return m.recorder
}
// Delete mocks base method.
func (m *MockpermissionModel) Delete(ctx context.Context, id int64) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Delete", ctx, id)
ret0, _ := ret[0].(error)
return ret0
}
// Delete indicates an expected call of Delete.
func (mr *MockpermissionModelMockRecorder) Delete(ctx, id any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockpermissionModel)(nil).Delete), ctx, id)
}
// FindOne mocks base method.
func (m *MockpermissionModel) FindOne(ctx context.Context, id int64) (*model.Permission, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FindOne", ctx, id)
ret0, _ := ret[0].(*model.Permission)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// FindOne indicates an expected call of FindOne.
func (mr *MockpermissionModelMockRecorder) FindOne(ctx, id any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOne", reflect.TypeOf((*MockpermissionModel)(nil).FindOne), ctx, id)
}
// FindOneByName mocks base method.
func (m *MockpermissionModel) FindOneByName(ctx context.Context, name string) (*model.Permission, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FindOneByName", ctx, name)
ret0, _ := ret[0].(*model.Permission)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// FindOneByName indicates an expected call of FindOneByName.
func (mr *MockpermissionModelMockRecorder) FindOneByName(ctx, name any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOneByName", reflect.TypeOf((*MockpermissionModel)(nil).FindOneByName), ctx, name)
}
// Insert mocks base method.
func (m *MockpermissionModel) Insert(ctx context.Context, data *model.Permission) (sql.Result, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Insert", ctx, data)
ret0, _ := ret[0].(sql.Result)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Insert indicates an expected call of Insert.
func (mr *MockpermissionModelMockRecorder) Insert(ctx, data any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Insert", reflect.TypeOf((*MockpermissionModel)(nil).Insert), ctx, data)
}
// Update mocks base method.
func (m *MockpermissionModel) Update(ctx context.Context, data *model.Permission) error {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Update", ctx, data)
ret0, _ := ret[0].(error)
return ret0
}
// Update indicates an expected call of Update.
func (mr *MockpermissionModelMockRecorder) Update(ctx, data any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockpermissionModel)(nil).Update), ctx, data)
}