selfupdate

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckInput

type CheckInput struct {
	Version string
}

type Checker

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

func NewChecker

func NewChecker(opts ...Option) *Checker

func (*Checker) Check

func (c *Checker) Check(ctx context.Context, input *CheckInput) (*UpdateResult, error)

func (*Checker) CheckAsync

func (c *Checker) CheckAsync(ctx context.Context, input *CheckInput) <-chan *UpdateResult

type Option

type Option func(*Checker)

func WithBaseURL

func WithBaseURL(baseURL string) Option

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

func WithTimeout

func WithTimeout(timeout time.Duration) Option

type UpdateResult

type UpdateResult struct {
	UpdateAvailable bool   `json:"update_available"`
	LatestVersion   string `json:"latest_version"`
	CurrentVersion  string `json:"current_version"`
	ReleaseURL      string `json:"release_url"`
}

Jump to

Keyboard shortcuts

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