From b50ab8c04f6ae6097701a2a2b0f3cd9226ad77e3 Mon Sep 17 00:00:00 2001
From: zhangzengfei <zhangzengfei@iotlink.com>
Date: 星期三, 30 十月 2019 15:19:23 +0800
Subject: [PATCH] fix: change network settings

---
 extend/config/config.go |   51 +++++++++++++++++++++++++++------------------------
 1 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/extend/config/config.go b/extend/config/config.go
index 0a7b6b0..4dd7ec8 100644
--- a/extend/config/config.go
+++ b/extend/config/config.go
@@ -1,33 +1,36 @@
 package config
 
 import (
-	"github.com/spf13/viper"
 	"log"
+
+	"github.com/spf13/viper"
 )
 
 type server struct {
-	Runmode   string `mapstructure: "runmode"`
-	JwtSecret string `mapstructure: "jwtSecret"`
-	JwtExpire string `mapstructure: "jwtExpire"`
-	Url       string `mapstructure: "url"`
-	AnalyServerId string `mapstructure: "analyServerId"`
+	Runmode        string `mapstructure: "runmode"`
+	JwtSecret      string `mapstructure: "jwtSecret"`
+	JwtExpire      string `mapstructure: "jwtExpire"`
+	Url            string `mapstructure: "url"`
+	AnalyServerId  string `mapstructure: "analyServerId"`
 	NetworkAdapter string `mapstructure: "networkAdapter"`
 
-	DeviceNum string `mapstructure: "deviceNum"` //璁惧缂栧彿
-	DeviceType string `mapstructure: "deviceType"`  //璁惧鍨嬪彿
-	DeviceSerialNum string `mapstructure: "deviceSerialNum"`  //璁惧搴忓垪鍙�
-	MasterVersion string `mapstructure: "masterVersion"` //涓绘帶鐗堟湰
-	WebVersion string `mapstructure: "webVersion"`  //web鐗堟湰
-	ChannelCount string `mapstructure: "channelCount"`  //閫氶亾涓暟
-	DiskCount string `mapstructure: "diskCount"`  //纭洏涓暟
+	DeviceNum       string `mapstructure: "deviceNum"`       //璁惧缂栧彿
+	DeviceType      string `mapstructure: "deviceType"`      //璁惧鍨嬪彿
+	DeviceSerialNum string `mapstructure: "deviceSerialNum"` //璁惧搴忓垪鍙�
+	MasterVersion   string `mapstructure: "masterVersion"`   //涓绘帶鐗堟湰
+	WebVersion      string `mapstructure: "webVersion"`      //web鐗堟湰
+	ChannelCount    string `mapstructure: "channelCount"`    //閫氶亾涓暟
+	DiskCount       string `mapstructure: "diskCount"`       //纭洏涓暟
+
+	SysServerPort string `mapstructure: "SysServerPort"`
 }
 
 var Server = &server{}
 
 // wp add es 绱㈠紩 浠ュ強 IP port
 type esinfo struct {
-	Shards string		 `mapstructure:"shards"`
-	EsIndex  esindexlist `mapstructure:"index"`
+	Shards  string      `mapstructure:"shards"`
+	EsIndex esindexlist `mapstructure:"index"`
 }
 
 type esindexlist struct {
@@ -42,7 +45,7 @@
 }
 
 type sopath struct {
-	Ip string `mapstructure:"ip"`
+	Ip   string `mapstructure:"ip"`
 	Port string `mapstructure:"port"`
 }
 
@@ -51,18 +54,18 @@
 var EsInfo = &esinfo{}
 
 type facedetect struct {
-	Ip string `mapstructure:"Ip"`
-	Port int `mapstructure:"port"`
+	Ip   string `mapstructure:"Ip"`
+	Port int    `mapstructure:"port"`
 }
 
 type dbpersoncompare struct {
-	Ip string `mapstructure:"ip"`
-	Port int `mapstructure:"port"`
+	Ip   string `mapstructure:"ip"`
+	Port int    `mapstructure:"port"`
 }
 
 type espersoncompare struct {
-	Port int `mapstructure:"port"`
-	Ips []string `mapstructure:"ips"`
+	Port int      `mapstructure:"port"`
+	Ips  []string `mapstructure:"ips"`
 }
 
 var DbPersonCompInfo = &dbpersoncompare{}
@@ -84,8 +87,8 @@
 	}
 	viper.UnmarshalKey("es", EsInfo)
 	viper.UnmarshalKey("server", Server)
-	viper.UnmarshalKey("sopath",SoPath)
+	viper.UnmarshalKey("sopath", SoPath)
 	viper.UnmarshalKey("facedetect", FaceDetectSet)
-	viper.UnmarshalKey("dbpersoncompare",DbPersonCompInfo)
+	viper.UnmarshalKey("dbpersoncompare", DbPersonCompInfo)
 	viper.UnmarshalKey("espersoncompare", EsCompServerInfo)
 }

--
Gitblit v1.8.0