[go: up one dir, main page]

Module config

Module config 

Source
Expand description

Global configuration and keystore utilities for cred. Handles ~/.config/cred/global.toml plus pluggable secret storage backends.

Structs§

CredMeta
Versioning information for the global config.
GlobalConfig
Root of the global configuration file.
Machine
Machine identity hints (optional).
Preferences
User-facing CLI preferences.
TargetConfig
Target-specific configuration (auth reference, default flag).

Functions§

config_get
Get a config value at a dotted path.
config_list
Dump the entire config as pretty TOML.
config_set
Set a config value at a dotted path, coercing primitive types.
config_unset
Remove a config value at a dotted path.
ensure_config_at
Ensure a config exists at the given directory, writing defaults on first run.
ensure_global_config_exists
Ensure the global config file exists (creating default if missing) and return its path.
get_target_token
Retrieve a target token from the configured keystore backend.
load
Load the typed global config, backfilling required fields if absent.
remove_target_token
Remove a target token reference and delete the stored secret if present.
set_target_token
Persist a target token reference in config and store the token via keystore backend.