Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker handles version checking in the background
func NewChecker ¶
NewChecker creates a new version checker
func (*Checker) CheckInBackground ¶
func (c *Checker) CheckInBackground()
CheckInBackground starts a background goroutine to check for updates
func (*Checker) GetUpdateInfo ¶
func (c *Checker) GetUpdateInfo() *UpdateInfo
GetUpdateInfo returns the update information if available It waits up to 100ms for the check to complete, then returns whatever is available
func (*Checker) GetUpdateInfoNonBlocking ¶
func (c *Checker) GetUpdateInfoNonBlocking() *UpdateInfo
GetUpdateInfoNonBlocking returns the update information without waiting
type Latest ¶
type Latest struct {
Tag string `json:"tag"`
PublishedAt string `json:"published_at"`
URL string `json:"url"`
Notes string `json:"notes"`
Assets map[string]string `json:"assets"`
}
Latest contains information about the latest release
type UpdateInfo ¶
type UpdateInfo struct {
UpdateAvailable bool
LatestVersion string
CurrentVersion string
ReleaseURL string
Severity string
}
UpdateInfo contains information about available updates
type VersionResponse ¶
type VersionResponse struct {
CurrentVersion string `json:"current_version"`
Latest Latest `json:"latest"`
UpdateAvailable bool `json:"update_available"`
Severity string `json:"severity"`
CacheLastUpdate string `json:"cache_last_updated"`
}
VersionResponse represents the API response from the version check endpoint
Click to show internal directories.
Click to hide internal directories.