aerogramme/src/storage/garage.rs

135 lines
2.8 KiB
Rust
Raw Normal View History

2023-11-01 14:15:57 +00:00
use crate::storage::*;
#[derive(Clone, Debug, Hash)]
2023-11-01 14:15:57 +00:00
pub struct GrgCreds {}
pub struct GrgStore {}
pub struct GrgRef {}
pub struct GrgValue {}
2023-11-17 14:23:05 +00:00
#[derive(Clone, Debug, PartialEq)]
2023-11-17 09:46:13 +00:00
pub struct GrgOrphanRowRef {}
impl IBuilders for GrgCreds {
2023-11-02 10:51:03 +00:00
fn row_store(&self) -> Result<RowStore, StorageError> {
unimplemented!();
}
fn blob_store(&self) -> Result<BlobStore, StorageError> {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
fn url(&self) -> &str {
return "grg://unimplemented;"
}
2023-11-01 14:15:57 +00:00
}
2023-11-02 08:57:58 +00:00
impl IRowStore for GrgStore {
2023-11-02 11:58:45 +00:00
fn row(&self, partition: &str, sort: &str) -> RowRef {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
fn select(&self, selector: Selector) -> AsyncResult<Vec<RowValue>> {
unimplemented!();
}
fn rm(&self, selector: Selector) -> AsyncResult<()> {
unimplemented!();
}
2023-11-17 09:46:13 +00:00
2023-11-17 14:02:43 +00:00
fn from_orphan(&self, orphan: OrphanRowRef) -> Result<RowRef, StorageError> {
2023-11-17 09:46:13 +00:00
unimplemented!();
}
2023-11-01 14:15:57 +00:00
}
2023-11-02 08:57:58 +00:00
impl IRowRef for GrgRef {
/*fn clone_boxed(&self) -> RowRef {
2023-11-02 14:28:19 +00:00
unimplemented!();
}*/
2023-11-17 09:46:13 +00:00
fn to_orphan(&self) -> OrphanRowRef {
unimplemented!()
2023-11-02 14:28:19 +00:00
}
fn key(&self) -> (&str, &str) {
unimplemented!();
}
2023-11-21 14:09:39 +00:00
fn set_value(&self, content: &[u8]) -> RowValue {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
2023-11-02 09:38:47 +00:00
fn fetch(&self) -> AsyncResult<RowValue> {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
2023-11-02 09:38:47 +00:00
fn rm(&self) -> AsyncResult<()> {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
2023-11-02 14:28:19 +00:00
fn poll(&self) -> AsyncResult<RowValue> {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
}
2023-11-17 11:15:44 +00:00
impl std::fmt::Debug for GrgRef {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
unimplemented!();
}
}
2023-11-02 08:57:58 +00:00
impl IRowValue for GrgValue {
2023-11-02 09:38:47 +00:00
fn to_ref(&self) -> RowRef {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
fn content(&self) -> ConcurrentValues {
unimplemented!();
}
2023-11-02 09:38:47 +00:00
fn push(&self) -> AsyncResult<()> {
2023-11-01 14:15:57 +00:00
unimplemented!();
}
}
impl std::fmt::Debug for GrgValue {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
unimplemented!();
}
}
2023-11-01 14:15:57 +00:00
/*
/// 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 {
}*/