helper.c (2153B)
1 /* 2 This file is part of TALER 3 Copyright (C) 2015, 2016 Taler Systems SA 4 5 TALER is free software; you can redistribute it and/or modify it under the 6 terms of the GNU General Public License as published by the Free Software 7 Foundation; either version 3, or (at your option) any later version. 8 9 TALER is distributed in the hope that it will be useful, but WITHOUT ANY 10 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR 11 A PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 13 You should have received a copy of the GNU General Public License along with 14 TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> 15 */ 16 /** 17 * @file auditordb/helper.c 18 * @brief helper function 19 * @author Christian Grothoff 20 * @author Sree Harsha Totakura <sreeharsha@totakura.in> 21 */ 22 #include "auditordb_lib.h" 23 #include "pg_helper.h" 24 25 26 const char * 27 TALER_AUDITORDB_get_deletable_suppressable_table_name ( 28 enum TALER_AUDITORDB_DeletableSuppressableTables table) 29 { 30 const char *tables[] = { 31 "auditor_amount_arithmetic_inconsistency", 32 "auditor_closure_lags", 33 "auditor_progress", 34 "auditor_bad_sig_losses", 35 "auditor_coin_inconsistency", 36 "auditor_denomination_key_validity_withdraw_inconsistency", 37 "auditor_denomination_pending", 38 "auditor_denominations_without_sig", 39 "auditor_deposit_confirmations", 40 "auditor_emergency", 41 "auditor_emergency_by_count", 42 "auditor_fee_time_inconsistency", 43 "auditor_misattribution_in_inconsistency", 44 "auditor_purse_not_closed_inconsistencies", 45 "auditor_refreshes_hanging", 46 "auditor_reserve_balance_insufficient_inconsistency", 47 "auditor_reserve_balance_summary_wrong_inconsistency", 48 "auditor_reserve_in_inconsistency", 49 "auditor_reserve_not_closed_inconsistency", 50 "auditor_row_inconsistency", 51 "auditor_row_minor_inconsistencies", 52 "auditor_wire_format_inconsistency", 53 "auditor_wire_out_inconsistency", 54 NULL, 55 }; 56 57 if ( (table < 0) || 58 (table >= TALER_AUDITORDB_DELETABLESUPPRESSABLE_TABLES_MAX)) 59 { 60 GNUNET_break (0); 61 return NULL; 62 } 63 return tables[table]; 64 }