update

package
v0.1.32 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package update securely replaces a release-built Aegis executable.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	CurrentVersion  string `json:"current_version"`
	LatestVersion   string `json:"latest_version"`
	UpdateAvailable bool   `json:"update_available"`
	Updated         bool   `json:"updated"`
	Executable      string `json:"executable,omitempty"`
}

type Updater

type Updater struct {
	CurrentVersion string
	APIURL         string
	DownloadURL    string
	RepositoryURL  string
	Client         *http.Client
	Executable     func() (string, error)
	GOOS           string
	GOARCH         string
}

func New

func New(currentVersion string) *Updater

func (*Updater) Run

func (u *Updater) Run(ctx context.Context, checkOnly bool) (Result, error)

Jump to

Keyboard shortcuts

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