mongodb

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Disconnect added in v0.0.2

func Disconnect(connection *Connection)

Disconnect closes the MongoDB client connection

Types

type Config added in v0.0.6

type Config struct {
	Uri     string
	Timeout time.Duration
}

type Connection added in v0.0.6

type Connection struct {
	Config *Config
	Client *mongo.Client
	Ctx    context.Context
	Cancel context.CancelFunc
}

func Connect

func Connect(config *Config) (connection *Connection, err error)

Connect returns a new MongoDB client

Jump to

Keyboard shortcuts

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