mongo

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

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

Go to latest
Published: Dec 8, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// EnvMongoUsr represents the environment variable where the mongo's user key is located
	EnvMongoUsr = "MONGO_USR"
	// EnvMongoPwd represents the environment variable where the mongo's password key is located
	EnvMongoPwd = "MONGO_PWD"

	// Database consultable by the app
	Database = "tp-auth"
	// Timeout for any database request
	Timeout = 3600 * time.Second
)

Variables

This section is empty.

Functions

func NewDatabaseConnection

func NewDatabaseConnection(ctx context.Context) (db *mongo.Database, err error)

NewDatabaseConnection returns a brand new database connection

func NewMongoClient

func NewMongoClient(ctx context.Context) (client *mongo.Client, err error)

NewMongoClient returns a brand new client

Types

This section is empty.

Jump to

Keyboard shortcuts

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