Documentation
¶
Index ¶
- func NewCoreConfigFromPath(cfConfigPath string, bxConfigPath string, errHandler func(error)) configRepository
- func NewCoreConfigFromPersistor(cfPersistor configuration.Persistor, bxPersistor configuration.Persistor, ...) configRepository
- type AccountsInfo
- type BXConfigData
- type CFConfigData
- type IAMTokenInfo
- type ReadWriter
- type Reader
- type UAATokenInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCoreConfigFromPath ¶
func NewCoreConfigFromPersistor ¶
func NewCoreConfigFromPersistor(cfPersistor configuration.Persistor, bxPersistor configuration.Persistor, errHandler func(error)) configRepository
Types ¶
type AccountsInfo ¶
type BXConfigData ¶
type BXConfigData struct {
ConsoleEndpoint string
Region string
RegionID string
RegionType string
IAMEndpoint string
IAMID string
IAMToken string
IAMRefreshToken string
Account models.Account
ResourceGroup models.ResourceGroup
PluginRepos []models.PluginRepo
Locale string
Trace string
ColorEnabled string
HTTPTimeout int
CLIInfoEndpoint string
CheckCLIVersionDisabled bool
UsageStatsDisabled bool
// contains filtered or unexported fields
}
func NewBXConfigData ¶
func NewBXConfigData() *BXConfigData
func (*BXConfigData) Marshal ¶
func (data *BXConfigData) Marshal() ([]byte, error)
func (*BXConfigData) Unmarshal ¶
func (data *BXConfigData) Unmarshal(bytes []byte) error
type CFConfigData ¶
type CFConfigData struct {
ConfigVersion int
Target string
APIVersion string
AuthorizationEndpoint string
LoggregatorEndpoint string
DopplerEndpoint string
UaaEndpoint string
RoutingAPIEndpoint string
AccessToken string
RefreshToken string
UAAOAuthClient string
UAAOAuthClientSecret string
SSHOAuthClient string
OrganizationFields models.OrganizationFields
SpaceFields models.SpaceFields
SSLDisabled bool
AsyncTimeout uint
Trace string
ColorEnabled string
Locale string
PluginRepos []models.PluginRepo
MinCLIVersion string
MinRecommendedCLIVersion string
// contains filtered or unexported fields
}
func NewCFConfigData ¶
func NewCFConfigData() *CFConfigData
func (*CFConfigData) Marshal ¶
func (data *CFConfigData) Marshal() ([]byte, error)
func (*CFConfigData) Unmarshal ¶
func (data *CFConfigData) Unmarshal(bytes []byte) error
type IAMTokenInfo ¶
type IAMTokenInfo struct {
IAMID string `json:"iam_id"`
UserEmail string `json:"email"`
Accounts AccountsInfo `json:"account"`
}
func NewIAMTokenInfo ¶
func NewIAMTokenInfo(token string) IAMTokenInfo
type ReadWriter ¶
type ReadWriter interface {
Reader
// cf config
SetAPIVersion(string)
SetAPIEndpoint(string)
SetAuthenticationEndpoint(string)
SetLoggregatorEndpoint(string)
SetDopplerEndpoint(string)
SetUAAEndpoint(string)
SetRoutingAPIEndpoint(string)
SetSSHOAuthClient(string)
SetMinCFCLIVersion(string)
SetMinRecommendedCFCLIVersion(string)
SetUAAToken(string)
SetUAARefreshToken(string)
SetOrganizationFields(models.OrganizationFields)
SetSpaceFields(models.SpaceFields)
SetSSLDisabled(bool)
SetLocale(string)
SetTrace(string)
SetColorEnabled(string)
// bx config
SetConsoleEndpoint(string)
SetRegion(models.Region)
SetAccount(models.Account)
SetIAMEndpoint(string)
SetIAMToken(string)
SetIAMRefreshToken(string)
SetResourceGroup(models.ResourceGroup)
SetCheckCLIVersionDisabled(bool)
SetCLIInfoEndpoint(string)
SetPluginRepo(models.PluginRepo)
UnSetPluginRepo(string)
SetHTTPTimeout(int)
SetUsageStatsDisabled(bool)
ClearAPIInfo()
ClearSession()
}
func NewCoreConfig ¶
func NewCoreConfig(errHandler func(error)) ReadWriter
type Reader ¶ added in v0.6.3
type Reader interface {
// CF config
APIVersion() string
APIEndpoint() string
HasAPIEndpoint() bool
AuthenticationEndpoint() string
UAAEndpoint() string
LoggregatorEndpoint() string
DopplerEndpoint() string
RoutingAPIEndpoint() string
SSHOAuthClient() string
MinCFCLIVersion() string
MinRecommendedCFCLIVersion() string
Username() string
UserGUID() string
UserEmail() string
IsLoggedIn() bool
UAAToken() string
UAARefreshToken() string
OrganizationFields() models.OrganizationFields
HasOrganization() bool
SpaceFields() models.SpaceFields
HasSpace() bool
IsSSLDisabled() bool
Locale() string
Trace() string
ColorEnabled() string
// bx config
ConsoleEndpoint() string
Region() models.Region
CloudName() string
CloudType() string
IAMEndpoint() string
IAMID() string
IAMToken() string
IAMRefreshToken() string
Account() models.Account
HasAccount() bool
IMSAccountID() string
ResourceGroup() models.ResourceGroup
HasResourceGroup() bool
PluginRepos() []models.PluginRepo
PluginRepo(string) (models.PluginRepo, bool)
HTTPTimeout() int
CLIInfoEndpoint() string
CheckCLIVersionDisabled() bool
UsageStatsDisabled() bool
}
type UAATokenInfo ¶
type UAATokenInfo struct {
Username string `json:"user_name"`
Email string `json:"email"`
UserGUID string `json:"user_id"`
}
func NewUAATokenInfo ¶
func NewUAATokenInfo(token string) UAATokenInfo
Click to show internal directories.
Click to hide internal directories.