Documentation
¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
func ConfigPath() string
func RemoveConfig ¶
func RemoveConfig() error
func WriteConfig ¶
Types ¶
type Config ¶
type Config struct {
Verbose bool
ZoneSubdomain string
Targets map[string]Target
ActiveTargetName string
}
func NewConfigWithServerURL ¶
func ReadConfig ¶
func ReadConfig() Config
func (*Config) AddContext ¶
func (c *Config) AddContext(newContext UaaContext)
func (Config) GetActiveContext ¶
func (c Config) GetActiveContext() UaaContext
func (Config) GetActiveTarget ¶
type Target ¶
type Target struct {
BaseUrl string
SkipSSLValidation bool
Contexts map[string]UaaContext
ActiveContextName string
}
func (Target) GetActiveContext ¶
func (t Target) GetActiveContext() UaaContext
type UaaContext ¶
type UaaContext struct {
ClientId string `json:"client_id"`
GrantType GrantType `json:"grant_type"`
Username string `json:"username"`
Token oauth2.Token
}
func NewContextWithToken ¶
func NewContextWithToken(accessToken string) UaaContext
Click to show internal directories.
Click to hide internal directories.