taler-exchange-httpd_management.h (5263B)
1 /* 2 This file is part of TALER 3 Copyright (C) 2020 Taler Systems SA 4 5 TALER is free software; you can redistribute it and/or modify it under the 6 terms of the GNU Affero 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 Affero General Public License for more details. 12 13 You should have received a copy of the GNU Affero General Public License along with 14 TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> 15 */ 16 /** 17 * @file taler-exchange-httpd_management.h 18 * @brief Handlers for the /management/ endpoints 19 * @author Christian Grothoff 20 */ 21 #ifndef TALER_EXCHANGE_HTTPD_MANAGEMENT_H 22 #define TALER_EXCHANGE_HTTPD_MANAGEMENT_H 23 24 #include <gnunet/gnunet_util_lib.h> 25 #include <microhttpd.h> 26 #include "taler-exchange-httpd.h" 27 28 /** 29 * Handle a "/management/auditors" request. 30 * 31 * @param connection the MHD connection to handle 32 * @param root uploaded JSON data 33 * @return MHD result code 34 */ 35 MHD_RESULT 36 TEH_handler_management_auditors ( 37 struct MHD_Connection *connection, 38 const json_t *root); 39 40 41 /** 42 * Handle a "/management/auditors/$AUDITOR_PUB/disable" request. 43 * 44 * @param connection the MHD connection to handle 45 * @param auditor_pub public key of the auditor to disable 46 * @param root uploaded JSON data 47 * @return MHD result code 48 */ 49 MHD_RESULT 50 TEH_handler_management_auditors_AP_disable ( 51 struct MHD_Connection *connection, 52 const struct TALER_AuditorPublicKeyP *auditor_pub, 53 const json_t *root); 54 55 56 /** 57 * Handle a "/management/denominations/$HDP/revoke" request. 58 * 59 * @param connection the MHD connection to handle 60 * @param h_denom_pub hash of the public key of the denomination to revoke 61 * @param root uploaded JSON data 62 * @return MHD result code 63 */ 64 MHD_RESULT 65 TEH_handler_management_denominations_HDP_revoke ( 66 struct MHD_Connection *connection, 67 const struct TALER_DenominationHashP *h_denom_pub, 68 const json_t *root); 69 70 71 /** 72 * Handle a "/management/signkeys/$EP/revoke" request. 73 * 74 * @param connection the MHD connection to handle 75 * @param exchange_pub exchange online signing public key to revoke 76 * @param root uploaded JSON data 77 * @return MHD result code 78 */ 79 MHD_RESULT 80 TEH_handler_management_signkeys_EP_revoke ( 81 struct MHD_Connection *connection, 82 const struct TALER_ExchangePublicKeyP *exchange_pub, 83 const json_t *root); 84 85 86 /** 87 * Handle a POST "/management/keys" request. 88 * 89 * @param connection the MHD connection to handle 90 * @param root uploaded JSON data 91 * @return MHD result code 92 */ 93 MHD_RESULT 94 TEH_handler_management_post_keys ( 95 struct MHD_Connection *connection, 96 const json_t *root); 97 98 99 /** 100 * Handle a POST "/management/wire" request. 101 * 102 * @param connection the MHD connection to handle 103 * @param root uploaded JSON data 104 * @return MHD result code 105 */ 106 MHD_RESULT 107 TEH_handler_management_post_wire ( 108 struct MHD_Connection *connection, 109 const json_t *root); 110 111 112 /** 113 * Handle a POST "/management/wire/disable" request. 114 * 115 * @param connection the MHD connection to handle 116 * @param root uploaded JSON data 117 * @return MHD result code 118 */ 119 MHD_RESULT 120 TEH_handler_management_post_wire_disable ( 121 struct MHD_Connection *connection, 122 const json_t *root); 123 124 125 /** 126 * Handle a POST "/management/wire-fees" request. 127 * 128 * @param connection the MHD connection to handle 129 * @param root uploaded JSON data 130 * @return MHD result code 131 */ 132 MHD_RESULT 133 TEH_handler_management_post_wire_fees ( 134 struct MHD_Connection *connection, 135 const json_t *root); 136 137 138 /** 139 * Handle a POST "/management/global-fees" request. 140 * 141 * @param connection the MHD connection to handle 142 * @param root uploaded JSON data 143 * @return MHD result code 144 */ 145 MHD_RESULT 146 TEH_handler_management_post_global_fees ( 147 struct MHD_Connection *connection, 148 const json_t *root); 149 150 151 /** 152 * Handle a POST "/management/extensions" request. 153 * 154 * @param connection the MHD connection to handle 155 * @param root uploaded JSON data 156 * @return MHD result code 157 */ 158 MHD_RESULT 159 TEH_handler_management_post_extensions ( 160 struct MHD_Connection *connection, 161 const json_t *root); 162 163 164 /** 165 * Handle a POST "/management/drain" request. 166 * 167 * @param connection the MHD connection to handle 168 * @param root uploaded JSON data 169 * @return MHD result code 170 */ 171 MHD_RESULT 172 TEH_handler_management_post_drain ( 173 struct MHD_Connection *connection, 174 const json_t *root); 175 176 177 /** 178 * Handle a POST "/management/aml-officers" request. 179 * 180 * @param connection the MHD connection to handle 181 * @param root uploaded JSON data 182 * @return MHD result code 183 */ 184 MHD_RESULT 185 TEH_handler_management_aml_officers ( 186 struct MHD_Connection *connection, 187 const json_t *root); 188 189 190 /** 191 * Handle a POST "/management/partners" request. 192 * 193 * @param connection the MHD connection to handle 194 * @param root uploaded JSON data 195 * @return MHD result code 196 */ 197 MHD_RESULT 198 TEH_handler_management_partners ( 199 struct MHD_Connection *connection, 200 const json_t *root); 201 202 203 /** 204 * Initialize extension configuration handling. 205 * 206 * @return #GNUNET_OK on success 207 */ 208 enum GNUNET_GenericReturnValue 209 TEH_extensions_init (void); 210 211 #endif