Documentation
¶
Index ¶
- Constants
- type WrappedClient
- func (wc *WrappedClient) Client() *mongo.Client
- func (wc *WrappedClient) Connect(ctx context.Context) error
- func (wc *WrappedClient) Database(name string, opts ...*options.DatabaseOptions) *WrappedDatabase
- func (wc *WrappedClient) Disconnect(ctx context.Context) error
- func (wc *WrappedClient) ListDatabaseNames(ctx context.Context, filter interface{}, opts ...*options.ListDatabasesOptions) ([]string, error)
- func (wc *WrappedClient) ListDatabases(ctx context.Context, filter interface{}, opts ...*options.ListDatabasesOptions) (mongo.ListDatabasesResult, error)
- func (wc *WrappedClient) NumberSessionsInProgress() int
- func (wc *WrappedClient) Ping(ctx context.Context, rp *readpref.ReadPref) error
- func (wc *WrappedClient) StartSession(opts ...*options.SessionOptions) (mongo.Session, error)
- func (wc *WrappedClient) UseSession(ctx context.Context, fn func(mongo.SessionContext) error) error
- func (wc *WrappedClient) UseSessionWithOptions(ctx context.Context, opts *options.SessionOptions, ...) error
- func (wc *WrappedClient) Watch(ctx context.Context, pipeline interface{}, ...) (*mongo.ChangeStream, error)
- type WrappedCollection
- func (wc *WrappedCollection) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error)
- func (wc *WrappedCollection) BulkWrite(ctx context.Context, models []mongo.WriteModel, ...) (*mongo.BulkWriteResult, error)
- func (wc *WrappedCollection) Clone(opts ...*options.CollectionOptions) (*mongo.Collection, error)
- func (wc *WrappedCollection) Collection() *mongo.Collection
- func (wc *WrappedCollection) Count(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
- func (wc *WrappedCollection) CountDocuments(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
- func (wc *WrappedCollection) Database() *mongo.Database
- func (wc *WrappedCollection) DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (wc *WrappedCollection) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
- func (wc *WrappedCollection) Distinct(ctx context.Context, fieldName string, filter interface{}, ...) ([]interface{}, error)
- func (wc *WrappedCollection) Drop(ctx context.Context) error
- func (wc *WrappedCollection) EstimatedDocumentCount(ctx context.Context, opts ...*options.EstimatedDocumentCountOptions) (int64, error)
- func (wc *WrappedCollection) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error)
- func (wc *WrappedCollection) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
- func (wc *WrappedCollection) FindOneAndDelete(ctx context.Context, filter interface{}, ...) *mongo.SingleResult
- func (wc *WrappedCollection) FindOneAndReplace(ctx context.Context, filter, replacement interface{}, ...) *mongo.SingleResult
- func (wc *WrappedCollection) FindOneAndUpdate(ctx context.Context, filter, update interface{}, ...) *mongo.SingleResult
- func (wc *WrappedCollection) Indexes() mongo.IndexView
- func (wc *WrappedCollection) InsertMany(ctx context.Context, documents []interface{}, ...) (*mongo.InsertManyResult, error)
- func (wc *WrappedCollection) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
- func (wc *WrappedCollection) Name() string
- func (wc *WrappedCollection) ReplaceOne(ctx context.Context, filter, replacement interface{}, ...) (*mongo.UpdateResult, error)
- func (wc *WrappedCollection) UpdateMany(ctx context.Context, filter, replacement interface{}, ...) (*mongo.UpdateResult, error)
- func (wc *WrappedCollection) UpdateOne(ctx context.Context, filter, replacement interface{}, ...) (*mongo.UpdateResult, error)
- func (wc *WrappedCollection) Watch(ctx context.Context, pipeline interface{}, ...) (*mongo.ChangeStream, error)
- type WrappedDatabase
- func (wd *WrappedDatabase) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error)
- func (wd *WrappedDatabase) Client() *WrappedClient
- func (wd *WrappedDatabase) Collection(name string, opts ...*options.CollectionOptions) *WrappedCollection
- func (wd *WrappedDatabase) Database() *mongo.Database
- func (wd *WrappedDatabase) Drop(ctx context.Context) error
- func (wd *WrappedDatabase) ListCollectionNames(ctx context.Context, filter interface{}, ...) ([]string, error)
- func (wd *WrappedDatabase) ListCollections(ctx context.Context, filter interface{}, ...) (*mongo.Cursor, error)
- func (wd *WrappedDatabase) Name() string
- func (wd *WrappedDatabase) ReadConcern() *readconcern.ReadConcern
- func (wd *WrappedDatabase) ReadPreference() *readpref.ReadPref
- func (wd *WrappedDatabase) RunCommand(ctx context.Context, runCommand interface{}, opts ...*options.RunCmdOptions) *mongo.SingleResult
- func (wd *WrappedDatabase) RunCommandCursor(ctx context.Context, runCommand interface{}, opts ...*options.RunCmdOptions) (*mongo.Cursor, error)
- func (wd *WrappedDatabase) Watch(ctx context.Context, pipeline interface{}, ...) (*mongo.ChangeStream, error)
- func (wd *WrappedDatabase) WriteConcern() *writeconcern.WriteConcern
- type WrappedSession
- func (ws *WrappedSession) AbortTransaction(ctx context.Context) error
- func (ws *WrappedSession) AdvanceClusterTime(br bson.Raw) error
- func (ws *WrappedSession) AdvanceOperationTime(pt *primitive.Timestamp) error
- func (ws *WrappedSession) Client() *mongo.Client
- func (ws *WrappedSession) ClusterTime() bson.Raw
- func (ws *WrappedSession) CommitTransaction(ctx context.Context) error
- func (ws *WrappedSession) EndSession(ctx context.Context)
- func (ws *WrappedSession) OperationTime() *primitive.Timestamp
- func (ws *WrappedSession) StartTransaction(topts ...*options.TransactionOptions) error
- func (ws *WrappedSession) WithTransaction(ctx context.Context, ...) (interface{}, error)
Constants ¶
View Source
const (
TracerName = "go.mongodb.org/mongo-driver"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WrappedClient ¶
type WrappedClient struct {
// contains filtered or unexported fields
}
func Connect ¶
func Connect(ctx context.Context, opts ...*options.ClientOptions) (*WrappedClient, error)
func NewClient ¶
func NewClient(opts ...*options.ClientOptions) (*WrappedClient, error)
func (*WrappedClient) Client ¶
func (wc *WrappedClient) Client() *mongo.Client
func (*WrappedClient) Database ¶
func (wc *WrappedClient) Database(name string, opts ...*options.DatabaseOptions) *WrappedDatabase
func (*WrappedClient) Disconnect ¶
func (wc *WrappedClient) Disconnect(ctx context.Context) error
func (*WrappedClient) ListDatabaseNames ¶
func (wc *WrappedClient) ListDatabaseNames(ctx context.Context, filter interface{}, opts ...*options.ListDatabasesOptions) ([]string, error)
func (*WrappedClient) ListDatabases ¶
func (wc *WrappedClient) ListDatabases(ctx context.Context, filter interface{}, opts ...*options.ListDatabasesOptions) (mongo.ListDatabasesResult, error)
func (*WrappedClient) NumberSessionsInProgress ¶
func (wc *WrappedClient) NumberSessionsInProgress() int
func (*WrappedClient) StartSession ¶
func (wc *WrappedClient) StartSession(opts ...*options.SessionOptions) (mongo.Session, error)
func (*WrappedClient) UseSession ¶
func (wc *WrappedClient) UseSession(ctx context.Context, fn func(mongo.SessionContext) error) error
func (*WrappedClient) UseSessionWithOptions ¶
func (wc *WrappedClient) UseSessionWithOptions(ctx context.Context, opts *options.SessionOptions, fn func(mongo.SessionContext) error) error
func (*WrappedClient) Watch ¶
func (wc *WrappedClient) Watch(ctx context.Context, pipeline interface{}, opts ...*options.ChangeStreamOptions) (*mongo.ChangeStream, error)
type WrappedCollection ¶
type WrappedCollection struct {
// contains filtered or unexported fields
}
func (*WrappedCollection) Aggregate ¶
func (wc *WrappedCollection) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error)
func (*WrappedCollection) BulkWrite ¶
func (wc *WrappedCollection) BulkWrite(ctx context.Context, models []mongo.WriteModel, opts ...*options.BulkWriteOptions) (*mongo.BulkWriteResult, error)
func (*WrappedCollection) Clone ¶
func (wc *WrappedCollection) Clone(opts ...*options.CollectionOptions) (*mongo.Collection, error)
func (*WrappedCollection) Collection ¶
func (wc *WrappedCollection) Collection() *mongo.Collection
func (*WrappedCollection) Count ¶
func (wc *WrappedCollection) Count(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
func (*WrappedCollection) CountDocuments ¶
func (wc *WrappedCollection) CountDocuments(ctx context.Context, filter interface{}, opts ...*options.CountOptions) (int64, error)
func (*WrappedCollection) Database ¶
func (wc *WrappedCollection) Database() *mongo.Database
func (*WrappedCollection) DeleteMany ¶
func (wc *WrappedCollection) DeleteMany(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func (*WrappedCollection) DeleteOne ¶
func (wc *WrappedCollection) DeleteOne(ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)
func (*WrappedCollection) Distinct ¶
func (wc *WrappedCollection) Distinct(ctx context.Context, fieldName string, filter interface{}, opts ...*options.DistinctOptions) ([]interface{}, error)
func (*WrappedCollection) EstimatedDocumentCount ¶
func (wc *WrappedCollection) EstimatedDocumentCount(ctx context.Context, opts ...*options.EstimatedDocumentCountOptions) (int64, error)
func (*WrappedCollection) Find ¶
func (wc *WrappedCollection) Find(ctx context.Context, filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error)
func (*WrappedCollection) FindOne ¶
func (wc *WrappedCollection) FindOne(ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult
func (*WrappedCollection) FindOneAndDelete ¶
func (wc *WrappedCollection) FindOneAndDelete(ctx context.Context, filter interface{}, opts ...*options.FindOneAndDeleteOptions) *mongo.SingleResult
func (*WrappedCollection) FindOneAndReplace ¶
func (wc *WrappedCollection) FindOneAndReplace(ctx context.Context, filter, replacement interface{}, opts ...*options.FindOneAndReplaceOptions) *mongo.SingleResult
func (*WrappedCollection) FindOneAndUpdate ¶
func (wc *WrappedCollection) FindOneAndUpdate(ctx context.Context, filter, update interface{}, opts ...*options.FindOneAndUpdateOptions) *mongo.SingleResult
func (*WrappedCollection) Indexes ¶
func (wc *WrappedCollection) Indexes() mongo.IndexView
func (*WrappedCollection) InsertMany ¶
func (wc *WrappedCollection) InsertMany(ctx context.Context, documents []interface{}, opts ...*options.InsertManyOptions) (*mongo.InsertManyResult, error)
func (*WrappedCollection) InsertOne ¶
func (wc *WrappedCollection) InsertOne(ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)
func (*WrappedCollection) Name ¶
func (wc *WrappedCollection) Name() string
func (*WrappedCollection) ReplaceOne ¶
func (wc *WrappedCollection) ReplaceOne(ctx context.Context, filter, replacement interface{}, opts ...*options.ReplaceOptions) (*mongo.UpdateResult, error)
func (*WrappedCollection) UpdateMany ¶
func (wc *WrappedCollection) UpdateMany(ctx context.Context, filter, replacement interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
func (*WrappedCollection) UpdateOne ¶
func (wc *WrappedCollection) UpdateOne(ctx context.Context, filter, replacement interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)
func (*WrappedCollection) Watch ¶
func (wc *WrappedCollection) Watch(ctx context.Context, pipeline interface{}, opts ...*options.ChangeStreamOptions) (*mongo.ChangeStream, error)
type WrappedDatabase ¶
type WrappedDatabase struct {
// contains filtered or unexported fields
}
func (*WrappedDatabase) Aggregate ¶
func (wd *WrappedDatabase) Aggregate(ctx context.Context, pipeline interface{}, opts ...*options.AggregateOptions) (*mongo.Cursor, error)
func (*WrappedDatabase) Client ¶
func (wd *WrappedDatabase) Client() *WrappedClient
func (*WrappedDatabase) Collection ¶
func (wd *WrappedDatabase) Collection(name string, opts ...*options.CollectionOptions) *WrappedCollection
func (*WrappedDatabase) Database ¶
func (wd *WrappedDatabase) Database() *mongo.Database
func (*WrappedDatabase) ListCollectionNames ¶
func (wd *WrappedDatabase) ListCollectionNames(ctx context.Context, filter interface{}, opts ...*options.ListCollectionsOptions) ([]string, error)
func (*WrappedDatabase) ListCollections ¶
func (wd *WrappedDatabase) ListCollections(ctx context.Context, filter interface{}, opts ...*options.ListCollectionsOptions) (*mongo.Cursor, error)
func (*WrappedDatabase) Name ¶
func (wd *WrappedDatabase) Name() string
func (*WrappedDatabase) ReadConcern ¶
func (wd *WrappedDatabase) ReadConcern() *readconcern.ReadConcern
func (*WrappedDatabase) ReadPreference ¶
func (wd *WrappedDatabase) ReadPreference() *readpref.ReadPref
func (*WrappedDatabase) RunCommand ¶
func (wd *WrappedDatabase) RunCommand(ctx context.Context, runCommand interface{}, opts ...*options.RunCmdOptions) *mongo.SingleResult
func (*WrappedDatabase) RunCommandCursor ¶
func (wd *WrappedDatabase) RunCommandCursor(ctx context.Context, runCommand interface{}, opts ...*options.RunCmdOptions) (*mongo.Cursor, error)
func (*WrappedDatabase) Watch ¶
func (wd *WrappedDatabase) Watch(ctx context.Context, pipeline interface{}, opts ...*options.ChangeStreamOptions) (*mongo.ChangeStream, error)
func (*WrappedDatabase) WriteConcern ¶
func (wd *WrappedDatabase) WriteConcern() *writeconcern.WriteConcern
type WrappedSession ¶
func (*WrappedSession) AbortTransaction ¶
func (ws *WrappedSession) AbortTransaction(ctx context.Context) error
func (*WrappedSession) AdvanceClusterTime ¶
func (ws *WrappedSession) AdvanceClusterTime(br bson.Raw) error
func (*WrappedSession) AdvanceOperationTime ¶
func (ws *WrappedSession) AdvanceOperationTime(pt *primitive.Timestamp) error
func (*WrappedSession) Client ¶
func (ws *WrappedSession) Client() *mongo.Client
func (*WrappedSession) ClusterTime ¶
func (ws *WrappedSession) ClusterTime() bson.Raw
func (*WrappedSession) CommitTransaction ¶
func (ws *WrappedSession) CommitTransaction(ctx context.Context) error
func (*WrappedSession) EndSession ¶
func (ws *WrappedSession) EndSession(ctx context.Context)
func (*WrappedSession) OperationTime ¶
func (ws *WrappedSession) OperationTime() *primitive.Timestamp
func (*WrappedSession) StartTransaction ¶
func (ws *WrappedSession) StartTransaction(topts ...*options.TransactionOptions) error
func (*WrappedSession) WithTransaction ¶
func (ws *WrappedSession) WithTransaction(ctx context.Context, fn func(sessCtx mongo.SessionContext) (interface{}, error), opts ...*options.TransactionOptions) (interface{}, error)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.