updates

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoUpdateResult

type AutoUpdateResult struct {
	Attempted bool
	Updated   bool
	Method    InstallMethod
	Command   string
	Version   string
	Error     string
}

type AutoUpdateState

type AutoUpdateState struct {
	AttemptedAt      time.Time
	AttemptedVersion string
	SucceededAt      time.Time
	SucceededVersion string
	LastError        string
}

type DoctorReport

type DoctorReport struct {
	Enabled         bool
	Interval        time.Duration
	AutoUpdate      bool
	Method          InstallMethod
	UpgradeCommand  string
	LatestVersion   string
	LatestURL       string
	CheckedAt       time.Time
	FromCache       bool
	UpdateAvailable bool
	AutoUpdateState AutoUpdateState
	Error           string
}

type InstallMethod

type InstallMethod string
const (
	InstallMethodUnknown InstallMethod = "unknown"
	InstallMethodBrew    InstallMethod = "brew"
	InstallMethodGo      InstallMethod = "go-install"
)

type Release

type Release struct {
	Version string
	URL     string
}

type SelfUpdateResult

type SelfUpdateResult struct {
	Method         InstallMethod
	UpgradeCommand string
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(paths config.Paths) *Service

func (*Service) AutoUpdate

func (s *Service) AutoUpdate(ctx context.Context, currentVersion string, cfg config.UpdateCheck, stdout, stderr io.Writer) AutoUpdateResult

func (*Service) Doctor

func (s *Service) Doctor(ctx context.Context, currentVersion string, cfg config.UpdateCheck) DoctorReport

func (*Service) SelfUpdate

func (s *Service) SelfUpdate(ctx context.Context, stdout, stderr io.Writer) (SelfUpdateResult, error)

Jump to

Keyboard shortcuts

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