Skip to content

Commit 631ec15

Browse files
refactor: rename files to match new names
1 parent cdf49e2 commit 631ec15

File tree

24 files changed

+44
-44
lines changed

24 files changed

+44
-44
lines changed

crates/bitwarden-core/src/auth/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use bitwarden_crypto::{HashPurpose, Kdf, MasterKey};
33

44
mod access_token;
55
pub(super) mod api;
6-
pub mod client_auth;
6+
pub mod auth_client;
77
mod jwt_token;
88
pub mod login;
99
#[cfg(feature = "internal")]
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
pub mod crypto;
22
pub mod kdf;
33

4-
mod client_crypto;
54
mod client_kdf;
5+
mod crypto_client;
66

7-
pub use client_crypto::CryptoClient;
87
pub use client_kdf::ClientKdf;
8+
pub use crypto_client::CryptoClient;

crates/bitwarden-core/src/platform/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
pub mod client_platform;
21
mod generate_fingerprint;
32
mod get_user_api_key;
3+
pub mod platform_client;
44
mod secret_verification_request;
55

66
pub use generate_fingerprint::{FingerprintRequest, FingerprintResponse};

crates/bitwarden-exporters/src/client_exporter.rs renamed to crates/bitwarden-exporters/src/exporter_client.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ use crate::{
66
ExportError, ExportFormat,
77
};
88

9-
pub struct ExporterClients<'a> {
9+
pub struct ExporterClient<'a> {
1010
client: &'a Client,
1111
}
1212

