Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cloner ¶
type Cloner struct {
// contains filtered or unexported fields
}
Cloner clones an upstream repo defined by a repoSpec. Optionally, previously cloned repos can be cached rather than recloning them each time.
func (*Cloner) ClonerUsingGitExec ¶
ClonerUsingGitExec uses a local git install, as opposed to say, some remote API, to obtain a local clone of a remote repo. It looks for tags with the directory as a prefix to allow for versioning multiple kpt packages in a single repo independently. It relies on the private clonerUsingGitExec function to try fetching different refs.
type Command ¶
type Command struct {
// Pkg is required and contains information about the package that should be
// fetched. The package directory referenced must contain a valid Kptfile.
Pkg *pkg.Pkg
// Commit stores a git commit SHA. If this is set when invoking the command,
// the package will be fetched based on this commit SHA rather than based on
// the ref provided in the Kptfile. This allows for fetching specific
// commits even if the Kptfile references a branch.
Commit string
}
Command takes the upstream information in the Kptfile at the path for the provided package, and fetches the package referenced if it isn't already there.
type NewClonerOption ¶
type NewClonerOption func(*Cloner)
func WithCachedRepo ¶
func WithCachedRepo(r map[string]internalgitutil.GitUpstreamRepo) NewClonerOption