Skip to content

Commit 4705e76

Browse files
author
wangchangmin
committed
update fox to gin
1 parent bed4888 commit 4705e76

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

internal/service_manager/api/deploy_api.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ import (
44
"net/http"
55
"strconv"
66

7-
"github.com/fox-gonic/fox"
7+
"github.com/gin-gonic/gin"
88
"github.com/qiniu/zeroops/internal/service_manager/model"
99
"github.com/qiniu/zeroops/internal/service_manager/service"
1010
"github.com/rs/zerolog/log"
1111
)
1212

1313
// setupDeployRouters 设置部署管理相关路由
14-
func (api *Api) setupDeployRouters(router *fox.Engine) {
14+
func (api *Api) setupDeployRouters(router *gin.Engine) {
1515
// 部署任务基本操作
1616
router.POST("/v1/deployments", api.CreateDeployment)
1717
router.GET("/v1/deployments", api.GetDeployments)
@@ -28,7 +28,7 @@ func (api *Api) setupDeployRouters(router *fox.Engine) {
2828
// ===== 部署任务基本操作 =====
2929

3030
// CreateDeployment 创建发布任务(POST /v1/deployments)
31-
func (api *Api) CreateDeployment(c *fox.Context) {
31+
func (api *Api) CreateDeployment(c *gin.Context) {
3232
ctx := c.Request.Context()
3333

3434
var req model.CreateDeploymentRequest
@@ -79,7 +79,7 @@ func (api *Api) CreateDeployment(c *fox.Context) {
7979
}
8080

8181
// GetDeploymentByServiceAndVersion 获取发布任务详情(GET /v1/deployments/:service/:version)
82-
func (api *Api) GetDeploymentByServiceAndVersion(c *fox.Context) {
82+
func (api *Api) GetDeploymentByServiceAndVersion(c *gin.Context) {
8383
ctx := c.Request.Context()
8484
serviceName := c.Param("service")
8585
versionName := c.Param("version")
@@ -113,7 +113,7 @@ func (api *Api) GetDeploymentByServiceAndVersion(c *fox.Context) {
113113
}
114114

115115
// GetDeployments 获取发布任务列表(GET /v1/deployments)
116-
func (api *Api) GetDeployments(c *fox.Context) {
116+
func (api *Api) GetDeployments(c *gin.Context) {
117117
ctx := c.Request.Context()
118118

119119
query := &model.DeploymentQuery{
@@ -144,7 +144,7 @@ func (api *Api) GetDeployments(c *fox.Context) {
144144
}
145145

146146
// UpdateDeployment 修改发布任务(POST /v1/deployments/:service/:version)
147-
func (api *Api) UpdateDeployment(c *fox.Context) {
147+
func (api *Api) UpdateDeployment(c *gin.Context) {
148148
ctx := c.Request.Context()
149149
serviceName := c.Param("service")
150150
versionName := c.Param("version")
@@ -196,7 +196,7 @@ func (api *Api) UpdateDeployment(c *fox.Context) {
196196
}
197197

198198
// DeleteDeployment 删除发布任务(DELETE /v1/deployments/:service/:version)
199-
func (api *Api) DeleteDeployment(c *fox.Context) {
199+
func (api *Api) DeleteDeployment(c *gin.Context) {
200200
ctx := c.Request.Context()
201201
serviceName := c.Param("service")
202202
versionName := c.Param("version")
@@ -241,7 +241,7 @@ func (api *Api) DeleteDeployment(c *fox.Context) {
241241
// ===== 部署任务控制操作 =====
242242

243243
// PauseDeployment 暂停发布任务(POST /v1/deployments/:service/:version/pause)
244-
func (api *Api) PauseDeployment(c *fox.Context) {
244+
func (api *Api) PauseDeployment(c *gin.Context) {
245245
ctx := c.Request.Context()
246246
serviceName := c.Param("service")
247247
versionName := c.Param("version")
@@ -284,7 +284,7 @@ func (api *Api) PauseDeployment(c *fox.Context) {
284284
}
285285

286286
// ContinueDeployment 继续发布任务(POST /v1/deployments/:service/:version/continue)
287-
func (api *Api) ContinueDeployment(c *fox.Context) {
287+
func (api *Api) ContinueDeployment(c *gin.Context) {
288288
ctx := c.Request.Context()
289289
serviceName := c.Param("service")
290290
versionName := c.Param("version")
@@ -327,7 +327,7 @@ func (api *Api) ContinueDeployment(c *fox.Context) {
327327
}
328328

329329
// RollbackDeployment 回滚发布任务(POST /v1/deployments/:service/:version/rollback)
330-
func (api *Api) RollbackDeployment(c *fox.Context) {
330+
func (api *Api) RollbackDeployment(c *gin.Context) {
331331
ctx := c.Request.Context()
332332
serviceName := c.Param("service")
333333
versionName := c.Param("version")

0 commit comments

Comments
 (0)