MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / ImageTag

Method ImageTag

agent/app/api/v2/image.go:192–204  ·  view source on GitHub ↗

@Tags Container Image @Summary Tag image @Accept json @Param request body dto.ImageTag true "request" @Success 200 @Security ApiKeyAuth @Security Timestamp @Router /containers/image/tag [post] @x-panel-log {"bodyKeys":["repoID","targetName"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","in

(c *gin.Context)

Source from the content-addressed store, hash-verified

190// @Router /containers/image/tag [post]
191// @x-panel-log {"bodyKeys":["repoID","targetName"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","input_value":"repoID","isList":false,"db":"image_repos","output_column":"name","output_value":"reponame"}],"formatZH":"tag 镜像 [reponame][targetName]","formatEN":"tag image [reponame][targetName]"}
192func (b *BaseApi) ImageTag(c *gin.Context) {
193 var req dto.ImageTag
194 if err := helper.CheckBindAndValidate(&req, c); err != nil {
195 return
196 }
197
198 if err := imageService.ImageTag(req); err != nil {
199 helper.InternalServer(c, err)
200 return
201 }
202
203 helper.Success(c)
204}
205
206// @Tags Container Image
207// @Summary Load image

Callers

nothing calls this directly

Calls 1

ImageTagMethod · 0.65

Tested by

no test coverage detected