chore: rename quicproquo → quicprochat in Rust workspace
Rename all crate directories, package names, binary names, proto package/module paths, ALPN strings, env var prefixes, config filenames, mDNS service names, and plugin ABI symbols from quicproquo/qpq to quicprochat/qpc.
This commit is contained in:
28
crates/quicprochat-server/src/domain/account.rs
Normal file
28
crates/quicprochat-server/src/domain/account.rs
Normal file
@@ -0,0 +1,28 @@
|
||||
//! Account domain logic — account deletion with KT tombstone.
|
||||
|
||||
use std::sync::{Arc, Mutex};
|
||||
|
||||
use quicprochat_kt::MerkleLog;
|
||||
|
||||
use crate::storage::Store;
|
||||
|
||||
use super::types::DomainError;
|
||||
|
||||
/// Domain service for account lifecycle operations.
|
||||
pub struct AccountService {
|
||||
pub store: Arc<dyn Store>,
|
||||
pub kt_log: Arc<Mutex<MerkleLog>>,
|
||||
}
|
||||
|
||||
impl AccountService {
|
||||
pub fn delete_account(&self, caller_identity_key: &[u8]) -> Result<(), DomainError> {
|
||||
self.store.delete_account(caller_identity_key)?;
|
||||
|
||||
// Append a KT tombstone entry so the deletion is auditable.
|
||||
if let Ok(mut log) = self.kt_log.lock() {
|
||||
log.append("__tombstone__", caller_identity_key);
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user