plugins

package
v0.9.1-beta2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: GPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoPluginWithNameFound = fmt.Errorf("no plugin with that name could be found in the pluginCache")

Functions

This section is empty.

Types

type CommandSpec added in v0.9.8

type CommandSpec struct {
	Cmd         string        `yaml:"cmd"`
	Help        string        `yaml:"help,omitempty"`
	Subcommands []CommandSpec `yaml:"subcommands,omitempty"`
}

type Config added in v0.9.8

type Config struct {
	Out    io.Writer
	Fs     afero.Fs
	Pather devctlpath.Pather
}

type Engine added in v0.9.8

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

func NewEngine added in v0.9.8

func NewEngine(opts ...Option) *Engine

func (*Engine) Execute added in v0.9.8

func (e *Engine) Execute(pluginName string, args []string) (err error)

Execute tries to execute a named plugin from the cache

func (*Engine) LoadPlugin added in v0.9.8

func (e *Engine) LoadPlugin(manifestPath string) (p *Plugin, err error)

func (*Engine) LoadPlugins added in v0.9.8

func (e *Engine) LoadPlugins() (plugins Plugins)

type Manifest added in v0.9.8

type Manifest struct {
	Version    string `yaml:"version"`
	PluginSpec `yaml:"plugin"`
}

type Option added in v0.9.8

type Option func(c *Config) *Config

type Plugin added in v0.9.0

type Plugin struct {
	*Manifest
	Source   string
	RootPath string
}

type PluginSpec added in v0.9.8

type PluginSpec struct {
	*CommandSpec `yaml:"cmd,inline"`
	Name         string `yaml:"name"`
	Pkg          string `yaml:"pkg"`
}

type Plugins added in v0.9.8

type Plugins []*Plugin

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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