Documentation ¶
Index ¶
- func PrettyJSON(data string) string
- type Auth
- type Config
- func (c *Config) AddContext(context Context) error
- func (c *Config) ExistsConfig(name string) bool
- func (c *Config) GetContext(name string) (*Context, error)
- func (c *Config) GetCurrentContext() (*Context, error)
- func (c *Config) LoadConfig(path string) error
- func (c *Config) UpdateContext(name string, auth Auth, domain string)
- func (c *Config) Validate(name string) bool
- func (c *Config) WriteConfig(path string) error
- type Context
- type Token
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Auth ¶
Auth contains username and password (decoded)
func (*Auth) Decode ¶
func (a *Auth) Decode()
Decode will decode Encoded to Username and Password strings.
func (*Auth) PromptPassword ¶
func (a *Auth) PromptPassword()
PromptPassword get password from command prompt
type Config ¶
Config contains details on all config settings.
func (*Config) AddContext ¶
AddContext adds new context to config.
func (*Config) ExistsConfig ¶
ExistsConfig reports whether the config file exists.
func (*Config) GetContext ¶
GetContext returns the named context.
func (*Config) GetCurrentContext ¶
GetCurrentContext returns the current context.
func (*Config) LoadConfig ¶
LoadConfig to load yaml config from file.
func (*Config) UpdateContext ¶
UpdateContext apply updates to named context.
func (*Config) WriteConfig ¶
WriteConfig to write any changed config back to file.
Click to show internal directories.
Click to hide internal directories.