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