backend.globaleaks.db

Package Contents

Functions

get_db_file(db_path) Utility function to retrieve the database file path
create_db() Utility function to create a new database
init_db(session) Transaction for initializing the application database
update_db() This function handles the update of an existing database
db_get_tracked_files(session) Transaction for retrieving the list of attachment files tracked by the application database
sync_clean_untracked_files(session) Transaction for removing files that are not tracked by the application database
sync_initialize_snimap(session) Transaction for loading TLS certificates and initialize the SNI map
db_set_cache_exception_delivery_list(session, tenant_cache) Constructs and sets a list of (email_addr, public_key) pairs
db_refresh_tenant_cache(session, tid_list) This routine loads in memory few variables of node and notification tables
db_refresh_memory_variables(session, to_refresh=None)
refresh_memory_variables(session, to_refresh=None)
sync_refresh_memory_variables(session, to_refresh=None)
backend.globaleaks.db.get_db_file(db_path)[source]

Utility function to retrieve the database file path :param db_path: The path where to look for the database file :return: The version and the path of the existing database file

backend.globaleaks.db.create_db()[source]

Utility function to create a new database

backend.globaleaks.db.init_db(session)[source]

Transaction for initializing the application database :param session: An ORM session

backend.globaleaks.db.update_db()[source]

This function handles the update of an existing database :return: The database version

backend.globaleaks.db.db_get_tracked_files(session)[source]

Transaction for retrieving the list of attachment files tracked by the application database :param session: An ORM session :return: The list of filenames of the attachment files

backend.globaleaks.db.sync_clean_untracked_files(session)[source]

Transaction for removing files that are not tracked by the application database :param session: An ORM session

backend.globaleaks.db.sync_initialize_snimap(session)[source]

Transaction for loading TLS certificates and initialize the SNI map :param session: An ORM session

backend.globaleaks.db.db_set_cache_exception_delivery_list(session, tenant_cache)[source]

Constructs and sets a list of (email_addr, public_key) pairs that will receive errors from the platform.

backend.globaleaks.db.db_refresh_tenant_cache(session, tid_list)[source]

This routine loads in memory few variables of node and notification tables that are subject to high usage.

backend.globaleaks.db.db_refresh_memory_variables(session, to_refresh=None)[source]
backend.globaleaks.db.refresh_memory_variables(session, to_refresh=None)[source]
backend.globaleaks.db.sync_refresh_memory_variables(session, to_refresh=None)[source]