286 lines
10 KiB
Go
286 lines
10 KiB
Go
|
// Code generated by MockGen. DO NOT EDIT.
|
||
|
// Source: ./pkg/domain/repository/permission.go
|
||
|
//
|
||
|
// Generated by this command:
|
||
|
//
|
||
|
// mockgen -source=./pkg/domain/repository/permission.go -destination=./pkg/mock/repository/permission.go -package=mock
|
||
|
//
|
||
|
|
||
|
// Package mock is a generated GoMock package.
|
||
|
package mock
|
||
|
|
||
|
import (
|
||
|
context "context"
|
||
|
reflect "reflect"
|
||
|
|
||
|
entity "code.30cm.net/digimon/app-cloudep-permission-server/pkg/domain/entity"
|
||
|
permission "code.30cm.net/digimon/app-cloudep-permission-server/pkg/domain/permission"
|
||
|
repository "code.30cm.net/digimon/app-cloudep-permission-server/pkg/domain/repository"
|
||
|
mongo "go.mongodb.org/mongo-driver/mongo"
|
||
|
gomock "go.uber.org/mock/gomock"
|
||
|
)
|
||
|
|
||
|
// MockPermissionRepository is a mock of PermissionRepository interface.
|
||
|
type MockPermissionRepository struct {
|
||
|
ctrl *gomock.Controller
|
||
|
recorder *MockPermissionRepositoryMockRecorder
|
||
|
isgomock struct{}
|
||
|
}
|
||
|
|
||
|
// MockPermissionRepositoryMockRecorder is the mock recorder for MockPermissionRepository.
|
||
|
type MockPermissionRepositoryMockRecorder struct {
|
||
|
mock *MockPermissionRepository
|
||
|
}
|
||
|
|
||
|
// NewMockPermissionRepository creates a new mock instance.
|
||
|
func NewMockPermissionRepository(ctrl *gomock.Controller) *MockPermissionRepository {
|
||
|
mock := &MockPermissionRepository{ctrl: ctrl}
|
||
|
mock.recorder = &MockPermissionRepositoryMockRecorder{mock}
|
||
|
return mock
|
||
|
}
|
||
|
|
||
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
||
|
func (m *MockPermissionRepository) EXPECT() *MockPermissionRepositoryMockRecorder {
|
||
|
return m.recorder
|
||
|
}
|
||
|
|
||
|
// Delete mocks base method.
|
||
|
func (m *MockPermissionRepository) Delete(ctx context.Context, id string) 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 *MockPermissionRepositoryMockRecorder) Delete(ctx, id any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockPermissionRepository)(nil).Delete), ctx, id)
|
||
|
}
|
||
|
|
||
|
// FindByNames mocks base method.
|
||
|
func (m *MockPermissionRepository) FindByNames(ctx context.Context, names []string) ([]entity.Permission, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "FindByNames", ctx, names)
|
||
|
ret0, _ := ret[0].([]entity.Permission)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// FindByNames indicates an expected call of FindByNames.
|
||
|
func (mr *MockPermissionRepositoryMockRecorder) FindByNames(ctx, names any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindByNames", reflect.TypeOf((*MockPermissionRepository)(nil).FindByNames), ctx, names)
|
||
|
}
|
||
|
|
||
|
// FindOne mocks base method.
|
||
|
func (m *MockPermissionRepository) FindOne(ctx context.Context, query repository.PermissionQuery) (entity.Permission, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "FindOne", ctx, query)
|
||
|
ret0, _ := ret[0].(entity.Permission)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// FindOne indicates an expected call of FindOne.
|
||
|
func (mr *MockPermissionRepositoryMockRecorder) FindOne(ctx, query any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOne", reflect.TypeOf((*MockPermissionRepository)(nil).FindOne), ctx, query)
|
||
|
}
|
||
|
|
||
|
// GetAll mocks base method.
|
||
|
func (m *MockPermissionRepository) GetAll(ctx context.Context, status *permission.Status) ([]entity.Permission, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "GetAll", ctx, status)
|
||
|
ret0, _ := ret[0].([]entity.Permission)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// GetAll indicates an expected call of GetAll.
|
||
|
func (mr *MockPermissionRepositoryMockRecorder) GetAll(ctx, status any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAll", reflect.TypeOf((*MockPermissionRepository)(nil).GetAll), ctx, status)
|
||
|
}
|
||
|
|
||
|
// GetAllIntoIDMap mocks base method.
|
||
|
func (m *MockPermissionRepository) GetAllIntoIDMap(ctx context.Context, status *permission.Status) (map[string]entity.Permission, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "GetAllIntoIDMap", ctx, status)
|
||
|
ret0, _ := ret[0].(map[string]entity.Permission)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// GetAllIntoIDMap indicates an expected call of GetAllIntoIDMap.
|
||
|
func (mr *MockPermissionRepositoryMockRecorder) GetAllIntoIDMap(ctx, status any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllIntoIDMap", reflect.TypeOf((*MockPermissionRepository)(nil).GetAllIntoIDMap), ctx, status)
|
||
|
}
|
||
|
|
||
|
// Index20250214UP mocks base method.
|
||
|
func (m *MockPermissionRepository) Index20250214UP(ctx context.Context) (*mongo.Cursor, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "Index20250214UP", ctx)
|
||
|
ret0, _ := ret[0].(*mongo.Cursor)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// Index20250214UP indicates an expected call of Index20250214UP.
|
||
|
func (mr *MockPermissionRepositoryMockRecorder) Index20250214UP(ctx any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Index20250214UP", reflect.TypeOf((*MockPermissionRepository)(nil).Index20250214UP), ctx)
|
||
|
}
|
||
|
|
||
|
// Insert mocks base method.
|
||
|
func (m *MockPermissionRepository) Insert(ctx context.Context, permission entity.Permission) error {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "Insert", ctx, permission)
|
||
|
ret0, _ := ret[0].(error)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// Insert indicates an expected call of Insert.
|
||
|
func (mr *MockPermissionRepositoryMockRecorder) Insert(ctx, permission any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Insert", reflect.TypeOf((*MockPermissionRepository)(nil).Insert), ctx, permission)
|
||
|
}
|
||
|
|
||
|
// Update mocks base method.
|
||
|
func (m *MockPermissionRepository) Update(ctx context.Context, id string, req repository.UpdatePermission) error {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "Update", ctx, id, req)
|
||
|
ret0, _ := ret[0].(error)
|
||
|
return ret0
|
||
|
}
|
||
|
|
||
|
// Update indicates an expected call of Update.
|
||
|
func (mr *MockPermissionRepositoryMockRecorder) Update(ctx, id, req any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockPermissionRepository)(nil).Update), ctx, id, req)
|
||
|
}
|
||
|
|
||
|
// MockGetPermission is a mock of GetPermission interface.
|
||
|
type MockGetPermission struct {
|
||
|
ctrl *gomock.Controller
|
||
|
recorder *MockGetPermissionMockRecorder
|
||
|
isgomock struct{}
|
||
|
}
|
||
|
|
||
|
// MockGetPermissionMockRecorder is the mock recorder for MockGetPermission.
|
||
|
type MockGetPermissionMockRecorder struct {
|
||
|
mock *MockGetPermission
|
||
|
}
|
||
|
|
||
|
// NewMockGetPermission creates a new mock instance.
|
||
|
func NewMockGetPermission(ctrl *gomock.Controller) *MockGetPermission {
|
||
|
mock := &MockGetPermission{ctrl: ctrl}
|
||
|
mock.recorder = &MockGetPermissionMockRecorder{mock}
|
||
|
return mock
|
||
|
}
|
||
|
|
||
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
||
|
func (m *MockGetPermission) EXPECT() *MockGetPermissionMockRecorder {
|
||
|
return m.recorder
|
||
|
}
|
||
|
|
||
|
// FindByNames mocks base method.
|
||
|
func (m *MockGetPermission) FindByNames(ctx context.Context, names []string) ([]entity.Permission, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "FindByNames", ctx, names)
|
||
|
ret0, _ := ret[0].([]entity.Permission)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// FindByNames indicates an expected call of FindByNames.
|
||
|
func (mr *MockGetPermissionMockRecorder) FindByNames(ctx, names any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindByNames", reflect.TypeOf((*MockGetPermission)(nil).FindByNames), ctx, names)
|
||
|
}
|
||
|
|
||
|
// FindOne mocks base method.
|
||
|
func (m *MockGetPermission) FindOne(ctx context.Context, query repository.PermissionQuery) (entity.Permission, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "FindOne", ctx, query)
|
||
|
ret0, _ := ret[0].(entity.Permission)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// FindOne indicates an expected call of FindOne.
|
||
|
func (mr *MockGetPermissionMockRecorder) FindOne(ctx, query any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOne", reflect.TypeOf((*MockGetPermission)(nil).FindOne), ctx, query)
|
||
|
}
|
||
|
|
||
|
// GetAll mocks base method.
|
||
|
func (m *MockGetPermission) GetAll(ctx context.Context, status *permission.Status) ([]entity.Permission, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "GetAll", ctx, status)
|
||
|
ret0, _ := ret[0].([]entity.Permission)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// GetAll indicates an expected call of GetAll.
|
||
|
func (mr *MockGetPermissionMockRecorder) GetAll(ctx, status any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAll", reflect.TypeOf((*MockGetPermission)(nil).GetAll), ctx, status)
|
||
|
}
|
||
|
|
||
|
// GetAllIntoIDMap mocks base method.
|
||
|
func (m *MockGetPermission) GetAllIntoIDMap(ctx context.Context, status *permission.Status) (map[string]entity.Permission, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "GetAllIntoIDMap", ctx, status)
|
||
|
ret0, _ := ret[0].(map[string]entity.Permission)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// GetAllIntoIDMap indicates an expected call of GetAllIntoIDMap.
|
||
|
func (mr *MockGetPermissionMockRecorder) GetAllIntoIDMap(ctx, status any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAllIntoIDMap", reflect.TypeOf((*MockGetPermission)(nil).GetAllIntoIDMap), ctx, status)
|
||
|
}
|
||
|
|
||
|
// MockIndex is a mock of Index interface.
|
||
|
type MockIndex struct {
|
||
|
ctrl *gomock.Controller
|
||
|
recorder *MockIndexMockRecorder
|
||
|
isgomock struct{}
|
||
|
}
|
||
|
|
||
|
// MockIndexMockRecorder is the mock recorder for MockIndex.
|
||
|
type MockIndexMockRecorder struct {
|
||
|
mock *MockIndex
|
||
|
}
|
||
|
|
||
|
// NewMockIndex creates a new mock instance.
|
||
|
func NewMockIndex(ctrl *gomock.Controller) *MockIndex {
|
||
|
mock := &MockIndex{ctrl: ctrl}
|
||
|
mock.recorder = &MockIndexMockRecorder{mock}
|
||
|
return mock
|
||
|
}
|
||
|
|
||
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
||
|
func (m *MockIndex) EXPECT() *MockIndexMockRecorder {
|
||
|
return m.recorder
|
||
|
}
|
||
|
|
||
|
// Index20250214UP mocks base method.
|
||
|
func (m *MockIndex) Index20250214UP(ctx context.Context) (*mongo.Cursor, error) {
|
||
|
m.ctrl.T.Helper()
|
||
|
ret := m.ctrl.Call(m, "Index20250214UP", ctx)
|
||
|
ret0, _ := ret[0].(*mongo.Cursor)
|
||
|
ret1, _ := ret[1].(error)
|
||
|
return ret0, ret1
|
||
|
}
|
||
|
|
||
|
// Index20250214UP indicates an expected call of Index20250214UP.
|
||
|
func (mr *MockIndexMockRecorder) Index20250214UP(ctx any) *gomock.Call {
|
||
|
mr.mock.ctrl.T.Helper()
|
||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Index20250214UP", reflect.TypeOf((*MockIndex)(nil).Index20250214UP), ctx)
|
||
|
}
|