updatechecker

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: Apache-2.0 Imports: 3 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UpdateChecker

type UpdateChecker interface {
	GetLatestVersion(timeout time.Duration) (*VersionInfo, error)
	DownloadVersion(version string, requireChecksumMatch bool) (string, error)
}

type UpdateInfo

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

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

type VersionInfo

type VersionInfo struct {
	Version    string     `json:"version"`
	ReleasedAt *time.Time `json:"releasedAt"`
}

Jump to

Keyboard shortcuts

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