Skip to main content

cloudillo_action/
lib.rs

1//! Action subsystem. Actions are small signed documents representing a user action (e.g. post, comment, connection request).
2
3#![allow(dead_code)]
4#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
5#![forbid(unsafe_code)]
6
7pub(crate) mod audience;
8pub mod delivery;
9pub mod dsl;
10pub mod filter;
11pub mod forward;
12pub mod handler;
13pub(crate) mod helpers;
14pub mod hooks;
15pub(crate) mod key_cache;
16pub mod native_hooks;
17pub mod perm;
18pub(crate) mod post_store;
19mod process;
20pub mod settings;
21pub mod task;
22
23mod prelude;
24
25pub use cloudillo_types::action_types::status;
26pub use key_cache::KeyFetchCache;
27
28pub use process::verify_action_token;
29
30use crate::prelude::*;
31
32pub fn register_settings(
33	registry: &mut cloudillo_core::settings::SettingsRegistry,
34) -> ClResult<()> {
35	settings::register_settings(registry)
36}
37
38pub fn init(app: &App) -> ClResult<()> {
39	app.scheduler.register::<task::ActionCreatorTask>()?;
40	app.scheduler.register::<task::ActionVerifierTask>()?;
41	app.scheduler.register::<delivery::ActionDeliveryTask>()?;
42
43	// Register native hooks (must be called after app is fully initialized)
44	// This is done asynchronously during bootstrap
45	Ok(())
46}
47
48// vim: ts=4