backend/pkg/permission/mock/repository/permission.go

165 lines
6.2 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: ./pkg/permission/domain/repository/permission.go
//
// Generated by this command:
//
// mockgen -source=./pkg/permission/domain/repository/permission.go -destination=./pkg/permission/mock/repository/permission.go -package=mock
//
// Package mock is a generated GoMock package.
package mock
import (
entity "backend/pkg/permission/domain/entity"
repository "backend/pkg/permission/domain/repository"
context "context"
reflect "reflect"
mongo "go.mongodb.org/mongo-driver/v2/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
}
// FindByHTTP mocks base method.
func (m *MockPermissionRepository) FindByHTTP(ctx context.Context, path, method string) (*entity.Permission, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FindByHTTP", ctx, path, method)
ret0, _ := ret[0].(*entity.Permission)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// FindByHTTP indicates an expected call of FindByHTTP.
func (mr *MockPermissionRepositoryMockRecorder) FindByHTTP(ctx, path, method any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindByHTTP", reflect.TypeOf((*MockPermissionRepository)(nil).FindByHTTP), ctx, path, method)
}
// FindByName mocks base method.
func (m *MockPermissionRepository) FindByName(ctx context.Context, name string) (*entity.Permission, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FindByName", ctx, name)
ret0, _ := ret[0].(*entity.Permission)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// FindByName indicates an expected call of FindByName.
func (mr *MockPermissionRepositoryMockRecorder) FindByName(ctx, name any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindByName", reflect.TypeOf((*MockPermissionRepository)(nil).FindByName), ctx, name)
}
// FindOne mocks base method.
func (m *MockPermissionRepository) FindOne(ctx context.Context, id string) (*entity.Permission, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FindOne", ctx, id)
ret0, _ := ret[0].(*entity.Permission)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// FindOne indicates an expected call of FindOne.
func (mr *MockPermissionRepositoryMockRecorder) FindOne(ctx, id any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOne", reflect.TypeOf((*MockPermissionRepository)(nil).FindOne), ctx, id)
}
// GetByNames mocks base method.
func (m *MockPermissionRepository) GetByNames(ctx context.Context, names []string) ([]*entity.Permission, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetByNames", ctx, names)
ret0, _ := ret[0].([]*entity.Permission)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetByNames indicates an expected call of GetByNames.
func (mr *MockPermissionRepositoryMockRecorder) GetByNames(ctx, names any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetByNames", reflect.TypeOf((*MockPermissionRepository)(nil).GetByNames), ctx, names)
}
// GetChildren mocks base method.
func (m *MockPermissionRepository) GetChildren(ctx context.Context, parentID int64) ([]*entity.Permission, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "GetChildren", ctx, parentID)
ret0, _ := ret[0].([]*entity.Permission)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// GetChildren indicates an expected call of GetChildren.
func (mr *MockPermissionRepositoryMockRecorder) GetChildren(ctx, parentID any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetChildren", reflect.TypeOf((*MockPermissionRepository)(nil).GetChildren), ctx, parentID)
}
// Index20251009001UP mocks base method.
func (m *MockPermissionRepository) Index20251009001UP(ctx context.Context) (*mongo.Cursor, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Index20251009001UP", ctx)
ret0, _ := ret[0].(*mongo.Cursor)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// Index20251009001UP indicates an expected call of Index20251009001UP.
func (mr *MockPermissionRepositoryMockRecorder) Index20251009001UP(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Index20251009001UP", reflect.TypeOf((*MockPermissionRepository)(nil).Index20251009001UP), ctx)
}
// List mocks base method.
func (m *MockPermissionRepository) List(ctx context.Context, filter repository.PermissionFilter) ([]*entity.Permission, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "List", ctx, filter)
ret0, _ := ret[0].([]*entity.Permission)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// List indicates an expected call of List.
func (mr *MockPermissionRepositoryMockRecorder) List(ctx, filter any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "List", reflect.TypeOf((*MockPermissionRepository)(nil).List), ctx, filter)
}
// ListActive mocks base method.
func (m *MockPermissionRepository) ListActive(ctx context.Context) ([]*entity.Permission, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "ListActive", ctx)
ret0, _ := ret[0].([]*entity.Permission)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// ListActive indicates an expected call of ListActive.
func (mr *MockPermissionRepositoryMockRecorder) ListActive(ctx any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListActive", reflect.TypeOf((*MockPermissionRepository)(nil).ListActive), ctx)
}