update

package
v0.0.0-...-64200e7 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultVerifier

type DefaultVerifier struct {
}

func (DefaultVerifier) Verify

func (d DefaultVerifier) Verify(downloadUrl, newBinary string) error

type DefaultVersionCheck

type DefaultVersionCheck struct {
	Command  string
	Argument string
}

func (DefaultVersionCheck) UpdateRequired

func (d DefaultVersionCheck) UpdateRequired(target string) (bool, error)

type Resolver

type Resolver interface {
	GetRelease() (string, error)
	GetDownloadURL(release string) (string, error)
}

type Updater

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

func NewUpdater

func NewUpdater() Updater

func (Updater) Do

func (u Updater) Do() error

func (Updater) WithForce

func (u Updater) WithForce(force bool) Updater

func (Updater) WithResolver

func (u Updater) WithResolver(resolver Resolver) Updater

func (Updater) WithVerifier

func (u Updater) WithVerifier(verifier Verifier) Updater

func (Updater) WithVerify

func (u Updater) WithVerify(verify bool) Updater

func (Updater) WithVersionCheck

func (u Updater) WithVersionCheck(check VersionCheck) Updater

type Verifier

type Verifier interface {
	Verify(digestUrl, newBinary string) error
}

type VersionCheck

type VersionCheck interface {
	UpdateRequired(target string) (bool, error)
}

Jump to

Keyboard shortcuts

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