Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var (
ErrConfigKeyMissing = errors.New("config keys missing")
)
Functions ¶
func ResolveToken ¶
ResolveToken resolves a raw token string by expanding ${ENV_VAR} references with their corresponding environment variable values. If the fully expanded result is a path to an existing file, the token is read from that file (with leading/trailing whitespace trimmed). This standalone function is useful when callers need to resolve a token string that is not tied to a specific ProviderConfig instance.
Types ¶
type Config ¶
type Config struct {
Providers []ProviderConfig
}
Config holds the full application configuration loaded from a YAML file. Exported for use by autobump and autoupdate as the canonical configuration entity.
func NewConfig ¶
func NewConfig(providers []ProviderConfig) *Config
NewConfig creates a Config from a slice of provider configurations.
type ProviderConfig ¶
type ProviderConfig struct {
Type string `yaml:"type"` // "github", "gitlab", "azuredevops"
Token string `yaml:"token"` // inline, ${ENV_VAR}, or file path
Organizations []string `yaml:"organizations"` // org names or URLs to scan
}
ProviderConfig describes a single Git hosting provider instance.
func (*ProviderConfig) ResolveToken ¶
func (p *ProviderConfig) ResolveToken() string
ResolveToken expands ${ENV_VAR} references in the provider's token string and, if the result is a path to an existing file, reads the token from it. It delegates to the standalone ResolveToken function using p.Token as input.