ito_core/
remote_task_repository.rs1use ito_domain::errors::DomainResult;
4use ito_domain::tasks::{TaskRepository as DomainTaskRepository, TasksParseResult};
5
6use crate::backend_http::BackendHttpClient;
7
8pub struct RemoteTaskRepository {
10 client: BackendHttpClient,
11}
12
13impl RemoteTaskRepository {
14 pub(crate) fn new(client: BackendHttpClient) -> Self {
16 Self { client }
17 }
18}
19
20impl DomainTaskRepository for RemoteTaskRepository {
21 fn load_tasks(&self, change_id: &str) -> DomainResult<TasksParseResult> {
22 self.client.load_tasks_parse_result(change_id)
23 }
24}