Documentation ¶
Overview ¶
Package mocks contains all the mocks for the mongo_operator.go file
Index ¶
- type MongoOperator
- func (m MongoOperator) Aggregate(ctx context.Context, collectionType int, pipeline interface{}, ...) (*mongo.Cursor, error)
- func (m MongoOperator) CountDocuments(ctx context.Context, collectionType int, query bson.D, ...) (int64, error)
- func (m MongoOperator) Create(ctx context.Context, collectionType int, document interface{}) error
- func (m MongoOperator) CreateMany(ctx context.Context, collectionType int, documents []interface{}) error
- func (m MongoOperator) Delete(ctx context.Context, collectionType int, query bson.D, ...) (*mongo.DeleteResult, error)
- func (m MongoOperator) Get(ctx context.Context, collectionType int, query bson.D) (*mongo.SingleResult, error)
- func (m MongoOperator) List(ctx context.Context, collectionType int, query bson.D) (*mongo.Cursor, error)
- func (m MongoOperator) ListCollection(ctx context.Context, mclient *mongo.Client) ([]string, error)
- func (m MongoOperator) ListDataBase(ctx context.Context, mclient *mongo.Client) ([]string, error)
- func (m MongoOperator) Replace(ctx context.Context, collectionType int, query bson.D, replacement interface{}) (*mongo.UpdateResult, error)
- func (m MongoOperator) Update(ctx context.Context, collectionType int, query, update bson.D, ...) (*mongo.UpdateResult, error)
- func (m MongoOperator) UpdateMany(ctx context.Context, collectionType int, query, update bson.D, ...) (*mongo.UpdateResult, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoOperator ¶
MongoOperator is an autogenerated mock type for the MongoOperator type
func (MongoOperator) Aggregate ¶
func (m MongoOperator) Aggregate(ctx context.Context, collectionType int, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error)
Aggregate provides a mock function with given fields: ctx, collectionType, pipeline, opts
func (MongoOperator) CountDocuments ¶
func (m MongoOperator) CountDocuments(ctx context.Context, collectionType int, query bson.D, opts ...*options.CountOptions) (int64, error)
CountDocuments provides a mock function with given fields: ctx, collectionType, query, opts
func (MongoOperator) Create ¶
func (m MongoOperator) Create(ctx context.Context, collectionType int, document interface{}) error
Create provides a mock function with given fields: ctx, collectionType, document
func (MongoOperator) CreateMany ¶
func (m MongoOperator) CreateMany(ctx context.Context, collectionType int, documents []interface{}) error
CreateMany provides a mock function with given fields: ctx, collectionType, documents
func (MongoOperator) Delete ¶
func (m MongoOperator) Delete(ctx context.Context, collectionType int, query bson.D, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
Delete provides a mock function with given fields: ctx, collectionType, query, opts
func (MongoOperator) Get ¶
func (m MongoOperator) Get(ctx context.Context, collectionType int, query bson.D) (*mongo.SingleResult, error)
Get provides a mock function with given fields: ctx, collectionType, query
func (MongoOperator) List ¶
func (m MongoOperator) List(ctx context.Context, collectionType int, query bson.D) (*mongo.Cursor, error)
List provides a mock function with given fields: ctx, collectionType, query
func (MongoOperator) ListCollection ¶
ListCollection provides a mock function with given fields: ctx, mclient
func (MongoOperator) ListDataBase ¶
ListDataBase provides a mock function with given fields: ctx, mclient
func (MongoOperator) Replace ¶
func (m MongoOperator) Replace(ctx context.Context, collectionType int, query bson.D, replacement interface{}) (*mongo.UpdateResult, error)
Replace provides a mock function with given fields: ctx, collectionType, query, replacement
func (MongoOperator) Update ¶
func (m MongoOperator) Update(ctx context.Context, collectionType int, query, update bson.D, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
Update provides a mock function with given fields: ctx, collectionType, query, update, opts
func (MongoOperator) UpdateMany ¶
func (m MongoOperator) UpdateMany(ctx context.Context, collectionType int, query, update bson.D, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
UpdateMany provides a mock function with given fields: ctx, collectionType, query, update, opts