Documentation ¶
Index ¶
- Constants
- func GetConfigFilePath(profileName string) (string, error)
- func GetCurrentName() (string, error)
- func List() ([]string, error)
- func RemoveConfigFile(profileName string) error
- func SaveConfigFile(profileName string, val *ConfigFileValue) error
- func SetCurrentName(profileName string) error
- func ValidateProfileName(profileName string, invalidRunes ...rune) error
- type ConfigFileValue
Constants ¶
View Source
const DefaultProfileName = "default"
View Source
const ProfileDirEnv = "USACLOUD_PROFILE_DIR"
Variables ¶
This section is empty.
Functions ¶
func GetConfigFilePath ¶
func GetCurrentName ¶
func RemoveConfigFile ¶
func SaveConfigFile ¶
func SaveConfigFile(profileName string, val *ConfigFileValue) error
func SetCurrentName ¶
func ValidateProfileName ¶
Types ¶
type ConfigFileValue ¶
type ConfigFileValue struct { AccessToken string AccessTokenSecret string Zone string Timeout int `json:",omitempty"` AcceptLanguage string `json:",omitempty"` RetryMax int `json:",omitempty"` RetryIntervalSec int64 `json:",omitempty"` NoColor bool `json:",omitempty"` DefaultOutputType string `json:",omitempty"` Zones []string `json:",omitempty"` APIRootURL string `json:",omitempty"` }
func LoadConfigFile ¶
func LoadConfigFile(profileName string) (*ConfigFileValue, error)
func (*ConfigFileValue) IsEmpty ¶
func (p *ConfigFileValue) IsEmpty() bool
Click to show internal directories.
Click to hide internal directories.