pg_lookup_token_family_key.h (2007B)
1 /* 2 This file is part of TALER 3 Copyright (C) 2024 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 backenddb/pg_lookup_token_family_key.h 18 * @brief implementation of the lookup_token_family_key function for Postgres 19 * @author Christian Blättler 20 */ 21 #ifndef PG_LOOKUP_TOKEN_FAMILY_KEY_H 22 #define PG_LOOKUP_TOKEN_FAMILY_KEY_H 23 24 #include <gnunet/gnunet_common.h> 25 #include <taler/taler_util.h> 26 #include <taler/taler_json_lib.h> 27 #include "taler_merchantdb_plugin.h" 28 29 /** 30 * Lookup details about a particular token family key. The valid_after field 31 * of the key has to be >= @e min_valid_after and < @e max_valid_after. 32 * 33 * @param cls closure 34 * @param instance_id instance to lookup token family key for 35 * @param token_family_slug slug of token family to lookup 36 * @param valid_at find a key with a validity period that includes this time 37 * @param sign_until find a private key that can sign until this time 38 * @param[out] details set to the token family key details on success, can be NULL 39 * (in that case we only want to check if the token family key exists) 40 * @return database result code 41 */ 42 enum GNUNET_DB_QueryStatus 43 TMH_PG_lookup_token_family_key ( 44 void *cls, 45 const char *instance_id, 46 const char *token_family_slug, 47 struct GNUNET_TIME_Timestamp valid_at, 48 struct GNUNET_TIME_Timestamp sign_until, 49 struct TALER_MERCHANTDB_TokenFamilyKeyDetails *details); 50 51 52 #endif