From 0a452fe617d13560aa3bdc937402dc2ad821a59c Mon Sep 17 00:00:00 2001 From: a7458969 <290198252@qq.com> Date: Fri, 20 Mar 2020 23:13:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0elasticsearch=E6=93=8D?= =?UTF-8?q?=E4=BD=9Capi?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/elasticEngine.go | 3 +-- db/sqlManager.go | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/db/elasticEngine.go b/db/elasticEngine.go index 3f683e6..600254b 100644 --- a/db/elasticEngine.go +++ b/db/elasticEngine.go @@ -22,11 +22,10 @@ func InitELK() { if nil != e{ logs.Error(e.Error()) gElkEngine.cli = nil - } } -func (*ElkEngine)Search() (error) { +func (*ElkEngine)Search(index string) (error) { if nil != gElkEngine.cli{ } diff --git a/db/sqlManager.go b/db/sqlManager.go index 2ab8d71..0a61ce9 100644 --- a/db/sqlManager.go +++ b/db/sqlManager.go @@ -24,12 +24,12 @@ func Init() { //InitMongoDb() fmt.Print("api runmode is " + config.ApiConfig().RunMode) if config.ApiConfig().RunMode == "debug"{ - blogDb = Database{Type: string(""), DB: initMysql(blogConf)} + blogDb = Database{Type: string(""), DB: initMysqlTLS(blogConf)} }else{ blogDb = Database{Type: string(""), DB: initMysqlTLS(blogConf)} } if config.ApiConfig().RunMode == "debug"{ - gDb = Database{Type: string(""), DB: initMysql(mysqlconf)} + gDb = Database{Type: string(""), DB: initMysqlTLS(mysqlconf)} }else{ gDb = Database{Type: string(""), DB: initMysqlTLS(mysqlconf)} }