config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package config provides configuration file support for the Idsec CLI.

It loads a YAML configuration file that sets default values for IDSEC_* environment variables. Environment variables already set in the process take precedence over config file values.

Index

Constants

View Source
const (

	// ConfigFileEnvVar is the environment variable that overrides the default config file path.
	ConfigFileEnvVar = "IDSEC_CONFIG_FILE"
)

Variables

This section is empty.

Functions

func ExtractConfigFlag

func ExtractConfigFlag() string

ExtractConfigFlag scans os.Args for a --config flag value before Cobra parses the command line, so the config file can be loaded early in startup.

func LoadConfigFile

func LoadConfigFile(path string)

LoadConfigFile reads the YAML config file and sets environment variables for recognized keys that are not already present in the environment. Accepted keys are any key starting with IDSEC_, plus the standard proxy variables HTTP_PROXY, HTTPS_PROXY, and NO_PROXY (and their lowercase forms). A missing file is silently ignored. Parse errors or unrecognized keys produce warnings but do not cause the CLI to fail.

func ResolveConfigFilePath

func ResolveConfigFilePath(flagValue string) string

ResolveConfigFilePath determines the configuration file path using the following precedence: CLI flag value, IDSEC_CONFIG_FILE env var, default path.

Types

This section is empty.

Jump to

Keyboard shortcuts

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