Change forwarding
parent: tbd commit: 2556801
1 | use HashMap; |
2 | |
3 | use DeserializeOwned; |
4 | use ; |
5 | |
6 | use crate RepositoryVisibility; |
7 | use crate Setting; |
8 | use crate |
9 | , |
10 | , | User
11 | ; |
12 | |
13 | /// A request to create a repository. |
14 | /// |
15 | /// # Authentication |
16 | /// - Instance Authentication |
17 | /// - Used to validate User token `issued_for` |
18 | /// - User Authentication |
19 | /// - Used to source owning user |
20 | /// - Used to authorize user token against user's instance |
21 | /// # Authorization |
22 | /// - Instance Authorization |
23 | /// - Used to authorize action using User token requiring a correct `issued_for` and valid issuance from user's instance |
24 | /// - User Authorization |
25 | /// - Potential User permissions checks |
26 | |
27 | |
28 | pub name: String, |
29 | pub description: , |
30 | pub visibility: RepositoryVisibility, |
31 | pub default_branch: String, |
32 | pub owner: User, |
33 | |
34 | |
35 | |
36 | ; |
37 | |
38 | /// A request to inspect the tree of a repository. |
39 | /// |
40 | /// # Authentication |
41 | /// - Instance Authentication |
42 | /// - Validate request against the `issued_for` public key |
43 | /// - Validate User token against the user's instance's public key |
44 | /// # Authorization |
45 | /// - User Authorization |
46 | /// - Potential User permissions checks |
47 | |
48 | |
49 | pub path: RepositoryTreeEntry, |
50 | |
51 | |
52 | |
53 | |
54 | File |
55 | commit_metadata: Commit, |
56 | , |
57 | Folder |
58 | commit_metadata: Commit, |
59 | members: , |
60 | , |
61 | Invalid |
62 | path: RepositoryTreeEntry, |
63 | , |
64 | |
65 | |
66 | /// A request to get a repository's information. |
67 | /// |
68 | /// # Authentication |
69 | /// - Instance Authentication |
70 | /// - Validate request against the `issued_for` public key |
71 | /// - Validate User token against the user's instance's public key |
72 | /// # Authorization |
73 | /// - User Authorization |
74 | /// - Potential User permissions checks |
75 | |
76 | ; |
77 | |
78 | |
79 | |
80 | pub count: u64, |
81 | |
82 | |
83 | /// A request to get a repository's issues count. |
84 | /// |
85 | /// # Authentication |
86 | /// - Instance Authentication |
87 | /// - Validate request against the `issued_for` public key |
88 | /// - Validate User token against the user's instance's public key |
89 | /// # Authorization |
90 | /// - User Authorization |
91 | /// - Potential User permissions checks |
92 | |
93 | ; |
94 | |
95 | |
96 | |
97 | pub labels: , |
98 | |
99 | |
100 | |
101 | |
102 | pub name: String, |
103 | pub color: String, |
104 | |
105 | |
106 | /// A request to get a repository's issue labels. |
107 | /// |
108 | /// # Authentication |
109 | /// - Instance Authentication |
110 | /// - Validate request against the `issued_for` public key |
111 | /// - Validate User token against the user's instance's public key |
112 | /// # Authorization |
113 | /// - User Authorization |
114 | /// - Potential User permissions checks |
115 | |
116 | ; |
117 | |
118 | |
119 | |
120 | pub issues: , |
121 | |
122 | |
123 | /// A request to get a repository's issues. |
124 | /// |
125 | /// # Authentication |
126 | /// - Instance Authentication |
127 | /// - Validate request against the `issued_for` public key |
128 | /// - Validate User token against the user's instance's public key |
129 | /// # Authorization |
130 | /// - User Authorization |
131 | /// - Potential User permissions checks |
132 | |
133 | |
134 | pub author: User, |
135 | pub id: u64, |
136 | pub title: String, |
137 | pub contents: String, |
138 | pub labels: , |
139 | |
140 | |
141 | |
142 | |
143 | pub repository: Repository, |
144 | /// Whether to fetch extra metadata like the last commit made to file or size |
145 | pub extra_metadata: bool, |
146 | /// Rev (branch) being requested |
147 | pub rev: , |
148 | /// Tree path being requested |
149 | pub path: , |
150 | |
151 | |
152 | |
153 | |
154 | pub repository: Repository, |
155 | |
156 | |
157 | |
158 | |
159 | pub settings: , |
160 | |
161 | |
162 | |
163 | |
164 | let setting_member = self |
165 | .settings |
166 | .iter |
167 | .filter |
168 | .next?; |
169 | |
170 | ok | from_value .
171 | |
172 | |
173 | |
174 | |
175 | |
176 | pub repository: Repository, |
177 | pub settings: , |
178 | |
179 | |
180 | |
181 | |
182 | Self |
183 | repository: repository.to_owned, |
184 | settings: Default default, |
185 | |
186 | |
187 | |
188 | |
189 | self.settings.push |
190 | to_string, | name .
191 | unwrap, | to_string .
192 | ; |
193 | |
194 | |
195 | let setting_member = self |
196 | .settings |
197 | .iter |
198 | .filter |
199 | .next?; |
200 | |
201 | ok | from_str .
202 | |
203 | |
204 | |
205 | |
206 | |
207 | // IDK? |
208 | |
209 |