Documentation ¶
Index ¶
Constants ¶
View Source
const ( TypeMongoDB = "mongo" TypeDocDB = "docdb" DocDBcaFileURI = "https://s3.amazonaws.com/rds-downloads/rds-combined-ca-bundle.pem" )
Variables ¶
This section is empty.
Functions ¶
func GetDocDBcaFile ¶ added in v1.10.43
GetDocDBcaFile will fetch the file located at DocDBcaFileURI into a local file Due to size limitations we cannot use Kubernetes secrets like we use for MongoDB TLS configs
func GetMongoDatabase ¶
func GetMongoDatabase(dsn, name, dbType string, allowTLS bool, certConfig *MongoSSLConfig) (db *mongo.Database, err error)
GetMongoDatabase returns a valid database connection to the configured MongoDB database
Types ¶
type MongoSSLConfig ¶
type MongoSSLConfig struct { // SSLClientCertificateKeyFile specifies a path to the client certificate and private key, which must be concatenated into one file. SSLClientCertificateKeyFile string // SSLClientCertificateKeyFilePassword specifies the password to decrypt the client private key file SSLClientCertificateKeyFilePassword string // SSLCertificateAuthoritiyFile specifies the path to a single or bundle of certificate authorities SSLCertificateAuthoritiyFile string }
MongoSSLConfig contains the configurations necessary for an SSL connection
Click to show internal directories.
Click to hide internal directories.