Documentation
¶
Index ¶
- type MongoClient
- type MongoDB
- type MongoHelper
- func (_m *MongoHelper) AddIndexIfNotExists(ctx context.Context, coll string, name string, keys interface{}) error
- func (_m *MongoHelper) Aggregate(ctx context.Context, coll string, pipeline mongo.Pipeline) ([]primitive.M, error)
- func (_m *MongoHelper) Find(ctx context.Context, coll string, filter interface{}, item interface{}, ...) (pagination.Result, error)
- func (_m *MongoHelper) FindOne(ctx context.Context, coll string, filter interface{}, item interface{})
- func (_m *MongoHelper) GetIDFromInsertOneResult(_a0 *mongo.InsertOneResult) (primitive.ObjectID, error)
- func (_m *MongoHelper) GetIndex(ctx context.Context, coll string, index string) (*primitive.M, error)
- func (_m *MongoHelper) HasIndex(ctx context.Context, coll string, index string) (bool, error)
- func (_m *MongoHelper) InsertOne(ctx context.Context, coll string, item interface{}) (primitive.ObjectID, error)
- func (_m *MongoHelper) NewClient(uri string) (base.MongoClient, error)
- func (_m *MongoHelper) UpdateOne(ctx context.Context, coll string, filter interface{}, item interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MongoClient ¶
MongoClient is an autogenerated mock type for the MongoClient type
func (*MongoClient) Connect ¶
func (_m *MongoClient) Connect(_a0 context.Context) error
Connect provides a mock function with given fields: _a0
func (*MongoClient) Database ¶
func (_m *MongoClient) Database(_a0 string, _a1 ...*options.DatabaseOptions) *mongo.Database
Database provides a mock function with given fields: _a0, _a1
type MongoDB ¶
MongoDB is an autogenerated mock type for the MongoDB type
func (*MongoDB) Collection ¶
func (_m *MongoDB) Collection(_a0 string, _a1 ...*options.CollectionOptions) *mongo.Collection
Collection provides a mock function with given fields: _a0, _a1
type MongoHelper ¶
MongoHelper is an autogenerated mock type for the MongoHelper type
func (*MongoHelper) AddIndexIfNotExists ¶
func (_m *MongoHelper) AddIndexIfNotExists(ctx context.Context, coll string, name string, keys interface{}) error
AddIndexIfNotExists provides a mock function with given fields: ctx, coll, name, keys
func (*MongoHelper) Aggregate ¶
func (_m *MongoHelper) Aggregate(ctx context.Context, coll string, pipeline mongo.Pipeline) ([]primitive.M, error)
Aggregate provides a mock function with given fields: ctx, coll, pipeline
func (*MongoHelper) Find ¶
func (_m *MongoHelper) Find(ctx context.Context, coll string, filter interface{}, item interface{}, opts base.FindOptions) (pagination.Result, error)
Find provides a mock function with given fields: ctx, coll, filter, item, opts
func (*MongoHelper) FindOne ¶
func (_m *MongoHelper) FindOne(ctx context.Context, coll string, filter interface{}, item interface{})
FindOne provides a mock function with given fields: ctx, coll, filter, item
func (*MongoHelper) GetIDFromInsertOneResult ¶
func (_m *MongoHelper) GetIDFromInsertOneResult(_a0 *mongo.InsertOneResult) (primitive.ObjectID, error)
GetIDFromInsertOneResult provides a mock function with given fields: _a0
func (*MongoHelper) GetIndex ¶
func (_m *MongoHelper) GetIndex(ctx context.Context, coll string, index string) (*primitive.M, error)
GetIndex provides a mock function with given fields: ctx, coll, index
func (*MongoHelper) HasIndex ¶
HasIndex provides a mock function with given fields: ctx, coll, index
func (*MongoHelper) InsertOne ¶
func (_m *MongoHelper) InsertOne(ctx context.Context, coll string, item interface{}) (primitive.ObjectID, error)
InsertOne provides a mock function with given fields: ctx, coll, item
func (*MongoHelper) NewClient ¶
func (_m *MongoHelper) NewClient(uri string) (base.MongoClient, error)
NewClient provides a mock function with given fields: uri