dynamodb_tester/
lib.rs

1mod config;
2#[cfg(feature = "local")]
3mod local_client;
4
5use aws_sdk_dynamodb::Client;
6pub use config::TableConfig;
7#[cfg(feature = "local")]
8pub use local_client::{get_client, local_client, LocalClient};
9
10/// DynamoClient is a trait that provides a DynamoDB client and table name
11pub trait DynamoClient {
12    /// return the DynamoDB client
13    fn client(&self) -> &Client;
14    /// for non-local client, this method returns None
15    fn table_name(&self) -> Option<&str> {
16        None
17    }
18}
19
20impl DynamoClient for Client {
21    fn client(&self) -> &Client {
22        self
23    }
24}