struct returned by the initialization function of the plugin More...
#include <gnunet_namestore_plugin.h>
Data Fields | |
void * | cls |
Closure to pass to all plugin functions. More... | |
enum GNUNET_GenericReturnValue(* | store_records )(void *cls, const struct GNUNET_IDENTITY_PrivateKey *zone, const char *label, unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd) |
Store a record in the datastore for which we are the authority. More... | |
enum GNUNET_GenericReturnValue(* | lookup_records )(void *cls, const struct GNUNET_IDENTITY_PrivateKey *zone, const char *label, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) |
Lookup records in the datastore for which we are the authority. More... | |
enum GNUNET_GenericReturnValue(* | iterate_records )(void *cls, const struct GNUNET_IDENTITY_PrivateKey *zone, uint64_t serial, uint64_t limit, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) |
Iterate over the results for a particular zone in the datastore. More... | |
enum GNUNET_GenericReturnValue(* | zone_to_name )(void *cls, const struct GNUNET_IDENTITY_PrivateKey *zone, const struct GNUNET_IDENTITY_PublicKey *value_zone, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) |
Look for an existing PKEY delegation record for a given public key. More... | |
enum GNUNET_GenericReturnValue(* | transaction_begin )(void *cls, char **emsg) |
Transaction-based API draft. More... | |
enum GNUNET_GenericReturnValue(* | transaction_rollback )(void *cls, char **emsg) |
Abort and roll back a transaction in the database. More... | |
enum GNUNET_GenericReturnValue(* | transaction_commit )(void *cls, char **emsg) |
Commit a transaction in the database. More... | |
enum GNUNET_GenericReturnValue(* | edit_records )(void *cls, const struct GNUNET_IDENTITY_PrivateKey *zone, const char *label, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) |
Edit records in the datastore for which we are the authority. More... | |
enum GNUNET_GenericReturnValue(* | create_tables )(void *cls) |
Setup the database. More... | |
enum GNUNET_GenericReturnValue(* | drop_tables )(void *cls) |
Drop existing tables. More... | |
struct returned by the initialization function of the plugin
Definition at line 74 of file gnunet_namestore_plugin.h.
void* GNUNET_NAMESTORE_PluginFunctions::cls |
Closure to pass to all plugin functions.
Definition at line 79 of file gnunet_namestore_plugin.h.
Referenced by get_nick_record(), libgnunet_plugin_namestore_flat_done(), libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_postgres_done(), libgnunet_plugin_namestore_postgres_init(), libgnunet_plugin_namestore_sqlite_done(), libgnunet_plugin_namestore_sqlite_init(), and run().
enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::store_records) (void *cls, const struct GNUNET_IDENTITY_PrivateKey *zone, const char *label, unsigned int rd_count, const struct GNUNET_GNSRECORD_Data *rd) |
Store a record in the datastore for which we are the authority.
Removes any existing record in the same zone with the same name.
cls | closure (internal context for the plugin) |
zone | private key of the zone |
label | name of the record in the zone |
rd_count | number of entries in rd array, 0 to delete all records |
rd | array of records with data to store |
Definition at line 79 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::lookup_records) (void *cls, const struct GNUNET_IDENTITY_PrivateKey *zone, const char *label, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) |
Lookup records in the datastore for which we are the authority.
cls | closure (internal context for the plugin) |
zone | private key of the zone |
label | name of the record in the zone |
iter | function to call with the result |
iter_cls | closure for iter |
Definition at line 79 of file gnunet_namestore_plugin.h.
Referenced by get_nick_record(), libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::iterate_records) (void *cls, const struct GNUNET_IDENTITY_PrivateKey *zone, uint64_t serial, uint64_t limit, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) |
Iterate over the results for a particular zone in the datastore.
Will return at most limit results to the iterator.
cls | closure (internal context for the plugin) |
zone | private key of the zone, NULL for all zones |
serial | serial (to exclude) in the list of matching records; 0 means to exclude nothing; results must be returned using the minimum possible sequence number first (ordered by serial) |
limit | maximum number of results to return to iter |
iter | function to call with the result |
iter_cls | closure for iter |
Definition at line 79 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::zone_to_name) (void *cls, const struct GNUNET_IDENTITY_PrivateKey *zone, const struct GNUNET_IDENTITY_PublicKey *value_zone, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) |
Look for an existing PKEY delegation record for a given public key.
Returns at most one result to the iterator.
cls | closure (internal context for the plugin) |
zone | private key of the zone to look up in, never NULL |
value_zone | public key of the target zone (value), never NULL |
iter | function to call with the result |
iter_cls | closure for iter |
Definition at line 79 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::transaction_begin) (void *cls, char **emsg) |
Transaction-based API draft.
Start a transaction in the database
cls | closure (internal context for the plugin) |
emsg | message. On error, string will be allocated and must be freed. |
Definition at line 79 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::transaction_rollback) (void *cls, char **emsg) |
Abort and roll back a transaction in the database.
cls | closure (internal context for the plugin) |
emsg | message. On error, string will be allocated and must be freed. |
Definition at line 79 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::transaction_commit) (void *cls, char **emsg) |
Commit a transaction in the database.
cls | closure (internal context for the plugin) |
emsg | message. On error, string will be allocated and must be freed. |
Definition at line 79 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::edit_records) (void *cls, const struct GNUNET_IDENTITY_PrivateKey *zone, const char *label, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls) |
Edit records in the datastore for which we are the authority.
Should be called within a transaction (after begin) and maps to a SELECT ... FOR UPDATE in PQ.
cls | closure (internal context for the plugin) |
zone | private key of the zone |
label | name of the record in the zone |
iter | function to call with the result |
iter_cls | closure for iter |
Definition at line 79 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::create_tables) (void *cls) |
Setup the database.
cls | closure (internal context for the plugin) |
Definition at line 79 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().
enum GNUNET_GenericReturnValue(* GNUNET_NAMESTORE_PluginFunctions::drop_tables) (void *cls) |
Drop existing tables.
DANGEROUS: All existing data in the dabase will be lost!
cls | closure (internal context for the plugin) |
Definition at line 79 of file gnunet_namestore_plugin.h.
Referenced by libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().