@Tags Container @Summary Create container @Accept json @Param request body dto.ContainerOperate true "request" @Success 200 @Security ApiKeyAuth @Security Timestamp @Router /containers [post] @x-panel-log {"bodyKeys":["name","image"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"创建容器 [name][image]
(c *gin.Context)
| 457 | // @Router /containers [post] |
| 458 | // @x-panel-log {"bodyKeys":["name","image"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"创建容器 [name][image]","formatEN":"create container [name][image]"} |
| 459 | func (b *BaseApi) ContainerCreate(c *gin.Context) { |
| 460 | var req dto.ContainerOperate |
| 461 | if err := helper.CheckBindAndValidate(&req, c); err != nil { |
| 462 | return |
| 463 | } |
| 464 | |
| 465 | if err := containerService.ContainerCreate(req, true); err != nil { |
| 466 | helper.InternalServer(c, err) |
| 467 | return |
| 468 | } |
| 469 | helper.Success(c) |
| 470 | } |
| 471 | |
| 472 | // @Tags Container |
| 473 | // @Summary Upgrade container |
nothing calls this directly
no test coverage detected