liuxiaolong
2019-11-19 b5e236e28dee3e9481a48c615be22d70df44a42c
extend/config/config.go
@@ -26,8 +26,9 @@
   ChannelCount    string `mapstructure: "channelCount"`    //通道个数
   DiskCount       string `mapstructure: "diskCount"`       //硬盘个数
   SysServerPort string      `mapstructure: "sysServerPort"`
   SudoPassword  string      `mapstructure: "sudoPassword"` //系统密码
   SysThresholds []threshold `mapstructure: "sysThresholds"`
   PTZSpeed      int         `mapstructure: "ptzSpeed"` // 云台移动速度
}
var Server = &server{}
@@ -43,6 +44,7 @@
   DbTables       index `mapstructure:"dbtables"`
   Dbtablepersons index `mapstructure:"dbtablepersons"`
   Personaction   index `mapstructure:"personaction"`
   AiOcean   index `mapstructure:"aiOcean"`
}
type index struct {
   IndexName string `mapstructure:"index"`
@@ -88,7 +90,7 @@
   viper.AddConfigPath("/opt/vasystem/config/")
   err = viper.ReadInConfig()
   if err != nil {
      log.Fatal("error on parsing configuration file")
      log.Fatal("error on parsing configuration file",err)
   }
   viper.UnmarshalKey("es", EsInfo)
   viper.UnmarshalKey("server", Server)