liuxiaolong
2019-09-25 4ff7c2059695b73aadc0ddb510dad27a5a83e780
extend/config/config.go
@@ -26,24 +26,8 @@
var Server = &server{}
type weedfs struct {
   Ip string `mapstructure: "ip"`
   UploadPort int `mapstructure: "uploadport"`
   VisitPort int `mapstructure: "visitport"`
}
var WeedFs = &weedfs{}
type database struct {
   Drive    string `mapstructure:"drive"`
   Name     string `mapstructure:"name"`
   FilePath string `mapstructure:"filepath"`
}
// wp add es 索引 以及 IP port
type esinfo struct {
   Masterip string      `mapstructure:"masterip"`
   Httpport string      `mapstructure:"httpport"`
   Shards string       `mapstructure:"shards"`
   EsIndex  esindexlist `mapstructure:"index"`
}
@@ -67,8 +51,6 @@
var SoPath = &sopath{}
var EsInfo = &esinfo{}
var DBconf = &database{}
type facedetect struct {
   Ip string `mapstructure:"Ip"`
@@ -104,8 +86,6 @@
   }
   viper.UnmarshalKey("es", EsInfo)
   viper.UnmarshalKey("server", Server)
   viper.UnmarshalKey("database", DBconf)
   viper.UnmarshalKey("weedfs", WeedFs)
   viper.UnmarshalKey("sopath",SoPath)
   viper.UnmarshalKey("facedetect", FaceDetectSet)
   viper.UnmarshalKey("dbpersoncompare",DbPersonCompInfo)