1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#![allow(unused)]
//! ```
//! use serde::{Serialize, Deserialize};
//! 
//! // MODEL
//! #[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
//! pub struct TodoItem {
//!     pub name: String,
//!     pub title: String,
//! }
//! // MODEL METADATA
//! impl ddb::EntityKey for TodoItem {
//!     fn entity_kind_key() -> String {
//!         String::from("TodoItem")
//!     }
//!     fn entity_name_key(&self) -> String {
//!         self.name.clone()
//!     }
//! }
//! // INIT
//! let db = ddb::DatastoreClient::new().unwrap();
//! let item = TodoItem {
//!     name: String::from("test"),
//!     title: String::from("lorem ipsum")
//! };
//! // GO!
//! db.upsert(item);
//! ```

mod convert;
mod db;
mod auth;

pub use db::*;