models

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2023 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPluginNotInstalled     = errors.New("plugin not installed")
	ErrPluginAlreadyInstalled = errors.New("plugin already installed")
	ErrPluginNotFound         = errors.New("plugin not found")
	ErrEmptyArchiveAddress    = errors.New("empty archive address")
	ErrUnknownArchiveProvider = errors.New("unknown archive provider")
)

Functions

This section is empty.

Types

type Archive

type Archive struct {
	URL             string
	SHA256          string
	CanSkipDownload bool
}

type Distribution

type Distribution struct {
	Targets          []string   `yaml:"targets"`
	Version          string     `yaml:"version"`
	Executable       Executable `yaml:"executable"`
	SkipVerification bool       `yaml:"skipVerification"`
}

type Executable

type Executable struct {
	// Provider specifies how the Address will be used. (Required)
	Provider ExecutableProvider `yaml:"provider"`

	// Provider specific data
	ProviderData map[string]string `yaml:"providerData"`

	// Address is the location of the executable archive. (Required)
	Address string `yaml:"address"`

	// SHA256 is the SHA256 checksum of the executable archive. (Optional)
	//
	// Required for the URI provider.
	SHA256 string `yaml:"sha256"`

	// Entrypoint specifies which file will be executed in the archive. Support templates. (Required)
	Entrypoint string `yaml:"entrypoint"`

	// Archive specifies which file will be downloaded. Support templates. (Required)
	Archive string `yaml:"archive"`
}

type ExecutableProvider

type ExecutableProvider string

Jump to

Keyboard shortcuts

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