packages

package
v0.0.0-...-2f1ad5f Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Package

type Package struct {
	// URL the repository URL for the package
	URL string `json:"url,required"`

	// Method represents the methodology that will need to be imployed to install the relevant artifacts
	Method string `json:"method,required"`

	// Binaries indicates the paths to the binaries in the artifact which are meant to be installed for the end-user
	Binaries []string `json:"binaries,required"`

	// FIXME: Hackargs will go away using it for testing right now
	Hackargs string `json:"hackargs,required"`

	// Pattern indicates the regexp pattern to use to determine the correct asset from the release to use
	Pattern string `json:"pattern,required"`

	// Compression indicates the type of compression used (if any) for the relevant artifacts
	Compression string `json:"compression,omit_empty"`

	// SkipBaseDir is used for "tar" method artifacts and indicates all files in the archive will be nested under a base directory, which can be safely ignored.
	SkipBaseDir bool `json:"skipbasedir,omit_empty"`
}

Package represents the metadata about an application and indicates how to install it to the local system and where to install it from

func NewPackageFromGithub

func NewPackageFromGithub(owner, repo string) (*Package, error)

NewPackageFromGithub produces a *Package given a valid owner and repo

func NewPackageFromJSON

func NewPackageFromJSON(p string) (*Package, error)

NewPackageFromJSON unmarshals a provided JSON string into a *Package

func NewPackageFromURL

func NewPackageFromURL(u string) (*Package, error)

NewPackageFromURL retrieves a package from the provided URL and returns a *Package

func (*Package) Install

func (p *Package) Install(basedir string, v *semver.Version) error

Install installs the *Package to the local system

func (*Package) Uninstall

func (p *Package) Uninstall(basedir string) error

Jump to

Keyboard shortcuts

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