source

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultGitCacheDir

func DefaultGitCacheDir() (string, error)

func GitCacheKey

func GitCacheKey(repoURL, revision string) string

func GitRevisionCandidates

func GitRevisionCandidates(revision string) []plumbing.Revision

func NormalizeURL

func NormalizeURL(input string) string

func RedactGitCredentialError

func RedactGitCredentialError(message string, credentials GitCredentials) string

func RedactURL

func RedactURL(input string) string

func ResolveGitRevision

func ResolveGitRevision(repo *git.Repository, revision string) (*plumbing.Hash, error)

Types

type DefaultGitAcquirer

type DefaultGitAcquirer struct{}

func (DefaultGitAcquirer) Acquire

func (DefaultGitAcquirer) Acquire(ctx context.Context, request GitRequest, opts GitOptions) (GitResult, error)

type GitAcquirer

type GitAcquirer interface {
	Acquire(ctx context.Context, request GitRequest, opts GitOptions) (GitResult, error)
}

type GitCredentials

type GitCredentials struct {
	Username          string
	Password          string
	BearerToken       string
	SSHPrivateKeyPath string
	SSHPrivateKey     string
	SSHPassphrase     string
	SSHKnownHostsPath string
}

type GitOptions

type GitOptions struct {
	AllowNetwork bool
	CacheDir     string
	Refresh      bool
	Credentials  GitCredentials
}

type GitRequest

type GitRequest struct {
	URL      string
	Revision string
}

type GitResult

type GitResult struct {
	Path      string
	Revision  string
	FromCache bool
	Network   bool
}

type Options

type Options struct {
	RepoMaps []RepoMap
	Offline  bool
}

type RepoMap

type RepoMap struct {
	URL  string
	Path string
}

type ResolvedRepository

type ResolvedRepository struct {
	URL              string
	NormalizedURL    string
	DeclaredRevision string
	LocalPath        string
	Mapped           bool
	Network          bool
}

type Resolver

type Resolver struct {
	// contains filtered or unexported fields
}

func NewResolver

func NewResolver(opts Options) *Resolver

func (*Resolver) MappedPath

func (r *Resolver) MappedPath(repoURL string) (string, bool)

func (*Resolver) Resolve

func (r *Resolver) Resolve(repoURL, revision string) (ResolvedRepository, error)

Jump to

Keyboard shortcuts

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