├── .env ├── .envrc ├── .gitignore ├── README.md ├── app ├── Cargo.lock ├── Cargo.toml └── src │ └── main.rs ├── common └── error │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── lib.rs ├── context ├── app_context │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ │ └── lib.rs └── mock_context │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── lib.rs ├── docker-compose.yml ├── domain ├── Cargo.lock ├── Cargo.toml └── src │ ├── lib.rs │ ├── user.rs │ └── user_repository.rs ├── example └── anyhow_example │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── lib.rs ├── infra ├── db_schema │ ├── Cargo.lock │ ├── Cargo.toml │ ├── diesel.toml │ ├── migrations │ │ ├── .gitkeep │ │ ├── 00000000000000_diesel_initial_setup │ │ │ ├── down.sql │ │ │ └── up.sql │ │ └── 2022-05-22-141451_create_users │ │ │ ├── down.sql │ │ │ └── up.sql │ └── src │ │ ├── lib.rs │ │ └── schema.rs ├── grpc_handler │ ├── Cargo.lock │ ├── Cargo.toml │ ├── build.rs │ └── src │ │ ├── convert.rs │ │ └── lib.rs └── repository_impl │ ├── Cargo.lock │ ├── Cargo.toml │ └── src │ └── lib.rs ├── proto └── user │ └── v1 │ └── user.proto └── usecase ├── Cargo.lock ├── Cargo.toml └── src ├── create_user.rs ├── get_users_by_ids.rs └── lib.rs /.env: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/.env -------------------------------------------------------------------------------- /.envrc: -------------------------------------------------------------------------------- 1 | dotenv 2 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/.gitignore -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rust-sample-webapp -------------------------------------------------------------------------------- /app/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/app/Cargo.lock -------------------------------------------------------------------------------- /app/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/app/Cargo.toml -------------------------------------------------------------------------------- /app/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/app/src/main.rs -------------------------------------------------------------------------------- /common/error/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/common/error/Cargo.lock -------------------------------------------------------------------------------- /common/error/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/common/error/Cargo.toml -------------------------------------------------------------------------------- /common/error/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/common/error/src/lib.rs -------------------------------------------------------------------------------- /context/app_context/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/context/app_context/Cargo.lock -------------------------------------------------------------------------------- /context/app_context/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/context/app_context/Cargo.toml -------------------------------------------------------------------------------- /context/app_context/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/context/app_context/src/lib.rs -------------------------------------------------------------------------------- /context/mock_context/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/context/mock_context/Cargo.lock -------------------------------------------------------------------------------- /context/mock_context/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/context/mock_context/Cargo.toml -------------------------------------------------------------------------------- /context/mock_context/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/context/mock_context/src/lib.rs -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /domain/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/domain/Cargo.lock -------------------------------------------------------------------------------- /domain/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/domain/Cargo.toml -------------------------------------------------------------------------------- /domain/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/domain/src/lib.rs -------------------------------------------------------------------------------- /domain/src/user.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/domain/src/user.rs -------------------------------------------------------------------------------- /domain/src/user_repository.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/domain/src/user_repository.rs -------------------------------------------------------------------------------- /example/anyhow_example/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/example/anyhow_example/Cargo.lock -------------------------------------------------------------------------------- /example/anyhow_example/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/example/anyhow_example/Cargo.toml -------------------------------------------------------------------------------- /example/anyhow_example/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/example/anyhow_example/src/lib.rs -------------------------------------------------------------------------------- /infra/db_schema/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/db_schema/Cargo.lock -------------------------------------------------------------------------------- /infra/db_schema/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/db_schema/Cargo.toml -------------------------------------------------------------------------------- /infra/db_schema/diesel.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/db_schema/diesel.toml -------------------------------------------------------------------------------- /infra/db_schema/migrations/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /infra/db_schema/migrations/00000000000000_diesel_initial_setup/down.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/db_schema/migrations/00000000000000_diesel_initial_setup/down.sql -------------------------------------------------------------------------------- /infra/db_schema/migrations/00000000000000_diesel_initial_setup/up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/db_schema/migrations/00000000000000_diesel_initial_setup/up.sql -------------------------------------------------------------------------------- /infra/db_schema/migrations/2022-05-22-141451_create_users/down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE users; 2 | -------------------------------------------------------------------------------- /infra/db_schema/migrations/2022-05-22-141451_create_users/up.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE users ( 2 | id CHAR(36) PRIMARY KEY, 3 | name TEXT NOT NULL 4 | ); 5 | -------------------------------------------------------------------------------- /infra/db_schema/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/db_schema/src/lib.rs -------------------------------------------------------------------------------- /infra/db_schema/src/schema.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/db_schema/src/schema.rs -------------------------------------------------------------------------------- /infra/grpc_handler/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/grpc_handler/Cargo.lock -------------------------------------------------------------------------------- /infra/grpc_handler/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/grpc_handler/Cargo.toml -------------------------------------------------------------------------------- /infra/grpc_handler/build.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/grpc_handler/build.rs -------------------------------------------------------------------------------- /infra/grpc_handler/src/convert.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/grpc_handler/src/convert.rs -------------------------------------------------------------------------------- /infra/grpc_handler/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/grpc_handler/src/lib.rs -------------------------------------------------------------------------------- /infra/repository_impl/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/repository_impl/Cargo.lock -------------------------------------------------------------------------------- /infra/repository_impl/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/repository_impl/Cargo.toml -------------------------------------------------------------------------------- /infra/repository_impl/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/infra/repository_impl/src/lib.rs -------------------------------------------------------------------------------- /proto/user/v1/user.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/proto/user/v1/user.proto -------------------------------------------------------------------------------- /usecase/Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/usecase/Cargo.lock -------------------------------------------------------------------------------- /usecase/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/usecase/Cargo.toml -------------------------------------------------------------------------------- /usecase/src/create_user.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/usecase/src/create_user.rs -------------------------------------------------------------------------------- /usecase/src/get_users_by_ids.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/usecase/src/get_users_by_ids.rs -------------------------------------------------------------------------------- /usecase/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/m-ysk/enghub-rust-sample-webapp/HEAD/usecase/src/lib.rs --------------------------------------------------------------------------------