installer

package
v0.1.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInstallerNotApplicable = fmt.Errorf("installer is not available")
View Source
var ErrSkip = fmt.Errorf("skip")

Functions

This section is empty.

Types

type Factory

type Factory interface {
	// Key returns the key of the installer
	//
	// The key is used to identify the installer, and it's also
	// the key of the options in the extension registry.
	Key() string

	// GetInstaller returns the installer if it's available
	//
	// If the installer is not available, it will return (nil, some error)
	// (the returned error is only for inform purpose, it's safe to ignore)
	GetInstaller(o eroptions.AnyOptions) (Installer, error)
}

type InstallOptions

type InstallOptions struct {
	Version      string
	To           string
	ShowProgress bool
}

type Installer

type Installer interface {
	// Install will install the app to the given destination
	//
	// If the installer is not application, it will return ErrSkip
	Install(o *InstallOptions) error
}

Jump to

Keyboard shortcuts

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