Documentation ¶
Index ¶
- type Client
- type Collection
- func (_m *Collection) CountDocuments(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
- func (_m *Collection) DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (_m *Collection) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (_m *Collection) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (rmongodb.Cursor, error)
- func (_m *Collection) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) rmongodb.SingleResult
- func (_m *Collection) InsertMany(ctx context.Context, documents []interface{}, ...) (*mongo.InsertManyResult, error)
- func (_m *Collection) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
- func (_m *Collection) UpdateMany(ctx context.Context, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- func (_m *Collection) UpdateOne(ctx context.Context, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- type Cursor
- type Database
- type Session
- func (_m *Session) AbortTransaction(_a0 context.Context) error
- func (_m *Session) CommitTransaction(_a0 context.Context) error
- func (_m *Session) EndSession(_a0 context.Context)
- func (_m *Session) ID() bson.Raw
- func (_m *Session) StartTransaction(_a0 ...*options.TransactionOptions) error
- func (_m *Session) WithTransaction(ctx context.Context, fn func(mongo.SessionContext) (interface{}, error), ...) (interface{}, error)
- 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 (*Client) Disconnect ¶
Disconnect provides a mock function with given fields: ctx
func (*Client) StartSession ¶
StartSession provides a mock function with given fields: opts
type Collection ¶
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 ¶
Cursor is an autogenerated mock type for the Cursor type
type Database ¶
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 ¶
Session is an autogenerated mock type for the Session type
func (*Session) AbortTransaction ¶
AbortTransaction provides a mock function with given fields: _a0
func (*Session) CommitTransaction ¶
CommitTransaction provides a mock function with given fields: _a0
func (*Session) EndSession ¶
EndSession provides a mock function with given fields: _a0
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 ¶
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: