mirror of
https://github.com/vbatts/imgsrv.git
synced 2025-06-30 14:38:28 +00:00
*: bubble the dbhandler up to cli
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
51545d2e46
commit
f768d2f9f6
3 changed files with 31 additions and 13 deletions
|
@ -2,6 +2,7 @@ package config
|
|||
|
||||
import (
|
||||
"io/ioutil"
|
||||
|
||||
"launchpad.net/goyaml"
|
||||
)
|
||||
|
||||
|
@ -9,6 +10,7 @@ type Config struct {
|
|||
Server bool // Run as server, if different than false (server)
|
||||
Ip string // Bind address, if different than 0.0.0.0 (server)
|
||||
Port string // listen port, if different than '7777' (server)
|
||||
DbHandler string // "mongo" (server)
|
||||
MongoHost string // mongoDB host, if different than 'localhost' (server)
|
||||
MongoDbName string // mongoDB db name, if different than 'filesrv' (server)
|
||||
MongoUsername string // mongoDB username, if any (server)
|
||||
|
@ -52,6 +54,9 @@ func (c *Config) Merge(other *Config) error {
|
|||
if len(other.Port) > 0 {
|
||||
c.Port = other.Port
|
||||
}
|
||||
if len(other.DbHandler) > 0 {
|
||||
c.DbHandler = other.DbHandler
|
||||
}
|
||||
if len(other.MongoHost) > 0 {
|
||||
c.MongoHost = other.MongoHost
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue