mongoutils

package
v0.20.4 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: Apache-2.0 Imports: 5 Imported by: 3 modules, 3 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMongoConnectionStringFromEnv

func GetMongoConnectionStringFromEnv() (string, string, error)

GetMongoConnectionStringFromEnv returns a mongodb connection string and the database name by considering the following environment variables: MONGODB_DATABASE - The name of the database within the mongodb service (e.g. keptn) MONGODB_EXTERNAL_CONNECTION_STRING - If this variable is set, the function will return this value. Otherwise, it will construct the connection string from the following variables. MONGODB_HOST - The host name (including the port) of the mongodb service (e.g. mongo:27017) MONGODB_USER - The username of the database MONGODB_PASSWORD - The password of the user The resulting constructed string is compatible with the mongodb services that is deployed by default as part of Keptn core, and looks as follows: mongodb://<MONGODB_USER>:<MONGODB_PASSWORD>@MONGODB_HOST>/<MONGODB_DATABASE>

Types

This section is empty.

Jump to

Keyboard shortcuts

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