Documentation
¶
Index ¶
- type MockCollection
- func (_mock *MockCollection) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error)
- func (_mock *MockCollection) BulkWrite(ctx context.Context, models []mongo.WriteModel, ...) (*mongo.BulkWriteResult, error)
- func (_mock *MockCollection) CountDocuments(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
- func (_mock *MockCollection) Database() *mongo.Database
- func (_mock *MockCollection) DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (_mock *MockCollection) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (_mock *MockCollection) Distinct(ctx context.Context, fieldName string, filter interface{}, ...) ([]interface{}, error)
- func (_mock *MockCollection) Drop(ctx context.Context) error
- func (_m *MockCollection) EXPECT() *MockCollection_Expecter
- func (_mock *MockCollection) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error)
- func (_mock *MockCollection) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
- func (_mock *MockCollection) FindOneAndDelete(ctx context.Context, filter interface{}, ...) *mongo.SingleResult
- func (_mock *MockCollection) FindOneAndReplace(ctx context.Context, filter interface{}, replacement interface{}, ...) *mongo.SingleResult
- func (_mock *MockCollection) FindOneAndUpdate(ctx context.Context, filter interface{}, update interface{}, ...) *mongo.SingleResult
- func (_mock *MockCollection) Indexes() mongo.IndexView
- func (_mock *MockCollection) InsertMany(ctx context.Context, documents []interface{}, ...) (*mongo.InsertManyResult, error)
- func (_mock *MockCollection) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
- func (_mock *MockCollection) Name() string
- func (_mock *MockCollection) ReplaceOne(ctx context.Context, filter interface{}, replacement interface{}, ...) (*mongo.UpdateResult, error)
- func (_mock *MockCollection) UpdateMany(ctx context.Context, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- func (_mock *MockCollection) UpdateOne(ctx context.Context, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- type MockCollection_Aggregate_Call
- type MockCollection_BulkWrite_Call
- func (_c *MockCollection_BulkWrite_Call) Return(bulkWriteResult *mongo.BulkWriteResult, err error) *MockCollection_BulkWrite_Call
- func (_c *MockCollection_BulkWrite_Call) Run(run func(ctx context.Context, models []mongo.WriteModel, ...)) *MockCollection_BulkWrite_Call
- func (_c *MockCollection_BulkWrite_Call) RunAndReturn(...) *MockCollection_BulkWrite_Call
- type MockCollection_CountDocuments_Call
- type MockCollection_Database_Call
- type MockCollection_DeleteMany_Call
- func (_c *MockCollection_DeleteMany_Call) Return(deleteResult *mongo.DeleteResult, err error) *MockCollection_DeleteMany_Call
- func (_c *MockCollection_DeleteMany_Call) Run(...) *MockCollection_DeleteMany_Call
- func (_c *MockCollection_DeleteMany_Call) RunAndReturn(...) *MockCollection_DeleteMany_Call
- type MockCollection_DeleteOne_Call
- type MockCollection_Distinct_Call
- func (_c *MockCollection_Distinct_Call) Return(ifaceVals []interface{}, err error) *MockCollection_Distinct_Call
- func (_c *MockCollection_Distinct_Call) Run(run func(ctx context.Context, fieldName string, filter interface{}, ...)) *MockCollection_Distinct_Call
- func (_c *MockCollection_Distinct_Call) RunAndReturn(...) *MockCollection_Distinct_Call
- type MockCollection_Drop_Call
- type MockCollection_Expecter
- func (_e *MockCollection_Expecter) Aggregate(ctx interface{}, pipeline interface{}, opts ...interface{}) *MockCollection_Aggregate_Call
- func (_e *MockCollection_Expecter) BulkWrite(ctx interface{}, models interface{}, opts ...interface{}) *MockCollection_BulkWrite_Call
- func (_e *MockCollection_Expecter) CountDocuments(ctx interface{}, filter interface{}, opts ...interface{}) *MockCollection_CountDocuments_Call
- func (_e *MockCollection_Expecter) Database() *MockCollection_Database_Call
- func (_e *MockCollection_Expecter) DeleteMany(ctx interface{}, filter interface{}, opts ...interface{}) *MockCollection_DeleteMany_Call
- func (_e *MockCollection_Expecter) DeleteOne(ctx interface{}, filter interface{}, opts ...interface{}) *MockCollection_DeleteOne_Call
- func (_e *MockCollection_Expecter) Distinct(ctx interface{}, fieldName interface{}, filter interface{}, ...) *MockCollection_Distinct_Call
- func (_e *MockCollection_Expecter) Drop(ctx interface{}) *MockCollection_Drop_Call
- func (_e *MockCollection_Expecter) Find(ctx interface{}, filter interface{}, opts ...interface{}) *MockCollection_Find_Call
- func (_e *MockCollection_Expecter) FindOne(ctx interface{}, filter interface{}, opts ...interface{}) *MockCollection_FindOne_Call
- func (_e *MockCollection_Expecter) FindOneAndDelete(ctx interface{}, filter interface{}, opts ...interface{}) *MockCollection_FindOneAndDelete_Call
- func (_e *MockCollection_Expecter) FindOneAndReplace(ctx interface{}, filter interface{}, replacement interface{}, ...) *MockCollection_FindOneAndReplace_Call
- func (_e *MockCollection_Expecter) FindOneAndUpdate(ctx interface{}, filter interface{}, update interface{}, opts ...interface{}) *MockCollection_FindOneAndUpdate_Call
- func (_e *MockCollection_Expecter) Indexes() *MockCollection_Indexes_Call
- func (_e *MockCollection_Expecter) InsertMany(ctx interface{}, documents interface{}, opts ...interface{}) *MockCollection_InsertMany_Call
- func (_e *MockCollection_Expecter) InsertOne(ctx interface{}, document interface{}, opts ...interface{}) *MockCollection_InsertOne_Call
- func (_e *MockCollection_Expecter) Name() *MockCollection_Name_Call
- func (_e *MockCollection_Expecter) ReplaceOne(ctx interface{}, filter interface{}, replacement interface{}, ...) *MockCollection_ReplaceOne_Call
- func (_e *MockCollection_Expecter) UpdateMany(ctx interface{}, filter interface{}, update interface{}, opts ...interface{}) *MockCollection_UpdateMany_Call
- func (_e *MockCollection_Expecter) UpdateOne(ctx interface{}, filter interface{}, update interface{}, opts ...interface{}) *MockCollection_UpdateOne_Call
- type MockCollection_FindOneAndDelete_Call
- func (_c *MockCollection_FindOneAndDelete_Call) Return(singleResult *mongo.SingleResult) *MockCollection_FindOneAndDelete_Call
- func (_c *MockCollection_FindOneAndDelete_Call) Run(run func(ctx context.Context, filter interface{}, ...)) *MockCollection_FindOneAndDelete_Call
- func (_c *MockCollection_FindOneAndDelete_Call) RunAndReturn(run func(ctx context.Context, filter interface{}, ...) *mongo.SingleResult) *MockCollection_FindOneAndDelete_Call
- type MockCollection_FindOneAndReplace_Call
- func (_c *MockCollection_FindOneAndReplace_Call) Return(singleResult *mongo.SingleResult) *MockCollection_FindOneAndReplace_Call
- func (_c *MockCollection_FindOneAndReplace_Call) Run(...) *MockCollection_FindOneAndReplace_Call
- func (_c *MockCollection_FindOneAndReplace_Call) RunAndReturn(...) *MockCollection_FindOneAndReplace_Call
- type MockCollection_FindOneAndUpdate_Call
- func (_c *MockCollection_FindOneAndUpdate_Call) Return(singleResult *mongo.SingleResult) *MockCollection_FindOneAndUpdate_Call
- func (_c *MockCollection_FindOneAndUpdate_Call) Run(run func(ctx context.Context, filter interface{}, update interface{}, ...)) *MockCollection_FindOneAndUpdate_Call
- func (_c *MockCollection_FindOneAndUpdate_Call) RunAndReturn(...) *MockCollection_FindOneAndUpdate_Call
- type MockCollection_FindOne_Call
- type MockCollection_Find_Call
- type MockCollection_Indexes_Call
- type MockCollection_InsertMany_Call
- func (_c *MockCollection_InsertMany_Call) Return(insertManyResult *mongo.InsertManyResult, err error) *MockCollection_InsertMany_Call
- func (_c *MockCollection_InsertMany_Call) Run(run func(ctx context.Context, documents []interface{}, ...)) *MockCollection_InsertMany_Call
- func (_c *MockCollection_InsertMany_Call) RunAndReturn(...) *MockCollection_InsertMany_Call
- type MockCollection_InsertOne_Call
- func (_c *MockCollection_InsertOne_Call) Return(insertOneResult *mongo.InsertOneResult, err error) *MockCollection_InsertOne_Call
- func (_c *MockCollection_InsertOne_Call) Run(...) *MockCollection_InsertOne_Call
- func (_c *MockCollection_InsertOne_Call) RunAndReturn(...) *MockCollection_InsertOne_Call
- type MockCollection_Name_Call
- type MockCollection_ReplaceOne_Call
- func (_c *MockCollection_ReplaceOne_Call) Return(updateResult *mongo.UpdateResult, err error) *MockCollection_ReplaceOne_Call
- func (_c *MockCollection_ReplaceOne_Call) Run(...) *MockCollection_ReplaceOne_Call
- func (_c *MockCollection_ReplaceOne_Call) RunAndReturn(...) *MockCollection_ReplaceOne_Call
- type MockCollection_UpdateMany_Call
- func (_c *MockCollection_UpdateMany_Call) Return(updateResult *mongo.UpdateResult, err error) *MockCollection_UpdateMany_Call
- func (_c *MockCollection_UpdateMany_Call) Run(run func(ctx context.Context, filter interface{}, update interface{}, ...)) *MockCollection_UpdateMany_Call
- func (_c *MockCollection_UpdateMany_Call) RunAndReturn(...) *MockCollection_UpdateMany_Call
- type MockCollection_UpdateOne_Call
- func (_c *MockCollection_UpdateOne_Call) Return(updateResult *mongo.UpdateResult, err error) *MockCollection_UpdateOne_Call
- func (_c *MockCollection_UpdateOne_Call) Run(run func(ctx context.Context, filter interface{}, update interface{}, ...)) *MockCollection_UpdateOne_Call
- func (_c *MockCollection_UpdateOne_Call) RunAndReturn(...) *MockCollection_UpdateOne_Call
- type MockSession
- func (_mock *MockSession) AbortTransaction(ctx context.Context) error
- func (_mock *MockSession) AdvanceClusterTime(raw bson.Raw) error
- func (_mock *MockSession) AdvanceOperationTime(timestamp *primitive.Timestamp) error
- func (_mock *MockSession) Client() *mongo.Client
- func (_mock *MockSession) ClusterTime() bson.Raw
- func (_mock *MockSession) CommitTransaction(ctx context.Context) error
- func (_m *MockSession) EXPECT() *MockSession_Expecter
- func (_mock *MockSession) EndSession(ctx context.Context)
- func (_mock *MockSession) ID() bson.Raw
- func (_mock *MockSession) OperationTime() *primitive.Timestamp
- func (_mock *MockSession) StartTransaction(opts ...*options.TransactionOptions) error
- func (_mock *MockSession) WithTransaction(ctx context.Context, fn func(ctx mongo.SessionContext) (interface{}, error), ...) (interface{}, error)
- type MockSession_AbortTransaction_Call
- func (_c *MockSession_AbortTransaction_Call) Return(err error) *MockSession_AbortTransaction_Call
- func (_c *MockSession_AbortTransaction_Call) Run(run func(ctx context.Context)) *MockSession_AbortTransaction_Call
- func (_c *MockSession_AbortTransaction_Call) RunAndReturn(run func(ctx context.Context) error) *MockSession_AbortTransaction_Call
- type MockSession_AdvanceClusterTime_Call
- func (_c *MockSession_AdvanceClusterTime_Call) Return(err error) *MockSession_AdvanceClusterTime_Call
- func (_c *MockSession_AdvanceClusterTime_Call) Run(run func(raw bson.Raw)) *MockSession_AdvanceClusterTime_Call
- func (_c *MockSession_AdvanceClusterTime_Call) RunAndReturn(run func(raw bson.Raw) error) *MockSession_AdvanceClusterTime_Call
- type MockSession_AdvanceOperationTime_Call
- func (_c *MockSession_AdvanceOperationTime_Call) Return(err error) *MockSession_AdvanceOperationTime_Call
- func (_c *MockSession_AdvanceOperationTime_Call) Run(run func(timestamp *primitive.Timestamp)) *MockSession_AdvanceOperationTime_Call
- func (_c *MockSession_AdvanceOperationTime_Call) RunAndReturn(run func(timestamp *primitive.Timestamp) error) *MockSession_AdvanceOperationTime_Call
- type MockSession_Client_Call
- type MockSession_ClusterTime_Call
- type MockSession_CommitTransaction_Call
- func (_c *MockSession_CommitTransaction_Call) Return(err error) *MockSession_CommitTransaction_Call
- func (_c *MockSession_CommitTransaction_Call) Run(run func(ctx context.Context)) *MockSession_CommitTransaction_Call
- func (_c *MockSession_CommitTransaction_Call) RunAndReturn(run func(ctx context.Context) error) *MockSession_CommitTransaction_Call
- type MockSession_EndSession_Call
- type MockSession_Expecter
- func (_e *MockSession_Expecter) AbortTransaction(ctx interface{}) *MockSession_AbortTransaction_Call
- func (_e *MockSession_Expecter) AdvanceClusterTime(raw interface{}) *MockSession_AdvanceClusterTime_Call
- func (_e *MockSession_Expecter) AdvanceOperationTime(timestamp interface{}) *MockSession_AdvanceOperationTime_Call
- func (_e *MockSession_Expecter) Client() *MockSession_Client_Call
- func (_e *MockSession_Expecter) ClusterTime() *MockSession_ClusterTime_Call
- func (_e *MockSession_Expecter) CommitTransaction(ctx interface{}) *MockSession_CommitTransaction_Call
- func (_e *MockSession_Expecter) EndSession(ctx interface{}) *MockSession_EndSession_Call
- func (_e *MockSession_Expecter) ID() *MockSession_ID_Call
- func (_e *MockSession_Expecter) OperationTime() *MockSession_OperationTime_Call
- func (_e *MockSession_Expecter) StartTransaction(opts ...interface{}) *MockSession_StartTransaction_Call
- func (_e *MockSession_Expecter) WithTransaction(ctx interface{}, fn interface{}, opts ...interface{}) *MockSession_WithTransaction_Call
- type MockSession_ID_Call
- type MockSession_OperationTime_Call
- func (_c *MockSession_OperationTime_Call) Return(timestamp *primitive.Timestamp) *MockSession_OperationTime_Call
- func (_c *MockSession_OperationTime_Call) Run(run func()) *MockSession_OperationTime_Call
- func (_c *MockSession_OperationTime_Call) RunAndReturn(run func() *primitive.Timestamp) *MockSession_OperationTime_Call
- type MockSession_StartTransaction_Call
- func (_c *MockSession_StartTransaction_Call) Return(err error) *MockSession_StartTransaction_Call
- func (_c *MockSession_StartTransaction_Call) Run(run func(opts ...*options.TransactionOptions)) *MockSession_StartTransaction_Call
- func (_c *MockSession_StartTransaction_Call) RunAndReturn(run func(opts ...*options.TransactionOptions) error) *MockSession_StartTransaction_Call
- type MockSession_WithTransaction_Call
- func (_c *MockSession_WithTransaction_Call) Return(ifaceVal interface{}, err error) *MockSession_WithTransaction_Call
- func (_c *MockSession_WithTransaction_Call) Run(...) *MockSession_WithTransaction_Call
- func (_c *MockSession_WithTransaction_Call) RunAndReturn(...) *MockSession_WithTransaction_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockCollection ¶
MockCollection is an autogenerated mock type for the Collection type
func NewMockCollection ¶
func NewMockCollection(t interface {
mock.TestingT
Cleanup(func())
}) *MockCollection
NewMockCollection creates a new instance of MockCollection. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockCollection) Aggregate ¶
func (_mock *MockCollection) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error)
Aggregate provides a mock function for the type MockCollection
func (*MockCollection) BulkWrite ¶
func (_mock *MockCollection) BulkWrite(ctx context.Context, models []mongo.WriteModel, opts ...*options.BulkWriteOptions) (*mongo.BulkWriteResult, error)
BulkWrite provides a mock function for the type MockCollection
func (*MockCollection) CountDocuments ¶
func (_mock *MockCollection) CountDocuments(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
CountDocuments provides a mock function for the type MockCollection
func (*MockCollection) Database ¶
func (_mock *MockCollection) Database() *mongo.Database
Database provides a mock function for the type MockCollection
func (*MockCollection) DeleteMany ¶
func (_mock *MockCollection) DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
DeleteMany provides a mock function for the type MockCollection
func (*MockCollection) DeleteOne ¶
func (_mock *MockCollection) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
DeleteOne provides a mock function for the type MockCollection
func (*MockCollection) Distinct ¶
func (_mock *MockCollection) Distinct(ctx context.Context, fieldName string, filter interface{}, opts ...*options.DistinctOptions) ([]interface{}, error)
Distinct provides a mock function for the type MockCollection
func (*MockCollection) Drop ¶
func (_mock *MockCollection) Drop(ctx context.Context) error
Drop provides a mock function for the type MockCollection
func (*MockCollection) EXPECT ¶
func (_m *MockCollection) EXPECT() *MockCollection_Expecter
func (*MockCollection) Find ¶
func (_mock *MockCollection) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error)
Find provides a mock function for the type MockCollection
func (*MockCollection) FindOne ¶
func (_mock *MockCollection) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
FindOne provides a mock function for the type MockCollection
func (*MockCollection) FindOneAndDelete ¶
func (_mock *MockCollection) FindOneAndDelete(ctx context.Context, filter interface{}, opts ...*options.FindOneAndDeleteOptions) *mongo.SingleResult
FindOneAndDelete provides a mock function for the type MockCollection
func (*MockCollection) FindOneAndReplace ¶
func (_mock *MockCollection) FindOneAndReplace(ctx context.Context, filter interface{}, replacement interface{}, opts ...*options.FindOneAndReplaceOptions) *mongo.SingleResult
FindOneAndReplace provides a mock function for the type MockCollection
func (*MockCollection) FindOneAndUpdate ¶
func (_mock *MockCollection) FindOneAndUpdate(ctx context.Context, filter interface{}, update interface{}, opts ...*options.FindOneAndUpdateOptions) *mongo.SingleResult
FindOneAndUpdate provides a mock function for the type MockCollection
func (*MockCollection) Indexes ¶
func (_mock *MockCollection) Indexes() mongo.IndexView
Indexes provides a mock function for the type MockCollection
func (*MockCollection) InsertMany ¶
func (_mock *MockCollection) InsertMany(ctx context.Context, documents []interface{}, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)
InsertMany provides a mock function for the type MockCollection
func (*MockCollection) InsertOne ¶
func (_mock *MockCollection) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
InsertOne provides a mock function for the type MockCollection
func (*MockCollection) Name ¶
func (_mock *MockCollection) Name() string
Name provides a mock function for the type MockCollection
func (*MockCollection) ReplaceOne ¶
func (_mock *MockCollection) ReplaceOne(ctx context.Context, filter interface{}, replacement interface{}, opts ...*options.ReplaceOptions) (*mongo.UpdateResult, error)
ReplaceOne provides a mock function for the type MockCollection
func (*MockCollection) UpdateMany ¶
func (_mock *MockCollection) UpdateMany(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
UpdateMany provides a mock function for the type MockCollection
func (*MockCollection) UpdateOne ¶
func (_mock *MockCollection) UpdateOne(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
UpdateOne provides a mock function for the type MockCollection
type MockCollection_Aggregate_Call ¶
MockCollection_Aggregate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Aggregate'
func (*MockCollection_Aggregate_Call) Return ¶
func (_c *MockCollection_Aggregate_Call) Return(cursor *mongo.Cursor, err error) *MockCollection_Aggregate_Call
func (*MockCollection_Aggregate_Call) Run ¶
func (_c *MockCollection_Aggregate_Call) Run(run func(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions)) *MockCollection_Aggregate_Call
func (*MockCollection_Aggregate_Call) RunAndReturn ¶
func (_c *MockCollection_Aggregate_Call) RunAndReturn(run func(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error)) *MockCollection_Aggregate_Call
type MockCollection_BulkWrite_Call ¶
MockCollection_BulkWrite_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BulkWrite'
func (*MockCollection_BulkWrite_Call) Return ¶
func (_c *MockCollection_BulkWrite_Call) Return(bulkWriteResult *mongo.BulkWriteResult, err error) *MockCollection_BulkWrite_Call
func (*MockCollection_BulkWrite_Call) Run ¶
func (_c *MockCollection_BulkWrite_Call) Run(run func(ctx context.Context, models []mongo.WriteModel, opts ...*options.BulkWriteOptions)) *MockCollection_BulkWrite_Call
func (*MockCollection_BulkWrite_Call) RunAndReturn ¶
func (_c *MockCollection_BulkWrite_Call) RunAndReturn(run func(ctx context.Context, models []mongo.WriteModel, opts ...*options.BulkWriteOptions) (*mongo.BulkWriteResult, error)) *MockCollection_BulkWrite_Call
type MockCollection_CountDocuments_Call ¶
MockCollection_CountDocuments_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CountDocuments'
func (*MockCollection_CountDocuments_Call) Return ¶
func (_c *MockCollection_CountDocuments_Call) Return(n int64, err error) *MockCollection_CountDocuments_Call
func (*MockCollection_CountDocuments_Call) Run ¶
func (_c *MockCollection_CountDocuments_Call) Run(run func(ctx context.Context, filter interface{}, opts ...*options.CountOptions)) *MockCollection_CountDocuments_Call
func (*MockCollection_CountDocuments_Call) RunAndReturn ¶
func (_c *MockCollection_CountDocuments_Call) RunAndReturn(run func(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)) *MockCollection_CountDocuments_Call
type MockCollection_Database_Call ¶
MockCollection_Database_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Database'
func (*MockCollection_Database_Call) Return ¶
func (_c *MockCollection_Database_Call) Return(database *mongo.Database) *MockCollection_Database_Call
func (*MockCollection_Database_Call) Run ¶
func (_c *MockCollection_Database_Call) Run(run func()) *MockCollection_Database_Call
func (*MockCollection_Database_Call) RunAndReturn ¶
func (_c *MockCollection_Database_Call) RunAndReturn(run func() *mongo.Database) *MockCollection_Database_Call
type MockCollection_DeleteMany_Call ¶
MockCollection_DeleteMany_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteMany'
func (*MockCollection_DeleteMany_Call) Return ¶
func (_c *MockCollection_DeleteMany_Call) Return(deleteResult *mongo.DeleteResult, err error) *MockCollection_DeleteMany_Call
func (*MockCollection_DeleteMany_Call) Run ¶
func (_c *MockCollection_DeleteMany_Call) Run(run func(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions)) *MockCollection_DeleteMany_Call
func (*MockCollection_DeleteMany_Call) RunAndReturn ¶
func (_c *MockCollection_DeleteMany_Call) RunAndReturn(run func(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)) *MockCollection_DeleteMany_Call
type MockCollection_DeleteOne_Call ¶
MockCollection_DeleteOne_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteOne'
func (*MockCollection_DeleteOne_Call) Return ¶
func (_c *MockCollection_DeleteOne_Call) Return(deleteResult *mongo.DeleteResult, err error) *MockCollection_DeleteOne_Call
func (*MockCollection_DeleteOne_Call) Run ¶
func (_c *MockCollection_DeleteOne_Call) Run(run func(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions)) *MockCollection_DeleteOne_Call
func (*MockCollection_DeleteOne_Call) RunAndReturn ¶
func (_c *MockCollection_DeleteOne_Call) RunAndReturn(run func(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)) *MockCollection_DeleteOne_Call
type MockCollection_Distinct_Call ¶
MockCollection_Distinct_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Distinct'
func (*MockCollection_Distinct_Call) Return ¶
func (_c *MockCollection_Distinct_Call) Return(ifaceVals []interface{}, err error) *MockCollection_Distinct_Call
func (*MockCollection_Distinct_Call) Run ¶
func (_c *MockCollection_Distinct_Call) Run(run func(ctx context.Context, fieldName string, filter interface{}, opts ...*options.DistinctOptions)) *MockCollection_Distinct_Call
func (*MockCollection_Distinct_Call) RunAndReturn ¶
func (_c *MockCollection_Distinct_Call) RunAndReturn(run func(ctx context.Context, fieldName string, filter interface{}, opts ...*options.DistinctOptions) ([]interface{}, error)) *MockCollection_Distinct_Call
type MockCollection_Drop_Call ¶
MockCollection_Drop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Drop'
func (*MockCollection_Drop_Call) Return ¶
func (_c *MockCollection_Drop_Call) Return(err error) *MockCollection_Drop_Call
func (*MockCollection_Drop_Call) Run ¶
func (_c *MockCollection_Drop_Call) Run(run func(ctx context.Context)) *MockCollection_Drop_Call
func (*MockCollection_Drop_Call) RunAndReturn ¶
func (_c *MockCollection_Drop_Call) RunAndReturn(run func(ctx context.Context) error) *MockCollection_Drop_Call
type MockCollection_Expecter ¶
type MockCollection_Expecter struct {
// contains filtered or unexported fields
}
func (*MockCollection_Expecter) Aggregate ¶
func (_e *MockCollection_Expecter) Aggregate(ctx interface{}, pipeline interface{}, opts ...interface{}) *MockCollection_Aggregate_Call
Aggregate is a helper method to define mock.On call
- ctx context.Context
- pipeline interface{}
- opts ...*options.AggregateOptions
func (*MockCollection_Expecter) BulkWrite ¶
func (_e *MockCollection_Expecter) BulkWrite(ctx interface{}, models interface{}, opts ...interface{}) *MockCollection_BulkWrite_Call
BulkWrite is a helper method to define mock.On call
- ctx context.Context
- models []mongo.WriteModel
- opts ...*options.BulkWriteOptions
func (*MockCollection_Expecter) CountDocuments ¶
func (_e *MockCollection_Expecter) CountDocuments(ctx interface{}, filter interface{}, opts ...interface{}) *MockCollection_CountDocuments_Call
CountDocuments is a helper method to define mock.On call
- ctx context.Context
- filter interface{}
- opts ...*options.CountOptions
func (*MockCollection_Expecter) Database ¶
func (_e *MockCollection_Expecter) Database() *MockCollection_Database_Call
Database is a helper method to define mock.On call
func (*MockCollection_Expecter) DeleteMany ¶
func (_e *MockCollection_Expecter) DeleteMany(ctx interface{}, filter interface{}, opts ...interface{}) *MockCollection_DeleteMany_Call
DeleteMany is a helper method to define mock.On call
- ctx context.Context
- filter interface{}
- opts ...*options.DeleteOptions
func (*MockCollection_Expecter) DeleteOne ¶
func (_e *MockCollection_Expecter) DeleteOne(ctx interface{}, filter interface{}, opts ...interface{}) *MockCollection_DeleteOne_Call
DeleteOne is a helper method to define mock.On call
- ctx context.Context
- filter interface{}
- opts ...*options.DeleteOptions
func (*MockCollection_Expecter) Distinct ¶
func (_e *MockCollection_Expecter) Distinct(ctx interface{}, fieldName interface{}, filter interface{}, opts ...interface{}) *MockCollection_Distinct_Call
Distinct is a helper method to define mock.On call
- ctx context.Context
- fieldName string
- filter interface{}
- opts ...*options.DistinctOptions
func (*MockCollection_Expecter) Drop ¶
func (_e *MockCollection_Expecter) Drop(ctx interface{}) *MockCollection_Drop_Call
Drop is a helper method to define mock.On call
- ctx context.Context
func (*MockCollection_Expecter) Find ¶
func (_e *MockCollection_Expecter) Find(ctx interface{}, filter interface{}, opts ...interface{}) *MockCollection_Find_Call
Find is a helper method to define mock.On call
- ctx context.Context
- filter interface{}
- opts ...*options.FindOptions
func (*MockCollection_Expecter) FindOne ¶
func (_e *MockCollection_Expecter) FindOne(ctx interface{}, filter interface{}, opts ...interface{}) *MockCollection_FindOne_Call
FindOne is a helper method to define mock.On call
- ctx context.Context
- filter interface{}
- opts ...*options.FindOneOptions
func (*MockCollection_Expecter) FindOneAndDelete ¶
func (_e *MockCollection_Expecter) FindOneAndDelete(ctx interface{}, filter interface{}, opts ...interface{}) *MockCollection_FindOneAndDelete_Call
FindOneAndDelete is a helper method to define mock.On call
- ctx context.Context
- filter interface{}
- opts ...*options.FindOneAndDeleteOptions
func (*MockCollection_Expecter) FindOneAndReplace ¶
func (_e *MockCollection_Expecter) FindOneAndReplace(ctx interface{}, filter interface{}, replacement interface{}, opts ...interface{}) *MockCollection_FindOneAndReplace_Call
FindOneAndReplace is a helper method to define mock.On call
- ctx context.Context
- filter interface{}
- replacement interface{}
- opts ...*options.FindOneAndReplaceOptions
func (*MockCollection_Expecter) FindOneAndUpdate ¶
func (_e *MockCollection_Expecter) FindOneAndUpdate(ctx interface{}, filter interface{}, update interface{}, opts ...interface{}) *MockCollection_FindOneAndUpdate_Call
FindOneAndUpdate is a helper method to define mock.On call
- ctx context.Context
- filter interface{}
- update interface{}
- opts ...*options.FindOneAndUpdateOptions
func (*MockCollection_Expecter) Indexes ¶
func (_e *MockCollection_Expecter) Indexes() *MockCollection_Indexes_Call
Indexes is a helper method to define mock.On call
func (*MockCollection_Expecter) InsertMany ¶
func (_e *MockCollection_Expecter) InsertMany(ctx interface{}, documents interface{}, opts ...interface{}) *MockCollection_InsertMany_Call
InsertMany is a helper method to define mock.On call
- ctx context.Context
- documents []interface{}
- opts ...*options.InsertManyOptions
func (*MockCollection_Expecter) InsertOne ¶
func (_e *MockCollection_Expecter) InsertOne(ctx interface{}, document interface{}, opts ...interface{}) *MockCollection_InsertOne_Call
InsertOne is a helper method to define mock.On call
- ctx context.Context
- document interface{}
- opts ...*options.InsertOneOptions
func (*MockCollection_Expecter) Name ¶
func (_e *MockCollection_Expecter) Name() *MockCollection_Name_Call
Name is a helper method to define mock.On call
func (*MockCollection_Expecter) ReplaceOne ¶
func (_e *MockCollection_Expecter) ReplaceOne(ctx interface{}, filter interface{}, replacement interface{}, opts ...interface{}) *MockCollection_ReplaceOne_Call
ReplaceOne is a helper method to define mock.On call
- ctx context.Context
- filter interface{}
- replacement interface{}
- opts ...*options.ReplaceOptions
func (*MockCollection_Expecter) UpdateMany ¶
func (_e *MockCollection_Expecter) UpdateMany(ctx interface{}, filter interface{}, update interface{}, opts ...interface{}) *MockCollection_UpdateMany_Call
UpdateMany is a helper method to define mock.On call
- ctx context.Context
- filter interface{}
- update interface{}
- opts ...*options.UpdateOptions
func (*MockCollection_Expecter) UpdateOne ¶
func (_e *MockCollection_Expecter) UpdateOne(ctx interface{}, filter interface{}, update interface{}, opts ...interface{}) *MockCollection_UpdateOne_Call
UpdateOne is a helper method to define mock.On call
- ctx context.Context
- filter interface{}
- update interface{}
- opts ...*options.UpdateOptions
type MockCollection_FindOneAndDelete_Call ¶
MockCollection_FindOneAndDelete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindOneAndDelete'
func (*MockCollection_FindOneAndDelete_Call) Return ¶
func (_c *MockCollection_FindOneAndDelete_Call) Return(singleResult *mongo.SingleResult) *MockCollection_FindOneAndDelete_Call
func (*MockCollection_FindOneAndDelete_Call) Run ¶
func (_c *MockCollection_FindOneAndDelete_Call) Run(run func(ctx context.Context, filter interface{}, opts ...*options.FindOneAndDeleteOptions)) *MockCollection_FindOneAndDelete_Call
func (*MockCollection_FindOneAndDelete_Call) RunAndReturn ¶
func (_c *MockCollection_FindOneAndDelete_Call) RunAndReturn(run func(ctx context.Context, filter interface{}, opts ...*options.FindOneAndDeleteOptions) *mongo.SingleResult) *MockCollection_FindOneAndDelete_Call
type MockCollection_FindOneAndReplace_Call ¶
MockCollection_FindOneAndReplace_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindOneAndReplace'
func (*MockCollection_FindOneAndReplace_Call) Return ¶
func (_c *MockCollection_FindOneAndReplace_Call) Return(singleResult *mongo.SingleResult) *MockCollection_FindOneAndReplace_Call
func (*MockCollection_FindOneAndReplace_Call) Run ¶
func (_c *MockCollection_FindOneAndReplace_Call) Run(run func(ctx context.Context, filter interface{}, replacement interface{}, opts ...*options.FindOneAndReplaceOptions)) *MockCollection_FindOneAndReplace_Call
func (*MockCollection_FindOneAndReplace_Call) RunAndReturn ¶
func (_c *MockCollection_FindOneAndReplace_Call) RunAndReturn(run func(ctx context.Context, filter interface{}, replacement interface{}, opts ...*options.FindOneAndReplaceOptions) *mongo.SingleResult) *MockCollection_FindOneAndReplace_Call
type MockCollection_FindOneAndUpdate_Call ¶
MockCollection_FindOneAndUpdate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindOneAndUpdate'
func (*MockCollection_FindOneAndUpdate_Call) Return ¶
func (_c *MockCollection_FindOneAndUpdate_Call) Return(singleResult *mongo.SingleResult) *MockCollection_FindOneAndUpdate_Call
func (*MockCollection_FindOneAndUpdate_Call) Run ¶
func (_c *MockCollection_FindOneAndUpdate_Call) Run(run func(ctx context.Context, filter interface{}, update interface{}, opts ...*options.FindOneAndUpdateOptions)) *MockCollection_FindOneAndUpdate_Call
func (*MockCollection_FindOneAndUpdate_Call) RunAndReturn ¶
func (_c *MockCollection_FindOneAndUpdate_Call) RunAndReturn(run func(ctx context.Context, filter interface{}, update interface{}, opts ...*options.FindOneAndUpdateOptions) *mongo.SingleResult) *MockCollection_FindOneAndUpdate_Call
type MockCollection_FindOne_Call ¶
MockCollection_FindOne_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'FindOne'
func (*MockCollection_FindOne_Call) Return ¶
func (_c *MockCollection_FindOne_Call) Return(singleResult *mongo.SingleResult) *MockCollection_FindOne_Call
func (*MockCollection_FindOne_Call) Run ¶
func (_c *MockCollection_FindOne_Call) Run(run func(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions)) *MockCollection_FindOne_Call
func (*MockCollection_FindOne_Call) RunAndReturn ¶
func (_c *MockCollection_FindOne_Call) RunAndReturn(run func(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult) *MockCollection_FindOne_Call
type MockCollection_Find_Call ¶
MockCollection_Find_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Find'
func (*MockCollection_Find_Call) Return ¶
func (_c *MockCollection_Find_Call) Return(cursor *mongo.Cursor, err error) *MockCollection_Find_Call
func (*MockCollection_Find_Call) Run ¶
func (_c *MockCollection_Find_Call) Run(run func(ctx context.Context, filter interface{}, opts ...*options.FindOptions)) *MockCollection_Find_Call
func (*MockCollection_Find_Call) RunAndReturn ¶
func (_c *MockCollection_Find_Call) RunAndReturn(run func(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error)) *MockCollection_Find_Call
type MockCollection_Indexes_Call ¶
MockCollection_Indexes_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Indexes'
func (*MockCollection_Indexes_Call) Return ¶
func (_c *MockCollection_Indexes_Call) Return(indexView mongo.IndexView) *MockCollection_Indexes_Call
func (*MockCollection_Indexes_Call) Run ¶
func (_c *MockCollection_Indexes_Call) Run(run func()) *MockCollection_Indexes_Call
func (*MockCollection_Indexes_Call) RunAndReturn ¶
func (_c *MockCollection_Indexes_Call) RunAndReturn(run func() mongo.IndexView) *MockCollection_Indexes_Call
type MockCollection_InsertMany_Call ¶
MockCollection_InsertMany_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertMany'
func (*MockCollection_InsertMany_Call) Return ¶
func (_c *MockCollection_InsertMany_Call) Return(insertManyResult *mongo.InsertManyResult, err error) *MockCollection_InsertMany_Call
func (*MockCollection_InsertMany_Call) Run ¶
func (_c *MockCollection_InsertMany_Call) Run(run func(ctx context.Context, documents []interface{}, opts ...*options.InsertManyOptions)) *MockCollection_InsertMany_Call
func (*MockCollection_InsertMany_Call) RunAndReturn ¶
func (_c *MockCollection_InsertMany_Call) RunAndReturn(run func(ctx context.Context, documents []interface{}, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)) *MockCollection_InsertMany_Call
type MockCollection_InsertOne_Call ¶
MockCollection_InsertOne_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InsertOne'
func (*MockCollection_InsertOne_Call) Return ¶
func (_c *MockCollection_InsertOne_Call) Return(insertOneResult *mongo.InsertOneResult, err error) *MockCollection_InsertOne_Call
func (*MockCollection_InsertOne_Call) Run ¶
func (_c *MockCollection_InsertOne_Call) Run(run func(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions)) *MockCollection_InsertOne_Call
func (*MockCollection_InsertOne_Call) RunAndReturn ¶
func (_c *MockCollection_InsertOne_Call) RunAndReturn(run func(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)) *MockCollection_InsertOne_Call
type MockCollection_Name_Call ¶
MockCollection_Name_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Name'
func (*MockCollection_Name_Call) Return ¶
func (_c *MockCollection_Name_Call) Return(s string) *MockCollection_Name_Call
func (*MockCollection_Name_Call) Run ¶
func (_c *MockCollection_Name_Call) Run(run func()) *MockCollection_Name_Call
func (*MockCollection_Name_Call) RunAndReturn ¶
func (_c *MockCollection_Name_Call) RunAndReturn(run func() string) *MockCollection_Name_Call
type MockCollection_ReplaceOne_Call ¶
MockCollection_ReplaceOne_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReplaceOne'
func (*MockCollection_ReplaceOne_Call) Return ¶
func (_c *MockCollection_ReplaceOne_Call) Return(updateResult *mongo.UpdateResult, err error) *MockCollection_ReplaceOne_Call
func (*MockCollection_ReplaceOne_Call) Run ¶
func (_c *MockCollection_ReplaceOne_Call) Run(run func(ctx context.Context, filter interface{}, replacement interface{}, opts ...*options.ReplaceOptions)) *MockCollection_ReplaceOne_Call
func (*MockCollection_ReplaceOne_Call) RunAndReturn ¶
func (_c *MockCollection_ReplaceOne_Call) RunAndReturn(run func(ctx context.Context, filter interface{}, replacement interface{}, opts ...*options.ReplaceOptions) (*mongo.UpdateResult, error)) *MockCollection_ReplaceOne_Call
type MockCollection_UpdateMany_Call ¶
MockCollection_UpdateMany_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateMany'
func (*MockCollection_UpdateMany_Call) Return ¶
func (_c *MockCollection_UpdateMany_Call) Return(updateResult *mongo.UpdateResult, err error) *MockCollection_UpdateMany_Call
func (*MockCollection_UpdateMany_Call) Run ¶
func (_c *MockCollection_UpdateMany_Call) Run(run func(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions)) *MockCollection_UpdateMany_Call
func (*MockCollection_UpdateMany_Call) RunAndReturn ¶
func (_c *MockCollection_UpdateMany_Call) RunAndReturn(run func(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)) *MockCollection_UpdateMany_Call
type MockCollection_UpdateOne_Call ¶
MockCollection_UpdateOne_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateOne'
func (*MockCollection_UpdateOne_Call) Return ¶
func (_c *MockCollection_UpdateOne_Call) Return(updateResult *mongo.UpdateResult, err error) *MockCollection_UpdateOne_Call
func (*MockCollection_UpdateOne_Call) Run ¶
func (_c *MockCollection_UpdateOne_Call) Run(run func(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions)) *MockCollection_UpdateOne_Call
func (*MockCollection_UpdateOne_Call) RunAndReturn ¶
func (_c *MockCollection_UpdateOne_Call) RunAndReturn(run func(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)) *MockCollection_UpdateOne_Call
type MockSession ¶
MockSession is an autogenerated mock type for the Session type
func NewMockSession ¶
func NewMockSession(t interface {
mock.TestingT
Cleanup(func())
}) *MockSession
NewMockSession creates a new instance of MockSession. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockSession) AbortTransaction ¶
func (_mock *MockSession) AbortTransaction(ctx context.Context) error
AbortTransaction provides a mock function for the type MockSession
func (*MockSession) AdvanceClusterTime ¶
func (_mock *MockSession) AdvanceClusterTime(raw bson.Raw) error
AdvanceClusterTime provides a mock function for the type MockSession
func (*MockSession) AdvanceOperationTime ¶
func (_mock *MockSession) AdvanceOperationTime(timestamp *primitive.Timestamp) error
AdvanceOperationTime provides a mock function for the type MockSession
func (*MockSession) Client ¶
func (_mock *MockSession) Client() *mongo.Client
Client provides a mock function for the type MockSession
func (*MockSession) ClusterTime ¶
func (_mock *MockSession) ClusterTime() bson.Raw
ClusterTime provides a mock function for the type MockSession
func (*MockSession) CommitTransaction ¶
func (_mock *MockSession) CommitTransaction(ctx context.Context) error
CommitTransaction provides a mock function for the type MockSession
func (*MockSession) EXPECT ¶
func (_m *MockSession) EXPECT() *MockSession_Expecter
func (*MockSession) EndSession ¶
func (_mock *MockSession) EndSession(ctx context.Context)
EndSession provides a mock function for the type MockSession
func (*MockSession) ID ¶
func (_mock *MockSession) ID() bson.Raw
ID provides a mock function for the type MockSession
func (*MockSession) OperationTime ¶
func (_mock *MockSession) OperationTime() *primitive.Timestamp
OperationTime provides a mock function for the type MockSession
func (*MockSession) StartTransaction ¶
func (_mock *MockSession) StartTransaction(opts ...*options.TransactionOptions) error
StartTransaction provides a mock function for the type MockSession
func (*MockSession) WithTransaction ¶
func (_mock *MockSession) WithTransaction(ctx context.Context, fn func(ctx mongo.SessionContext) (interface{}, error), opts ...*options.TransactionOptions) (interface{}, error)
WithTransaction provides a mock function for the type MockSession
type MockSession_AbortTransaction_Call ¶
MockSession_AbortTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AbortTransaction'
func (*MockSession_AbortTransaction_Call) Return ¶
func (_c *MockSession_AbortTransaction_Call) Return(err error) *MockSession_AbortTransaction_Call
func (*MockSession_AbortTransaction_Call) Run ¶
func (_c *MockSession_AbortTransaction_Call) Run(run func(ctx context.Context)) *MockSession_AbortTransaction_Call
func (*MockSession_AbortTransaction_Call) RunAndReturn ¶
func (_c *MockSession_AbortTransaction_Call) RunAndReturn(run func(ctx context.Context) error) *MockSession_AbortTransaction_Call
type MockSession_AdvanceClusterTime_Call ¶
MockSession_AdvanceClusterTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AdvanceClusterTime'
func (*MockSession_AdvanceClusterTime_Call) Return ¶
func (_c *MockSession_AdvanceClusterTime_Call) Return(err error) *MockSession_AdvanceClusterTime_Call
func (*MockSession_AdvanceClusterTime_Call) Run ¶
func (_c *MockSession_AdvanceClusterTime_Call) Run(run func(raw bson.Raw)) *MockSession_AdvanceClusterTime_Call
func (*MockSession_AdvanceClusterTime_Call) RunAndReturn ¶
func (_c *MockSession_AdvanceClusterTime_Call) RunAndReturn(run func(raw bson.Raw) error) *MockSession_AdvanceClusterTime_Call
type MockSession_AdvanceOperationTime_Call ¶
MockSession_AdvanceOperationTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AdvanceOperationTime'
func (*MockSession_AdvanceOperationTime_Call) Return ¶
func (_c *MockSession_AdvanceOperationTime_Call) Return(err error) *MockSession_AdvanceOperationTime_Call
func (*MockSession_AdvanceOperationTime_Call) Run ¶
func (_c *MockSession_AdvanceOperationTime_Call) Run(run func(timestamp *primitive.Timestamp)) *MockSession_AdvanceOperationTime_Call
func (*MockSession_AdvanceOperationTime_Call) RunAndReturn ¶
func (_c *MockSession_AdvanceOperationTime_Call) RunAndReturn(run func(timestamp *primitive.Timestamp) error) *MockSession_AdvanceOperationTime_Call
type MockSession_Client_Call ¶
MockSession_Client_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Client'
func (*MockSession_Client_Call) Return ¶
func (_c *MockSession_Client_Call) Return(client *mongo.Client) *MockSession_Client_Call
func (*MockSession_Client_Call) Run ¶
func (_c *MockSession_Client_Call) Run(run func()) *MockSession_Client_Call
func (*MockSession_Client_Call) RunAndReturn ¶
func (_c *MockSession_Client_Call) RunAndReturn(run func() *mongo.Client) *MockSession_Client_Call
type MockSession_ClusterTime_Call ¶
MockSession_ClusterTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClusterTime'
func (*MockSession_ClusterTime_Call) Return ¶
func (_c *MockSession_ClusterTime_Call) Return(raw bson.Raw) *MockSession_ClusterTime_Call
func (*MockSession_ClusterTime_Call) Run ¶
func (_c *MockSession_ClusterTime_Call) Run(run func()) *MockSession_ClusterTime_Call
func (*MockSession_ClusterTime_Call) RunAndReturn ¶
func (_c *MockSession_ClusterTime_Call) RunAndReturn(run func() bson.Raw) *MockSession_ClusterTime_Call
type MockSession_CommitTransaction_Call ¶
MockSession_CommitTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CommitTransaction'
func (*MockSession_CommitTransaction_Call) Return ¶
func (_c *MockSession_CommitTransaction_Call) Return(err error) *MockSession_CommitTransaction_Call
func (*MockSession_CommitTransaction_Call) Run ¶
func (_c *MockSession_CommitTransaction_Call) Run(run func(ctx context.Context)) *MockSession_CommitTransaction_Call
func (*MockSession_CommitTransaction_Call) RunAndReturn ¶
func (_c *MockSession_CommitTransaction_Call) RunAndReturn(run func(ctx context.Context) error) *MockSession_CommitTransaction_Call
type MockSession_EndSession_Call ¶
MockSession_EndSession_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EndSession'
func (*MockSession_EndSession_Call) Return ¶
func (_c *MockSession_EndSession_Call) Return() *MockSession_EndSession_Call
func (*MockSession_EndSession_Call) Run ¶
func (_c *MockSession_EndSession_Call) Run(run func(ctx context.Context)) *MockSession_EndSession_Call
func (*MockSession_EndSession_Call) RunAndReturn ¶
func (_c *MockSession_EndSession_Call) RunAndReturn(run func(ctx context.Context)) *MockSession_EndSession_Call
type MockSession_Expecter ¶
type MockSession_Expecter struct {
// contains filtered or unexported fields
}
func (*MockSession_Expecter) AbortTransaction ¶
func (_e *MockSession_Expecter) AbortTransaction(ctx interface{}) *MockSession_AbortTransaction_Call
AbortTransaction is a helper method to define mock.On call
- ctx context.Context
func (*MockSession_Expecter) AdvanceClusterTime ¶
func (_e *MockSession_Expecter) AdvanceClusterTime(raw interface{}) *MockSession_AdvanceClusterTime_Call
AdvanceClusterTime is a helper method to define mock.On call
- raw bson.Raw
func (*MockSession_Expecter) AdvanceOperationTime ¶
func (_e *MockSession_Expecter) AdvanceOperationTime(timestamp interface{}) *MockSession_AdvanceOperationTime_Call
AdvanceOperationTime is a helper method to define mock.On call
- timestamp *primitive.Timestamp
func (*MockSession_Expecter) Client ¶
func (_e *MockSession_Expecter) Client() *MockSession_Client_Call
Client is a helper method to define mock.On call
func (*MockSession_Expecter) ClusterTime ¶
func (_e *MockSession_Expecter) ClusterTime() *MockSession_ClusterTime_Call
ClusterTime is a helper method to define mock.On call
func (*MockSession_Expecter) CommitTransaction ¶
func (_e *MockSession_Expecter) CommitTransaction(ctx interface{}) *MockSession_CommitTransaction_Call
CommitTransaction is a helper method to define mock.On call
- ctx context.Context
func (*MockSession_Expecter) EndSession ¶
func (_e *MockSession_Expecter) EndSession(ctx interface{}) *MockSession_EndSession_Call
EndSession is a helper method to define mock.On call
- ctx context.Context
func (*MockSession_Expecter) ID ¶
func (_e *MockSession_Expecter) ID() *MockSession_ID_Call
ID is a helper method to define mock.On call
func (*MockSession_Expecter) OperationTime ¶
func (_e *MockSession_Expecter) OperationTime() *MockSession_OperationTime_Call
OperationTime is a helper method to define mock.On call
func (*MockSession_Expecter) StartTransaction ¶
func (_e *MockSession_Expecter) StartTransaction(opts ...interface{}) *MockSession_StartTransaction_Call
StartTransaction is a helper method to define mock.On call
- opts ...*options.TransactionOptions
func (*MockSession_Expecter) WithTransaction ¶
func (_e *MockSession_Expecter) WithTransaction(ctx interface{}, fn interface{}, opts ...interface{}) *MockSession_WithTransaction_Call
WithTransaction is a helper method to define mock.On call
- ctx context.Context
- fn func(ctx mongo.SessionContext) (interface{}, error)
- opts ...*options.TransactionOptions
type MockSession_ID_Call ¶
MockSession_ID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ID'
func (*MockSession_ID_Call) Return ¶
func (_c *MockSession_ID_Call) Return(raw bson.Raw) *MockSession_ID_Call
func (*MockSession_ID_Call) Run ¶
func (_c *MockSession_ID_Call) Run(run func()) *MockSession_ID_Call
func (*MockSession_ID_Call) RunAndReturn ¶
func (_c *MockSession_ID_Call) RunAndReturn(run func() bson.Raw) *MockSession_ID_Call
type MockSession_OperationTime_Call ¶
MockSession_OperationTime_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'OperationTime'
func (*MockSession_OperationTime_Call) Return ¶
func (_c *MockSession_OperationTime_Call) Return(timestamp *primitive.Timestamp) *MockSession_OperationTime_Call
func (*MockSession_OperationTime_Call) Run ¶
func (_c *MockSession_OperationTime_Call) Run(run func()) *MockSession_OperationTime_Call
func (*MockSession_OperationTime_Call) RunAndReturn ¶
func (_c *MockSession_OperationTime_Call) RunAndReturn(run func() *primitive.Timestamp) *MockSession_OperationTime_Call
type MockSession_StartTransaction_Call ¶
MockSession_StartTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'StartTransaction'
func (*MockSession_StartTransaction_Call) Return ¶
func (_c *MockSession_StartTransaction_Call) Return(err error) *MockSession_StartTransaction_Call
func (*MockSession_StartTransaction_Call) Run ¶
func (_c *MockSession_StartTransaction_Call) Run(run func(opts ...*options.TransactionOptions)) *MockSession_StartTransaction_Call
func (*MockSession_StartTransaction_Call) RunAndReturn ¶
func (_c *MockSession_StartTransaction_Call) RunAndReturn(run func(opts ...*options.TransactionOptions) error) *MockSession_StartTransaction_Call
type MockSession_WithTransaction_Call ¶
MockSession_WithTransaction_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithTransaction'
func (*MockSession_WithTransaction_Call) Return ¶
func (_c *MockSession_WithTransaction_Call) Return(ifaceVal interface{}, err error) *MockSession_WithTransaction_Call
func (*MockSession_WithTransaction_Call) Run ¶
func (_c *MockSession_WithTransaction_Call) Run(run func(ctx context.Context, fn func(ctx mongo.SessionContext) (interface{}, error), opts ...*options.TransactionOptions)) *MockSession_WithTransaction_Call
func (*MockSession_WithTransaction_Call) RunAndReturn ¶
func (_c *MockSession_WithTransaction_Call) RunAndReturn(run func(ctx context.Context, fn func(ctx mongo.SessionContext) (interface{}, error), opts ...*options.TransactionOptions) (interface{}, error)) *MockSession_WithTransaction_Call