mongoDBConnection

package
v2.0.14-core Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectToLocalMongoDB

func ConnectToLocalMongoDB(log logger.ILogger) (*mongo.Client, error)

Assumes local mongo running in docker as per this command: docker run -d --name mongo-on-docker -p 27888:27017 -e MONGO_INITDB_ROOT_USERNAME=mongoadmin -e MONGO_INITDB_ROOT_PASSWORD=secret mongo

func ConnectToRemoteMongoDB

func ConnectToRemoteMongoDB(
	MongoEndpoint string,
	MongoUsername string,
	MongoPassword string,
	log logger.ILogger,
) (*mongo.Client, error)

func GetMongoPasswordFromSecretCache added in v2.0.21

func GetMongoPasswordFromSecretCache(secretName string) (string, error)

func GetUserDatabaseName

func GetUserDatabaseName(envName string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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