From 124eb2e2f7ea8cc0f929bb2a93ca975df141bf13 Mon Sep 17 00:00:00 2001
From: sunty <1172534965@qq.com>
Date: 星期二, 11 二月 2020 18:38:08 +0800
Subject: [PATCH] add clearData
---
extend/config/config.go | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/extend/config/config.go b/extend/config/config.go
index a62cdfa..64baeb5 100644
--- a/extend/config/config.go
+++ b/extend/config/config.go
@@ -29,6 +29,8 @@
SudoPassword string `mapstructure: "sudoPassword"` //绯荤粺瀵嗙爜
SysThresholds []threshold `mapstructure: "sysThresholds"`
PTZSpeed int `mapstructure: "ptzSpeed"` // 浜戝彴绉诲姩閫熷害
+ PatchPath string `mapstructure:"patchPath"` //绯荤粺鏇存柊鍖呰矾寰�
+ BakPath string `mapstructure:"bakPath"` //绯荤粺鏇存柊鍖呰矾寰�
}
var Server = &server{}
@@ -40,7 +42,7 @@
}
type esindexlist struct {
- AiOcean index `mapstructure:"aiOcean"`
+ AiOcean index `mapstructure:"aiOcean"`
}
type index struct {
IndexName string `mapstructure:"index"`
@@ -52,9 +54,16 @@
Port string `mapstructure:"port"`
}
+type elastic struct {
+ IndexName string `mapstructure: "indexName"`
+ IndexType string `mapstructure: "indexType"`
+}
+
var SoPath = &sopath{}
var EsInfo = &esinfo{}
+
+var BasicFS = &elastic{}
type facedetect struct {
Ip string `mapstructure:"Ip"`
@@ -86,7 +95,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)
@@ -94,4 +103,5 @@
viper.UnmarshalKey("facedetect", FaceDetectSet)
viper.UnmarshalKey("dbpersoncompare", DbPersonCompInfo)
viper.UnmarshalKey("espersoncompare", EsCompServerInfo)
+ viper.UnmarshalKey("elastic.basicFS", BasicFS)
}
--
Gitblit v1.8.0