version

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 12 Imported by: 0

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

func NewChecker(currentVersion, commit string) *Checker

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

Jump to

Keyboard shortcuts

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