List all gateways that have stored metadata. Scans `$XDG_CONFIG_HOME/openshell/gateways/` and the system registry under `/etc/openshell/gateways/` (or `OPENSHELL_SYSTEM_GATEWAY_DIR/gateways/` when set). Per-user entries shadow system entries on name collision.
()
| 381 | /// `/etc/openshell/gateways/` (or `OPENSHELL_SYSTEM_GATEWAY_DIR/gateways/` |
| 382 | /// when set). Per-user entries shadow system entries on name collision. |
| 383 | pub fn list_gateways() -> Result<Vec<GatewayMetadata>> { |
| 384 | Ok(list_gateways_with_source()? |
| 385 | .into_iter() |
| 386 | .map(|gateway| gateway.metadata) |
| 387 | .collect()) |
| 388 | } |
| 389 | |
| 390 | /// Remove the active gateway file (used when destroying the active gateway). |
| 391 | pub fn clear_active_gateway() -> Result<()> { |
no test coverage detected