Expand description
Read-only integrity checks over the database.
A check walks the columns it cares about and yields a finding for every defect it sees, writing nothing. A finding describes the database as it stands, so a check run after a repair sees that repairβs work. The migrations are a caller like any other: they consume these streams and write what a finding calls for, re-deciding anything a write may have changed.
Re-exportsΒ§
use std::collections::BTreeMap;πuse std::fmt::Display;πuse futures::FutureExt;πuse futures::Stream;πuse futures::StreamExt;πuse futures::TryFutureExt;πuse futures::future::BoxFuture;πuse futures::stream::unfold;πuse ruma::OwnedRoomId;πuse ruma::RoomId;πuse ruma::api::error::ErrorKind;πuse serde::Deserialize;πuse serde::Deserialize;πuse tuwunel_core::Err;πuse tuwunel_core::Error;πuse tuwunel_core::Result;πuse tuwunel_core::implement;πuse tuwunel_core::utils::TryReadyExt;πuse tuwunel_database::SEP;πpub(crate) use self::scan::ScanExt;πuse crate::Services;π
ModulesΒ§
- account_
status - Account states a foreign database keeps outside the password column.
- columns
- email_
bindings - Email bindings a foreign database keeps in a column of its own.
- forbidden_
names - Existing names the configuration forbids.
- joined_
members - Joined members against their roomsβ current state.
- media_
files - The files of
mediaid_filerows in the media directory. - mediaid_
user - The rows of
mediaid_user. - moderation
- Suspensions and locks a foreign database records.
- pdu_
room_ ids - The
room_idof stored events. - readreceiptid_
readreceipt - Leftover rows in
readreceiptid_readreceipt. - redactions
- Redactions a foreign database applied without recording them.
- referencedevents
- relatesto_
typed - The relation index
relatesto_typed. - roomid_
tscount_ pducount - The timestamp index
roomid_tscount_pducount. - roomuserid_
joined - The keys of
roomuserid_joined. - scan π
- schema
- short_
ids π - Short event and state key ids, and the residue their damage leaves.
- thread_
summaries - The thread summaries stored on thread roots.
- threadrootid_
latestcount - The thread pointers in
threadrootid_latestcount. - token_
expiry - Access-token expiries a foreign database keeps in a column of its own.
- userid_
password - Hashed sentinels in
userid_password. - useridprofilekey_
value - The values of
useridprofilekey_value. - userroomid_
highlightcount - The keys of
userroomid_highlightcount.
StructsΒ§
StaticsΒ§
- CHECKS π
- Every check, in the order a whole run takes them.
TraitsΒ§
- Report
- A finding of any check.
FunctionsΒ§
- answer π
- checks
- Iterates over every registered check.
- find
- Finds the check registered under a name.
- leading_
json π - Decodes the JSON object a stored row holds, as a release buildβs database decoder reads it.
- leading_
record π - Splits off the leading record of a stored key or value, as a release build decodes a lone string from it.
- per_
room π - Pairs each row naming a room with what
resolveanswers for that room, asking once for each run of consecutive rows in one room. - tally π
- undecodable π
- Whether a failed read found its data but could not decode it.
- undecodable_
as π - Answers
damagefor a failed read that found its data but could not decode it, and keeps any other failure.