343 lines
12 KiB
Go
343 lines
12 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: ./pkg/domain/repository/user.go
|
|
//
|
|
// Generated by this command:
|
|
//
|
|
// mockgen -source=./pkg/domain/repository/user.go -destination=./pkg/mock/repository/user.go -package=mock
|
|
//
|
|
|
|
// Package mock is a generated GoMock package.
|
|
package mock
|
|
|
|
import (
|
|
entity "app-cloudep-member-server/pkg/domain/entity"
|
|
repository "app-cloudep-member-server/pkg/domain/repository"
|
|
context "context"
|
|
reflect "reflect"
|
|
|
|
mongo "go.mongodb.org/mongo-driver/mongo"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockUserRepository is a mock of UserRepository interface.
|
|
type MockUserRepository struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockUserRepositoryMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockUserRepositoryMockRecorder is the mock recorder for MockUserRepository.
|
|
type MockUserRepositoryMockRecorder struct {
|
|
mock *MockUserRepository
|
|
}
|
|
|
|
// NewMockUserRepository creates a new mock instance.
|
|
func NewMockUserRepository(ctrl *gomock.Controller) *MockUserRepository {
|
|
mock := &MockUserRepository{ctrl: ctrl}
|
|
mock.recorder = &MockUserRepositoryMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockUserRepository) EXPECT() *MockUserRepositoryMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Delete mocks base method.
|
|
func (m *MockUserRepository) Delete(ctx context.Context, id string) (int64, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Delete", ctx, id)
|
|
ret0, _ := ret[0].(int64)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Delete indicates an expected call of Delete.
|
|
func (mr *MockUserRepositoryMockRecorder) Delete(ctx, id any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockUserRepository)(nil).Delete), ctx, id)
|
|
}
|
|
|
|
// FindOne mocks base method.
|
|
func (m *MockUserRepository) FindOne(ctx context.Context, id string) (*entity.User, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "FindOne", ctx, id)
|
|
ret0, _ := ret[0].(*entity.User)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// FindOne indicates an expected call of FindOne.
|
|
func (mr *MockUserRepositoryMockRecorder) FindOne(ctx, id any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOne", reflect.TypeOf((*MockUserRepository)(nil).FindOne), ctx, id)
|
|
}
|
|
|
|
// FindOneByNickName mocks base method.
|
|
func (m *MockUserRepository) FindOneByNickName(ctx context.Context, nickName string) (*entity.User, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "FindOneByNickName", ctx, nickName)
|
|
ret0, _ := ret[0].(*entity.User)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// FindOneByNickName indicates an expected call of FindOneByNickName.
|
|
func (mr *MockUserRepositoryMockRecorder) FindOneByNickName(ctx, nickName any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOneByNickName", reflect.TypeOf((*MockUserRepository)(nil).FindOneByNickName), ctx, nickName)
|
|
}
|
|
|
|
// FindOneByUID mocks base method.
|
|
func (m *MockUserRepository) FindOneByUID(ctx context.Context, uid string) (*entity.User, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "FindOneByUID", ctx, uid)
|
|
ret0, _ := ret[0].(*entity.User)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// FindOneByUID indicates an expected call of FindOneByUID.
|
|
func (mr *MockUserRepositoryMockRecorder) FindOneByUID(ctx, uid any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOneByUID", reflect.TypeOf((*MockUserRepository)(nil).FindOneByUID), ctx, uid)
|
|
}
|
|
|
|
// Index20241226001UP mocks base method.
|
|
func (m *MockUserRepository) Index20241226001UP(ctx context.Context) (*mongo.Cursor, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Index20241226001UP", ctx)
|
|
ret0, _ := ret[0].(*mongo.Cursor)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Index20241226001UP indicates an expected call of Index20241226001UP.
|
|
func (mr *MockUserRepositoryMockRecorder) Index20241226001UP(ctx any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Index20241226001UP", reflect.TypeOf((*MockUserRepository)(nil).Index20241226001UP), ctx)
|
|
}
|
|
|
|
// Insert mocks base method.
|
|
func (m *MockUserRepository) Insert(ctx context.Context, data *entity.User) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Insert", ctx, data)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Insert indicates an expected call of Insert.
|
|
func (mr *MockUserRepositoryMockRecorder) Insert(ctx, data any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Insert", reflect.TypeOf((*MockUserRepository)(nil).Insert), ctx, data)
|
|
}
|
|
|
|
// ListMembers mocks base method.
|
|
func (m *MockUserRepository) ListMembers(ctx context.Context, params *repository.UserQueryParams) ([]*entity.User, int64, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "ListMembers", ctx, params)
|
|
ret0, _ := ret[0].([]*entity.User)
|
|
ret1, _ := ret[1].(int64)
|
|
ret2, _ := ret[2].(error)
|
|
return ret0, ret1, ret2
|
|
}
|
|
|
|
// ListMembers indicates an expected call of ListMembers.
|
|
func (mr *MockUserRepositoryMockRecorder) ListMembers(ctx, params any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ListMembers", reflect.TypeOf((*MockUserRepository)(nil).ListMembers), ctx, params)
|
|
}
|
|
|
|
// Update mocks base method.
|
|
func (m *MockUserRepository) Update(ctx context.Context, data *entity.User) (*mongo.UpdateResult, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Update", ctx, data)
|
|
ret0, _ := ret[0].(*mongo.UpdateResult)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Update indicates an expected call of Update.
|
|
func (mr *MockUserRepositoryMockRecorder) Update(ctx, data any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockUserRepository)(nil).Update), ctx, data)
|
|
}
|
|
|
|
// UpdateEmailVerifyStatus mocks base method.
|
|
func (m *MockUserRepository) UpdateEmailVerifyStatus(ctx context.Context, uid, email string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "UpdateEmailVerifyStatus", ctx, uid, email)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// UpdateEmailVerifyStatus indicates an expected call of UpdateEmailVerifyStatus.
|
|
func (mr *MockUserRepositoryMockRecorder) UpdateEmailVerifyStatus(ctx, uid, email any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateEmailVerifyStatus", reflect.TypeOf((*MockUserRepository)(nil).UpdateEmailVerifyStatus), ctx, uid, email)
|
|
}
|
|
|
|
// UpdatePhoneVerifyStatus mocks base method.
|
|
func (m *MockUserRepository) UpdatePhoneVerifyStatus(ctx context.Context, uid, phone string) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "UpdatePhoneVerifyStatus", ctx, uid, phone)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// UpdatePhoneVerifyStatus indicates an expected call of UpdatePhoneVerifyStatus.
|
|
func (mr *MockUserRepositoryMockRecorder) UpdatePhoneVerifyStatus(ctx, uid, phone any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdatePhoneVerifyStatus", reflect.TypeOf((*MockUserRepository)(nil).UpdatePhoneVerifyStatus), ctx, uid, phone)
|
|
}
|
|
|
|
// UpdateStatus mocks base method.
|
|
func (m *MockUserRepository) UpdateStatus(ctx context.Context, uid string, status int32) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "UpdateStatus", ctx, uid, status)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// UpdateStatus indicates an expected call of UpdateStatus.
|
|
func (mr *MockUserRepositoryMockRecorder) UpdateStatus(ctx, uid, status any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateStatus", reflect.TypeOf((*MockUserRepository)(nil).UpdateStatus), ctx, uid, status)
|
|
}
|
|
|
|
// UpdateUserDetailsByUID mocks base method.
|
|
func (m *MockUserRepository) UpdateUserDetailsByUID(ctx context.Context, data *repository.UpdateUserInfoRequest) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "UpdateUserDetailsByUID", ctx, data)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// UpdateUserDetailsByUID indicates an expected call of UpdateUserDetailsByUID.
|
|
func (mr *MockUserRepositoryMockRecorder) UpdateUserDetailsByUID(ctx, data any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateUserDetailsByUID", reflect.TypeOf((*MockUserRepository)(nil).UpdateUserDetailsByUID), ctx, data)
|
|
}
|
|
|
|
// MockUserIndexUP is a mock of UserIndexUP interface.
|
|
type MockUserIndexUP struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockUserIndexUPMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockUserIndexUPMockRecorder is the mock recorder for MockUserIndexUP.
|
|
type MockUserIndexUPMockRecorder struct {
|
|
mock *MockUserIndexUP
|
|
}
|
|
|
|
// NewMockUserIndexUP creates a new mock instance.
|
|
func NewMockUserIndexUP(ctrl *gomock.Controller) *MockUserIndexUP {
|
|
mock := &MockUserIndexUP{ctrl: ctrl}
|
|
mock.recorder = &MockUserIndexUPMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockUserIndexUP) EXPECT() *MockUserIndexUPMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Index20241226001UP mocks base method.
|
|
func (m *MockUserIndexUP) Index20241226001UP(ctx context.Context) (*mongo.Cursor, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Index20241226001UP", ctx)
|
|
ret0, _ := ret[0].(*mongo.Cursor)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Index20241226001UP indicates an expected call of Index20241226001UP.
|
|
func (mr *MockUserIndexUPMockRecorder) Index20241226001UP(ctx any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Index20241226001UP", reflect.TypeOf((*MockUserIndexUP)(nil).Index20241226001UP), ctx)
|
|
}
|
|
|
|
// MockBaseUserRepository is a mock of BaseUserRepository interface.
|
|
type MockBaseUserRepository struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockBaseUserRepositoryMockRecorder
|
|
isgomock struct{}
|
|
}
|
|
|
|
// MockBaseUserRepositoryMockRecorder is the mock recorder for MockBaseUserRepository.
|
|
type MockBaseUserRepositoryMockRecorder struct {
|
|
mock *MockBaseUserRepository
|
|
}
|
|
|
|
// NewMockBaseUserRepository creates a new mock instance.
|
|
func NewMockBaseUserRepository(ctrl *gomock.Controller) *MockBaseUserRepository {
|
|
mock := &MockBaseUserRepository{ctrl: ctrl}
|
|
mock.recorder = &MockBaseUserRepositoryMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockBaseUserRepository) EXPECT() *MockBaseUserRepositoryMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Delete mocks base method.
|
|
func (m *MockBaseUserRepository) Delete(ctx context.Context, id string) (int64, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Delete", ctx, id)
|
|
ret0, _ := ret[0].(int64)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Delete indicates an expected call of Delete.
|
|
func (mr *MockBaseUserRepositoryMockRecorder) Delete(ctx, id any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockBaseUserRepository)(nil).Delete), ctx, id)
|
|
}
|
|
|
|
// FindOne mocks base method.
|
|
func (m *MockBaseUserRepository) FindOne(ctx context.Context, id string) (*entity.User, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "FindOne", ctx, id)
|
|
ret0, _ := ret[0].(*entity.User)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// FindOne indicates an expected call of FindOne.
|
|
func (mr *MockBaseUserRepositoryMockRecorder) FindOne(ctx, id any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOne", reflect.TypeOf((*MockBaseUserRepository)(nil).FindOne), ctx, id)
|
|
}
|
|
|
|
// Insert mocks base method.
|
|
func (m *MockBaseUserRepository) Insert(ctx context.Context, data *entity.User) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Insert", ctx, data)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Insert indicates an expected call of Insert.
|
|
func (mr *MockBaseUserRepositoryMockRecorder) Insert(ctx, data any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Insert", reflect.TypeOf((*MockBaseUserRepository)(nil).Insert), ctx, data)
|
|
}
|
|
|
|
// Update mocks base method.
|
|
func (m *MockBaseUserRepository) Update(ctx context.Context, data *entity.User) (*mongo.UpdateResult, error) {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Update", ctx, data)
|
|
ret0, _ := ret[0].(*mongo.UpdateResult)
|
|
ret1, _ := ret[1].(error)
|
|
return ret0, ret1
|
|
}
|
|
|
|
// Update indicates an expected call of Update.
|
|
func (mr *MockBaseUserRepositoryMockRecorder) Update(ctx, data any) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockBaseUserRepository)(nil).Update), ctx, data)
|
|
}
|