mongodb

package
v0.0.0-...-10ac1cd Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MongoDB

type MongoDB struct {
	Client          *mongo.Client
	Database        *mongo.Database
	UsersCollection *mongo.Collection
}

MongoDB represents the MongoDB client and database connection.

func New

func New(ctx context.Context, uri string, dbName string) (*MongoDB, error)

New initializes and returns a MongoDB instance.

func (*MongoDB) Disconnect

func (m *MongoDB) Disconnect(ctx context.Context)

Jump to

Keyboard shortcuts

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