registry

package
Version: v0.0.0-...-0161461 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InstallerKindAdvancedInstaller InstallerKind = "advancedinstaller"
	InstallerKindAsIs                            = "as-is"
	InstallerKindCopy                            = "copy"
	InstallerKindCustom                          = "custom"
	InstallerKindEasyInstall26                   = "easy_install_26"
	InstallerKindEasyInstall27                   = "easy_install_27"
	InstallerKindInnoSetup                       = "innosetup"
	InstallerKindMSI                             = "msi"
	InstallerKindNSIS                            = "nsis"
	InstallerKindZip                             = "zip"
)

Installer types.

View Source
const RegistryVersion = 4

RegistryVersion is the currently supported registry version.

Variables

View Source
var ErrUnsupportedRegistry = errors.New("unsupported registry version")

ErrUnsupportedRegistry is returned is the registry version is unsupported.

Functions

This section is empty.

Types

type ContainerKind

type ContainerKind string

ContainerKind represents a type of container.

const (
	ContainerKindZip ContainerKind = "zip"
)

Container types.

type InstallerKind

type InstallerKind string

InstallerKind represents a type of installer.

type Options

type Options struct {
	Arguments *[]string `json:"arguments,omitempty"` // optional
	Container *struct {
		Installer     string        `json:"installer"`
		ContainerKind ContainerKind `json:"kind"`
	} `json:"container,omitempty"` // optional
	Destination *string   `json:"destination,omitempty"` // optional
	Extension   *string   `json:"extension,omitempty"`   // optional
	FileName    *string   `json:"filename,omitempty"`    // optional
	Shims       *[]string `json:"shims,omitempty"`       // optional
}

Options represents additional options for a package. All fields are optional.

type Package

type Package struct {
	Installer struct {
		Interactive *bool         `json:"interactive,omitempty"` // optional: default to false
		Kind        InstallerKind `json:"kind"`
		// Options will either have: (base options set) or (x86 set)
		// or (x86 and x86_64 set). Check the x86 for nil to
		// determine which one.
		Options *struct {
			*Options `json:",omitempty"` // maybe optional
			X86      *Options            `json:"x86,omitempty"`    // maybe optional
			X86_64   *Options            `json:"x86_64,omitempty"` // optional
		} `json:"options,omitempty"` // optional
		X86    *string `json:"x86,omitempty"` // optional, but at least either x86 or x86_64 must be defined
		X86_64 *string `json:"x86_64,omitempty"`
	} `json:"installer"`
	Version string `json:"version"`
}

Package represents a package

type Registry

type Registry struct {
	Schema   string             `json:"$schema"`
	Version  int                `json:"version"`
	Packages map[string]Package `json:"packages"`
}

Registry represents a registry.

func New

func New() *Registry

New returns a new Registry.

func NewFromJSON

func NewFromJSON(jsonBuf []byte) (*Registry, error)

NewFromJSON loads a Registry from a JSON byte array.

func (*Registry) GetJSON

func (r *Registry) GetJSON() ([]byte, error)

GetJSON gets the JSON for the Registry.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL