app-cloudep-tweeting-service/internal/mock/model/comment_model.go

153 lines
5.1 KiB
Go

// Code generated by MockGen. DO NOT EDIT.
// Source: ./internal/model/mongo/comment_model.go
//
// Generated by this command:
//
// mockgen -source=./internal/model/mongo/comment_model.go -destination=./internal/mock/model/comment_model.go -package=mock
//
// Package mock is a generated GoMock package.
package mock
import (
model "app-cloudep-tweeting-service/internal/model/mongo"
context "context"
reflect "reflect"
mongo "go.mongodb.org/mongo-driver/mongo"
gomock "go.uber.org/mock/gomock"
)
// MockCommentModel is a mock of CommentModel interface.
type MockCommentModel struct {
ctrl *gomock.Controller
recorder *MockCommentModelMockRecorder
}
// MockCommentModelMockRecorder is the mock recorder for MockCommentModel.
type MockCommentModelMockRecorder struct {
mock *MockCommentModel
}
// NewMockCommentModel creates a new mock instance.
func NewMockCommentModel(ctrl *gomock.Controller) *MockCommentModel {
mock := &MockCommentModel{ctrl: ctrl}
mock.recorder = &MockCommentModelMockRecorder{mock}
return mock
}
// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockCommentModel) EXPECT() *MockCommentModelMockRecorder {
return m.recorder
}
// Delete mocks base method.
func (m *MockCommentModel) 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 *MockCommentModelMockRecorder) Delete(ctx, id any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Delete", reflect.TypeOf((*MockCommentModel)(nil).Delete), ctx, id)
}
// DeleteMany mocks base method.
func (m *MockCommentModel) DeleteMany(ctx context.Context, id ...string) (int64, error) {
m.ctrl.T.Helper()
varargs := []any{ctx}
for _, a := range id {
varargs = append(varargs, a)
}
ret := m.ctrl.Call(m, "DeleteMany", varargs...)
ret0, _ := ret[0].(int64)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// DeleteMany indicates an expected call of DeleteMany.
func (mr *MockCommentModelMockRecorder) DeleteMany(ctx any, id ...any) *gomock.Call {
mr.mock.ctrl.T.Helper()
varargs := append([]any{ctx}, id...)
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DeleteMany", reflect.TypeOf((*MockCommentModel)(nil).DeleteMany), varargs...)
}
// Find mocks base method.
func (m *MockCommentModel) Find(ctx context.Context, param *model.QueryCommentModelReq) ([]*model.Comment, int64, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "Find", ctx, param)
ret0, _ := ret[0].([]*model.Comment)
ret1, _ := ret[1].(int64)
ret2, _ := ret[2].(error)
return ret0, ret1, ret2
}
// Find indicates an expected call of Find.
func (mr *MockCommentModelMockRecorder) Find(ctx, param any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Find", reflect.TypeOf((*MockCommentModel)(nil).Find), ctx, param)
}
// FindOne mocks base method.
func (m *MockCommentModel) FindOne(ctx context.Context, id string) (*model.Comment, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "FindOne", ctx, id)
ret0, _ := ret[0].(*model.Comment)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// FindOne indicates an expected call of FindOne.
func (mr *MockCommentModelMockRecorder) FindOne(ctx, id any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindOne", reflect.TypeOf((*MockCommentModel)(nil).FindOne), ctx, id)
}
// Insert mocks base method.
func (m *MockCommentModel) Insert(ctx context.Context, data *model.Comment) 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 *MockCommentModelMockRecorder) Insert(ctx, data any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Insert", reflect.TypeOf((*MockCommentModel)(nil).Insert), ctx, data)
}
// Update mocks base method.
func (m *MockCommentModel) Update(ctx context.Context, data *model.Comment) (*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 *MockCommentModelMockRecorder) Update(ctx, data any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Update", reflect.TypeOf((*MockCommentModel)(nil).Update), ctx, data)
}
// UpdateOptional mocks base method.
func (m *MockCommentModel) UpdateOptional(ctx context.Context, data *model.Comment) (*mongo.UpdateResult, error) {
m.ctrl.T.Helper()
ret := m.ctrl.Call(m, "UpdateOptional", ctx, data)
ret0, _ := ret[0].(*mongo.UpdateResult)
ret1, _ := ret[1].(error)
return ret0, ret1
}
// UpdateOptional indicates an expected call of UpdateOptional.
func (mr *MockCommentModelMockRecorder) UpdateOptional(ctx, data any) *gomock.Call {
mr.mock.ctrl.T.Helper()
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateOptional", reflect.TypeOf((*MockCommentModel)(nil).UpdateOptional), ctx, data)
}