Documentation ¶
Index ¶
- func HandleCreate(store core.RepoStore, service core.SCMService) gin.HandlerFunc
- func HandleGet(store core.RepoStore) gin.HandlerFunc
- func HandleGetFileContent(service core.SCMService) gin.HandlerFunc
- func HandleGetFiles(service core.SCMService) gin.HandlerFunc
- func HandleGetSetting(store core.RepoStore) gin.HandlerFunc
- func HandleHook(SCM core.SCMService, service core.HookService) gin.HandlerFunc
- func HandleHookCreate(service core.HookService) gin.HandlerFunc
- func HandleListAll(config *config.Config, service core.SCMService, store core.RepoStore) gin.HandlerFunc
- func HandleListBranches(service core.SCMService) gin.HandlerFunc
- func HandleListCommits(service core.SCMService) gin.HandlerFunc
- func HandleListSCM(service core.SCMService, store core.RepoStore) gin.HandlerFunc
- func HandleReportIDRenew(store core.RepoStore, service core.SCMService) gin.HandlerFunc
- func HandleSync(service core.SCMService, store core.RepoStore) gin.HandlerFunc
- func HandleUpdateSetting(store core.RepoStore, service core.SCMService) gin.HandlerFunc
- func WithRepo(store core.RepoStore) gin.HandlerFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleCreate ¶
func HandleCreate(store core.RepoStore, service core.SCMService) gin.HandlerFunc
HandleCreate a repository @Summary Create new repository for code coverage @Tags Repository @Param repo body core.Repo true "repository to create" @Success 200 {object} core.Repo "Created repository" @Router /repos [post]
func HandleGet ¶
func HandleGet(store core.RepoStore) gin.HandlerFunc
HandleGet repository @Summary get repository @Tags Repository @Param scm path string true "SCM" @Param namespace path string true "Namespace" @Param name path string true "name" @Success 200 {object} core.Repo found repository @Router /repos/{scm}/{namespace}/{name} [get]
func HandleGetFileContent ¶
func HandleGetFileContent(service core.SCMService) gin.HandlerFunc
HandleGetFileContent for a file from repository @Summary Get a file content @Tags Repository @Param scm path string true "SCM" @Param namespace path string true "Namespace" @Param name path string true "name" @Param path path string true "file path" @Param ref query string false "specify git ref, default main branch" @Success 200 {string} string "file content" @Router /repos/{scm}/{namespace}/{name}/content/{path} [get]
func HandleGetFiles ¶
func HandleGetFiles(service core.SCMService) gin.HandlerFunc
HandleGetFiles from the repository @Summary List all files in repository @Tags Repository @Param scm path string true "SCM" @Param namespace path string true "Namespace" @Param name path string true "name" @Param ref query string false "specify git ref, default main branch" @Success 200 {object} []string "files" @Router /repos/{scm}/{namespace}/{name}/files [get]
func HandleGetSetting ¶
func HandleGetSetting(store core.RepoStore) gin.HandlerFunc
HandleGetSetting for the repository @Summary get repository setting @Tags Repository @Param scm path string true "SCM" @Param namespace path string true "Namespace" @Param name path string true "name" @Success 200 {object} core.RepoSetting repository setting @Router /repos/{scm}/{namespace}/{name}/setting [get]
func HandleHook ¶
func HandleHook(SCM core.SCMService, service core.HookService) gin.HandlerFunc
HandleHook event @Summary handle webhook event @Tags Repository @Param scm path string true "SCM" @Param namespace path string true "Namespace" @Param name path string true "name" @Success 200 {object} string ok @Router /repos/{scm}/{namespace}/{name}/hook [post]
func HandleHookCreate ¶
func HandleHookCreate(service core.HookService) gin.HandlerFunc
HandleHookCreate for the repository @Summary create repository webhook @Tags Repository @Param scm path string true "SCM" @Param namespace path string true "Namespace" @Param name path string true "name" @Success 200 {object} string ok @Router /repos/{scm}/{namespace}/{name}/hook/create [post]
func HandleListAll ¶
func HandleListAll(config *config.Config, service core.SCMService, store core.RepoStore) gin.HandlerFunc
HandleListAll repositories from remote SCM. To list repository for user, using API /user/repos instead for fatser response. @Summary List repositories for all available SCM providers @Tags Repository @Success 200 {object} []core.Repo "repositories" @Router /repos [get]
func HandleListBranches ¶ added in v0.1.8
func HandleListBranches(service core.SCMService) gin.HandlerFunc
HandleListBranches for the repository @Summary list repository branches @Tags Repository @Param scm path string true "SCM" @Param namespace path string true "Namespace" @Param name path string true "name" @Success 200 {object} []string branch names @Router /repos/{scm}/{namespace}/{name}/branches [get]
func HandleListCommits ¶ added in v0.1.4
func HandleListCommits(service core.SCMService) gin.HandlerFunc
HandleListCommits for repository recent builds @Summary list recent commits @Tags Repository @Param scm path string true "SCM" @Param namespace path string true "Namespace" @Param name path string true "name" @Param ref query string false "branch to list commits from" @Success 200 {object} []core.Commit commits @Router /repos/{scm}/{namespace}/{name}/commits [get]
func HandleListSCM ¶
func HandleListSCM(service core.SCMService, store core.RepoStore) gin.HandlerFunc
HandleListSCM repositories @Summary List repositories @Tags Repository @Param scm path string true "SCM source (github, gitea)" @Success 200 {object} []core.Repo "repositories" @Router /repos/{scm} [get]
func HandleReportIDRenew ¶
func HandleReportIDRenew(store core.RepoStore, service core.SCMService) gin.HandlerFunc
HandleReportIDRenew generates a new report id for the repository @Summary renew repository report id @Tags Repository @Param scm path string true "SCM" @Param namespace path string true "Namespace" @Param name path string true "name" @Success 200 {object} core.Repo "updated repository" @Router /repos/{scm}/{namespace}/{name}/report [patch]
func HandleSync ¶
func HandleSync(service core.SCMService, store core.RepoStore) gin.HandlerFunc
HandleSync repository information with SCM @Summary sync repository information with SCM @Tags Repository @Param scm path string true "SCM" @Param namespace path string true "Namespace" @Param name path string true "name" @Success 200 {object} core.Repo updated repository @Router /repos/{scm}/{namespace}/{name} [patch]
func HandleUpdateSetting ¶
func HandleUpdateSetting(store core.RepoStore, service core.SCMService) gin.HandlerFunc
HandleUpdateSetting for the repository @Summary update repository setting @Tags Repository @Param scm path string true "SCM" @Param namespace path string true "Namespace" @Param name path string true "name" @Param setting body core.RepoSetting true "repository setting" @Success 200 {object} core.RepoSetting repository setting @Router /repos/{scm}/{namespace}/{name}/setting [post]
Types ¶
This section is empty.