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

Method ImagePull

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

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

(c *gin.Context)

Source from the content-addressed store, hash-verified

98// @Router /containers/image/pull [post]
99// @x-panel-log {"bodyKeys":["repoID","imageName"],"paramKeys":[],"BeforeFunctions":[{"input_column":"id","input_value":"repoID","isList":false,"db":"image_repos","output_column":"name","output_value":"reponame"}],"formatZH":"镜像拉取 [reponame][imageName]","formatEN":"image pull [reponame][imageName]"}
100func (b *BaseApi) ImagePull(c *gin.Context) {
101 var req dto.ImagePull
102 if err := helper.CheckBindAndValidate(&req, c); err != nil {
103 return
104 }
105
106 if err := imageService.ImagePull(req); err != nil {
107 helper.InternalServer(c, err)
108 return
109 }
110
111 helper.Success(c)
112}
113
114// @Tags Container Image
115// @Summary Push image

Callers

nothing calls this directly

Calls 1

ImagePullMethod · 0.65

Tested by

no test coverage detected