mocks

package
v0.0.0-...-b0d077b Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: MIT Imports: 6 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 (*Client) Connect

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

Connect provides a mock function with given fields: ctx

func (*Client) Database

func (_m *Client) Database(name string, opts ...*options.DatabaseOptions) rmongodb.Database

Database provides a mock function with given fields: name, opts

func (*Client) Disconnect

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

Disconnect provides a mock function with given fields: ctx

func (*Client) StartSession

func (_m *Client) StartSession(opts ...*options.SessionOptions) (rmongodb.Session, error)

StartSession provides a mock function with given fields: opts

type Collection

type Collection struct {
	mock.Mock
}

Collection is an autogenerated mock type for the Collection type

func (*Collection) CountDocuments

func (_m *Collection) CountDocuments(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)

CountDocuments provides a mock function with given fields: ctx, filter, opts

func (*Collection) DeleteMany

func (_m *Collection) DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)

DeleteMany provides a mock function with given fields: ctx, filter, opts

func (*Collection) DeleteOne

func (_m *Collection) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)

DeleteOne provides a mock function with given fields: ctx, filter, opts

func (*Collection) Find

func (_m *Collection) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (rmongodb.Cursor, error)

Find provides a mock function with given fields: ctx, filter, opts

func (*Collection) FindOne

func (_m *Collection) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) rmongodb.SingleResult

FindOne provides a mock function with given fields: ctx, filter, opts

func (*Collection) InsertMany

func (_m *Collection) InsertMany(ctx context.Context, documents []interface{}, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)

InsertMany provides a mock function with given fields: ctx, documents, opts

func (*Collection) InsertOne

func (_m *Collection) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)

InsertOne provides a mock function with given fields: ctx, document, opts

func (*Collection) UpdateMany

func (_m *Collection) UpdateMany(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)

UpdateMany provides a mock function with given fields: ctx, filter, update, opts

func (*Collection) UpdateOne

func (_m *Collection) UpdateOne(ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)

UpdateOne provides a mock function with given fields: ctx, filter, update, opts

type Cursor

type Cursor struct {
	mock.Mock
}

Cursor is an autogenerated mock type for the Cursor type

func (*Cursor) Close

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

Close provides a mock function with given fields: ctx

func (*Cursor) Decode

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

Decode provides a mock function with given fields: val

func (*Cursor) ID

func (_m *Cursor) ID() int64

ID provides a mock function with given fields:

func (*Cursor) Next

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

Next provides a mock function with given fields: ctx

type Database

type Database struct {
	mock.Mock
}

Database is an autogenerated mock type for the Database type

func (*Database) Collection

func (_m *Database) Collection(name string, opts ...*options.CollectionOptions) rmongodb.Collection

Collection provides a mock function with given fields: name, opts

type Session

type Session struct {
	mock.Mock
}

Session is an autogenerated mock type for the Session type

func (*Session) AbortTransaction

func (_m *Session) AbortTransaction(_a0 context.Context) error

AbortTransaction provides a mock function with given fields: _a0

func (*Session) CommitTransaction

func (_m *Session) CommitTransaction(_a0 context.Context) error

CommitTransaction provides a mock function with given fields: _a0

func (*Session) EndSession

func (_m *Session) EndSession(_a0 context.Context)

EndSession provides a mock function with given fields: _a0

func (*Session) ID

func (_m *Session) ID() bson.Raw

ID provides a mock function with given fields:

func (*Session) StartTransaction

func (_m *Session) StartTransaction(_a0 ...*options.TransactionOptions) error

StartTransaction provides a mock function with given fields: _a0

func (*Session) WithTransaction

func (_m *Session) WithTransaction(ctx context.Context, fn func(mongo.SessionContext) (interface{}, error), opts ...*options.TransactionOptions) (interface{}, error)

WithTransaction provides a mock function with given fields: ctx, fn, opts

type SingleResult

type SingleResult struct {
	mock.Mock
}

SingleResult is an autogenerated mock type for the SingleResult type

func (*SingleResult) Decode

func (_m *SingleResult) Decode(v interface{}) error

Decode provides a mock function with given fields: v

func (*SingleResult) Err

func (_m *SingleResult) Err() error

Err provides a mock function with given fields:

Jump to

Keyboard shortcuts

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