update

package
v0.0.0-...-e7ae2a8 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const EnvDisableUpdateCheck = "HPECLI_DISABLE_UPDATE_CHECK"

EnvDisableUpdateCheck is an environmental variable to disable remote http request to check if a newer version of the CLI is available

Variables

This section is empty.

Functions

func NewUpdateCommand

func NewUpdateCommand(version string) *cobra.Command

Types

type CheckResponse

type CheckResponse struct {
	// Remote repo has a newer version than the running version
	UpdateAvailable bool

	// Latest version available in remote repository
	RemoteVersion string

	// Messagse about the latest updated
	Message string

	// URL where the update can be downloaded
	URL string

	// If the download has been signed, this is the public key
	// that can be used to verify the signature
	PublicKey []byte

	// SHA265 Has of the download that can be used to validate
	// the integrity of the file after it was downloaded
	CheckSum []byte
}

CheckResponse is a response for a Check request.

func CheckForUpdate

func CheckForUpdate(localVersion string) (*CheckResponse, error)

CheckForUpdate returns data about the availability of an updated version of the CLI

Jump to

Keyboard shortcuts

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