Documentation ¶
Overview ¶
Package command should not be imported by external consumers. It was not designed for external use.
Index ¶
- Constants
- func CheckTarget(config Config, targetedOrganizationRequired bool, targetedSpaceRequired bool) error
- func MinimumAPIVersionCheck(current string, minimum string) error
- func SanitizeJSON(raw []byte) (map[string]interface{}, error)
- type APINotFoundError
- type APIRequestError
- type ApplicationNotFoundError
- type Config
- type ExtendedCommander
- type InvalidSSLCertError
- type MinimumAPIVersionNotMetError
- type NoAPISetError
- type NoTargetedOrgError
- type NoTargetedSpaceError
- type NotLoggedInError
- type ParseArgumentError
- type RequestLoggerFileWriter
- func (display *RequestLoggerFileWriter) DisplayBody(_ []byte) error
- func (display *RequestLoggerFileWriter) DisplayHeader(name string, value string) error
- func (display *RequestLoggerFileWriter) DisplayHost(name string) error
- func (display *RequestLoggerFileWriter) DisplayJSONBody(body []byte) error
- func (display *RequestLoggerFileWriter) DisplayRequestHeader(method string, uri string, httpProtocol string) error
- func (display *RequestLoggerFileWriter) DisplayResponseHeader(httpProtocol string, status string) error
- func (display *RequestLoggerFileWriter) DisplayType(name string, requestDate time.Time) error
- func (display *RequestLoggerFileWriter) HandleInternalError(err error)
- func (display *RequestLoggerFileWriter) Start() error
- func (display *RequestLoggerFileWriter) Stop() error
- type RequestLoggerTerminalDisplay
- func (display *RequestLoggerTerminalDisplay) DisplayBody(_ []byte) error
- func (display *RequestLoggerTerminalDisplay) DisplayHeader(name string, value string) error
- func (display *RequestLoggerTerminalDisplay) DisplayHost(name string) error
- func (display *RequestLoggerTerminalDisplay) DisplayJSONBody(body []byte) error
- func (display *RequestLoggerTerminalDisplay) DisplayRequestHeader(method string, uri string, httpProtocol string) error
- func (display *RequestLoggerTerminalDisplay) DisplayResponseHeader(httpProtocol string, status string) error
- func (display *RequestLoggerTerminalDisplay) DisplayType(name string, requestDate time.Time) error
- func (display *RequestLoggerTerminalDisplay) HandleInternalError(err error)
- func (display *RequestLoggerTerminalDisplay) Start() error
- func (display *RequestLoggerTerminalDisplay) Stop() error
- type RequiredArgumentError
- type SSLCertErrorError
- type ServiceInstanceNotFoundError
- type UI
Constants ¶
View Source
const ExperimentalWarning = "This command is in EXPERIMENTAL stage and may change without notice"
View Source
const RedactedValue = "[PRIVATE DATA HIDDEN]"
Variables ¶
This section is empty.
Functions ¶
func CheckTarget ¶
func CheckTarget(config Config, targetedOrganizationRequired bool, targetedSpaceRequired bool) error
CheckTarget confirms that the user is logged in. Optionally it will also check if an organization and space are targeted.
func MinimumAPIVersionCheck ¶
func SanitizeJSON ¶
Types ¶
type APINotFoundError ¶
type APINotFoundError struct {
URL string
}
func (APINotFoundError) Error ¶
func (e APINotFoundError) Error() string
type APIRequestError ¶
type APIRequestError struct {
Err error
}
func (APIRequestError) Error ¶
func (e APIRequestError) Error() string
type ApplicationNotFoundError ¶
type ApplicationNotFoundError struct {
Name string
}
func (ApplicationNotFoundError) Error ¶
func (e ApplicationNotFoundError) Error() string
type Config ¶
type Config interface { APIVersion() string AccessToken() string BinaryName() string BinaryVersion() string ColorEnabled() configv3.ColorSetting CurrentUser() (configv3.User, error) DialTimeout() time.Duration Experimental() bool HasTargetedOrganization() bool HasTargetedSpace() bool Locale() string MinCLIVersion() string OverallPollingTimeout() time.Duration Plugins() map[string]configv3.Plugin PollingInterval() time.Duration RefreshToken() 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, loggregator string, minCLIVersion string, doppler string, uaa string, routing string, skipSSLValidation bool) SetTokenInformation(accessToken string, refreshToken string, sshOAuthClient string) SkipSSLValidation() bool Target() string TargetedOrganization() configv3.Organization TargetedSpace() configv3.Space UAAOAuthClient() string UAAOAuthClientSecret() string UnsetSpaceInformation() Verbose() (bool, []string) }
Config a way of getting basic CF configuration
type ExtendedCommander ¶
ExtendedCommander extends the go-flags Command interface by forcing a Setup function on all commands. This setup function should setup all command dependencies.
type InvalidSSLCertError ¶
type InvalidSSLCertError struct {
API string
}
func (InvalidSSLCertError) Error ¶
func (e InvalidSSLCertError) Error() string
type MinimumAPIVersionNotMetError ¶
func (MinimumAPIVersionNotMetError) Error ¶
func (e MinimumAPIVersionNotMetError) Error() string
type NoAPISetError ¶
type NoAPISetError struct {
BinaryName string
}
func (NoAPISetError) Error ¶
func (e NoAPISetError) Error() string
type NoTargetedOrgError ¶
type NoTargetedOrgError struct {
BinaryName string
}
func (NoTargetedOrgError) Error ¶
func (e NoTargetedOrgError) Error() string
type NoTargetedSpaceError ¶
type NoTargetedSpaceError struct {
BinaryName string
}
func (NoTargetedSpaceError) Error ¶
func (e NoTargetedSpaceError) Error() string
type NotLoggedInError ¶
type NotLoggedInError struct {
BinaryName string
}
func (NotLoggedInError) Error ¶
func (e NotLoggedInError) Error() string
type ParseArgumentError ¶
func (ParseArgumentError) Error ¶
func (e ParseArgumentError) Error() string
type RequestLoggerFileWriter ¶
type RequestLoggerFileWriter struct {
// contains filtered or unexported fields
}
func NewRequestLoggerFileWriter ¶
func NewRequestLoggerFileWriter(ui UI, filePaths []string) *RequestLoggerFileWriter
func (*RequestLoggerFileWriter) DisplayBody ¶
func (display *RequestLoggerFileWriter) DisplayBody(_ []byte) error
func (*RequestLoggerFileWriter) DisplayHeader ¶
func (display *RequestLoggerFileWriter) DisplayHeader(name string, value string) error
func (*RequestLoggerFileWriter) DisplayHost ¶
func (display *RequestLoggerFileWriter) DisplayHost(name string) error
func (*RequestLoggerFileWriter) DisplayJSONBody ¶
func (display *RequestLoggerFileWriter) DisplayJSONBody(body []byte) error
func (*RequestLoggerFileWriter) DisplayRequestHeader ¶
func (display *RequestLoggerFileWriter) DisplayRequestHeader(method string, uri string, httpProtocol string) error
func (*RequestLoggerFileWriter) DisplayResponseHeader ¶
func (display *RequestLoggerFileWriter) DisplayResponseHeader(httpProtocol string, status string) error
func (*RequestLoggerFileWriter) DisplayType ¶
func (display *RequestLoggerFileWriter) DisplayType(name string, requestDate time.Time) error
func (*RequestLoggerFileWriter) HandleInternalError ¶
func (display *RequestLoggerFileWriter) HandleInternalError(err error)
func (*RequestLoggerFileWriter) Start ¶
func (display *RequestLoggerFileWriter) Start() error
func (*RequestLoggerFileWriter) Stop ¶
func (display *RequestLoggerFileWriter) Stop() error
type RequestLoggerTerminalDisplay ¶
type RequestLoggerTerminalDisplay struct {
// contains filtered or unexported fields
}
func NewRequestLoggerTerminalDisplay ¶
func NewRequestLoggerTerminalDisplay(ui UI) *RequestLoggerTerminalDisplay
func (*RequestLoggerTerminalDisplay) DisplayBody ¶
func (display *RequestLoggerTerminalDisplay) DisplayBody(_ []byte) error
func (*RequestLoggerTerminalDisplay) DisplayHeader ¶
func (display *RequestLoggerTerminalDisplay) DisplayHeader(name string, value string) error
func (*RequestLoggerTerminalDisplay) DisplayHost ¶
func (display *RequestLoggerTerminalDisplay) DisplayHost(name string) error
func (*RequestLoggerTerminalDisplay) DisplayJSONBody ¶
func (display *RequestLoggerTerminalDisplay) DisplayJSONBody(body []byte) error
func (*RequestLoggerTerminalDisplay) DisplayRequestHeader ¶
func (display *RequestLoggerTerminalDisplay) DisplayRequestHeader(method string, uri string, httpProtocol string) error
func (*RequestLoggerTerminalDisplay) DisplayResponseHeader ¶
func (display *RequestLoggerTerminalDisplay) DisplayResponseHeader(httpProtocol string, status string) error
func (*RequestLoggerTerminalDisplay) DisplayType ¶
func (display *RequestLoggerTerminalDisplay) DisplayType(name string, requestDate time.Time) error
func (*RequestLoggerTerminalDisplay) HandleInternalError ¶
func (display *RequestLoggerTerminalDisplay) HandleInternalError(err error)
func (*RequestLoggerTerminalDisplay) Start ¶
func (display *RequestLoggerTerminalDisplay) Start() error
func (*RequestLoggerTerminalDisplay) Stop ¶
func (display *RequestLoggerTerminalDisplay) Stop() error
type RequiredArgumentError ¶
type RequiredArgumentError struct {
ArgumentName string
}
func (RequiredArgumentError) Error ¶
func (e RequiredArgumentError) Error() string
type SSLCertErrorError ¶
type SSLCertErrorError struct {
Message string
}
func (SSLCertErrorError) Error ¶
func (e SSLCertErrorError) Error() string
type ServiceInstanceNotFoundError ¶
type ServiceInstanceNotFoundError struct {
Name string
}
func (ServiceInstanceNotFoundError) Error ¶
func (e ServiceInstanceNotFoundError) Error() string
type UI ¶
type UI interface { DisplayBoolPrompt(prompt string, defaultResponse bool) (bool, error) DisplayError(err error) DisplayHeader(text string) DisplayNewline() DisplayOK() DisplayPair(attribute string, formattedString string, keys ...map[string]interface{}) DisplayTable(prefix string, table [][]string, padding int) error DisplayText(template string, data ...map[string]interface{}) DisplayTextWithFlavor(text string, keys ...map[string]interface{}) DisplayWarning(formattedString string, keys ...map[string]interface{}) DisplayWarnings(warnings []string) TranslateText(template string, data ...map[string]interface{}) string }
UI is the interface to STDOUT
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
Package common should not be imported by external consumers.
|
Package common should not be imported by external consumers. |
commonfakes
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
Package flag should not be imported by external consumers.
|
Package flag should not be imported by external consumers. |
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
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
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
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
Click to show internal directories.
Click to hide internal directories.