From 56f73e580212d9d02d835240264fb087dab47e69 Mon Sep 17 00:00:00 2001 From: despiegk Date: Sat, 19 Apr 2025 09:02:35 +0200 Subject: [PATCH] ... --- herodb/Cargo.toml | 8 +- herodb/README.md | 7 +- herodb/examples/rhai_demo.rs | 38 - herodb/src/cmd/dbexample/DB_README.md | 91 - herodb/src/cmd/dbexample/db_tests.rs | 168 -- herodb/src/cmd/dbexample/examples.rs | 64 - herodb/src/cmd/dbexample/factory.rs | 33 - .../main.rs | 42 +- .../src/cmd/dbexample_governance/Cargo.lock | 2161 ----------------- .../src/cmd/dbexample_governance/Cargo.toml | 12 - .../{dbexample2 => dbexample_prod}/main.rs | 0 .../GOVERNANCE_ENHANCEMENT_PLAN.md | 2 +- .../src/models/{governance => gov}/README.md | 0 .../models/{governance => gov}/committee.rs | 2 +- .../src/models/{governance => gov}/company.rs | 4 +- .../models/{governance => gov}/compliance.rs | 2 +- .../src/models/{governance => gov}/meeting.rs | 4 +- herodb/src/models/{governance => gov}/mod.rs | 0 .../models/{governance => gov}/resolution.rs | 10 +- .../models/{governance => gov}/shareholder.rs | 0 herodb/src/models/{governance => gov}/user.rs | 0 herodb/src/models/{governance => gov}/vote.rs | 4 +- herodb/src/models/mod.rs | 2 +- herodb/tmp/dbexample2/currency/conf | 4 + herodb/tmp/dbexample2/currency/db | Bin 0 -> 524287 bytes .../dbexample2/currency/snap.000000000000008A | Bin 0 -> 80 bytes herodb/tmp/dbexample2/product/conf | 4 + herodb/tmp/dbexample2/product/db | Bin 0 -> 524287 bytes .../dbexample2/product/snap.0000000000000060 | Bin 0 -> 69 bytes herodb/tmp/dbexample2/sale/conf | 4 + herodb/tmp/dbexample2/sale/db | Bin 0 -> 524287 bytes .../tmp/dbexample2/sale/snap.0000000000000060 | Bin 0 -> 69 bytes 32 files changed, 60 insertions(+), 2606 deletions(-) delete mode 100644 herodb/examples/rhai_demo.rs delete mode 100644 herodb/src/cmd/dbexample/DB_README.md delete mode 100644 herodb/src/cmd/dbexample/db_tests.rs delete mode 100644 herodb/src/cmd/dbexample/examples.rs delete mode 100644 herodb/src/cmd/dbexample/factory.rs rename herodb/src/cmd/{dbexample_governance => dbexample_gov}/main.rs (94%) delete mode 100644 herodb/src/cmd/dbexample_governance/Cargo.lock delete mode 100644 herodb/src/cmd/dbexample_governance/Cargo.toml rename herodb/src/cmd/{dbexample2 => dbexample_prod}/main.rs (100%) rename herodb/src/models/{governance => gov}/GOVERNANCE_ENHANCEMENT_PLAN.md (99%) rename herodb/src/models/{governance => gov}/README.md (100%) rename herodb/src/models/{governance => gov}/committee.rs (99%) rename herodb/src/models/{governance => gov}/company.rs (95%) rename herodb/src/models/{governance => gov}/compliance.rs (99%) rename herodb/src/models/{governance => gov}/meeting.rs (96%) rename herodb/src/models/{governance => gov}/mod.rs (100%) rename herodb/src/models/{governance => gov}/resolution.rs (93%) rename herodb/src/models/{governance => gov}/shareholder.rs (100%) rename herodb/src/models/{governance => gov}/user.rs (100%) rename herodb/src/models/{governance => gov}/vote.rs (95%) create mode 100644 herodb/tmp/dbexample2/currency/conf create mode 100644 herodb/tmp/dbexample2/currency/db create mode 100644 herodb/tmp/dbexample2/currency/snap.000000000000008A create mode 100644 herodb/tmp/dbexample2/product/conf create mode 100644 herodb/tmp/dbexample2/product/db create mode 100644 herodb/tmp/dbexample2/product/snap.0000000000000060 create mode 100644 herodb/tmp/dbexample2/sale/conf create mode 100644 herodb/tmp/dbexample2/sale/db create mode 100644 herodb/tmp/dbexample2/sale/snap.0000000000000060 diff --git a/herodb/Cargo.toml b/herodb/Cargo.toml index 7318bfc..8d34a4c 100644 --- a/herodb/Cargo.toml +++ b/herodb/Cargo.toml @@ -28,9 +28,13 @@ name = "rhai_demo" path = "examples/rhai_demo.rs" [[bin]] -name = "dbexample2" -path = "src/cmd/dbexample2/main.rs" +name = "dbexample_prod" +path = "src/cmd/dbexample_prod/main.rs" [[bin]] name = "dbexample_mcc" path = "src/cmd/dbexample_mcc/main.rs" + +[[bin]] +name = "dbexample_gov" +path = "src/cmd/dbexample_gov/main.rs" diff --git a/herodb/README.md b/herodb/README.md index edbc14c..4075cfd 100644 --- a/herodb/README.md +++ b/herodb/README.md @@ -7,7 +7,12 @@ A database library built on top of sled with model support. ## example ```bash -cargo run --bin dbexample2 +#test for mcc module +cargo run --bin dbexample_mcc +#test for governance module +cargo run --bin dbexample_gov +#test for products +cargo run --bin dbexample_prod ``` ## Features diff --git a/herodb/examples/rhai_demo.rs b/herodb/examples/rhai_demo.rs deleted file mode 100644 index 1639e7c..0000000 --- a/herodb/examples/rhai_demo.rs +++ /dev/null @@ -1,38 +0,0 @@ -//! Demonstrates how to use the Rhai wrappers for our models - -use herodb::zaz::rhai::{run_script_file, run_example_script}; -use std::path::PathBuf; -use std::fs; -use std::time::SystemTime; - -fn main() -> Result<(), String> { - println!("=== RHAI MODEL WRAPPERS DEMONSTRATION ==="); - - // Run our test script that creates model objects - let test_script_path = "src/zaz/rhai/test.rhai"; - println!("\n1. Running model creation test script: {}", test_script_path); - run_script_file(test_script_path)?; - - // Create temporary directory for DB example - let temp_dir = create_temp_dir() - .map_err(|e| format!("Failed to create temp dir: {}", e))?; - - // Run our example script that uses the DB - println!("\n2. Running example with database at: {:?}", temp_dir); - run_example_script(temp_dir.to_str().unwrap())?; - - println!("\n=== DEMONSTRATION COMPLETED SUCCESSFULLY ==="); - Ok(()) -} - -/// Creates a simple temporary directory -fn create_temp_dir() -> std::io::Result { - let temp_dir = std::env::temp_dir(); - let random_name = format!("rhai-demo-{}", SystemTime::now() - .duration_since(std::time::UNIX_EPOCH) - .unwrap() - .as_millis()); - let path = temp_dir.join(random_name); - fs::create_dir_all(&path)?; - Ok(path) -} \ No newline at end of file diff --git a/herodb/src/cmd/dbexample/DB_README.md b/herodb/src/cmd/dbexample/DB_README.md deleted file mode 100644 index 25e312f..0000000 --- a/herodb/src/cmd/dbexample/DB_README.md +++ /dev/null @@ -1,91 +0,0 @@ -# HeroDB Architecture - -This document explains the architecture of HeroDB, focusing on the separation between model definitions and database logic. - -## Core Principles - -1. **Separation of Concerns**: The DB core should not know about specific models -2. **Registration-Based System**: Models get registered with the DB through a factory pattern -3. **Type-Safety**: Despite the separation, we maintain full type safety - -## Components - -### Core Module - -The `core` module provides the database foundation without knowing about specific models: - -- `SledModel` trait: Defines the interface models must implement -- `Storable` trait: Provides serialization/deserialization capabilities -- `SledDB`: Generic database wrapper for any model type -- `DB`: Main database manager that holds registered models -- `DBBuilder`: Builder for creating a DB with registered models - -### Zaz Module - -The `zaz` module contains domain-specific models and factories: - -- `models`: Defines specific model types like User, Company, etc. -- `factory`: Provides functions to create a DB with zaz models registered - -## Using the DB - -### Option 1: Factory Function - -The easiest way to create a DB with all zaz models is to use the factory: - -```rust -use herodb::zaz::create_zaz_db; - -// Create a DB with all zaz models registered -let db = create_zaz_db("/path/to/db")?; - -// Use the DB with specific model types -let user = User::new(...); -db.set(&user)?; -let retrieved: User = db.get(&id)?; -``` - -### Option 2: Builder Pattern - -For more control, use the builder pattern to register only the models you need: - -```rust -use herodb::core::{DBBuilder, DB}; -use herodb::zaz::models::{User, Company}; - -// Create a DB with only User and Company models -let db = DBBuilder::new("/path/to/db") - .register_model::() - .register_model::() - .build()?; -``` - -### Option 3: Dynamic Registration - -You can also register models with an existing DB: - -```rust -use herodb::core::DB; -use herodb::zaz::models::User; - -// Create an empty DB -let mut db = DB::new("/path/to/db")?; - -// Register the User model -db.register::()?; -``` - -## Benefits of this Architecture - -1. **Modularity**: The core DB code doesn't need to change when models change -2. **Extensibility**: New model types can be added without modifying core DB code -3. **Flexibility**: Different modules can define and use their own models with the same DB code -4. **Type Safety**: Full compile-time type checking is maintained - -## Implementation Details - -The key to this architecture is the combination of generic types and trait objects: - -- `SledDB` provides type-safe operations for specific model types -- `AnyDbOperations` trait allows type-erased operations through a common interface -- `TypeId` mapping enables runtime lookup of the correct DB for a given model type diff --git a/herodb/src/cmd/dbexample/db_tests.rs b/herodb/src/cmd/dbexample/db_tests.rs deleted file mode 100644 index b29dece..0000000 --- a/herodb/src/cmd/dbexample/db_tests.rs +++ /dev/null @@ -1,168 +0,0 @@ -//! Integration tests for zaz database module - -#[cfg(test)] -mod tests { - use sled; - use bincode; - use chrono::{DateTime, Utc}; - use serde::{Deserialize, Serialize}; - use std::path::Path; - use tempfile::tempdir; - use std::collections::HashMap; - - /// Test model for database operations - #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] - struct User { - id: u32, - name: String, - email: String, - balance: f64, - created_at: DateTime, - updated_at: DateTime, - } - - impl User { - fn new(id: u32, name: String, email: String, balance: f64) -> Self { - let now = Utc::now(); - Self { - id, - name, - email, - balance, - created_at: now, - updated_at: now, - } - } - } - - /// Test basic CRUD operations - #[test] - fn test_basic_crud() { - // Create a temporary directory for testing - let temp_dir = tempdir().expect("Failed to create temp directory"); - println!("Created temporary directory at: {:?}", temp_dir.path()); - - // Open a sled database in the temporary directory - let db = sled::open(temp_dir.path().join("users")).expect("Failed to open database"); - println!("Opened database at: {:?}", temp_dir.path().join("users")); - - // CREATE a user - let user = User::new(1, "Test User".to_string(), "test@example.com".to_string(), 100.0); - let user_key = user.id.to_string(); - let user_value = bincode::serialize(&user).expect("Failed to serialize user"); - db.insert(user_key.as_bytes(), user_value).expect("Failed to insert user"); - db.flush().expect("Failed to flush database"); - println!("Created user: {} ({})", user.name, user.email); - - // READ the user - let result = db.get(user_key.as_bytes()).expect("Failed to query database"); - assert!(result.is_some(), "User should exist"); - if let Some(data) = result { - let retrieved_user: User = bincode::deserialize(&data).expect("Failed to deserialize user"); - println!("Retrieved user: {} ({})", retrieved_user.name, retrieved_user.email); - assert_eq!(user, retrieved_user, "Retrieved user should match original"); - } - - // UPDATE the user - let updated_user = User::new(1, "Updated User".to_string(), "updated@example.com".to_string(), 150.0); - let updated_value = bincode::serialize(&updated_user).expect("Failed to serialize updated user"); - db.insert(user_key.as_bytes(), updated_value).expect("Failed to update user"); - db.flush().expect("Failed to flush database"); - println!("Updated user: {} ({})", updated_user.name, updated_user.email); - - let result = db.get(user_key.as_bytes()).expect("Failed to query database"); - if let Some(data) = result { - let retrieved_user: User = bincode::deserialize(&data).expect("Failed to deserialize user"); - assert_eq!(updated_user, retrieved_user, "Retrieved user should match updated version"); - } else { - panic!("User should exist after update"); - } - - // DELETE the user - db.remove(user_key.as_bytes()).expect("Failed to delete user"); - db.flush().expect("Failed to flush database"); - println!("Deleted user"); - - let result = db.get(user_key.as_bytes()).expect("Failed to query database"); - assert!(result.is_none(), "User should be deleted"); - - // Clean up - drop(db); - temp_dir.close().expect("Failed to cleanup temporary directory"); - } - - /// Test transaction-like behavior with multiple operations - #[test] - fn test_transaction_behavior() { - // Create a temporary directory for testing - let temp_dir = tempdir().expect("Failed to create temp directory"); - println!("Created temporary directory at: {:?}", temp_dir.path()); - - // Open a sled database in the temporary directory - let db = sled::open(temp_dir.path().join("tx_test")).expect("Failed to open database"); - println!("Opened transaction test database at: {:?}", temp_dir.path().join("tx_test")); - - // Create initial users - let user1 = User::new(1, "User One".to_string(), "one@example.com".to_string(), 100.0); - let user2 = User::new(2, "User Two".to_string(), "two@example.com".to_string(), 50.0); - - // Insert initial users - db.insert(user1.id.to_string().as_bytes(), bincode::serialize(&user1).unwrap()).unwrap(); - db.insert(user2.id.to_string().as_bytes(), bincode::serialize(&user2).unwrap()).unwrap(); - db.flush().unwrap(); - println!("Inserted initial users"); - - // Simulate a transaction - transfer 25.0 from user1 to user2 - println!("Starting transaction simulation: transfer 25.0 from user1 to user2"); - - // Create transaction workspace - let mut tx_workspace = HashMap::new(); - - // Retrieve current state - if let Some(data) = db.get(user1.id.to_string().as_bytes()).unwrap() { - let user: User = bincode::deserialize(&data).unwrap(); - tx_workspace.insert(user1.id.to_string(), user); - } - - if let Some(data) = db.get(user2.id.to_string().as_bytes()).unwrap() { - let user: User = bincode::deserialize(&data).unwrap(); - tx_workspace.insert(user2.id.to_string(), user); - } - - // Modify both users in the transaction - let mut updated_user1 = tx_workspace.get(&user1.id.to_string()).unwrap().clone(); - let mut updated_user2 = tx_workspace.get(&user2.id.to_string()).unwrap().clone(); - - updated_user1.balance -= 25.0; - updated_user2.balance += 25.0; - - // Update the workspace - tx_workspace.insert(user1.id.to_string(), updated_user1); - tx_workspace.insert(user2.id.to_string(), updated_user2); - - // Commit the transaction - println!("Committing transaction"); - for (key, user) in tx_workspace { - let user_bytes = bincode::serialize(&user).unwrap(); - db.insert(key.as_bytes(), user_bytes).unwrap(); - } - db.flush().unwrap(); - - // Verify the results - if let Some(data) = db.get(user1.id.to_string().as_bytes()).unwrap() { - let final_user1: User = bincode::deserialize(&data).unwrap(); - assert_eq!(final_user1.balance, 75.0, "User1 balance should be 75.0"); - println!("Verified user1 balance is now {}", final_user1.balance); - } - - if let Some(data) = db.get(user2.id.to_string().as_bytes()).unwrap() { - let final_user2: User = bincode::deserialize(&data).unwrap(); - assert_eq!(final_user2.balance, 75.0, "User2 balance should be 75.0"); - println!("Verified user2 balance is now {}", final_user2.balance); - } - - // Clean up - drop(db); - temp_dir.close().expect("Failed to cleanup temporary directory"); - } -} diff --git a/herodb/src/cmd/dbexample/examples.rs b/herodb/src/cmd/dbexample/examples.rs deleted file mode 100644 index 199d074..0000000 --- a/herodb/src/cmd/dbexample/examples.rs +++ /dev/null @@ -1,64 +0,0 @@ -// Examples for using the Zaz database - -use crate::zaz::models::*; -use crate::zaz::factory::create_zaz_db; -use std::path::PathBuf; -use chrono::Utc; - -/// Run a simple example of the DB operations -pub fn run_db_examples() -> Result<(), Box> { - println!("Running Zaz DB examples..."); - - // Create a temp DB path - let db_path = PathBuf::from("/tmp/zaz-examples"); - std::fs::create_dir_all(&db_path)?; - - // Create DB instance - let db = create_zaz_db(&db_path)?; - - // Example 1: User operations - println!("\n--- User Examples ---"); - let user = User::new( - 1, - "John Doe".to_string(), - "john@example.com".to_string(), - "secure123".to_string(), - "Example Corp".to_string(), - "User".to_string(), - ); - - db.set(&user)?; - println!("Inserted user: {}", user.name); - - let retrieved_user = db.get::(&user.id.to_string())?; - println!("Retrieved user: {} ({})", retrieved_user.name, retrieved_user.email); - - // Example 2: Company operations - println!("\n--- Company Examples ---"); - let company = Company::new( - 1, - "Example Corp".to_string(), - "EX123456".to_string(), - Utc::now(), - "12-31".to_string(), - "info@example.com".to_string(), - "123-456-7890".to_string(), - "www.example.com".to_string(), - "123 Example St, Example City".to_string(), - BusinessType::Global, - "Technology".to_string(), - "An example company".to_string(), - CompanyStatus::Active, - ); - - db.set(&company)?; - println!("Inserted company: {}", company.name); - - let companies = db.list::()?; - println!("Found {} companies", companies.len()); - - // Clean up - std::fs::remove_dir_all(db_path)?; - - Ok(()) -} diff --git a/herodb/src/cmd/dbexample/factory.rs b/herodb/src/cmd/dbexample/factory.rs deleted file mode 100644 index b59c8d0..0000000 --- a/herodb/src/cmd/dbexample/factory.rs +++ /dev/null @@ -1,33 +0,0 @@ -//! Factory module for creating a DB with all zaz models registered - -use crate::core::{DB, DBBuilder, SledDBResult}; -use crate::zaz::models::*; -use std::path::PathBuf; - -/// Create a new DB instance with all zaz models registered -pub fn create_zaz_db>(path: P) -> SledDBResult { - // Using the builder pattern to register all models - DBBuilder::new(path) - .register_model::() - .register_model::() - .register_model::() - .register_model::() - .register_model::() - .register_model::() - .register_model::() - .build() -} - -/// Register all zaz models with an existing DB instance -pub fn register_zaz_models(db: &mut DB) -> SledDBResult<()> { - // Dynamically register all zaz models - db.register::()?; - db.register::()?; - db.register::()?; - db.register::()?; - db.register::()?; - db.register::()?; - db.register::()?; - - Ok(()) -} \ No newline at end of file diff --git a/herodb/src/cmd/dbexample_governance/main.rs b/herodb/src/cmd/dbexample_gov/main.rs similarity index 94% rename from herodb/src/cmd/dbexample_governance/main.rs rename to herodb/src/cmd/dbexample_gov/main.rs index 0ac3b99..c344fee 100644 --- a/herodb/src/cmd/dbexample_governance/main.rs +++ b/herodb/src/cmd/dbexample_gov/main.rs @@ -1,6 +1,6 @@ use chrono::{Utc, Duration}; -use herodb::db::DBBuilder; -use herodb::models::governance::{ +use herodb::db::{DBBuilder, SledDB, SledModel}; +use herodb::models::gov::{ Company, CompanyStatus, BusinessType, Shareholder, ShareholderType, Meeting, Attendee, MeetingStatus, AttendeeRole, AttendeeStatus, @@ -12,11 +12,11 @@ use std::path::PathBuf; use std::fs; fn main() -> Result<(), Box> { - println!("DB Example: Governance Module"); + println!("DB Example: Gov Module"); println!("============================"); // Create a temporary directory for the database - let db_path = PathBuf::from("/tmp/dbexample_governance"); + let db_path = PathBuf::from("/tmp/dbexample_gov"); if db_path.exists() { fs::remove_dir_all(&db_path)?; } @@ -54,7 +54,7 @@ fn main() -> Result<(), Box> { ); // Insert the company - db.insert(&company)?; + db.set(&company)?; println!("Company created: {} (ID: {})", company.name, company.id); println!("Status: {:?}, Business Type: {:?}", company.status, company.business_type); @@ -90,9 +90,9 @@ fn main() -> Result<(), Box> { ); // Insert the users - db.insert(&user1)?; - db.insert(&user2)?; - db.insert(&user3)?; + db.set(&user1)?; + db.set(&user2)?; + db.set(&user3)?; println!("User created: {} ({})", user1.name, user1.role); println!("User created: {} ({})", user2.name, user2.role); @@ -133,9 +133,9 @@ fn main() -> Result<(), Box> { ); // Insert the shareholders - db.insert(&shareholder1)?; - db.insert(&shareholder2)?; - db.insert(&shareholder3)?; + db.set(&shareholder1)?; + db.set(&shareholder2)?; + db.set(&shareholder3)?; println!("Shareholder created: {} ({} shares, {}%)", shareholder1.name, shareholder1.shares, shareholder1.percentage); @@ -146,7 +146,7 @@ fn main() -> Result<(), Box> { // Update shareholder shares shareholder1.update_shares(1100.0, 44.0); - db.insert(&shareholder1)?; + db.set(&shareholder1)?; println!("Updated shareholder: {} ({} shares, {}%)", shareholder1.name, shareholder1.shares, shareholder1.percentage); @@ -194,7 +194,7 @@ fn main() -> Result<(), Box> { meeting.add_attendee(attendee3); // Insert the meeting - db.insert(&meeting)?; + db.set(&meeting)?; println!("Meeting created: {} ({})", meeting.title, meeting.date.format("%Y-%m-%d %H:%M")); println!("Status: {:?}, Attendees: {}", meeting.status, meeting.attendees.len()); @@ -205,7 +205,7 @@ fn main() -> Result<(), Box> { if let Some(attendee) = meeting.find_attendee_by_user_id_mut(user3.id) { attendee.update_status(AttendeeStatus::Confirmed); } - db.insert(&meeting)?; + db.set(&meeting)?; // Get confirmed attendees let confirmed = meeting.confirmed_attendees(); @@ -238,19 +238,19 @@ fn main() -> Result<(), Box> { resolution.link_to_meeting(meeting.id); // Insert the resolution - db.insert(&resolution)?; + db.set(&resolution)?; println!("Resolution created: {} (Status: {:?})", resolution.title, resolution.status); // Propose the resolution resolution.propose(); - db.insert(&resolution)?; + db.set(&resolution)?; println!("Resolution proposed on {}", resolution.proposed_at.format("%Y-%m-%d")); // Add approvals resolution.add_approval(user1.id, user1.name.clone(), true, "Approved as proposed".to_string()); resolution.add_approval(user2.id, user2.name.clone(), true, "Financials look good".to_string()); resolution.add_approval(user3.id, user3.name.clone(), true, "No concerns".to_string()); - db.insert(&resolution)?; + db.set(&resolution)?; // Check approval status println!("Approvals: {}, Rejections: {}", @@ -259,7 +259,7 @@ fn main() -> Result<(), Box> { // Approve the resolution resolution.approve(); - db.insert(&resolution)?; + db.set(&resolution)?; println!("Resolution approved on {}", resolution.approved_at.unwrap().format("%Y-%m-%d")); @@ -283,7 +283,7 @@ fn main() -> Result<(), Box> { vote.add_option("Abstain".to_string(), 0); // Insert the vote - db.insert(&vote)?; + db.set(&vote)?; println!("Vote created: {} (Status: {:?})", vote.title, vote.status); println!("Voting period: {} to {}", vote.start_date.format("%Y-%m-%d"), @@ -293,7 +293,7 @@ fn main() -> Result<(), Box> { vote.add_ballot(user1.id, 1, 1000); // User 1 votes "Approve" with 1000 shares vote.add_ballot(user2.id, 1, 750); // User 2 votes "Approve" with 750 shares vote.add_ballot(user3.id, 3, 750); // User 3 votes "Abstain" with 750 shares - db.insert(&vote)?; + db.set(&vote)?; // Check voting results println!("Voting results:"); @@ -314,7 +314,7 @@ fn main() -> Result<(), Box> { // Link the resolution to the vote vote_resolution.link_to_vote(vote.id); vote_resolution.propose(); - db.insert(&vote_resolution)?; + db.set(&vote_resolution)?; println!("Created resolution linked to vote: {}", vote_resolution.title); println!("\n7. Retrieving Related Objects"); diff --git a/herodb/src/cmd/dbexample_governance/Cargo.lock b/herodb/src/cmd/dbexample_governance/Cargo.lock deleted file mode 100644 index cddb29b..0000000 --- a/herodb/src/cmd/dbexample_governance/Cargo.lock +++ /dev/null @@ -1,2161 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 4 - -[[package]] -name = "addr2line" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler2" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" - -[[package]] -name = "aead" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" -dependencies = [ - "crypto-common", - "generic-array", -] - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aes-gcm" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "ghash", - "subtle", -] - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "const-random", - "getrandom 0.2.15", - "once_cell", - "version_check", - "zerocopy 0.7.35", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "async-trait" -version = "0.1.88" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "autocfg" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" - -[[package]] -name = "backtrace" -version = "0.3.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-targets", -] - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "brotli" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d640d25bc63c50fb1f0b545ffd80207d2e10a4c965530809b40ba3386825c391" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - -[[package]] -name = "bumpalo" -version = "3.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" - -[[package]] -name = "cc" -version = "1.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" -dependencies = [ - "shlex", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "serde", - "wasm-bindgen", - "windows-link", -] - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "const-random" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" -dependencies = [ - "const-random-macro", -] - -[[package]] -name = "const-random-macro" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" -dependencies = [ - "getrandom 0.2.15", - "once_cell", - "tiny-keccak", -] - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "cookie" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7efb37c3e1ccb1ff97164ad95ac1606e8ccd35b3fa0a7d99a304c7f4a428cc24" -dependencies = [ - "aes-gcm", - "base64", - "hkdf", - "hmac", - "percent-encoding", - "rand", - "sha2", - "subtle", - "time", - "version_check", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" - -[[package]] -name = "cpufeatures" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" - -[[package]] -name = "crunchy" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "rand_core", - "typenum", -] - -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] - -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "dbexample_governance" -version = "0.1.0" -dependencies = [ - "chrono", - "herodb", -] - -[[package]] -name = "deranged" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28cfac68e08048ae1883171632c2aef3ebc555621ae56fbccce1cbf22dd7f058" -dependencies = [ - "powerfmt", -] - -[[package]] -name = "derive_more" -version = "0.99.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da29a38df43d6f156149c9b43ded5e018ddff2a855cf2cfd62e8cd7d079c69f" -dependencies = [ - "convert_case", - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.100", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", - "subtle", -] - -[[package]] -name = "encoding_rs" -version = "0.8.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "equivalent" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" - -[[package]] -name = "errno" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" -dependencies = [ - "libc", - "windows-sys 0.59.0", -] - -[[package]] -name = "fastrand" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi", -] - -[[package]] -name = "futures-channel" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" -dependencies = [ - "futures-core", -] - -[[package]] -name = "futures-core" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" - -[[package]] -name = "futures-macro" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "futures-sink" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" - -[[package]] -name = "futures-task" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" - -[[package]] -name = "futures-util" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" -dependencies = [ - "futures-core", - "futures-macro", - "futures-sink", - "futures-task", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" -dependencies = [ - "cfg-if", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", -] - -[[package]] -name = "getrandom" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" -dependencies = [ - "cfg-if", - "libc", - "r-efi", - "wasi 0.14.2+wasi-0.2.4", -] - -[[package]] -name = "ghash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0d8a4362ccb29cb0b265253fb0a2728f592895ee6854fd9bc13f2ffda266ff1" -dependencies = [ - "opaque-debug", - "polyval", -] - -[[package]] -name = "gimli" -version = "0.31.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" - -[[package]] -name = "h2" -version = "0.3.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap 2.8.0", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" - -[[package]] -name = "headers" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" -dependencies = [ - "base64", - "bytes", - "headers-core", - "http", - "httpdate", - "mime", - "sha1", -] - -[[package]] -name = "headers-core" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" -dependencies = [ - "http", -] - -[[package]] -name = "herodb" -version = "0.1.0" -dependencies = [ - "bincode", - "brotli", - "chrono", - "lazy_static", - "paste", - "poem", - "poem-openapi", - "rhai", - "serde", - "serde_json", - "sled", - "tempfile", - "thiserror", - "tokio", - "uuid", -] - -[[package]] -name = "hkdf" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" -dependencies = [ - "hmac", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http", - "pin-project-lite", -] - -[[package]] -name = "httparse" -version = "1.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "hyper" -version = "0.14.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "log", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - -[[package]] -name = "indexmap" -version = "2.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" -dependencies = [ - "equivalent", - "hashbrown 0.15.2", -] - -[[package]] -name = "inout" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879f10e63c20629ecabbb64a8010319738c66a5cd0c29b02d63d272b03751d01" -dependencies = [ - "generic-array", -] - -[[package]] -name = "instant" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "itoa" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" - -[[package]] -name = "js-sys" -version = "0.3.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" -dependencies = [ - "once_cell", - "wasm-bindgen", -] - -[[package]] -name = "lazy_static" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" - -[[package]] -name = "libc" -version = "0.2.171" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" - -[[package]] -name = "linux-raw-sys" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" - -[[package]] -name = "lock_api" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" - -[[package]] -name = "memchr" -version = "2.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "miniz_oxide" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff70ce3e48ae43fa075863cef62e8b43b71a4f2382229920e0df362592919430" -dependencies = [ - "adler2", -] - -[[package]] -name = "mio" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" -dependencies = [ - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", -] - -[[package]] -name = "multer" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01acbdc23469fd8fe07ab135923371d5f5a422fbf9c522158677c8eb15bc51c2" -dependencies = [ - "bytes", - "encoding_rs", - "futures-util", - "http", - "httparse", - "log", - "memchr", - "mime", - "spin", - "tokio", - "version_check", -] - -[[package]] -name = "nix" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" -dependencies = [ - "bitflags 2.9.0", - "cfg-if", - "libc", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-traits" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" -dependencies = [ - "autocfg", -] - -[[package]] -name = "object" -version = "0.36.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" -dependencies = [ - "memchr", -] - -[[package]] -name = "once_cell" -version = "1.21.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" -dependencies = [ - "portable-atomic", -] - -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - -[[package]] -name = "parking_lot" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" -dependencies = [ - "instant", - "lock_api", - "parking_lot_core 0.8.6", -] - -[[package]] -name = "parking_lot" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" -dependencies = [ - "lock_api", - "parking_lot_core 0.9.10", -] - -[[package]] -name = "parking_lot_core" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a2cfe6f0ad2bfc16aefa463b497d5c7a5ecd44a23efa72aa342d90177356dc" -dependencies = [ - "cfg-if", - "instant", - "libc", - "redox_syscall 0.2.16", - "smallvec", - "winapi", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall 0.5.10", - "smallvec", - "windows-targets", -] - -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "pin-project-lite" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "poem" -version = "1.3.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "504774c97b0744c1ee108a37e5a65a9745a4725c4c06277521dabc28eb53a904" -dependencies = [ - "async-trait", - "bytes", - "chrono", - "cookie", - "futures-util", - "headers", - "http", - "hyper", - "mime", - "multer", - "nix", - "parking_lot 0.12.3", - "percent-encoding", - "pin-project-lite", - "poem-derive", - "quick-xml 0.30.0", - "regex", - "rfc7239", - "serde", - "serde_json", - "serde_urlencoded", - "serde_yaml", - "smallvec", - "tempfile", - "thiserror", - "time", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", - "wildmatch", -] - -[[package]] -name = "poem-derive" -version = "1.3.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ddcf4680d8d867e1e375116203846acb088483fa2070244f90589f458bbb31" -dependencies = [ - "proc-macro-crate 2.0.2", - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "poem-openapi" -version = "2.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e26f78b6195ea1b7a16f46bda1961c598e5a66912f2aa1b8b7a2f395aebb9fc" -dependencies = [ - "base64", - "bytes", - "derive_more", - "futures-util", - "mime", - "num-traits", - "poem", - "poem-openapi-derive", - "quick-xml 0.26.0", - "regex", - "serde", - "serde_json", - "serde_urlencoded", - "serde_yaml", - "thiserror", - "tokio", -] - -[[package]] -name = "poem-openapi-derive" -version = "2.0.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88c3e2975c930dc72c024e75b230c3b6058fb3a746d5739b83aa8f28ab1a42d4" -dependencies = [ - "darling", - "http", - "indexmap 1.9.3", - "mime", - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "regex", - "syn 1.0.109", - "thiserror", -] - -[[package]] -name = "polyval" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d1fe60d06143b2430aa532c94cfe9e29783047f06c0d7fd359a9a51b729fa25" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug", - "universal-hash", -] - -[[package]] -name = "portable-atomic" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy 0.8.24", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro-crate" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" -dependencies = [ - "toml_datetime", - "toml_edit 0.20.2", -] - -[[package]] -name = "proc-macro2" -version = "1.0.94" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quick-xml" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "quick-xml" -version = "0.30.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff6510e86862b57b210fd8cbe8ed3f0d7d600b9c2863cd4549a2e033c66e956" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "quote" -version = "1.0.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "r-efi" -version = "5.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.15", -] - -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" -dependencies = [ - "bitflags 2.9.0", -] - -[[package]] -name = "regex" -version = "1.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" - -[[package]] -name = "rfc7239" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a82f1d1e38e9a85bb58ffcfadf22ed6f2c94e8cd8581ec2b0f80a2a6858350f" -dependencies = [ - "uncased", -] - -[[package]] -name = "rhai" -version = "1.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce4d759a4729a655ddfdbb3ff6e77fb9eadd902dae12319455557796e435d2a6" -dependencies = [ - "ahash", - "bitflags 2.9.0", - "instant", - "num-traits", - "once_cell", - "rhai_codegen", - "smallvec", - "smartstring", - "thin-vec", -] - -[[package]] -name = "rhai_codegen" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5a11a05ee1ce44058fa3d5961d05194fdbe3ad6b40f904af764d81b86450e6b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" - -[[package]] -name = "rustc_version" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "1.0.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" -dependencies = [ - "bitflags 2.9.0", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.59.0", -] - -[[package]] -name = "rustversion" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" - -[[package]] -name = "ryu" -version = "1.0.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "semver" -version = "1.0.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" - -[[package]] -name = "serde" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.219" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "serde_json" -version = "1.0.140" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" -dependencies = [ - "itoa", - "memchr", - "ryu", - "serde", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_yaml" -version = "0.9.34+deprecated" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" -dependencies = [ - "indexmap 2.8.0", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook-registry" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" -dependencies = [ - "libc", -] - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "sled" -version = "0.34.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f96b4737c2ce5987354855aed3797279def4ebf734436c6aa4552cf8e169935" -dependencies = [ - "crc32fast", - "crossbeam-epoch", - "crossbeam-utils", - "fs2", - "fxhash", - "libc", - "log", - "parking_lot 0.11.2", -] - -[[package]] -name = "smallvec" -version = "1.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" - -[[package]] -name = "smartstring" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb72c633efbaa2dd666986505016c32c3044395ceaf881518399d2f4127ee29" -dependencies = [ - "autocfg", - "static_assertions", - "version_check", -] - -[[package]] -name = "socket2" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "subtle" -version = "2.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "tempfile" -version = "3.19.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" -dependencies = [ - "fastrand", - "getrandom 0.3.2", - "once_cell", - "rustix", - "windows-sys 0.59.0", -] - -[[package]] -name = "thin-vec" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "144f754d318415ac792f9d69fc87abbbfc043ce2ef041c60f16ad828f638717d" - -[[package]] -name = "thiserror" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "time" -version = "0.3.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" - -[[package]] -name = "time-macros" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tokio" -version = "1.44.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "parking_lot 0.12.3", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "windows-sys 0.52.0", -] - -[[package]] -name = "tokio-macros" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "tokio-stream" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "toml_datetime" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.8.0", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" -dependencies = [ - "indexmap 2.8.0", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tower-service" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" - -[[package]] -name = "tracing" -version = "0.1.41" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" -dependencies = [ - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "tracing-core" -version = "0.1.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" -dependencies = [ - "once_cell", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "typenum" -version = "1.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" - -[[package]] -name = "uncased" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-ident" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" - -[[package]] -name = "universal-hash" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" -dependencies = [ - "crypto-common", - "subtle", -] - -[[package]] -name = "unsafe-libyaml" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" - -[[package]] -name = "uuid" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" -dependencies = [ - "getrandom 0.3.2", - "serde", -] - -[[package]] -name = "version_check" -version = "0.9.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasi" -version = "0.14.2+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" -dependencies = [ - "wit-bindgen-rt", -] - -[[package]] -name = "wasm-bindgen" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" -dependencies = [ - "cfg-if", - "once_cell", - "rustversion", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" -dependencies = [ - "bumpalo", - "log", - "proc-macro2", - "quote", - "syn 2.0.100", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "wildmatch" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ce1ab1f8c62655ebe1350f589c61e505cf94d385bc6a12899442d9081e71fd" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.61.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-implement" -version = "0.60.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "windows-interface" -version = "0.59.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "windows-link" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" - -[[package]] -name = "windows-result" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets", -] - -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "wit-bindgen-rt" -version = "0.39.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" -dependencies = [ - "bitflags 2.9.0", -] - -[[package]] -name = "zerocopy" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" -dependencies = [ - "zerocopy-derive 0.7.35", -] - -[[package]] -name = "zerocopy" -version = "0.8.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" -dependencies = [ - "zerocopy-derive 0.8.24", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", -] diff --git a/herodb/src/cmd/dbexample_governance/Cargo.toml b/herodb/src/cmd/dbexample_governance/Cargo.toml deleted file mode 100644 index 0b589b7..0000000 --- a/herodb/src/cmd/dbexample_governance/Cargo.toml +++ /dev/null @@ -1,12 +0,0 @@ -[package] -name = "dbexample_governance" -version = "0.1.0" -edition = "2021" - -[[bin]] -name = "dbexample_governance" -path = "main.rs" - -[dependencies] -herodb = { path = "../../.." } -chrono = "0.4" \ No newline at end of file diff --git a/herodb/src/cmd/dbexample2/main.rs b/herodb/src/cmd/dbexample_prod/main.rs similarity index 100% rename from herodb/src/cmd/dbexample2/main.rs rename to herodb/src/cmd/dbexample_prod/main.rs diff --git a/herodb/src/models/governance/GOVERNANCE_ENHANCEMENT_PLAN.md b/herodb/src/models/gov/GOVERNANCE_ENHANCEMENT_PLAN.md similarity index 99% rename from herodb/src/models/governance/GOVERNANCE_ENHANCEMENT_PLAN.md rename to herodb/src/models/gov/GOVERNANCE_ENHANCEMENT_PLAN.md index 8153489..6e31a4b 100644 --- a/herodb/src/models/governance/GOVERNANCE_ENHANCEMENT_PLAN.md +++ b/herodb/src/models/gov/GOVERNANCE_ENHANCEMENT_PLAN.md @@ -115,7 +115,7 @@ pub mod governance; use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use crate::db::{SledModel, Storable, SledDB, SledDBError}; -use crate::models::governance::{Meeting, Vote}; +use crate::models::gov::{Meeting, Vote}; /// ResolutionStatus represents the status of a resolution #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] diff --git a/herodb/src/models/governance/README.md b/herodb/src/models/gov/README.md similarity index 100% rename from herodb/src/models/governance/README.md rename to herodb/src/models/gov/README.md diff --git a/herodb/src/models/governance/committee.rs b/herodb/src/models/gov/committee.rs similarity index 99% rename from herodb/src/models/governance/committee.rs rename to herodb/src/models/gov/committee.rs index 04ff00f..c7977f9 100644 --- a/herodb/src/models/governance/committee.rs +++ b/herodb/src/models/gov/committee.rs @@ -1,7 +1,7 @@ use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use crate::db::{SledModel, Storable, SledDB, SledDBError}; -use crate::models::governance::User; +use crate::models::gov::User; /// CommitteeRole represents the role of a member in a committee #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] diff --git a/herodb/src/models/governance/company.rs b/herodb/src/models/gov/company.rs similarity index 95% rename from herodb/src/models/governance/company.rs rename to herodb/src/models/gov/company.rs index 0ab0a2c..d224197 100644 --- a/herodb/src/models/governance/company.rs +++ b/herodb/src/models/gov/company.rs @@ -123,8 +123,8 @@ impl Company { } /// Get all resolutions for this company - pub fn get_resolutions(&self, db: &SledDB) -> Result, SledDBError> { - let all_resolutions = db.list()?; + pub fn get_resolutions(&self, db: &crate::db::DB) -> Result, SledDBError> { + let all_resolutions = db.list::()?; let company_resolutions = all_resolutions .into_iter() .filter(|resolution| resolution.company_id == self.id) diff --git a/herodb/src/models/governance/compliance.rs b/herodb/src/models/gov/compliance.rs similarity index 99% rename from herodb/src/models/governance/compliance.rs rename to herodb/src/models/gov/compliance.rs index d3f8bbf..9f8063e 100644 --- a/herodb/src/models/governance/compliance.rs +++ b/herodb/src/models/gov/compliance.rs @@ -1,7 +1,7 @@ use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use crate::db::{SledModel, Storable, SledDB, SledDBError}; -use crate::models::governance::Company; +use crate::models::gov::Company; /// ComplianceRequirement represents a regulatory requirement #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] diff --git a/herodb/src/models/governance/meeting.rs b/herodb/src/models/gov/meeting.rs similarity index 96% rename from herodb/src/models/governance/meeting.rs rename to herodb/src/models/gov/meeting.rs index 6b15ef7..c355840 100644 --- a/herodb/src/models/governance/meeting.rs +++ b/herodb/src/models/gov/meeting.rs @@ -164,8 +164,8 @@ impl Meeting { } /// Get all resolutions discussed in this meeting - pub fn get_resolutions(&self, db: &SledDB) -> Result, SledDBError> { - let all_resolutions = db.list()?; + pub fn get_resolutions(&self, db: &crate::db::DB) -> Result, SledDBError> { + let all_resolutions = db.list::()?; let meeting_resolutions = all_resolutions .into_iter() .filter(|resolution| resolution.meeting_id == Some(self.id)) diff --git a/herodb/src/models/governance/mod.rs b/herodb/src/models/gov/mod.rs similarity index 100% rename from herodb/src/models/governance/mod.rs rename to herodb/src/models/gov/mod.rs diff --git a/herodb/src/models/governance/resolution.rs b/herodb/src/models/gov/resolution.rs similarity index 93% rename from herodb/src/models/governance/resolution.rs rename to herodb/src/models/gov/resolution.rs index 59fe9a8..1416e35 100644 --- a/herodb/src/models/governance/resolution.rs +++ b/herodb/src/models/gov/resolution.rs @@ -1,7 +1,7 @@ use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; use crate::db::{SledModel, Storable, SledDB, SledDBError}; -use crate::models::governance::{Meeting, Vote}; +use crate::models::gov::{Meeting, Vote}; /// ResolutionStatus represents the status of a resolution #[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)] @@ -158,10 +158,10 @@ impl Resolution { } /// Get the meeting associated with this resolution - pub fn get_meeting(&self, db: &SledDB) -> Result, SledDBError> { + pub fn get_meeting(&self, db: &crate::db::DB) -> Result, SledDBError> { match self.meeting_id { Some(meeting_id) => { - let meeting = db.get(&meeting_id.to_string())?; + let meeting = db.get::(&meeting_id.to_string())?; Ok(Some(meeting)) } None => Ok(None), @@ -169,10 +169,10 @@ impl Resolution { } /// Get the vote associated with this resolution - pub fn get_vote(&self, db: &SledDB) -> Result, SledDBError> { + pub fn get_vote(&self, db: &crate::db::DB) -> Result, SledDBError> { match self.vote_id { Some(vote_id) => { - let vote = db.get(&vote_id.to_string())?; + let vote = db.get::(&vote_id.to_string())?; Ok(Some(vote)) } None => Ok(None), diff --git a/herodb/src/models/governance/shareholder.rs b/herodb/src/models/gov/shareholder.rs similarity index 100% rename from herodb/src/models/governance/shareholder.rs rename to herodb/src/models/gov/shareholder.rs diff --git a/herodb/src/models/governance/user.rs b/herodb/src/models/gov/user.rs similarity index 100% rename from herodb/src/models/governance/user.rs rename to herodb/src/models/gov/user.rs diff --git a/herodb/src/models/governance/vote.rs b/herodb/src/models/gov/vote.rs similarity index 95% rename from herodb/src/models/governance/vote.rs rename to herodb/src/models/gov/vote.rs index 93406d5..5080f73 100644 --- a/herodb/src/models/governance/vote.rs +++ b/herodb/src/models/gov/vote.rs @@ -128,8 +128,8 @@ impl Vote { } /// Get the resolution associated with this vote - pub fn get_resolution(&self, db: &SledDB) -> Result, SledDBError> { - let all_resolutions = db.list()?; + pub fn get_resolution(&self, db: &crate::db::DB) -> Result, SledDBError> { + let all_resolutions = db.list::()?; let vote_resolution = all_resolutions .into_iter() .find(|resolution| resolution.vote_id == Some(self.id)); diff --git a/herodb/src/models/mod.rs b/herodb/src/models/mod.rs index bc6d16a..1c3df0f 100644 --- a/herodb/src/models/mod.rs +++ b/herodb/src/models/mod.rs @@ -1,4 +1,4 @@ pub mod biz; pub mod mcc; pub mod circle; -pub mod governance; \ No newline at end of file +pub mod gov; \ No newline at end of file diff --git a/herodb/tmp/dbexample2/currency/conf b/herodb/tmp/dbexample2/currency/conf new file mode 100644 index 0000000..4154d7c --- /dev/null +++ b/herodb/tmp/dbexample2/currency/conf @@ -0,0 +1,4 @@ +segment_size: 524288 +use_compression: false +version: 0.34 +vQÁ \ No newline at end of file diff --git a/herodb/tmp/dbexample2/currency/db b/herodb/tmp/dbexample2/currency/db new file mode 100644 index 0000000000000000000000000000000000000000..8fa8e24ce06c91bd171a2852bc8abbae8df28c24 GIT binary patch literal 524287 zcmeIuF-ijg5CzcLtgcHCf?8T7$FQ;S1d8<{$%;i#ObkRUBHGyG5K2(+2suD31hMuC zR(66#5?H;1#rw_7z|0hHK7DD-tBj(`_3r5XCtLRC53}KF5=neEZ}0OwYQGEd)#{(+ z^+>BZNuu_8GaY9e5sjkgcgs#ubjstSLH8mZrXN|owLD#K4|=`ww0*gAc(Av%y%{lC zyL)_|G{-0VZ%D}T>b0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N z0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+ z009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBly zK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 z2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N z0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+ z009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBly zK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 z2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N z0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+ z009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBly zK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 z2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N z0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+ z009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBly zK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U zAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C7 z2oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N z0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+ z009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBly zK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF z5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk z1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs z0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZ zfB*pk1PBlyK!5-N0t5&UAV7cs0RjXF5FkK+009C72oNAZfB*pk1PBlyK!5-N0t5&U TAV7cs0RjXF5FkL{p9w4g*xD*) literal 0 HcmV?d00001 diff --git a/herodb/tmp/dbexample2/currency/snap.000000000000008A b/herodb/tmp/dbexample2/currency/snap.000000000000008A new file mode 100644 index 0000000000000000000000000000000000000000..65dfc915a939f3c5183c252bc6da4a7640f6a7c7 GIT binary patch literal 80 vcmeBXfB;5DcPNX&U6N4-#+Kn^QiZWq1rlJ)1T98W7~53H1d{tdEh8}5np*>>Yr0aC+0xn*h_L_x;bE&>BQp~U zD5U9PmZ8qp%2;!PL7SzUu57|4kn;0FJrfrSLcztk+glP6f|$Ptf~)f?%My};*r`4g3S!Q@*ij!p zBM6csk;;-y1(8U>rl<0%N}{o2rRhH>eLT6ESYA<9P_;37|GkH2H->^AFErnh`rfnQ ziHpDAIkxcNg6pI6GQSDcKV7ta&v$#?7+$g>oEZCM`reJD=gwZ9e`M}(Tg!vHK5SaK z`C!|c{_?u|+?(r`u063LE|NK|_U-JUyKAo8F>z1tXwJ6_xBigRIC5%HW^H)o)|A4L zW!3K=9a~>mu{rtO@z0~_-8&EDbq+j#aLqSeWZ1%3hYvNKLZ(h>%#rm4Q zOYO@q6l8bLNZC+!{8Ih*>APPaOiMcc-vcs^%>HQdfc(;?qOboL>}eXgVar`_p07>I z*xmj}&!NS?MUFi>fANk5SF@I-RJEjbJoHk-JF7}Qm{av?+S1z-_RT6^+d4D%bYEXX z*R`r?x6RDGZ+dw3z*|}6H*LEy^knaqu2pmX>`Xj+t!-A^bE}I#`6=$aOTS5+UdjUzRv8KcH=?y`i)1^^OiK# zpIkJov+3S}6|Ge@v7$q}9?zRTBODGc%nIj~mGzx@*f}Zva`lDg85eg}ZhD*brLQx- zCiJF#b=$QU^&`7dPwzQ?xV!B`=Gc8p7k=8&m2`G%TJ^_?RpHj&mhBssWjC%nF(vz4 z%h~QB$pHbd%5esZ);Di&mTT8 zSe`#HdU(il^>QXzi-~_A*wG(=mH