challenger

OAuth 2.0-based authentication service that validates user can receive messages at a certain address
Log | Files | Refs | Submodules | README | LICENSE

challenger_database_lib.h (1681B)


      1 /*
      2   This file is part of Challenger
      3   Copyright (C) 2023 Taler Systems SA
      4 
      5   Challenger 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   Challenger 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   Challenger; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15 */
     16 /**
     17  * @file include/challenger_database_lib.h
     18  * @brief database helper functions for postgres used by challenger
     19  * @author Christian Grothoff
     20  */
     21 #ifndef CHALLENGER_DB_LIB_H
     22 #define CHALLENGER_DB_LIB_H
     23 
     24 #include <taler/taler_util.h>
     25 
     26 struct CHALLENGERDB_PostgresContext;
     27 
     28 /**
     29  * Connect to the challenger database.
     30  *
     31  * @param cfg configuration to use
     32  * @param skip_preflight true if we should skip the usual
     33  *   preflight check which assures us that the DB is actually
     34  *   operational; only challenger-dbinit should use true here.
     35  * @return NULL on failure
     36  */
     37 struct CHALLENGERDB_PostgresContext *
     38 CHALLENGERDB_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
     39                       bool skip_preflight);
     40 
     41 
     42 /**
     43  * Disconnect from the challenger database.
     44  *
     45  * @param[in] pg context to disconnect and free
     46  */
     47 void
     48 CHALLENGERDB_disconnect (struct CHALLENGERDB_PostgresContext *pg);
     49 
     50 
     51 #endif  /* CHALLENGER_DB_LIB_H */
     52 
     53 /* end of challenger_database_lib.h */