Add docs
parent: tbd commit: 51aad53
1 | use ; |
2 | |
3 | use crate RepositoryVisibility; |
4 | use crate |
5 | , |
6 | , | User
7 | ; |
8 | |
9 | use UnvalidatedUserAuthenticated; |
10 | |
11 | /// A repository message. |
12 | /// |
13 | /// View request documentation, authentication, and authorization |
14 | /// details in the associated type, [`RepositoryRequest`]. |
15 | |
16 | |
17 | pub target: Repository, |
18 | pub command: RepositoryMessageKind, |
19 | |
20 | |
21 | |
22 | |
23 | Request, |
24 | Response, |
25 | |
26 | |
27 | |
28 | |
29 | /// A request to create a repository. |
30 | /// |
31 | /// # Authentication |
32 | /// - Instance Authentication |
33 | /// - Used to validate User token `issued_for` |
34 | /// - User Authentication |
35 | /// - Used to source owning user |
36 | /// - Used to authorize user token against user's instance |
37 | /// # Authorization |
38 | /// - Instance Authorization |
39 | /// - Used to authorize action using User token requiring a correct `issued_for` and valid issuance from user's instance |
40 | /// - User Authorization |
41 | /// - Potential User permissions checks |
42 | CreateRepository, |
43 | |
44 | /// A request to inspect the tree of a repository. |
45 | /// |
46 | /// # Authentication |
47 | /// - Instance Authentication |
48 | /// - Validate request against the `issued_for` public key |
49 | /// - Validate User token against the user's instance's public key |
50 | /// # Authorization |
51 | /// - User Authorization |
52 | /// - Potential User permissions checks |
53 | RepositoryFileInspect, |
54 | |
55 | /// A request to get a repository's information. |
56 | /// |
57 | /// # Authentication |
58 | /// - Instance Authentication |
59 | /// - Validate request against the `issued_for` public key |
60 | /// - Validate User token against the user's instance's public key |
61 | /// # Authorization |
62 | /// - User Authorization |
63 | /// - Potential User permissions checks |
64 | RepositoryInfo, |
65 | |
66 | /// A request to get a repository's issues count. |
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 | IssuesCount, |
76 | |
77 | /// A request to get a repository's issue labels. |
78 | /// |
79 | /// # Authentication |
80 | /// - Instance Authentication |
81 | /// - Validate request against the `issued_for` public key |
82 | /// - Validate User token against the user's instance's public key |
83 | /// # Authorization |
84 | /// - User Authorization |
85 | /// - Potential User permissions checks |
86 | IssueLabels, |
87 | |
88 | /// A request to get a repository's issues. |
89 | /// |
90 | /// # Authentication |
91 | /// - Instance Authentication |
92 | /// - Validate request against the `issued_for` public key |
93 | /// - Validate User token against the user's instance's public key |
94 | /// # Authorization |
95 | /// - User Authorization |
96 | /// - Potential User permissions checks |
97 | Issues, |
98 | |
99 | |
100 | |
101 | |
102 | CreateRepository, |
103 | RepositoryFileInspection, |
104 | RepositoryInfo, |
105 | IssuesCount, |
106 | IssueLabels, |
107 | Issues, |
108 | |
109 | |
110 | /// See [`RepositoryRequest::CreateRepository`]'s documentation. |
111 | |
112 | |
113 | pub name: String, |
114 | pub description: , |
115 | pub visibility: RepositoryVisibility, |
116 | pub default_branch: String, |
117 | pub owner: User, |
118 | |
119 | |
120 | |
121 | |
122 | Created, |
123 | Failed, |
124 | |
125 | |
126 | /// See [`RepositoryRequest::RepositoryFileInspect`]'s documentation. |
127 | |
128 | |
129 | pub path: RepositoryTreeEntry, |
130 | |
131 | |
132 | |
133 | |
134 | File |
135 | commit_metadata: Commit, |
136 | , |
137 | Folder |
138 | commit_metadata: Commit, |
139 | members: , |
140 | , |
141 | Invalid |
142 | path: RepositoryTreeEntry, |
143 | , |
144 | |
145 | |
146 | /// See [`RepositoryRequest::IssuesCount`]'s documentation. |
147 | |
148 | ; |
149 | |
150 | |
151 | |
152 | pub count: u64, |
153 | |
154 | |
155 | /// See [`RepositoryRequest::IssueLabels`]'s documentation. |
156 | |
157 | ; |
158 | |
159 | |
160 | |
161 | pub labels: , |
162 | |
163 | |
164 | |
165 | |
166 | pub name: String, |
167 | pub color: String, |
168 | |
169 | |
170 | /// See [`RepositoryRequest::Issues`]'s documentation. |
171 | |
172 | ; |
173 | |
174 | |
175 | |
176 | pub issues: , |
177 | |
178 | |
179 | |
180 | |
181 | pub author: User, |
182 | pub id: u64, |
183 | pub title: String, |
184 | pub contents: String, |
185 | pub labels: , |
186 | |
187 | |
188 | |
189 | |
190 | pub repository: Repository, |
191 | pub extra_metadata: bool, |
192 | pub rev: , |
193 | pub path: , |
194 | |
195 |