1pub 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 log;
21pub mod middleware;
22pub mod prelude;
23pub mod profile_visibility;
24pub mod proxy_token_cache;
25pub mod rate_limit;
26pub mod request;
27pub mod roles;
28pub mod scheduler;
29pub mod settings;
30pub mod ws_broadcast;
31pub mod ws_bus;
32
33use std::net::IpAddr;
34use std::pin::Pin;
35
36pub use app::{App, AppBuilderOpts, AppState, ServerMode};
38pub use extract::{Auth, IdTag, OptionalAuth};
39pub use middleware::{PermissionCheckFactory, PermissionCheckInput, PermissionCheckOutput};
40pub use profile_visibility::{CommunityRole, RequesterTier, SectionVisibility};
41pub use proxy_token_cache::ProxyTokenCache;
42pub use ws_broadcast::BroadcastManager;
43
44pub type ActionVerifyFn = Box<
48 dyn for<'a> Fn(
49 &'a app::App,
50 cloudillo_types::types::TnId,
51 &'a str,
52 Option<&'a IpAddr>,
53 ) -> Pin<
54 Box<
55 dyn Future<
56 Output = cloudillo_types::error::ClResult<
57 cloudillo_types::auth_adapter::ActionToken,
58 >,
59 > + Send
60 + 'a,
61 >,
62 > + Send
63 + Sync,
64>;
65
66pub type CreateCompleteTenantFn = Box<
70 dyn for<'a> Fn(
71 &'a app::App,
72 bootstrap_types::CreateCompleteTenantOptions<'a>,
73 ) -> Pin<
74 Box<
75 dyn Future<Output = cloudillo_types::error::ClResult<cloudillo_types::types::TnId>>
76 + Send
77 + 'a,
78 >,
79 > + Send
80 + Sync,
81>;
82
83pub type CreateActionFn = Box<
87 dyn for<'a> Fn(
88 &'a app::App,
89 cloudillo_types::types::TnId,
90 &'a str,
91 cloudillo_types::action_types::CreateAction,
92 ) -> Pin<
93 Box<dyn Future<Output = cloudillo_types::error::ClResult<Box<str>>> + Send + 'a>,
94 > + Send
95 + Sync,
96>;
97
98pub struct ScheduleEmailParams {
103 pub to: String,
104 pub template_name: String,
105 pub template_vars: serde_json::Value,
106 pub lang: Option<String>,
107 pub custom_key: Option<String>,
108 pub from_name_override: Option<String>,
109}
110
111pub type ScheduleEmailFn = Box<
115 dyn for<'a> Fn(
116 &'a app::App,
117 cloudillo_types::types::TnId,
118 ScheduleEmailParams,
119 ) -> Pin<
120 Box<dyn Future<Output = cloudillo_types::error::ClResult<()>> + Send + 'a>,
121 > + Send
122 + Sync,
123>;
124
125pub type OnFirstCertIssuedFn = Box<
138 dyn for<'a> Fn(
139 &'a app::App,
140 cloudillo_types::types::TnId,
141 &'a str,
142 ) -> Pin<
143 Box<dyn Future<Output = cloudillo_types::error::ClResult<()>> + Send + 'a>,
144 > + Send
145 + Sync,
146>;
147
148pub type EnsureProfileFn = Box<
152 dyn for<'a> Fn(
153 &'a app::App,
154 cloudillo_types::types::TnId,
155 &'a str,
156 ) -> Pin<
157 Box<dyn Future<Output = cloudillo_types::error::ClResult<bool>> + Send + 'a>,
158 > + Send
159 + Sync,
160>;
161
162pub fn register_settings(
163 registry: &mut settings::SettingsRegistry,
164) -> cloudillo_types::error::ClResult<()> {
165 core_settings::register_settings(registry)
166}
167
168