mongodb

package
v0.0.0-...-32bdac0 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrMongoUsername = errors.New("missing MONGO_USERNAME environmental variable for MongoDB")
	ErrMongoPassword = errors.New("missing MONGO_PASSWORD environmental variable for MongoDB")
	ErrMongoAddr     = errors.New("missing MONGO_ADDR environmental variable for MongoDB")
	ErrMongoPort     = errors.New("missing MONGO_PORT environmental variable for MongoDB")
)

Functions

func Add

func Add(document interface{}, opts ...*options.InsertOneOptions) (*mongo.InsertOneResult, error)

Command wrappers for other packages

func Disconnect

func Disconnect()

func Exist

func Exist(filter interface{}, opts ...*options.CountOptions) (bool, error)

func Get

func Get(filter interface{}, opts ...*options.FindOneOptions) *mongo.SingleResult

func Remove

func Remove(filter interface{}, opts ...*options.DeleteOptions) (*mongo.DeleteResult, error)

func Start

func Start() error

func Update

func Update(filter interface{}, update interface{}, opts ...*options.UpdateOptions) (*mongo.UpdateResult, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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