Documentation
¶
Overview ¶
Package gitlab implements the VCS release provider for GitLab repositories, supporting both public and token-authenticated access with nested group paths.
Index ¶
- func NewReleaseProvider(src release.ReleaseSourceConfig, cfg config.Containable) (release.Provider, error)
- type GitLabReleaseProvider
- func (p *GitLabReleaseProvider) DownloadReleaseAsset(ctx context.Context, owner, repo string, asset release.ReleaseAsset) (io.ReadCloser, string, error)
- func (p *GitLabReleaseProvider) GetLatestRelease(ctx context.Context, owner, repo string) (release.Release, error)
- func (p *GitLabReleaseProvider) GetReleaseByTag(ctx context.Context, owner, repo, tag string) (release.Release, error)
- func (p *GitLabReleaseProvider) ListReleases(ctx context.Context, owner, repo string, limit int) ([]release.Release, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewReleaseProvider ¶
func NewReleaseProvider(src release.ReleaseSourceConfig, cfg config.Containable) (release.Provider, error)
NewReleaseProvider builds a GitLab release provider. It is config-less by design: a public repository needs only the ReleaseSource (Host selects the instance; empty means gitlab.com). cfg is the optional `gitlab` config subtree (nil when no such section exists); it supplies a token (for private repos) and an explicit `url.api` override. When absent, the token falls back to the GITLAB_TOKEN env var and the base URL is derived from src.Host.
Types ¶
type GitLabReleaseProvider ¶
type GitLabReleaseProvider struct {
// contains filtered or unexported fields
}
GitLabReleaseProvider implements release.Provider.
func (*GitLabReleaseProvider) DownloadReleaseAsset ¶
func (p *GitLabReleaseProvider) DownloadReleaseAsset(ctx context.Context, owner, repo string, asset release.ReleaseAsset) (io.ReadCloser, string, error)
DownloadReleaseAsset is more complex for GitLab.