epsagonmongo

package
v1.39.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoCollectionWrapper

type MongoCollectionWrapper struct {
	// contains filtered or unexported fields
}

MongoCollectionWrapper is Epsagon's wrapper for mongo.Collection

func WrapMongoCollection

func WrapMongoCollection(
	collection *mongo.Collection, ctx ...context.Context,
) *MongoCollectionWrapper

func (*MongoCollectionWrapper) Aggregate

func (coll *MongoCollectionWrapper) Aggregate(
	ctx context.Context, pipeline interface{}, opts ...*mongoOptions.AggregateOptions,
) (*mongo.Cursor, error)

func (*MongoCollectionWrapper) BulkWrite

func (*MongoCollectionWrapper) Clone

func (coll *MongoCollectionWrapper) Clone(opts ...*mongoOptions.CollectionOptions) (interface{}, error)

func (*MongoCollectionWrapper) CountDocuments

func (coll *MongoCollectionWrapper) CountDocuments(
	ctx context.Context, filter interface{}, opts ...*mongoOptions.CountOptions,
) (int64, error)

func (*MongoCollectionWrapper) Database

func (coll *MongoCollectionWrapper) Database() *mongo.Database

func (*MongoCollectionWrapper) DeleteMany

func (coll *MongoCollectionWrapper) DeleteMany(
	ctx context.Context, filter interface{}, opts ...*mongoOptions.DeleteOptions,
) (*mongo.DeleteResult, error)

func (*MongoCollectionWrapper) DeleteOne

func (coll *MongoCollectionWrapper) DeleteOne(
	ctx context.Context, filter interface{}, opts ...*mongoOptions.DeleteOptions,
) (*mongo.DeleteResult, error)

func (*MongoCollectionWrapper) Distinct

func (coll *MongoCollectionWrapper) Distinct(
	ctx context.Context, fieldName string, filter interface{}, opts ...*mongoOptions.DistinctOptions,
) ([]interface{}, error)

func (*MongoCollectionWrapper) Drop

func (coll *MongoCollectionWrapper) Drop(ctx context.Context) error

func (*MongoCollectionWrapper) EstimatedDocumentCount

func (coll *MongoCollectionWrapper) EstimatedDocumentCount(
	ctx context.Context, opts ...*mongoOptions.EstimatedDocumentCountOptions,
) (int64, error)

func (*MongoCollectionWrapper) Find

func (coll *MongoCollectionWrapper) Find(
	ctx context.Context, filter interface{}, opts ...*mongoOptions.FindOptions,
) (*mongo.Cursor, error)

func (*MongoCollectionWrapper) FindOne

func (coll *MongoCollectionWrapper) FindOne(
	ctx context.Context, filter interface{}, opts ...*mongoOptions.FindOneOptions,
) *mongo.SingleResult

func (*MongoCollectionWrapper) FindOneAndDelete

func (coll *MongoCollectionWrapper) FindOneAndDelete(
	ctx context.Context, filter interface{}, opts ...*mongoOptions.FindOneAndDeleteOptions,
) *mongo.SingleResult

func (*MongoCollectionWrapper) FindOneAndReplace

func (coll *MongoCollectionWrapper) FindOneAndReplace(
	ctx context.Context, filter interface{}, replacement interface{}, opts ...*mongoOptions.FindOneAndReplaceOptions,
) *mongo.SingleResult

func (*MongoCollectionWrapper) FindOneAndUpdate

func (coll *MongoCollectionWrapper) FindOneAndUpdate(
	ctx context.Context, filter interface{}, update interface{}, opts ...*mongoOptions.FindOneAndReplaceOptions,
) *mongo.SingleResult

func (*MongoCollectionWrapper) Indexes

func (coll *MongoCollectionWrapper) Indexes() mongo.IndexView

func (*MongoCollectionWrapper) InsertMany

func (coll *MongoCollectionWrapper) InsertMany(
	ctx context.Context, documents []interface{}, opts ...*mongoOptions.InsertManyOptions,
) (*mongo.InsertManyResult, error)

func (*MongoCollectionWrapper) InsertOne

func (coll *MongoCollectionWrapper) InsertOne(
	ctx context.Context, document interface{}, opts ...*mongoOptions.InsertOneOptions,
) (*mongo.InsertOneResult, error)

func (*MongoCollectionWrapper) Name

func (coll *MongoCollectionWrapper) Name() string

func (*MongoCollectionWrapper) ReplaceOne

func (coll *MongoCollectionWrapper) ReplaceOne(
	ctx context.Context, filter interface{}, replacement interface{}, opts ...*mongoOptions.ReplaceOptions,
) (*mongo.UpdateResult, error)

func (*MongoCollectionWrapper) UpdateByID

func (coll *MongoCollectionWrapper) UpdateByID(
	ctx context.Context, id interface{}, update interface{}, opts ...*mongoOptions.UpdateOptions,
) (*mongo.UpdateResult, error)

func (*MongoCollectionWrapper) UpdateMany

func (coll *MongoCollectionWrapper) UpdateMany(
	ctx context.Context, filter interface{}, update interface{}, opts ...*mongoOptions.UpdateOptions,
) (*mongo.UpdateResult, error)

func (*MongoCollectionWrapper) UpdateOne

func (coll *MongoCollectionWrapper) UpdateOne(
	ctx context.Context, filter interface{}, update interface{}, opts ...*mongoOptions.UpdateOptions,
) (*mongo.UpdateResult, error)

func (*MongoCollectionWrapper) Watch

func (coll *MongoCollectionWrapper) Watch(
	ctx context.Context, pipeline interface{}, opts ...*mongoOptions.ChangeStreamOptions,
) (*mongo.ChangeStream, error)

Jump to

Keyboard shortcuts

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