forked from cloudfoundry/cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.go
73 lines (69 loc) · 2.22 KB
/
config.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package command
import (
"time"
"code.cloudfoundry.org/cli/util/configv3"
)
//go:generate counterfeiter . Config
// Config a way of getting basic CF configuration
type Config interface {
AccessToken() string
AddPlugin(configv3.Plugin)
AddPluginRepository(name string, url string)
APIVersion() string
BinaryName() string
BinaryVersion() string
CFPassword() string
CFUsername() string
ColorEnabled() configv3.ColorSetting
CurrentUser() (configv3.User, error)
CurrentUserName() (string, 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
NOAARequestRetryCount() int
OverallPollingTimeout() time.Duration
PluginHome() string
PluginRepositories() []configv3.PluginRepository
Plugins() []configv3.Plugin
PollingInterval() time.Duration
RefreshToken() string
RemovePlugin(string)
RequestRetryCount() int
RoutingEndpoint() string
SetAccessToken(token string)
SetMinCLIVersion(version string)
SetOrganizationInformation(guid string, name string)
SetRefreshToken(token string)
SetSpaceInformation(guid string, name string, allowSSH bool)
V7SetSpaceInformation(guid string, name string)
SetTargetInformation(api string, apiVersion string, auth string, minCLIVersion string, doppler string, routing string, skipSSLValidation bool)
SetTokenInformation(accessToken string, refreshToken string, sshOAuthClient string)
SetUAAClientCredentials(client string, clientSecret string)
SetUAAEndpoint(uaaEndpoint string)
SetUAAGrantType(uaaGrantType string)
SkipSSLValidation() bool
SSHOAuthClient() string
StagingTimeout() time.Duration
StartupTimeout() time.Duration
// TODO: Rename to APITarget()
Target() string
TargetedOrganization() configv3.Organization
TargetedOrganizationName() string
TargetedSpace() configv3.Space
UAADisableKeepAlives() bool
UAAGrantType() string
UAAOAuthClient() string
UAAOAuthClientSecret() string
UnsetOrganizationAndSpaceInformation()
UnsetSpaceInformation()
UnsetUserInformation()
Verbose() (bool, []string)
WritePluginConfig() error
WriteConfig() error
}