aboutsummaryrefslogtreecommitdiff
path: root/src/storage/garage.rs
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-11-01 15:15:57 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-11-01 15:15:57 +0100
commit92fea414d9d113761b788e409a025ad9cff06071 (patch)
tree978d6b05eedd4e00359df0dfa6e2b91ed72a59ea /src/storage/garage.rs
parentc3bb2b62a862c09d52226a82a032061676a0cb77 (diff)
downloadaerogramme-92fea414d9d113761b788e409a025ad9cff06071.tar.gz
aerogramme-92fea414d9d113761b788e409a025ad9cff06071.zip
v2 api storage
Diffstat (limited to 'src/storage/garage.rs')
-rw-r--r--src/storage/garage.rs96
1 files changed, 96 insertions, 0 deletions
diff --git a/src/storage/garage.rs b/src/storage/garage.rs
index e69de29..91c4fa2 100644
--- a/src/storage/garage.rs
+++ b/src/storage/garage.rs
@@ -0,0 +1,96 @@
+use crate::storage::*;
+
+pub struct GrgCreds {}
+pub struct GrgStore {}
+pub struct GrgRef {}
+pub struct GrgValue {}
+
+pub struct GrgTypes {}
+impl RowRealization for GrgTypes {
+ type Store=GrgStore;
+ type Ref=GrgRef;
+ type Value=GrgValue;
+}
+
+impl RowBuilder<GrgTypes> for GrgCreds {
+ fn row_store(&self) -> GrgStore {
+ unimplemented!();
+ }
+}
+
+impl RowStore<GrgTypes> for GrgStore {
+ fn new_row(&self, partition: &str, sort: &str) -> GrgRef {
+ unimplemented!();
+ }
+}
+
+impl RowRef<GrgTypes> for GrgRef {
+ fn set_value(&self, content: Vec<u8>) -> GrgValue {
+ unimplemented!();
+ }
+ async fn fetch(&self) -> Result<GrgValue, Error> {
+ unimplemented!();
+ }
+ async fn rm(&self) -> Result<(), Error> {
+ unimplemented!();
+ }
+ async fn poll(&self) -> Result<Option<GrgValue>, Error> {
+ unimplemented!();
+ }
+}
+
+impl RowValue<GrgTypes> for GrgValue {
+ fn to_ref(&self) -> GrgRef {
+ unimplemented!();
+ }
+ fn content(&self) -> ConcurrentValues {
+ unimplemented!();
+ }
+ async fn push(&self) -> Result<(), Error> {
+ unimplemented!();
+ }
+}
+
+
+
+
+/*
+/// A custom S3 region, composed of a region name and endpoint.
+/// We use this instead of rusoto_signature::Region so that we can
+/// derive Hash and Eq
+
+
+#[derive(Clone, Debug, Hash, PartialEq, Eq)]
+pub struct Region {
+ pub name: String,
+ pub endpoint: String,
+}
+
+impl Region {
+ pub fn as_rusoto_region(&self) -> rusoto_signature::Region {
+ rusoto_signature::Region::Custom {
+ name: self.name.clone(),
+ endpoint: self.endpoint.clone(),
+ }
+ }
+}
+*/
+
+/*
+pub struct Garage {
+ pub s3_region: Region,
+ pub k2v_region: Region,
+
+ pub aws_access_key_id: String,
+ pub aws_secret_access_key: String,
+ pub bucket: String,
+}
+
+impl StoreBuilder<> for Garage {
+ fn row_store(&self) ->
+}
+
+pub struct K2V {}
+impl RowStore for K2V {
+
+}*/