Documentation
¶
Overview ¶
Package core_config provides functions to load core configuration. The package is for internal only.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountsInfo ¶
type BXConfigData ¶
type BXConfigData struct {
APIEndpoint string
ConsoleEndpoint string
CloudType string
CloudName string
Region string
RegionID string
IAMEndpoint string
IAMToken string
IAMRefreshToken string
Account models.Account
ResourceGroup models.ResourceGroup
CFEETargeted bool
CFEEEnvID string
PluginRepos []models.PluginRepo
SSLDisabled bool
Locale string
Trace string
ColorEnabled string
HTTPTimeout int
CLIInfoEndpoint string
CheckCLIVersionDisabled bool
UsageStatsDisabled bool
SDKVersion string
UpdateCheckInterval time.Duration
UpdateRetryCheckInterval time.Duration
UpdateNotificationInterval time.Duration
// 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 CFConfig ¶
type CFConfig interface {
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
CurrentOrganization() models.OrganizationFields
HasTargetedOrganization() bool
CurrentSpace() models.SpaceFields
HasTargetedSpace() bool
UnsetAPI()
SetAPIVersion(string)
SetAPIEndpoint(string)
SetAuthenticationEndpoint(string)
SetLoggregatorEndpoint(string)
SetDopplerEndpoint(string)
SetUAAEndpoint(string)
SetRoutingAPIEndpoint(string)
SetSSHOAuthClient(string)
SetMinCFCLIVersion(string)
SetMinRecommendedCFCLIVersion(string)
SetUAAToken(string)
SetUAARefreshToken(string)
SetOrganization(models.OrganizationFields)
SetSpace(models.SpaceFields)
ClearSession()
}
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"`
ID string `json:"id"`
RealmID string `json:"realmid"`
Identifier string `json:"identifier"`
Firstname string `json:"given_name"`
Lastname string `json:"family_name"`
Fullname string `json:"name"`
UserEmail string `json:"email"`
Accounts AccountsInfo `json:"account"`
Subject string `json:"sub"`
SubjectType string `json:"sub_type"`
Expiray jsonTime `json:"exp"`
Issuer string `json:"iss"`
GrantType string `json:"grant_type"`
Scope string `json:"scope"`
}
func NewIAMTokenInfo ¶
func NewIAMTokenInfo(token string) IAMTokenInfo
type ReadWriter ¶
type ReadWriter interface {
Repository
}
Deprecated
func NewCoreConfig ¶
func NewCoreConfig(errHandler func(error)) ReadWriter
func NewCoreConfigFromPath ¶
func NewCoreConfigFromPath(cfConfigPath string, bxConfigPath string, errHandler func(error)) ReadWriter
func NewCoreConfigFromPersistor ¶
func NewCoreConfigFromPersistor(cfPersistor configuration.Persistor, bxPersistor configuration.Persistor, errHandler func(error)) ReadWriter
type Repository ¶
type Repository interface {
APIEndpoint() string
HasAPIEndpoint() bool
ConsoleEndpoint() string
IAMEndpoint() string
CloudName() string
CloudType() string
CurrentRegion() models.Region
HasTargetedRegion() bool
IAMToken() string
IAMRefreshToken() string
IsLoggedIn() bool
UserEmail() string
IAMID() string
CurrentAccount() models.Account
HasTargetedAccount() bool
IMSAccountID() string
CurrentResourceGroup() models.ResourceGroup
HasTargetedResourceGroup() bool
PluginRepos() []models.PluginRepo
PluginRepo(string) (models.PluginRepo, bool)
IsSSLDisabled() bool
HTTPTimeout() int
CLIInfoEndpoint() string
CheckCLIVersionDisabled() bool
UpdateCheckInterval() time.Duration
UpdateRetryCheckInterval() time.Duration
UpdateNotificationInterval() time.Duration
UsageStatsDisabled() bool
Locale() string
Trace() string
ColorEnabled() string
SDKVersion() string
UnsetAPI()
SetAPIEndpoint(string)
SetConsoleEndpoint(string)
SetIAMEndpoint(string)
SetCloudType(string)
SetCloudName(string)
SetRegion(models.Region)
SetIAMToken(string)
SetIAMRefreshToken(string)
ClearSession()
SetAccount(models.Account)
SetResourceGroup(models.ResourceGroup)
SetCheckCLIVersionDisabled(bool)
SetCLIInfoEndpoint(string)
SetPluginRepo(models.PluginRepo)
UnsetPluginRepo(string)
SetSSLDisabled(bool)
SetHTTPTimeout(int)
SetUsageStatsDisabled(bool)
SetUpdateCheckInterval(time.Duration)
SetUpdateRetryCheckInterval(time.Duration)
SetUpdateNotificationInterval(time.Duration)
SetLocale(string)
SetTrace(string)
SetColorEnabled(string)
CFConfig() CFConfig
HasTargetedCF() bool
HasTargetedCFEE() bool
HasTargetedPublicCF() bool
SetCFEETargeted(bool)
CFEEEnvID() string
SetCFEEEnvID(string)
}
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.