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

Method ImageLoad

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

@Tags Container Image @Summary Load image @Accept json @Param request body dto.ImageLoad true "request" @Success 200 @Security ApiKeyAuth @Security Timestamp @Router /containers/image/load [post] @x-panel-log {"bodyKeys":["path"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"从 [path] 加载镜像","format

(c *gin.Context)

Source from the content-addressed store, hash-verified

213// @Router /containers/image/load [post]
214// @x-panel-log {"bodyKeys":["path"],"paramKeys":[],"BeforeFunctions":[],"formatZH":"从 [path] 加载镜像","formatEN":"load image from [path]"}
215func (b *BaseApi) ImageLoad(c *gin.Context) {
216 var req dto.ImageLoad
217 if err := helper.CheckBindAndValidate(&req, c); err != nil {
218 return
219 }
220
221 if err := imageService.ImageLoad(req); err != nil {
222 helper.InternalServer(c, err)
223 return
224 }
225
226 helper.Success(c)
227}

Callers

nothing calls this directly

Calls 1

ImageLoadMethod · 0.65

Tested by

no test coverage detected