commit c6c545e94d423dc590c5aa3f2fc49ffcddf00b76
parent eafa4885ee6f7de7cf44cb1e0ee3871bb634ecff
Author: Özgür Kesim <oec-taler@kesim.org>
Date: Wed, 18 Dec 2024 16:40:55 +0100
[auditor] added member names to struct array
Fixes #9395
Diffstat:
1 file changed, 601 insertions(+), 382 deletions(-)
diff --git a/src/auditor/taler-auditor-httpd.c b/src/auditor/taler-auditor-httpd.c
@@ -329,440 +329,659 @@ handle_mhd_request (void *cls,
static struct TAH_RequestHandler handlers[] = {
/* Our most popular handler (thus first!), used by merchants to
probabilistically report us their deposit confirmations. */
- {
- .url = "/deposit-confirmation",
+ { .url = "/deposit-confirmation",
.method = MHD_HTTP_METHOD_PUT,
.mime_type = "application/json",
.handler = &TAH_DEPOSIT_CONFIRMATION_handler,
- .response_code = MHD_HTTP_OK
- },
- {
- .url = "/spa",
+ .response_code = MHD_HTTP_OK},
+ { .url = "/spa",
.method = MHD_HTTP_METHOD_GET,
- .handler = &TAH_spa_handler
- },
- {
- "/monitoring/deposit-confirmation",
- MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_DEPOSIT_CONFIRMATION_handler_get,
- MHD_HTTP_OK,
- true
- },
- { "/monitoring/deposit-confirmation", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic, MHD_HTTP_OK, true,
+ .handler = &TAH_spa_handler},
+ { .url = "/monitoring/deposit-confirmation",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_DEPOSIT_CONFIRMATION_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/deposit-confirmation",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_DEPOSIT_CONFIRMATION },
- { "/monitoring/amount-arithmetic-inconsistency", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_AMOUNT_ARITHMETIC_INCONSISTENCY_handler_get, MHD_HTTP_OK, true },
- { "/monitoring/amount-arithmetic-inconsistency", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic, MHD_HTTP_OK, true,
+ { .url = "/monitoring/amount-arithmetic-inconsistency",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_AMOUNT_ARITHMETIC_INCONSISTENCY_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/amount-arithmetic-inconsistency",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_AMOUNT_ARITHMETIC_INCONSISTENCY },
- {
- "/monitoring/amount-arithmetic-inconsistency",
- MHD_HTTP_METHOD_PATCH,
- .mime_type = "application/json",
- .data = NULL,
- .data_size = 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK,
- true,
- .table = TALER_AUDITORDB_AMOUNT_ARITHMETIC_INCONSISTENCY
- },
- { "/monitoring/coin-inconsistency", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_COIN_INCONSISTENCY_handler_get, MHD_HTTP_OK, true },
- { "/monitoring/coin-inconsistency", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic, MHD_HTTP_OK, true,
+ { .url = "/monitoring/amount-arithmetic-inconsistency",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
+ .table = TALER_AUDITORDB_AMOUNT_ARITHMETIC_INCONSISTENCY },
+ { .url = "/monitoring/coin-inconsistency",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_COIN_INCONSISTENCY_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/coin-inconsistency",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_COIN_INCONSISTENCY },
- { "/monitoring/coin-inconsistency", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed, MHD_HTTP_OK, true,
+ { .url = "/monitoring/coin-inconsistency",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_COIN_INCONSISTENCY },
- { "/monitoring/row-inconsistency", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_ROW_INCONSISTENCY_handler_get, MHD_HTTP_OK, true },
- { "/monitoring/row-inconsistency", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic, MHD_HTTP_OK, true,
+ { .url = "/monitoring/row-inconsistency",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_ROW_INCONSISTENCY_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/row-inconsistency",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_ROW_INCONSISTENCY},
- { "/monitoring/row-inconsistency", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed, MHD_HTTP_OK, true,
+ { .url = "/monitoring/row-inconsistency",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_ROW_INCONSISTENCY },
- { "/monitoring/bad-sig-losses", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_BAD_SIG_LOSSES_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/bad-sig-losses", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/bad-sig-losses",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_BAD_SIG_LOSSES_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/bad-sig-losses",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_BAD_SIG_LOSSES},
- { "/monitoring/bad-sig-losses", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/bad-sig-losses",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_BAD_SIG_LOSSES },
- { "/monitoring/closure-lags", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_CLOSURE_LAGS_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/closure-lags", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/closure-lags",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_CLOSURE_LAGS_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/closure-lags",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_CLOSURE_LAGS },
- { "/monitoring/closure-lags", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/closure-lags",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_CLOSURE_LAGS },
- { "/monitoring/emergency", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_EMERGENCY_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/emergency", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/emergency",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_EMERGENCY_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/emergency",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_EMERGENCY },
- { "/monitoring/emergency", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/emergency",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_EMERGENCY },
- { "/monitoring/refreshes-hanging", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_REFRESHES_HANGING_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/refreshes-hanging", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/refreshes-hanging",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_REFRESHES_HANGING_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/refreshes-hanging",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_REFRESHES_HANGING },
- { "/monitoring/refreshes-hanging", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/refreshes-hanging",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_REFRESHES_HANGING },
- { "/monitoring/denomination-key-validity-withdraw-inconsistency",
- MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/denomination-key-validity-withdraw-inconsistency",
- MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/denomination-key-validity-withdraw-inconsistency",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler =
+ &TAH_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/denomination-key-validity-withdraw-inconsistency",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY}
,
- { "/monitoring/denomination-key-validity-withdraw-inconsistency",
- MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/denomination-key-validity-withdraw-inconsistency",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_DENOMINATION_KEY_VALIDITY_WITHDRAW_INCONSISTENCY}
,
- { "/monitoring/reserve-balance-insufficient-inconsistency",
- MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/reserve-balance-insufficient-inconsistency",
- MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/reserve-balance-insufficient-inconsistency",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/reserve-balance-insufficient-inconsistency",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY },
- { "/monitoring/reserve-balance-insufficient-inconsistency",
- MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/reserve-balance-insufficient-inconsistency",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_RESERVE_BALANCE_INSUFFICIENT_INCONSISTENCY },
- { "/monitoring/purse-not-closed-inconsistencies", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_PURSE_NOT_CLOSED_INCONSISTENCIES_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/purse-not-closed-inconsistencies", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/purse-not-closed-inconsistencies",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_PURSE_NOT_CLOSED_INCONSISTENCIES_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/purse-not-closed-inconsistencies",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_PURSE_NOT_CLOSED_INCONSISTENCY },
- { "/monitoring/purse-not-closed-inconsistencies", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/purse-not-closed-inconsistencies",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_PURSE_NOT_CLOSED_INCONSISTENCY },
- { "/monitoring/emergency-by-count", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_EMERGENCY_BY_COUNT_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/emergency-by-count", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/emergency-by-count",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_EMERGENCY_BY_COUNT_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/emergency-by-count",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_EMERGENCY_BY_COUNT },
- { "/monitoring/emergency-by-count", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/emergency-by-count",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_EMERGENCY_BY_COUNT },
- { "/monitoring/reserve-in-inconsistency", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_RESERVE_IN_INCONSISTENCY_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/reserve-in-inconsistency", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/reserve-in-inconsistency",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_RESERVE_IN_INCONSISTENCY_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/reserve-in-inconsistency",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_RESERVE_IN_INCONSISTENCY },
- { "/monitoring/reserve-in-inconsistency", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/reserve-in-inconsistency",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_RESERVE_IN_INCONSISTENCY },
- { "/monitoring/reserve-not-closed-inconsistency", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_RESERVE_NOT_CLOSED_INCONSISTENCY_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/reserve-not-closed-inconsistency", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/reserve-not-closed-inconsistency",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_RESERVE_NOT_CLOSED_INCONSISTENCY_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/reserve-not-closed-inconsistency",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_RESERVE_NOT_CLOSED_INCONSISTENCY },
- { "/monitoring/reserve-not-closed-inconsistency", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/reserve-not-closed-inconsistency",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_RESERVE_NOT_CLOSED_INCONSISTENCY },
- { "/monitoring/denominations-without-sigs", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_DENOMINATIONS_WITHOUT_SIGS_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/denominations-without-sigs", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/denominations-without-sigs",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_DENOMINATIONS_WITHOUT_SIGS_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/denominations-without-sigs",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_DENOMINATIONS_WITHOUT_SIG },
- { "/monitoring/denominations-without-sigs", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/denominations-without-sigs",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_DENOMINATIONS_WITHOUT_SIG },
- { "/monitoring/misattribution-in-inconsistency", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_MISATTRIBUTION_IN_INCONSISTENCY_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/misattribution-in-inconsistency", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/misattribution-in-inconsistency",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_MISATTRIBUTION_IN_INCONSISTENCY_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/misattribution-in-inconsistency",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_MISATTRIBUTION_IN_INCONSISTENCY },
- { "/monitoring/misattribution-in-inconsistency", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/misattribution-in-inconsistency",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_MISATTRIBUTION_IN_INCONSISTENCY },
- { "/monitoring/reserves", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_RESERVES_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/purses", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_PURSES_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/historic-denomination-revenue", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_HISTORIC_DENOMINATION_REVENUE_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/denomination-pending", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_DENOMINATION_PENDING_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/denomination-pending", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/reserves",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_RESERVES_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/purses",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_PURSES_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/historic-denomination-revenue",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_HISTORIC_DENOMINATION_REVENUE_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/denomination-pending",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_DENOMINATION_PENDING_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/denomination-pending",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_DENOMINATION_PENDING },
- { "/monitoring/historic-reserve-summary", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_HISTORIC_RESERVE_SUMMARY_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/wire-format-inconsistency", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_WIRE_FORMAT_INCONSISTENCY_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/wire-format-inconsistency", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/historic-reserve-summary",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_HISTORIC_RESERVE_SUMMARY_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/wire-format-inconsistency",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_WIRE_FORMAT_INCONSISTENCY_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/wire-format-inconsistency",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_WIRE_FORMAT_INCONSISTENCY },
- { "/monitoring/wire-format-inconsistency", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/wire-format-inconsistency",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_WIRE_FORMAT_INCONSISTENCY },
- { "/monitoring/wire-out-inconsistency", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_WIRE_OUT_INCONSISTENCY_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/wire-out-inconsistency", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/wire-out-inconsistency",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_WIRE_OUT_INCONSISTENCY_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/wire-out-inconsistency",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_WIRE_OUT_INCONSISTENCY },
- { "/monitoring/wire-out-inconsistency", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/wire-out-inconsistency",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_WIRE_OUT_INCONSISTENCY },
- { "/monitoring/reserve-balance-summary-wrong-inconsistency",
- MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/reserve-balance-summary-wrong-inconsistency",
- MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/reserve-balance-summary-wrong-inconsistency",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/reserve-balance-summary-wrong-inconsistency",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY },
- { "/monitoring/reserve-balance-summary-wrong-inconsistency",
- MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/reserve-balance-summary-wrong-inconsistency",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_RESERVE_BALANCE_SUMMARY_WRONG_INCONSISTENCY },
- { "/monitoring/row-minor-inconsistencies", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_ROW_MINOR_INCONSISTENCIES_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/row-minor-inconsistencies", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/row-minor-inconsistencies",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_ROW_MINOR_INCONSISTENCIES_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/row-minor-inconsistencies",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_ROW_MINOR_INCONSISTENCY },
- { "/monitoring/row-minor-inconsistencies", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
+ { .url = "/monitoring/row-minor-inconsistencies",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
.table = TALER_AUDITORDB_ROW_MINOR_INCONSISTENCY },
- { "/monitoring/fee-time-inconsistency", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_FEE_TIME_INCONSISTENCY_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/fee-time-inconsistency", MHD_HTTP_METHOD_DELETE,
- "application/json",
- NULL, 0,
- &TAH_delete_handler_generic,
- MHD_HTTP_OK, true,
- .table = TALER_AUDITORDB_FEE_TIME_INCONSISTENCY },
- { "/monitoring/fee-time-inconsistency", MHD_HTTP_METHOD_PATCH,
- "application/json",
- NULL, 0,
- &TAH_patch_handler_generic_suppressed,
- MHD_HTTP_OK, true,
- .table = TALER_AUDITORDB_FEE_TIME_INCONSISTENCY },
- { "/monitoring/balances", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_BALANCES_handler_get,
- MHD_HTTP_OK, true },
- { "/monitoring/progress", MHD_HTTP_METHOD_GET,
- "application/json",
- NULL, 0,
- &TAH_PROGRESS_handler_get,
- MHD_HTTP_OK, true },
- { "/config", MHD_HTTP_METHOD_GET, "application/json",
- NULL, 0,
- &handle_config, MHD_HTTP_OK, false },
+ { .url = "/monitoring/fee-time-inconsistency",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_FEE_TIME_INCONSISTENCY_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/fee-time-inconsistency",
+ .method = MHD_HTTP_METHOD_DELETE,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_delete_handler_generic,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
+ .table = TALER_AUDITORDB_FEE_TIME_INCONSISTENCY },
+ { .url = "/monitoring/fee-time-inconsistency",
+ .method = MHD_HTTP_METHOD_PATCH,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_patch_handler_generic_suppressed,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true,
+ .table = TALER_AUDITORDB_FEE_TIME_INCONSISTENCY },
+ { .url = "/monitoring/balances",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_BALANCES_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/monitoring/progress",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_PROGRESS_handler_get,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = true },
+ { .url = "/config",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "application/json",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &handle_config,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = false },
/* /robots.txt: disallow everything */
- { "/robots.txt", MHD_HTTP_METHOD_GET, "text/plain",
- "User-agent: *\nDisallow: /\n", 0,
- &TAH_MHD_handler_static_response, MHD_HTTP_OK, false },
+ { .url = "/robots.txt",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "text/plain",
+ .data = "User-agent: *\nDisallow: /\n",
+ .data_size = 0,
+ .handler = &TAH_MHD_handler_static_response,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = false },
/* AGPL licensing page, redirect to source. As per the AGPL-license,
every deployment is required to offer the user a download of the
source. We make this easy by including a redirect t the source
here. */
- { "/agpl", MHD_HTTP_METHOD_GET, "text/plain",
- NULL, 0,
- &TAH_MHD_handler_agpl_redirect, MHD_HTTP_FOUND, false },
+ { .url = "/agpl",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "text/plain",
+ .data = NULL,
+ .data_size = 0,
+ .handler = &TAH_MHD_handler_agpl_redirect,
+ .response_code = MHD_HTTP_FOUND,
+ .requires_auth = false },
/* Landing page, for now tells humans to go away
* (NOTE: ideally, the reverse proxy will respond with a nicer page) */
- { "/", MHD_HTTP_METHOD_GET, "text/plain",
- "Hello, I'm the Taler auditor. This HTTP server is not for humans.\n", 0,
- &TAH_MHD_handler_static_response, MHD_HTTP_OK, false },
+ { .url = "/",
+ .method = MHD_HTTP_METHOD_GET,
+ .mime_type = "text/plain",
+ .data =
+ "Hello, I'm the Taler auditor. This HTTP server is not for humans.\n",
+ .data_size = 0,
+ .handler = &TAH_MHD_handler_static_response,
+ .response_code = MHD_HTTP_OK,
+ .requires_auth = false },
{ NULL, NULL, NULL, NULL, 0, NULL, 0, 0 }
};
unsigned int args_max = 3;