{"modulePath":"code.cloudfoundry.org/cli/v8","version":"v8.19.1","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package command\n\nPackage command should not be imported by external consumers. It was not designed for external use.\n\n## Constants\n\n```go\nconst ExperimentalWarning = \"This command is in EXPERIMENTAL stage and may change without notice\"\n```\n\n## Functions\n\n```go\nfunc CheckVersionOutdated(current string, minimum string) (bool, error)\n```\n\n```go\nfunc DisplayNotLoggedInText(binaryName string, ui UI)\n```\n\n```go\nfunc MinimumCCAPIVersionCheck(current string, minimum string, customCommand ...string) error\n```\n\n```go\nfunc MinimumUAAAPIVersionCheck(current string, minimum string, customCommand ...string) error\n```\n\n```go\nfunc WarnIfAPIVersionBelowSupportedMinimum(apiVersion string, ui UI) error\n```\n\n```go\nfunc WarnIfCLIVersionBelowAPIDefinedMinimum(config Config, apiVersion string, ui UI) error\n```\n\n## Types\n\n```go\ntype APIVersionTooHighError struct{}\n```\n\n```go\nfunc (a APIVersionTooHighError) Error() string\n```\n\n```go\ntype Config interface {\n\tAccessToken() string\n\tAddPlugin(configv3.Plugin)\n\tAddPluginRepository(name string, url string)\n\tAuthorizationEndpoint() string\n\tAPIVersion() string\n\tB3TraceID() string\n\tBinaryName() string\n\tBinaryVersion() string\n\tCFPassword() string\n\tCFUsername() string\n\tColorEnabled() configv3.ColorSetting\n\tCurrentUser() (configv3.User, error)\n\tCurrentUserName() (string, error)\n\tDialTimeout() time.Duration\n\tDockerPassword() string\n\tCNBCredentials() (map[string]interface{}, error)\n\tExperimental() bool\n\tGetPlugin(pluginName string) (configv3.Plugin, bool)\n\tGetPluginCaseInsensitive(pluginName string) (configv3.Plugin, bool)\n\tHasTargetedOrganization() bool\n\tHasTargetedSpace() bool\n\tIsTTY() bool\n\tLocale() string\n\tLogCacheEndpoint() string\n\tMinCLIVersion() string\n\tNOAARequestRetryCount() int\n\tNetworkPolicyV1Endpoint() string\n\tOverallPollingTimeout() time.Duration\n\tPluginHome() string\n\tPluginRepositories() []configv3.PluginRepository\n\tPlugins() []configv3.Plugin\n\tPollingInterval() time.Duration\n\tRefreshToken() string\n\tRemovePlugin(string)\n\tRequestRetryCount() int\n\tRoutingEndpoint() string\n\tSetAsyncTimeout(timeout int)\n\tSetAccessToken(token string)\n\tSetColorEnabled(enabled string)\n\tSetLocale(locale string)\n\tSetMinCLIVersion(version string)\n\tSetOrganizationInformation(guid string, name string)\n\tSetRefreshToken(token string)\n\tSetSpaceInformation(guid string, name string, allowSSH bool)\n\tV7SetSpaceInformation(guid string, name string)\n\tSetTargetInformation(args configv3.TargetInformationArgs)\n\tSetTokenInformation(accessToken string, refreshToken string, sshOAuthClient string)\n\tSetTrace(trace string)\n\tSetUAAClientCredentials(client string, clientSecret string)\n\tSetUAAEndpoint(uaaEndpoint string)\n\tSetUAAGrantType(uaaGrantType string)\n\tSkipSSLValidation() bool\n\tSSHOAuthClient() string\n\tStagingTimeout() time.Duration\n\tStartupTimeout() time.Duration\n\t// TODO: Rename to APITarget()\n\tTarget() string\n\tTargetedOrganization() configv3.Organization\n\tTargetedOrganizationName() string\n\tTargetedSpace() configv3.Space\n\tTerminalWidth() int\n\tUAADisableKeepAlives() bool\n\tUAAEndpoint() string\n\tUAAGrantType() string\n\tUAAOAuthClient() string\n\tUAAOAuthClientSecret() string\n\tUnsetOrganizationAndSpaceInformation()\n\tUnsetSpaceInformation()\n\tUnsetUserInformation()\n\tVerbose() (bool, []string)\n\tWritePluginConfig() error\n\tWriteConfig() error\n\tIsCFOnK8s() bool\n\tSetKubernetesAuthInfo(authInfo string)\n}\n```\nConfig a way of getting basic CF configuration\n\n```go\ntype ExtendedCommander interface {\n\tflags.Commander\n\tSetup(Config, UI) error\n}\n```\nExtendedCommander extends the go-flags Command interface by forcing a Setup function on all commands. This setup function should setup all command dependencies.\n\n```go\ntype SharedActor interface {\n\tIsLoggedIn() bool\n\tIsSpaceTargeted() bool\n\tIsOrgTargeted() bool\n\n\tCheckTarget(targetedOrganizationRequired bool, targetedSpaceRequired bool) error\n\tRequireCurrentUser() (string, error)\n\tRequireTargetedOrg() (string, error)\n}\n```\n\n```go\ntype UI interface {\n\tDeferText(template string, data ...map[string]interface{})\n\tDisplayBoolPrompt(defaultResponse bool, template string, templateValues ...map[string]interface{}) (bool, error)\n\tDisplayChangesForPush(changeSet []ui.Change) error\n\tDisplayDeprecationWarning()\n\tDisplayDiffAddition(line string, depth int, addHyphen bool)\n\tDisplayDiffRemoval(line string, depth int, addHyphen bool)\n\tDisplayDiffUnchanged(line string, depth int, addHyphen bool)\n\tDisplayError(err error)\n\tDisplayFileDeprecationWarning()\n\tDisplayHeader(text string)\n\tDisplayInstancesTableForApp(table [][]string)\n\tDisplayJSON(name string, jsonData interface{}) error\n\tDisplayKeyValueTable(prefix string, table [][]string, padding int)\n\tDisplayKeyValueTableForApp(table [][]string)\n\tDisplayLogMessage(message ui.LogMessage, displayHeader bool)\n\tDisplayNewline()\n\tDisplayNonWrappingTable(prefix string, table [][]string, padding int)\n\tDisplayOK()\n\tDisplayOptionalTextPrompt(defaultValue string, template string, templateValues ...map[string]interface{}) (string, error)\n\tDisplayPasswordPrompt(template string, templateValues ...map[string]interface{}) (string, error)\n\tDisplayTableWithHeader(prefix string, table [][]string, padding int)\n\tDisplayText(template string, data ...map[string]interface{})\n\tDisplayTextLiteral(text string)\n\tDisplayTextMenu(choices []string, promptTemplate string, templateValues ...map[string]interface{}) (string, error)\n\tDisplayTextPrompt(template string, templateValues ...map[string]interface{}) (string, error)\n\tDisplayTextWithBold(text string, keys ...map[string]interface{})\n\tDisplayTextWithFlavor(text string, keys ...map[string]interface{})\n\tDisplayWarning(formattedString string, keys ...map[string]interface{})\n\tDisplayWarnings(warnings []string)\n\tGetErr() io.Writer\n\tGetIn() io.Reader\n\tGetOut() io.Writer\n\tRequestLoggerFileWriter(filePaths []string) *ui.RequestLoggerFileWriter\n\tRequestLoggerTerminalDisplay() *ui.RequestLoggerTerminalDisplay\n\tTranslateText(template string, data ...map[string]interface{}) string\n\tUserFriendlyDate(input time.Time) string\n\tWriter() io.Writer\n}\n```\nUI is the interface to STDOUT, STDERR, and STDIN.\n\n","path":"code.cloudfoundry.org/cli/v8/command","name":"command","synopsis":"Package command should not be imported by external consumers.","isRedistributable":true}
