SSL Support for Mongo (#527)

* tested mongo ssl

* Added a todo
This commit is contained in:
Michal Pristas
2018-08-21 18:09:49 +02:00
committed by GitHub
parent 67a07d9da2
commit 042cbcaddf
14 changed files with 147 additions and 52 deletions
+4 -2
View File
@@ -26,11 +26,13 @@ func GetStorage() (storage.Backend, error) {
case "memory":
return mem.NewStorage()
case "mongo":
storageRoot, err = env.MongoURI()
connectionString, err := env.MongoConnectionString()
if err != nil {
return nil, err
}
return mongo.NewStorage(storageRoot)
certPath := env.MongoCertPath()
return mongo.NewStorageWithCert(connectionString, certPath)
case "disk":
storageRoot, err = env.DiskRoot()
if err != nil {