Skip to main content

Metadata

Struct Metadata 

Source
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: bool

True 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: bool

Whether 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: Runtime

How 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.

Trait Implementations§

Source§

impl Clone for Metadata

Source§

fn clone(&self) -> Metadata

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Metadata

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Metadata

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Metadata

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V