aboutsummaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
Diffstat (limited to 'rust')
-rw-r--r--rust/HACKING.md4
-rw-r--r--rust/src/api_entity_crud.rs (renamed from rust/src/database_entity_crud.rs)0
-rw-r--r--rust/src/api_helpers.rs2
-rw-r--r--rust/src/api_server.rs2
-rw-r--r--rust/src/lib.rs2
5 files changed, 5 insertions, 5 deletions
diff --git a/rust/HACKING.md b/rust/HACKING.md
index 622a4b5a..0dde5058 100644
--- a/rust/HACKING.md
+++ b/rust/HACKING.md
@@ -8,11 +8,11 @@ swagger API spec on one side and the SQL schema on the other.
- `./src/database_schema.rs`: autogenerated per-table Diesel schemas
- `./src/database_models.rs`: hand- and macro-generated Rust structs matching
Diesel schemas, and a small number of row-level helpers
-- `./src/database_entity_crud.rs`: "struct-relational-mapping"; trait
+- `./src/api_entity_crud.rs`: "struct-relational-mapping"; trait
implementations of CRUD (create, read, update, delete) actions for each
entity model, hitting the database (and building on `database_model` structs)
- `./src/api_server.rs`: one function for each API endpoint, with rust-style
- arguments and return types. mostly calls in to `database_entity_crud`.
+ arguments and return types. mostly calls in to `api_entity_crud`.
- `./src/api_wrappers.rs`: hand- and macro-generated wrapper functions, one per
API endpoint, that map between API request and return types, and
rust-idiomatic request and return types (plus API models).
diff --git a/rust/src/database_entity_crud.rs b/rust/src/api_entity_crud.rs
index 01323637..01323637 100644
--- a/rust/src/database_entity_crud.rs
+++ b/rust/src/api_entity_crud.rs
diff --git a/rust/src/api_helpers.rs b/rust/src/api_helpers.rs
index 8ab9dcb3..456646b4 100644
--- a/rust/src/api_helpers.rs
+++ b/rust/src/api_helpers.rs
@@ -8,7 +8,7 @@ use errors::*;
use regex::Regex;
use std::str::FromStr;
use uuid::Uuid;
-use database_entity_crud::EntityCrud;
+use api_entity_crud::EntityCrud;
pub type DbConn =
diesel::r2d2::PooledConnection<diesel::r2d2::ConnectionManager<diesel::PgConnection>>;
diff --git a/rust/src/api_server.rs b/rust/src/api_server.rs
index 5fce8e64..70ebb02a 100644
--- a/rust/src/api_server.rs
+++ b/rust/src/api_server.rs
@@ -2,7 +2,7 @@
use api_helpers::*;
use chrono;
-use database_entity_crud::{EditContext, EntityCrud};
+use api_entity_crud::{EditContext, EntityCrud};
use database_models::*;
use database_schema::*;
use diesel::prelude::*;
diff --git a/rust/src/lib.rs b/rust/src/lib.rs
index 38f9b343..58147139 100644
--- a/rust/src/lib.rs
+++ b/rust/src/lib.rs
@@ -25,7 +25,7 @@ extern crate sha1;
pub mod api_helpers;
pub mod api_server;
pub mod api_wrappers;
-pub mod database_entity_crud;
+pub mod api_entity_crud;
pub mod database_models;
pub mod database_schema;