Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultFile ¶
func ReadConfig ¶
Types ¶
type Account ¶
type Account struct { Flexera *bool Host string ID int RefreshToken string `mapstructure:"refresh_token" yaml:"refresh_token"` }
func (*Account) AppHostAndIsFlexera ¶ added in v1.3.0
type ConfigViper ¶
var (
Config ConfigViper
)
func (*ConfigViper) GetAccount ¶
func (config *ConfigViper) GetAccount(id int, host string) (*Account, error)
func (*ConfigViper) SetAccount ¶
func (config *ConfigViper) SetAccount(name string, setDefault bool, input io.Reader, output io.Writer) error
Obtain input via STDIN then print out to config file Example of config file login:
default_account: acct1 accounts: acct1: id: 67972 host: us-3.rightscale.com refresh_token: abc123abc123abc123abc123abc123abc123abc1 acct2: id: 60073 host: us-4.rightscale.com refresh_token: zxy987zxy987zxy987zxy987xzy987zxy987xzy9
func (*ConfigViper) ShowConfiguration ¶
func (config *ConfigViper) ShowConfiguration(output io.Writer) error
Click to show internal directories.
Click to hide internal directories.