mirror of
https://github.com/gomods/athens
synced 2026-02-03 11:00:32 +00:00
Allow mgo.ParseURL to set [/database] (#997)
* Allow mgo.ParseURL to set [/database] As per Michael's solution we need to be able to set the database from either the parsed connection string, or fallback to athens if not set. Signed-off-by: Chris M <me@christophermills.co.uk> * Remove TimeoutDuration which was removed #928 Signed-off-by: Chris M <me@christophermills.co.uk> * Correct conf_test to accommodate for changes I'd missed out the addition of DefaultDBName from the test, this has now been corrected Signed-off-by: Chris M <me@christophermills.co.uk> * Make sure gofmt runs automatically on this machine Y'know simple stuff. Signed-off-by: Chris M <me@christophermills.co.uk>
This commit is contained in:
committed by
Aaron Schlesinger
parent
aa3fb3389c
commit
2cf10c3ead
+5
-1
@@ -189,10 +189,14 @@ StatsExporter = "prometheus"
|
||||
Region = ""
|
||||
|
||||
[Storage.Mongo]
|
||||
# Full URL for mongo storage
|
||||
# Full connection string for mongo storage
|
||||
# Env override: ATHENS_MONGO_STORAGE_URL
|
||||
URL = "mongodb://127.0.0.1:27017"
|
||||
|
||||
# Sets default database name for mongo storage if not set by URL
|
||||
# Env override: ATHENS_MONGO_DEFAULT_DATABASE
|
||||
DefaultDBName = "athens"
|
||||
|
||||
# Path to certificate to use for the mongo connection
|
||||
# Env override: ATHENS_MONGO_CERT_PATH
|
||||
CertPath = ""
|
||||
|
||||
Reference in New Issue
Block a user