1#![allow(rustdoc::broken_intra_doc_links)]
26
27use gax::error::Error;
28
29pub(crate) mod dynamic;
30
31pub trait RepositoryManager: std::fmt::Debug + Send + Sync {
43 fn create_connection(
45 &self,
46 _req: crate::model::CreateConnectionRequest,
47 _options: gax::options::RequestOptions,
48 ) -> impl std::future::Future<
49 Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
50 > + Send {
51 std::future::ready::<crate::Result<gax::response::Response<longrunning::model::Operation>>>(
52 Err(Error::other("unimplemented")),
53 )
54 }
55
56 fn get_connection(
58 &self,
59 _req: crate::model::GetConnectionRequest,
60 _options: gax::options::RequestOptions,
61 ) -> impl std::future::Future<
62 Output = crate::Result<gax::response::Response<crate::model::Connection>>,
63 > + Send {
64 std::future::ready::<crate::Result<gax::response::Response<crate::model::Connection>>>(Err(
65 Error::other("unimplemented"),
66 ))
67 }
68
69 fn list_connections(
71 &self,
72 _req: crate::model::ListConnectionsRequest,
73 _options: gax::options::RequestOptions,
74 ) -> impl std::future::Future<
75 Output = crate::Result<gax::response::Response<crate::model::ListConnectionsResponse>>,
76 > + Send {
77 std::future::ready::<
78 crate::Result<gax::response::Response<crate::model::ListConnectionsResponse>>,
79 >(Err(Error::other("unimplemented")))
80 }
81
82 fn update_connection(
84 &self,
85 _req: crate::model::UpdateConnectionRequest,
86 _options: gax::options::RequestOptions,
87 ) -> impl std::future::Future<
88 Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
89 > + Send {
90 std::future::ready::<crate::Result<gax::response::Response<longrunning::model::Operation>>>(
91 Err(Error::other("unimplemented")),
92 )
93 }
94
95 fn delete_connection(
97 &self,
98 _req: crate::model::DeleteConnectionRequest,
99 _options: gax::options::RequestOptions,
100 ) -> impl std::future::Future<
101 Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
102 > + Send {
103 std::future::ready::<crate::Result<gax::response::Response<longrunning::model::Operation>>>(
104 Err(Error::other("unimplemented")),
105 )
106 }
107
108 fn create_repository(
110 &self,
111 _req: crate::model::CreateRepositoryRequest,
112 _options: gax::options::RequestOptions,
113 ) -> impl std::future::Future<
114 Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
115 > + Send {
116 std::future::ready::<crate::Result<gax::response::Response<longrunning::model::Operation>>>(
117 Err(Error::other("unimplemented")),
118 )
119 }
120
121 fn batch_create_repositories(
123 &self,
124 _req: crate::model::BatchCreateRepositoriesRequest,
125 _options: gax::options::RequestOptions,
126 ) -> impl std::future::Future<
127 Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
128 > + Send {
129 std::future::ready::<crate::Result<gax::response::Response<longrunning::model::Operation>>>(
130 Err(Error::other("unimplemented")),
131 )
132 }
133
134 fn get_repository(
136 &self,
137 _req: crate::model::GetRepositoryRequest,
138 _options: gax::options::RequestOptions,
139 ) -> impl std::future::Future<
140 Output = crate::Result<gax::response::Response<crate::model::Repository>>,
141 > + Send {
142 std::future::ready::<crate::Result<gax::response::Response<crate::model::Repository>>>(Err(
143 Error::other("unimplemented"),
144 ))
145 }
146
147 fn list_repositories(
149 &self,
150 _req: crate::model::ListRepositoriesRequest,
151 _options: gax::options::RequestOptions,
152 ) -> impl std::future::Future<
153 Output = crate::Result<gax::response::Response<crate::model::ListRepositoriesResponse>>,
154 > + Send {
155 std::future::ready::<
156 crate::Result<gax::response::Response<crate::model::ListRepositoriesResponse>>,
157 >(Err(Error::other("unimplemented")))
158 }
159
160 fn delete_repository(
162 &self,
163 _req: crate::model::DeleteRepositoryRequest,
164 _options: gax::options::RequestOptions,
165 ) -> impl std::future::Future<
166 Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
167 > + Send {
168 std::future::ready::<crate::Result<gax::response::Response<longrunning::model::Operation>>>(
169 Err(Error::other("unimplemented")),
170 )
171 }
172
173 fn fetch_read_write_token(
175 &self,
176 _req: crate::model::FetchReadWriteTokenRequest,
177 _options: gax::options::RequestOptions,
178 ) -> impl std::future::Future<
179 Output = crate::Result<gax::response::Response<crate::model::FetchReadWriteTokenResponse>>,
180 > + Send {
181 std::future::ready::<
182 crate::Result<gax::response::Response<crate::model::FetchReadWriteTokenResponse>>,
183 >(Err(Error::other("unimplemented")))
184 }
185
186 fn fetch_read_token(
188 &self,
189 _req: crate::model::FetchReadTokenRequest,
190 _options: gax::options::RequestOptions,
191 ) -> impl std::future::Future<
192 Output = crate::Result<gax::response::Response<crate::model::FetchReadTokenResponse>>,
193 > + Send {
194 std::future::ready::<
195 crate::Result<gax::response::Response<crate::model::FetchReadTokenResponse>>,
196 >(Err(Error::other("unimplemented")))
197 }
198
199 fn fetch_linkable_repositories(
201 &self,
202 _req: crate::model::FetchLinkableRepositoriesRequest,
203 _options: gax::options::RequestOptions,
204 ) -> impl std::future::Future<
205 Output = crate::Result<
206 gax::response::Response<crate::model::FetchLinkableRepositoriesResponse>,
207 >,
208 > + Send {
209 std::future::ready::<
210 crate::Result<gax::response::Response<crate::model::FetchLinkableRepositoriesResponse>>,
211 >(Err(Error::other("unimplemented")))
212 }
213
214 fn fetch_git_refs(
216 &self,
217 _req: crate::model::FetchGitRefsRequest,
218 _options: gax::options::RequestOptions,
219 ) -> impl std::future::Future<
220 Output = crate::Result<gax::response::Response<crate::model::FetchGitRefsResponse>>,
221 > + Send {
222 std::future::ready::<
223 crate::Result<gax::response::Response<crate::model::FetchGitRefsResponse>>,
224 >(Err(Error::other("unimplemented")))
225 }
226
227 fn set_iam_policy(
229 &self,
230 _req: iam_v1::model::SetIamPolicyRequest,
231 _options: gax::options::RequestOptions,
232 ) -> impl std::future::Future<
233 Output = crate::Result<gax::response::Response<iam_v1::model::Policy>>,
234 > + Send {
235 std::future::ready::<crate::Result<gax::response::Response<iam_v1::model::Policy>>>(Err(
236 Error::other("unimplemented"),
237 ))
238 }
239
240 fn get_iam_policy(
242 &self,
243 _req: iam_v1::model::GetIamPolicyRequest,
244 _options: gax::options::RequestOptions,
245 ) -> impl std::future::Future<
246 Output = crate::Result<gax::response::Response<iam_v1::model::Policy>>,
247 > + Send {
248 std::future::ready::<crate::Result<gax::response::Response<iam_v1::model::Policy>>>(Err(
249 Error::other("unimplemented"),
250 ))
251 }
252
253 fn test_iam_permissions(
255 &self,
256 _req: iam_v1::model::TestIamPermissionsRequest,
257 _options: gax::options::RequestOptions,
258 ) -> impl std::future::Future<
259 Output = crate::Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>>,
260 > + Send {
261 std::future::ready::<
262 crate::Result<gax::response::Response<iam_v1::model::TestIamPermissionsResponse>>,
263 >(Err(Error::other("unimplemented")))
264 }
265
266 fn get_operation(
268 &self,
269 _req: longrunning::model::GetOperationRequest,
270 _options: gax::options::RequestOptions,
271 ) -> impl std::future::Future<
272 Output = crate::Result<gax::response::Response<longrunning::model::Operation>>,
273 > + Send {
274 std::future::ready::<crate::Result<gax::response::Response<longrunning::model::Operation>>>(
275 Err(Error::other("unimplemented")),
276 )
277 }
278
279 fn cancel_operation(
281 &self,
282 _req: longrunning::model::CancelOperationRequest,
283 _options: gax::options::RequestOptions,
284 ) -> impl std::future::Future<Output = crate::Result<gax::response::Response<()>>> + Send {
285 std::future::ready::<crate::Result<gax::response::Response<()>>>(Err(Error::other(
286 "unimplemented",
287 )))
288 }
289
290 fn get_polling_error_policy(
295 &self,
296 _options: &gax::options::RequestOptions,
297 ) -> std::sync::Arc<dyn gax::polling_error_policy::PollingErrorPolicy> {
298 std::sync::Arc::new(gax::polling_error_policy::Aip194Strict)
299 }
300
301 fn get_polling_backoff_policy(
306 &self,
307 _options: &gax::options::RequestOptions,
308 ) -> std::sync::Arc<dyn gax::polling_backoff_policy::PollingBackoffPolicy> {
309 std::sync::Arc::new(gax::exponential_backoff::ExponentialBackoff::default())
310 }
311}