plugin

package
v6.7.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 12, 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
	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