12637d93ff
* Sqlx struct stub * Initial schema * Initial error enum * Managed for persisted shared keys * Initial inbox manager * Comments * Using new database in clients handler * Extending gateway storage API * tokio::main + placeholder values * Removed old client store * Simplified logic of async packet processing * Renamed table + not null restriction * BandwidthManager * Removed sled dependency * Using centralised storage for bandwidth * Dead code removal * WIP connection_handler split and simplification Maybe it doesn't look like it right now, but once completed it will remove bunch of redundant checks for Nones etc * Further more explicit clients handler split * Minor cleanup * Temporary store for active client handles * Fixed error types * Error trait on iv and encrypted address * Authentication and registration moved to the handler * Removal of clients handler * Further logic simplification + returned explicit bandwidth values * Further cleanup and comments * Updated config with relevant changes * Basic bandwidth tracking in client * FreshHandle doc comments + fixed stagger issue * Removed side-effects from .map * More doc comments * Database migration on build * Increased default claimed bandwidth * Renaming * Fixed client determining available bandwidth * Removed dead sql table that might be used in the future * Windows workaround * Comment * Return error rather than cap credential
21 lines
556 B
Rust
21 lines
556 B
Rust
// Copyright 2021 - Nym Technologies SA <contact@nymtech.net>
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
pub(crate) struct PersistedSharedKeys {
|
|
pub(crate) client_address_bs58: String,
|
|
pub(crate) derived_aes128_ctr_blake3_hmac_keys_bs58: String,
|
|
}
|
|
|
|
pub(crate) struct StoredMessage {
|
|
pub(crate) id: i64,
|
|
#[allow(dead_code)]
|
|
pub(crate) client_address_bs58: String,
|
|
pub(crate) content: Vec<u8>,
|
|
}
|
|
|
|
pub(crate) struct PersistedBandwidth {
|
|
#[allow(dead_code)]
|
|
pub(crate) client_address_bs58: String,
|
|
pub(crate) available: i64,
|
|
}
|