Expand description
secrets.json: the values a config refers to and never carries.
A key holds one value per environment, so production and staging
differ without two config files. A {{secret:NAME}} reference resolves
through SecretView, which reads the sheep’s own environment and then
ALL_ENVIRONMENTS, never another named environment.
Same on-disk shape as crate::kv: a read-modify-rename under a
crate::file_lock on a sibling secrets.json.lock.
Structs§
- Provider
Cache - What provider dogs have pushed: the values, and which
(namespace, environment)pairs carry a push at all. - Secret
Ref - One
{{secret:...}}reference: a key, and the namespace it came from. - Secret
View - What one environment can see: the operator’s store plus every provider dog’s, resolved against a single environment name.
Enums§
- Resolution
- The outcome of resolving one
SecretRef. - Secret
Error - Error type returned by this module.
Constants§
- ALL_
ENVIRONMENTS - The environment name that covers every environment.
- MAX_
KEY_ BYTES - Longest key, namespace or environment name this store accepts, in bytes.
- MAX_
VALUE_ BYTES - Longest value this store accepts, in bytes.
- PROVIDER_
CACHE_ VERSION - The
secrets-cache.jsonformat version this build reads and writes. - SECRETS_
VERSION - The on-disk format’s version.
Functions§
- all
- Every key in the store with its per-environment values, in key order.
- get
- The value stored under
keyfor exactlyenvironment, if there is one. - is_name
- The grammar shared by keys, namespaces and environment names.
- namespaces_
of - The provider namespaces
referencesnames, derived withSecretRef::parseand kept to the namespaced half. - provider_
cache_ on_ disk - The provider cache as
secrets-cache.jsoncurrently holds it on disk, or nothing when the file is missing, will not parse, or is a version this build does not understand. - references
- Every
{{secret:...}}referenceconfignames, exactly as the operator wrote it (KEYornamespace/KEY, no braces), deduplicated. - set
- Stores
valueunderkeyforenvironment, replacing any previous value in that slot and leaving every other environment alone. - unset
- Removes
key’s value forenvironment, returning whether it was there.
Type Aliases§
- Namespace
Values namespace -> key -> environment -> value, every provider dog’s pushed values.- Pushed
Pairs namespace -> environments, the pairs a provider dog has actually pushed for.