Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChecksumDownloader ¶
type ChecksumDownloader struct { ProductVersion *ProductVersion Logger *log.Logger ArmoredPublicKey string BaseURL string }
func (*ChecksumDownloader) DownloadAndVerifyChecksums ¶
func (cd *ChecksumDownloader) DownloadAndVerifyChecksums(ctx context.Context) (ChecksumFileMap, error)
type ChecksumFileMap ¶
type Downloader ¶
type Downloader struct { Logger *log.Logger VerifyChecksum bool ArmoredPublicKey string BaseURL string }
func (*Downloader) DownloadAndUnpack ¶
func (d *Downloader) DownloadAndUnpack(ctx context.Context, pv *ProductVersion, binDir string, licenseDir string) (up *UnpackedProduct, err error)
type Product ¶
type Product struct { Name string `json:"name"` Versions ProductVersionsMap `json:"versions"` }
Product is a top-level product like "Consul" or "Nomad". A Product may have one or more versions.
type ProductBuild ¶
type ProductBuild struct { Name string `json:"name"` Version string `json:"version"` OS string `json:"os"` Arch string `json:"arch"` Filename string `json:"filename"` URL string `json:"url"` }
ProductBuild is an OS/arch-specific representation of a product. This is the actual file that a user would download, like "consul_0.5.1_linux_amd64".
type ProductBuilds ¶
type ProductBuilds []*ProductBuild
func (ProductBuilds) FilterBuild ¶
func (pbs ProductBuilds) FilterBuild(os string, arch string, suffix string) (*ProductBuild, bool)
type ProductVersion ¶
type ProductVersion struct { Name string `json:"name"` Version *version.Version `json:"version"` SHASUMS string `json:"shasums,omitempty"` SHASUMSSig string `json:"shasums_signature,omitempty"` SHASUMSSigs []string `json:"shasums_signatures,omitempty"` Builds ProductBuilds `json:"builds"` }
ProductVersion is a wrapper around a particular product version like "consul 0.5.1". A ProductVersion may have one or more builds.
type ProductVersions ¶
type ProductVersions []*ProductVersion
func (ProductVersions) Len ¶
func (pv ProductVersions) Len() int
func (ProductVersions) Less ¶
func (pv ProductVersions) Less(i, j int) bool
func (ProductVersions) Swap ¶
func (pv ProductVersions) Swap(i, j int)
type ProductVersionsMap ¶
type ProductVersionsMap map[string]*ProductVersion
func (ProductVersionsMap) AsSlice ¶
func (pvm ProductVersionsMap) AsSlice() ProductVersions
type Releases ¶
type Releases struct { BaseURL string // contains filtered or unexported fields }
func NewReleases ¶
func NewReleases() *Releases
func (*Releases) GetProductVersion ¶
func (*Releases) ListProductVersions ¶
type UnpackedProduct ¶
type UnpackedProduct struct {
PathsToRemove []string
}
Click to show internal directories.
Click to hide internal directories.