Documentation
¶
Overview ¶
Package mcporter wraps the mcporter tool with a pre-exec preflight that resolves `${VAR}` references in `~/.mcporter/mcporter.json` against a
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
ConfigPath returns the resolved mcporter config path. Honors the `MCPORTER_CONFIG` env override; otherwise falls back to the well-known
func ResolveAll ¶
func ResolveAll(r SecretResolver, names []string) (map[string]string, error)
ResolveAll fans out one Resolve call per name and collects results into a name->value map. Returns the first error encountered, naming
func ScanConfig ¶
ScanConfig reads the JSON file at path and returns every `${NAME}` reference found in string values, deduplicated and sorted. A missing
Types ¶
type ResolverFunc ¶
ResolverFunc adapts a plain function to the SecretResolver interface. Useful for tests and for one-off in-process resolvers that don't need
type SecretResolver ¶
SecretResolver resolves one env-var name (e.g. "COILYSIREN_TAILNET_DOMAIN") to its plaintext value. Implementations decide how to map the name to a
func WithTTLCache ¶
func WithTTLCache(inner SecretResolver, ttl time.Duration, persistPath string) SecretResolver
WithTTLCache wraps inner with an on-disk TTL cache persisted to a single JSON file at persistPath. Cache shape: