Fixes!
parent: tbd commit: 398622e
1 | use Error; |
2 | |
3 | use crate GitBackendError; |
4 | use crate:: |
5 | |
6 | RepositoryCreateRequest, RepositoryFileInspectRequest, RepositoryInfoRequest, |
7 | RepositoryIssueLabelsRequest, RepositoryIssuesCountRequest, RepositoryIssuesRequest, |
8 | , |
9 | , |
10 | ; |
11 | |
12 | use ; |
13 | |
14 | pub async |
15 | message_type: &str, |
16 | message: &NetworkMessage, |
17 | state: &ConnectionState, |
18 | |
19 | match message_type |
20 | "&giterated_daemon::messages::repository::RepositoryCreateRequest" => |
21 | create_repository.handle_message .await |
22 | |
23 | "&giterated_daemon::messages::repository::RepositoryFileInspectRequest" => |
24 | repository_file_inspect |
25 | .handle_message |
26 | .await |
27 | |
28 | "&giterated_daemon::messages::repository::RepositoryInfoRequest" => |
29 | repository_info.handle_message .await |
30 | |
31 | "&giterated_daemon::messages::repository::RepositoryIssuesCountRequest" => |
32 | issues_count.handle_message .await |
33 | |
34 | "&giterated_daemon::messages::repository::RepositoryIssueLabelsRequest" => |
35 | issue_labels.handle_message .await |
36 | |
37 | "&giterated_daemon::messages::repository::RepositoryIssuesRequest" => |
38 | issues.handle_message .await |
39 | |
40 | _ => Err, |
41 | |
42 | |
43 | |
44 | async |
45 | Message | : ,
46 | State | : ,
47 | AuthenticatedUser | : AuthenticatedUser,
48 | |
49 | let mut repository_backend = connection_state.repository_backend.lock .await; |
50 | let response = repository_backend |
51 | .create_repository |
52 | .await?; |
53 | |
54 | drop; |
55 | |
56 | connection_state.send .await?; |
57 | |
58 | Ok |
59 | |
60 | |
61 | async |
62 | Message | : ,
63 | State | : ,
64 | user: , |
65 | |
66 | let user = user.map; |
67 | |
68 | let mut repository_backend = connection_state.repository_backend.lock .await; |
69 | let response = repository_backend |
70 | .repository_file_inspect |
71 | .await?; |
72 | |
73 | drop; |
74 | |
75 | connection_state.send .await?; |
76 | |
77 | Ok |
78 | |
79 | |
80 | async |
81 | Message | : ,
82 | State | : ,
83 | user: , |
84 | |
85 | let user = user.map; |
86 | |
87 | let mut repository_backend = connection_state.repository_backend.lock .await; |
88 | let response = repository_backend |
89 | .repository_info |
90 | .await?; |
91 | |
92 | drop; |
93 | |
94 | connection_state.send .await?; |
95 | |
96 | Ok |
97 | |
98 | |
99 | async |
100 | Message | : ,
101 | State | : ,
102 | _user: , |
103 | |
104 | unimplemented!; |
105 | |
106 | |
107 | async |
108 | Message | : ,
109 | State | : ,
110 | _user: , |
111 | |
112 | unimplemented!; |
113 | |
114 | |
115 | async |
116 | Message | : ,
117 | State | : ,
118 | _user: , |
119 | |
120 | unimplemented!; |
121 | |
122 | |
123 | |
124 | |
125 | |
126 | GitBackendError, |
127 | |
128 | Other, |
129 | |
130 |