Versions in this module Expand all Collapse all v0 v0.2.1 Oct 28, 2021 Changes in this version + type ChangeStream interface + Close func(ctx context.Context) error + Current func() bson.Raw + Decode func(val interface{}) error + Err func() error + ID func() int64 + Next func(ctx context.Context) bool + ResumeToken func() bson.Raw + TryNext func(ctx context.Context) bool + type Client interface + Connect func(ctx context.Context) error + Database func(name string, opts ...*options.DatabaseOptions) Database + Disconnect func(ctx context.Context) error + ListDatabaseNames func(ctx context.Context, filter interface{}, opts ...*options.ListDatabasesOptions) ([]string, error) + ListDatabases func(ctx context.Context, filter interface{}, opts ...*options.ListDatabasesOptions) (mongo.ListDatabasesResult, error) + NumberSessionsInProgress func() int + Ping func(ctx context.Context, rp *readpref.ReadPref) error + StartSession func(opts ...*options.SessionOptions) (Session, error) + UseSession func(ctx context.Context, fn func(mongo.SessionContext) error) error + UseSessionWithOptions func(ctx context.Context, opts *options.SessionOptions, ...) error + Watch func(ctx context.Context, pipeline interface{}, ...) (ChangeStream, error) + type Collection interface + Aggregate func(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (Cursor, error) + BulkWrite func(ctx context.Context, models []mongo.WriteModel, ...) (*mongo.BulkWriteResult, error) + Clone func(opts ...*options.CollectionOptions) (Collection, error) + CountDocuments func(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error) + Database func() Database + DeleteMany func(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error) + DeleteOne func(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error) + Distinct func(ctx context.Context, fieldName string, filter interface{}, ...) ([]interface{}, error) + Drop func(ctx context.Context) error + EstimatedDocumentCount func(ctx context.Context, opts ...*options.EstimatedDocumentCountOptions) (int64, error) + Find func(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (Cursor, error) + FindOne func(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) SingleResult + FindOneAndDelete func(ctx context.Context, filter interface{}, ...) SingleResult + FindOneAndReplace func(ctx context.Context, filter interface{}, replacement interface{}, ...) SingleResult + FindOneAndUpdate func(ctx context.Context, filter interface{}, update interface{}, ...) SingleResult + Indexes func() IndexView + InsertMany func(ctx context.Context, documents []interface{}, ...) (*mongo.InsertManyResult, error) + InsertOne func(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error) + Name func() string + ReplaceOne func(ctx context.Context, filter interface{}, replacement interface{}, ...) (*mongo.UpdateResult, error) + UpdateByID func(ctx context.Context, id interface{}, update interface{}, ...) (*mongo.UpdateResult, error) + UpdateMany func(ctx context.Context, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error) + UpdateOne func(ctx context.Context, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error) + Watch func(ctx context.Context, pipeline interface{}, ...) (ChangeStream, error) + type Cursor interface + All func(ctx context.Context, results interface{}) error + Close func(ctx context.Context) error + Current func() bson.Raw + Decode func(val interface{}) error + Err func() error + ID func() int64 + Next func(ctx context.Context) bool + RemainingBatchLength func() int + TryNext func(ctx context.Context) bool + type Database interface + Aggregate func(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (Cursor, error) + Client func() Client + Collection func(name string, opts ...*options.CollectionOptions) Collection + CreateCollection func(ctx context.Context, name string, opts ...*options.CreateCollectionOptions) error + CreateView func(ctx context.Context, viewName, viewOn string, pipeline interface{}, ...) error + Drop func(ctx context.Context) error + ListCollectionNames func(ctx context.Context, filter interface{}, ...) ([]string, error) + ListCollectionSpecifications func(ctx context.Context, filter interface{}, ...) ([]*mongo.CollectionSpecification, error) + ListCollections func(ctx context.Context, filter interface{}, ...) (Cursor, error) + Name func() string + ReadConcern func() *readconcern.ReadConcern + ReadPreference func() *readpref.ReadPref + RunCommand func(ctx context.Context, runCommand interface{}, opts ...*options.RunCmdOptions) SingleResult + RunCommandCursor func(ctx context.Context, runCommand interface{}, opts ...*options.RunCmdOptions) (Cursor, error) + Watch func(ctx context.Context, pipeline interface{}, ...) (ChangeStream, error) + WriteConcern func() *writeconcern.WriteConcern + type IndexView interface + CreateMany func(ctx context.Context, models []mongo.IndexModel, ...) ([]string, error) + CreateOne func(ctx context.Context, model mongo.IndexModel, ...) (string, error) + DropAll func(ctx context.Context, opts ...*options.DropIndexesOptions) (bson.Raw, error) + DropOne func(ctx context.Context, name string, opts ...*options.DropIndexesOptions) (bson.Raw, error) + List func(ctx context.Context, opts ...*options.ListIndexesOptions) (Cursor, error) + ListSpecifications func(ctx context.Context, opts ...*options.ListIndexesOptions) ([]*mongo.IndexSpecification, error) + type Session interface + AbortTransaction func(ctx context.Context) error + AdvanceClusterTime func(bson.Raw) error + AdvanceOperationTime func(*primitive.Timestamp) error + Client func() Client + ClusterTime func() bson.Raw + CommitTransaction func(ctx context.Context) error + EndSession func(ctx context.Context) + ID func() bson.Raw + OperationTime func() *primitive.Timestamp + StartTransaction func(opts ...*options.TransactionOptions) error + WithTransaction func(ctx context.Context, ...) (interface{}, error) + type SingleResult interface + Decode func(v interface{}) error + DecodeBytes func() (bson.Raw, error) + Err func() error