Documentation ¶
Index ¶
- Variables
- func ExpireCache() error
- func GetIndexBody(indexURL string, cache bool) ([]byte, error)
- type Build
- func (b *Build) DownloadAndCheck() ([]byte, error)
- func (b *Build) DownloadAndExtract(dir string, product string) (string, error)
- func (b *Build) DownloadAndSave(filePath string) (string, error)
- func (b *Build) Install() error
- func (b *Build) Link() error
- func (b *Build) String() string
- func (b *Build) Uninstall() error
- type Index
- type Product
- type Version
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CacheFilePath = path.Join(os.TempDir(), "hashicorp.releases.json") CacheMaxAge = 60 // minutes )
Functions ¶
func ExpireCache ¶
func ExpireCache() error
Types ¶
type Build ¶
type Build struct { Product string `json:"name"` Version string `json:"version"` OS string `json:"os"` Arch string `json:"arch"` Filename string `json:"filename"` URL string `json:"url"` // contains filtered or unexported fields }
func (*Build) DownloadAndCheck ¶
func (*Build) DownloadAndExtract ¶
type Product ¶
type Product struct { Name string `json:"name"` Versions map[string]*Version `json:"versions"` Sorted version.Collection // contains filtered or unexported fields }
func NewProduct ¶
func (*Product) LatestVersion ¶
func (*Product) ListVersions ¶
type Version ¶
type Version struct { Product string `json:"name"` Version string `json:"version"` SHASums string `json:"shasums"` SHASumsSig string `json:"shasums_signature"` Builds []*Build `json:"builds"` // contains filtered or unexported fields }
func (*Version) GetBuildForLocal ¶
func (*Version) IsEnterprise ¶
Click to show internal directories.
Click to hide internal directories.