pub struct Metadata {
pub registry: String,
pub url: Option<String>,
pub auth: Option<AuthKind>,
pub provides: Vec<Capability>,
pub backup_enabled: bool,
pub smtp_enabled: bool,
pub enabled_groups: Vec<String>,
pub selected_choices: BTreeMap<String, String>,
pub runtime: Runtime,
pub active_color: Option<Color>,
}Expand description
Per-install record persisted to ~/.local/share/services/<name>/metadata.toml.
Exposure isn’t stored — it’s derived from url at read time
(absent = Loopback, .internal = Internal, .ts.net = Tailscale,
otherwise Public). One source of truth for “where does this
service live.”
Fields§
§registry: String§url: Option<String>§auth: Option<AuthKind>Auth kind: oidc if --auth was used, otherwise absent.
provides: Vec<Capability>Capabilities the service provides — snapshotted from
service.toml at install time so crate::list_installed can
answer “is there an installed reverse proxy / OIDC provider /
SMTP relay / metrics scraper?” without re-reading the registry.
backup_enabled: boolTrue if --backup was passed at ryra add time. Drives
whether ryra backup run picks this install up.
Default false so an existing install (written by a ryra
version that pre-dates the backup feature) reads back as
not-enabled rather than as malformed.
smtp_enabled: boolWhether the user opted in to global-SMTP wiring for this install
(the --smtp flag at install time, or “yes” at the interactive
SMTP prompt). Stored as user intent, NOT as “SMTP is currently
being rendered” — the latter is gated additionally on
config.smtp.is_some() inside the planner. Decoupling lets
ryra configure remember the choice across re-renders even when
global SMTP isn’t configured yet.
Default true so installs that pre-date this field read back
as opt-in (matches the historical CLI shape: ryra add passed
enable_smtp = true unconditionally and let the planner gate).
enabled_groups: Vec<String>[[env_group]] bundles that were enabled at install time.
Persisted so ryra configure --disable <group> and re-renders
know which group members belong in the rendered .env. Default
empty for legacy installs (groups are an opt-in feature; an
empty list reads back as “no groups were toggled”).
selected_choices: BTreeMap<String, String>[[choice]] selections made at install time, as choice name -> option name. Persisted so re-renders and ryra configure know which
option’s members belong in the rendered .env. A map (one value per
choice) rather than a set, so “two options of one choice at once” is
unrepresentable. Default empty for legacy installs.
runtime: RuntimeHow this service runs: a podman container (default) or a native binary
under systemd –user. Recorded at install time so post-install commands
(remove, list, status, backup) stay runtime-aware from the install
record alone, never depending on the registry (which may drift or be
gone). Absent in legacy installs reads back as Podman.
active_color: Option<Color>deploy = "blue-green" installs only: which slot is currently live.
The next deploy rolls the new version onto active_color.other(),
health-checks it, swaps Caddy, then stops this one. Absent for
restart-strategy installs (the common case) and legacy metadata.