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

Method ImagePush

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

@Tags Container Image @Summary Push image @Accept json @Param request body dto.ImagePush true "request" @Success 200 @Security ApiKeyAuth @Security Timestamp @Router /containers/image/push [post] @x-panel-log {"bodyKeys":["repoID","tagName","name"],"paramKeys":[],"BeforeFunctions":[{"input_column":"

(c *gin.Context)

Source from the content-addressed store, hash-verified

121// @Router /containers/image/push [post]
122// @x-panel-log {"bodyKeys":["repoID","tagName","name"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","input_value":"repoID","isList":false,"db":"image_repos","output_column":"name","output_value":"reponame"}],"formatZH":"[tagName] 推送到 [reponame][name]","formatEN":"push [tagName] to [reponame][name]"}
123func (b *BaseApi) ImagePush(c *gin.Context) {
124 var req dto.ImagePush
125 if err := helper.CheckBindAndValidate(&req, c); err != nil {
126 return
127 }
128
129 if err := imageService.ImagePush(req); err != nil {
130 helper.InternalServer(c, err)
131 return
132 }
133
134 helper.Success(c)
135}
136
137// @Tags Container Image
138// @Summary Delete image

Callers

nothing calls this directly

Calls 1

ImagePushMethod · 0.65

Tested by

no test coverage detected