gitlab

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2026 License: MIT Imports: 9 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. Provider construction uses package-owned Settings; GTB config integration lives in SettingsFromConfig.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewReleaseProvider

func NewReleaseProvider(settings Settings) (release.Provider, error)

NewReleaseProvider builds a GitLab release provider from explicit typed settings. A public repository needs no auth settings; Host selects the instance, empty means gitlab.com, and APIURL can override the derived API endpoint. When auth is absent, the token falls back to GITLAB_TOKEN.

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)

type Settings added in v0.30.0

type Settings struct {
	ReleaseSource release.ReleaseSourceConfig
	APIURL        string `json:"api_url" yaml:"api_url"`
	Auth          vcs.AuthConfig
}

Settings contains the typed configuration needed to construct a GitLab release provider without binding the provider to GTB config.

Fields are populated by the GTB config adapter via the narrow vcs.TokenConfig seam, not decoded with mapstructure. The json/yaml tags are for documentation and serialisation only.

func SettingsFromConfig added in v0.30.0

func SettingsFromConfig(src release.ReleaseSourceConfig, cfg vcs.TokenConfig) Settings

SettingsFromConfig adapts the gitlab config subtree into typed provider settings. It preserves the existing `url.api` and `auth.*` key layout.

Jump to

Keyboard shortcuts

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