diff --git a/crates/key-value-aws/src/store.rs b/crates/key-value-aws/src/store.rs index ca9d0d573..86bc8cb27 100644 --- a/crates/key-value-aws/src/store.rs +++ b/crates/key-value-aws/src/store.rs @@ -1,4 +1,4 @@ -use std::sync::Arc; +use std::{collections::HashMap, sync::Arc}; use anyhow::Result; use aws_config::{BehaviorVersion, Region, SdkConfig}; @@ -6,7 +6,7 @@ use aws_credential_types::Credentials; use aws_sdk_dynamodb::{ config::{ProvideCredentials, SharedCredentialsProvider}, primitives::Blob, - types::AttributeValue, + types::{AttributeValue, KeysAndAttributes}, Client, }; use spin_core::async_trait; @@ -127,6 +127,13 @@ struct AwsDynamoStore { table: String, } +// struct CompareAndSwap { +// key: String, +// client: CollectionClient, +// bucket_rep: u32, +// etag: Mutex>, +// } + const PK: &str = "PK"; const VAL: &str = "val"; @@ -169,6 +176,30 @@ impl Store for AwsDynamoStore { async fn get_keys(&self) -> Result, Error> { self.get_keys().await } + + async fn get_many(&self, keys: Vec) -> Result>)>, Error> { + todo!() + } + + async fn set_many(&self, key_values: Vec<(String, Vec)>) -> Result<(), Error> { + todo!() + } + + async fn delete_many(&self, keys: Vec) -> Result<(), Error> { + todo!() + } + + async fn increment(&self, key: String, delta: i64) -> Result { + todo!() + } + + async fn new_compare_and_swap( + &self, + bucket_rep: u32, + key: &str, + ) -> Result, Error> { + todo!() + } } impl AwsDynamoStore {