mocks

package
v0.0.0-...-1cab694 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 24, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoClient

type MongoClient struct {
	mock.Mock
}

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

type MongoDB struct {
	mock.Mock
}

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

type MongoHelper struct {
	mock.Mock
}

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

func (_m *MongoHelper) HasIndex(ctx context.Context, coll string, index string) (bool, error)

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

func (*MongoHelper) UpdateOne

func (_m *MongoHelper) UpdateOne(ctx context.Context, coll string, filter interface{}, item interface{}) error

UpdateOne provides a mock function with given fields: ctx, coll, filter, item

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL