plugins

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	// Name "foo"
	Name string `json:"name"`
	// UseCommand "bar"
	UseCommand string `json:"use_command"`
	// BuffaloCommand "generate"
	BuffaloCommand string `json:"buffalo_command"`
	// Description "generates a foo"
	Description string   `json:"description"`
	Aliases     []string `json:"aliases"`
	Binary      string   `json:"-"`
}

Command that the plugin supplies

type Commands

type Commands []Command

Commands is a slice of Command

type List

type List map[string]Commands

List maps a Buffalo command to a slice of Command

func Available

func Available() (List, error)

Available plugins for the `buffalo` command. It will look in $GOPATH/bin and the `./plugins` directory. This can be changed by setting the $BUFFALO_PLUGIN_PATH environment variable.

Requirements:

  • file/command must be executable
  • file/command must start with `buffalo-`
  • file/command must respond to `available` and return JSON of plugins.Commands{}

Limit full path scan with direct plugin path

Jump to

Keyboard shortcuts

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