Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Refs ¶ added in v0.3.3
type Refs interface {
// CompareFunc compares two tags or commits, falling back to compareTag when
// the references cannot be prepared or resolved.
CompareFunc(a, b string, compareTag func(a, b string) int) int
}
Refs provides version comparison over repository references.
type Repo ¶
type Repo interface {
// Tags returns all tags from the repository.
Tags(ctx context.Context) ([]Tag, error)
// Latest returns the latest commit hash on the default branch.
Latest(ctx context.Context) (string, error)
// Refs returns the repository references used for version comparison.
Refs() Refs
// 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.
Click to show internal directories.
Click to hide internal directories.