plugins

package
v0.15.1 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2018 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadPluginRepository = errors.New("Invalid repository URL")

ErrBadPluginRepository represents an error when the plugin url is invalidu

View Source
var ErrFailedToRead = errors.New("Failed to read plugins directory")

ErrFailedToRead is returned when you the plugins directory cannot be read

Functions

func Config

func Config(pluginName string, conf interface{}) error

Config returns the key value configuration found in the plugin directory

func DeriveName

func DeriveName(pluginURL string) string

DeriveName returns the name of the plugin based on git repo url

func Executable

func Executable(cmd string) (string, error)

Executable returns the executable path

func Help

func Help(cmd string) error

Help executes the plugin's help command

func List

func List() ([]string, error)

List returns a list of available plugin commands

func NormalizeURL

func NormalizeURL(pluginURL string) string

NormalizeURL returns a normalized git url

func Path

func Path() (string, error)

Path returns the plugin directory's path

func Run

func Run(cmd string) (bool, error)

Run executes the requested plugin command and redirects stdout

func Shortname

func Shortname(name string) string

Shortname returns the shortened name of the plugin

Types

This section is empty.

Jump to

Keyboard shortcuts

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