liuxiaolong
2019-09-16 e87b04d7f9d6b25c858d421432bed5443f91b9df
extend/config/config.go
@@ -69,12 +69,23 @@
var DBconf = &database{}
type CompareServer struct {
type facedetect struct {
   Url string `mapstructure:"url"`
}
type dbpersoncompare struct {
   Url string `mapstructure:"url"`
}
type espersoncompare struct {
   Url []string `mapstructure:"url"`
}
var CompServerInfo = &CompareServer{}
var DbPersonCompInfo = &dbpersoncompare{}
var EsCompServerInfo = &espersoncompare{}
var FaceDetectSet = &facedetect{}
// Init is an exported method that takes the environment starts the viper
// (external lib) and returns the configuration struct.
@@ -93,6 +104,8 @@
   viper.UnmarshalKey("redis", RedisConf)
   viper.UnmarshalKey("database", DBconf)
   viper.UnmarshalKey("weedfs", WeedFs)
   viper.UnmarshalKey("compare", CompServerInfo)
   viper.UnmarshalKey("sopath",SoPath)
   viper.UnmarshalKey("facedetect", FaceDetectSet)
   viper.UnmarshalKey("dbpersoncompare",DbPersonCompInfo)
   viper.UnmarshalKey("espersoncompare", EsCompServerInfo)
}