GNUnet  0.11.x
Data Fields
GNUNET_NAMESTORE_PluginFunctions Struct Reference

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...
 
int(* store_records )(void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *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...
 
int(* lookup_records )(void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, const char *label, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls)
 Lookup records in the datastore for which we are the authority. More...
 
int(* iterate_records )(void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *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...
 
int(* zone_to_name )(void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, const struct GNUNET_CRYPTO_EcdsaPublicKey *value_zone, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls)
 Look for an existing PKEY delegation record for a given public key. More...
 

Detailed Description

struct returned by the initialization function of the plugin

Definition at line 70 of file gnunet_namestore_plugin.h.

Field Documentation

◆ cls

void* GNUNET_NAMESTORE_PluginFunctions::cls

◆ store_records

int(* GNUNET_NAMESTORE_PluginFunctions::store_records) (void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *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.

Parameters
clsclosure (internal context for the plugin)
zoneprivate key of the zone
labelname of the record in the zone
rd_countnumber of entries in rd array, 0 to delete all records
rdarray of records with data to store
Returns
GNUNET_OK on success, else GNUNET_SYSERR

Definition at line 89 of file gnunet_namestore_plugin.h.

Referenced by handle_record_store(), libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().

◆ lookup_records

int(* GNUNET_NAMESTORE_PluginFunctions::lookup_records) (void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, const char *label, GNUNET_NAMESTORE_RecordIterator iter, void *iter_cls)

Lookup records in the datastore for which we are the authority.

Parameters
clsclosure (internal context for the plugin)
zoneprivate key of the zone
labelname of the record in the zone
iterfunction to call with the result
iter_clsclosure for iter
Returns
GNUNET_OK on success, GNUNET_NO for no results, else GNUNET_SYSERR

Definition at line 106 of file gnunet_namestore_plugin.h.

Referenced by get_nick_record(), handle_record_lookup(), handle_record_store(), libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().

◆ iterate_records

int(* GNUNET_NAMESTORE_PluginFunctions::iterate_records) (void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *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.

Parameters
clsclosure (internal context for the plugin)
zoneprivate key of the zone, NULL for all zones
serialserial (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)
limitmaximum number of results to return to iter
iterfunction to call with the result
iter_clsclosure for iter
Returns
GNUNET_OK on success, GNUNET_NO if there were no more results, GNUNET_SYSERR on error

Definition at line 128 of file gnunet_namestore_plugin.h.

Referenced by libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_postgres_init(), libgnunet_plugin_namestore_sqlite_init(), monitor_iteration_next(), and run_zone_iteration_round().

◆ zone_to_name

int(* GNUNET_NAMESTORE_PluginFunctions::zone_to_name) (void *cls, const struct GNUNET_CRYPTO_EcdsaPrivateKey *zone, const struct GNUNET_CRYPTO_EcdsaPublicKey *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.

Parameters
clsclosure (internal context for the plugin)
zoneprivate key of the zone to look up in, never NULL
value_zonepublic key of the target zone (value), never NULL
iterfunction to call with the result
iter_clsclosure for iter
Returns
GNUNET_OK on success, GNUNET_NO if there were no results, GNUNET_SYSERR on error

Definition at line 148 of file gnunet_namestore_plugin.h.

Referenced by handle_zone_to_name(), libgnunet_plugin_namestore_flat_init(), libgnunet_plugin_namestore_postgres_init(), and libgnunet_plugin_namestore_sqlite_init().


The documentation for this struct was generated from the following file: