Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DummyProject = ProjectInfo{ PathWithNamespace: "group/project", Name: "group/project", ID: 42, Archived: false, }
DummyProject is a Gitlab project usable in various tests
Functions ¶
Types ¶
type OAuthResponse ¶
type OAuthResponse struct { AccessToken string `json:"access_token"` RefreshToken string `json:"refresh_token"` TokenType string `json:"token_type"` ExpiresIn int `json:"expires_in"` }
OAuthResponse allows easy parsing of /oauth/token Gitlab response
func RequestNewTokens ¶
func RequestNewTokens(c *conf.OAuthConf, callbackCode string) (*OAuthResponse, error)
RequestNewTokens uses Gitlab OAuth to generate new access tokens
type ProjectInfo ¶
type ProjectInfo struct { Name string `json:"name"` ID int `json:"id"` Archived bool `json:"archived"` PathWithNamespace string `json:"path_with_namespace"` Permissions projectPermission `json:"permissions"` }
ProjectInfo struct contains all the required data about a Gitlab Project
func FetchProject ¶
func FetchProject(token string, gitlabDomain string, requestedProject string) (*ProjectInfo, error)
FetchProject will try to fetch requested project by impersonating gitlab user using the access token
Click to show internal directories.
Click to hide internal directories.