command

package
v6.32.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2017 License: Apache-2.0 Imports: 9 Imported by: 371

Documentation

Overview

Package command should not be imported by external consumers. It was not designed for external use.

Index

Constants

View Source
const ExperimentalWarning = "This command is in EXPERIMENTAL stage and may change without notice"

Variables

This section is empty.

Functions

func MinimumAPIVersionCheck

func MinimumAPIVersionCheck(current string, minimum string, customCommand ...string) error

func WarnAPIVersionCheck

func WarnAPIVersionCheck(config Config, ui UI) error

Types

type Config

type Config interface {
	AccessToken() string
	AddPlugin(configv3.Plugin)
	AddPluginRepository(name string, url string)
	APIVersion() string
	BinaryName() string
	BinaryVersion() string
	ColorEnabled() configv3.ColorSetting
	CurrentUser() (configv3.User, error)
	DialTimeout() time.Duration
	DockerPassword() string
	Experimental() bool
	GetPlugin(pluginName string) (configv3.Plugin, bool)
	GetPluginCaseInsensitive(pluginName string) (configv3.Plugin, bool)
	HasTargetedOrganization() bool
	HasTargetedSpace() bool
	Locale() string
	MinCLIVersion() string
	OverallPollingTimeout() time.Duration
	PluginHome() string
	PluginRepositories() []configv3.PluginRepository
	Plugins() []configv3.Plugin
	PollingInterval() time.Duration
	RefreshToken() string
	RemovePlugin(string)
	SetAccessToken(token string)
	SetOrganizationInformation(guid string, name string)
	SetRefreshToken(token string)
	SetSpaceInformation(guid string, name string, allowSSH bool)
	SetTargetInformation(api string, apiVersion string, auth string, minCLIVersion string, doppler string, routing string, skipSSLValidation bool)
	SetTokenInformation(accessToken string, refreshToken string, sshOAuthClient string)
	SetUAAEndpoint(uaaEndpoint string)
	SkipSSLValidation() bool
	SSHOAuthClient() string
	StagingTimeout() time.Duration
	StartupTimeout() time.Duration
	Target() string
	TargetedOrganization() configv3.Organization
	TargetedSpace() configv3.Space
	UAAOAuthClient() string
	UAAOAuthClientSecret() string
	UnsetOrganizationInformation()
	UnsetSpaceInformation()
	Verbose() (bool, []string)
	WritePluginConfig() error
}

Config a way of getting basic CF configuration

type ExtendedCommander

type ExtendedCommander interface {
	flags.Commander
	Setup(Config, UI) error
}

ExtendedCommander extends the go-flags Command interface by forcing a Setup function on all commands. This setup function should setup all command dependencies.

type SharedActor

type SharedActor interface {
	CheckTarget(config sharedaction.Config, targetedOrganizationRequired bool, targetedSpaceRequired bool) error
}

type UI

type UI interface {
	DisplayBoolPrompt(defaultResponse bool, template string, templateValues ...map[string]interface{}) (bool, error)
	DisplayChangesForPush(changeSet []ui.Change) error
	DisplayError(err error)
	DisplayHeader(text string)
	DisplayInstancesTableForApp(table [][]string)
	DisplayKeyValueTable(prefix string, table [][]string, padding int)
	DisplayKeyValueTableForApp(table [][]string)
	DisplayKeyValueTableForV3App(table [][]string, crashedProcesses []string)
	DisplayLogMessage(message ui.LogMessage, displayHeader bool)
	DisplayNewline()
	DisplayNonWrappingTable(prefix string, table [][]string, padding int)
	DisplayOK()
	DisplayTableWithHeader(prefix string, table [][]string, padding int)
	DisplayText(template string, data ...map[string]interface{})
	DisplayTextWithFlavor(text string, keys ...map[string]interface{})
	DisplayTextWithBold(text string, keys ...map[string]interface{})
	DisplayWarning(formattedString string, keys ...map[string]interface{})
	DisplayWarnings(warnings []string)
	RequestLoggerFileWriter(filePaths []string) *ui.RequestLoggerFileWriter
	RequestLoggerTerminalDisplay() *ui.RequestLoggerTerminalDisplay
	TranslateText(template string, data ...map[string]interface{}) string
	UserFriendlyDate(input time.Time) string
	Writer() io.Writer
}

UI is the interface to STDOUT

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.
Package common should not be imported by external consumers.
Package common should not be imported by external consumers.
commonfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
Package flag should not be imported by external consumers.
Package flag should not be imported by external consumers.
Package plugin should not be imported by external consumers.
Package plugin should not be imported by external consumers.
pluginfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
shared
Package shared should not be imported by external consumers.
Package shared should not be imported by external consumers.
Package translatableerror contains all the command layer translatable errors.
Package translatableerror contains all the command layer translatable errors.
translatableerrorfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
v2
Package v2 should not be imported by external consumers.
Package v2 should not be imported by external consumers.
shared
Package shared should not be imported by external consumers.
Package shared should not be imported by external consumers.
v2fakes
Code generated by counterfeiter.
Code generated by counterfeiter.
v3
Package v3 should not be imported by external consumers.
Package v3 should not be imported by external consumers.
shared
Package shared should not be imported by external consumers.
Package shared should not be imported by external consumers.
shared/sharedfakes
Code generated by counterfeiter.
Code generated by counterfeiter.
v3fakes
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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