mongo

package
v0.0.0-...-8c930d8 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 18 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 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 New

func New(cfg config.Mongo) (*mongo.Client, error)

New returns a new MongoDB client instance with given configuration. It's the caller's responsibility to close the client, caller should always call Close() when it's no longer needed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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