Documentation ¶
Index ¶
- type MongoCollectionWrapper
- func (coll *MongoCollectionWrapper) Aggregate(ctx context.Context, pipeline interface{}, ...) (*mongo.Cursor, error)
- func (coll *MongoCollectionWrapper) BulkWrite(ctx context.Context, models []mongo.WriteModel, ...) (*mongo.BulkWriteResult, error)
- func (coll *MongoCollectionWrapper) Clone(opts ...*mongoOptions.CollectionOptions) (interface{}, error)
- func (coll *MongoCollectionWrapper) CountDocuments(ctx context.Context, filter interface{}, opts ...*mongoOptions.CountOptions) (int64, error)
- func (coll *MongoCollectionWrapper) Database() *mongo.Database
- func (coll *MongoCollectionWrapper) DeleteMany(ctx context.Context, filter interface{}, opts ...*mongoOptions.DeleteOptions) (*mongo.DeleteResult, error)
- func (coll *MongoCollectionWrapper) DeleteOne(ctx context.Context, filter interface{}, opts ...*mongoOptions.DeleteOptions) (*mongo.DeleteResult, error)
- func (coll *MongoCollectionWrapper) Distinct(ctx context.Context, fieldName string, filter interface{}, ...) ([]interface{}, error)
- func (coll *MongoCollectionWrapper) Drop(ctx context.Context) error
- func (coll *MongoCollectionWrapper) EstimatedDocumentCount(ctx context.Context, opts ...*mongoOptions.EstimatedDocumentCountOptions) (int64, error)
- func (coll *MongoCollectionWrapper) Find(ctx context.Context, filter interface{}, opts ...*mongoOptions.FindOptions) (*mongo.Cursor, error)
- func (coll *MongoCollectionWrapper) FindOne(ctx context.Context, filter interface{}, opts ...*mongoOptions.FindOneOptions) *mongo.SingleResult
- func (coll *MongoCollectionWrapper) FindOneAndDelete(ctx context.Context, filter interface{}, ...) *mongo.SingleResult
- func (coll *MongoCollectionWrapper) FindOneAndReplace(ctx context.Context, filter interface{}, replacement interface{}, ...) *mongo.SingleResult
- func (coll *MongoCollectionWrapper) FindOneAndUpdate(ctx context.Context, filter interface{}, update interface{}, ...) *mongo.SingleResult
- func (coll *MongoCollectionWrapper) Indexes() mongo.IndexView
- func (coll *MongoCollectionWrapper) InsertMany(ctx context.Context, documents []interface{}, ...) (*mongo.InsertManyResult, error)
- func (coll *MongoCollectionWrapper) InsertOne(ctx context.Context, document interface{}, ...) (*mongo.InsertOneResult, error)
- func (coll *MongoCollectionWrapper) Name() string
- func (coll *MongoCollectionWrapper) ReplaceOne(ctx context.Context, filter interface{}, replacement interface{}, ...) (*mongo.UpdateResult, error)
- func (coll *MongoCollectionWrapper) UpdateByID(ctx context.Context, id interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- func (coll *MongoCollectionWrapper) UpdateMany(ctx context.Context, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- func (coll *MongoCollectionWrapper) UpdateOne(ctx context.Context, filter interface{}, update interface{}, ...) (*mongo.UpdateResult, error)
- func (coll *MongoCollectionWrapper) Watch(ctx context.Context, pipeline interface{}, ...) (*mongo.ChangeStream, error)
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 (coll *MongoCollectionWrapper) BulkWrite( ctx context.Context, models []mongo.WriteModel, opts ...*mongoOptions.BulkWriteOptions, ) (*mongo.BulkWriteResult, error)
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)
Click to show internal directories.
Click to hide internal directories.