From 2441065ffaad465d2eca8f7200a2010360c2ddb1 Mon Sep 17 00:00:00 2001 From: liuxiaolong <736321739@qq.com> Date: 星期五, 01 十一月 2019 14:39:02 +0800 Subject: [PATCH] update es swagger --- controllers/es.go | 32 +++++++++++++++++++++++++++++--- 1 files changed, 29 insertions(+), 3 deletions(-) diff --git a/controllers/es.go b/controllers/es.go index ae95a3a..a632c11 100644 --- a/controllers/es.go +++ b/controllers/es.go @@ -163,7 +163,16 @@ return dataSource } -//鏌ヨES闆嗙兢淇℃伅-鍏ュ彛 +// @Security ApiKeyAuth +// @Summary 鏌ヨES闆嗙兢淇℃伅-鍏ュ彛 +// @Description 鏌ヨES闆嗙兢淇℃伅-鍏ュ彛 +// @Accept json +// @Produce json +// @Tags es +// @Param obj body controllers.EsClusterInfo true "鏌ヨ闆嗙兢鍙傛暟" +// @Success 200 {string} json "{"code":200, msg:"", success:true}" +// @Failure 500 {string} json "{"code":500, msg:"", success:false}" +// @Router /data/api-v/es/getEsClusterInfo [POST] func (em *EsManagementController) GetEsClusterInfo(c *gin.Context) { var body EsClusterInfo c.BindJSON(&body) @@ -230,7 +239,15 @@ return nodeInfos, err } -//鍒涘缓鑺傜偣 +// @Security ApiKeyAuth +// @Summary 鍒涘缓鑺傜偣 +// @Description 鍒涘缓鑺傜偣 +// @Accept json +// @Produce json +// @Tags es +// @Success 200 {string} json "{"code":200, msg:"", success:true}" +// @Failure 500 {string} json "{"code":500, msg:"", success:false}" +// @Router /data/api-v/es/createNode [POST] func (em *EsManagementController) CreateNode(c *gin.Context) { msg := "鍒涘缓鑺傜偣澶辫触锛岃鑱旂郴绠$悊鍛�" str := "sh /opt/script/create_first_node.sh" @@ -252,7 +269,16 @@ util.ResponseFormat(c, code.CreateFirstNodeErr, msg) } -//鍔犲叆闆嗙兢 +// @Security ApiKeyAuth +// @Summary 鍔犲叆闆嗙兢 +// @Description 鍔犲叆闆嗙兢 +// @Accept json +// @Produce json +// @Tags es +// @Param obj body controllers.AddCluster true "鍔犲叆闆嗙兢鍙傛暟" +// @Success 200 {string} json "{"code":200, msg:"", success:true}" +// @Failure 500 {string} json "{"code":500, msg:"", success:false}" +// @Router /data/api-v/es/addCluster [POST] func (em *EsManagementController) AddCluster(c *gin.Context) { var ac AddCluster err := c.BindJSON(&ac) -- Gitblit v1.8.0