Skip to content

Commit 2f2c3c6

Browse files
committed
fix: fix typos
Signed-off-by: mon3stera <[email protected]>
1 parent 9a0118f commit 2f2c3c6

File tree

6 files changed

+15
-15
lines changed

6 files changed

+15
-15
lines changed

project/libvault/src/modules/crypto/crypto_adaptors/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
//! The libvault::crypto module utilize these adaptors to do the real crypto operations.
33
//!
44
//! Only one crypto adaptor can be used in one build. It's configured when building RustyVault.
5-
//! An adaptor implements a set of methods that perform cryptograhpy operations like encryption,
6-
//! decription, signing, verification and so on.
5+
//! An adaptor implements a set of methods that perform cryptography operations like encryption,
6+
//! description, signing, verification and so on.
77
88
#[macro_use]
99
pub mod common;

project/libvault/src/modules/pki/path_issue.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ impl PkiBackend {
4848
Field::builder()
4949
.field_type(FieldType::Str)
5050
.description(
51-
r#"The requested IP SANs, if any, in a common-delimited list"#,
51+
r#"The requested IP SANs, if any, in a comma-delimited list"#,
5252
),
5353
)
5454
.field(

project/libvault/src/modules/policy/policy_store.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ pub struct PolicyEntry {
191191
#[default(PolicyType::Acl)]
192192
#[serde(rename = "type")]
193193
pub policy_type: PolicyType,
194-
pub sentinal_policy: SentinelPolicy,
194+
pub sentinel_policy: SentinelPolicy,
195195
}
196196

197197
/// The main policy store structure.
@@ -448,13 +448,13 @@ impl PolicyStore {
448448
view.delete(&name).await?;
449449
self.remove_token_policy_cache(&index)?;
450450
self.policy_type_map.remove(&index);
451-
self.invalidate_sentinal_policy(policy_type, "")?;
451+
self.invalidate_sentinel_policy(policy_type, "")?;
452452
}
453453
PolicyType::Egp => {
454454
view.delete(&name).await?;
455455
self.remove_egp_cache(&index)?;
456456
self.invalidate_egp_tree_path("")?;
457-
self.invalidate_sentinal_policy(policy_type, "")?;
457+
self.invalidate_sentinel_policy(policy_type, "")?;
458458
}
459459
_ => {
460460
return Err(rv_error_string!("unknown policy type, cannot set"));
@@ -527,7 +527,7 @@ impl PolicyStore {
527527
templated: policy.templated,
528528
raw: policy.raw.clone(),
529529
policy_type: policy.policy_type,
530-
sentinal_policy: policy.sentinal_policy,
530+
sentinel_policy: policy.sentinal_policy,
531531
};
532532

533533
let entry = StorageEntry::new(&policy.name, &pe)?;
@@ -594,7 +594,7 @@ impl PolicyStore {
594594
match &self.rgp_view {
595595
Some(view) => Ok(view.clone()),
596596
None => Err(rv_error_string!(
597-
"unable to get the barrier subview for policy type rpg"
597+
"unable to get the barrier subview for policy type rgp"
598598
)),
599599
}
600600
}
@@ -603,7 +603,7 @@ impl PolicyStore {
603603
match &self.egp_view {
604604
Some(view) => Ok(view.clone()),
605605
None => Err(rv_error_string!(
606-
"unable to get the barrier subview for policy type epg"
606+
"unable to get the barrier subview for policy type egp"
607607
)),
608608
}
609609
}
@@ -653,7 +653,7 @@ impl PolicyStore {
653653
Ok(())
654654
}
655655

656-
fn invalidate_sentinal_policy(
656+
fn invalidate_sentinel_policy(
657657
&self,
658658
_policy_type: PolicyType,
659659
_index: &str,

project/libvault/src/modules/system/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ impl SystemBackend {
299299
.field_type(FieldType::Str)
300300
.default_value("")
301301
.description(
302-
"User-friendly description for this crential backend.",
302+
"User-friendly description for this credential backend.",
303303
),
304304
)
305305
.field(

project/libvault/src/shamir.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! A Shamir threshold algorithm implementaion which is used to derive the RustyVault master key.
1+
//! A Shamir threshold algorithm implementation which is used to derive the RustyVault master key.
22
//!
33
//! This code is originated from Chris MacNaughton, we modified it to be compatible with Vault's
44
//! Shamir algorithm.

project/libvault/src/storage/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//!
44
//! Each different storage type needs to implement the `backend` trait to complete the support.
55
//!
6-
//! Each barrier represents a specific cryptography method for ecrypting or decrypting data before
6+
//! Each barrier represents a specific cryptography method for encrypting or decrypting data before
77
//! the data connects to a specific backend. A barrier is defined by implementing the `SecurityBarrier`
88
//! trait.
99
//!
@@ -12,7 +12,7 @@
1212
//! HTTP API -> some module (e.g. KV) -> barrier -> backend -> real storage (file, MySQL...)
1313
//!
1414
//! Typical storage types may be direct file, databases, remote network filesystem and etc.
15-
//! Different strage types are all as sub-module of this module.
15+
//! Different storage types are all as sub-module of this module.
1616
1717
use std::{any::Any, collections::HashMap, sync::Arc};
1818

@@ -61,7 +61,7 @@ impl StorageEntry {
6161

6262
#[async_trait]
6363
pub trait Backend: Send + Sync {
64-
//! This trait decsribes the generic methods that a storage backend needs to implement.
64+
//! This trait describes the generic methods that a storage backend needs to implement.
6565
async fn list(&self, prefix: &str) -> Result<Vec<String>, RvError>;
6666
async fn get(&self, key: &str) -> Result<Option<BackendEntry>, RvError>;
6767
async fn put(&self, entry: &BackendEntry) -> Result<(), RvError>;

0 commit comments

Comments
 (0)