From c3407627d0e45ee8883b1c7d1dc84251ecc6d9a1 Mon Sep 17 00:00:00 2001 From: "Daniel T. Rodrigues" <45438149+danitrod@users.noreply.github.com> Date: Thu, 25 Feb 2021 21:57:58 -0300 Subject: [PATCH] Restructure folders (#411) --- Cargo.lock | 55 +++++---- Cargo.toml | 108 +++++++++--------- basics/{ => basics}/Cargo.toml | 0 basics/{ => basics}/README.md | 0 basics/{ => basics}/src/main.rs | 0 basics/{ => basics}/static/404.html | 0 basics/{ => basics}/static/actixLogo.png | Bin basics/{ => basics}/static/favicon.ico | Bin basics/{ => basics}/static/welcome.html | 0 .../docker_sample}/Cargo.toml | 0 .../docker_sample}/Dockerfile | 0 .../docker_sample}/README.MD | 0 .../docker_sample}/src/main.rs | 0 .../error_handling}/Cargo.toml | 0 .../error_handling}/README.md | 0 .../error_handling}/src/main.rs | 0 .../hello-world}/Cargo.toml | 0 .../hello-world}/src/main.rs | 0 {http-proxy => basics/http-proxy}/Cargo.toml | 0 {http-proxy => basics/http-proxy}/README.md | 0 {http-proxy => basics/http-proxy}/src/main.rs | 0 .../json-validation}/Cargo.toml | 0 .../json-validation}/README.md | 0 .../json-validation}/src/main.rs | 0 {middleware => basics/middleware}/Cargo.toml | 0 {middleware => basics/middleware}/README.md | 0 {middleware => basics/middleware}/src/main.rs | 0 .../middleware}/src/read_request_body.rs | 0 .../middleware}/src/read_response_body.rs | 0 .../middleware}/src/redirect.rs | 0 .../middleware}/src/simple.rs | 0 .../nested-routing}/Cargo.toml | 0 .../nested-routing}/README.md | 0 .../nested-routing}/src/appconfig.rs | 0 .../nested-routing}/src/bin/main.rs | 0 .../nested-routing}/src/common.rs | 0 .../nested-routing}/src/handlers/mod.rs | 0 .../nested-routing}/src/handlers/parts.rs | 0 .../nested-routing}/src/handlers/products.rs | 0 .../nested-routing}/src/lib.rs | 0 .../run-in-thread}/Cargo.toml | 0 .../run-in-thread}/src/main.rs | 0 .../shutdown-server}/Cargo.toml | 0 .../shutdown-server}/README.md | 0 .../shutdown-server}/src/main.rs | 0 {state => basics/state}/Cargo.toml | 0 {state => basics/state}/README.md | 0 {state => basics/state}/src/main.rs | 0 .../static_index}/.gitattributes | 0 .../static_index}/Cargo.toml | 0 .../static_index}/README.md | 0 .../static_index}/src/main.rs | 0 .../static_index}/static/images/logo.png | Bin .../static_index}/static/root/css/example.css | 0 .../static_index}/static/root/favicon.ico | Bin .../static_index}/static/root/index.html | 0 .../static_index}/static/root/js/example.js | 0 {todo => basics/todo}/.env | 0 {todo => basics/todo}/Cargo.toml | 0 {todo => basics/todo}/README.md | 0 .../todo}/diesel.toml | 0 .../todo}/migrations/.gitkeep | 0 .../down.sql | 0 .../up.sql | 0 .../down.sql | 0 .../up.sql | 0 {todo => basics/todo}/src/api.rs | 0 {todo => basics/todo}/src/db.rs | 0 {todo => basics/todo}/src/main.rs | 0 {todo => basics/todo}/src/model.rs | 0 {todo => basics/todo}/src/schema.rs | 0 {todo => basics/todo}/src/session.rs | 0 .../todo}/static/css/normalize.css | 0 {todo => basics/todo}/static/css/skeleton.css | 0 {todo => basics/todo}/static/css/style.css | 0 {todo => basics/todo}/static/errors/400.html | 0 {todo => basics/todo}/static/errors/404.html | 0 {todo => basics/todo}/static/errors/500.html | 0 .../todo}/templates/index.html.tera | 0 .../basic}/Cargo.toml | 0 .../basic}/README.md | 0 .../basic}/db/GHCND_documentation.pdf | Bin .../basic}/db/README.md | 0 .../basic}/db/db.sql | 0 .../basic}/db/nyc_centralpark_weather.csv | 0 .../basic}/db/setup_db.sh | 0 .../basic}/src/db.rs | 0 .../basic}/src/main.rs | 0 {diesel => database_interactions/diesel}/.env | 0 .../diesel}/.gitignore | 0 .../diesel}/Cargo.toml | 0 .../diesel}/README.md | 0 .../20170124012402_create_users/down.sql | 0 .../20170124012402_create_users/up.sql | 0 .../diesel}/src/actions.rs | 0 .../diesel}/src/main.rs | 0 .../diesel}/src/models.rs | 0 .../diesel}/src/schema.rs | 0 .../pg}/.gitignore | 0 .../pg}/Cargo.toml | 0 .../pg}/README.md | 0 .../pg}/sql/add_user.sql | 0 .../pg}/sql/get_users.sql | 0 .../pg}/sql/schema.sql | 0 .../pg}/src/main.rs | 0 .../r2d2}/Cargo.toml | 0 .../r2d2}/src/main.rs | 0 .../redis}/Cargo.toml | 0 .../redis}/README.md | 0 .../redis}/src/main.rs | 0 .../simple-auth-server}/Cargo.toml | 2 +- .../simple-auth-server}/README.md | 0 .../simple-auth-server}/diesel.toml | 0 .../simple-auth-server}/migrations/.gitkeep | 0 .../down.sql | 0 .../up.sql | 0 .../2018-10-09-101948_users/down.sql | 0 .../migrations/2018-10-09-101948_users/up.sql | 0 .../2018-10-16-095633_invitations/down.sql | 0 .../2018-10-16-095633_invitations/up.sql | 0 .../simple-auth-server}/src/auth_handler.rs | 0 .../simple-auth-server}/src/email_service.rs | 0 .../simple-auth-server}/src/errors.rs | 0 .../src/invitation_handler.rs | 0 .../simple-auth-server}/src/main.rs | 0 .../simple-auth-server}/src/models.rs | 0 .../src/register_handler.rs | 0 .../simple-auth-server}/src/schema.rs | 0 .../simple-auth-server}/src/utils.rs | 0 .../simple-auth-server}/static/index.html | 0 .../simple-auth-server}/static/main.css | 0 .../simple-auth-server}/static/main.js | 0 .../simple-auth-server}/static/register.html | 0 .../sqlx_todo}/.env.example | 0 .../sqlx_todo}/.gitignore | 0 .../sqlx_todo}/Cargo.toml | 1 + .../sqlx_todo}/README.md | 0 .../sqlx_todo}/schema.sql | 0 .../sqlx_todo}/src/main.rs | 9 +- .../sqlx_todo}/src/todo/mod.rs | 2 +- .../sqlx_todo}/src/todo/model.rs | 38 +++--- .../sqlx_todo}/src/todo/routes.rs | 32 ++++-- {form => forms/form}/Cargo.toml | 0 {form => forms/form}/README.md | 0 {form => forms/form}/src/main.rs | 0 {form => forms/form}/static/form.html | 0 .../multipart-async-std}/.gitignore | 0 .../multipart-async-std}/Cargo.toml | 0 .../multipart-async-std}/LICENSE | 0 .../multipart-async-std}/README.md | 0 .../multipart-async-std}/src/main.rs | 0 .../multipart-s3}/.env.example | 0 .../multipart-s3}/.gitignore | 0 .../multipart-s3}/Cargo.toml | 0 .../multipart-s3}/README.md | 0 .../multipart-s3}/src/main.rs | 0 .../multipart-s3}/src/utils/mod.rs | 0 .../multipart-s3}/src/utils/s3.rs | 0 .../multipart-s3}/src/utils/upload.rs | 0 {multipart => forms/multipart}/.gitignore | 0 {multipart => forms/multipart}/Cargo.toml | 0 {multipart => forms/multipart}/LICENSE | 0 {multipart => forms/multipart}/README.md | 0 {multipart => forms/multipart}/src/main.rs | 0 .../graphql-demo}/Cargo.toml | 0 .../graphql-demo}/README.md | 0 .../graphql-demo}/src/main.rs | 0 .../graphql-demo}/src/starwars/mod.rs | 0 .../graphql-demo}/src/starwars/model.rs | 0 .../juniper-advanced}/.env.example | 0 .../juniper-advanced}/Cargo.toml | 0 .../juniper-advanced}/README.md | 0 .../juniper-advanced}/mysql-schema.sql | 0 .../juniper-advanced}/src/db.rs | 0 .../juniper-advanced}/src/handlers.rs | 0 .../juniper-advanced}/src/main.rs | 0 .../juniper-advanced}/src/schemas/mod.rs | 0 .../juniper-advanced}/src/schemas/product.rs | 0 .../juniper-advanced}/src/schemas/root.rs | 0 .../juniper-advanced}/src/schemas/user.rs | 0 {juniper => graphql/juniper}/Cargo.toml | 0 {juniper => graphql/juniper}/README.md | 0 {juniper => graphql/juniper}/src/main.rs | 0 {juniper => graphql/juniper}/src/schema.rs | 0 json/{ => json}/Cargo.toml | 0 json/{ => json}/README.md | 0 json/{ => json}/client.py | 0 json/{ => json}/src/main.rs | 0 .../json_decode_error}/Cargo.toml | 0 .../json_decode_error}/README.md | 0 .../json_decode_error}/src/main.rs | 0 {json_error => json/json_error}/Cargo.toml | 0 {json_error => json/json_error}/src/main.rs | 0 {jsonrpc => json/jsonrpc}/Cargo.toml | 0 {jsonrpc => json/jsonrpc}/README.md | 0 {jsonrpc => json/jsonrpc}/src/convention.rs | 0 {jsonrpc => json/jsonrpc}/src/main.rs | 0 .../jsonrpc}/tests/test_client.py | 0 .../data_factory}/Cargo.toml | 0 .../data_factory}/README.md | 0 .../data_factory}/src/main.rs | 0 {protobuf => other/protobuf}/Cargo.toml | 0 {protobuf => other/protobuf}/README.md | 0 {protobuf => other/protobuf}/client.py | 0 {protobuf => other/protobuf}/src/main.rs | 0 {protobuf => other/protobuf}/test.proto | 0 {protobuf => other/protobuf}/test_pb2.py | 0 .../server-sent-events}/Cargo.toml | 0 .../server-sent-events}/README.md | 0 .../server-sent-events}/benchmark.js | 0 .../server-sent-events}/drain.js | 0 .../server-sent-events}/src/index.html | 0 .../server-sent-events}/src/main.rs | 0 {udp-echo => other/udp-echo}/Cargo.toml | 0 {udp-echo => other/udp-echo}/README.md | 0 {udp-echo => other/udp-echo}/src/main.rs | 0 {unix-socket => other/unix-socket}/Cargo.toml | 0 {unix-socket => other/unix-socket}/README.md | 0 .../unix-socket}/src/main.rs | 0 {awc_https => security/awc_https}/Cargo.toml | 0 {awc_https => security/awc_https}/README.md | 0 {awc_https => security/awc_https}/src/main.rs | 0 {casbin => security/casbin}/Cargo.toml | 0 {casbin => security/casbin}/README.md | 0 .../casbin}/rbac/rbac_model.conf | 0 .../casbin}/rbac/rbac_policy.csv | 0 {casbin => security/casbin}/src/main.rs | 0 {openssl => security/openssl}/Cargo.toml | 0 {openssl => security/openssl}/README.md | 0 {openssl => security/openssl}/cert.pem | 0 {openssl => security/openssl}/key.pem | 0 {openssl => security/openssl}/src/main.rs | 0 .../rustls-client-cert}/Cargo.toml | 0 .../rustls-client-cert}/README.md | 0 .../rustls-client-cert}/certs/client-cert.pem | 0 .../rustls-client-cert}/certs/client-key.pem | 0 .../rustls-client-cert}/certs/rootCA-key.pem | 0 .../rustls-client-cert}/certs/rootCA.pem | 0 .../rustls-client-cert}/certs/server-cert.pem | 0 .../rustls-client-cert}/certs/server-key.pem | 0 .../rustls-client-cert}/src/main.rs | 0 {rustls => security/rustls}/Cargo.toml | 0 {rustls => security/rustls}/README.md | 0 {rustls => security/rustls}/cert.pem | 0 {rustls => security/rustls}/key.pem | 0 {rustls => security/rustls}/src/main.rs | 0 {web-cors => security/web-cors}/README.md | 0 .../web-cors}/backend/Cargo.toml | 0 .../web-cors}/backend/src/main.rs | 0 .../web-cors}/backend/src/user.rs | 0 .../web-cors}/frontend/.gitignore | 0 .../web-cors}/frontend/index.html | 0 .../web-cors}/frontend/package.json | 0 .../web-cors}/frontend/src/app.vue | 0 .../web-cors}/frontend/src/main.js | 0 .../cookie-auth}/Cargo.toml | 0 .../cookie-auth}/README.md | 0 .../cookie-auth}/src/main.rs | 0 .../cookie-session}/Cargo.toml | 0 .../cookie-session}/README.md | 0 .../cookie-session}/src/main.rs | 0 .../redis-session}/Cargo.toml | 0 .../redis-session}/README.md | 0 .../redis-session}/src/main.rs | 0 .../askama}/Cargo.toml | 0 .../askama}/src/main.rs | 0 .../askama}/templates/index.html | 0 .../askama}/templates/user.html | 0 .../handlebars}/Cargo.toml | 0 .../handlebars}/README.md | 0 .../handlebars}/src/main.rs | 0 .../handlebars}/static/templates/error.html | 0 .../handlebars}/static/templates/index.html | 0 .../handlebars}/static/templates/user.html | 0 .../tera}/Cargo.toml | 0 .../tera}/README.md | 0 .../tera}/src/main.rs | 0 .../tera}/templates/error.html | 0 .../tera}/templates/index.html | 0 .../tera}/templates/user.html | 0 .../tinytemplate}/Cargo.toml | 0 .../tinytemplate}/README.md | 0 .../tinytemplate}/src/main.rs | 0 .../tinytemplate}/templates/error.html | 0 .../tinytemplate}/templates/index.html | 0 .../tinytemplate}/templates/user.html | 0 .../yarte}/Cargo.toml | 0 .../yarte}/README.md | 0 .../yarte}/build.rs | 0 .../yarte}/src/main.rs | 0 .../yarte}/templates/base.hbs | 0 .../yarte}/templates/deep/more/card/form.hbs | 0 .../yarte}/templates/deep/more/card/hi.hbs | 0 .../templates/deep/more/deep/welcome.hbs | 0 .../yarte}/templates/deep/more/doc/head.hbs | 0 .../yarte}/templates/deep/more/doc/t.hbs | 0 .../yarte}/templates/index.hbs | 0 .../yarte}/yarte.toml | 0 .../autobahn}/Cargo.toml | 0 .../autobahn}/README.md | 0 .../autobahn}/config/fuzzingclient.json | 0 .../autobahn}/reports/.gitignore | 0 .../autobahn}/src/main.rs | 0 .../chat-broker}/Cargo.toml | 0 .../chat-broker}/README.md | 0 .../chat-broker}/client.py | 0 .../chat-broker}/src/main.rs | 0 .../chat-broker}/src/message.rs | 0 .../chat-broker}/src/server.rs | 0 .../chat-broker}/src/session.rs | 0 .../chat-broker}/static/index.html | 0 .../chat}/Cargo.toml | 0 {websocket-chat => websockets/chat}/README.md | 0 {websocket-chat => websockets/chat}/client.py | 0 .../chat}/src/main.rs | 0 .../chat}/src/server.rs | 0 .../chat}/static/websocket.html | 0 .../tcp-chat}/Cargo.toml | 0 .../tcp-chat}/README.md | 0 .../tcp-chat}/client.py | 0 .../tcp-chat}/src/client.rs | 0 .../tcp-chat}/src/codec.rs | 0 .../tcp-chat}/src/main.rs | 0 .../tcp-chat}/src/server.rs | 0 .../tcp-chat}/src/session.rs | 0 .../tcp-chat}/static/websocket.html | 0 .../websocket}/Cargo.toml | 0 {websocket => websockets/websocket}/README.md | 0 .../websocket}/src/client.rs | 0 .../websocket}/src/main.rs | 0 .../websocket}/static/actixLogo.png | Bin .../websocket}/static/favicon.ico | Bin .../websocket}/static/index.html | 0 .../websocket}/websocket-client.py | 0 334 files changed, 127 insertions(+), 120 deletions(-) rename basics/{ => basics}/Cargo.toml (100%) rename basics/{ => basics}/README.md (100%) rename basics/{ => basics}/src/main.rs (100%) rename basics/{ => basics}/static/404.html (100%) rename basics/{ => basics}/static/actixLogo.png (100%) rename basics/{ => basics}/static/favicon.ico (100%) rename basics/{ => basics}/static/welcome.html (100%) rename {docker_sample => basics/docker_sample}/Cargo.toml (100%) rename {docker_sample => basics/docker_sample}/Dockerfile (100%) rename {docker_sample => basics/docker_sample}/README.MD (100%) rename {docker_sample => basics/docker_sample}/src/main.rs (100%) rename {error_handling => basics/error_handling}/Cargo.toml (100%) rename {error_handling => basics/error_handling}/README.md (100%) rename {error_handling => basics/error_handling}/src/main.rs (100%) rename {hello-world => basics/hello-world}/Cargo.toml (100%) rename {hello-world => basics/hello-world}/src/main.rs (100%) rename {http-proxy => basics/http-proxy}/Cargo.toml (100%) rename {http-proxy => basics/http-proxy}/README.md (100%) rename {http-proxy => basics/http-proxy}/src/main.rs (100%) rename {async_ex1 => basics/json-validation}/Cargo.toml (100%) rename {async_ex1 => basics/json-validation}/README.md (100%) rename {async_ex1 => basics/json-validation}/src/main.rs (100%) rename {middleware => basics/middleware}/Cargo.toml (100%) rename {middleware => basics/middleware}/README.md (100%) rename {middleware => basics/middleware}/src/main.rs (100%) rename {middleware => basics/middleware}/src/read_request_body.rs (100%) rename {middleware => basics/middleware}/src/read_response_body.rs (100%) rename {middleware => basics/middleware}/src/redirect.rs (100%) rename {middleware => basics/middleware}/src/simple.rs (100%) rename {async_ex2 => basics/nested-routing}/Cargo.toml (100%) rename {async_ex2 => basics/nested-routing}/README.md (100%) rename {async_ex2 => basics/nested-routing}/src/appconfig.rs (100%) rename {async_ex2 => basics/nested-routing}/src/bin/main.rs (100%) rename {async_ex2 => basics/nested-routing}/src/common.rs (100%) rename {async_ex2 => basics/nested-routing}/src/handlers/mod.rs (100%) rename {async_ex2 => basics/nested-routing}/src/handlers/parts.rs (100%) rename {async_ex2 => basics/nested-routing}/src/handlers/products.rs (100%) rename {async_ex2 => basics/nested-routing}/src/lib.rs (100%) rename {run-in-thread => basics/run-in-thread}/Cargo.toml (100%) rename {run-in-thread => basics/run-in-thread}/src/main.rs (100%) rename {shutdown-server => basics/shutdown-server}/Cargo.toml (100%) rename {shutdown-server => basics/shutdown-server}/README.md (100%) rename {shutdown-server => basics/shutdown-server}/src/main.rs (100%) rename {state => basics/state}/Cargo.toml (100%) rename {state => basics/state}/README.md (100%) rename {state => basics/state}/src/main.rs (100%) rename {static_index => basics/static_index}/.gitattributes (100%) rename {static_index => basics/static_index}/Cargo.toml (100%) rename {static_index => basics/static_index}/README.md (100%) rename {static_index => basics/static_index}/src/main.rs (100%) rename {static_index => basics/static_index}/static/images/logo.png (100%) rename {static_index => basics/static_index}/static/root/css/example.css (100%) rename {static_index => basics/static_index}/static/root/favicon.ico (100%) rename {static_index => basics/static_index}/static/root/index.html (100%) rename {static_index => basics/static_index}/static/root/js/example.js (100%) rename {todo => basics/todo}/.env (100%) rename {todo => basics/todo}/Cargo.toml (100%) rename {todo => basics/todo}/README.md (100%) rename {simple-auth-server => basics/todo}/diesel.toml (100%) rename {simple-auth-server => basics/todo}/migrations/.gitkeep (100%) rename {simple-auth-server => basics/todo}/migrations/00000000000000_diesel_initial_setup/down.sql (100%) rename {simple-auth-server => basics/todo}/migrations/00000000000000_diesel_initial_setup/up.sql (100%) rename {todo => basics/todo}/migrations/2018-07-05-163612_create_tasks_table/down.sql (100%) rename {todo => basics/todo}/migrations/2018-07-05-163612_create_tasks_table/up.sql (100%) rename {todo => basics/todo}/src/api.rs (100%) rename {todo => basics/todo}/src/db.rs (100%) rename {todo => basics/todo}/src/main.rs (100%) rename {todo => basics/todo}/src/model.rs (100%) rename {todo => basics/todo}/src/schema.rs (100%) rename {todo => basics/todo}/src/session.rs (100%) rename {todo => basics/todo}/static/css/normalize.css (100%) rename {todo => basics/todo}/static/css/skeleton.css (100%) rename {todo => basics/todo}/static/css/style.css (100%) rename {todo => basics/todo}/static/errors/400.html (100%) rename {todo => basics/todo}/static/errors/404.html (100%) rename {todo => basics/todo}/static/errors/500.html (100%) rename {todo => basics/todo}/templates/index.html.tera (100%) rename {async_db => database_interactions/basic}/Cargo.toml (100%) rename {async_db => database_interactions/basic}/README.md (100%) rename {async_db => database_interactions/basic}/db/GHCND_documentation.pdf (100%) rename {async_db => database_interactions/basic}/db/README.md (100%) rename {async_db => database_interactions/basic}/db/db.sql (100%) rename {async_db => database_interactions/basic}/db/nyc_centralpark_weather.csv (100%) rename {async_db => database_interactions/basic}/db/setup_db.sh (100%) rename {async_db => database_interactions/basic}/src/db.rs (100%) rename {async_db => database_interactions/basic}/src/main.rs (100%) rename {diesel => database_interactions/diesel}/.env (100%) rename {diesel => database_interactions/diesel}/.gitignore (100%) rename {diesel => database_interactions/diesel}/Cargo.toml (100%) rename {diesel => database_interactions/diesel}/README.md (100%) rename {diesel => database_interactions/diesel}/migrations/20170124012402_create_users/down.sql (100%) rename {diesel => database_interactions/diesel}/migrations/20170124012402_create_users/up.sql (100%) rename {diesel => database_interactions/diesel}/src/actions.rs (100%) rename {diesel => database_interactions/diesel}/src/main.rs (100%) rename {diesel => database_interactions/diesel}/src/models.rs (100%) rename {diesel => database_interactions/diesel}/src/schema.rs (100%) rename {async_pg => database_interactions/pg}/.gitignore (100%) rename {async_pg => database_interactions/pg}/Cargo.toml (100%) rename {async_pg => database_interactions/pg}/README.md (100%) rename {async_pg => database_interactions/pg}/sql/add_user.sql (100%) rename {async_pg => database_interactions/pg}/sql/get_users.sql (100%) rename {async_pg => database_interactions/pg}/sql/schema.sql (100%) rename {async_pg => database_interactions/pg}/src/main.rs (100%) rename {r2d2 => database_interactions/r2d2}/Cargo.toml (100%) rename {r2d2 => database_interactions/r2d2}/src/main.rs (100%) rename {redis => database_interactions/redis}/Cargo.toml (100%) rename {redis => database_interactions/redis}/README.md (100%) rename {redis => database_interactions/redis}/src/main.rs (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/Cargo.toml (96%) rename {simple-auth-server => database_interactions/simple-auth-server}/README.md (100%) rename {todo => database_interactions/simple-auth-server}/diesel.toml (100%) rename {todo => database_interactions/simple-auth-server}/migrations/.gitkeep (100%) rename {todo => database_interactions/simple-auth-server}/migrations/00000000000000_diesel_initial_setup/down.sql (100%) rename {todo => database_interactions/simple-auth-server}/migrations/00000000000000_diesel_initial_setup/up.sql (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/migrations/2018-10-09-101948_users/down.sql (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/migrations/2018-10-09-101948_users/up.sql (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/migrations/2018-10-16-095633_invitations/down.sql (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/migrations/2018-10-16-095633_invitations/up.sql (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/src/auth_handler.rs (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/src/email_service.rs (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/src/errors.rs (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/src/invitation_handler.rs (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/src/main.rs (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/src/models.rs (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/src/register_handler.rs (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/src/schema.rs (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/src/utils.rs (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/static/index.html (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/static/main.css (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/static/main.js (100%) rename {simple-auth-server => database_interactions/simple-auth-server}/static/register.html (100%) rename {sqlx_todo => database_interactions/sqlx_todo}/.env.example (100%) rename {sqlx_todo => database_interactions/sqlx_todo}/.gitignore (100%) rename {sqlx_todo => database_interactions/sqlx_todo}/Cargo.toml (95%) rename {sqlx_todo => database_interactions/sqlx_todo}/README.md (100%) rename {sqlx_todo => database_interactions/sqlx_todo}/schema.sql (100%) rename {sqlx_todo => database_interactions/sqlx_todo}/src/main.rs (94%) rename {sqlx_todo => database_interactions/sqlx_todo}/src/todo/mod.rs (65%) rename {sqlx_todo => database_interactions/sqlx_todo}/src/todo/model.rs (86%) rename {sqlx_todo => database_interactions/sqlx_todo}/src/todo/routes.rs (66%) rename {form => forms/form}/Cargo.toml (100%) rename {form => forms/form}/README.md (100%) rename {form => forms/form}/src/main.rs (100%) rename {form => forms/form}/static/form.html (100%) rename {multipart-async-std => forms/multipart-async-std}/.gitignore (100%) rename {multipart-async-std => forms/multipart-async-std}/Cargo.toml (100%) rename {multipart-async-std => forms/multipart-async-std}/LICENSE (100%) rename {multipart-async-std => forms/multipart-async-std}/README.md (100%) rename {multipart-async-std => forms/multipart-async-std}/src/main.rs (100%) rename {multipart-s3 => forms/multipart-s3}/.env.example (100%) rename {multipart-s3 => forms/multipart-s3}/.gitignore (100%) rename {multipart-s3 => forms/multipart-s3}/Cargo.toml (100%) rename {multipart-s3 => forms/multipart-s3}/README.md (100%) rename {multipart-s3 => forms/multipart-s3}/src/main.rs (100%) rename {multipart-s3 => forms/multipart-s3}/src/utils/mod.rs (100%) rename {multipart-s3 => forms/multipart-s3}/src/utils/s3.rs (100%) rename {multipart-s3 => forms/multipart-s3}/src/utils/upload.rs (100%) rename {multipart => forms/multipart}/.gitignore (100%) rename {multipart => forms/multipart}/Cargo.toml (100%) rename {multipart => forms/multipart}/LICENSE (100%) rename {multipart => forms/multipart}/README.md (100%) rename {multipart => forms/multipart}/src/main.rs (100%) rename {async-graphql-demo => graphql/graphql-demo}/Cargo.toml (100%) rename {async-graphql-demo => graphql/graphql-demo}/README.md (100%) rename {async-graphql-demo => graphql/graphql-demo}/src/main.rs (100%) rename {async-graphql-demo => graphql/graphql-demo}/src/starwars/mod.rs (100%) rename {async-graphql-demo => graphql/graphql-demo}/src/starwars/model.rs (100%) rename {juniper-advanced => graphql/juniper-advanced}/.env.example (100%) rename {juniper-advanced => graphql/juniper-advanced}/Cargo.toml (100%) rename {juniper-advanced => graphql/juniper-advanced}/README.md (100%) rename {juniper-advanced => graphql/juniper-advanced}/mysql-schema.sql (100%) rename {juniper-advanced => graphql/juniper-advanced}/src/db.rs (100%) rename {juniper-advanced => graphql/juniper-advanced}/src/handlers.rs (100%) rename {juniper-advanced => graphql/juniper-advanced}/src/main.rs (100%) rename {juniper-advanced => graphql/juniper-advanced}/src/schemas/mod.rs (100%) rename {juniper-advanced => graphql/juniper-advanced}/src/schemas/product.rs (100%) rename {juniper-advanced => graphql/juniper-advanced}/src/schemas/root.rs (100%) rename {juniper-advanced => graphql/juniper-advanced}/src/schemas/user.rs (100%) rename {juniper => graphql/juniper}/Cargo.toml (100%) rename {juniper => graphql/juniper}/README.md (100%) rename {juniper => graphql/juniper}/src/main.rs (100%) rename {juniper => graphql/juniper}/src/schema.rs (100%) rename json/{ => json}/Cargo.toml (100%) rename json/{ => json}/README.md (100%) rename json/{ => json}/client.py (100%) rename json/{ => json}/src/main.rs (100%) rename {json_decode_error => json/json_decode_error}/Cargo.toml (100%) rename {json_decode_error => json/json_decode_error}/README.md (100%) rename {json_decode_error => json/json_decode_error}/src/main.rs (100%) rename {json_error => json/json_error}/Cargo.toml (100%) rename {json_error => json/json_error}/src/main.rs (100%) rename {jsonrpc => json/jsonrpc}/Cargo.toml (100%) rename {jsonrpc => json/jsonrpc}/README.md (100%) rename {jsonrpc => json/jsonrpc}/src/convention.rs (100%) rename {jsonrpc => json/jsonrpc}/src/main.rs (100%) rename {jsonrpc => json/jsonrpc}/tests/test_client.py (100%) rename {async_data_factory => other/data_factory}/Cargo.toml (100%) rename {async_data_factory => other/data_factory}/README.md (100%) rename {async_data_factory => other/data_factory}/src/main.rs (100%) rename {protobuf => other/protobuf}/Cargo.toml (100%) rename {protobuf => other/protobuf}/README.md (100%) rename {protobuf => other/protobuf}/client.py (100%) rename {protobuf => other/protobuf}/src/main.rs (100%) rename {protobuf => other/protobuf}/test.proto (100%) rename {protobuf => other/protobuf}/test_pb2.py (100%) rename {server-sent-events => other/server-sent-events}/Cargo.toml (100%) rename {server-sent-events => other/server-sent-events}/README.md (100%) rename {server-sent-events => other/server-sent-events}/benchmark.js (100%) rename {server-sent-events => other/server-sent-events}/drain.js (100%) rename {server-sent-events => other/server-sent-events}/src/index.html (100%) rename {server-sent-events => other/server-sent-events}/src/main.rs (100%) rename {udp-echo => other/udp-echo}/Cargo.toml (100%) rename {udp-echo => other/udp-echo}/README.md (100%) rename {udp-echo => other/udp-echo}/src/main.rs (100%) rename {unix-socket => other/unix-socket}/Cargo.toml (100%) rename {unix-socket => other/unix-socket}/README.md (100%) rename {unix-socket => other/unix-socket}/src/main.rs (100%) rename {awc_https => security/awc_https}/Cargo.toml (100%) rename {awc_https => security/awc_https}/README.md (100%) rename {awc_https => security/awc_https}/src/main.rs (100%) rename {casbin => security/casbin}/Cargo.toml (100%) rename {casbin => security/casbin}/README.md (100%) rename {casbin => security/casbin}/rbac/rbac_model.conf (100%) rename {casbin => security/casbin}/rbac/rbac_policy.csv (100%) rename {casbin => security/casbin}/src/main.rs (100%) rename {openssl => security/openssl}/Cargo.toml (100%) rename {openssl => security/openssl}/README.md (100%) rename {openssl => security/openssl}/cert.pem (100%) rename {openssl => security/openssl}/key.pem (100%) rename {openssl => security/openssl}/src/main.rs (100%) rename {rustls-client-cert => security/rustls-client-cert}/Cargo.toml (100%) rename {rustls-client-cert => security/rustls-client-cert}/README.md (100%) rename {rustls-client-cert => security/rustls-client-cert}/certs/client-cert.pem (100%) rename {rustls-client-cert => security/rustls-client-cert}/certs/client-key.pem (100%) rename {rustls-client-cert => security/rustls-client-cert}/certs/rootCA-key.pem (100%) rename {rustls-client-cert => security/rustls-client-cert}/certs/rootCA.pem (100%) rename {rustls-client-cert => security/rustls-client-cert}/certs/server-cert.pem (100%) rename {rustls-client-cert => security/rustls-client-cert}/certs/server-key.pem (100%) rename {rustls-client-cert => security/rustls-client-cert}/src/main.rs (100%) rename {rustls => security/rustls}/Cargo.toml (100%) rename {rustls => security/rustls}/README.md (100%) rename {rustls => security/rustls}/cert.pem (100%) rename {rustls => security/rustls}/key.pem (100%) rename {rustls => security/rustls}/src/main.rs (100%) rename {web-cors => security/web-cors}/README.md (100%) rename {web-cors => security/web-cors}/backend/Cargo.toml (100%) rename {web-cors => security/web-cors}/backend/src/main.rs (100%) rename {web-cors => security/web-cors}/backend/src/user.rs (100%) rename {web-cors => security/web-cors}/frontend/.gitignore (100%) rename {web-cors => security/web-cors}/frontend/index.html (100%) rename {web-cors => security/web-cors}/frontend/package.json (100%) rename {web-cors => security/web-cors}/frontend/src/app.vue (100%) rename {web-cors => security/web-cors}/frontend/src/main.js (100%) rename {cookie-auth => session/cookie-auth}/Cargo.toml (100%) rename {cookie-auth => session/cookie-auth}/README.md (100%) rename {cookie-auth => session/cookie-auth}/src/main.rs (100%) rename {cookie-session => session/cookie-session}/Cargo.toml (100%) rename {cookie-session => session/cookie-session}/README.md (100%) rename {cookie-session => session/cookie-session}/src/main.rs (100%) rename {redis-session => session/redis-session}/Cargo.toml (100%) rename {redis-session => session/redis-session}/README.md (100%) rename {redis-session => session/redis-session}/src/main.rs (100%) rename {template_askama => template_engines/askama}/Cargo.toml (100%) rename {template_askama => template_engines/askama}/src/main.rs (100%) rename {template_askama => template_engines/askama}/templates/index.html (100%) rename {template_askama => template_engines/askama}/templates/user.html (100%) rename {template_handlebars => template_engines/handlebars}/Cargo.toml (100%) rename {template_handlebars => template_engines/handlebars}/README.md (100%) rename {template_handlebars => template_engines/handlebars}/src/main.rs (100%) rename {template_handlebars => template_engines/handlebars}/static/templates/error.html (100%) rename {template_handlebars => template_engines/handlebars}/static/templates/index.html (100%) rename {template_handlebars => template_engines/handlebars}/static/templates/user.html (100%) rename {template_tera => template_engines/tera}/Cargo.toml (100%) rename {template_tera => template_engines/tera}/README.md (100%) rename {template_tera => template_engines/tera}/src/main.rs (100%) rename {template_tera => template_engines/tera}/templates/error.html (100%) rename {template_tera => template_engines/tera}/templates/index.html (100%) rename {template_tera => template_engines/tera}/templates/user.html (100%) rename {template_tinytemplate => template_engines/tinytemplate}/Cargo.toml (100%) rename {template_tinytemplate => template_engines/tinytemplate}/README.md (100%) rename {template_tinytemplate => template_engines/tinytemplate}/src/main.rs (100%) rename {template_tinytemplate => template_engines/tinytemplate}/templates/error.html (100%) rename {template_tinytemplate => template_engines/tinytemplate}/templates/index.html (100%) rename {template_tinytemplate => template_engines/tinytemplate}/templates/user.html (100%) rename {template_yarte => template_engines/yarte}/Cargo.toml (100%) rename {template_yarte => template_engines/yarte}/README.md (100%) rename {template_yarte => template_engines/yarte}/build.rs (100%) rename {template_yarte => template_engines/yarte}/src/main.rs (100%) rename {template_yarte => template_engines/yarte}/templates/base.hbs (100%) rename {template_yarte => template_engines/yarte}/templates/deep/more/card/form.hbs (100%) rename {template_yarte => template_engines/yarte}/templates/deep/more/card/hi.hbs (100%) rename {template_yarte => template_engines/yarte}/templates/deep/more/deep/welcome.hbs (100%) rename {template_yarte => template_engines/yarte}/templates/deep/more/doc/head.hbs (100%) rename {template_yarte => template_engines/yarte}/templates/deep/more/doc/t.hbs (100%) rename {template_yarte => template_engines/yarte}/templates/index.hbs (100%) rename {template_yarte => template_engines/yarte}/yarte.toml (100%) rename {websocket-autobahn => websockets/autobahn}/Cargo.toml (100%) rename {websocket-autobahn => websockets/autobahn}/README.md (100%) rename {websocket-autobahn => websockets/autobahn}/config/fuzzingclient.json (100%) rename {websocket-autobahn => websockets/autobahn}/reports/.gitignore (100%) rename {websocket-autobahn => websockets/autobahn}/src/main.rs (100%) rename {websocket-chat-broker => websockets/chat-broker}/Cargo.toml (100%) rename {websocket-chat-broker => websockets/chat-broker}/README.md (100%) rename {websocket-chat-broker => websockets/chat-broker}/client.py (100%) rename {websocket-chat-broker => websockets/chat-broker}/src/main.rs (100%) rename {websocket-chat-broker => websockets/chat-broker}/src/message.rs (100%) rename {websocket-chat-broker => websockets/chat-broker}/src/server.rs (100%) rename {websocket-chat-broker => websockets/chat-broker}/src/session.rs (100%) rename {websocket-chat-broker => websockets/chat-broker}/static/index.html (100%) rename {websocket-chat => websockets/chat}/Cargo.toml (100%) rename {websocket-chat => websockets/chat}/README.md (100%) rename {websocket-chat => websockets/chat}/client.py (100%) rename {websocket-chat => websockets/chat}/src/main.rs (100%) rename {websocket-chat => websockets/chat}/src/server.rs (100%) rename {websocket-chat => websockets/chat}/static/websocket.html (100%) rename {websocket-tcp-chat => websockets/tcp-chat}/Cargo.toml (100%) rename {websocket-tcp-chat => websockets/tcp-chat}/README.md (100%) rename {websocket-tcp-chat => websockets/tcp-chat}/client.py (100%) rename {websocket-tcp-chat => websockets/tcp-chat}/src/client.rs (100%) rename {websocket-tcp-chat => websockets/tcp-chat}/src/codec.rs (100%) rename {websocket-tcp-chat => websockets/tcp-chat}/src/main.rs (100%) rename {websocket-tcp-chat => websockets/tcp-chat}/src/server.rs (100%) rename {websocket-tcp-chat => websockets/tcp-chat}/src/session.rs (100%) rename {websocket-tcp-chat => websockets/tcp-chat}/static/websocket.html (100%) rename {websocket => websockets/websocket}/Cargo.toml (100%) rename {websocket => websockets/websocket}/README.md (100%) rename {websocket => websockets/websocket}/src/client.rs (100%) rename {websocket => websockets/websocket}/src/main.rs (100%) rename {websocket => websockets/websocket}/static/actixLogo.png (100%) rename {websocket => websockets/websocket}/static/favicon.ico (100%) rename {websocket => websockets/websocket}/static/index.html (100%) rename {websocket => websockets/websocket}/websocket-client.py (100%) diff --git a/Cargo.lock b/Cargo.lock index 270f9b7..afebc17 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -946,7 +946,7 @@ dependencies = [ "memchr", "num_cpus", "once_cell", - "pin-project-lite 0.2.0", + "pin-project-lite 0.2.4", "pin-utils", "slab", "wasm-bindgen-futures", @@ -2256,9 +2256,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b3b0c040a1fe6529d30b3c5944b280c7f0dcb2930d2c3062bca967b602583d0" +checksum = "7f55667319111d593ba876406af7c409c0ebb44dc4be6132a783ccf163ea14c1" dependencies = [ "futures-channel", "futures-core", @@ -2271,9 +2271,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b7109687aa4e177ef6fe84553af6280ef2778bdb7783ba44c9dc3399110fe64" +checksum = "8c2dd2df839b57db9ab69c2c9d8f3e8c81984781937fe2807dc6dcf3b2ad2939" dependencies = [ "futures-core", "futures-sink", @@ -2281,15 +2281,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "847ce131b72ffb13b6109a221da9ad97a64cbe48feb1028356b836b47b8f1748" +checksum = "15496a72fabf0e62bdc3df11a59a3787429221dd0710ba8ef163d6f7a9112c94" [[package]] name = "futures-executor" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caa2b2b68b880003057c1dd49f1ed937e38f22fcf6c212188a121f08cf40a65" +checksum = "891a4b7b96d84d5940084b2a37632dd65deeae662c114ceaa2c879629c9c0ad1" dependencies = [ "futures-core", "futures-task", @@ -2298,9 +2298,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "611834ce18aaa1bd13c4b374f5d653e1027cf99b6b502584ff8c9a64413b30bb" +checksum = "d71c2c65c57704c32f5241c1223167c2c3294fd34ac020c807ddbe6db287ba59" [[package]] name = "futures-lite" @@ -2319,9 +2319,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77408a692f1f97bcc61dc001d752e00643408fbc922e4d634c655df50d595556" +checksum = "ea405816a5139fb39af82c2beb921d52143f556038378d6db21183a5c37fbfb7" dependencies = [ "proc-macro-hack", "proc-macro2", @@ -2331,24 +2331,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f878195a49cee50e006b02b93cf7e0a95a38ac7b776b4c4d9cc1207cd20fcb3d" +checksum = "85754d98985841b7d4f5e8e6fbfa4a4ac847916893ec511a2917ccd8525b8bb3" [[package]] name = "futures-task" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c554eb5bf48b2426c4771ab68c6b14468b6e76cc90996f528c3338d761a4d0d" -dependencies = [ - "once_cell", -] +checksum = "fa189ef211c15ee602667a6fcfe1c1fd9e07d42250d2156382820fba33c9df80" [[package]] name = "futures-util" -version = "0.3.8" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d304cff4a7b99cfb7986f7d43fbe93d175e72e704a8860787cc95e9ffd85cbd2" +checksum = "1812c7ab8aedf8d6f2701a43e1243acdbcc2b36ab26e2ad421eb99ac963d96d1" dependencies = [ "futures-channel", "futures-core", @@ -2357,7 +2354,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project 1.0.2", + "pin-project-lite 0.2.4", "pin-utils", "proc-macro-hack", "proc-macro-nested", @@ -3895,9 +3892,9 @@ checksum = "c917123afa01924fc84bb20c4c03f004d9c38e5127e3c039bbf7f4b9c76a2f6b" [[package]] name = "pin-project-lite" -version = "0.2.0" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b063f57ec186e6140e2b8b6921e5f1bd89c7356dda5b33acc5401203ca6131c" +checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" [[package]] name = "pin-utils" @@ -4332,7 +4329,7 @@ dependencies = [ "mime_guess", "native-tls", "percent-encoding", - "pin-project-lite 0.2.0", + "pin-project-lite 0.2.4", "serde 1.0.117", "serde_json", "serde_urlencoded", @@ -4865,9 +4862,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.2.2" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce32ea0c6c56d5eacaeb814fbed9960547021d3edd010ded1425f180536b20ab" +checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" dependencies = [ "libc", ] @@ -5579,7 +5576,7 @@ checksum = "9f47026cdc4080c07e49b37087de021820269d996f581aac150ef9e5583eefe3" dependencies = [ "cfg-if 1.0.0", "log", - "pin-project-lite 0.2.0", + "pin-project-lite 0.2.4", "tracing-attributes", "tracing-core", ] diff --git a/Cargo.toml b/Cargo.toml index 9886e48..b475aa4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,57 +1,57 @@ [workspace] members = [ - "async_data_factory", - "async_db", - "async_ex1", - "async_ex2", - "async-graphql-demo", - "async_pg", - "awc_https", - "basics", - "casbin", - "cookie-auth", - "cookie-session", - "diesel", - "docker_sample", - "error_handling", - "form", - "hello-world", - "http-proxy", - "json", - "json_decode_error", - "json_error", - "jsonrpc", - "juniper", - "juniper-advanced", - "middleware", - "multipart", - "multipart-s3", - "multipart-async-std", - "openssl", - "protobuf", - "r2d2", - "redis", - "redis-session", - "run-in-thread", - "rustls", - "rustls-client-cert", - "shutdown-server", - "server-sent-events", - "simple-auth-server", - "state", - "static_index", - "template_askama", - "template_handlebars", - "template_tera", - "template_tinytemplate", - "template_yarte", - "todo", - "udp-echo", - "unix-socket", - "web-cors/backend", - "websocket", - "websocket-autobahn", - "websocket-chat", - "websocket-chat-broker", - "websocket-tcp-chat" + "basics/basics", + "basics/docker_sample", + "basics/error_handling", + "basics/hello-world", + "basics/http-proxy", + "basics/json-validation", + "basics/middleware", + "basics/nested-routing", + "basics/run-in-thread", + "basics/shutdown-server", + "basics/state", + "basics/static_index", + "basics/todo", + "database_interactions/basic", + "database_interactions/diesel", + "database_interactions/pg", + "database_interactions/r2d2", + "database_interactions/redis", + "database_interactions/simple-auth-server", + "forms/form", + "forms/multipart", + "forms/multipart-async-std", + "forms/multipart-s3", + "graphql/graphql-demo", + "graphql/juniper", + "graphql/juniper-advanced", + "json/json", + "json/json_decode_error", + "json/json_error", + "json/jsonrpc", + "other/data_factory", + "other/protobuf", + "other/server-sent-events", + "other/udp-echo", + "other/unix-socket", + "security/awc_https", + "security/casbin", + "security/openssl", + "security/rustls", + "security/rustls-client-cert", + "security/web-cors/backend", + "session/cookie-auth", + "session/cookie-session", + "session/redis-session", + "template_engines/askama", + "template_engines/handlebars", + "template_engines/tera", + "template_engines/tinytemplate", + "template_engines/yarte", + "websockets/autobahn", + "websockets/chat", + "websockets/chat-broker", + "websockets/tcp-chat", + "websockets/websocket", ] diff --git a/basics/Cargo.toml b/basics/basics/Cargo.toml similarity index 100% rename from basics/Cargo.toml rename to basics/basics/Cargo.toml diff --git a/basics/README.md b/basics/basics/README.md similarity index 100% rename from basics/README.md rename to basics/basics/README.md diff --git a/basics/src/main.rs b/basics/basics/src/main.rs similarity index 100% rename from basics/src/main.rs rename to basics/basics/src/main.rs diff --git a/basics/static/404.html b/basics/basics/static/404.html similarity index 100% rename from basics/static/404.html rename to basics/basics/static/404.html diff --git a/basics/static/actixLogo.png b/basics/basics/static/actixLogo.png similarity index 100% rename from basics/static/actixLogo.png rename to basics/basics/static/actixLogo.png diff --git a/basics/static/favicon.ico b/basics/basics/static/favicon.ico similarity index 100% rename from basics/static/favicon.ico rename to basics/basics/static/favicon.ico diff --git a/basics/static/welcome.html b/basics/basics/static/welcome.html similarity index 100% rename from basics/static/welcome.html rename to basics/basics/static/welcome.html diff --git a/docker_sample/Cargo.toml b/basics/docker_sample/Cargo.toml similarity index 100% rename from docker_sample/Cargo.toml rename to basics/docker_sample/Cargo.toml diff --git a/docker_sample/Dockerfile b/basics/docker_sample/Dockerfile similarity index 100% rename from docker_sample/Dockerfile rename to basics/docker_sample/Dockerfile diff --git a/docker_sample/README.MD b/basics/docker_sample/README.MD similarity index 100% rename from docker_sample/README.MD rename to basics/docker_sample/README.MD diff --git a/docker_sample/src/main.rs b/basics/docker_sample/src/main.rs similarity index 100% rename from docker_sample/src/main.rs rename to basics/docker_sample/src/main.rs diff --git a/error_handling/Cargo.toml b/basics/error_handling/Cargo.toml similarity index 100% rename from error_handling/Cargo.toml rename to basics/error_handling/Cargo.toml diff --git a/error_handling/README.md b/basics/error_handling/README.md similarity index 100% rename from error_handling/README.md rename to basics/error_handling/README.md diff --git a/error_handling/src/main.rs b/basics/error_handling/src/main.rs similarity index 100% rename from error_handling/src/main.rs rename to basics/error_handling/src/main.rs diff --git a/hello-world/Cargo.toml b/basics/hello-world/Cargo.toml similarity index 100% rename from hello-world/Cargo.toml rename to basics/hello-world/Cargo.toml diff --git a/hello-world/src/main.rs b/basics/hello-world/src/main.rs similarity index 100% rename from hello-world/src/main.rs rename to basics/hello-world/src/main.rs diff --git a/http-proxy/Cargo.toml b/basics/http-proxy/Cargo.toml similarity index 100% rename from http-proxy/Cargo.toml rename to basics/http-proxy/Cargo.toml diff --git a/http-proxy/README.md b/basics/http-proxy/README.md similarity index 100% rename from http-proxy/README.md rename to basics/http-proxy/README.md diff --git a/http-proxy/src/main.rs b/basics/http-proxy/src/main.rs similarity index 100% rename from http-proxy/src/main.rs rename to basics/http-proxy/src/main.rs diff --git a/async_ex1/Cargo.toml b/basics/json-validation/Cargo.toml similarity index 100% rename from async_ex1/Cargo.toml rename to basics/json-validation/Cargo.toml diff --git a/async_ex1/README.md b/basics/json-validation/README.md similarity index 100% rename from async_ex1/README.md rename to basics/json-validation/README.md diff --git a/async_ex1/src/main.rs b/basics/json-validation/src/main.rs similarity index 100% rename from async_ex1/src/main.rs rename to basics/json-validation/src/main.rs diff --git a/middleware/Cargo.toml b/basics/middleware/Cargo.toml similarity index 100% rename from middleware/Cargo.toml rename to basics/middleware/Cargo.toml diff --git a/middleware/README.md b/basics/middleware/README.md similarity index 100% rename from middleware/README.md rename to basics/middleware/README.md diff --git a/middleware/src/main.rs b/basics/middleware/src/main.rs similarity index 100% rename from middleware/src/main.rs rename to basics/middleware/src/main.rs diff --git a/middleware/src/read_request_body.rs b/basics/middleware/src/read_request_body.rs similarity index 100% rename from middleware/src/read_request_body.rs rename to basics/middleware/src/read_request_body.rs diff --git a/middleware/src/read_response_body.rs b/basics/middleware/src/read_response_body.rs similarity index 100% rename from middleware/src/read_response_body.rs rename to basics/middleware/src/read_response_body.rs diff --git a/middleware/src/redirect.rs b/basics/middleware/src/redirect.rs similarity index 100% rename from middleware/src/redirect.rs rename to basics/middleware/src/redirect.rs diff --git a/middleware/src/simple.rs b/basics/middleware/src/simple.rs similarity index 100% rename from middleware/src/simple.rs rename to basics/middleware/src/simple.rs diff --git a/async_ex2/Cargo.toml b/basics/nested-routing/Cargo.toml similarity index 100% rename from async_ex2/Cargo.toml rename to basics/nested-routing/Cargo.toml diff --git a/async_ex2/README.md b/basics/nested-routing/README.md similarity index 100% rename from async_ex2/README.md rename to basics/nested-routing/README.md diff --git a/async_ex2/src/appconfig.rs b/basics/nested-routing/src/appconfig.rs similarity index 100% rename from async_ex2/src/appconfig.rs rename to basics/nested-routing/src/appconfig.rs diff --git a/async_ex2/src/bin/main.rs b/basics/nested-routing/src/bin/main.rs similarity index 100% rename from async_ex2/src/bin/main.rs rename to basics/nested-routing/src/bin/main.rs diff --git a/async_ex2/src/common.rs b/basics/nested-routing/src/common.rs similarity index 100% rename from async_ex2/src/common.rs rename to basics/nested-routing/src/common.rs diff --git a/async_ex2/src/handlers/mod.rs b/basics/nested-routing/src/handlers/mod.rs similarity index 100% rename from async_ex2/src/handlers/mod.rs rename to basics/nested-routing/src/handlers/mod.rs diff --git a/async_ex2/src/handlers/parts.rs b/basics/nested-routing/src/handlers/parts.rs similarity index 100% rename from async_ex2/src/handlers/parts.rs rename to basics/nested-routing/src/handlers/parts.rs diff --git a/async_ex2/src/handlers/products.rs b/basics/nested-routing/src/handlers/products.rs similarity index 100% rename from async_ex2/src/handlers/products.rs rename to basics/nested-routing/src/handlers/products.rs diff --git a/async_ex2/src/lib.rs b/basics/nested-routing/src/lib.rs similarity index 100% rename from async_ex2/src/lib.rs rename to basics/nested-routing/src/lib.rs diff --git a/run-in-thread/Cargo.toml b/basics/run-in-thread/Cargo.toml similarity index 100% rename from run-in-thread/Cargo.toml rename to basics/run-in-thread/Cargo.toml diff --git a/run-in-thread/src/main.rs b/basics/run-in-thread/src/main.rs similarity index 100% rename from run-in-thread/src/main.rs rename to basics/run-in-thread/src/main.rs diff --git a/shutdown-server/Cargo.toml b/basics/shutdown-server/Cargo.toml similarity index 100% rename from shutdown-server/Cargo.toml rename to basics/shutdown-server/Cargo.toml diff --git a/shutdown-server/README.md b/basics/shutdown-server/README.md similarity index 100% rename from shutdown-server/README.md rename to basics/shutdown-server/README.md diff --git a/shutdown-server/src/main.rs b/basics/shutdown-server/src/main.rs similarity index 100% rename from shutdown-server/src/main.rs rename to basics/shutdown-server/src/main.rs diff --git a/state/Cargo.toml b/basics/state/Cargo.toml similarity index 100% rename from state/Cargo.toml rename to basics/state/Cargo.toml diff --git a/state/README.md b/basics/state/README.md similarity index 100% rename from state/README.md rename to basics/state/README.md diff --git a/state/src/main.rs b/basics/state/src/main.rs similarity index 100% rename from state/src/main.rs rename to basics/state/src/main.rs diff --git a/static_index/.gitattributes b/basics/static_index/.gitattributes similarity index 100% rename from static_index/.gitattributes rename to basics/static_index/.gitattributes diff --git a/static_index/Cargo.toml b/basics/static_index/Cargo.toml similarity index 100% rename from static_index/Cargo.toml rename to basics/static_index/Cargo.toml diff --git a/static_index/README.md b/basics/static_index/README.md similarity index 100% rename from static_index/README.md rename to basics/static_index/README.md diff --git a/static_index/src/main.rs b/basics/static_index/src/main.rs similarity index 100% rename from static_index/src/main.rs rename to basics/static_index/src/main.rs diff --git a/static_index/static/images/logo.png b/basics/static_index/static/images/logo.png similarity index 100% rename from static_index/static/images/logo.png rename to basics/static_index/static/images/logo.png diff --git a/static_index/static/root/css/example.css b/basics/static_index/static/root/css/example.css similarity index 100% rename from static_index/static/root/css/example.css rename to basics/static_index/static/root/css/example.css diff --git a/static_index/static/root/favicon.ico b/basics/static_index/static/root/favicon.ico similarity index 100% rename from static_index/static/root/favicon.ico rename to basics/static_index/static/root/favicon.ico diff --git a/static_index/static/root/index.html b/basics/static_index/static/root/index.html similarity index 100% rename from static_index/static/root/index.html rename to basics/static_index/static/root/index.html diff --git a/static_index/static/root/js/example.js b/basics/static_index/static/root/js/example.js similarity index 100% rename from static_index/static/root/js/example.js rename to basics/static_index/static/root/js/example.js diff --git a/todo/.env b/basics/todo/.env similarity index 100% rename from todo/.env rename to basics/todo/.env diff --git a/todo/Cargo.toml b/basics/todo/Cargo.toml similarity index 100% rename from todo/Cargo.toml rename to basics/todo/Cargo.toml diff --git a/todo/README.md b/basics/todo/README.md similarity index 100% rename from todo/README.md rename to basics/todo/README.md diff --git a/simple-auth-server/diesel.toml b/basics/todo/diesel.toml similarity index 100% rename from simple-auth-server/diesel.toml rename to basics/todo/diesel.toml diff --git a/simple-auth-server/migrations/.gitkeep b/basics/todo/migrations/.gitkeep similarity index 100% rename from simple-auth-server/migrations/.gitkeep rename to basics/todo/migrations/.gitkeep diff --git a/simple-auth-server/migrations/00000000000000_diesel_initial_setup/down.sql b/basics/todo/migrations/00000000000000_diesel_initial_setup/down.sql similarity index 100% rename from simple-auth-server/migrations/00000000000000_diesel_initial_setup/down.sql rename to basics/todo/migrations/00000000000000_diesel_initial_setup/down.sql diff --git a/simple-auth-server/migrations/00000000000000_diesel_initial_setup/up.sql b/basics/todo/migrations/00000000000000_diesel_initial_setup/up.sql similarity index 100% rename from simple-auth-server/migrations/00000000000000_diesel_initial_setup/up.sql rename to basics/todo/migrations/00000000000000_diesel_initial_setup/up.sql diff --git a/todo/migrations/2018-07-05-163612_create_tasks_table/down.sql b/basics/todo/migrations/2018-07-05-163612_create_tasks_table/down.sql similarity index 100% rename from todo/migrations/2018-07-05-163612_create_tasks_table/down.sql rename to basics/todo/migrations/2018-07-05-163612_create_tasks_table/down.sql diff --git a/todo/migrations/2018-07-05-163612_create_tasks_table/up.sql b/basics/todo/migrations/2018-07-05-163612_create_tasks_table/up.sql similarity index 100% rename from todo/migrations/2018-07-05-163612_create_tasks_table/up.sql rename to basics/todo/migrations/2018-07-05-163612_create_tasks_table/up.sql diff --git a/todo/src/api.rs b/basics/todo/src/api.rs similarity index 100% rename from todo/src/api.rs rename to basics/todo/src/api.rs diff --git a/todo/src/db.rs b/basics/todo/src/db.rs similarity index 100% rename from todo/src/db.rs rename to basics/todo/src/db.rs diff --git a/todo/src/main.rs b/basics/todo/src/main.rs similarity index 100% rename from todo/src/main.rs rename to basics/todo/src/main.rs diff --git a/todo/src/model.rs b/basics/todo/src/model.rs similarity index 100% rename from todo/src/model.rs rename to basics/todo/src/model.rs diff --git a/todo/src/schema.rs b/basics/todo/src/schema.rs similarity index 100% rename from todo/src/schema.rs rename to basics/todo/src/schema.rs diff --git a/todo/src/session.rs b/basics/todo/src/session.rs similarity index 100% rename from todo/src/session.rs rename to basics/todo/src/session.rs diff --git a/todo/static/css/normalize.css b/basics/todo/static/css/normalize.css similarity index 100% rename from todo/static/css/normalize.css rename to basics/todo/static/css/normalize.css diff --git a/todo/static/css/skeleton.css b/basics/todo/static/css/skeleton.css similarity index 100% rename from todo/static/css/skeleton.css rename to basics/todo/static/css/skeleton.css diff --git a/todo/static/css/style.css b/basics/todo/static/css/style.css similarity index 100% rename from todo/static/css/style.css rename to basics/todo/static/css/style.css diff --git a/todo/static/errors/400.html b/basics/todo/static/errors/400.html similarity index 100% rename from todo/static/errors/400.html rename to basics/todo/static/errors/400.html diff --git a/todo/static/errors/404.html b/basics/todo/static/errors/404.html similarity index 100% rename from todo/static/errors/404.html rename to basics/todo/static/errors/404.html diff --git a/todo/static/errors/500.html b/basics/todo/static/errors/500.html similarity index 100% rename from todo/static/errors/500.html rename to basics/todo/static/errors/500.html diff --git a/todo/templates/index.html.tera b/basics/todo/templates/index.html.tera similarity index 100% rename from todo/templates/index.html.tera rename to basics/todo/templates/index.html.tera diff --git a/async_db/Cargo.toml b/database_interactions/basic/Cargo.toml similarity index 100% rename from async_db/Cargo.toml rename to database_interactions/basic/Cargo.toml diff --git a/async_db/README.md b/database_interactions/basic/README.md similarity index 100% rename from async_db/README.md rename to database_interactions/basic/README.md diff --git a/async_db/db/GHCND_documentation.pdf b/database_interactions/basic/db/GHCND_documentation.pdf similarity index 100% rename from async_db/db/GHCND_documentation.pdf rename to database_interactions/basic/db/GHCND_documentation.pdf diff --git a/async_db/db/README.md b/database_interactions/basic/db/README.md similarity index 100% rename from async_db/db/README.md rename to database_interactions/basic/db/README.md diff --git a/async_db/db/db.sql b/database_interactions/basic/db/db.sql similarity index 100% rename from async_db/db/db.sql rename to database_interactions/basic/db/db.sql diff --git a/async_db/db/nyc_centralpark_weather.csv b/database_interactions/basic/db/nyc_centralpark_weather.csv similarity index 100% rename from async_db/db/nyc_centralpark_weather.csv rename to database_interactions/basic/db/nyc_centralpark_weather.csv diff --git a/async_db/db/setup_db.sh b/database_interactions/basic/db/setup_db.sh similarity index 100% rename from async_db/db/setup_db.sh rename to database_interactions/basic/db/setup_db.sh diff --git a/async_db/src/db.rs b/database_interactions/basic/src/db.rs similarity index 100% rename from async_db/src/db.rs rename to database_interactions/basic/src/db.rs diff --git a/async_db/src/main.rs b/database_interactions/basic/src/main.rs similarity index 100% rename from async_db/src/main.rs rename to database_interactions/basic/src/main.rs diff --git a/diesel/.env b/database_interactions/diesel/.env similarity index 100% rename from diesel/.env rename to database_interactions/diesel/.env diff --git a/diesel/.gitignore b/database_interactions/diesel/.gitignore similarity index 100% rename from diesel/.gitignore rename to database_interactions/diesel/.gitignore diff --git a/diesel/Cargo.toml b/database_interactions/diesel/Cargo.toml similarity index 100% rename from diesel/Cargo.toml rename to database_interactions/diesel/Cargo.toml diff --git a/diesel/README.md b/database_interactions/diesel/README.md similarity index 100% rename from diesel/README.md rename to database_interactions/diesel/README.md diff --git a/diesel/migrations/20170124012402_create_users/down.sql b/database_interactions/diesel/migrations/20170124012402_create_users/down.sql similarity index 100% rename from diesel/migrations/20170124012402_create_users/down.sql rename to database_interactions/diesel/migrations/20170124012402_create_users/down.sql diff --git a/diesel/migrations/20170124012402_create_users/up.sql b/database_interactions/diesel/migrations/20170124012402_create_users/up.sql similarity index 100% rename from diesel/migrations/20170124012402_create_users/up.sql rename to database_interactions/diesel/migrations/20170124012402_create_users/up.sql diff --git a/diesel/src/actions.rs b/database_interactions/diesel/src/actions.rs similarity index 100% rename from diesel/src/actions.rs rename to database_interactions/diesel/src/actions.rs diff --git a/diesel/src/main.rs b/database_interactions/diesel/src/main.rs similarity index 100% rename from diesel/src/main.rs rename to database_interactions/diesel/src/main.rs diff --git a/diesel/src/models.rs b/database_interactions/diesel/src/models.rs similarity index 100% rename from diesel/src/models.rs rename to database_interactions/diesel/src/models.rs diff --git a/diesel/src/schema.rs b/database_interactions/diesel/src/schema.rs similarity index 100% rename from diesel/src/schema.rs rename to database_interactions/diesel/src/schema.rs diff --git a/async_pg/.gitignore b/database_interactions/pg/.gitignore similarity index 100% rename from async_pg/.gitignore rename to database_interactions/pg/.gitignore diff --git a/async_pg/Cargo.toml b/database_interactions/pg/Cargo.toml similarity index 100% rename from async_pg/Cargo.toml rename to database_interactions/pg/Cargo.toml diff --git a/async_pg/README.md b/database_interactions/pg/README.md similarity index 100% rename from async_pg/README.md rename to database_interactions/pg/README.md diff --git a/async_pg/sql/add_user.sql b/database_interactions/pg/sql/add_user.sql similarity index 100% rename from async_pg/sql/add_user.sql rename to database_interactions/pg/sql/add_user.sql diff --git a/async_pg/sql/get_users.sql b/database_interactions/pg/sql/get_users.sql similarity index 100% rename from async_pg/sql/get_users.sql rename to database_interactions/pg/sql/get_users.sql diff --git a/async_pg/sql/schema.sql b/database_interactions/pg/sql/schema.sql similarity index 100% rename from async_pg/sql/schema.sql rename to database_interactions/pg/sql/schema.sql diff --git a/async_pg/src/main.rs b/database_interactions/pg/src/main.rs similarity index 100% rename from async_pg/src/main.rs rename to database_interactions/pg/src/main.rs diff --git a/r2d2/Cargo.toml b/database_interactions/r2d2/Cargo.toml similarity index 100% rename from r2d2/Cargo.toml rename to database_interactions/r2d2/Cargo.toml diff --git a/r2d2/src/main.rs b/database_interactions/r2d2/src/main.rs similarity index 100% rename from r2d2/src/main.rs rename to database_interactions/r2d2/src/main.rs diff --git a/redis/Cargo.toml b/database_interactions/redis/Cargo.toml similarity index 100% rename from redis/Cargo.toml rename to database_interactions/redis/Cargo.toml diff --git a/redis/README.md b/database_interactions/redis/README.md similarity index 100% rename from redis/README.md rename to database_interactions/redis/README.md diff --git a/redis/src/main.rs b/database_interactions/redis/src/main.rs similarity index 100% rename from redis/src/main.rs rename to database_interactions/redis/src/main.rs diff --git a/simple-auth-server/Cargo.toml b/database_interactions/simple-auth-server/Cargo.toml similarity index 96% rename from simple-auth-server/Cargo.toml rename to database_interactions/simple-auth-server/Cargo.toml index 9cdeb4f..2060b2c 100644 --- a/simple-auth-server/Cargo.toml +++ b/database_interactions/simple-auth-server/Cargo.toml @@ -3,7 +3,7 @@ name = "simple-auth-server" version = "2.0.0" authors = ["mygnu "] edition = "2018" -workspace = ".." +workspace = "../.." [dependencies] actix-web = "3" diff --git a/simple-auth-server/README.md b/database_interactions/simple-auth-server/README.md similarity index 100% rename from simple-auth-server/README.md rename to database_interactions/simple-auth-server/README.md diff --git a/todo/diesel.toml b/database_interactions/simple-auth-server/diesel.toml similarity index 100% rename from todo/diesel.toml rename to database_interactions/simple-auth-server/diesel.toml diff --git a/todo/migrations/.gitkeep b/database_interactions/simple-auth-server/migrations/.gitkeep similarity index 100% rename from todo/migrations/.gitkeep rename to database_interactions/simple-auth-server/migrations/.gitkeep diff --git a/todo/migrations/00000000000000_diesel_initial_setup/down.sql b/database_interactions/simple-auth-server/migrations/00000000000000_diesel_initial_setup/down.sql similarity index 100% rename from todo/migrations/00000000000000_diesel_initial_setup/down.sql rename to database_interactions/simple-auth-server/migrations/00000000000000_diesel_initial_setup/down.sql diff --git a/todo/migrations/00000000000000_diesel_initial_setup/up.sql b/database_interactions/simple-auth-server/migrations/00000000000000_diesel_initial_setup/up.sql similarity index 100% rename from todo/migrations/00000000000000_diesel_initial_setup/up.sql rename to database_interactions/simple-auth-server/migrations/00000000000000_diesel_initial_setup/up.sql diff --git a/simple-auth-server/migrations/2018-10-09-101948_users/down.sql b/database_interactions/simple-auth-server/migrations/2018-10-09-101948_users/down.sql similarity index 100% rename from simple-auth-server/migrations/2018-10-09-101948_users/down.sql rename to database_interactions/simple-auth-server/migrations/2018-10-09-101948_users/down.sql diff --git a/simple-auth-server/migrations/2018-10-09-101948_users/up.sql b/database_interactions/simple-auth-server/migrations/2018-10-09-101948_users/up.sql similarity index 100% rename from simple-auth-server/migrations/2018-10-09-101948_users/up.sql rename to database_interactions/simple-auth-server/migrations/2018-10-09-101948_users/up.sql diff --git a/simple-auth-server/migrations/2018-10-16-095633_invitations/down.sql b/database_interactions/simple-auth-server/migrations/2018-10-16-095633_invitations/down.sql similarity index 100% rename from simple-auth-server/migrations/2018-10-16-095633_invitations/down.sql rename to database_interactions/simple-auth-server/migrations/2018-10-16-095633_invitations/down.sql diff --git a/simple-auth-server/migrations/2018-10-16-095633_invitations/up.sql b/database_interactions/simple-auth-server/migrations/2018-10-16-095633_invitations/up.sql similarity index 100% rename from simple-auth-server/migrations/2018-10-16-095633_invitations/up.sql rename to database_interactions/simple-auth-server/migrations/2018-10-16-095633_invitations/up.sql diff --git a/simple-auth-server/src/auth_handler.rs b/database_interactions/simple-auth-server/src/auth_handler.rs similarity index 100% rename from simple-auth-server/src/auth_handler.rs rename to database_interactions/simple-auth-server/src/auth_handler.rs diff --git a/simple-auth-server/src/email_service.rs b/database_interactions/simple-auth-server/src/email_service.rs similarity index 100% rename from simple-auth-server/src/email_service.rs rename to database_interactions/simple-auth-server/src/email_service.rs diff --git a/simple-auth-server/src/errors.rs b/database_interactions/simple-auth-server/src/errors.rs similarity index 100% rename from simple-auth-server/src/errors.rs rename to database_interactions/simple-auth-server/src/errors.rs diff --git a/simple-auth-server/src/invitation_handler.rs b/database_interactions/simple-auth-server/src/invitation_handler.rs similarity index 100% rename from simple-auth-server/src/invitation_handler.rs rename to database_interactions/simple-auth-server/src/invitation_handler.rs diff --git a/simple-auth-server/src/main.rs b/database_interactions/simple-auth-server/src/main.rs similarity index 100% rename from simple-auth-server/src/main.rs rename to database_interactions/simple-auth-server/src/main.rs diff --git a/simple-auth-server/src/models.rs b/database_interactions/simple-auth-server/src/models.rs similarity index 100% rename from simple-auth-server/src/models.rs rename to database_interactions/simple-auth-server/src/models.rs diff --git a/simple-auth-server/src/register_handler.rs b/database_interactions/simple-auth-server/src/register_handler.rs similarity index 100% rename from simple-auth-server/src/register_handler.rs rename to database_interactions/simple-auth-server/src/register_handler.rs diff --git a/simple-auth-server/src/schema.rs b/database_interactions/simple-auth-server/src/schema.rs similarity index 100% rename from simple-auth-server/src/schema.rs rename to database_interactions/simple-auth-server/src/schema.rs diff --git a/simple-auth-server/src/utils.rs b/database_interactions/simple-auth-server/src/utils.rs similarity index 100% rename from simple-auth-server/src/utils.rs rename to database_interactions/simple-auth-server/src/utils.rs diff --git a/simple-auth-server/static/index.html b/database_interactions/simple-auth-server/static/index.html similarity index 100% rename from simple-auth-server/static/index.html rename to database_interactions/simple-auth-server/static/index.html diff --git a/simple-auth-server/static/main.css b/database_interactions/simple-auth-server/static/main.css similarity index 100% rename from simple-auth-server/static/main.css rename to database_interactions/simple-auth-server/static/main.css diff --git a/simple-auth-server/static/main.js b/database_interactions/simple-auth-server/static/main.js similarity index 100% rename from simple-auth-server/static/main.js rename to database_interactions/simple-auth-server/static/main.js diff --git a/simple-auth-server/static/register.html b/database_interactions/simple-auth-server/static/register.html similarity index 100% rename from simple-auth-server/static/register.html rename to database_interactions/simple-auth-server/static/register.html diff --git a/sqlx_todo/.env.example b/database_interactions/sqlx_todo/.env.example similarity index 100% rename from sqlx_todo/.env.example rename to database_interactions/sqlx_todo/.env.example diff --git a/sqlx_todo/.gitignore b/database_interactions/sqlx_todo/.gitignore similarity index 100% rename from sqlx_todo/.gitignore rename to database_interactions/sqlx_todo/.gitignore diff --git a/sqlx_todo/Cargo.toml b/database_interactions/sqlx_todo/Cargo.toml similarity index 95% rename from sqlx_todo/Cargo.toml rename to database_interactions/sqlx_todo/Cargo.toml index b2ddb8f..8c0a430 100644 --- a/sqlx_todo/Cargo.toml +++ b/database_interactions/sqlx_todo/Cargo.toml @@ -16,3 +16,4 @@ dotenv = "0.15.0" env_logger = "0.7.1" log = "0.4.8" anyhow = "1.0.28" +futures = "0.3.13" diff --git a/sqlx_todo/README.md b/database_interactions/sqlx_todo/README.md similarity index 100% rename from sqlx_todo/README.md rename to database_interactions/sqlx_todo/README.md diff --git a/sqlx_todo/schema.sql b/database_interactions/sqlx_todo/schema.sql similarity index 100% rename from sqlx_todo/schema.sql rename to database_interactions/sqlx_todo/schema.sql diff --git a/sqlx_todo/src/main.rs b/database_interactions/sqlx_todo/src/main.rs similarity index 94% rename from sqlx_todo/src/main.rs rename to database_interactions/sqlx_todo/src/main.rs index 4c44d5b..e32c1fb 100644 --- a/sqlx_todo/src/main.rs +++ b/database_interactions/sqlx_todo/src/main.rs @@ -1,12 +1,12 @@ #[macro_use] extern crate log; +use actix_web::{web, App, HttpResponse, HttpServer, Responder}; +use anyhow::Result; use dotenv::dotenv; use listenfd::ListenFd; -use std::env; -use actix_web::{web, App, HttpResponse, HttpServer, Responder}; use sqlx::PgPool; -use anyhow::Result; +use std::env; // import todo module (routes and model) mod todo; @@ -33,7 +33,8 @@ async fn main() -> Result<()> { // this will enable us to keep application running during recompile: systemfd --no-pid -s http::5000 -- cargo watch -x run let mut listenfd = ListenFd::from_env(); - let database_url = env::var("DATABASE_URL").expect("DATABASE_URL is not set in .env file"); + let database_url = + env::var("DATABASE_URL").expect("DATABASE_URL is not set in .env file"); let db_pool = PgPool::new(&database_url).await?; let mut server = HttpServer::new(move || { diff --git a/sqlx_todo/src/todo/mod.rs b/database_interactions/sqlx_todo/src/todo/mod.rs similarity index 65% rename from sqlx_todo/src/todo/mod.rs rename to database_interactions/sqlx_todo/src/todo/mod.rs index 61f924b..d660aad 100644 --- a/sqlx_todo/src/todo/mod.rs +++ b/database_interactions/sqlx_todo/src/todo/mod.rs @@ -2,4 +2,4 @@ mod model; mod routes; pub use model::*; -pub use routes::init; \ No newline at end of file +pub use routes::init; diff --git a/sqlx_todo/src/todo/model.rs b/database_interactions/sqlx_todo/src/todo/model.rs similarity index 86% rename from sqlx_todo/src/todo/model.rs rename to database_interactions/sqlx_todo/src/todo/model.rs index bc96b00..b3ce06a 100644 --- a/sqlx_todo/src/todo/model.rs +++ b/database_interactions/sqlx_todo/src/todo/model.rs @@ -1,15 +1,15 @@ -use serde::{Serialize, Deserialize}; -use actix_web::{HttpResponse, HttpRequest, Responder, Error}; -use futures::future::{ready, Ready}; -use sqlx::{PgPool, FromRow, Row}; -use sqlx::postgres::PgRow; +use actix_web::{Error, HttpRequest, HttpResponse, Responder}; use anyhow::Result; +use futures::future::{ready, Ready}; +use serde::{Deserialize, Serialize}; +use sqlx::postgres::PgRow; +use sqlx::{FromRow, PgPool, Row}; // this struct will use to receive user input #[derive(Serialize, Deserialize)] pub struct TodoRequest { pub description: String, - pub done: bool + pub done: bool, } // this struct will be used to represent database record @@ -28,11 +28,9 @@ impl Responder for Todo { fn respond_to(self, _req: &HttpRequest) -> Self::Future { let body = serde_json::to_string(&self).unwrap(); // create response and set content type - ready(Ok( - HttpResponse::Ok() - .content_type("application/json") - .body(body) - )) + ready(Ok(HttpResponse::Ok() + .content_type("application/json") + .body(body))) } } @@ -47,14 +45,14 @@ impl Todo { ORDER BY id "# ) - .fetch_all(pool) - .await?; + .fetch_all(pool) + .await?; for rec in recs { todos.push(Todo { id: rec.id, description: rec.description, - done: rec.done + done: rec.done, }); } @@ -63,18 +61,18 @@ impl Todo { pub async fn find_by_id(id: i32, pool: &PgPool) -> Result { let rec = sqlx::query!( - r#" + r#" SELECT * FROM todos WHERE id = $1 "#, - id - ) - .fetch_one(&*pool) - .await?; + id + ) + .fetch_one(&*pool) + .await?; Ok(Todo { id: rec.id, description: rec.description, - done: rec.done + done: rec.done, }) } diff --git a/sqlx_todo/src/todo/routes.rs b/database_interactions/sqlx_todo/src/todo/routes.rs similarity index 66% rename from sqlx_todo/src/todo/routes.rs rename to database_interactions/sqlx_todo/src/todo/routes.rs index 58b5a90..4e7c9a3 100644 --- a/sqlx_todo/src/todo/routes.rs +++ b/database_interactions/sqlx_todo/src/todo/routes.rs @@ -7,7 +7,8 @@ async fn find_all(db_pool: web::Data) -> impl Responder { let result = Todo::find_all(db_pool.get_ref()).await; match result { Ok(todos) => HttpResponse::Ok().json(todos), - _ => HttpResponse::BadRequest().body("Error trying to read all todos from database") + _ => HttpResponse::BadRequest() + .body("Error trying to read all todos from database"), } } @@ -16,25 +17,33 @@ async fn find(id: web::Path, db_pool: web::Data) -> impl Responder let result = Todo::find_by_id(id.into_inner(), db_pool.get_ref()).await; match result { Ok(todo) => HttpResponse::Ok().json(todo), - _ => HttpResponse::BadRequest().body("Todo not found") + _ => HttpResponse::BadRequest().body("Todo not found"), } } #[post("/todo")] -async fn create(todo: web::Json, db_pool: web::Data) -> impl Responder { +async fn create( + todo: web::Json, + db_pool: web::Data, +) -> impl Responder { let result = Todo::create(todo.into_inner(), db_pool.get_ref()).await; match result { Ok(todo) => HttpResponse::Ok().json(todo), - _ => HttpResponse::BadRequest().body("Error trying to create new todo") + _ => HttpResponse::BadRequest().body("Error trying to create new todo"), } } #[put("/todo/{id}")] -async fn update(id: web::Path, todo: web::Json, db_pool: web::Data) -> impl Responder { - let result = Todo::update(id.into_inner(), todo.into_inner(),db_pool.get_ref()).await; +async fn update( + id: web::Path, + todo: web::Json, + db_pool: web::Data, +) -> impl Responder { + let result = + Todo::update(id.into_inner(), todo.into_inner(), db_pool.get_ref()).await; match result { Ok(todo) => HttpResponse::Ok().json(todo), - _ => HttpResponse::BadRequest().body("Todo not found") + _ => HttpResponse::BadRequest().body("Todo not found"), } } @@ -44,12 +53,13 @@ async fn delete(id: web::Path, db_pool: web::Data) -> impl Responde match result { Ok(rows) => { if rows > 0 { - HttpResponse::Ok().body(format!("Successfully deleted {} record(s)", rows)) + HttpResponse::Ok() + .body(format!("Successfully deleted {} record(s)", rows)) } else { HttpResponse::BadRequest().body("Todo not found") } - }, - _ => HttpResponse::BadRequest().body("Todo not found") + } + _ => HttpResponse::BadRequest().body("Todo not found"), } } @@ -60,4 +70,4 @@ pub fn init(cfg: &mut web::ServiceConfig) { cfg.service(create); cfg.service(update); cfg.service(delete); -} \ No newline at end of file +} diff --git a/form/Cargo.toml b/forms/form/Cargo.toml similarity index 100% rename from form/Cargo.toml rename to forms/form/Cargo.toml diff --git a/form/README.md b/forms/form/README.md similarity index 100% rename from form/README.md rename to forms/form/README.md diff --git a/form/src/main.rs b/forms/form/src/main.rs similarity index 100% rename from form/src/main.rs rename to forms/form/src/main.rs diff --git a/form/static/form.html b/forms/form/static/form.html similarity index 100% rename from form/static/form.html rename to forms/form/static/form.html diff --git a/multipart-async-std/.gitignore b/forms/multipart-async-std/.gitignore similarity index 100% rename from multipart-async-std/.gitignore rename to forms/multipart-async-std/.gitignore diff --git a/multipart-async-std/Cargo.toml b/forms/multipart-async-std/Cargo.toml similarity index 100% rename from multipart-async-std/Cargo.toml rename to forms/multipart-async-std/Cargo.toml diff --git a/multipart-async-std/LICENSE b/forms/multipart-async-std/LICENSE similarity index 100% rename from multipart-async-std/LICENSE rename to forms/multipart-async-std/LICENSE diff --git a/multipart-async-std/README.md b/forms/multipart-async-std/README.md similarity index 100% rename from multipart-async-std/README.md rename to forms/multipart-async-std/README.md diff --git a/multipart-async-std/src/main.rs b/forms/multipart-async-std/src/main.rs similarity index 100% rename from multipart-async-std/src/main.rs rename to forms/multipart-async-std/src/main.rs diff --git a/multipart-s3/.env.example b/forms/multipart-s3/.env.example similarity index 100% rename from multipart-s3/.env.example rename to forms/multipart-s3/.env.example diff --git a/multipart-s3/.gitignore b/forms/multipart-s3/.gitignore similarity index 100% rename from multipart-s3/.gitignore rename to forms/multipart-s3/.gitignore diff --git a/multipart-s3/Cargo.toml b/forms/multipart-s3/Cargo.toml similarity index 100% rename from multipart-s3/Cargo.toml rename to forms/multipart-s3/Cargo.toml diff --git a/multipart-s3/README.md b/forms/multipart-s3/README.md similarity index 100% rename from multipart-s3/README.md rename to forms/multipart-s3/README.md diff --git a/multipart-s3/src/main.rs b/forms/multipart-s3/src/main.rs similarity index 100% rename from multipart-s3/src/main.rs rename to forms/multipart-s3/src/main.rs diff --git a/multipart-s3/src/utils/mod.rs b/forms/multipart-s3/src/utils/mod.rs similarity index 100% rename from multipart-s3/src/utils/mod.rs rename to forms/multipart-s3/src/utils/mod.rs diff --git a/multipart-s3/src/utils/s3.rs b/forms/multipart-s3/src/utils/s3.rs similarity index 100% rename from multipart-s3/src/utils/s3.rs rename to forms/multipart-s3/src/utils/s3.rs diff --git a/multipart-s3/src/utils/upload.rs b/forms/multipart-s3/src/utils/upload.rs similarity index 100% rename from multipart-s3/src/utils/upload.rs rename to forms/multipart-s3/src/utils/upload.rs diff --git a/multipart/.gitignore b/forms/multipart/.gitignore similarity index 100% rename from multipart/.gitignore rename to forms/multipart/.gitignore diff --git a/multipart/Cargo.toml b/forms/multipart/Cargo.toml similarity index 100% rename from multipart/Cargo.toml rename to forms/multipart/Cargo.toml diff --git a/multipart/LICENSE b/forms/multipart/LICENSE similarity index 100% rename from multipart/LICENSE rename to forms/multipart/LICENSE diff --git a/multipart/README.md b/forms/multipart/README.md similarity index 100% rename from multipart/README.md rename to forms/multipart/README.md diff --git a/multipart/src/main.rs b/forms/multipart/src/main.rs similarity index 100% rename from multipart/src/main.rs rename to forms/multipart/src/main.rs diff --git a/async-graphql-demo/Cargo.toml b/graphql/graphql-demo/Cargo.toml similarity index 100% rename from async-graphql-demo/Cargo.toml rename to graphql/graphql-demo/Cargo.toml diff --git a/async-graphql-demo/README.md b/graphql/graphql-demo/README.md similarity index 100% rename from async-graphql-demo/README.md rename to graphql/graphql-demo/README.md diff --git a/async-graphql-demo/src/main.rs b/graphql/graphql-demo/src/main.rs similarity index 100% rename from async-graphql-demo/src/main.rs rename to graphql/graphql-demo/src/main.rs diff --git a/async-graphql-demo/src/starwars/mod.rs b/graphql/graphql-demo/src/starwars/mod.rs similarity index 100% rename from async-graphql-demo/src/starwars/mod.rs rename to graphql/graphql-demo/src/starwars/mod.rs diff --git a/async-graphql-demo/src/starwars/model.rs b/graphql/graphql-demo/src/starwars/model.rs similarity index 100% rename from async-graphql-demo/src/starwars/model.rs rename to graphql/graphql-demo/src/starwars/model.rs diff --git a/juniper-advanced/.env.example b/graphql/juniper-advanced/.env.example similarity index 100% rename from juniper-advanced/.env.example rename to graphql/juniper-advanced/.env.example diff --git a/juniper-advanced/Cargo.toml b/graphql/juniper-advanced/Cargo.toml similarity index 100% rename from juniper-advanced/Cargo.toml rename to graphql/juniper-advanced/Cargo.toml diff --git a/juniper-advanced/README.md b/graphql/juniper-advanced/README.md similarity index 100% rename from juniper-advanced/README.md rename to graphql/juniper-advanced/README.md diff --git a/juniper-advanced/mysql-schema.sql b/graphql/juniper-advanced/mysql-schema.sql similarity index 100% rename from juniper-advanced/mysql-schema.sql rename to graphql/juniper-advanced/mysql-schema.sql diff --git a/juniper-advanced/src/db.rs b/graphql/juniper-advanced/src/db.rs similarity index 100% rename from juniper-advanced/src/db.rs rename to graphql/juniper-advanced/src/db.rs diff --git a/juniper-advanced/src/handlers.rs b/graphql/juniper-advanced/src/handlers.rs similarity index 100% rename from juniper-advanced/src/handlers.rs rename to graphql/juniper-advanced/src/handlers.rs diff --git a/juniper-advanced/src/main.rs b/graphql/juniper-advanced/src/main.rs similarity index 100% rename from juniper-advanced/src/main.rs rename to graphql/juniper-advanced/src/main.rs diff --git a/juniper-advanced/src/schemas/mod.rs b/graphql/juniper-advanced/src/schemas/mod.rs similarity index 100% rename from juniper-advanced/src/schemas/mod.rs rename to graphql/juniper-advanced/src/schemas/mod.rs diff --git a/juniper-advanced/src/schemas/product.rs b/graphql/juniper-advanced/src/schemas/product.rs similarity index 100% rename from juniper-advanced/src/schemas/product.rs rename to graphql/juniper-advanced/src/schemas/product.rs diff --git a/juniper-advanced/src/schemas/root.rs b/graphql/juniper-advanced/src/schemas/root.rs similarity index 100% rename from juniper-advanced/src/schemas/root.rs rename to graphql/juniper-advanced/src/schemas/root.rs diff --git a/juniper-advanced/src/schemas/user.rs b/graphql/juniper-advanced/src/schemas/user.rs similarity index 100% rename from juniper-advanced/src/schemas/user.rs rename to graphql/juniper-advanced/src/schemas/user.rs diff --git a/juniper/Cargo.toml b/graphql/juniper/Cargo.toml similarity index 100% rename from juniper/Cargo.toml rename to graphql/juniper/Cargo.toml diff --git a/juniper/README.md b/graphql/juniper/README.md similarity index 100% rename from juniper/README.md rename to graphql/juniper/README.md diff --git a/juniper/src/main.rs b/graphql/juniper/src/main.rs similarity index 100% rename from juniper/src/main.rs rename to graphql/juniper/src/main.rs diff --git a/juniper/src/schema.rs b/graphql/juniper/src/schema.rs similarity index 100% rename from juniper/src/schema.rs rename to graphql/juniper/src/schema.rs diff --git a/json/Cargo.toml b/json/json/Cargo.toml similarity index 100% rename from json/Cargo.toml rename to json/json/Cargo.toml diff --git a/json/README.md b/json/json/README.md similarity index 100% rename from json/README.md rename to json/json/README.md diff --git a/json/client.py b/json/json/client.py similarity index 100% rename from json/client.py rename to json/json/client.py diff --git a/json/src/main.rs b/json/json/src/main.rs similarity index 100% rename from json/src/main.rs rename to json/json/src/main.rs diff --git a/json_decode_error/Cargo.toml b/json/json_decode_error/Cargo.toml similarity index 100% rename from json_decode_error/Cargo.toml rename to json/json_decode_error/Cargo.toml diff --git a/json_decode_error/README.md b/json/json_decode_error/README.md similarity index 100% rename from json_decode_error/README.md rename to json/json_decode_error/README.md diff --git a/json_decode_error/src/main.rs b/json/json_decode_error/src/main.rs similarity index 100% rename from json_decode_error/src/main.rs rename to json/json_decode_error/src/main.rs diff --git a/json_error/Cargo.toml b/json/json_error/Cargo.toml similarity index 100% rename from json_error/Cargo.toml rename to json/json_error/Cargo.toml diff --git a/json_error/src/main.rs b/json/json_error/src/main.rs similarity index 100% rename from json_error/src/main.rs rename to json/json_error/src/main.rs diff --git a/jsonrpc/Cargo.toml b/json/jsonrpc/Cargo.toml similarity index 100% rename from jsonrpc/Cargo.toml rename to json/jsonrpc/Cargo.toml diff --git a/jsonrpc/README.md b/json/jsonrpc/README.md similarity index 100% rename from jsonrpc/README.md rename to json/jsonrpc/README.md diff --git a/jsonrpc/src/convention.rs b/json/jsonrpc/src/convention.rs similarity index 100% rename from jsonrpc/src/convention.rs rename to json/jsonrpc/src/convention.rs diff --git a/jsonrpc/src/main.rs b/json/jsonrpc/src/main.rs similarity index 100% rename from jsonrpc/src/main.rs rename to json/jsonrpc/src/main.rs diff --git a/jsonrpc/tests/test_client.py b/json/jsonrpc/tests/test_client.py similarity index 100% rename from jsonrpc/tests/test_client.py rename to json/jsonrpc/tests/test_client.py diff --git a/async_data_factory/Cargo.toml b/other/data_factory/Cargo.toml similarity index 100% rename from async_data_factory/Cargo.toml rename to other/data_factory/Cargo.toml diff --git a/async_data_factory/README.md b/other/data_factory/README.md similarity index 100% rename from async_data_factory/README.md rename to other/data_factory/README.md diff --git a/async_data_factory/src/main.rs b/other/data_factory/src/main.rs similarity index 100% rename from async_data_factory/src/main.rs rename to other/data_factory/src/main.rs diff --git a/protobuf/Cargo.toml b/other/protobuf/Cargo.toml similarity index 100% rename from protobuf/Cargo.toml rename to other/protobuf/Cargo.toml diff --git a/protobuf/README.md b/other/protobuf/README.md similarity index 100% rename from protobuf/README.md rename to other/protobuf/README.md diff --git a/protobuf/client.py b/other/protobuf/client.py similarity index 100% rename from protobuf/client.py rename to other/protobuf/client.py diff --git a/protobuf/src/main.rs b/other/protobuf/src/main.rs similarity index 100% rename from protobuf/src/main.rs rename to other/protobuf/src/main.rs diff --git a/protobuf/test.proto b/other/protobuf/test.proto similarity index 100% rename from protobuf/test.proto rename to other/protobuf/test.proto diff --git a/protobuf/test_pb2.py b/other/protobuf/test_pb2.py similarity index 100% rename from protobuf/test_pb2.py rename to other/protobuf/test_pb2.py diff --git a/server-sent-events/Cargo.toml b/other/server-sent-events/Cargo.toml similarity index 100% rename from server-sent-events/Cargo.toml rename to other/server-sent-events/Cargo.toml diff --git a/server-sent-events/README.md b/other/server-sent-events/README.md similarity index 100% rename from server-sent-events/README.md rename to other/server-sent-events/README.md diff --git a/server-sent-events/benchmark.js b/other/server-sent-events/benchmark.js similarity index 100% rename from server-sent-events/benchmark.js rename to other/server-sent-events/benchmark.js diff --git a/server-sent-events/drain.js b/other/server-sent-events/drain.js similarity index 100% rename from server-sent-events/drain.js rename to other/server-sent-events/drain.js diff --git a/server-sent-events/src/index.html b/other/server-sent-events/src/index.html similarity index 100% rename from server-sent-events/src/index.html rename to other/server-sent-events/src/index.html diff --git a/server-sent-events/src/main.rs b/other/server-sent-events/src/main.rs similarity index 100% rename from server-sent-events/src/main.rs rename to other/server-sent-events/src/main.rs diff --git a/udp-echo/Cargo.toml b/other/udp-echo/Cargo.toml similarity index 100% rename from udp-echo/Cargo.toml rename to other/udp-echo/Cargo.toml diff --git a/udp-echo/README.md b/other/udp-echo/README.md similarity index 100% rename from udp-echo/README.md rename to other/udp-echo/README.md diff --git a/udp-echo/src/main.rs b/other/udp-echo/src/main.rs similarity index 100% rename from udp-echo/src/main.rs rename to other/udp-echo/src/main.rs diff --git a/unix-socket/Cargo.toml b/other/unix-socket/Cargo.toml similarity index 100% rename from unix-socket/Cargo.toml rename to other/unix-socket/Cargo.toml diff --git a/unix-socket/README.md b/other/unix-socket/README.md similarity index 100% rename from unix-socket/README.md rename to other/unix-socket/README.md diff --git a/unix-socket/src/main.rs b/other/unix-socket/src/main.rs similarity index 100% rename from unix-socket/src/main.rs rename to other/unix-socket/src/main.rs diff --git a/awc_https/Cargo.toml b/security/awc_https/Cargo.toml similarity index 100% rename from awc_https/Cargo.toml rename to security/awc_https/Cargo.toml diff --git a/awc_https/README.md b/security/awc_https/README.md similarity index 100% rename from awc_https/README.md rename to security/awc_https/README.md diff --git a/awc_https/src/main.rs b/security/awc_https/src/main.rs similarity index 100% rename from awc_https/src/main.rs rename to security/awc_https/src/main.rs diff --git a/casbin/Cargo.toml b/security/casbin/Cargo.toml similarity index 100% rename from casbin/Cargo.toml rename to security/casbin/Cargo.toml diff --git a/casbin/README.md b/security/casbin/README.md similarity index 100% rename from casbin/README.md rename to security/casbin/README.md diff --git a/casbin/rbac/rbac_model.conf b/security/casbin/rbac/rbac_model.conf similarity index 100% rename from casbin/rbac/rbac_model.conf rename to security/casbin/rbac/rbac_model.conf diff --git a/casbin/rbac/rbac_policy.csv b/security/casbin/rbac/rbac_policy.csv similarity index 100% rename from casbin/rbac/rbac_policy.csv rename to security/casbin/rbac/rbac_policy.csv diff --git a/casbin/src/main.rs b/security/casbin/src/main.rs similarity index 100% rename from casbin/src/main.rs rename to security/casbin/src/main.rs diff --git a/openssl/Cargo.toml b/security/openssl/Cargo.toml similarity index 100% rename from openssl/Cargo.toml rename to security/openssl/Cargo.toml diff --git a/openssl/README.md b/security/openssl/README.md similarity index 100% rename from openssl/README.md rename to security/openssl/README.md diff --git a/openssl/cert.pem b/security/openssl/cert.pem similarity index 100% rename from openssl/cert.pem rename to security/openssl/cert.pem diff --git a/openssl/key.pem b/security/openssl/key.pem similarity index 100% rename from openssl/key.pem rename to security/openssl/key.pem diff --git a/openssl/src/main.rs b/security/openssl/src/main.rs similarity index 100% rename from openssl/src/main.rs rename to security/openssl/src/main.rs diff --git a/rustls-client-cert/Cargo.toml b/security/rustls-client-cert/Cargo.toml similarity index 100% rename from rustls-client-cert/Cargo.toml rename to security/rustls-client-cert/Cargo.toml diff --git a/rustls-client-cert/README.md b/security/rustls-client-cert/README.md similarity index 100% rename from rustls-client-cert/README.md rename to security/rustls-client-cert/README.md diff --git a/rustls-client-cert/certs/client-cert.pem b/security/rustls-client-cert/certs/client-cert.pem similarity index 100% rename from rustls-client-cert/certs/client-cert.pem rename to security/rustls-client-cert/certs/client-cert.pem diff --git a/rustls-client-cert/certs/client-key.pem b/security/rustls-client-cert/certs/client-key.pem similarity index 100% rename from rustls-client-cert/certs/client-key.pem rename to security/rustls-client-cert/certs/client-key.pem diff --git a/rustls-client-cert/certs/rootCA-key.pem b/security/rustls-client-cert/certs/rootCA-key.pem similarity index 100% rename from rustls-client-cert/certs/rootCA-key.pem rename to security/rustls-client-cert/certs/rootCA-key.pem diff --git a/rustls-client-cert/certs/rootCA.pem b/security/rustls-client-cert/certs/rootCA.pem similarity index 100% rename from rustls-client-cert/certs/rootCA.pem rename to security/rustls-client-cert/certs/rootCA.pem diff --git a/rustls-client-cert/certs/server-cert.pem b/security/rustls-client-cert/certs/server-cert.pem similarity index 100% rename from rustls-client-cert/certs/server-cert.pem rename to security/rustls-client-cert/certs/server-cert.pem diff --git a/rustls-client-cert/certs/server-key.pem b/security/rustls-client-cert/certs/server-key.pem similarity index 100% rename from rustls-client-cert/certs/server-key.pem rename to security/rustls-client-cert/certs/server-key.pem diff --git a/rustls-client-cert/src/main.rs b/security/rustls-client-cert/src/main.rs similarity index 100% rename from rustls-client-cert/src/main.rs rename to security/rustls-client-cert/src/main.rs diff --git a/rustls/Cargo.toml b/security/rustls/Cargo.toml similarity index 100% rename from rustls/Cargo.toml rename to security/rustls/Cargo.toml diff --git a/rustls/README.md b/security/rustls/README.md similarity index 100% rename from rustls/README.md rename to security/rustls/README.md diff --git a/rustls/cert.pem b/security/rustls/cert.pem similarity index 100% rename from rustls/cert.pem rename to security/rustls/cert.pem diff --git a/rustls/key.pem b/security/rustls/key.pem similarity index 100% rename from rustls/key.pem rename to security/rustls/key.pem diff --git a/rustls/src/main.rs b/security/rustls/src/main.rs similarity index 100% rename from rustls/src/main.rs rename to security/rustls/src/main.rs diff --git a/web-cors/README.md b/security/web-cors/README.md similarity index 100% rename from web-cors/README.md rename to security/web-cors/README.md diff --git a/web-cors/backend/Cargo.toml b/security/web-cors/backend/Cargo.toml similarity index 100% rename from web-cors/backend/Cargo.toml rename to security/web-cors/backend/Cargo.toml diff --git a/web-cors/backend/src/main.rs b/security/web-cors/backend/src/main.rs similarity index 100% rename from web-cors/backend/src/main.rs rename to security/web-cors/backend/src/main.rs diff --git a/web-cors/backend/src/user.rs b/security/web-cors/backend/src/user.rs similarity index 100% rename from web-cors/backend/src/user.rs rename to security/web-cors/backend/src/user.rs diff --git a/web-cors/frontend/.gitignore b/security/web-cors/frontend/.gitignore similarity index 100% rename from web-cors/frontend/.gitignore rename to security/web-cors/frontend/.gitignore diff --git a/web-cors/frontend/index.html b/security/web-cors/frontend/index.html similarity index 100% rename from web-cors/frontend/index.html rename to security/web-cors/frontend/index.html diff --git a/web-cors/frontend/package.json b/security/web-cors/frontend/package.json similarity index 100% rename from web-cors/frontend/package.json rename to security/web-cors/frontend/package.json diff --git a/web-cors/frontend/src/app.vue b/security/web-cors/frontend/src/app.vue similarity index 100% rename from web-cors/frontend/src/app.vue rename to security/web-cors/frontend/src/app.vue diff --git a/web-cors/frontend/src/main.js b/security/web-cors/frontend/src/main.js similarity index 100% rename from web-cors/frontend/src/main.js rename to security/web-cors/frontend/src/main.js diff --git a/cookie-auth/Cargo.toml b/session/cookie-auth/Cargo.toml similarity index 100% rename from cookie-auth/Cargo.toml rename to session/cookie-auth/Cargo.toml diff --git a/cookie-auth/README.md b/session/cookie-auth/README.md similarity index 100% rename from cookie-auth/README.md rename to session/cookie-auth/README.md diff --git a/cookie-auth/src/main.rs b/session/cookie-auth/src/main.rs similarity index 100% rename from cookie-auth/src/main.rs rename to session/cookie-auth/src/main.rs diff --git a/cookie-session/Cargo.toml b/session/cookie-session/Cargo.toml similarity index 100% rename from cookie-session/Cargo.toml rename to session/cookie-session/Cargo.toml diff --git a/cookie-session/README.md b/session/cookie-session/README.md similarity index 100% rename from cookie-session/README.md rename to session/cookie-session/README.md diff --git a/cookie-session/src/main.rs b/session/cookie-session/src/main.rs similarity index 100% rename from cookie-session/src/main.rs rename to session/cookie-session/src/main.rs diff --git a/redis-session/Cargo.toml b/session/redis-session/Cargo.toml similarity index 100% rename from redis-session/Cargo.toml rename to session/redis-session/Cargo.toml diff --git a/redis-session/README.md b/session/redis-session/README.md similarity index 100% rename from redis-session/README.md rename to session/redis-session/README.md diff --git a/redis-session/src/main.rs b/session/redis-session/src/main.rs similarity index 100% rename from redis-session/src/main.rs rename to session/redis-session/src/main.rs diff --git a/template_askama/Cargo.toml b/template_engines/askama/Cargo.toml similarity index 100% rename from template_askama/Cargo.toml rename to template_engines/askama/Cargo.toml diff --git a/template_askama/src/main.rs b/template_engines/askama/src/main.rs similarity index 100% rename from template_askama/src/main.rs rename to template_engines/askama/src/main.rs diff --git a/template_askama/templates/index.html b/template_engines/askama/templates/index.html similarity index 100% rename from template_askama/templates/index.html rename to template_engines/askama/templates/index.html diff --git a/template_askama/templates/user.html b/template_engines/askama/templates/user.html similarity index 100% rename from template_askama/templates/user.html rename to template_engines/askama/templates/user.html diff --git a/template_handlebars/Cargo.toml b/template_engines/handlebars/Cargo.toml similarity index 100% rename from template_handlebars/Cargo.toml rename to template_engines/handlebars/Cargo.toml diff --git a/template_handlebars/README.md b/template_engines/handlebars/README.md similarity index 100% rename from template_handlebars/README.md rename to template_engines/handlebars/README.md diff --git a/template_handlebars/src/main.rs b/template_engines/handlebars/src/main.rs similarity index 100% rename from template_handlebars/src/main.rs rename to template_engines/handlebars/src/main.rs diff --git a/template_handlebars/static/templates/error.html b/template_engines/handlebars/static/templates/error.html similarity index 100% rename from template_handlebars/static/templates/error.html rename to template_engines/handlebars/static/templates/error.html diff --git a/template_handlebars/static/templates/index.html b/template_engines/handlebars/static/templates/index.html similarity index 100% rename from template_handlebars/static/templates/index.html rename to template_engines/handlebars/static/templates/index.html diff --git a/template_handlebars/static/templates/user.html b/template_engines/handlebars/static/templates/user.html similarity index 100% rename from template_handlebars/static/templates/user.html rename to template_engines/handlebars/static/templates/user.html diff --git a/template_tera/Cargo.toml b/template_engines/tera/Cargo.toml similarity index 100% rename from template_tera/Cargo.toml rename to template_engines/tera/Cargo.toml diff --git a/template_tera/README.md b/template_engines/tera/README.md similarity index 100% rename from template_tera/README.md rename to template_engines/tera/README.md diff --git a/template_tera/src/main.rs b/template_engines/tera/src/main.rs similarity index 100% rename from template_tera/src/main.rs rename to template_engines/tera/src/main.rs diff --git a/template_tera/templates/error.html b/template_engines/tera/templates/error.html similarity index 100% rename from template_tera/templates/error.html rename to template_engines/tera/templates/error.html diff --git a/template_tera/templates/index.html b/template_engines/tera/templates/index.html similarity index 100% rename from template_tera/templates/index.html rename to template_engines/tera/templates/index.html diff --git a/template_tera/templates/user.html b/template_engines/tera/templates/user.html similarity index 100% rename from template_tera/templates/user.html rename to template_engines/tera/templates/user.html diff --git a/template_tinytemplate/Cargo.toml b/template_engines/tinytemplate/Cargo.toml similarity index 100% rename from template_tinytemplate/Cargo.toml rename to template_engines/tinytemplate/Cargo.toml diff --git a/template_tinytemplate/README.md b/template_engines/tinytemplate/README.md similarity index 100% rename from template_tinytemplate/README.md rename to template_engines/tinytemplate/README.md diff --git a/template_tinytemplate/src/main.rs b/template_engines/tinytemplate/src/main.rs similarity index 100% rename from template_tinytemplate/src/main.rs rename to template_engines/tinytemplate/src/main.rs diff --git a/template_tinytemplate/templates/error.html b/template_engines/tinytemplate/templates/error.html similarity index 100% rename from template_tinytemplate/templates/error.html rename to template_engines/tinytemplate/templates/error.html diff --git a/template_tinytemplate/templates/index.html b/template_engines/tinytemplate/templates/index.html similarity index 100% rename from template_tinytemplate/templates/index.html rename to template_engines/tinytemplate/templates/index.html diff --git a/template_tinytemplate/templates/user.html b/template_engines/tinytemplate/templates/user.html similarity index 100% rename from template_tinytemplate/templates/user.html rename to template_engines/tinytemplate/templates/user.html diff --git a/template_yarte/Cargo.toml b/template_engines/yarte/Cargo.toml similarity index 100% rename from template_yarte/Cargo.toml rename to template_engines/yarte/Cargo.toml diff --git a/template_yarte/README.md b/template_engines/yarte/README.md similarity index 100% rename from template_yarte/README.md rename to template_engines/yarte/README.md diff --git a/template_yarte/build.rs b/template_engines/yarte/build.rs similarity index 100% rename from template_yarte/build.rs rename to template_engines/yarte/build.rs diff --git a/template_yarte/src/main.rs b/template_engines/yarte/src/main.rs similarity index 100% rename from template_yarte/src/main.rs rename to template_engines/yarte/src/main.rs diff --git a/template_yarte/templates/base.hbs b/template_engines/yarte/templates/base.hbs similarity index 100% rename from template_yarte/templates/base.hbs rename to template_engines/yarte/templates/base.hbs diff --git a/template_yarte/templates/deep/more/card/form.hbs b/template_engines/yarte/templates/deep/more/card/form.hbs similarity index 100% rename from template_yarte/templates/deep/more/card/form.hbs rename to template_engines/yarte/templates/deep/more/card/form.hbs diff --git a/template_yarte/templates/deep/more/card/hi.hbs b/template_engines/yarte/templates/deep/more/card/hi.hbs similarity index 100% rename from template_yarte/templates/deep/more/card/hi.hbs rename to template_engines/yarte/templates/deep/more/card/hi.hbs diff --git a/template_yarte/templates/deep/more/deep/welcome.hbs b/template_engines/yarte/templates/deep/more/deep/welcome.hbs similarity index 100% rename from template_yarte/templates/deep/more/deep/welcome.hbs rename to template_engines/yarte/templates/deep/more/deep/welcome.hbs diff --git a/template_yarte/templates/deep/more/doc/head.hbs b/template_engines/yarte/templates/deep/more/doc/head.hbs similarity index 100% rename from template_yarte/templates/deep/more/doc/head.hbs rename to template_engines/yarte/templates/deep/more/doc/head.hbs diff --git a/template_yarte/templates/deep/more/doc/t.hbs b/template_engines/yarte/templates/deep/more/doc/t.hbs similarity index 100% rename from template_yarte/templates/deep/more/doc/t.hbs rename to template_engines/yarte/templates/deep/more/doc/t.hbs diff --git a/template_yarte/templates/index.hbs b/template_engines/yarte/templates/index.hbs similarity index 100% rename from template_yarte/templates/index.hbs rename to template_engines/yarte/templates/index.hbs diff --git a/template_yarte/yarte.toml b/template_engines/yarte/yarte.toml similarity index 100% rename from template_yarte/yarte.toml rename to template_engines/yarte/yarte.toml diff --git a/websocket-autobahn/Cargo.toml b/websockets/autobahn/Cargo.toml similarity index 100% rename from websocket-autobahn/Cargo.toml rename to websockets/autobahn/Cargo.toml diff --git a/websocket-autobahn/README.md b/websockets/autobahn/README.md similarity index 100% rename from websocket-autobahn/README.md rename to websockets/autobahn/README.md diff --git a/websocket-autobahn/config/fuzzingclient.json b/websockets/autobahn/config/fuzzingclient.json similarity index 100% rename from websocket-autobahn/config/fuzzingclient.json rename to websockets/autobahn/config/fuzzingclient.json diff --git a/websocket-autobahn/reports/.gitignore b/websockets/autobahn/reports/.gitignore similarity index 100% rename from websocket-autobahn/reports/.gitignore rename to websockets/autobahn/reports/.gitignore diff --git a/websocket-autobahn/src/main.rs b/websockets/autobahn/src/main.rs similarity index 100% rename from websocket-autobahn/src/main.rs rename to websockets/autobahn/src/main.rs diff --git a/websocket-chat-broker/Cargo.toml b/websockets/chat-broker/Cargo.toml similarity index 100% rename from websocket-chat-broker/Cargo.toml rename to websockets/chat-broker/Cargo.toml diff --git a/websocket-chat-broker/README.md b/websockets/chat-broker/README.md similarity index 100% rename from websocket-chat-broker/README.md rename to websockets/chat-broker/README.md diff --git a/websocket-chat-broker/client.py b/websockets/chat-broker/client.py similarity index 100% rename from websocket-chat-broker/client.py rename to websockets/chat-broker/client.py diff --git a/websocket-chat-broker/src/main.rs b/websockets/chat-broker/src/main.rs similarity index 100% rename from websocket-chat-broker/src/main.rs rename to websockets/chat-broker/src/main.rs diff --git a/websocket-chat-broker/src/message.rs b/websockets/chat-broker/src/message.rs similarity index 100% rename from websocket-chat-broker/src/message.rs rename to websockets/chat-broker/src/message.rs diff --git a/websocket-chat-broker/src/server.rs b/websockets/chat-broker/src/server.rs similarity index 100% rename from websocket-chat-broker/src/server.rs rename to websockets/chat-broker/src/server.rs diff --git a/websocket-chat-broker/src/session.rs b/websockets/chat-broker/src/session.rs similarity index 100% rename from websocket-chat-broker/src/session.rs rename to websockets/chat-broker/src/session.rs diff --git a/websocket-chat-broker/static/index.html b/websockets/chat-broker/static/index.html similarity index 100% rename from websocket-chat-broker/static/index.html rename to websockets/chat-broker/static/index.html diff --git a/websocket-chat/Cargo.toml b/websockets/chat/Cargo.toml similarity index 100% rename from websocket-chat/Cargo.toml rename to websockets/chat/Cargo.toml diff --git a/websocket-chat/README.md b/websockets/chat/README.md similarity index 100% rename from websocket-chat/README.md rename to websockets/chat/README.md diff --git a/websocket-chat/client.py b/websockets/chat/client.py similarity index 100% rename from websocket-chat/client.py rename to websockets/chat/client.py diff --git a/websocket-chat/src/main.rs b/websockets/chat/src/main.rs similarity index 100% rename from websocket-chat/src/main.rs rename to websockets/chat/src/main.rs diff --git a/websocket-chat/src/server.rs b/websockets/chat/src/server.rs similarity index 100% rename from websocket-chat/src/server.rs rename to websockets/chat/src/server.rs diff --git a/websocket-chat/static/websocket.html b/websockets/chat/static/websocket.html similarity index 100% rename from websocket-chat/static/websocket.html rename to websockets/chat/static/websocket.html diff --git a/websocket-tcp-chat/Cargo.toml b/websockets/tcp-chat/Cargo.toml similarity index 100% rename from websocket-tcp-chat/Cargo.toml rename to websockets/tcp-chat/Cargo.toml diff --git a/websocket-tcp-chat/README.md b/websockets/tcp-chat/README.md similarity index 100% rename from websocket-tcp-chat/README.md rename to websockets/tcp-chat/README.md diff --git a/websocket-tcp-chat/client.py b/websockets/tcp-chat/client.py similarity index 100% rename from websocket-tcp-chat/client.py rename to websockets/tcp-chat/client.py diff --git a/websocket-tcp-chat/src/client.rs b/websockets/tcp-chat/src/client.rs similarity index 100% rename from websocket-tcp-chat/src/client.rs rename to websockets/tcp-chat/src/client.rs diff --git a/websocket-tcp-chat/src/codec.rs b/websockets/tcp-chat/src/codec.rs similarity index 100% rename from websocket-tcp-chat/src/codec.rs rename to websockets/tcp-chat/src/codec.rs diff --git a/websocket-tcp-chat/src/main.rs b/websockets/tcp-chat/src/main.rs similarity index 100% rename from websocket-tcp-chat/src/main.rs rename to websockets/tcp-chat/src/main.rs diff --git a/websocket-tcp-chat/src/server.rs b/websockets/tcp-chat/src/server.rs similarity index 100% rename from websocket-tcp-chat/src/server.rs rename to websockets/tcp-chat/src/server.rs diff --git a/websocket-tcp-chat/src/session.rs b/websockets/tcp-chat/src/session.rs similarity index 100% rename from websocket-tcp-chat/src/session.rs rename to websockets/tcp-chat/src/session.rs diff --git a/websocket-tcp-chat/static/websocket.html b/websockets/tcp-chat/static/websocket.html similarity index 100% rename from websocket-tcp-chat/static/websocket.html rename to websockets/tcp-chat/static/websocket.html diff --git a/websocket/Cargo.toml b/websockets/websocket/Cargo.toml similarity index 100% rename from websocket/Cargo.toml rename to websockets/websocket/Cargo.toml diff --git a/websocket/README.md b/websockets/websocket/README.md similarity index 100% rename from websocket/README.md rename to websockets/websocket/README.md diff --git a/websocket/src/client.rs b/websockets/websocket/src/client.rs similarity index 100% rename from websocket/src/client.rs rename to websockets/websocket/src/client.rs diff --git a/websocket/src/main.rs b/websockets/websocket/src/main.rs similarity index 100% rename from websocket/src/main.rs rename to websockets/websocket/src/main.rs diff --git a/websocket/static/actixLogo.png b/websockets/websocket/static/actixLogo.png similarity index 100% rename from websocket/static/actixLogo.png rename to websockets/websocket/static/actixLogo.png diff --git a/websocket/static/favicon.ico b/websockets/websocket/static/favicon.ico similarity index 100% rename from websocket/static/favicon.ico rename to websockets/websocket/static/favicon.ico diff --git a/websocket/static/index.html b/websockets/websocket/static/index.html similarity index 100% rename from websocket/static/index.html rename to websockets/websocket/static/index.html diff --git a/websocket/websocket-client.py b/websockets/websocket/websocket-client.py similarity index 100% rename from websocket/websocket-client.py rename to websockets/websocket/websocket-client.py