13-
impl<'a> ExporterClients<'a> {
13+
impl<'a> ExporterClient<'a> {
1414
fn new(client: &'a Client) -> Self {
1515
Self { client }
1616
}
@@ -34,12 +34,12 @@ impl<'a> ExporterClients<'a> {
3434
}
3535
}
3636

37-
pub trait ExporterClientsExt<'a> {
38-
fn exporters(&'a self) -> ExporterClients<'a>;
37+
pub trait ExporterClientExt<'a> {
38+
fn exporters(&'a self) -> ExporterClient<'a>;
3939
}
4040

41-
impl<'a> ExporterClientsExt<'a> for Client {
42-
fn exporters(&'a self) -> ExporterClients<'a> {
43-
ExporterClients::new(self)
41+
impl<'a> ExporterClientExt<'a> for Client {
42+
fn exporters(&'a self) -> ExporterClient<'a> {
43+
ExporterClient::new(self)
4444
}
4545
}

crates/bitwarden-exporters/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@ use uuid::Uuid;
77
#[cfg(feature = "uniffi")]
88
uniffi::setup_scaffolding!();
99

10-
mod client_exporter;
1110
mod csv;
1211
mod encrypted_json;
12+
mod exporter_client;
1313
mod json;
1414
mod models;
15-
pub use client_exporter::{ExporterClients, ExporterClientsExt};
15+
pub use exporter_client::{ExporterClient, ExporterClientExt};
1616
mod error;
1717
mod export;
1818
pub use error::ExportError;

crates/bitwarden-generators/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
mod client_generator;
1+
mod generator_client;
22
mod username_forwarders;
3-
pub use client_generator::{GeneratorClient, GeneratorClientsExt};
3+
pub use generator_client::{GeneratorClient, GeneratorClientsExt};
44
pub(crate) mod passphrase;
55
pub use passphrase::{PassphraseError, PassphraseGeneratorRequest};
66
pub(crate) mod password;

crates/bitwarden-send/src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mod uniffi_support;
55

66
mod error;
77
pub use error::SendParseError;
8-
mod client_sends;
9-
pub use client_sends::{SendClients, SendClientsExt};
8+
mod send_client;
9+
pub use send_client::{SendClient, SendClientExt};
1010
mod send;
1111
pub use send::{Send, SendListView, SendView};

crates/bitwarden-send/src/client_sends.rs renamed to crates/bitwarden-send/src/send_client.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ use bitwarden_crypto::{EncString, KeyDecryptable, KeyEncryptable};
55

66
use crate::{Send, SendListView, SendView};
77

8-
pub struct SendClients<'a> {
8+
pub struct SendClient<'a> {
99
client: &'a Client,
1010
}
1111

12-
impl<'a> SendClients<'a> {
12+
impl<'a> SendClient<'a> {
1313
fn new(client: &'a Client) -> Self {
1414
Self { client }
1515
}
@@ -84,12 +84,12 @@ impl<'a> SendClients<'a> {
8484
}
8585
}
8686

87-
pub trait SendClientsExt<'a> {
88-
fn sends(&'a self) -> SendClients<'a>;
87+
pub trait SendClientExt<'a> {
88+
fn sends(&'a self) -> SendClient<'a>;
8989
}
9090

91-
impl<'a> SendClientsExt<'a> for Client {
92-
fn sends(&'a self) -> SendClients<'a> {
93-
SendClients::new(self)
91+
impl<'a> SendClientExt<'a> for Client {
92+
fn sends(&'a self) -> SendClient<'a> {
93+
SendClient::new(self)
9494
}
9595
}

crates/bitwarden-uniffi/src/lib.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ mod android_support;
1919
use crypto::CryptoClient;
2020
use error::Result;
2121
use platform::PlatformClient;
22-
use tool::{ExporterClients, GeneratorClients, SendClients};
22+
use tool::{ExporterClient, GeneratorClients, SendClient};
2323
use vault::VaultClient;
2424

2525
#[derive(uniffi::Object)]
@@ -58,13 +58,13 @@ impl Client {
5858
}
5959

6060
/// Exporters
61-
pub fn exporters(self: Arc<Self>) -> Arc<ExporterClients> {
62-
Arc::new(ExporterClients(self))
61+
pub fn exporters(self: Arc<Self>) -> Arc<ExporterClient> {
62+
Arc::new(ExporterClient(self))
6363
}
6464

6565
/// Sends operations
66-
pub fn sends(self: Arc<Self>) -> Arc<SendClients> {
67-
Arc::new(SendClients(self))
66+
pub fn sends(self: Arc<Self>) -> Arc<SendClient> {
67+
Arc::new(SendClient(self))
6868
}
6969

7070
/// Auth operations

crates/bitwarden-uniffi/src/tool/mod.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::sync::Arc;
22

3-
use bitwarden_exporters::{ExportFormat, ExporterClientsExt};
3+
use bitwarden_exporters::{ExportFormat, ExporterClientExt};
44
use bitwarden_generators::{
55
GeneratorClientsExt, PassphraseGeneratorRequest, PasswordGeneratorRequest,
66
UsernameGeneratorRequest,
@@ -13,7 +13,7 @@ use crate::{
1313
};
1414

1515
mod sends;
16-
pub use sends::SendClients;
16+
pub use sends::SendClient;
1717

1818
#[derive(uniffi::Object)]
1919
pub struct GeneratorClients(pub(crate) Arc<Client>);
@@ -53,10 +53,10 @@ impl GeneratorClients {
5353
}
5454

5555
#[derive(uniffi::Object)]
56-
pub struct ExporterClients(pub(crate) Arc<Client>);
56+
pub struct ExporterClient(pub(crate) Arc<Client>);
5757

5858
#[uniffi::export]
59-
impl ExporterClients {
59+
impl ExporterClient {
6060
/// **API Draft:** Export user vault
6161
pub fn export_vault(
6262
&self,

crates/bitwarden-uniffi/src/tool/sends.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
use std::{path::Path, sync::Arc};
22

3-
use bitwarden_send::{Send, SendClientsExt, SendListView, SendView};
3+
use bitwarden_send::{Send, SendClientExt, SendListView, SendView};
44

55
use crate::{Client, Result};
66

77
#[derive(uniffi::Object)]
8-
pub struct SendClients(pub Arc<Client>);
8+
pub struct SendClient(pub Arc<Client>);
99

1010
#[uniffi::export]
11-
impl SendClients {
11+
impl SendClient {
1212
/// Encrypt send
1313
pub fn encrypt(&self, send: SendView) -> Result<Send> {
1414
Ok(self.0 .0.sends().encrypt(send)?)

crates/bitwarden-vault/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ mod totp;
1717
pub use totp::{generate_totp, generate_totp_cipher_view, TotpError, TotpResponse};
1818
mod error;
1919
pub use error::VaultParseError;
20-
mod client_vault;
21-
pub use client_vault::{VaultClient, VaultClientExt};
22-
mod client_totp;
20+
mod vault_client;
21+
pub use vault_client::{VaultClient, VaultClientExt};
2322
mod mobile;
2423
mod sync;
24+
mod totp_client;
2525
pub use sync::{SyncRequest, SyncResponse};
+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
mod client_attachments;
2-
mod client_ciphers;
3-
mod client_collection;
4-
mod client_folders;
5-
mod client_password_history;
1+
mod attachment_client;
2+
mod cipher_client;
3+
mod collection_client;
4+
mod folder_client;
5+
mod password_history_client;

0 commit comments

Comments
 (0)