releases

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: MPL-2.0 Imports: 15 Imported by: 105

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EnterpriseOptions added in v0.6.0

type EnterpriseOptions struct {
	// Meta represents optional version metadata (e.g. hsm, fips1402)
	Meta string
}

type ExactVersion

type ExactVersion struct {
	Product    product.Product
	Version    *version.Version
	InstallDir string
	Timeout    time.Duration

	// LicenseDir represents directory path where to install license files
	// (required for enterprise versions, optional for Community editions).
	LicenseDir string

	// Enterprise indicates installation of enterprise version (leave nil for Community editions)
	Enterprise *EnterpriseOptions

	SkipChecksumVerification bool

	// ArmoredPublicKey is a public PGP key in ASCII/armor format to use
	// instead of built-in pubkey to verify signature of downloaded checksums
	ArmoredPublicKey string

	// ApiBaseURL is an optional field that specifies a custom URL to download the product from.
	// If ApiBaseURL is set, the product will be downloaded from this base URL instead of the default site.
	// Note: The directory structure of the custom URL must match the HashiCorp releases site (including the index.json files).
	ApiBaseURL string
	// contains filtered or unexported fields
}

ExactVersion installs the given Version of product to OS temp directory, or to InstallDir (if not empty)

func (*ExactVersion) Install

func (ev *ExactVersion) Install(ctx context.Context) (string, error)

func (*ExactVersion) IsSourceImpl

func (*ExactVersion) IsSourceImpl() isrc.InstallSrcSigil

func (*ExactVersion) Remove

func (ev *ExactVersion) Remove(ctx context.Context) error

func (*ExactVersion) SetLogger

func (ev *ExactVersion) SetLogger(logger *log.Logger)

func (*ExactVersion) Validate

func (ev *ExactVersion) Validate() error

type InstallationOptions

type InstallationOptions struct {
	Timeout    time.Duration
	Dir        string
	LicenseDir string

	SkipChecksumVerification bool

	// ArmoredPublicKey is a public PGP key in ASCII/armor format to use
	// instead of built-in pubkey to verify signature of downloaded checksums
	// during installation
	ArmoredPublicKey string
}

type LatestVersion

type LatestVersion struct {
	Product            product.Product
	Constraints        version.Constraints
	InstallDir         string
	Timeout            time.Duration
	IncludePrereleases bool

	// LicenseDir represents directory path where to install license files
	// (required for enterprise versions, optional for Community editions).
	LicenseDir string

	// Enterprise indicates installation of enterprise version (leave nil for Community editions)
	Enterprise *EnterpriseOptions

	SkipChecksumVerification bool

	// ArmoredPublicKey is a public PGP key in ASCII/armor format to use
	// instead of built-in pubkey to verify signature of downloaded checksums
	ArmoredPublicKey string

	// ApiBaseURL is an optional field that specifies a custom URL to download the product from.
	// If ApiBaseURL is set, the product will be downloaded from this base URL instead of the default site.
	// Note: The directory structure of the custom URL must match the HashiCorp releases site (including the index.json files).
	ApiBaseURL string
	// contains filtered or unexported fields
}

func (*LatestVersion) Install

func (lv *LatestVersion) Install(ctx context.Context) (string, error)

func (*LatestVersion) IsSourceImpl

func (*LatestVersion) IsSourceImpl() isrc.InstallSrcSigil

func (*LatestVersion) Remove

func (lv *LatestVersion) Remove(ctx context.Context) error

func (*LatestVersion) SetLogger

func (lv *LatestVersion) SetLogger(logger *log.Logger)

func (*LatestVersion) Validate

func (lv *LatestVersion) Validate() error

type Versions

type Versions struct {
	Product     product.Product
	Constraints version.Constraints
	Enterprise  *EnterpriseOptions // require enterprise version if set (leave nil for OSS)

	ListTimeout time.Duration

	// Install represents configuration for installation of any listed version
	Install InstallationOptions
}

Versions allows listing all versions of a product which match Constraints

func (*Versions) List

func (v *Versions) List(ctx context.Context) ([]src.Source, error)

Jump to

Keyboard shortcuts

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