Skip to content

Commit

Permalink
User module is private.
Browse files Browse the repository at this point in the history
Use feature flag for hashcheck helpers.
  • Loading branch information
tmpfs committed Nov 19, 2023
1 parent 6738b89 commit 5e6a12e
Show file tree
Hide file tree
Showing 17 changed files with 19 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/commands/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::sync::Arc;
use tokio::sync::RwLock;

use sos_net::{
client::user::UserStorage, device::TrustedDevice,
client::UserStorage, device::TrustedDevice,
sdk::account::AccountRef,
};

Expand Down
2 changes: 1 addition & 1 deletion src/commands/secret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use futures::future::LocalBoxFuture;
use terminal_banner::{Banner, Padding};

use sos_net::{
client::user::{ArchiveFilter, DocumentView},
client::{ArchiveFilter, DocumentView},
sdk::{
account::AccountRef,
search::Document,
Expand Down
2 changes: 1 addition & 1 deletion src/commands/security_report.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use sos_net::{
client::{
hashcheck,
user::{SecurityReportOptions, SecurityReportRow},
SecurityReportOptions, SecurityReportRow,
},
sdk::account::AccountRef,
};
Expand Down
2 changes: 1 addition & 1 deletion src/commands/shell/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::{borrow::Cow, sync::Arc};
use terminal_banner::{Banner, Padding};

use sos_net::{
client::user::UserStorage,
client::UserStorage,
sdk::{account::{AccountRef, UserPaths}, vault::VaultRef, vfs},
FileLocks,
};
Expand Down
2 changes: 1 addition & 1 deletion src/helpers/account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
use std::{borrow::Cow, sync::Arc};

use sos_net::{
client::user::UserStorage,
client::UserStorage,
sdk::{
account::{AccountInfo, AccountRef, LocalAccounts, UserPaths},
constants::DEFAULT_VAULT_NAME,
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/audit_trail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use serial_test::serial;
use std::path::{Path, PathBuf};

use sos_net::{
client::user::UserStorage,
client::UserStorage,
migrate::import::ImportTarget,
sdk::{
account::RestoreOptions,
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/external_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use serial_test::serial;
use std::{path::PathBuf, sync::Arc};

use sos_net::{
client::user::{FileProgress, SecretOptions, UserStorage},
client::{FileProgress, SecretOptions, UserStorage},
sdk::{
hex,
account::UserPaths,
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/security_report.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use secrecy::SecretString;
use serial_test::serial;

use sos_net::{
client::user::{SecurityReportOptions, UserStorage},
client::{SecurityReportOptions, UserStorage},
sdk::{
passwd::diceware::generate_passphrase,
vault::{
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/sync/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use anyhow::Result;
use sos_net::{
client::{RemoteProvider, user::UserStorage},
client::{RemoteProvider, UserStorage},
sdk::{
constants::VAULT_EXT,
vault::{Summary, VaultId},
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/sync/send_create_events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::{collections::HashMap, path::PathBuf};
use sos_net::{
client::{
RemoteProvider,
user::{Origin, Remote, UserStorage},
Origin, Remote, UserStorage,
RemoteSync,
},
sdk::vault::Summary,
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use web3_address::ethereum::Address;
use sos_net::{
client::{
LocalProvider, RemoteProvider,
user::{Origin, UserStorage},
Origin, UserStorage,
},
sdk::{
account::ImportedAccount,
Expand Down
2 changes: 2 additions & 0 deletions workspace/net/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ full = [
"client",
"server",
"peer",
"hashcheck",
"migrate",
"contacts",
"device",
Expand Down Expand Up @@ -41,6 +42,7 @@ server = [
"async-stream",
"tokio-stream",
]
hashcheck = []
contacts = []
migrate = ["sos-migrate"]
device = [
Expand Down
3 changes: 2 additions & 1 deletion workspace/net/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
#[cfg(not(target_arch = "wasm32"))]
mod changes_listener;
#[cfg(feature = "hashcheck")]
pub mod hashcheck;
pub mod net;
mod sync;
pub mod user;
mod user;

mod error;

Expand Down
2 changes: 1 addition & 1 deletion workspace/net/src/client/user/file_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ use tokio::sync::mpsc;

use tracing::{span, Level};

use crate::client::{user::UserStorage, Error, Result};
use crate::client::{UserStorage, Error, Result};

/// File progress operations.
#[derive(Debug)]
Expand Down
14 changes: 1 addition & 13 deletions workspace/net/src/client/user/local_provider.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ use std::{

use tokio::sync::RwLock;

use crate::client::{{user::ProviderState, RemoteSync}, Error, Result};
use crate::client::{{ProviderState, RemoteSync}, Error, Result};

/// Local storage provider.
pub struct LocalProvider {
Expand Down Expand Up @@ -292,18 +292,6 @@ impl LocalProvider {
Ok(())
}

/*
/// Add to the local cache for a vault.
async fn add_local_cache(&mut self, summary: Summary) -> Result<()> {
// Add to our cache of managed vaults
self.create_cache_entry(&summary, None).await?;
// Add to the state of managed vaults
self.state_mut().add_summary(summary);
Ok(())
}
*/

/// Refresh the in-memory vault of the current selection
/// from the contents of the current event log file.
pub async fn refresh_vault(
Expand Down
2 changes: 1 addition & 1 deletion workspace/net/src/client/user/macros.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Macro utilities for network connections and providers.
//! Macro utilities for network connections.
/// Retry a request after renewing a session if an
/// UNAUTHORIZED response is returned,
Expand Down
2 changes: 1 addition & 1 deletion workspace/net/src/client/user/security_report.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Generate a security report for all passwords.
use crate::client::{user::UserStorage, Result};
use crate::client::{UserStorage, Result};
use serde::{Deserialize, Serialize};
use sos_sdk::{
vault::{
Expand Down

0 comments on commit 5e6a12e

Please sign in to comment.