├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── app ├── Cargo.toml ├── src │ ├── lib.rs │ └── use_case.rs └── tests │ ├── fixture │ └── mod.rs │ ├── test_repositories │ └── mod.rs │ └── test_use_case_search_users.rs ├── domain ├── Cargo.toml └── src │ ├── email_address.rs │ ├── error.rs │ ├── error │ └── error_type.rs │ ├── lib.rs │ ├── repositories.rs │ ├── user.rs │ └── user │ ├── user_id.rs │ ├── user_name.rs │ ├── user_name │ ├── user_first_name.rs │ └── user_last_name.rs │ └── user_repository.rs ├── infra ├── Cargo.toml └── src │ ├── id_generator.rs │ ├── main.rs │ ├── persistence.rs │ ├── persistence │ ├── yaml.rs │ └── yaml │ │ └── user_yaml_storage.rs │ ├── repository_impls.rs │ ├── repository_impls │ └── user_repository_impl.rs │ ├── ui.rs │ └── ui │ └── cli.rs └── interface-adapter ├── Cargo.toml └── src ├── controller.rs ├── controller └── dto.rs └── lib.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | users.yml 3 | 4 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/Cargo.lock -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/Cargo.toml -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/README.md -------------------------------------------------------------------------------- /app/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/app/Cargo.toml -------------------------------------------------------------------------------- /app/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/app/src/lib.rs -------------------------------------------------------------------------------- /app/src/use_case.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/app/src/use_case.rs -------------------------------------------------------------------------------- /app/tests/fixture/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/app/tests/fixture/mod.rs -------------------------------------------------------------------------------- /app/tests/test_repositories/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/app/tests/test_repositories/mod.rs -------------------------------------------------------------------------------- /app/tests/test_use_case_search_users.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/app/tests/test_use_case_search_users.rs -------------------------------------------------------------------------------- /domain/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/domain/Cargo.toml -------------------------------------------------------------------------------- /domain/src/email_address.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/domain/src/email_address.rs -------------------------------------------------------------------------------- /domain/src/error.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/domain/src/error.rs -------------------------------------------------------------------------------- /domain/src/error/error_type.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/domain/src/error/error_type.rs -------------------------------------------------------------------------------- /domain/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/domain/src/lib.rs -------------------------------------------------------------------------------- /domain/src/repositories.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/domain/src/repositories.rs -------------------------------------------------------------------------------- /domain/src/user.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/domain/src/user.rs -------------------------------------------------------------------------------- /domain/src/user/user_id.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/domain/src/user/user_id.rs -------------------------------------------------------------------------------- /domain/src/user/user_name.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/domain/src/user/user_name.rs -------------------------------------------------------------------------------- /domain/src/user/user_name/user_first_name.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/domain/src/user/user_name/user_first_name.rs -------------------------------------------------------------------------------- /domain/src/user/user_name/user_last_name.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/domain/src/user/user_name/user_last_name.rs -------------------------------------------------------------------------------- /domain/src/user/user_repository.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/domain/src/user/user_repository.rs -------------------------------------------------------------------------------- /infra/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/infra/Cargo.toml -------------------------------------------------------------------------------- /infra/src/id_generator.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/infra/src/id_generator.rs -------------------------------------------------------------------------------- /infra/src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/infra/src/main.rs -------------------------------------------------------------------------------- /infra/src/persistence.rs: -------------------------------------------------------------------------------- 1 | pub(crate) mod yaml; 2 | -------------------------------------------------------------------------------- /infra/src/persistence/yaml.rs: -------------------------------------------------------------------------------- 1 | pub(crate) mod user_yaml_storage; 2 | -------------------------------------------------------------------------------- /infra/src/persistence/yaml/user_yaml_storage.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/infra/src/persistence/yaml/user_yaml_storage.rs -------------------------------------------------------------------------------- /infra/src/repository_impls.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/infra/src/repository_impls.rs -------------------------------------------------------------------------------- /infra/src/repository_impls/user_repository_impl.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/infra/src/repository_impls/user_repository_impl.rs -------------------------------------------------------------------------------- /infra/src/ui.rs: -------------------------------------------------------------------------------- 1 | pub(crate) mod cli; 2 | -------------------------------------------------------------------------------- /infra/src/ui/cli.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/infra/src/ui/cli.rs -------------------------------------------------------------------------------- /interface-adapter/Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/interface-adapter/Cargo.toml -------------------------------------------------------------------------------- /interface-adapter/src/controller.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/interface-adapter/src/controller.rs -------------------------------------------------------------------------------- /interface-adapter/src/controller/dto.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/interface-adapter/src/controller/dto.rs -------------------------------------------------------------------------------- /interface-adapter/src/lib.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/laysakura/mockall-example-rs/HEAD/interface-adapter/src/lib.rs --------------------------------------------------------------------------------