Documentation
¶
Overview ¶
Package acquire manages explicit, native-git clone/fetch operations into a local cache. It creates a clean checkout (worktree) for indexing and records provenance metadata without executing repository-controlled code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidRepo indicates the owner/repo reference is malformed. ErrInvalidRepo = errors.New("invalid repository reference") // ErrInvalidRemote indicates the remote URL is not a supported Git transport. ErrInvalidRemote = errors.New("invalid remote URL") // ErrRemoteMismatch indicates an existing cache has a different remote URL. ErrRemoteMismatch = errors.New("existing cache remote does not match requested remote") // ErrNoCommit indicates the repository has no resolvable default branch. ErrNoCommit = errors.New("no commit found") // ErrNotBare indicates a cache path exists but is not a bare repository. ErrNotBare = errors.New("cache is not a bare repository") )
Functions ¶
This section is empty.
Types ¶
type Acquisition ¶
type Acquisition struct {
Owner string `json:"owner"`
Repo string `json:"repo"`
Remote string `json:"remote"`
DefaultBranch string `json:"default_branch"`
CommitSHA string `json:"commit_sha"`
AcquiredAt time.Time `json:"acquired_at"`
// CachePath is the bare mirror managed by the acquisition manager.
CachePath string `json:"cache_path"`
// Path is a clean checkout (worktree) at CommitSHA. The caller should
// call Manager.Cleanup when done.
Path string `json:"path,omitempty"`
}
Acquisition records the result of an explicit clone or fetch.
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager manages bare repository caches and transient clean checkouts.
func NewManager ¶
NewManager creates a manager rooted at root. A nil runner uses the local git executable.
Click to show internal directories.
Click to hide internal directories.