Help us shape the future of Go! Take the 2026 Go Developer Survey

plugin

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2017 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const LongUsage = `` /* 3630-byte string literal not displayed */
View Source
const ShortUsage = `` /* 272-byte string literal not displayed */
View Source
const Usage = ShortUsage + "\n" + LongUsage

Variables

This section is empty.

Functions

This section is empty.

Types

type Help

type Help struct {
	CLI cfplugin.CliConnection
	UI  PluginUI
}

func (*Help) Long added in v0.2.0

func (h *Help) Long()

func (*Help) Short added in v0.2.0

func (h *Help) Short()

type HelpUI added in v0.2.0

type HelpUI interface {
	Output(format string, a ...interface{})
	Error(err error)
}

type Plugin

type Plugin struct {
	UI       PluginUI
	Version  string
	RunErr   error
	ExitChan chan struct{}
}

func (*Plugin) GetMetadata

func (p *Plugin) GetMetadata() cfplugin.PluginMetadata

func (*Plugin) Help

func (p *Plugin) Help(name string)

func (*Plugin) Install

func (p *Plugin) Install() error

func (*Plugin) Run

func (p *Plugin) Run(cliConnection cfplugin.CliConnection, args []string)

type PluginUI added in v0.2.0

type PluginUI interface {
	Prompt(prompt string) string
	Output(format string, a ...interface{})
	Warn(format string, a ...interface{})
	Error(err error)
}

type UI

type UI struct {
	Out       io.Writer
	Err       io.Writer
	In        io.Reader
	ErrIsTerm bool
}

func (*UI) Error

func (u *UI) Error(err error)

func (*UI) Output

func (u *UI) Output(format string, a ...interface{})

func (*UI) Prompt

func (u *UI) Prompt(message string) string

func (*UI) Warn

func (u *UI) Warn(format string, a ...interface{})

Jump to

Keyboard shortcuts

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