1#![deny(clippy::unwrap_used, clippy::expect_used, clippy::panic)]
8#![forbid(unsafe_code)]
9
10pub mod abac;
11pub mod acme;
12pub mod app;
13pub mod bootstrap_types;
14pub mod core_settings;
15pub mod create_perm;
16pub mod dns;
17pub mod extensions;
18pub mod extract;
19pub mod file_access;
20pub mod middleware;
21pub mod prelude;
22pub mod rate_limit;
23pub mod request;
24pub mod roles;
25pub mod scheduler;
26pub mod settings;
27pub mod ws_broadcast;
28pub mod ws_bus;
29
30use std::future::Future;
31use std::net::IpAddr;
32use std::pin::Pin;
33
34pub use app::{App, AppBuilderOpts, AppState, ServerMode};
36pub use extract::{Auth, IdTag, OptionalAuth};
37pub use middleware::{PermissionCheckFactory, PermissionCheckInput, PermissionCheckOutput};
38pub use ws_broadcast::BroadcastManager;
39
40pub type ActionVerifyFn = Box<
44 dyn for<'a> Fn(
45 &'a app::App,
46 cloudillo_types::types::TnId,
47 &'a str,
48 Option<&'a IpAddr>,
49 ) -> Pin<
50 Box<
51 dyn Future<
52 Output = cloudillo_types::error::ClResult<
53 cloudillo_types::auth_adapter::ActionToken,
54 >,
55 > + Send
56 + 'a,
57 >,
58 > + Send
59 + Sync,
60>;
61
62pub type CreateCompleteTenantFn = Box<
66 dyn for<'a> Fn(
67 &'a app::App,
68 bootstrap_types::CreateCompleteTenantOptions<'a>,
69 ) -> Pin<
70 Box<
71 dyn Future<Output = cloudillo_types::error::ClResult<cloudillo_types::types::TnId>>
72 + Send
73 + 'a,
74 >,
75 > + Send
76 + Sync,
77>;
78
79pub type CreateActionFn = Box<
83 dyn for<'a> Fn(
84 &'a app::App,
85 cloudillo_types::types::TnId,
86 &'a str,
87 cloudillo_types::action_types::CreateAction,
88 ) -> Pin<
89 Box<dyn Future<Output = cloudillo_types::error::ClResult<Box<str>>> + Send + 'a>,
90 > + Send
91 + Sync,
92>;
93
94pub type EnsureProfileFn = Box<
98 dyn for<'a> Fn(
99 &'a app::App,
100 cloudillo_types::types::TnId,
101 &'a str,
102 ) -> Pin<
103 Box<dyn Future<Output = cloudillo_types::error::ClResult<bool>> + Send + 'a>,
104 > + Send
105 + Sync,
106>;
107
108pub fn register_settings(
109 registry: &mut settings::SettingsRegistry,
110) -> cloudillo_types::error::ClResult<()> {
111 core_settings::register_settings(registry)
112}
113
114