mongodb

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const AddressConfigKey = "mongodb-address"

Variables

This section is empty.

Functions

func Flags added in v1.1.1

func Flags() *pflag.FlagSet

Types

type MongoDB

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

func New

func New(uri string) (*MongoDB, error)

New will connect to the MongoDB server using the given URI

func (MongoDB) Close

func (m MongoDB) Close() error

Close is just a proxy for convenient access to db.Close()

func (MongoDB) DB

func (m MongoDB) DB() *mongo.Client

DB is just a proxy for convenient access to the underlying mongodb client implementation This method is used a lot, therefore it's name is abbreviated.

Jump to

Keyboard shortcuts

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