Documentation
¶
Index ¶
- Constants
- func GetConfigDir() string
- func GetDefaultConfigPath() string
- type Config
- type ConfigLoader
- func (c *ConfigLoader) Get(key string) interface{}
- func (c *ConfigLoader) GetActiveProfile() *Profile
- func (c *ConfigLoader) GetActiveProfileName() string
- func (c *ConfigLoader) GetActiveProfileWithOverrides() *Profile
- func (c *ConfigLoader) GetAuth() *auth.AuthConfig
- func (c *ConfigLoader) GetConfig() Config
- func (c *ConfigLoader) GetEnvOverridesInfo() map[string]map[string]string
- func (c *ConfigLoader) GetOrganization() string
- func (c *ConfigLoader) GetProfileNames() []string
- func (c *ConfigLoader) GetProject() string
- func (c *ConfigLoader) IsEnvOverridden(key string) bool
- func (c *ConfigLoader) Load() (Config, error)
- func (c *ConfigLoader) Save() error
- func (c *ConfigLoader) Set(key string, value interface{})
- func (c *ConfigLoader) SetActiveProfile(profileName string)
- func (c *ConfigLoader) SetProfile(name string, profile Profile)
- type Profile
Constants ¶
View Source
const ( DefaultConfigVersion = 1 DefaultProfileName = "default" DefaultConfigDirName = ".azure-devops-cli" DefaultConfigFileName = "config.yaml" )
Variables ¶
This section is empty.
Functions ¶
func GetConfigDir ¶
func GetConfigDir() string
func GetDefaultConfigPath ¶
func GetDefaultConfigPath() string
Types ¶
type Config ¶
type Config struct {
Version int `json:"version" yaml:"version"`
ActiveProfile string `json:"activeProfile" yaml:"activeProfile"`
Profiles map[string]Profile `json:"profiles" yaml:"profiles"`
}
func DefaultConfig ¶
func DefaultConfig() Config
type ConfigLoader ¶
type ConfigLoader struct {
// contains filtered or unexported fields
}
func NewConfigLoader ¶
func NewConfigLoader(configPath string) *ConfigLoader
func (*ConfigLoader) Get ¶
func (c *ConfigLoader) Get(key string) interface{}
func (*ConfigLoader) GetActiveProfile ¶
func (c *ConfigLoader) GetActiveProfile() *Profile
func (*ConfigLoader) GetActiveProfileName ¶
func (c *ConfigLoader) GetActiveProfileName() string
func (*ConfigLoader) GetActiveProfileWithOverrides ¶
func (c *ConfigLoader) GetActiveProfileWithOverrides() *Profile
func (*ConfigLoader) GetAuth ¶
func (c *ConfigLoader) GetAuth() *auth.AuthConfig
func (*ConfigLoader) GetConfig ¶
func (c *ConfigLoader) GetConfig() Config
func (*ConfigLoader) GetEnvOverridesInfo ¶
func (c *ConfigLoader) GetEnvOverridesInfo() map[string]map[string]string
func (*ConfigLoader) GetOrganization ¶
func (c *ConfigLoader) GetOrganization() string
func (*ConfigLoader) GetProfileNames ¶
func (c *ConfigLoader) GetProfileNames() []string
func (*ConfigLoader) GetProject ¶
func (c *ConfigLoader) GetProject() string
func (*ConfigLoader) IsEnvOverridden ¶
func (c *ConfigLoader) IsEnvOverridden(key string) bool
func (*ConfigLoader) Load ¶
func (c *ConfigLoader) Load() (Config, error)
func (*ConfigLoader) Save ¶
func (c *ConfigLoader) Save() error
func (*ConfigLoader) Set ¶
func (c *ConfigLoader) Set(key string, value interface{})
func (*ConfigLoader) SetActiveProfile ¶
func (c *ConfigLoader) SetActiveProfile(profileName string)
func (*ConfigLoader) SetProfile ¶
func (c *ConfigLoader) SetProfile(name string, profile Profile)
Click to show internal directories.
Click to hide internal directories.