aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/model/block_ref_table.rs2
-rw-r--r--src/model/bucket_table.rs4
-rw-r--r--src/model/key_table.rs2
-rw-r--r--src/model/object_table.rs4
-rw-r--r--src/model/version_table.rs2
5 files changed, 7 insertions, 7 deletions
diff --git a/src/model/block_ref_table.rs b/src/model/block_ref_table.rs
index 1f0c7bb0..95451e9c 100644
--- a/src/model/block_ref_table.rs
+++ b/src/model/block_ref_table.rs
@@ -10,7 +10,7 @@ use crate::block::*;
#[derive(PartialEq, Clone, Debug, Serialize, Deserialize)]
pub struct BlockRef {
- /// Hash of the block, used as partition key
+ /// Hash (blake2 sum) of the block, used as partition key
pub block: Hash,
/// Id of the Version for the object containing this block, used as sorting key
diff --git a/src/model/bucket_table.rs b/src/model/bucket_table.rs
index 6a4b021d..69901b8d 100644
--- a/src/model/bucket_table.rs
+++ b/src/model/bucket_table.rs
@@ -57,7 +57,7 @@ impl CRDT for BucketParams {
}
impl BucketParams {
- /// Initializes a new instance of the Bucket struct
+ /// Create an empty BucketParams with no authorized keys and no website accesss
pub fn new() -> Self {
BucketParams {
authorized_keys: crdt::LWWMap::new(),
@@ -67,7 +67,7 @@ impl BucketParams {
}
impl Bucket {
- /// Create a new bucket
+ /// Initializes a new instance of the Bucket struct
pub fn new(name: String) -> Self {
Bucket {
name,
diff --git a/src/model/key_table.rs b/src/model/key_table.rs
index 578f8683..ba1f6b81 100644
--- a/src/model/key_table.rs
+++ b/src/model/key_table.rs
@@ -24,7 +24,7 @@ pub struct Key {
}
impl Key {
- /// Create a new key
+ /// Initialize a new Key, generating a random identifier and associated secret key
pub fn new(name: String) -> Self {
let key_id = format!("GK{}", hex::encode(&rand::random::<[u8; 12]>()[..]));
let secret_key = hex::encode(&rand::random::<[u8; 32]>()[..]);
diff --git a/src/model/object_table.rs b/src/model/object_table.rs
index ff42d065..b0611822 100644
--- a/src/model/object_table.rs
+++ b/src/model/object_table.rs
@@ -25,7 +25,7 @@ pub struct Object {
}
impl Object {
- /// Create an object from parts
+ /// Initialize an Object struct from parts
pub fn new(bucket: String, key: String, versions: Vec<ObjectVersion>) -> Self {
let mut ret = Self {
bucket,
@@ -102,7 +102,7 @@ impl CRDT for ObjectVersionState {
}
}
-/// Data about an object version
+/// Data stored in object version
#[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Debug, Serialize, Deserialize)]
pub enum ObjectVersionData {
/// The object was deleted, this Version is a tombstone to mark it as such
diff --git a/src/model/version_table.rs b/src/model/version_table.rs
index bb836868..dd088224 100644
--- a/src/model/version_table.rs
+++ b/src/model/version_table.rs
@@ -72,7 +72,7 @@ impl PartialOrd for VersionBlockKey {
/// Informations about a single block
#[derive(PartialEq, Eq, Ord, PartialOrd, Clone, Copy, Debug, Serialize, Deserialize)]
pub struct VersionBlock {
- /// Hash of the block
+ /// Blake2 sum of the block
pub hash: Hash,
/// Size of the block
pub size: u64,