Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MSC29/clean-architecture-rust
/ functions
Functions
69 in github.com/MSC29/clean-architecture-rust
⨍
Functions
69
◇
Types & classes
34
↓ 11 callers
Method
execute
(&self)
src/application/usecases/get_all_cat_facts_usecase.rs:20
↓ 6 callers
Method
get_pool
(&self)
src/adapters/spi/db/db_connection.rs:10
↓ 4 callers
Function
setup
()
tests/utils/utils_setup.rs:51
↓ 4 callers
Function
spawn_app
(db_name: &str)
tests/utils/utils_setup.rs:10
↓ 3 callers
Method
execute
(&self)
src/application/usecases/get_all_dog_facts_usecase.rs:20
↓ 3 callers
Method
get_error_message
(&self)
src/domain/error.rs:18
↓ 2 callers
Method
client
(&self)
src/adapters/spi/http/http_connection.rs:6
↓ 2 callers
Method
execute
(&self)
src/application/usecases/get_one_random_cat_fact_usecase.rs:20
↓ 2 callers
Method
execute
(&self)
src/application/usecases/get_one_dog_fact_by_id_usecase.rs:21
↓ 2 callers
Function
run
(listener: TcpListener, db_name: &str)
src/lib.rs:16
↓ 1 callers
Function
execute_imports
(conn: &DbConnection)
tests/integration_tests/fixtures/fixtures_run.rs:7
↓ 1 callers
Method
get_all_cat_facts
(&self)
src/adapters/spi/http/http_cat_facts_repository.rs:37
↓ 1 callers
Method
get_all_dog_facts
(&self)
src/adapters/spi/db/db_dog_facts_repository.rs:26
↓ 1 callers
Method
get_dog_fact_by_id
(&self, dog_fact_id: i32)
src/adapters/spi/db/db_dog_facts_repository.rs:15
↓ 1 callers
Method
get_error_code
(&self)
src/domain/error.rs:22
↓ 1 callers
Method
get_random_cat_fact
(&self)
src/adapters/spi/http/http_cat_facts_repository.rs:21
↓ 1 callers
Function
import_dog_facts_fixtures
(conn: &DbConnection)
tests/integration_tests/fixtures/fixtures_run.rs:11
↓ 1 callers
Function
server
(listener: TcpListener, db_name: &str)
src/infrastructure/mod.rs:14
↓ 1 callers
Function
spawn_http_spi
()
tests/utils/utils_setup.rs:28
↓ 1 callers
Method
status_code
(&self)
src/adapters/api/shared/error_presenter.rs:23
Method
application_error
(error_message: &str, error: Option<Box<dyn Error>>)
src/application/utils/error_handling_utils.rs:7
Method
drop
(&mut self)
tests/utils/test_context.rs:40
Method
error_response
(&self)
src/adapters/api/shared/error_presenter.rs:27
Function
facts_route
()
tests/utils/utils_setup.rs:29
Method
fmt
(&self, f: &mut fmt::Formatter)
src/domain/error.rs:12
Method
forbidden_error
()
src/application/utils/error_handling_utils.rs:24
Function
get_all_cat_facts
(data: web::Data<AppState>)
src/adapters/api/cat_facts/cat_facts_controllers.rs:17
Function
get_all_dog_facts
(data: web::Data<AppState>)
src/adapters/api/dog_facts/dog_facts_controllers.rs:19
Function
get_one_dog_fact_by_id
(data: web::Data<AppState>, path: web::Path<(i32,)>)
src/adapters/api/dog_facts/dog_facts_controllers.rs:29
Function
get_one_random_cat_fact
(data: web::Data<AppState>)
src/adapters/api/cat_facts/cat_facts_controllers.rs:27
Method
log_error
(message: &str, err: &Option<Box<dyn Error>>)
src/application/utils/error_handling_utils.rs:34
Function
main
()
src/main.rs:7
Method
map_io_error
(e: ApiError)
src/adapters/api/shared/error_presenter.rs:39
Function
mock_http_spi
(path: &str)
tests/utils/utils_http.rs:3
Method
new
(fact_id: i32, fact: String)
src/domain/dog_fact_entity.rs:8
Method
new
(fact_txt: String, fact_length: i32)
src/domain/cat_fact_entity.rs:8
Method
new
(repository: &'a dyn CatFactsRepositoryAbstract)
src/application/usecases/get_all_cat_facts_usecase.rs:13
Method
new
(repository: &'a dyn DogFactsRepositoryAbstract)
src/application/usecases/get_all_dog_facts_usecase.rs:13
Method
new
(repository: &'a dyn CatFactsRepositoryAbstract)
src/application/usecases/get_one_random_cat_fact_usecase.rs:13
Method
new
(dog_fact_id: &'a i32, repository: &'a dyn DogFactsRepositoryAbstract)
src/application/usecases/get_one_dog_fact_by_id_usecase.rs:14
Method
new
(base_url: &str, db_name: &str)
tests/utils/test_context.rs:14
Function
random_fact_route
()
tests/utils/utils_setup.rs:34
Function
read_from_file
(path: &str)
tests/utils/utils_file.rs:6
Function
routes
(cfg: &mut web::ServiceConfig)
src/adapters/api/cat_facts/cat_facts_controllers.rs:12
Function
routes
(cfg: &mut web::ServiceConfig)
src/adapters/api/dog_facts/dog_facts_controllers.rs:14
Function
routes
(config: &mut web::ServiceConfig)
src/adapters/api/shared/routes.rs:5
Function
test_should_return_empty_list
()
src/application/usecases/get_all_cat_facts_usecase.rs:58
Function
test_should_return_empty_list
()
src/application/usecases/get_all_dog_facts_usecase.rs:58
Function
test_should_return_error_with_generic_message_when_unexpected_repo_error
()
src/application/usecases/get_all_dog_facts_usecase.rs:38
Function
test_should_return_error_with_generic_message_when_unexpected_repo_error
()
src/application/usecases/get_one_dog_fact_by_id_usecase.rs:40
Function
test_should_return_generic_message_when_unexpected_repo_error
()
src/application/usecases/get_all_cat_facts_usecase.rs:38
Function
test_should_return_generic_message_when_unexpected_repo_error
()
src/application/usecases/get_one_random_cat_fact_usecase.rs:38
Function
test_should_return_list
()
src/application/usecases/get_all_cat_facts_usecase.rs:72
Function
test_should_return_list
()
src/application/usecases/get_all_dog_facts_usecase.rs:72
Function
test_should_return_multiple_results
()
tests/integration_tests/test_dog_facts.rs:5
Function
test_should_return_multiple_results
()
tests/integration_tests/test_cat_facts.rs:5
Function
test_should_return_one_result
()
src/application/usecases/get_one_random_cat_fact_usecase.rs:58
Function
test_should_return_one_result
()
src/application/usecases/get_one_dog_fact_by_id_usecase.rs:60
Function
test_should_return_one_results_only
()
tests/integration_tests/test_dog_facts.rs:26
Function
test_should_return_one_results_only
()
tests/integration_tests/test_cat_facts.rs:29
Method
to_api
(entity: CatFactEntity)
src/adapters/api/cat_facts/cat_facts_mappers.rs:9
Method
to_api
(entity: DogFactEntity)
src/adapters/api/dog_facts/dog_facts_mappers.rs:8
Method
to_db
(entity: DogFactEntity)
src/adapters/spi/db/db_mappers.rs:8
Method
to_entity
(http_obj: CatFactApiModel)
src/adapters/spi/http/http_mappers.rs:15
Method
to_entity
(model: DogFact)
src/adapters/spi/db/db_mappers.rs:15
Method
to_entity
(_payload: CatFactPayload)
src/adapters/api/cat_facts/cat_facts_mappers.rs:16
Method
to_entity
(_payload: DogFactPayload)
src/adapters/api/dog_facts/dog_facts_mappers.rs:15
Method
to_http
(entity: CatFactEntity)
src/adapters/spi/http/http_mappers.rs:8
Method
unauthorized_error
()
src/application/utils/error_handling_utils.rs:15