Skip to main content

Module key_backups

Module key_backups 

Source
Expand description

Versioned room key backup storage.

The service stores encrypted session keys by user, backup version, room, and session. Backup metadata and change tags are maintained alongside the key rows for client synchronization.

Re-exportsยง

use std::cmp::Ordering; ๐Ÿ”’
use std::collections::BTreeMap; ๐Ÿ”’
use std::module_path; ๐Ÿ”’
use std::sync::Arc; ๐Ÿ”’
use futures::FutureExt; ๐Ÿ”’
use futures::Stream; ๐Ÿ”’
use futures::StreamExt; ๐Ÿ”’
use futures::TryStreamExt; ๐Ÿ”’
use futures::future::try_join; ๐Ÿ”’
use http::StatusCode; ๐Ÿ”’
use ruma::OwnedRoomId; ๐Ÿ”’
use ruma::OwnedUserId; ๐Ÿ”’
use ruma::RoomId; ๐Ÿ”’
use ruma::UInt; ๐Ÿ”’
use ruma::UserId; ๐Ÿ”’
use ruma::api::client::backup::BackupAlgorithm; ๐Ÿ”’
use ruma::api::client::backup::KeyBackupData; ๐Ÿ”’
use ruma::api::client::backup::RoomKeyBackup; ๐Ÿ”’
use ruma::api::error::ErrorKind; ๐Ÿ”’
use ruma::api::error::WrongRoomKeysVersionErrorData; ๐Ÿ”’
use ruma::serde::Raw; ๐Ÿ”’
use tuwunel_core::Err; ๐Ÿ”’
use tuwunel_core::Result; ๐Ÿ”’
use tuwunel_core::err; ๐Ÿ”’
use tuwunel_core::implement; ๐Ÿ”’
use tuwunel_core::utils::MutexMap; ๐Ÿ”’
use tuwunel_core::utils::stream::ReadyExt; ๐Ÿ”’
use tuwunel_core::utils::stream::TryIgnore; ๐Ÿ”’
use tuwunel_database::Deserialized; ๐Ÿ”’
use tuwunel_database::Ignore; ๐Ÿ”’
use tuwunel_database::Interfix; ๐Ÿ”’
use tuwunel_database::Json; ๐Ÿ”’
use tuwunel_database::Map; ๐Ÿ”’

Structsยง

Data ๐Ÿ”’
Service
Stores and mutates versioned room key backups.

Functionsยง

is_better_key ๐Ÿ”’
Reports whether a new session key should replace the stored key.

Type Aliasesยง

Key ๐Ÿ”’
StoredKey ๐Ÿ”’
StoredKeyVal ๐Ÿ”’
StoredRoomKeyVal ๐Ÿ”’
VersionKey ๐Ÿ”’