131 lines
4.3 KiB
Go
131 lines
4.3 KiB
Go
|
// Code generated by MockGen. DO NOT EDIT.
|
||
|
// Source: ./internal/model/role_model.go
|
||
|
//
|
||
|
// Generated by this command:
|
||
|
//
|
||
|
// mockgen -source=./internal/model/role_model.go -destination=./internal/mock/model/role_model.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"
|
||
|
)
|
||
|
|
||
|
// MockRoleModel is a mock of RoleModel interface.
|
||
|
type MockRoleModel struct {
|
||
|
ctrl *gomock.Controller
|
||
|
recorder *MockRoleModelMockRecorder
|
||
|
}
|
||
|
|
||
|
// MockRoleModelMockRecorder is the mock recorder for MockRoleModel.
|
||
|
type MockRoleModelMockRecorder struct {
|
||
|
mock *MockRoleModel
|
||
|
}
|
||
|
|
||
|
// NewMockRoleModel creates a new mock instance.
|
||
|
func NewMockRoleModel(ctrl *gomock.Controller) *MockRoleModel {
|
||
|
mock := &MockRoleModel{ctrl: ctrl}
|
||
|
mock.recorder = &MockRoleModelMockRecorder{mock}
|
||
|
return mock
|
||
|
}
|
||
|
|
||
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
||
|
func (m *MockRoleModel) EXPECT() *MockRoleModelMockRecorder {
|
||
|
return m.recorder
|
||
|
}
|
||
|
|
||
|
// Delete mocks base method.
|
||
|
func (m *MockRoleModel) 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 *MockRoleModelMockRecorder) Delete(ctx, id any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockRoleModel)(nil).Delete), ctx, id)
|
||
|
}
|
||
|
|
||
|
// FindOne mocks base method.
|
||
|
func (m *MockRoleModel) FindOne(ctx context.Context, id int64) (*model.Role, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "FindOne", ctx, id)
|
||
|
ret0, _ := ret[0].(*model.Role)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// FindOne indicates an expected call of FindOne.
|
||
|
func (mr *MockRoleModelMockRecorder) FindOne(ctx, id any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOne", reflect.TypeOf((*MockRoleModel)(nil).FindOne), ctx, id)
|
||
|
}
|
||
|
|
||
|
// FindOneByDisplayName mocks base method.
|
||
|
func (m *MockRoleModel) FindOneByDisplayName(ctx context.Context, displayName string) (*model.Role, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "FindOneByDisplayName", ctx, displayName)
|
||
|
ret0, _ := ret[0].(*model.Role)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// FindOneByDisplayName indicates an expected call of FindOneByDisplayName.
|
||
|
func (mr *MockRoleModelMockRecorder) FindOneByDisplayName(ctx, displayName any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOneByDisplayName", reflect.TypeOf((*MockRoleModel)(nil).FindOneByDisplayName), ctx, displayName)
|
||
|
}
|
||
|
|
||
|
// FindOneByRoleId mocks base method.
|
||
|
func (m *MockRoleModel) FindOneByRoleId(ctx context.Context, roleId string) (*model.Role, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "FindOneByRoleId", ctx, roleId)
|
||
|
ret0, _ := ret[0].(*model.Role)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// FindOneByRoleId indicates an expected call of FindOneByRoleId.
|
||
|
func (mr *MockRoleModelMockRecorder) FindOneByRoleId(ctx, roleId any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOneByRoleId", reflect.TypeOf((*MockRoleModel)(nil).FindOneByRoleId), ctx, roleId)
|
||
|
}
|
||
|
|
||
|
// Insert mocks base method.
|
||
|
func (m *MockRoleModel) Insert(ctx context.Context, data *model.Role) (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 *MockRoleModelMockRecorder) Insert(ctx, data any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Insert", reflect.TypeOf((*MockRoleModel)(nil).Insert), ctx, data)
|
||
|
}
|
||
|
|
||
|
// Update mocks base method.
|
||
|
func (m *MockRoleModel) Update(ctx context.Context, data *model.Role) 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 *MockRoleModelMockRecorder) Update(ctx, data any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockRoleModel)(nil).Update), ctx, data)
|
||
|
}
|