releases

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultGetSHA256Sums

func DefaultGetSHA256Sums(rel *Release) (string, error)

DefaultGetSHA256Sums attempts to download the SHA256Sums lists from the releases endpoint.

Types

type Release

type Release struct {
	Product       string
	Version       string
	Edition       string
	Platform      string
	Arch          string
	GetSHA256Sums func(*Release) (string, error)
}

Release represents a release from releases.hashicorp.com.

func NewRelease

func NewRelease(opts ...ReleaseOpt) (*Release, error)

NewRelease takes optional functional options and returns a new Release.

func (*Release) BundleURL

func (r *Release) BundleURL() string

BundleURL returns the fully qualified URL to the release bundle archive.

func (*Release) SHA256

func (r *Release) SHA256() (string, error)

SHA256 parses the sums list for the release SHA256.

func (*Release) SHA256SUMSURL

func (r *Release) SHA256SUMSURL() string

SHA256SUMSURL returns the fully qualified URL to the releases SHA256SUMS.

type ReleaseOpt

type ReleaseOpt func(*Release) *Release

ReleaseOpt is a function option for NewRelease.

func WithReleaseArch

func WithReleaseArch(arch string) ReleaseOpt

WithReleaseArch sets the product.

func WithReleaseEdition

func WithReleaseEdition(ed string) ReleaseOpt

WithReleaseEdition sets the product.

func WithReleasePlatform

func WithReleasePlatform(plat string) ReleaseOpt

WithReleasePlatform sets the product.

func WithReleaseProduct

func WithReleaseProduct(prod string) ReleaseOpt

WithReleaseProduct sets the product.

func WithReleaseVersion

func WithReleaseVersion(ver string) ReleaseOpt

WithReleaseVersion sets the version.

Jump to

Keyboard shortcuts

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