appupdate

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleSelfUpdate

func HandleSelfUpdate(
	currentVersion string,
	logger *zap.Logger,
	fs filesystem.FileSystem,
	prompter core.UserPrompter,
	updater Updater,
) chan string

Types

type DefaultRelease

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

func (DefaultRelease) AssetName

func (r DefaultRelease) AssetName() string

func (DefaultRelease) AssetURL

func (r DefaultRelease) AssetURL() string

func (DefaultRelease) Version

func (r DefaultRelease) Version() string

type DefaultUpdater

type DefaultUpdater struct{}

func (DefaultUpdater) DetectLatest

func (u DefaultUpdater) DetectLatest(ctx context.Context, slug string) (Release, bool, error)

func (DefaultUpdater) UpdateTo

func (u DefaultUpdater) UpdateTo(ctx context.Context, assetURL, assetName, exePath string) error

type Release

type Release interface {
	Version() string
	AssetURL() string
	AssetName() string
}

type Updater

type Updater interface {
	DetectLatest(ctx context.Context, slug string) (Release, bool, error)
	UpdateTo(ctx context.Context, assetURL, assetName, exePath string) error
}

Jump to

Keyboard shortcuts

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