Documentation ¶
Index ¶
- type Client
- func (_m *Client) Connect(_a0 context.Context) error
- func (_m *Client) Database(_a0 string) mongo.Database
- func (_m *Client) Disconnect(_a0 context.Context) error
- func (_m *Client) Ping(_a0 context.Context) error
- func (_m *Client) StartSession() (mongo_drivermongo.Session, error)
- func (_m *Client) UseSession(ctx context.Context, fn func(mongo_drivermongo.SessionContext) error) error
- type Collection
- func (_m *Collection) Aggregate(_a0 context.Context, _a1 interface{}) (mongo.Cursor, error)
- func (_m *Collection) CountDocuments(_a0 context.Context, _a1 interface{}, _a2 ...*options.CountOptions) (int64, error)
- func (_m *Collection) DeleteOne(_a0 context.Context, _a1 interface{}) (int64, error)
- func (_m *Collection) Find(_a0 context.Context, _a1 interface{}, _a2 ...*options.FindOptions) (mongo.Cursor, error)
- func (_m *Collection) FindOne(_a0 context.Context, _a1 interface{}) mongo.SingleResult
- func (_m *Collection) InsertMany(_a0 context.Context, _a1 []interface{}) ([]interface{}, error)
- func (_m *Collection) InsertOne(_a0 context.Context, _a1 interface{}) (interface{}, error)
- func (_m *Collection) UpdateMany(_a0 context.Context, _a1 interface{}, _a2 interface{}, ...) (*mongo_drivermongo.UpdateResult, error)
- func (_m *Collection) UpdateOne(_a0 context.Context, _a1 interface{}, _a2 interface{}, ...) (*mongo_drivermongo.UpdateResult, error)
- type Cursor
- type Database
- type SingleResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is an autogenerated mock type for the Client type
func NewClient ¶
func NewClient(t mockConstructorTestingTNewClient) *Client
NewClient creates a new instance of Client. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Client) Disconnect ¶
Disconnect provides a mock function with given fields: _a0
func (*Client) StartSession ¶
func (_m *Client) StartSession() (mongo_drivermongo.Session, error)
StartSession provides a mock function with given fields:
func (*Client) UseSession ¶
func (_m *Client) UseSession(ctx context.Context, fn func(mongo_drivermongo.SessionContext) error) error
UseSession provides a mock function with given fields: ctx, fn
type Collection ¶
Collection is an autogenerated mock type for the Collection type
func NewCollection ¶
func NewCollection(t mockConstructorTestingTNewCollection) *Collection
NewCollection creates a new instance of Collection. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Collection) CountDocuments ¶
func (_m *Collection) CountDocuments(_a0 context.Context, _a1 interface{}, _a2 ...*options.CountOptions) (int64, error)
CountDocuments provides a mock function with given fields: _a0, _a1, _a2
func (*Collection) DeleteOne ¶
func (_m *Collection) DeleteOne(_a0 context.Context, _a1 interface{}) (int64, error)
DeleteOne provides a mock function with given fields: _a0, _a1
func (*Collection) Find ¶
func (_m *Collection) Find(_a0 context.Context, _a1 interface{}, _a2 ...*options.FindOptions) (mongo.Cursor, error)
Find provides a mock function with given fields: _a0, _a1, _a2
func (*Collection) FindOne ¶
func (_m *Collection) FindOne(_a0 context.Context, _a1 interface{}) mongo.SingleResult
FindOne provides a mock function with given fields: _a0, _a1
func (*Collection) InsertMany ¶
func (_m *Collection) InsertMany(_a0 context.Context, _a1 []interface{}) ([]interface{}, error)
InsertMany provides a mock function with given fields: _a0, _a1
func (*Collection) InsertOne ¶
func (_m *Collection) InsertOne(_a0 context.Context, _a1 interface{}) (interface{}, error)
InsertOne provides a mock function with given fields: _a0, _a1
func (*Collection) UpdateMany ¶
func (_m *Collection) UpdateMany(_a0 context.Context, _a1 interface{}, _a2 interface{}, _a3 ...*options.UpdateOptions) (*mongo_drivermongo.UpdateResult, error)
UpdateMany provides a mock function with given fields: _a0, _a1, _a2, _a3
func (*Collection) UpdateOne ¶
func (_m *Collection) UpdateOne(_a0 context.Context, _a1 interface{}, _a2 interface{}, _a3 ...*options.UpdateOptions) (*mongo_drivermongo.UpdateResult, error)
UpdateOne provides a mock function with given fields: _a0, _a1, _a2, _a3
type Cursor ¶
Cursor is an autogenerated mock type for the Cursor type
func NewCursor ¶
func NewCursor(t mockConstructorTestingTNewCursor) *Cursor
NewCursor creates a new instance of Cursor. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
type Database ¶
Database is an autogenerated mock type for the Database type
func NewDatabase ¶
func NewDatabase(t mockConstructorTestingTNewDatabase) *Database
NewDatabase creates a new instance of Database. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Database) Collection ¶
func (_m *Database) Collection(_a0 string) mongo.Collection
Collection provides a mock function with given fields: _a0
type SingleResult ¶
SingleResult is an autogenerated mock type for the SingleResult type
func NewSingleResult ¶
func NewSingleResult(t mockConstructorTestingTNewSingleResult) *SingleResult
NewSingleResult creates a new instance of SingleResult. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*SingleResult) Decode ¶
func (_m *SingleResult) Decode(_a0 interface{}) error
Decode provides a mock function with given fields: _a0