Skip to main content

Crate ryra_core

Crate ryra_core 

Source

Re-exports§

pub use capability::Capability;
pub use capability::any_installed_provider;
pub use capability::find_installed_provider;
pub use capability::installed_provides;
pub use capability::service_provides;
pub use configure::ConfigureChange;
pub use configure::ConfigureResult;
pub use configure::ExposureChange;
pub use configure::Overrides as ConfigureOverrides;
pub use configure::configure_service;
pub use exposure::Exposure;
pub use exposure::is_public_url;
pub use exposure::is_tailscale_url;
pub use generate::GeneratedFile;
pub use manifest::ManifestEntry;
pub use manifest::manifest_path;
pub use metadata::Metadata;
pub use metadata::load_metadata;
pub use paths::REGISTRY_BUNDLED;
pub use paths::metadata_path;
pub use paths::quadlet_dir;
pub use paths::service_data_root;
pub use paths::service_home;
pub use plan::AddResult;
pub use plan::RemoveResult;
pub use plan::ResetResult;
pub use plan::Step;
pub use plan::TrackedEnv;
pub use plan::Warning;
pub use upgrade::BackupSnapshot;
pub use upgrade::DEFAULT_BACKUP_KEEP;
pub use upgrade::DiffEntry;
pub use upgrade::DiffKind;
pub use upgrade::DiffResult;
pub use upgrade::EnvAddition;
pub use upgrade::RevertResult;
pub use upgrade::UpgradeResult;
pub use upgrade::diff_service;
pub use upgrade::list_backups;
pub use upgrade::prune_backups;
pub use upgrade::revert_service;
pub use upgrade::upgrade_service;
pub use well_known::WellKnownService;

Modules§

auth_bridge
Auth bridge: artifacts that let an auth-enabled service talk to Caddy+Authelia.
authelia
backup
Backup planning. Pure functions that take service install state + the user’s backup config and produce typed plans the CLI executes.
caddy
capability
Capabilities a service provides to other services.
config
configure
ryra configure <service> — re-plan an installed service with a caller-supplied set of Overrides applied on top of its current recorded state.
data
Per-service data enumeration for ryra list + the data-preserving variant of ryra remove.
error
exposure
How a service is exposed to clients. Decided once at install time (--url, --tailscale, the interactive prompt, or auto-derived) and threaded through the planner so every code path that needs to know “where does this service live?” pattern-matches a single typed value instead of juggling a parallel (Option<url>, bool) pair where some combinations were silently invalid (e.g. a *.ts.net URL with tailscale_enabled = false).
generate
manifest
Render manifest for an installed service. One per install, persisted to ~/.local/share/services/<svc>/service.manifest.
metadata
Per-install record. Written at ryra add time, read by every command that needs to know how a service was set up. Mirrors the data that used to live in # Service-* quadlet header comments.
paths
Filesystem paths ryra reads and writes.
plan
Typed steps the CLI executes, the warnings it surfaces, and the result shapes returned from add / remove / reset. Pattern matching ensures every step type is handled — no string parsing or if-chains.
registry
system
upgrade
Diff and upgrade flows for already-installed services.
well_known
Infrastructure services ryra knows about for cross-service integration (joining networks, configuring OIDC, setting up TLS).

Structs§

RecordPendingParams
Parameters for record_pending.
SearchResult
ServiceDetail
ServiceTestInfo

Enums§

PlanMode
Why the planner is running. The render path is shared between fresh installs and re-renders (ryra upgrade); the side-effect steps are not — re-registering an OIDC client on upgrade would mint a new client_id/client_secret against authelia’s existing entry, and patching every other installed service’s quadlet (retroactive network joins) is install-time work. The mode gates those.
RemoveMode
How destructive remove_service should be.

Functions§

add_service
Add a service: generate config, return steps to execute.
finalize_remove
Drop the cached [auth] block when the auth provider is removed — otherwise a later ryra add <svc> --auth thinks auth is still configured and skips the auto-install path, then bombs out trying to register an OIDC client against a non-existent authelia config. The function name is preserved for caller compatibility; quadlet removal is what actually finalises the install state.
finalize_reset
Called after reset steps succeed — removes ryra’s config directory.
is_service_installed
True if the named service is ryra-managed and fully installed — the marker’d .container is present AND metadata.toml exists. A partial install (quadlets written but the install plan errored before metadata.toml landed) is treated as not-installed so that ryra remove <svc> --purge routes through the orphan-cleanup path instead of failing with “service is not installed”. Same source of truth as list_installed.
list_installed
List installed services. Quadlet directory is the source of truth — every service whose main .container file carries our marker is reconstructed from its on-disk headers + .env. The preferences file is only consulted as a fallback for entries the scan can’t see (e.g. partially-rolled-out installs from older ryra versions before metadata headers landed).
orphan_purge_steps
quadlet_belongs_to
Check if a quadlet filename belongs to a service.
record_pending
Record a service as pending installation (installed: false). Called BEFORE executing steps so that partial failures are recoverable. Persist install-time scaffolding to preferences.toml. This is now the only side-effect — quadlet headers track the install itself, preferences just remembers cross-cutting defaults so the next ryra add --auth doesn’t have to re-prompt for the OIDC issuer.
remove_service
Remove a service: update state, return cleanup steps.
reset
Reset ryra: tear down all services, infrastructure, and config.
resolve_registry_dir
Resolve the registry directory for a service reference.
scan_managed_services
Scan the user’s quadlet directory for ryra-managed services. A .container file is considered ryra-managed iff it carries a # Service-Source: registry/<name> comment within its first 16 lines (added at install time). Returns the deduplicated set of service names found.
search_services
Search available services in a repo, optionally filtered by query.
service_info
Get detailed info about a service from a repo.
service_ref_from_installed
Build a ServiceRef from an installed service’s stored registry name.
service_tests
Get test definitions for an installed service by reading its test.toml.
status
Get the current status of the ryra installation. Considers ryra “initialized” when EITHER a marker’d quadlet is on disk OR a preferences.toml exists — quadlets are the source of truth for installed services, but a preferences-only state (e.g. an SMTP relay configured before any service install) still counts.