gitlab

package
v0.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 27, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package gitlab implements the VCS release provider for GitLab repositories, supporting both public and token-authenticated access; the owner may be a slash-separated group path passed through to the GitLab API.

Index

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.

func (*GitLabReleaseProvider) GetLatestRelease

func (p *GitLabReleaseProvider) GetLatestRelease(ctx context.Context, owner, repo string) (release.Release, error)

func (*GitLabReleaseProvider) GetReleaseByTag

func (p *GitLabReleaseProvider) GetReleaseByTag(ctx context.Context, owner, repo, tag string) (release.Release, error)

func (*GitLabReleaseProvider) ListReleases

func (p *GitLabReleaseProvider) ListReleases(ctx context.Context, owner, repo string, limit int) ([]release.Release, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL