Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvGraphSource ¶ added in v0.1.19
EnvGraphSource exposes credentials/env config.env entries to ${env:NAME} / ${var:NAME} gate probes and interpolation. It does not read config.files or build a Store.
func New ¶
func New(cfg Config, deps EnvDeps) (credentials.Store, error)
New registers credentials/env: Resolve secrets from environment variables.
Best practices:
- Reference a secret as env:NAME from the consumer's apiKeyRef rather than inlining it in YAML.
- Use config.env for inline secrets in YAML; process environment still takes precedence.
- Use files for local development .env files; config env takes precedence over files.
- Dotenv files are loaded once into memory; run "env -u" to reload config.files after editing them.
Types ¶
type Config ¶
type Config struct {
// Prefix is prepended to every lookup key.
Prefix string `json:"prefix"`
// Env holds in-memory KEY=VALUE pairs from config, used after process environment misses.
Env map[string]string `json:"env"`
// Files are dotenv-style KEY=VALUE files used after context, process environment, and config env misses.
Files []string `json:"files"`
}
Click to show internal directories.
Click to hide internal directories.