Documentation
¶
Index ¶
- func DecodeAccessToken(accessToken string) (tokenJSON []byte, err error)
- type APIConfigRefresher
- type AuthPrompt
- type AuthPromptType
- type CCInfo
- type ConfigRepository
- func (c *ConfigRepository) APIEndpoint() string
- func (c *ConfigRepository) APIVersion() (apiVersion string)
- func (c *ConfigRepository) AccessToken() (accessToken string)
- func (c *ConfigRepository) AsyncTimeout() (timeout uint)
- func (c *ConfigRepository) AuthenticationEndpoint() (authEndpoint string)
- func (c *ConfigRepository) CLIVersion() string
- func (c *ConfigRepository) ClearSession()
- func (c *ConfigRepository) Close()
- func (c *ConfigRepository) ColorEnabled() (enabled string)
- func (c *ConfigRepository) DopplerEndpoint() (dopplerEndpoint string)
- func (c *ConfigRepository) HasAPIEndpoint() (hasEndpoint bool)
- func (c *ConfigRepository) HasOrganization() (hasOrg bool)
- func (c *ConfigRepository) HasSpace() (hasSpace bool)
- func (c *ConfigRepository) IsLoggedIn() (loggedIn bool)
- func (c *ConfigRepository) IsMinAPIVersion(requiredVersion semver.Version) bool
- func (c *ConfigRepository) IsMinCLIVersion(checkVersion string) bool
- func (c *ConfigRepository) IsSSLDisabled() (isSSLDisabled bool)
- func (c *ConfigRepository) Locale() (locale string)
- func (c *ConfigRepository) LogCacheEndpoint() (logCacheEndpoint string)
- func (c *ConfigRepository) MinCLIVersion() (minCLIVersion string)
- func (c *ConfigRepository) MinRecommendedCLIVersion() (minRecommendedCLIVersion string)
- func (c *ConfigRepository) OrganizationFields() (org models.OrganizationFields)
- func (c *ConfigRepository) PluginRepos() (repos []models.PluginRepo)
- func (c *ConfigRepository) RefreshToken() (refreshToken string)
- func (c *ConfigRepository) RoutingAPIEndpoint() (routingAPIEndpoint string)
- func (c *ConfigRepository) SSHOAuthClient() (clientID string)
- func (c *ConfigRepository) SetAPIEndpoint(endpoint string)
- func (c *ConfigRepository) SetAPIVersion(version string)
- func (c *ConfigRepository) SetAccessToken(token string)
- func (c *ConfigRepository) SetAsyncTimeout(timeout uint)
- func (c *ConfigRepository) SetAuthenticationEndpoint(endpoint string)
- func (c *ConfigRepository) SetCLIVersion(v string)
- func (c *ConfigRepository) SetColorEnabled(enabled string)
- func (c *ConfigRepository) SetDopplerEndpoint(endpoint string)
- func (c *ConfigRepository) SetLocale(locale string)
- func (c *ConfigRepository) SetLogCacheEndpoint(endpoint string)
- func (c *ConfigRepository) SetMinCLIVersion(version string)
- func (c *ConfigRepository) SetMinRecommendedCLIVersion(version string)
- func (c *ConfigRepository) SetOrganizationFields(org models.OrganizationFields)
- func (c *ConfigRepository) SetPluginRepo(repo models.PluginRepo)
- func (c *ConfigRepository) SetRefreshToken(token string)
- func (c *ConfigRepository) SetRoutingAPIEndpoint(routingAPIEndpoint string)
- func (c *ConfigRepository) SetSSHOAuthClient(clientID string)
- func (c *ConfigRepository) SetSSLDisabled(disabled bool)
- func (c *ConfigRepository) SetSpaceFields(space models.SpaceFields)
- func (c *ConfigRepository) SetTrace(value string)
- func (c *ConfigRepository) SetUAAGrantType(grantType string)
- func (c *ConfigRepository) SetUAAOAuthClient(clientID string)
- func (c *ConfigRepository) SetUAAOAuthClientSecret(clientID string)
- func (c *ConfigRepository) SetUaaEndpoint(uaaEndpoint string)
- func (c *ConfigRepository) SpaceFields() (space models.SpaceFields)
- func (c *ConfigRepository) Trace() (trace string)
- func (c *ConfigRepository) UAAGrantType() string
- func (c *ConfigRepository) UAAOAuthClient() (clientID string)
- func (c *ConfigRepository) UAAOAuthClientSecret() (clientID string)
- func (c *ConfigRepository) UaaEndpoint() (uaaEndpoint string)
- func (c *ConfigRepository) UnSetPluginRepo(index int)
- func (c *ConfigRepository) UserEmail() (email string)
- func (c *ConfigRepository) UserGUID() (guid string)
- func (c *ConfigRepository) Username() (name string)
- type Data
- type EndpointRepository
- type ReadWriter
- type Reader
- type Repository
- type TokenInfo
- type Warning
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeAccessToken ¶
Types ¶
type APIConfigRefresher ¶
type APIConfigRefresher struct {
EndpointRepo EndpointRepository
Config ReadWriter
Endpoint string
}
func (APIConfigRefresher) Refresh ¶
func (a APIConfigRefresher) Refresh() (Warning, error)
type AuthPrompt ¶
type AuthPrompt struct {
Type AuthPromptType
DisplayName string
}
type AuthPromptType ¶
type AuthPromptType string
const ( AuthPromptTypeText AuthPromptType = "TEXT" AuthPromptTypePassword AuthPromptType = "PASSWORD" )
type CCInfo ¶
type CCInfo struct {
APIVersion string `json:"api_version"`
AuthorizationEndpoint string `json:"authorization_endpoint"`
DopplerEndpoint string `json:"doppler_logging_endpoint"`
LogCacheEndpoint string `json:"log_cache_endpoint"`
MinCLIVersion string `json:"min_cli_version"`
MinRecommendedCLIVersion string `json:"min_recommended_cli_version"`
SSHOAuthClient string `json:"app_ssh_oauth_client"`
RoutingAPIEndpoint string `json:"routing_endpoint"`
}
type ConfigRepository ¶
type ConfigRepository struct {
CFCLIVersion string
// contains filtered or unexported fields
}
func (*ConfigRepository) APIEndpoint ¶
func (c *ConfigRepository) APIEndpoint() string
func (*ConfigRepository) APIVersion ¶
func (c *ConfigRepository) APIVersion() (apiVersion string)
func (*ConfigRepository) AccessToken ¶
func (c *ConfigRepository) AccessToken() (accessToken string)
func (*ConfigRepository) AsyncTimeout ¶
func (c *ConfigRepository) AsyncTimeout() (timeout uint)
func (*ConfigRepository) AuthenticationEndpoint ¶
func (c *ConfigRepository) AuthenticationEndpoint() (authEndpoint string)
func (*ConfigRepository) CLIVersion ¶
func (c *ConfigRepository) CLIVersion() string
func (*ConfigRepository) ClearSession ¶
func (c *ConfigRepository) ClearSession()
func (*ConfigRepository) Close ¶
func (c *ConfigRepository) Close()
func (*ConfigRepository) ColorEnabled ¶
func (c *ConfigRepository) ColorEnabled() (enabled string)
func (*ConfigRepository) DopplerEndpoint ¶
func (c *ConfigRepository) DopplerEndpoint() (dopplerEndpoint string)
func (*ConfigRepository) HasAPIEndpoint ¶
func (c *ConfigRepository) HasAPIEndpoint() (hasEndpoint bool)
func (*ConfigRepository) HasOrganization ¶
func (c *ConfigRepository) HasOrganization() (hasOrg bool)
func (*ConfigRepository) HasSpace ¶
func (c *ConfigRepository) HasSpace() (hasSpace bool)
func (*ConfigRepository) IsLoggedIn ¶
func (c *ConfigRepository) IsLoggedIn() (loggedIn bool)
func (*ConfigRepository) IsMinAPIVersion ¶
func (c *ConfigRepository) IsMinAPIVersion(requiredVersion semver.Version) bool
func (*ConfigRepository) IsMinCLIVersion ¶
func (c *ConfigRepository) IsMinCLIVersion(checkVersion string) bool
func (*ConfigRepository) IsSSLDisabled ¶
func (c *ConfigRepository) IsSSLDisabled() (isSSLDisabled bool)
func (*ConfigRepository) Locale ¶
func (c *ConfigRepository) Locale() (locale string)
func (*ConfigRepository) LogCacheEndpoint ¶
func (c *ConfigRepository) LogCacheEndpoint() (logCacheEndpoint string)
func (*ConfigRepository) MinCLIVersion ¶
func (c *ConfigRepository) MinCLIVersion() (minCLIVersion string)
func (*ConfigRepository) MinRecommendedCLIVersion ¶
func (c *ConfigRepository) MinRecommendedCLIVersion() (minRecommendedCLIVersion string)
func (*ConfigRepository) OrganizationFields ¶
func (c *ConfigRepository) OrganizationFields() (org models.OrganizationFields)
func (*ConfigRepository) PluginRepos ¶
func (c *ConfigRepository) PluginRepos() (repos []models.PluginRepo)
func (*ConfigRepository) RefreshToken ¶
func (c *ConfigRepository) RefreshToken() (refreshToken string)
func (*ConfigRepository) RoutingAPIEndpoint ¶
func (c *ConfigRepository) RoutingAPIEndpoint() (routingAPIEndpoint string)
func (*ConfigRepository) SSHOAuthClient ¶
func (c *ConfigRepository) SSHOAuthClient() (clientID string)
func (*ConfigRepository) SetAPIEndpoint ¶
func (c *ConfigRepository) SetAPIEndpoint(endpoint string)
func (*ConfigRepository) SetAPIVersion ¶
func (c *ConfigRepository) SetAPIVersion(version string)
func (*ConfigRepository) SetAccessToken ¶
func (c *ConfigRepository) SetAccessToken(token string)
func (*ConfigRepository) SetAsyncTimeout ¶
func (c *ConfigRepository) SetAsyncTimeout(timeout uint)
func (*ConfigRepository) SetAuthenticationEndpoint ¶
func (c *ConfigRepository) SetAuthenticationEndpoint(endpoint string)
func (*ConfigRepository) SetCLIVersion ¶
func (c *ConfigRepository) SetCLIVersion(v string)
SetCLIVersion should only be used in testing
func (*ConfigRepository) SetColorEnabled ¶
func (c *ConfigRepository) SetColorEnabled(enabled string)
func (*ConfigRepository) SetDopplerEndpoint ¶
func (c *ConfigRepository) SetDopplerEndpoint(endpoint string)
func (*ConfigRepository) SetLocale ¶
func (c *ConfigRepository) SetLocale(locale string)
func (*ConfigRepository) SetLogCacheEndpoint ¶
func (c *ConfigRepository) SetLogCacheEndpoint(endpoint string)
func (*ConfigRepository) SetMinCLIVersion ¶
func (c *ConfigRepository) SetMinCLIVersion(version string)
func (*ConfigRepository) SetMinRecommendedCLIVersion ¶
func (c *ConfigRepository) SetMinRecommendedCLIVersion(version string)
func (*ConfigRepository) SetOrganizationFields ¶
func (c *ConfigRepository) SetOrganizationFields(org models.OrganizationFields)
func (*ConfigRepository) SetPluginRepo ¶
func (c *ConfigRepository) SetPluginRepo(repo models.PluginRepo)
func (*ConfigRepository) SetRefreshToken ¶
func (c *ConfigRepository) SetRefreshToken(token string)
func (*ConfigRepository) SetRoutingAPIEndpoint ¶
func (c *ConfigRepository) SetRoutingAPIEndpoint(routingAPIEndpoint string)
func (*ConfigRepository) SetSSHOAuthClient ¶
func (c *ConfigRepository) SetSSHOAuthClient(clientID string)
func (*ConfigRepository) SetSSLDisabled ¶
func (c *ConfigRepository) SetSSLDisabled(disabled bool)
func (*ConfigRepository) SetSpaceFields ¶
func (c *ConfigRepository) SetSpaceFields(space models.SpaceFields)
func (*ConfigRepository) SetTrace ¶
func (c *ConfigRepository) SetTrace(value string)
func (*ConfigRepository) SetUAAGrantType ¶
func (c *ConfigRepository) SetUAAGrantType(grantType string)
func (*ConfigRepository) SetUAAOAuthClient ¶
func (c *ConfigRepository) SetUAAOAuthClient(clientID string)
func (*ConfigRepository) SetUAAOAuthClientSecret ¶
func (c *ConfigRepository) SetUAAOAuthClientSecret(clientID string)
func (*ConfigRepository) SetUaaEndpoint ¶
func (c *ConfigRepository) SetUaaEndpoint(uaaEndpoint string)
func (*ConfigRepository) SpaceFields ¶
func (c *ConfigRepository) SpaceFields() (space models.SpaceFields)
func (*ConfigRepository) Trace ¶
func (c *ConfigRepository) Trace() (trace string)
func (*ConfigRepository) UAAGrantType ¶
func (c *ConfigRepository) UAAGrantType() string
func (*ConfigRepository) UAAOAuthClient ¶
func (c *ConfigRepository) UAAOAuthClient() (clientID string)
func (*ConfigRepository) UAAOAuthClientSecret ¶
func (c *ConfigRepository) UAAOAuthClientSecret() (clientID string)
func (*ConfigRepository) UaaEndpoint ¶
func (c *ConfigRepository) UaaEndpoint() (uaaEndpoint string)
func (*ConfigRepository) UnSetPluginRepo ¶
func (c *ConfigRepository) UnSetPluginRepo(index int)
func (*ConfigRepository) UserEmail ¶
func (c *ConfigRepository) UserEmail() (email string)
func (*ConfigRepository) UserGUID ¶
func (c *ConfigRepository) UserGUID() (guid string)
func (*ConfigRepository) Username ¶
func (c *ConfigRepository) Username() (name string)
type Data ¶
type Data struct {
AccessToken string
APIVersion string
AsyncTimeout uint
AuthorizationEndpoint string
ColorEnabled string
ConfigVersion int
DopplerEndPoint string
Locale string
LogCacheEndPoint string
MinCLIVersion string
MinRecommendedCLIVersion string
OrganizationFields models.OrganizationFields
PluginRepos []models.PluginRepo
RefreshToken string
RoutingAPIEndpoint string
SpaceFields models.SpaceFields
SSHOAuthClient string
SSLDisabled bool
Target string
Trace string
UaaEndpoint string
UAAGrantType string
UAAOAuthClient string
UAAOAuthClientSecret string
}
func (*Data) JSONMarshalV3 ¶
func (*Data) JSONUnmarshalV3 ¶
type EndpointRepository ¶
type ReadWriter ¶
type ReadWriter interface {
Reader
ClearSession()
SetAccessToken(string)
SetAPIEndpoint(string)
SetAPIVersion(string)
SetAsyncTimeout(uint)
SetAuthenticationEndpoint(string)
SetCLIVersion(string)
SetColorEnabled(string)
SetDopplerEndpoint(string)
SetLogCacheEndpoint(string)
SetLocale(string)
SetMinCLIVersion(string)
SetMinRecommendedCLIVersion(string)
SetOrganizationFields(models.OrganizationFields)
SetPluginRepo(models.PluginRepo)
SetRefreshToken(string)
SetRoutingAPIEndpoint(string)
SetSpaceFields(models.SpaceFields)
SetSSHOAuthClient(string)
SetSSLDisabled(bool)
SetTrace(string)
SetUaaEndpoint(string)
SetUAAGrantType(string)
SetUAAOAuthClient(string)
SetUAAOAuthClientSecret(string)
UAAGrantType() string
UnSetPluginRepo(int)
}
type Reader ¶
type Reader interface {
APIEndpoint() string
APIVersion() string
HasAPIEndpoint() bool
AuthenticationEndpoint() string
DopplerEndpoint() string
LogCacheEndpoint() string
UaaEndpoint() string
RoutingAPIEndpoint() string
AccessToken() string
UAAOAuthClient() string
UAAOAuthClientSecret() string
SSHOAuthClient() string
RefreshToken() string
OrganizationFields() models.OrganizationFields
HasOrganization() bool
SpaceFields() models.SpaceFields
HasSpace() bool
Username() string
UserGUID() string
UserEmail() string
IsLoggedIn() bool
IsSSLDisabled() bool
IsMinAPIVersion(semver.Version) bool
IsMinCLIVersion(string) bool
MinCLIVersion() string
MinRecommendedCLIVersion() string
CLIVersion() string
AsyncTimeout() uint
Trace() string
ColorEnabled() string
Locale() string
PluginRepos() []models.PluginRepo
}
type Repository ¶
type Repository interface {
ReadWriter
Close()
}
func NewRepositoryFromFilepath ¶
func NewRepositoryFromFilepath(filepath string, errorHandler func(error)) Repository
func NewRepositoryFromPersistor ¶
func NewRepositoryFromPersistor(persistor configuration.Persistor, errorHandler func(error)) Repository
Source Files
¶
Click to show internal directories.
Click to hide internal directories.