plugin

package
v2.0.57+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2016 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//PluginPort - default plugin port
	PluginPort = int(1984)
	//PluginMeta - default plugin arg to show meta data
	PluginMeta = "plugin-meta"

	//PluginActivityRestore - activity keyname
	PluginActivityRestore = "restore"
	//PluginActivityBackup - activity keyname
	PluginActivityBackup = "backup"
	//PluginActivityExecute - activity keyname
	PluginActivityExecute = "execute"
)

Variables

View Source
var (
	//UIOutput - a function to control UIOutput
	UIOutput = fmt.Print
	//PluginArgs - cli args given to the plugin
	PluginArgs = os.Args
)
View Source
var IsPluginMetaCall atomic.Value

IsPluginMetaCall - determines if the call to the plugin is for meta data or execution

Functions

func Start

func Start(plgn Plugin)

Start - call on a plugin within a main to make your app a cfops plugin

Types

type Credential

type Credential struct{}

Credential - credential implementation

type Meta

type Meta struct {
	Name                string
	Role                string
	Description         string
	SupportedActivities map[string]bool
}

Meta - plugin meta data storage object

type PivotalCF

type PivotalCF interface {
	GetActivity() string
	GetProducts() []Product
	GetCredentials() []Credential
}

PivotalCF - interface representing a pivotalcf

func NewPivotalCF

func NewPivotalCF(pcf PivotalCF) *PivotalCF

NewPivotalCF - creates a pivotalcf from a given object and registers the gob

type Plugin

type Plugin interface {
	GetMeta() Meta
	Run(PivotalCF, *[]string) error
}

Plugin - a plugin interface definition

type PluginTile

type PluginTile struct {
	OpsManager *opsmanager.OpsManager
	FilePath   string
	Meta       Meta
}

PluginTile - tile implementation of a plugin

func (*PluginTile) Backup

func (s *PluginTile) Backup() (err error)

Backup - backup method for plugin tile wrapper

func (*PluginTile) Restore

func (s *PluginTile) Restore() (err error)

Restore - restore method for plugin tile wrapper

type PluginTileBuilder

type PluginTileBuilder struct {
	FilePath string
	Meta     Meta
}

PluginTileBuilder - factory for a tile wrapped plugin

func (*PluginTileBuilder) New

func (s *PluginTileBuilder) New(tileSpec tileregistry.TileSpec) (tile tileregistry.Tile, err error)

New - method to create a plugin tile

type Product

type Product struct{}

Product - implementation

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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