Skip to main content

Module settings

Module settings 

Source
Expand description

Cloud client builders for the hm cloud verbs.

Config and credentials are owned by the shared hm_config crate:

  • layered config (user ~/.config/hm/config.toml + project .hm/config.toml + HM_* env) supplies the API base (cloud.api_url) and the active org (cloud.org);
  • bearer tokens live in hm_config::creds, keyed by API base, with HM_API_TOKEN taking precedence.

This module only assembles an SDK client from that config; it does not own any config or credential storage of its own.

Structs§

RenderPrefs
Render preferences for cloud commands that stream through hm-render.
ResolvedCtx
Resolved cloud context for the hm cloud verbs.

Functions§

anon_client
An anonymous client (for the login flow) + the resolved API base.
client
An authenticated cloud client built from the layered config + stored token.
map_raw
Map a raw generated-client error into an anyhow error with a readable message. The raw Error<E> renders the server’s error body (status, headers, decoded value) via its Display impl, which holds for any E: Debug — true of the generated types::Error body.