From bec26a13129d8215d5ff97ad0cf587f6572f67ac Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 7 Jul 2020 13:59:22 +0200 Subject: [PATCH] Rename garage_core to garage_model --- Cargo.lock | 6 +++--- Cargo.toml | 2 +- src/api/Cargo.toml | 2 +- src/api/api_server.rs | 2 +- src/api/s3_copy.rs | 8 ++++---- src/api/s3_delete.rs | 4 ++-- src/api/s3_get.rs | 4 ++-- src/api/s3_list.rs | 2 +- src/api/s3_put.rs | 10 +++++----- src/api/signature.rs | 4 ++-- src/garage/Cargo.toml | 2 +- src/garage/admin_rpc.rs | 6 +++--- src/garage/repair.rs | 8 ++++---- src/garage/server.rs | 2 +- src/{core => model}/Cargo.toml | 2 +- src/{core => model}/block.rs | 0 src/{core => model}/block_ref_table.rs | 0 src/{core => model}/bucket_table.rs | 0 src/{core => model}/garage.rs | 0 src/{core => model}/key_table.rs | 0 src/{core => model}/lib.rs | 0 src/{core => model}/object_table.rs | 0 src/{core => model}/version_table.rs | 0 23 files changed, 32 insertions(+), 32 deletions(-) rename src/{core => model}/Cargo.toml (97%) rename src/{core => model}/block.rs (100%) rename src/{core => model}/block_ref_table.rs (100%) rename src/{core => model}/bucket_table.rs (100%) rename src/{core => model}/garage.rs (100%) rename src/{core => model}/key_table.rs (100%) rename src/{core => model}/lib.rs (100%) rename src/{core => model}/object_table.rs (100%) rename src/{core => model}/version_table.rs (100%) diff --git a/Cargo.lock b/Cargo.lock index 1b0aad78..866d90e3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -339,7 +339,7 @@ dependencies = [ "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "garage_api 0.1.0", - "garage_core 0.1.0", + "garage_model 0.1.0", "garage_rpc 0.1.0", "garage_table 0.1.0", "garage_util 0.1.0", @@ -365,7 +365,7 @@ dependencies = [ "crypto-mac 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "futures 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "futures-util 0.3.4 (registry+https://github.com/rust-lang/crates.io-index)", - "garage_core 0.1.0", + "garage_model 0.1.0", "garage_table 0.1.0", "garage_util 0.1.0", "hex 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", @@ -383,7 +383,7 @@ dependencies = [ ] [[package]] -name = "garage_core" +name = "garage_model" version = "0.1.0" dependencies = [ "arc-swap 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", diff --git a/Cargo.toml b/Cargo.toml index b3043acd..7a8c74e9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,7 +3,7 @@ members = [ "src/util", "src/rpc", "src/table", - "src/core", + "src/model", "src/api", "src/garage", ] diff --git a/src/api/Cargo.toml b/src/api/Cargo.toml index 56e0e2a8..99838a56 100644 --- a/src/api/Cargo.toml +++ b/src/api/Cargo.toml @@ -12,7 +12,7 @@ path = "lib.rs" [dependencies] garage_util = { path = "../util" } garage_table = { path = "../table" } -garage_core = { path = "../core" } +garage_model = { path = "../model" } bytes = "0.4" hex = "0.3" diff --git a/src/api/api_server.rs b/src/api/api_server.rs index 32506ccd..699dc5c4 100644 --- a/src/api/api_server.rs +++ b/src/api/api_server.rs @@ -9,7 +9,7 @@ use hyper::{Body, Method, Request, Response, Server}; use garage_util::error::Error; -use garage_core::garage::Garage; +use garage_model::garage::Garage; use crate::http_util::*; use crate::signature::check_signature; diff --git a/src/api/s3_copy.rs b/src/api/s3_copy.rs index f8eaa0e7..6a8d8f87 100644 --- a/src/api/s3_copy.rs +++ b/src/api/s3_copy.rs @@ -8,10 +8,10 @@ use garage_table::*; use garage_util::data::*; use garage_util::error::Error; -use garage_core::block_ref_table::*; -use garage_core::garage::Garage; -use garage_core::object_table::*; -use garage_core::version_table::*; +use garage_model::block_ref_table::*; +use garage_model::garage::Garage; +use garage_model::object_table::*; +use garage_model::version_table::*; use crate::http_util::*; diff --git a/src/api/s3_delete.rs b/src/api/s3_delete.rs index e77ab314..60714b0c 100644 --- a/src/api/s3_delete.rs +++ b/src/api/s3_delete.rs @@ -6,8 +6,8 @@ use hyper::{Body, Request, Response}; use garage_util::data::*; use garage_util::error::Error; -use garage_core::garage::Garage; -use garage_core::object_table::*; +use garage_model::garage::Garage; +use garage_model::object_table::*; use crate::encoding::*; use crate::http_util::*; diff --git a/src/api/s3_get.rs b/src/api/s3_get.rs index 3ed0f914..63200ca3 100644 --- a/src/api/s3_get.rs +++ b/src/api/s3_get.rs @@ -9,8 +9,8 @@ use garage_util::error::Error; use garage_table::EmptyKey; -use garage_core::garage::Garage; -use garage_core::object_table::*; +use garage_model::garage::Garage; +use garage_model::object_table::*; use crate::http_util::*; diff --git a/src/api/s3_list.rs b/src/api/s3_list.rs index b8babbbf..c4fbf6f2 100644 --- a/src/api/s3_list.rs +++ b/src/api/s3_list.rs @@ -7,7 +7,7 @@ use hyper::Response; use garage_util::error::Error; -use garage_core::garage::Garage; +use garage_model::garage::Garage; use crate::encoding::*; use crate::http_util::*; diff --git a/src/api/s3_put.rs b/src/api/s3_put.rs index e1e4c02d..bddfa444 100644 --- a/src/api/s3_put.rs +++ b/src/api/s3_put.rs @@ -9,11 +9,11 @@ use garage_table::*; use garage_util::data::*; use garage_util::error::Error; -use garage_core::block::INLINE_THRESHOLD; -use garage_core::block_ref_table::*; -use garage_core::garage::Garage; -use garage_core::object_table::*; -use garage_core::version_table::*; +use garage_model::block::INLINE_THRESHOLD; +use garage_model::block_ref_table::*; +use garage_model::garage::Garage; +use garage_model::object_table::*; +use garage_model::version_table::*; use crate::encoding::*; use crate::http_util::*; diff --git a/src/api/signature.rs b/src/api/signature.rs index a1ccfd08..65f31f21 100644 --- a/src/api/signature.rs +++ b/src/api/signature.rs @@ -8,8 +8,8 @@ use sha2::{Digest, Sha256}; use garage_table::*; use garage_util::error::Error; -use garage_core::garage::Garage; -use garage_core::key_table::*; +use garage_model::garage::Garage; +use garage_model::key_table::*; use crate::encoding::uri_encode; diff --git a/src/garage/Cargo.toml b/src/garage/Cargo.toml index 08b55c32..2daa0f75 100644 --- a/src/garage/Cargo.toml +++ b/src/garage/Cargo.toml @@ -14,7 +14,7 @@ path = "main.rs" garage_util = { path = "../util" } garage_rpc = { path = "../rpc" } garage_table = { path = "../table" } -garage_core = { path = "../core" } +garage_model = { path = "../model" } garage_api = { path = "../api" } bytes = "0.4" diff --git a/src/garage/admin_rpc.rs b/src/garage/admin_rpc.rs index aeaf2682..1dd118ac 100644 --- a/src/garage/admin_rpc.rs +++ b/src/garage/admin_rpc.rs @@ -10,9 +10,9 @@ use garage_table::*; use garage_rpc::rpc_client::*; use garage_rpc::rpc_server::*; -use garage_core::bucket_table::*; -use garage_core::garage::Garage; -use garage_core::key_table::*; +use garage_model::bucket_table::*; +use garage_model::garage::Garage; +use garage_model::key_table::*; use crate::repair::Repair; use crate::*; diff --git a/src/garage/repair.rs b/src/garage/repair.rs index afea61de..297ae9cd 100644 --- a/src/garage/repair.rs +++ b/src/garage/repair.rs @@ -2,10 +2,10 @@ use std::sync::Arc; use tokio::sync::watch; -use garage_core::block_ref_table::*; -use garage_core::garage::Garage; -use garage_core::object_table::*; -use garage_core::version_table::*; +use garage_model::block_ref_table::*; +use garage_model::garage::Garage; +use garage_model::object_table::*; +use garage_model::version_table::*; use garage_table::*; use garage_util::error::Error; diff --git a/src/garage/server.rs b/src/garage/server.rs index 2b618c1a..6caea5eb 100644 --- a/src/garage/server.rs +++ b/src/garage/server.rs @@ -9,7 +9,7 @@ use garage_util::config::*; use garage_util::error::Error; use garage_api::api_server; -use garage_core::garage::Garage; +use garage_model::garage::Garage; use garage_rpc::rpc_server::RpcServer; use crate::admin_rpc::*; diff --git a/src/core/Cargo.toml b/src/model/Cargo.toml similarity index 97% rename from src/core/Cargo.toml rename to src/model/Cargo.toml index 1e482d87..be3b1449 100644 --- a/src/core/Cargo.toml +++ b/src/model/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "garage_core" +name = "garage_model" version = "0.1.0" authors = ["Alex Auvolat "] edition = "2018" diff --git a/src/core/block.rs b/src/model/block.rs similarity index 100% rename from src/core/block.rs rename to src/model/block.rs diff --git a/src/core/block_ref_table.rs b/src/model/block_ref_table.rs similarity index 100% rename from src/core/block_ref_table.rs rename to src/model/block_ref_table.rs diff --git a/src/core/bucket_table.rs b/src/model/bucket_table.rs similarity index 100% rename from src/core/bucket_table.rs rename to src/model/bucket_table.rs diff --git a/src/core/garage.rs b/src/model/garage.rs similarity index 100% rename from src/core/garage.rs rename to src/model/garage.rs diff --git a/src/core/key_table.rs b/src/model/key_table.rs similarity index 100% rename from src/core/key_table.rs rename to src/model/key_table.rs diff --git a/src/core/lib.rs b/src/model/lib.rs similarity index 100% rename from src/core/lib.rs rename to src/model/lib.rs diff --git a/src/core/object_table.rs b/src/model/object_table.rs similarity index 100% rename from src/core/object_table.rs rename to src/model/object_table.rs diff --git a/src/core/version_table.rs b/src/model/version_table.rs similarity index 100% rename from src/core/version_table.rs rename to src/model/version_table.rs