Skip to main content

cloudiful_redactor/
lib.rs

1mod detect;
2mod input;
3mod llm;
4mod redactor;
5mod replace;
6mod service;
7mod session;
8#[cfg(test)]
9mod tests;
10mod types;
11
12pub use input::InputKind;
13pub use llm::LlmConfig;
14pub use redactor::{Redactor, RedactorBuilder, SessionRedactor};
15pub use service::{
16    EncryptedRedactionArtifact, decrypt_redaction_session, redact_text_artifact,
17    redact_text_artifact_with_source, redact_text_artifact_with_source_and_stateful_session,
18    redact_text_artifact_with_stateful_session, redact_text_with_encrypted_session,
19    redact_text_with_encrypted_session_and_source, restore_text_from_encrypted_session,
20    restore_text_from_store,
21};
22pub use session::{
23    decrypt_session_from_str, encrypt_session_to_string, ensure_restore_valid,
24    inspect_encrypted_session, require_external_id, restore_patch_with_session,
25    restore_text_with_session, SessionStore, StoredSession,
26};
27use thiserror::Error;
28pub use types::{
29    AppliedReplacement, CustomFileRule, CustomStringMatch, CustomStringRule, CustomStringScope,
30    Finding, FindingKind, FindingSource, RedactionArtifact, RedactionPolicy, RedactionResult,
31    RedactionRules, RedactionSession, RedactionStats, ReplacementStrategy, RestorationEntry,
32    RestoreResult, SessionEntrySummary, SessionSummary,
33};
34
35#[derive(Debug, Error)]
36pub enum RedactorError {
37    #[error("llm error: {0}")]
38    Llm(String),
39    #[error("validation error: {0}")]
40    Validation(String),
41}