plugins

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2017 License: MIT Imports: 11 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 $PATH and the `./plugins` directory.

Requirements:

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

Caveats: * The C:\Windows directory is excluded

Jump to

Keyboard shortcuts

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