mocks

package
v0.0.0-...-406e066 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	mock.Mock
}

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) Connect

func (_m *Client) Connect(_a0 context.Context) error

Connect provides a mock function with given fields: _a0

func (*Client) Database

func (_m *Client) Database(_a0 string) mongo.Database

Database provides a mock function with given fields: _a0

func (*Client) Disconnect

func (_m *Client) Disconnect(_a0 context.Context) error

Disconnect provides a mock function with given fields: _a0

func (*Client) Ping

func (_m *Client) Ping(_a0 context.Context) error

Ping 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

type Collection struct {
	mock.Mock
}

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) Aggregate

func (_m *Collection) Aggregate(_a0 context.Context, _a1 interface{}) (mongo.Cursor, error)

Aggregate provides a mock function with given fields: _a0, _a1

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

type Cursor struct {
	mock.Mock
}

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.

func (*Cursor) All

func (_m *Cursor) All(_a0 context.Context, _a1 interface{}) error

All provides a mock function with given fields: _a0, _a1

func (*Cursor) Close

func (_m *Cursor) Close(_a0 context.Context) error

Close provides a mock function with given fields: _a0

func (*Cursor) Decode

func (_m *Cursor) Decode(_a0 interface{}) error

Decode provides a mock function with given fields: _a0

func (*Cursor) Next

func (_m *Cursor) Next(_a0 context.Context) bool

Next provides a mock function with given fields: _a0

type Database

type Database struct {
	mock.Mock
}

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) Client

func (_m *Database) Client() mongo.Client

Client provides a mock function with given fields:

func (*Database) Collection

func (_m *Database) Collection(_a0 string) mongo.Collection

Collection provides a mock function with given fields: _a0

type SingleResult

type SingleResult struct {
	mock.Mock
}

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

Jump to

Keyboard shortcuts

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