plugin

package
v0.0.0-...-fe2161e Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2014 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewCliConnection

func NewCliConnection(cliServerPort string) *cliConnection

func Start

func Start(cmd Plugin)

*

  • This function is called by the plugin to setup their server. This allows us to call Run on the plugin
  • os.Args[1] port CF_CLI rpc server is running on
  • os.Args[2] **OPTIONAL**
  • SendMetadata - used to fetch the plugin metadata

*

Types

type CliConnection

type CliConnection interface {
	CliCommandWithoutTerminalOutput(args ...string) ([]string, error)
	CliCommand(args ...string) ([]string, error)
}

*

List of commands avaiable to CliConnection variable passed into run

*

type Command

type Command struct {
	Name     string
	Alias    string
	HelpText string
}

type Plugin

type Plugin interface {
	Run(cliConnection CliConnection, args []string)
	GetMetadata() PluginMetadata
}

*

Command interface needs to be implemented for a runnable plugin of `cf`

*

type PluginMetadata

type PluginMetadata struct {
	Name     string
	Commands []Command
}

Directories

Path Synopsis
This file was generated by counterfeiter
This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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