storage

package
v1.11.24-beta005 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 13 Imported by: 0

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

func GetDocDBcaFile() (string, error)

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

Jump to

Keyboard shortcuts

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