Documentation ¶
Index ¶
- func DeleteImage(c *gin.Context)
- func DeleteRepository(c *gin.Context)
- func DownloadImage(c *gin.Context)
- func DownloadImageChunk(c *gin.Context)
- func GetImageInfo(c *gin.Context)
- func ListImages(c *gin.Context)
- func ListRepoImages(c *gin.Context)
- func ListRepositories(c *gin.Context)
- func MergeChunk(c *gin.Context)
- func SetupRouter(r *gin.RouterGroup)
- func StartImageChunkUpload(c *gin.Context)
- func StartImageUpload(c *gin.Context)
- func UploadImage(c *gin.Context)
- func UploadImageChunk(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteImage ¶
DeleteImage delete image
@Summary delete image @Description DeleteImage delete image @Tags 镜像管理 @Accept json @Produce json @Param Authorization header string true "token" @Param username path string true "仓库用户名" @Param name path string true "仓库名" @Param tag query string false "镜像标签" default("latest") @Success 200 @Router /image/{username}/{name} [delete]
func DeleteRepository ¶
DeleteImage delete repository
@Summary delete specified repository @Description DeleteRepository @Tags 镜像管理 @Accept json @Produce json @Param Authorization header string true "token" @Param username path string true "用户名" @Param name path string true "仓库名" @Success 200 @Router /repository/{username}/{name} [delete]
func DownloadImage ¶
DownloadImage download image
@Summary download image @Description DownloadImage download image @Tags 镜像管理 @Accept json @Produce json @Param Authorization header string true "token" @Param username path string true "仓库用户名" @Param name path string true "仓库名" @Param tag query string false "镜像标签" default("latest") @Success 200 @Router /image/{username}/{name}/download [get]
func DownloadImageChunk ¶
DownloadImageChunk download image chunk
@Summary download image chunk @Description DownloadImageChunk download image chunk @Tags 镜像管理 @Accept json @Produce json @Param Authorization header string true "token" @Param username path string true "仓库用户名" @Param name path string true "仓库名" @Param chunkIdx path int true "分片序号" @Param tag query string false "标签" default("latest") @Param chunkSize query string false "分片大小" default("50M") @Success 200 @Router /image/{username}/{name}/chunk/{chunkIdx}/download [get]
func GetImageInfo ¶
GetImageInfo get image meta info
@Summary get image meta info @Description GetImageInfo get image meta info @Tags 镜像管理 @Accept json @Produce json @Param Authorization header string true "token" @Param username path string true "仓库用户名" @Param name path string true "仓库名" @Param tag query string false "镜像标签" default("latest") @Success 200 @Router /image/{username}/{name}/info [get]
func ListImages ¶
ListImages get image list of current user or specified user
@Summary get image list @Description ListImages get images list @Tags 镜像管理 @Accept json @Produce json @Param Authorization header string true "token" @Param keyword query string false "搜索关键字" default() @Param username query string false "用户名" @Param page query int false "页码" default(1) @Param pageSize query int false "每一页数量" default(10) @success 200 {object} types.JSONResult{data=[]types.ImageInfoResp} "desc" @Router /images [get]
func ListRepoImages ¶
ListRepoImages get image list of repository
@Summary get image list of specified repository @Description ListRepoImages get image list of specified repo @Tags 镜像管理 @Accept json @Produce json @Param Authorization header string true "token" @Param username path string true "用户名" @Param name path string true "仓库名" @Success 200 @Router /repository/{username}/{name} [get]
func ListRepositories ¶
ListRepositories get repository list of specified user or current user
@Summary get repository list @Description ListRepositories get repository list @Tags 镜像管理 @Accept json @Produce json @Param Authorization header string true "token" @Param username query string false "用户名" @Param page query int false "页码" default(1) @Param pageSize query int false "每一页数量" default(10) @Success 200 @Router /repositories [get]
func MergeChunk ¶
MergeChunk merge chunk slice file
@Summary merge chunk slice file @Description MergeChunk merge chunk slice file @Tags 镜像管理 @Accept json @Produce json @Param Authorization header string true "token" @Param uploadID query string true "上传uploadID" @Success 200 @Router /image/chunk/merge [post]
func SetupRouter ¶
func SetupRouter(r *gin.RouterGroup)
func StartImageChunkUpload ¶
StartImageChunkUpload start chunk upload session
@Summary upload image chunk @Description UploadImageChunk upload image chunk @Tags 镜像管理 @Accept json @Produce json @Param Authorization header string true "token" @Param username path string true "用户名" @Param name path string true "镜像名" @Param force query bool false "强制上传(覆盖)" default("false") @Param chunkSize query int true "chunk大小" @Param nChunks query int true "chunk数量" @Success 200 @Router /image/:username/:name/startChunkUpload [post]
func StartImageUpload ¶
StartUpload start single file upload session
@Summary upload image file @Description StartUpload upload image file @Tags 镜像管理 @Accept json @Produce json @Param Authorization header string true "token" @Param username path string true "用户名" @Param name path string true "镜像名" @Param force query bool false "强制上传(覆盖)" default("false") @Param body body types.ImageCreateRequest true "镜像配置" @Success 200 @Router /image/:username/:name/startUpload [post]
func UploadImage ¶
UploadImage upload image
@Summary upload image @Description UploadImage upload image @Tags 镜像管理 @Accept json @Produce json @Param Authorization header string true "token" @Param username path string true "仓库用户名" @Param name path string true "仓库名" @Param force query bool false "强制上传(覆盖)" default("false") @Param file formData file true "文件" @Success 200 @Router /image/{username}/{name}/upload [post]
func UploadImageChunk ¶
UploadImageChunk upload image chunk
@Summary upload image chunk @Description UploadImageChunk upload image chunk @Tags 镜像管理 @Accept json @Produce json @Param Authorization header string true "token" @Param chunkIdx path string true "分片序列" @Param uploadID query string true "上传uploadID" @Param file formData file true "文件" @Success 200 @Router /image/chunk/{chunkIdx}/upload [post]
Types ¶
This section is empty.