Documentation
¶
Index ¶
- func NewGitLabSource(config source.Config) source.Source
- type GitLabAssetLink
- type GitLabAssetSource
- type GitLabReleaseResponse
- type GitLabSource
- func (s *GitLabSource) DownloadReleaseAsset(repo source.Repo, asset source.ReleaseAsset, destPath string, ...) error
- func (s *GitLabSource) DownloadSourceZip(repo source.Repo, gitRef string) (string, error)
- func (s *GitLabSource) FetchTags(repoUrl, token string) ([]string, error)
- func (s *GitLabSource) GetReleaseInfo(repo source.Repo, tag string) (source.Release, error)
- func (s *GitLabSource) MakeArchiveRequest(commit source.Commit, token string) (*http.Request, error)
- func (s *GitLabSource) ParseUrl(repoUrl, token string) (source.Repo, error)
- func (s *GitLabSource) Type() source.SourceType
- type GitLabTagResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type GitLabAssetLink ¶
type GitLabAssetLink struct {
Id int `json:"id"`
Name string `json:"name"`
Url string `json:"url"`
LinkType string `json:"link_type"`
DirectAssetPath string `json:"direct_asset_path"`
}
GitLabAssetLink models uploaded asset links in release response
type GitLabAssetSource ¶
GitLabAssetSource models archive sources in release response
type GitLabReleaseResponse ¶
type GitLabReleaseResponse struct {
TagName string `json:"tag_name"`
Name string `json:"name"`
Description string `json:"description"`
Assets struct {
Count int `json:"count"`
Sources []GitLabAssetSource `json:"sources"`
Links []GitLabAssetLink `json:"links"`
} `json:"assets"`
}
GitLabReleaseResponse models GitLab API /projects/:id/releases/:tag response
type GitLabSource ¶
type GitLabSource struct {
// contains filtered or unexported fields
}
GitLabSource implements source.Source for GitLab
func (*GitLabSource) DownloadReleaseAsset ¶
func (s *GitLabSource) DownloadReleaseAsset(repo source.Repo, asset source.ReleaseAsset, destPath string, withProgress bool) error
DownloadReleaseAsset downloads a release asset to destPath
func (*GitLabSource) DownloadSourceZip ¶
DownloadSourceZip downloads repo archive for a git ref and returns temp file path
func (*GitLabSource) FetchTags ¶
func (s *GitLabSource) FetchTags(repoUrl, token string) ([]string, error)
FetchTags returns all semver tags from the repository
func (*GitLabSource) GetReleaseInfo ¶
GetReleaseInfo returns release information for a specific tag
func (*GitLabSource) MakeArchiveRequest ¶
func (s *GitLabSource) MakeArchiveRequest(commit source.Commit, token string) (*http.Request, error)
MakeArchiveRequest creates HTTP request to download repo archive
func (*GitLabSource) ParseUrl ¶
func (s *GitLabSource) ParseUrl(repoUrl, token string) (source.Repo, error)
ParseUrl parses a GitLab repo URL into a Repo struct Supports nested subgroups: gitlab.com/group/subgroup/project
func (*GitLabSource) Type ¶
func (s *GitLabSource) Type() source.SourceType
Type returns the source type
type GitLabTagResponse ¶
type GitLabTagResponse struct {
Name string `json:"name"`
Commit struct {
Id string `json:"id"`
} `json:"commit"`
}
GitLabTagResponse models GitLab API /projects/:id/repository/tags response