mongodb

package
v0.0.0-...-a470c86 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider interface {
	Find(collection string, ctx context.Context, filter interface{}, opts ...*options.FindOptions) (*mongo.Cursor, error)

	FindOne(collection string, ctx context.Context, filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult

	InsertOne(collection string, ctx context.Context, document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)

	UpdateOne(collection string, ctx context.Context, filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)

	DeleteOne(collection string, ctx context.Context, filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)

	Close()
}

func NewProvider

func NewProvider(cfg config.MongodbConfig, tracing tracing.Provider) (Provider, error)

Jump to

Keyboard shortcuts

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