installer

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(i Installer) error

Install installs a rig.

func Update

func Update(i Installer) error

Update updates a rig.

Types

type Installer

type Installer interface {
	// Install adds a rig to a path
	Install() error
	// Path is the directory of the installed rig.
	Path() string
	// Update updates a rig.
	Update() error
}

Installer provides an interface for installing client rigs.

func FindSource

func FindSource(location string) (Installer, error)

FindSource determines the correct Installer for the given source.

func New

func New(source, name, version string) (Installer, error)

New determines and returns the correct Installer for the given source

type LocalInstaller

type LocalInstaller struct {
	Source string
	Name   string
}

LocalInstaller installs rigs from the filesystem

func NewLocalInstaller

func NewLocalInstaller(source string, name string) (*LocalInstaller, error)

NewLocalInstaller creates a new LocalInstaller

func (*LocalInstaller) Install

func (i *LocalInstaller) Install() error

Install creates a symlink to the rig directory

func (*LocalInstaller) Path

func (i *LocalInstaller) Path() string

Path is where the rig will be installed into.

func (*LocalInstaller) Update

func (i *LocalInstaller) Update() error

Update updates a local repository, which is a no-op.

type VCSInstaller

type VCSInstaller struct {
	Version string
	Source  string
	Name    string
}

VCSInstaller installs rigs from a remote repository

func NewVCSInstaller

func NewVCSInstaller(source, name, version string) (*VCSInstaller, error)

NewVCSInstaller creates a new VCSInstaller.

func (*VCSInstaller) Install

func (i *VCSInstaller) Install() error

Install clones a remote repository to the rig directory

Implements Installer

func (*VCSInstaller) Path

func (i *VCSInstaller) Path() string

Path is where the rig will be installed into.

func (*VCSInstaller) Update

func (i *VCSInstaller) Update() error

Update updates a remote repository

Jump to

Keyboard shortcuts

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