version

package
v0.88.1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2025 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnknownArchiveType        = errors.New("unknown archive type")
	ErrNoMatchingArchitectures   = errors.New("no matching architectures")
	ErrNoAssets                  = errors.New("no assets")
	ErrChecksumMismatch          = errors.New("checksum mismatch")
	ErrUnsupportedChecksumFormat = errors.New("unsupported checksum format")
	ErrTimeoutExceeded           = errors.New("timeout exceeded")
)
View Source
var (
	ErrReleaseNotFound = errors.New("release not found")
)
View Source
var RunAt time.Time
View Source
var RunAtEpoch string

Functions

func PerformUpgrade added in v0.42.0

func PerformUpgrade() error

func Print added in v0.42.0

func Print()

func PrintIfUpgradeAvailable added in v0.42.0

func PrintIfUpgradeAvailable()

PrintToStdErrIfUpgradeAvailable prints the update info to stderr if available

func Refresh

func Refresh()

func VerifyCanUpgrade added in v0.42.0

func VerifyCanUpgrade() error

func Version

func Version() string

Types

type Build

type Build struct {
	Version    string      `json:"version,omitempty"`
	UpdateInfo *UpdateInfo `json:"updateInfo,omitempty"`
}

Build holds details about this build of the replicated cli binary

func GetBuild

func GetBuild() Build

type ClientVersions added in v0.83.2

type ClientVersions struct {
	ReplicatedCLI string `json:"replicated_cli"`
	ReplicatedSDK string `json:"replicated_sdk"`
	KOTS          string `json:"kots"`
}

type Option added in v0.83.2

type Option func(*UpdateChecker) error

type PingResponse added in v0.83.2

type PingResponse struct {
	ClientIP       string         `json:"client_ip"`
	ClientVersions ClientVersions `json:"client_versions"`
}

type UpdateChecker added in v0.83.2

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

func NewUpdateChecker added in v0.83.2

func NewUpdateChecker(version string, homebrewFormula string) (*UpdateChecker, error)

func (UpdateChecker) CanSupportUpgrade added in v0.83.2

func (s UpdateChecker) CanSupportUpgrade() (bool, error)

func (UpdateChecker) ExternalUpgradeCommand added in v0.83.2

func (s UpdateChecker) ExternalUpgradeCommand() string

func (UpdateChecker) GetUpdateInfo added in v0.83.2

func (s UpdateChecker) GetUpdateInfo() (*UpdateInfo, error)

GetUpdateInfo will return the latest version

func (UpdateChecker) Upgrade added in v0.83.2

func (s UpdateChecker) Upgrade() error

type UpdateInfo added in v0.83.2

type UpdateInfo struct {
	LatestVersion   string     `json:"latestVersion"`
	LatestReleaseAt *time.Time `json:"latestReleaseAt"`

	CheckedAt *time.Time `json:"checkedAt"`

	CanUpgradeInPlace      bool   `json:"canUpgradeInPlace"`
	ExternalUpgradeCommand string `json:"externalUpgradeCommand"`
}

func UpdateInfoFromVersions added in v0.83.2

func UpdateInfoFromVersions(currentVersion string, latestVersion *VersionInfo) (*UpdateInfo, error)

type VersionInfo added in v0.83.2

type VersionInfo struct {
	Version string `json:"version"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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