From 11db81a7e188ec57ddefcc73854b1a0f6a03efd4 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Thu, 29 Oct 2020 20:52:27 +0800 Subject: [PATCH] 1 --- server/analyseapi/app.go | 4 ++-- server/analyseapi/metamgr.go | 6 +++--- server/analyseapi/riskmgr.go | 2 +- server/tools/protobuild/mt.proto | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/server/analyseapi/app.go b/server/analyseapi/app.go index 0a68e52..f03afb6 100644 --- a/server/analyseapi/app.go +++ b/server/analyseapi/app.go @@ -15,17 +15,17 @@ func (this *App_) Init() { f5.App.SetPkgName("analyseapi") this.App_.Init() G.MetaMgr = new(MetaMgr).Init() - G.RiskMgr = new(RiskMgr).Init() G.GameLog = new(GameLog).Init() G.HttpServer = new(f5.HttpServer).Init("httpserver", 1000 * 60) + G.RiskMgr = new(RiskMgr).Init() G.HttpServer.Start(G.MetaMgr.GetServer(1).GetListenPort()); } func (this *App_) UnInit() { + G.RiskMgr.UnInit() G.HttpServer.UnInit() G.GameLog.UnInit() - G.RiskMgr.UnInit() G.MetaMgr.UnInit() this.App_.UnInit() } diff --git a/server/analyseapi/metamgr.go b/server/analyseapi/metamgr.go index bc02d47..122e8f6 100644 --- a/server/analyseapi/metamgr.go +++ b/server/analyseapi/metamgr.go @@ -49,9 +49,9 @@ func (this *MetaMgr) Init() *MetaMgr { WrapMeta: (*MtwIpBlackList)(nil)}, f5.MetaClass{ FileName: configDir + "launch_whitelist.json", - Idx: MT_LAUNCH_BLACK_LIST, - RawMeta: (*mt.LaunchBlackListMetas)(nil), - WrapMeta: (*MtwLaunchBlackList)(nil)}, + Idx: MT_LAUNCH_WHITE_LIST, + RawMeta: (*mt.LaunchWhiteListMetas)(nil), + WrapMeta: (*MtwLaunchWhiteList)(nil)}, f5.MetaClass{ FileName: configDir + "launch_blacklist.json", Idx: MT_LAUNCH_BLACK_LIST, diff --git a/server/analyseapi/riskmgr.go b/server/analyseapi/riskmgr.go index 78cd06e..10bc0b1 100644 --- a/server/analyseapi/riskmgr.go +++ b/server/analyseapi/riskmgr.go @@ -59,7 +59,7 @@ func (this* RiskMgr) Init() *RiskMgr { for _, val := range G.MetaMgr.GetLaunchBlackList().GetList() { this.launchBlackList[val] = 1 } - this.accessKeyId = G.MetaMgr.GetAliKey().GetAccessKeyId() + this.accessKeyId = G.MetaMgr.GetAliKey().GetAccessKeyid() this.accessSecret = G.MetaMgr.GetAliKey().GetAccessSecret() G.HttpServer.RegisterHandle("Analyse", "isOpen", this.__analyseIsOpen) diff --git a/server/tools/protobuild/mt.proto b/server/tools/protobuild/mt.proto index f7f14c0..b34f244 100644 --- a/server/tools/protobuild/mt.proto +++ b/server/tools/protobuild/mt.proto @@ -4,8 +4,8 @@ option go_package = ".;mt"; message AliKeyConf { - optional string accessKeyId = 1; - optional string accessSecret = 2; + optional string access_keyid = 1; + optional string access_secret = 2; } message AliKeyInfoMetas @@ -42,7 +42,7 @@ message IpBlackList message IpBlackListMetas { - repeated IpWhiteList values = 1; + repeated IpBlackList values = 1; } message LaunchWhiteList @@ -62,5 +62,5 @@ message LaunchBlackList message LaunchBlackListMetas { - repeated IpWhiteList values = 1; + repeated LaunchBlackList values = 1; }