db

package
v0.0.0-...-5bf7ce9 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: AGPL-3.0 Imports: 5 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
}

MongoDB holds the Mongo client and the main database reference

func Connect

func Connect(cfg *config.Config) (*MongoDB, error)

Connect initializes a MongoDB client and selects a database. Database name can be hardcoded or configurable. We'll hardcode "padelfriends" for now.

Jump to

Keyboard shortcuts

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