releases

package
v0.0.0-...-4568a39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2019 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ReleaseBuild

type ReleaseBuild struct {
	Name     string
	Version  string
	OS       string
	Arch     string
	Filename string
}

ReleaseBuild holds information on a single product build

type ReleaseProduct

type ReleaseProduct struct {
	Name     string
	Versions map[string]*ReleaseVersion
}

ReleaseProduct holds all releases for a product

func GetReleases

func GetReleases(product string) (*ReleaseProduct, error)

GetReleases retrieves the product information from releases.hashicorp.com

func (*ReleaseProduct) Find

func (p *ReleaseProduct) Find(version string) (*ReleaseVersion, error)

Find returns the version matching the given string

func (*ReleaseProduct) Latest

func (p *ReleaseProduct) Latest(stable bool) (*ReleaseVersion, error)

Latest returns the latest (stable or not depending on parameter) available version

func (*ReleaseProduct) ListVersions

func (p *ReleaseProduct) ListVersions(stable bool) ([]*version.Version, error)

ListVersions returns all the available versions

type ReleaseVersion

type ReleaseVersion struct {
	Name      string
	Version   string
	Shasums   string
	Signature string `json:"shasums_signature"`
	Builds    []*ReleaseBuild
}

ReleaseVersion holds all builds for a product version

func (*ReleaseVersion) Download

func (v *ReleaseVersion) Download(destination, buildOs, buildArch string) error

Download gets, verifies and uncompress a given release version

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL