Documentation ¶
Index ¶
- Constants
- func SyncCharts(ctx context.Context, repo *models.ChartRepo, ...)
- type AppFilesResponse
- type AppstoreHandler
- func (h *AppstoreHandler) AppDetail(c *gin.Context)
- func (h *AppstoreHandler) AppFiles(c *gin.Context)
- func (h *AppstoreHandler) DeleteExternalRepo(c *gin.Context)
- func (h *AppstoreHandler) ListApps(c *gin.Context)
- func (h *AppstoreHandler) ListExternalRepo(c *gin.Context)
- func (h *AppstoreHandler) PutExternalRepo(c *gin.Context)
- func (h *AppstoreHandler) RegistRouter(rg *gin.RouterGroup)
- func (h *AppstoreHandler) SyncExternalRepo(c *gin.Context)
- type Chart
Constants ¶
const InternalChartRepoName = "kubegems"
Variables ¶
This section is empty.
Functions ¶
func SyncCharts ¶
Types ¶
type AppFilesResponse ¶
type AppstoreHandler ¶
type AppstoreHandler struct { base.BaseHandler AppStoreOpt *helm.Options ChartmuseumClient *helm.ChartmuseumClient }
func (*AppstoreHandler) AppDetail ¶
func (h *AppstoreHandler) AppDetail(c *gin.Context)
@Tags Appstore @Summary APP详情 @Description 查看应用Chart详情 @Accept json @Produce json @Param name path string true "name" @Param size query string false "reponame" @Success 200 {object} handlers.ResponseStruct{Data=[]Chart} "AppDetail" @Router /v1/appstore/app/{name} [get] @Security JWT
func (*AppstoreHandler) AppFiles ¶
func (h *AppstoreHandler) AppFiles(c *gin.Context)
@Tags Appstore @Summary APP Charts文件编码 @Description 查看App所有Charts文件编码 @Accept json @Produce json @Param size query string false "reponame" @Param name query string true "name" @Param version query string true "version" @Success 200 {object} handlers.ResponseStruct{Data=AppFilesResponse} "AppFiles" @Router /v1/appstore/files [get] @Security JWT
func (*AppstoreHandler) DeleteExternalRepo ¶
func (h *AppstoreHandler) DeleteExternalRepo(c *gin.Context)
@Tags Appstore @Summary APP 删除外部chart仓库 @Description 删除外部chart仓库 @Accept json @Produce json @Param name query string true "repo name" @Success 200 {object} handlers.ResponseStruct{Data=models.ChartRepo} "repo" @Router /v1/appstore/repo/{name} [delete] @Security JWT
func (*AppstoreHandler) ListApps ¶
func (h *AppstoreHandler) ListApps(c *gin.Context)
@Tags Appstore @Summary 应用商店-查询所有APP @Description 应用商店 @Accept json @Produce json @Param page query int false "page" @Param size query int false "size" @Param reponame query string false "reponame" @Success 200 {object} handlers.ResponseStruct{Data=handlers.PageData{List=[]Chart}} "Apps" @Router /v1/appstore/app [get] @Security JWT
func (*AppstoreHandler) ListExternalRepo ¶
func (h *AppstoreHandler) ListExternalRepo(c *gin.Context)
@Tags Appstore @Summary APP 获取外部chart仓库 @Description 获取外部chart仓库 @Accept json @Produce json @Success 200 {object} handlers.ResponseStruct{Data=handlers.PageData{List=[]models.ChartRepo}} "repos" @Router /v1/appstore/repo [get] @Security JWT
func (*AppstoreHandler) PutExternalRepo ¶
func (h *AppstoreHandler) PutExternalRepo(c *gin.Context)
@Tags Appstore @Summary APP 创建外部chart仓库 @Description 创建外部chart仓库 @Accept json @Produce json @Success 200 {object} handlers.ResponseStruct{Data=[]models.ChartRepo} "repo" @Router /v1/appstore/repo [post] @Security JWT
func (*AppstoreHandler) RegistRouter ¶
func (h *AppstoreHandler) RegistRouter(rg *gin.RouterGroup)
func (*AppstoreHandler) SyncExternalRepo ¶
func (h *AppstoreHandler) SyncExternalRepo(c *gin.Context)
@Tags Appstore @Summary APP 同步外部chart仓库 @Description 手动同步外部chart仓库至本地chart museum @Accept json @Produce json @Param name query string true "repo name" @Success 200 {object} handlers.ResponseStruct{Data=models.ChartRepo} "repo" @Router /v1/appstore/repo/{name}/actions/sync [post] @Security JWT
type Chart ¶
type Chart struct { Name string `json:"name"` Version string `json:"version"` Description string `json:"description"` ApiVersion string `json:"apiVersion"` AppVersion string `json:"appVersion"` Created time.Time `json:"created"` Digest string `json:"digest"` Urls []string `json:"urls"` Keywords []string `json:"keywords"` Maintainers []*chart.Maintainer `json:"maintainers"` Tags string `json:"tags"` RepoURL string `json:"repoURL"` // 仓库地址 }