1pub mod abac;
11pub mod acme;
12pub mod app;
13pub mod bootstrap_types;
14pub mod core_settings;
15pub mod create_perm;
16pub mod dir_cache;
17pub mod dns;
18pub mod extensions;
19pub mod extract;
20pub mod file_access;
21pub mod log;
22pub mod middleware;
23pub mod prelude;
24pub mod profile_me_cache;
25pub mod profile_visibility;
26pub mod proxy_token_cache;
27pub mod rate_limit;
28pub mod request;
29pub mod roles;
30pub mod scheduler;
31pub mod settings;
32pub mod ws_broadcast;
33pub mod ws_bus;
34
35use std::net::IpAddr;
36use std::pin::Pin;
37
38pub use app::{App, AppBuilderOpts, AppState, ServerMode};
40pub use dir_cache::{DirCache, DirEntry};
41pub use extract::{Auth, IdTag, OptionalAuth};
42pub use middleware::{PermissionCheckFactory, PermissionCheckInput, PermissionCheckOutput};
43pub use profile_me_cache::ProfileMeCache;
44pub use profile_visibility::{CommunityRole, RequesterTier, SectionVisibility};
45pub use proxy_token_cache::ProxyTokenCache;
46pub use ws_broadcast::BroadcastManager;
47
48pub type ActionVerifyFn = Box<
52 dyn for<'a> Fn(
53 &'a app::App,
54 cloudillo_types::types::TnId,
55 &'a str,
56 Option<&'a IpAddr>,
57 ) -> Pin<
58 Box<
59 dyn Future<
60 Output = cloudillo_types::error::ClResult<
61 cloudillo_types::auth_adapter::ActionToken,
62 >,
63 > + Send
64 + 'a,
65 >,
66 > + Send
67 + Sync,
68>;
69
70pub type CreateCompleteTenantFn = Box<
74 dyn for<'a> Fn(
75 &'a app::App,
76 bootstrap_types::CreateCompleteTenantOptions<'a>,
77 ) -> Pin<
78 Box<
79 dyn Future<Output = cloudillo_types::error::ClResult<cloudillo_types::types::TnId>>
80 + Send
81 + 'a,
82 >,
83 > + Send
84 + Sync,
85>;
86
87pub type CreateActionFn = Box<
91 dyn for<'a> Fn(
92 &'a app::App,
93 cloudillo_types::types::TnId,
94 &'a str,
95 cloudillo_types::action_types::CreateAction,
96 ) -> Pin<
97 Box<dyn Future<Output = cloudillo_types::error::ClResult<Box<str>>> + Send + 'a>,
98 > + Send
99 + Sync,
100>;
101
102pub struct ScheduleEmailParams {
107 pub to: String,
108 pub template_name: String,
109 pub template_vars: serde_json::Value,
110 pub lang: Option<String>,
111 pub custom_key: Option<String>,
112 pub from_name_override: Option<String>,
113}
114
115pub type ScheduleEmailFn = Box<
119 dyn for<'a> Fn(
120 &'a app::App,
121 cloudillo_types::types::TnId,
122 ScheduleEmailParams,
123 ) -> Pin<
124 Box<dyn Future<Output = cloudillo_types::error::ClResult<()>> + Send + 'a>,
125 > + Send
126 + Sync,
127>;
128
129pub type OnFirstCertIssuedFn = Box<
142 dyn for<'a> Fn(
143 &'a app::App,
144 cloudillo_types::types::TnId,
145 &'a str,
146 ) -> Pin<
147 Box<dyn Future<Output = cloudillo_types::error::ClResult<()>> + Send + 'a>,
148 > + Send
149 + Sync,
150>;
151
152pub type EnsureProfileFn = Box<
156 dyn for<'a> Fn(
157 &'a app::App,
158 cloudillo_types::types::TnId,
159 &'a str,
160 ) -> Pin<
161 Box<dyn Future<Output = cloudillo_types::error::ClResult<bool>> + Send + 'a>,
162 > + Send
163 + Sync,
164>;
165
166pub fn register_settings(
167 registry: &mut settings::SettingsRegistry,
168) -> cloudillo_types::error::ClResult<()> {
169 core_settings::register_settings(registry)
170}
171
172