command

package
v6.28.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2017 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

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

Index

Constants

View Source
const (
	MinVersionLifecyleStagingV2         = "2.68.0"
	MinVersionHTTPEndpointHealthCheckV2 = "2.68.0"
	MinVersionProcessHealthCheckV2      = "2.47.0"

	MinVersionRunTaskV3          = "3.0.0"
	MinVersionIsolationSegmentV3 = "3.11.0"
)
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) error

func WarnAPIVersionCheck

func WarnAPIVersionCheck(config Config, ui UI) error

Types

type APINotFoundError

type APINotFoundError struct {
	URL string
}

func (APINotFoundError) Error

func (_ APINotFoundError) Error() string

func (APINotFoundError) Translate

func (e APINotFoundError) Translate(translate func(string, ...interface{}) string) string

type APIRequestError

type APIRequestError struct {
	Err error
}

func (APIRequestError) Error

func (_ APIRequestError) Error() string

func (APIRequestError) Translate

func (e APIRequestError) Translate(translate func(string, ...interface{}) string) string

type ApplicationNotFoundError

type ApplicationNotFoundError struct {
	Name string
}

func (ApplicationNotFoundError) Error

func (_ ApplicationNotFoundError) Error() string

func (ApplicationNotFoundError) Translate

func (e ApplicationNotFoundError) Translate(translate func(string, ...interface{}) string) string

type ArgumentCombinationError

type ArgumentCombinationError struct {
	Arg1 string
	Arg2 string
}

ArgumentCombinationError represent an error caused by using two command line arguments that cannot be used together.

func (ArgumentCombinationError) Error

func (_ ArgumentCombinationError) Error() string

func (ArgumentCombinationError) Translate

func (e ArgumentCombinationError) Translate(translate func(string, ...interface{}) string) string

type BadCredentialsError

type BadCredentialsError struct{}

func (BadCredentialsError) Error

func (_ BadCredentialsError) Error() string

func (BadCredentialsError) Translate

func (e BadCredentialsError) Translate(translate func(string, ...interface{}) string) string

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
	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, uaa string, routing string, skipSSLValidation bool)
	SetTokenInformation(accessToken string, refreshToken string, sshOAuthClient string)
	SkipSSLValidation() bool
	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 HealthCheckTypeUnsupportedError

type HealthCheckTypeUnsupportedError struct {
	SupportedTypes []string
}

func (HealthCheckTypeUnsupportedError) Error

func (HealthCheckTypeUnsupportedError) Translate

func (e HealthCheckTypeUnsupportedError) Translate(translate func(string, ...interface{}) string) string

type InvalidSSLCertError

type InvalidSSLCertError struct {
	API string
}

func (InvalidSSLCertError) Error

func (_ InvalidSSLCertError) Error() string

func (InvalidSSLCertError) Translate

func (e InvalidSSLCertError) Translate(translate func(string, ...interface{}) string) string

type LifecycleMinimumAPIVersionNotMetError

type LifecycleMinimumAPIVersionNotMetError struct {
	CurrentVersion string
	MinimumVersion string
}

func (LifecycleMinimumAPIVersionNotMetError) Error

func (LifecycleMinimumAPIVersionNotMetError) Translate

func (e LifecycleMinimumAPIVersionNotMetError) Translate(translate func(string, ...interface{}) string) string

type MinimumAPIVersionNotMetError

type MinimumAPIVersionNotMetError struct {
	CurrentVersion string
	MinimumVersion string
}

func (MinimumAPIVersionNotMetError) Error

func (MinimumAPIVersionNotMetError) Translate

func (e MinimumAPIVersionNotMetError) Translate(translate func(string, ...interface{}) string) string

type NoAPISetError

type NoAPISetError struct {
	BinaryName string
}

func (NoAPISetError) Error

func (_ NoAPISetError) Error() string

func (NoAPISetError) Translate

func (e NoAPISetError) Translate(translate func(string, ...interface{}) string) string

type NoOrganizationTargetedError

type NoOrganizationTargetedError struct {
	BinaryName string
}

func (NoOrganizationTargetedError) Error

func (NoOrganizationTargetedError) Translate

func (e NoOrganizationTargetedError) Translate(translate func(string, ...interface{}) string) string

type NoSpaceTargetedError

type NoSpaceTargetedError struct {
	BinaryName string
}

func (NoSpaceTargetedError) Error

func (_ NoSpaceTargetedError) Error() string

func (NoSpaceTargetedError) Translate

func (e NoSpaceTargetedError) Translate(translate func(string, ...interface{}) string) string

type NotLoggedInError

type NotLoggedInError struct {
	BinaryName string
}

func (NotLoggedInError) Error

func (_ NotLoggedInError) Error() string

func (NotLoggedInError) Translate

func (e NotLoggedInError) Translate(translate func(string, ...interface{}) string) string

type ParseArgumentError

type ParseArgumentError struct {
	ArgumentName string
	ExpectedType string
}

func (ParseArgumentError) Error

func (_ ParseArgumentError) Error() string

func (ParseArgumentError) Translate

func (e ParseArgumentError) Translate(translate func(string, ...interface{}) string) string

type RequiredArgumentError

type RequiredArgumentError struct {
	ArgumentName string
}

func (RequiredArgumentError) Error

func (_ RequiredArgumentError) Error() string

func (RequiredArgumentError) Translate

func (e RequiredArgumentError) Translate(translate func(string, ...interface{}) string) string

type SSLCertErrorError

type SSLCertErrorError struct {
	Message string
}

func (SSLCertErrorError) Error

func (_ SSLCertErrorError) Error() string

func (SSLCertErrorError) Translate

func (e SSLCertErrorError) Translate(translate func(string, ...interface{}) string) string

type ServiceInstanceNotFoundError

type ServiceInstanceNotFoundError struct {
	Name string
}

func (ServiceInstanceNotFoundError) Error

func (ServiceInstanceNotFoundError) Translate

func (e ServiceInstanceNotFoundError) Translate(translate func(string, ...interface{}) string) string

type SharedActor

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

type ThreeRequiredArgumentsError

type ThreeRequiredArgumentsError struct {
	ArgumentName1 string
	ArgumentName2 string
	ArgumentName3 string
}

func (ThreeRequiredArgumentsError) Error

func (ThreeRequiredArgumentsError) Translate

func (e ThreeRequiredArgumentsError) Translate(translate func(string, ...interface{}) string) string

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

type UnsupportedURLSchemeError

type UnsupportedURLSchemeError struct {
	UnsupportedURL string
}

func (UnsupportedURLSchemeError) Error

func (UnsupportedURLSchemeError) Translate

func (e UnsupportedURLSchemeError) Translate(translate func(string, ...interface{}) string) string

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.
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.
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