Expand description
Routing and rendering. Public so it can be tested without a socket. Vault HTTP API routing and response rendering, KV version 2 only.
Pure functions: a method and path in, a Route out; a model’s structured answer in, the
JSON envelope the vault CLI’s Go client decodes out. What the CLI needs that is not a
secret — the mount preflight that tells it the engine is KV v2, seal status, health, the
envelope’s request_id / lease_* / wrap_info fields — is NetGet’s. The secrets, key
listings and versions are the model’s.
Structs§
- Vault
Identity - Identity for the static
sys/endpoints.
Enums§
- Route
- What a request resolves to.
Constants§
- MAX_
LIST_ KEYS - Largest number of keys one
send_vault_listmay carry.
Functions§
- envelope
- The response envelope every secret-engine answer is wrapped in.
- errors_
body - Vault’s error body:
{"errors": [...]}. - health
- leader
- mount_
preflight /v1/sys/internal/ui/mounts/<path>for a path under a configured mount: what makes the CLI switch to KV v2 paths (<mount>/data/…,<mount>/metadata/…).- preflight_
mount - Which mount (if any) a preflight path falls under.
- render_
error - The status and errors of a
send_vault_error. - render_
list LIST <mount>/metadata/<path>body. Keys are names, not paths: a folder ends in/, and a key containing a/anywhere else would claim a nesting the listing does not have.- render_
metadata GET <mount>/metadata/<path>body — built from the same answer as a read.- render_
secret GET <mount>/data/<path>body.- render_
write_ ok PUT <mount>/data/<path>body.- request_
id - A request id in UUID form. Unique per response; it identifies nothing.
- resolve
- Resolve a request.
pathis the URL path;list_queryis whetherlist=truewas given. - seal_
status