update

package
v0.0.0-...-0888c38 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UpdatesAvailable

func UpdatesAvailable(cloudAddr string) string

UpdatesAvailable returns the version if updates are available, otherwise empty string. Errors also return empty strings.

Types

type CLIUpdater

type CLIUpdater struct {
	// contains filtered or unexported fields
}

CLIUpdater manages updates to the CLI.

func NewCLIUpdater

func NewCLIUpdater(cloudAddr string) *CLIUpdater

NewCLIUpdater creates a new CLIUpdater.

func (*CLIUpdater) GetAvailableVersions

func (c *CLIUpdater) GetAvailableVersions(minVersion semver.Version) ([]string, error)

GetAvailableVersions returns a list (max 10) of available versions > specified version.

func (*CLIUpdater) IsUpdatable

func (c *CLIUpdater) IsUpdatable() (bool, error)

IsUpdatable checks file permissions to make sure that the CLI can be updated.

func (*CLIUpdater) UpdateSelf

func (c *CLIUpdater) UpdateSelf(version string) error

UpdateSelf updates the CLI to the specified version.

Jump to

Keyboard shortcuts

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