Documentation
¶
Index ¶
- func BackgroundUpdate() error
- func CanUpdateThisInstallation() bool
- func Check() bool
- func GetCurrentBinaryPath() (string, error)
- func IsUnderHomebrew() bool
- func Relaunch(ctx context.Context, silent bool) error
- func UpgradeInPlace(ctx context.Context, io *iostreams.IOStreams, prelease, silent bool) error
- func ValidateRelease(ctx context.Context, version string) (err error)
- type InvalidReleaseError
- type Release
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BackgroundUpdate ¶ added in v0.1.51
func BackgroundUpdate() error
BackgroundUpdate begins an update in the background.
func CanUpdateThisInstallation ¶ added in v0.1.66
func CanUpdateThisInstallation() bool
func Check ¶ added in v0.0.251
func Check() bool
Check reports whether update checks should take place.
func GetCurrentBinaryPath ¶ added in v0.1.66
func GetCurrentBinaryPath() (string, error)
func IsUnderHomebrew ¶ added in v0.0.523
func IsUnderHomebrew() bool
IsUnderHomebrew reports whether the fly binary was found under the Homebrew prefix.
func Relaunch ¶ added in v0.1.51
func Relaunch(ctx context.Context, silent bool) error
Relaunch only returns on error
func UpgradeInPlace ¶ added in v0.0.251
func UpgradeInPlace(ctx context.Context, io *iostreams.IOStreams, prelease, silent bool) error
func ValidateRelease ¶ added in v0.1.58
func ValidateRelease(ctx context.Context, version string) (err error)
ValidateRelease reports whether the given release is valid via an API call. If the version is invalid, the error will be an InvalidReleaseError. Note that other errors may be returned if the API call fails.
Types ¶
type InvalidReleaseError ¶ added in v0.1.58
type InvalidReleaseError struct {
// contains filtered or unexported fields
}
func (InvalidReleaseError) StatusCode ¶ added in v0.1.58
func (i InvalidReleaseError) StatusCode() int
type Release ¶
type Release struct {
Version string `yaml:"version"`
Prerelease bool `yaml:"prerelease"`
DownloadURL string `yaml:"download_url" json:"download_url"`
Timestamp time.Time `yaml:"timestamp"`
}
func LatestRelease ¶ added in v0.0.251
func LatestRelease(ctx context.Context, channel string) (*Release, error)
LatestRelease reports the latest release for the given channel.
Click to show internal directories.
Click to hide internal directories.