config

package
v0.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

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)

type Profile

type Profile struct {
	Organization string          `json:"organization" yaml:"organization"`
	Project      string          `json:"project" yaml:"project"`
	Auth         auth.AuthConfig `json:"auth" yaml:"auth"`
	Scopes       []string        `json:"scopes" yaml:"scopes"`
}

func (*Profile) HasScope added in v0.3.0

func (p *Profile) HasScope(scope string) bool

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL