Documentation ¶
Index ¶
- func HandleCreate() gin.HandlerFunc
- func HandleCreateToken(service core.OAuthService) gin.HandlerFunc
- func HandleDeleteToken(service core.OAuthService, store core.OAuthStore) gin.HandlerFunc
- func HandleGet() gin.HandlerFunc
- func HandleGetOwner(store core.RepoStore, service core.SCMService) gin.HandlerFunc
- func HandleGetSCM(config *config.Config) gin.HandlerFunc
- func HandleListRepo(userStore core.UserStore) gin.HandlerFunc
- func HandleListTokens(service core.OAuthService) gin.HandlerFunc
- func HandleSynchronizeRepo(repoService core.RepoService) gin.HandlerFunc
- type Providers
- type Token
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HandleCreateToken ¶ added in v0.1.8
func HandleCreateToken(service core.OAuthService) gin.HandlerFunc
HandleCreateToken for user @Summary create OAuth token @Tags User @Param name formData string false "token name" @Success 200 {object} string access token @Router /user/tokens [post]
func HandleDeleteToken ¶ added in v0.1.8
func HandleDeleteToken(service core.OAuthService, store core.OAuthStore) gin.HandlerFunc
HandleDeleteToken with token id @Summary delete token with id @Tags User @Param id path integer true "token id" @Success 200 {object} Token "deleted token" @Router /user/tokens/{id} [delete]
func HandleGet ¶
func HandleGet() gin.HandlerFunc
HandleGet login user @Summary Get login user @Tags User @Success 200 {object} User "user" @Failure 404 {string} string "error" @Router /user [get]
func HandleGetOwner ¶
func HandleGetOwner(store core.RepoStore, service core.SCMService) gin.HandlerFunc
HandleGetOwner of the repository @Summary Get repository's owner @Tags User @Param scm path string true "SCM" @Param namespace path string true "Namespace" @Param name path string true "name" @Success 200 {object} User "owner" @Router /user/owner/{scm}/{namespace}/{name} [get]
func HandleGetSCM ¶
func HandleGetSCM(config *config.Config) gin.HandlerFunc
HandleGetSCM binds to login user @Summary Get user's SCM binding state @Tags User @Success 200 {object} Providers "providers" @Failure 404 {object} Providers "providers" @Router /user/scm [get]
func HandleListRepo ¶ added in v0.1.9
func HandleListRepo(userStore core.UserStore) gin.HandlerFunc
HandleListRepo for the uer @Summary List user synchronized repositories @Tags User @Success 200 {object} []core.Repo "list of repositories" @Router /user/repos [get]
func HandleListTokens ¶ added in v0.1.8
func HandleListTokens(service core.OAuthService) gin.HandlerFunc
HandleListTokens for user @Summary list OAuth tokens @Tags User @Success 200 {object} []Token "list of tokens" @Router /user/tokens [get]
func HandleSynchronizeRepo ¶ added in v0.1.9
func HandleSynchronizeRepo(repoService core.RepoService) gin.HandlerFunc
HandleSynchronizeRepo for the user @Summary Synchronize user's repository from remote SCM @Tags User @Success 200 {string} string "ok" @Router /user/repos [patch]