kanidm/kanidmd/idm/src/lib.rs

102 lines
3 KiB
Rust
Raw Normal View History

2021-06-02 01:42:40 +02:00
//! The Kanidmd server library. This implements all of the internal components of the server
//! which is used to process authentication, store identities and enforce access controls.
#![deny(warnings)]
2022-07-07 05:28:36 +02:00
#![recursion_limit = "512"]
#![warn(unused_extern_crates)]
#![deny(clippy::todo)]
#![deny(clippy::unimplemented)]
#![deny(clippy::unwrap_used)]
#![deny(clippy::expect_used)]
#![deny(clippy::panic)]
#![deny(clippy::unreachable)]
#![deny(clippy::await_holding_lock)]
#![deny(clippy::needless_pass_by_value)]
#![deny(clippy::trivially_copy_pass_by_ref)]
#[cfg(all(jemallocator, test, not(target_family = "windows")))]
2021-02-10 06:08:22 +01:00
#[global_allocator]
static ALLOC: jemallocator::Jemalloc = jemallocator::Jemalloc;
#[macro_use]
extern crate rusqlite;
2021-12-17 04:54:13 +01:00
#[macro_use]
extern crate tracing;
#[macro_use]
extern crate lazy_static;
2022-08-09 05:07:06 +02:00
// #[macro_use]
// extern crate sketching;
// This has to be before 'be' so the import order works
#[macro_use]
pub mod macros;
pub mod crypto;
pub mod utils;
#[macro_use]
pub mod audit;
pub mod be;
pub mod constants;
pub mod credential;
pub mod entry;
pub mod event;
pub mod filter;
2021-05-26 08:11:00 +02:00
pub mod identity;
pub mod interval;
pub mod ldap;
mod modify;
pub mod value;
pub mod valueset;
#[macro_use]
mod plugins;
mod access;
pub mod actors;
pub mod idm;
mod repl;
pub mod schema;
pub mod server;
pub mod status;
pub mod config;
2021-04-25 03:35:02 +02:00
/// A prelude of imports that should be imported by all other Kanidm modules to
2021-06-02 01:42:40 +02:00
/// help make imports cleaner.
2021-04-25 03:35:02 +02:00
pub mod prelude {
2021-05-26 08:11:00 +02:00
pub use crate::utils::duration_from_epoch_now;
2021-04-25 03:35:02 +02:00
pub use kanidm_proto::v1::OperationError;
pub use smartstring::alias::String as AttrString;
pub use url::Url;
2021-04-25 03:35:02 +02:00
pub use uuid::Uuid;
pub use crate::constants::*;
pub use crate::filter::{
f_and, f_andnot, f_eq, f_id, f_inc, f_lt, f_or, f_pres, f_self, f_spn_name, f_sub,
};
pub use crate::filter::{Filter, FilterInvalid, FC};
pub use crate::modify::{m_pres, m_purge, m_remove};
pub use crate::modify::{Modify, ModifyInvalid, ModifyList};
2021-04-25 03:35:02 +02:00
pub use crate::entry::{
Entry, EntryCommitted, EntryInit, EntryInvalid, EntryInvalidCommitted, EntryNew,
EntryReduced, EntrySealed, EntrySealedCommitted, EntryTuple, EntryValid,
};
2021-05-26 08:11:00 +02:00
pub use crate::identity::Identity;
2021-04-25 03:35:02 +02:00
pub use crate::server::{
QueryServer, QueryServerReadTransaction, QueryServerTransaction,
QueryServerWriteTransaction,
};
pub use crate::value::{IndexType, PartialValue, SyntaxType, Value};
pub use crate::valueset::{
ValueSet, ValueSetBool, ValueSetCid, ValueSetIndex, ValueSetIutf8, ValueSetRefer,
ValueSetSecret, ValueSetSpn, ValueSetSyntax, ValueSetT, ValueSetUint32, ValueSetUtf8,
ValueSetUuid,
};
2022-08-09 05:07:06 +02:00
pub use sketching::{
admin_debug, admin_error, admin_info, admin_warn, filter_error, filter_info, filter_trace,
filter_warn, perf_trace, request_error, request_info, request_trace, request_warn,
2022-08-09 05:07:06 +02:00
security_access, security_critical, security_error, security_info, spanned, tagged_event,
EventTag,
};
2021-04-25 03:35:02 +02:00
}