Documentation ¶
Index ¶
- type CollectionInterface
- func (_m *CollectionInterface) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (database.CursorInterface, error)
- func (_m *CollectionInterface) BulkWrite(ctx context.Context, models []mongo.WriteModel, ...) (*mongo.BulkWriteResult, error)
- func (_m *CollectionInterface) CountDocuments(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
- func (_m *CollectionInterface) DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (_m *CollectionInterface) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (_m *CollectionInterface) Distinct(ctx context.Context, fieldName string, filter interface{}, ...) ([]interface{}, error)
- func (_m *CollectionInterface) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (database.CursorInterface, error)
- func (_m *CollectionInterface) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) database.SingleResultInterface
- func (_m *CollectionInterface) FindOneAndDelete(ctx context.Context, filter interface{}, ...) database.SingleResultInterface
- func (_m *CollectionInterface) FindOneAndReplace(ctx context.Context, filter interface{}, replacement interface{}, ...) database.SingleResultInterface
- func (_m *CollectionInterface) FindOneAndUpdate(ctx context.Context, filter interface{}, update interface{}, ...) database.SingleResultInterface
- func (_m *CollectionInterface) Indexes() mongo.IndexView
- func (_m *CollectionInterface) InsertMany(ctx context.Context, documents []interface{}, ...) (*mongo.InsertManyResult, error)
- func (_m *CollectionInterface) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
- func (_m *CollectionInterface) ReplaceOne(ctx context.Context, filter interface{}, replacement interface{}, ...) (*mongo.UpdateResult, error)
- func (_m *CollectionInterface) UpdateMany(ctx context.Context, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- func (_m *CollectionInterface) UpdateOne(ctx context.Context, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- type CursorInterface
- func (_m *CursorInterface) All(ctx context.Context, results interface{}) error
- func (_m *CursorInterface) Close(ctx context.Context) error
- func (_m *CursorInterface) Decode(val interface{}) error
- func (_m *CursorInterface) Err() error
- func (_m *CursorInterface) ID() int64
- func (_m *CursorInterface) Next(ctx context.Context) bool
- func (_m *CursorInterface) TryNext(ctx context.Context) bool
- type SingleResultInterface
- type SourceInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CollectionInterface ¶
CollectionInterface is an autogenerated mock type for the CollectionInterface type
func (*CollectionInterface) Aggregate ¶
func (_m *CollectionInterface) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (database.CursorInterface, error)
Aggregate provides a mock function with given fields: ctx, pipeline, opts
func (*CollectionInterface) BulkWrite ¶
func (_m *CollectionInterface) BulkWrite(ctx context.Context, models []mongo.WriteModel, opts ...*options.BulkWriteOptions) (*mongo.BulkWriteResult, error)
BulkWrite provides a mock function with given fields: ctx, models, opts
func (*CollectionInterface) CountDocuments ¶
func (_m *CollectionInterface) CountDocuments(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
CountDocuments provides a mock function with given fields: ctx, filter, opts
func (*CollectionInterface) DeleteMany ¶
func (_m *CollectionInterface) DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
DeleteMany provides a mock function with given fields: ctx, filter, opts
func (*CollectionInterface) DeleteOne ¶
func (_m *CollectionInterface) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
DeleteOne provides a mock function with given fields: ctx, filter, opts
func (*CollectionInterface) Distinct ¶
func (_m *CollectionInterface) Distinct(ctx context.Context, fieldName string, filter interface{}, opts ...*options.DistinctOptions) ([]interface{}, error)
Distinct provides a mock function with given fields: ctx, fieldName, filter, opts
func (*CollectionInterface) Find ¶
func (_m *CollectionInterface) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (database.CursorInterface, error)
Find provides a mock function with given fields: ctx, filter, opts
func (*CollectionInterface) FindOne ¶
func (_m *CollectionInterface) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) database.SingleResultInterface
FindOne provides a mock function with given fields: ctx, filter, opts
func (*CollectionInterface) FindOneAndDelete ¶
func (_m *CollectionInterface) FindOneAndDelete(ctx context.Context, filter interface{}, opts ...*options.FindOneAndDeleteOptions) database.SingleResultInterface
FindOneAndDelete provides a mock function with given fields: ctx, filter, opts
func (*CollectionInterface) FindOneAndReplace ¶
func (_m *CollectionInterface) FindOneAndReplace(ctx context.Context, filter interface{}, replacement interface{}, opts ...*options.FindOneAndReplaceOptions) database.SingleResultInterface
FindOneAndReplace provides a mock function with given fields: ctx, filter, replacement, opts
func (*CollectionInterface) FindOneAndUpdate ¶
func (_m *CollectionInterface) FindOneAndUpdate(ctx context.Context, filter interface{}, update interface{}, opts ...*options.FindOneAndUpdateOptions) database.SingleResultInterface
FindOneAndUpdate provides a mock function with given fields: ctx, filter, update, opts
func (*CollectionInterface) Indexes ¶
func (_m *CollectionInterface) Indexes() mongo.IndexView
Indexes provides a mock function with given fields:
func (*CollectionInterface) InsertMany ¶
func (_m *CollectionInterface) InsertMany(ctx context.Context, documents []interface{}, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)
InsertMany provides a mock function with given fields: ctx, documents, opts
func (*CollectionInterface) InsertOne ¶
func (_m *CollectionInterface) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
InsertOne provides a mock function with given fields: ctx, document, opts
func (*CollectionInterface) ReplaceOne ¶
func (_m *CollectionInterface) ReplaceOne(ctx context.Context, filter interface{}, replacement interface{}, opts ...*options.ReplaceOptions) (*mongo.UpdateResult, error)
ReplaceOne provides a mock function with given fields: ctx, filter, replacement, opts
func (*CollectionInterface) UpdateMany ¶
func (_m *CollectionInterface) UpdateMany(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
UpdateMany provides a mock function with given fields: ctx, filter, update, opts
func (*CollectionInterface) UpdateOne ¶
func (_m *CollectionInterface) UpdateOne(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
UpdateOne provides a mock function with given fields: ctx, filter, update, opts
type CursorInterface ¶
CursorInterface is an autogenerated mock type for the CursorInterface type
func (*CursorInterface) All ¶
func (_m *CursorInterface) All(ctx context.Context, results interface{}) error
All provides a mock function with given fields: ctx, results
func (*CursorInterface) Close ¶
func (_m *CursorInterface) Close(ctx context.Context) error
Close provides a mock function with given fields: ctx
func (*CursorInterface) Decode ¶
func (_m *CursorInterface) Decode(val interface{}) error
Decode provides a mock function with given fields: val
func (*CursorInterface) Err ¶
func (_m *CursorInterface) Err() error
Err provides a mock function with given fields:
func (*CursorInterface) ID ¶
func (_m *CursorInterface) ID() int64
ID provides a mock function with given fields:
type SingleResultInterface ¶
SingleResultInterface is an autogenerated mock type for the SingleResultInterface type
func (*SingleResultInterface) Decode ¶
func (_m *SingleResultInterface) Decode(v interface{}) error
Decode provides a mock function with given fields: v
func (*SingleResultInterface) DecodeBytes ¶
func (_m *SingleResultInterface) DecodeBytes() (bson.Raw, error)
DecodeBytes provides a mock function with given fields:
func (*SingleResultInterface) Err ¶
func (_m *SingleResultInterface) Err() error
Err provides a mock function with given fields:
type SourceInterface ¶
SourceInterface is an autogenerated mock type for the SourceInterface type
func (*SourceInterface) Close ¶
func (_m *SourceInterface) Close() error
Close provides a mock function with given fields:
func (*SourceInterface) Collection ¶
func (_m *SourceInterface) Collection(name string) database.CollectionInterface
Collection provides a mock function with given fields: name
func (*SourceInterface) Drop ¶
func (_m *SourceInterface) Drop() error
Drop provides a mock function with given fields: