Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FirstVersionOrLatest ¶
FirstVersionOrLatest returns the first non-empty version from the list or "latest" if none are found
Types ¶
type Artifact ¶
type Artifact struct {
// Name is the name of the artifact
Name string
// Repository is the repository of the source
// e.g. the helm repository or the github repository
Repository string
// Branch is the branch of the source
Branch string
// Tag is the tag of the source
Tag string
// CommitHash is the commit hash of the source
CommitHash string
// Version is the version of the source
// e.g. the version of the helm chart or github release
Version string
// URL is the URL of the source
URL string
// AssetName is the file name of the asset to be downloaded
// typically used for archives
AssetName string
// RelativePath is a subdirectory relative to the souce root directory that is
// used for the basis in the component. Leading slashes are removed.
// e.g. 'my/path' in the checkout of git URL
// 'https://github.com/my/repo.git' would use 'my/path' as the directory
// where the source is found
RelativePath string
// BaseDir is the directory where the artifact is stored
// It does not include the directory for the artifact itself
BaseDir string
}
Artifact is a source artifact that can be pulled or pushed
func (*Artifact) DestDirExists ¶
DestDirExists checks if the destination directory exists
type Downloader ¶
type Downloader interface {
// Download downloads a file from the given URL to the given destination
Download(url, dest string) (int64, error)
}
Downloader is an interface for downloading files
type PullResult ¶
type PullResult struct {
// Dir is the directory where the artifact was pulled to
Dir string
// If the puller discovers a version, it will be stored here
Version string
}
PullResult is a struct that represents the result of a pull operation
Click to show internal directories.
Click to hide internal directories.