From 8bf9edee25647fefb106fc7393a1ac01c88100df Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Thu, 29 Aug 2019 17:34:47 +0200 Subject: [PATCH] Load data from file, getters only At this time, the data is loaded from a set of files and the following end points are available: - /health - /spaces (POST) - /spaces/{id} (GET) - /cores (POST) - /cores/{id} (GET) - /cores/{id}/spatial_objects (POST) - /cores/{id}/spatial_objects/{oid} (GET) The implement ation is currently minimal and does not allow for filters or parameters on any of the handlers. --- .gitignore | 10 +- .idea/workspace.xml | 177 +++++----- Cargo.toml | 40 ++- api/spatial_search-v0.2.yaml | 95 +++--- src/main.rs | 84 ++++- src/model.rs | 214 ++++++++++++ src/rest_api/actions.rs | 14 +- src/rest_api/core.rs | 57 +++- src/rest_api/cores.rs | 38 ++- src/rest_api/default.rs | 10 +- src/rest_api/generated/models.rs | 540 ------------------------------- src/rest_api/mod.rs | 72 ++++- src/rest_api/space.rs | 49 ++- src/rest_api/spaces.rs | 38 ++- src/rest_api/spatial_object.rs | 60 ++-- src/rest_api/spatial_objects.rs | 52 +-- src/storage.rs | 95 ++++++ 17 files changed, 806 insertions(+), 839 deletions(-) create mode 100644 src/model.rs delete mode 100755 src/rest_api/generated/models.rs create mode 100644 src/storage.rs diff --git a/.gitignore b/.gitignore index cd0db6b..786d2d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,10 @@ -.* -!.gitignore /target **/*.rs.bk +.DS_Store +.* +*~ +1*k.* +test* +test* + +!.gitignore diff --git a/.idea/workspace.xml b/.idea/workspace.xml index c29bf28..f6efe7b 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -13,7 +13,12 @@ + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -