52 [[nodiscard]]
static auto& lg() {
54 static auto instance = make_logger(
55 "ores.dq.messaging.dq_message_handler");
68 std::shared_ptr<comms::service::auth_session_service> sessions,
69 std::shared_ptr<iam::service::authorization_service> auth_service);
71 using handler_result = boost::asio::awaitable<
72 std::expected<std::vector<std::byte>, ores::utility::serialization::error_code>
85 std::span<const std::byte> payload,
86 const std::string& remote_address)
override;
99 handle_get_change_reason_categories_request(
100 std::span<const std::byte> payload,
101 const std::string& remote_address);
109 handle_get_change_reasons_request(std::span<const std::byte> payload,
110 const std::string& remote_address);
118 handle_get_change_reasons_by_category_request(
119 std::span<const std::byte> payload,
120 const std::string& remote_address);
128 handle_save_change_reason_request(std::span<const std::byte> payload,
129 const std::string& remote_address);
137 handle_delete_change_reason_request(std::span<const std::byte> payload,
138 const std::string& remote_address);
146 handle_get_change_reason_history_request(std::span<const std::byte> payload,
147 const std::string& remote_address);
155 handle_save_change_reason_category_request(
156 std::span<const std::byte> payload,
157 const std::string& remote_address);
165 handle_delete_change_reason_category_request(
166 std::span<const std::byte> payload,
167 const std::string& remote_address);
175 handle_get_change_reason_category_history_request(
176 std::span<const std::byte> payload,
177 const std::string& remote_address);
184 handle_get_catalogs_request(std::span<const std::byte> payload,
185 const std::string& remote_address);
188 handle_save_catalog_request(std::span<const std::byte> payload,
189 const std::string& remote_address);
192 handle_delete_catalog_request(std::span<const std::byte> payload,
193 const std::string& remote_address);
196 handle_get_catalog_history_request(std::span<const std::byte> payload,
197 const std::string& remote_address);
204 handle_get_dataset_dependencies_request(std::span<const std::byte> payload,
205 const std::string& remote_address);
208 handle_get_dataset_dependencies_by_dataset_request(
209 std::span<const std::byte> payload,
210 const std::string& remote_address);
217 handle_get_data_domains_request(std::span<const std::byte> payload,
218 const std::string& remote_address);
221 handle_save_data_domain_request(std::span<const std::byte> payload,
222 const std::string& remote_address);
225 handle_delete_data_domain_request(std::span<const std::byte> payload,
226 const std::string& remote_address);
229 handle_get_data_domain_history_request(std::span<const std::byte> payload,
230 const std::string& remote_address);
237 handle_get_subject_areas_request(std::span<const std::byte> payload,
238 const std::string& remote_address);
241 handle_get_subject_areas_by_domain_request(std::span<const std::byte> payload,
242 const std::string& remote_address);
245 handle_save_subject_area_request(std::span<const std::byte> payload,
246 const std::string& remote_address);
249 handle_delete_subject_area_request(std::span<const std::byte> payload,
250 const std::string& remote_address);
253 handle_get_subject_area_history_request(std::span<const std::byte> payload,
254 const std::string& remote_address);
261 handle_get_datasets_request(std::span<const std::byte> payload,
262 const std::string& remote_address);
265 handle_save_dataset_request(std::span<const std::byte> payload,
266 const std::string& remote_address);
269 handle_delete_dataset_request(std::span<const std::byte> payload,
270 const std::string& remote_address);
273 handle_get_dataset_history_request(std::span<const std::byte> payload,
274 const std::string& remote_address);
281 handle_get_methodologies_request(std::span<const std::byte> payload,
282 const std::string& remote_address);
285 handle_save_methodology_request(std::span<const std::byte> payload,
286 const std::string& remote_address);
289 handle_delete_methodology_request(std::span<const std::byte> payload,
290 const std::string& remote_address);
293 handle_get_methodology_history_request(std::span<const std::byte> payload,
294 const std::string& remote_address);
301 handle_get_coding_schemes_request(std::span<const std::byte> payload,
302 const std::string& remote_address);
305 handle_get_coding_schemes_by_authority_type_request(
306 std::span<const std::byte> payload,
307 const std::string& remote_address);
310 handle_save_coding_scheme_request(std::span<const std::byte> payload,
311 const std::string& remote_address);
314 handle_delete_coding_scheme_request(std::span<const std::byte> payload,
315 const std::string& remote_address);
318 handle_get_coding_scheme_history_request(std::span<const std::byte> payload,
319 const std::string& remote_address);
326 handle_get_coding_scheme_authority_types_request(
327 std::span<const std::byte> payload,
328 const std::string& remote_address);
331 handle_save_coding_scheme_authority_type_request(
332 std::span<const std::byte> payload,
333 const std::string& remote_address);
336 handle_delete_coding_scheme_authority_type_request(
337 std::span<const std::byte> payload,
338 const std::string& remote_address);
341 handle_get_coding_scheme_authority_type_history_request(
342 std::span<const std::byte> payload,
343 const std::string& remote_address);
350 handle_get_nature_dimensions_request(std::span<const std::byte> payload,
351 const std::string& remote_address);
354 handle_save_nature_dimension_request(std::span<const std::byte> payload,
355 const std::string& remote_address);
358 handle_delete_nature_dimension_request(std::span<const std::byte> payload,
359 const std::string& remote_address);
362 handle_get_nature_dimension_history_request(std::span<const std::byte> payload,
363 const std::string& remote_address);
370 handle_get_origin_dimensions_request(std::span<const std::byte> payload,
371 const std::string& remote_address);
374 handle_save_origin_dimension_request(std::span<const std::byte> payload,
375 const std::string& remote_address);
378 handle_delete_origin_dimension_request(std::span<const std::byte> payload,
379 const std::string& remote_address);
382 handle_get_origin_dimension_history_request(std::span<const std::byte> payload,
383 const std::string& remote_address);
390 handle_get_treatment_dimensions_request(std::span<const std::byte> payload,
391 const std::string& remote_address);
394 handle_save_treatment_dimension_request(std::span<const std::byte> payload,
395 const std::string& remote_address);
398 handle_delete_treatment_dimension_request(std::span<const std::byte> payload,
399 const std::string& remote_address);
402 handle_get_treatment_dimension_history_request(std::span<const std::byte> payload,
403 const std::string& remote_address);
416 handle_publish_datasets_request(std::span<const std::byte> payload,
417 const std::string& remote_address);
425 handle_get_publications_request(std::span<const std::byte> payload,
426 const std::string& remote_address);
436 handle_resolve_dependencies_request(std::span<const std::byte> payload,
437 const std::string& remote_address);
446 handle_publish_bundle_request(std::span<const std::byte> payload,
447 const std::string& remote_address);
454 handle_get_dataset_bundles_request(std::span<const std::byte> payload,
455 const std::string& remote_address);
458 handle_save_dataset_bundle_request(std::span<const std::byte> payload,
459 const std::string& remote_address);
462 handle_delete_dataset_bundle_request(std::span<const std::byte> payload,
463 const std::string& remote_address);
466 handle_get_dataset_bundle_history_request(std::span<const std::byte> payload,
467 const std::string& remote_address);
474 handle_get_dataset_bundle_members_request(std::span<const std::byte> payload,
475 const std::string& remote_address);
478 handle_get_dataset_bundle_members_by_bundle_request(
479 std::span<const std::byte> payload,
480 const std::string& remote_address);
483 handle_save_dataset_bundle_member_request(std::span<const std::byte> payload,
484 const std::string& remote_address);
487 handle_delete_dataset_bundle_member_request(std::span<const std::byte> payload,
488 const std::string& remote_address);
495 using auth_check_result = std::expected<
497 ores::utility::serialization::error_code
511 auth_check_result check_authorization(
512 const std::string& remote_address,
513 std::string_view permission,
514 std::string_view operation_name);
525 auth_check_result get_authenticated_session(
526 const std::string& remote_address,
527 std::string_view operation_name);
530 std::shared_ptr<comms::service::auth_session_service> sessions_;
531 std::shared_ptr<iam::service::authorization_service> auth_service_;