Documentation
¶
Index ¶
- Constants
- func CompareVersions(left, right string) (int, error)
- func DefaultCachePath() (string, error)
- func ErrorRetryable(kind ErrorKind) bool
- func NormalizeVersion(raw string) (string, error)
- func RunInternalUpdate([]string) error
- func WrapError(kind ErrorKind, err error) error
- type Artifact
- type AutoCheckOptions
- type AutoCheckResult
- type Client
- func (client *Client) DownloadArtifact(ctx context.Context, version, goos, goarch string) (Artifact, error)
- func (client *Client) LatestVersion(ctx context.Context) (string, error)
- func (client *Client) ResolveLatestVersion(ctx context.Context) (string, error)
- func (client *Client) ValidateArtifact(ctx context.Context, version, goos, goarch string) (string, error)
- type CommandRunner
- type ErrorKind
- type Options
- type Result
Constants ¶
View Source
const (
DefaultOSSBaseURL = "https://ros-public-tools.oss-cn-beijing.aliyuncs.com/github-releases/aliyun/elastic-compute-control-cli"
)
Variables ¶
This section is empty.
Functions ¶
func CompareVersions ¶
func DefaultCachePath ¶
func ErrorRetryable ¶
func NormalizeVersion ¶
func RunInternalUpdate ¶
Types ¶
type AutoCheckOptions ¶
type AutoCheckResult ¶
func AutoCheck ¶
func AutoCheck(ctx context.Context, options AutoCheckOptions) (AutoCheckResult, error)
type Client ¶
func (*Client) DownloadArtifact ¶
func (*Client) LatestVersion ¶
func (*Client) ResolveLatestVersion ¶
ResolveLatestVersion verifies the mutable OSS pointer against GitHub's immutable latest stable Release.
func (*Client) ValidateArtifact ¶
func (client *Client) ValidateArtifact(ctx context.Context, version, goos, goarch string) (string, error)
ValidateArtifact verifies that a platform artifact is published and returns the source an update would use without downloading the archive itself. OSS remains preferred, but its mutable checksum must agree with the immutable GitHub Release checksum before it is trusted.
type CommandRunner ¶
type Result ¶
type Result struct {
CurrentVersion string `json:"current_version"`
TargetVersion string `json:"target_version"`
UpdateAvailable bool `json:"update_available"`
Source string `json:"source"`
Installer string `json:"installer"`
Updated bool `json:"updated"`
UpdatePending bool `json:"update_pending"`
}
Click to show internal directories.
Click to hide internal directories.