github.com/swisscom/cloudfoundry-cli@v7.1.0+incompatible/command/config.go (about) 1 package command 2 3 import ( 4 "time" 5 6 "code.cloudfoundry.org/cli/util/configv3" 7 ) 8 9 //go:generate counterfeiter . Config 10 11 // Config a way of getting basic CF configuration 12 type Config interface { 13 AccessToken() string 14 AddPlugin(configv3.Plugin) 15 AddPluginRepository(name string, url string) 16 APIVersion() string 17 BinaryName() string 18 BinaryVersion() string 19 CFPassword() string 20 CFUsername() string 21 ColorEnabled() configv3.ColorSetting 22 CurrentUser() (configv3.User, error) 23 CurrentUserName() (string, error) 24 DialTimeout() time.Duration 25 DockerPassword() string 26 Experimental() bool 27 GetPlugin(pluginName string) (configv3.Plugin, bool) 28 GetPluginCaseInsensitive(pluginName string) (configv3.Plugin, bool) 29 HasTargetedOrganization() bool 30 HasTargetedSpace() bool 31 IsTTY() bool 32 Locale() string 33 MinCLIVersion() string 34 NOAARequestRetryCount() int 35 OverallPollingTimeout() time.Duration 36 PluginHome() string 37 PluginRepositories() []configv3.PluginRepository 38 Plugins() []configv3.Plugin 39 PollingInterval() time.Duration 40 RefreshToken() string 41 RemovePlugin(string) 42 RequestRetryCount() int 43 RoutingEndpoint() string 44 SetAsyncTimeout(timeout int) 45 SetAccessToken(token string) 46 SetColorEnabled(enabled string) 47 SetLocale(locale string) 48 SetMinCLIVersion(version string) 49 SetOrganizationInformation(guid string, name string) 50 SetRefreshToken(token string) 51 SetSpaceInformation(guid string, name string, allowSSH bool) 52 V7SetSpaceInformation(guid string, name string) 53 SetTargetInformation(args configv3.TargetInformationArgs) 54 SetTokenInformation(accessToken string, refreshToken string, sshOAuthClient string) 55 SetTrace(trace string) 56 SetUAAClientCredentials(client string, clientSecret string) 57 SetUAAEndpoint(uaaEndpoint string) 58 SetUAAGrantType(uaaGrantType string) 59 SkipSSLValidation() bool 60 SSHOAuthClient() string 61 StagingTimeout() time.Duration 62 StartupTimeout() time.Duration 63 // TODO: Rename to APITarget() 64 Target() string 65 TargetedOrganization() configv3.Organization 66 TargetedOrganizationName() string 67 TargetedSpace() configv3.Space 68 TerminalWidth() int 69 UAADisableKeepAlives() bool 70 UAAGrantType() string 71 UAAOAuthClient() string 72 UAAOAuthClientSecret() string 73 UnsetOrganizationAndSpaceInformation() 74 UnsetSpaceInformation() 75 UnsetUserInformation() 76 Verbose() (bool, []string) 77 WritePluginConfig() error 78 WriteConfig() error 79 }