├── .env.example ├── .gitignore ├── Cargo.toml ├── README.md ├── docker-compose.yml ├── migrations ├── 20221230175838_uuid-ossp.sql └── 20221230175909_users-table.sql └── src ├── common ├── error.rs └── mod.rs ├── configuration ├── configuration.rs └── mod.rs ├── data ├── infrastructure │ ├── database.rs │ └── mod.rs ├── mod.rs └── repositories │ ├── mod.rs │ └── user │ ├── mod.rs │ ├── user_data_store.rs │ ├── user_entity.rs │ └── user_repository.rs ├── domain ├── mod.rs └── user │ ├── mod.rs │ ├── user_model.rs │ ├── user_repository.rs │ └── user_service.rs ├── main.rs └── presentation ├── http ├── http_server.rs ├── middleware │ ├── mod.rs │ └── service.rs ├── mod.rs └── user │ ├── dto │ ├── mod.rs │ ├── user_request_dto.rs │ └── user_response_dto.rs │ ├── mod.rs │ └── user_controller.rs └── mod.rs /.env.example: -------------------------------------------------------------------------------- 1 | PORT= -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/.gitignore -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/Cargo.toml -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/README.md -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /migrations/20221230175838_uuid-ossp.sql: -------------------------------------------------------------------------------- 1 | -- Add migration script here 2 | CREATE EXTENSION IF NOT EXISTS "uuid-ossp"; -------------------------------------------------------------------------------- /migrations/20221230175909_users-table.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/migrations/20221230175909_users-table.sql -------------------------------------------------------------------------------- /src/common/error.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/common/error.rs -------------------------------------------------------------------------------- /src/common/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod error; -------------------------------------------------------------------------------- /src/configuration/configuration.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/configuration/configuration.rs -------------------------------------------------------------------------------- /src/configuration/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod configuration; -------------------------------------------------------------------------------- /src/data/infrastructure/database.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/data/infrastructure/database.rs -------------------------------------------------------------------------------- /src/data/infrastructure/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod database; -------------------------------------------------------------------------------- /src/data/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/data/mod.rs -------------------------------------------------------------------------------- /src/data/repositories/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod user; 2 | -------------------------------------------------------------------------------- /src/data/repositories/user/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/data/repositories/user/mod.rs -------------------------------------------------------------------------------- /src/data/repositories/user/user_data_store.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/data/repositories/user/user_data_store.rs -------------------------------------------------------------------------------- /src/data/repositories/user/user_entity.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/data/repositories/user/user_entity.rs -------------------------------------------------------------------------------- /src/data/repositories/user/user_repository.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/data/repositories/user/user_repository.rs -------------------------------------------------------------------------------- /src/domain/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod user; -------------------------------------------------------------------------------- /src/domain/user/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/domain/user/mod.rs -------------------------------------------------------------------------------- /src/domain/user/user_model.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/domain/user/user_model.rs -------------------------------------------------------------------------------- /src/domain/user/user_repository.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/domain/user/user_repository.rs -------------------------------------------------------------------------------- /src/domain/user/user_service.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/domain/user/user_service.rs -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/main.rs -------------------------------------------------------------------------------- /src/presentation/http/http_server.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/presentation/http/http_server.rs -------------------------------------------------------------------------------- /src/presentation/http/middleware/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod service; -------------------------------------------------------------------------------- /src/presentation/http/middleware/service.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/presentation/http/middleware/service.rs -------------------------------------------------------------------------------- /src/presentation/http/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/presentation/http/mod.rs -------------------------------------------------------------------------------- /src/presentation/http/user/dto/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/presentation/http/user/dto/mod.rs -------------------------------------------------------------------------------- /src/presentation/http/user/dto/user_request_dto.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/presentation/http/user/dto/user_request_dto.rs -------------------------------------------------------------------------------- /src/presentation/http/user/dto/user_response_dto.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/presentation/http/user/dto/user_response_dto.rs -------------------------------------------------------------------------------- /src/presentation/http/user/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/presentation/http/user/mod.rs -------------------------------------------------------------------------------- /src/presentation/http/user/user_controller.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/eldimious/rust-api-ddd/HEAD/src/presentation/http/user/user_controller.rs -------------------------------------------------------------------------------- /src/presentation/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod http; --------------------------------------------------------------------------------