From de37adb6dec5e9da70f9cc11b234176ee6fda986 Mon Sep 17 00:00:00 2001 From: sunty <1172534965@qq.com> Date: 星期五, 24 五月 2024 21:04:39 +0800 Subject: [PATCH] 添加布控模块,合并person_status和snapshot_count_summary数据库等 --- config/config.go | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/config/config.go b/config/config.go index ed8e823..f6ab35f 100644 --- a/config/config.go +++ b/config/config.go @@ -38,10 +38,16 @@ LogLevel string `mapstructure: "logLevel"` } +type api struct { + Host string `mapstructure: "host"` + Port string `mapstructure: "port"` +} + var LogConf = &LogConfig{} var DataBase = &database{} var Elastic = &elastic{} var App = &app{} +var Api = &api{} var LogBasePath string var LogLevel int @@ -57,6 +63,7 @@ viper.UnmarshalKey("elastic", Elastic) viper.UnmarshalKey("database", DataBase) viper.UnmarshalKey("app", App) + viper.UnmarshalKey("api", Api) viper.UnmarshalKey("log", LogConf) logger.SetLevel(LogConf.Level) if viper.GetString("LogBasePath") != "" { -- Gitblit v1.8.0