updater

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CurrentVersion = "1.5.5"
	ReleasesURL    = "https://github.com/HONG-LOU/entcoin/releases/latest"
)

Variables

This section is empty.

Functions

func HandleUpdateHelper added in v1.2.2

func HandleUpdateHelper([]string) (bool, error)

func LaunchInstaller

func LaunchInstaller(path, _ string) error

Types

type Client

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

func New

func New() *Client

func (*Client) Check

func (c *Client) Check(ctx context.Context) (Status, error)

func (*Client) PrepareLatest

func (c *Client) PrepareLatest(ctx context.Context, report ProgressReporter) (PreparedUpdate, error)

type PreparedUpdate

type PreparedUpdate struct {
	Status Status
	Path   string
}

type Progress added in v1.0.10

type Progress struct {
	Phase      string `json:"phase"`
	Downloaded int64  `json:"downloaded"`
	Total      int64  `json:"total"`
	Percent    int    `json:"percent"`
}

type ProgressReporter added in v1.0.10

type ProgressReporter func(Progress)

type Status

type Status struct {
	CurrentVersion string `json:"current_version"`
	LatestVersion  string `json:"latest_version"`
	Available      bool   `json:"available"`
	ReleaseURL     string `json:"release_url"`
	PublishedAt    string `json:"published_at"`
	AssetName      string `json:"asset_name"`
}

Jump to

Keyboard shortcuts

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