mongo

package
v0.0.64 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Client

func Client() (*mongo.Client, error)

Client returns the MongoDB client instance

func Close

func Close() error

Close closes the MongoDB client connection

func Collection

func Collection(dbName, collName string) (*mongo.Collection, error)

Collection returns a handle to the specified collection

func Database

func Database(name string) (*mongo.Database, error)

Database returns a handle to the specified database

func Health

func Health() error

Health checks if the MongoDB connection is healthy

func Init

func Init() (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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