vcs

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo interface {
	// Tags returns all tags from the repository.
	Tags(ctx context.Context) ([]string, error)
	// Latest returns the latest commit hash on the default branch.
	Latest(ctx context.Context) (string, error)
	// At returns a filesystem view of the repository at the specified ref.
	// The returned fs.FS also implements fs.ReadFileFS and fs.ReadDirFS.
	At(ref, localDir string) fs.FS
	// Sync downloads the specified path to localDir.
	Sync(ctx context.Context, ref, path, localDir string) error
}

Repo represents a code hosting repository. It provides version queries and can create filesystem views for specific refs.

func NewRepo

func NewRepo(repoPath string) (Repo, error)

NewRepo creates a new Repo for the given repository path. repoPath format: "github.com/owner/repo"

Jump to

Keyboard shortcuts

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