Skip to main content

Crate cloudillo_core

Crate cloudillo_core 

Source
Expand description

Core infrastructure for the Cloudillo platform.

This crate contains shared infrastructure modules that are used by the server crate and potentially by future feature crates. Extracting these into a separate crate enables better build parallelism and clearer module boundaries.

Re-exports§

pub use app::App;
pub use app::AppBuilderOpts;
pub use app::AppState;
pub use app::ServerMode;
pub use dir_cache::DirCache;
pub use dir_cache::DirEntry;
pub use extract::Auth;
pub use extract::OptionalAuth;
pub use middleware::PermissionCheckFactory;
pub use middleware::PermissionCheckInput;
pub use middleware::PermissionCheckOutput;
pub use profile_me_cache::ProfileMeCache;
pub use profile_visibility::CommunityRole;
pub use profile_visibility::RequesterTier;
pub use profile_visibility::SectionVisibility;
pub use proxy_token_cache::ProxyTokenCache;
pub use ws_broadcast::BroadcastManager;

Modules§

abac
Attribute-Based Access Control (ABAC) system for Cloudillo
acme
ACME subsystem. Handles automatic certificate management using Let’s Encrypt.
app
App state type
bootstrap_types
Bootstrap-related types shared between server and feature crates.
bundled_apps
The document formats this build ships, read once out of the frontend bundle.
core_settings
Core server settings registration
create_perm
Collection-level permission middleware for ABAC (CREATE operations)
dir_cache
Shared LRU cache of folder metadata (parent id, name, is_folder) used to resolve withParent / withPath listing options and bounded parent-chain walks without recursive SQL. The cache holds folder rows only.
dns
DNS resolver module with true recursive resolution from root nameservers
doc_format
Resolving a document format: the tenant’s row, or the bundle’s default.
extensions
Type-erased extension map for AppState
extract
Custom extractors for Cloudillo-specific data
file_access
File access level helpers
log
Custom tracing event formatter and request-id capture layer.
maintenance
Nightly metadata-database maintenance.
middleware
Custom middlewares
prelude
profile_me_cache
In-memory cache for the GET /api/me content-derived ETag.
profile_visibility
Per-section profile visibility filtering.
proxy_token_cache
Shared LRU cache for federated access tokens.
rate_limit
Rate Limiting System
request
Request client implementation
roles
Role hierarchy and expansion logic
scheduler
Scheduler subsystem. Handles async tasks, dependencies, fallbacks, repetitions, persistence..
scope
Central, fail-closed scope enforcement for scoped credentials.
settings
Settings subsystem types and service
share_access
Who may read and who may change a file’s share set.
ws_broadcast
WebSocket User Messaging
ws_bus
WebSocket Bus Handler - Direct user messaging

Structs§

IdTag
Identity tag extracted from request extensions (set by auth middleware).
ScheduleEmailParams
Parameters passed to a ScheduleEmailFn invocation. Mirrors cloudillo_email::EmailTaskParams but lives in core so the ACME renewal task (and other core-side tasks) can schedule emails without a cyclic dependency on the email crate.

Functions§

register_settings
search_index_action
search_index_object for an action.
search_index_document
Ask for one document’s deep 'D' index rows to be rebuilt; a no-op when the search subsystem is not wired in. The counterpart of search_index_file, which covers the file’s own row.
search_index_file
search_index_object for a file.
search_index_object
Ask for one object’s whole-object index row to be rebuilt. Prefer the three typed wrappers below.
search_index_profile
search_index_object for a profile.

Type Aliases§

ActionSearchRulesFn
Type-erased lookup of an action type’s search manifest, resolved through the DSL engine (TYPE:SUB first, then TYPE). Registered by the server’s app module.
ActionVerifyFn
Type-erased function for verifying action tokens. Registered as an extension by the server’s action module. Used by auth module for the token exchange flow.
CreateActionFn
Type-erased function for creating an action. Registered as an extension by the server’s action module. Used by profile crate for community CONN creation.
CreateCompleteTenantFn
Type-erased function for creating a complete tenant (bootstrap). Registered as an extension by the server’s bootstrap module. Used by profile crate for registration and community creation.
EnsureProfileFn
Type-erased function for ensuring a remote profile exists locally. Registered as an extension by the server’s app module. Used by action hooks for profile sync.
OnFirstCertIssuedFn
Type-erased function invoked once the very first ACME certificate for a tenant has been successfully issued. Registered by the profile crate so it can flush deferred work (e.g. queueing a welcome email that requires HTTPS to be usable). Called from acme::handle_renewal_success only when the renewal row’s pre-renewal expires_at was None.
ScheduleEmailFn
Type-erased function for scheduling a templated email via the scheduler. Registered as an extension by the server’s app module (delegates to cloudillo_email::EmailModule::schedule_email_task).
SearchIndexFn
Type-erased hook asking for a document to be (re)indexed for full-text search. Registered as an extension by the server’s app module (delegates to cloudillo_search::indexer::schedule).
SearchObjectFn
Type-erased hook asking for one whole object — a file, a profile, an action — to be re-indexed. The counterpart of SearchIndexFn, which covers the deep parts of a document.