installer

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2018 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug bool

Debug enables verbose output.

Functions

func Install

func Install(i Installer) error

Install installs a plugin to $DRAFT_HOME

func Update

func Update(i Installer) error

Update updates a plugin in $DRAFT_HOME.

Types

type Installer

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

Installer provides an interface for installing client plugins.

func FindSource

func FindSource(location string, home draftpath.Home) (Installer, error)

FindSource determines the correct Installer for the given source.

func New

func New(source, version string, home draftpath.Home) (Installer, error)

New determines and returns the correct Installer for the given source

type LocalInstaller

type LocalInstaller struct {
	// contains filtered or unexported fields
}

LocalInstaller installs plugins from the filesystem

func NewLocalInstaller

func NewLocalInstaller(source string, home draftpath.Home) (*LocalInstaller, error)

NewLocalInstaller creates a new LocalInstaller

func (*LocalInstaller) Install

func (i *LocalInstaller) Install() error

Install creates a symlink to the plugin directory in $DRAFT_HOME

func (*LocalInstaller) Path

func (b *LocalInstaller) Path() string

Path is where the plugin will be symlinked to.

func (*LocalInstaller) Update

func (i *LocalInstaller) Update() error

Update updates a local repository

type VCSInstaller

type VCSInstaller struct {
	Repo    vcs.Repo
	Version string
	// contains filtered or unexported fields
}

VCSInstaller installs plugins from a remote repository

func NewVCSInstaller

func NewVCSInstaller(source, version string, home draftpath.Home) (*VCSInstaller, error)

NewVCSInstaller creates a new VCSInstaller.

func (*VCSInstaller) Install

func (i *VCSInstaller) Install() error

Install clones a remote repository and creates a symlink to the plugin directory in DRAFT_HOME

Implements Installer

func (*VCSInstaller) Path

func (b *VCSInstaller) Path() string

Path is where the plugin will be symlinked to.

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