Skip to main content

mkit_server/takedown/
mod.rs

1//! Lean denial and durable takedown intents; adapters control activation.
2pub mod acquisition;
3mod admin;
4mod closure;
5mod copy;
6pub mod denial;
7pub(crate) mod directory;
8pub mod discovery;
9mod intent;
10pub mod inventory;
11pub mod late;
12pub mod late_owner;
13mod local;
14pub mod work;
15pub use local::LocalStore;
16mod publication;
17pub(crate) mod source;
18#[cfg(test)]
19mod tests;
20pub use intent::{Record, Service};
21pub use publication::PublicationConfig;
22
23/// Default-off native activation. The Paid Workers launch separately enables
24/// the completed lean catalog through its validated takedown configuration.
25pub const ACTIVATED: bool = false;
26
27/// Configured namespace roots; an open policy has no exhaustive configured set.
28#[must_use]
29pub fn configured_namespaces(addressing: &crate::Addressing) -> Vec<crate::NamespaceKey> {
30    match addressing {
31        crate::Addressing::Single { repo } => vec![repo.namespace.clone()],
32        crate::Addressing::Multi(multi) => match &multi.namespace_policy {
33            crate::policy::NamespacePolicy::Allowlist(namespaces) => namespaces
34                .iter()
35                .map(crate::NamespaceKey::from_namespace)
36                .collect(),
37            crate::policy::NamespacePolicy::Any { .. } => Vec::new(),
38        },
39    }
40}