vcs

package
v1.10.5 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 2 Imported by: 0

README

VCS

Abstractions for Version Control System operations, supporting multiple backends like GitHub and GitLab.

Package Structure

  • github: GitHub-specific client and release implementation.
  • gitlab: GitLab release provider implementation.
  • repo: Generic Git repository management (Local and In-memory).
  • release: Domain interfaces for releases, assets, and providers.

Pluggable Release Providers

The VCS package provides a release.Provider interface that abstracts release operations across different platforms:

  • Programmatic API interaction (PRs, releases, etc.)
  • Unified authentication layer for SSH and tokens
  • Backend-agnostic asset downloads

For detailed documentation, testing strategies, and configuration options, see the Version Control Component Documentation.

Documentation

Overview

Package vcs defines the version control system abstraction layer for querying releases and repository metadata across GitHub and GitLab backends.

The sub-packages provide concrete implementations: github for the GitHub API (repository management, PRs, releases, asset downloads), gitlab for GitLab, release for the unified provider factory, and repo for repository URL parsing and metadata extraction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResolveToken

func ResolveToken(cfg config.Containable, fallbackEnv string) string

ResolveToken resolves an authentication token from a config subtree. Resolution order:

  1. cfg.auth.env — name of an environment variable to read
  2. cfg.auth.value — literal token value stored in config
  3. fallbackEnv — a well-known environment variable (pass "" to skip)

Returns an empty string when no token is found; callers decide whether that is an error condition (e.g. private repositories require a token, public repositories can proceed without one).

Types

This section is empty.

Directories

Path Synopsis
Package bitbucket provides a release.Provider implementation for Bitbucket Cloud using the Downloads API.
Package bitbucket provides a release.Provider implementation for Bitbucket Cloud using the Downloads API.
Package direct provides a release.Provider implementation for tools distributed via arbitrary HTTP servers.
Package direct provides a release.Provider implementation for tools distributed via arbitrary HTTP servers.
Package gitea provides a release.Provider implementation for Gitea and Forgejo instances, including Codeberg (codeberg.org).
Package gitea provides a release.Provider implementation for Gitea and Forgejo instances, including Codeberg (codeberg.org).
Package github implements the VCS release provider and API client for GitHub repositories, supporting both public and token-authenticated access.
Package github implements the VCS release provider and API client for GitHub repositories, supporting both public and token-authenticated access.
Package gitlab implements the VCS release provider for GitLab repositories, supporting both public and token-authenticated access with nested group paths.
Package gitlab implements the VCS release provider for GitLab repositories, supporting both public and token-authenticated access with nested group paths.
Package release provides the shared release model (Release, ReleaseAsset) and a Provider factory that resolves the correct VCS backend (GitHub or GitLab) from tool configuration for use by the self-update system.
Package release provides the shared release model (Release, ReleaseAsset) and a Provider factory that resolves the correct VCS backend (GitHub or GitLab) from tool configuration for use by the self-update system.
Package repo provides repository URL parsing and metadata extraction, converting host/owner/repo paths into a RepoLike abstraction that supports both GitHub (org/repo) and GitLab (group/subgroup/repo) path formats.
Package repo provides repository URL parsing and metadata extraction, converting host/owner/repo paths into a RepoLike abstraction that supports both GitHub (org/repo) and GitLab (group/subgroup/repo) path formats.

Jump to

Keyboard shortcuts

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