push/internal/storage/mod.rs
1/* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
4
5//! Handles Push component storage
6//!
7//! Mainly exposes a trait, [`Storage`] and a concrete type that implements the trait, [`Store`]
8//!
9//! [`Storage`] is a trait representing the storage of records. Each record is a subscription record associated with a `channel_id`
10//!
11//! Records mainly include the autopush endpoint senders need to send their payloads to and the private key associated with the subscription
12//! The records act as both:
13//! - A cache for subscription records that are returned when senders re-subscribe to an already subscribed channel
14//! - Storage for the private keys used to decrypt push payloads
15
16mod db;
17mod record;
18mod schema;
19
20pub use self::{
21 db::{PushDb as Store, Storage},
22 record::PushRecord,
23};