Module tor_dirmgr::storage::sqlite

source Β·
Expand description

Net document storage backed by sqlite3.

We store most objects in sqlite tables, except for very large ones, which we store as β€œblob” files in a separate directory.

Structs§

  • BridgeConfig πŸ”’ bridge-client
    A relay not listed on the main tor network, used for anticensorship.
  • SavedBlobHandle πŸ”’
    Handle to a blob that we have saved to disk but not yet committed to the database.
  • SqliteStore πŸ”’
    Local directory cache using a Sqlite3 connection.
  • Unlinker πŸ”’
    Handle to a file which we might have to delete.

Constants§

  • DELETE_BRIDGEDESC πŸ”’ bridge-client
    Query: Remove a cached bridge descriptor
  • Query: Discard every expired authority certificate.
  • DROP_OLD_BRIDGEDESCS πŸ”’ bridge-client
    Query: Discard every bridge descriptor that is too old, or from the future. (Both ?=now.)
  • Query: Discard every consensus that’s been expired for at least two days.
  • DROP_OLD_EXTDOCS πŸ”’
    Query: Discard every expired extdoc.
  • Query: Discard every microdescriptor that hasn’t been listed for 3 months.
  • Query: Discard every router descriptor that hasn’t been listed for 3 months.
  • FIND_AUTHCERT πŸ”’
    Query: Find the authority certificate with given key digests.
  • FIND_BRIDGEDESC πŸ”’ bridge-client
    Query: Find a cached bridge descriptor
  • FIND_CONSENSUS πŸ”’
    Query: find the latest-expiring microdesc consensus, regardless of pending status.
  • Look up a consensus by its digest-of-signed-part string.
  • FIND_CONSENSUS_P πŸ”’
    Query: find the latest-expiring microdesc consensus with a given pending status.
  • Query: find every ExtDocs member that has expired.
  • Query: Find the valid-after time for the latest-expiring non-pending consensus of a given flavor.
  • FIND_MD πŸ”’
    Query: find the microdescriptor with a given hex-encoded sha256 digest
  • FIND_RD πŸ”’ routerdesc
    Query: find the router descriptors with a given hex-encoded sha1 digest
  • INSERT_AUTHCERT πŸ”’
    Query: Add a new AuthCert
  • INSERT_BRIDGEDESC πŸ”’ bridge-client
    Query: Record a cached bridge descriptor
  • INSERT_CONSENSUS πŸ”’
    Query: Add a new consensus.
  • INSERT_EXTDOC πŸ”’
    Query: Add a new entry to ExtDocs.
  • INSERT_MD πŸ”’
    Query: Add a new microdescriptor
  • INSERT_RD πŸ”’ routerdesc
    Query: Add a new router descriptor
  • Set up the tables for the arti cache schema in a sqlite database.
  • Query: Update the consensus whose digest field is β€˜digest’ to call it no longer pending.
  • REMOVE_CONSENSUS πŸ”’
    Query: Remove the consensus with a given digest field.
  • SCHEMA_VERSION πŸ”’
    Version number used for this version of the arti cache schema.
  • UPDATE_MD_LISTED πŸ”’
    Query: Change the time when a given microdescriptor was last listed.
  • UPDATE_SCHEMA πŸ”’
    Update the database schema, from each version to the next
  • Update the database schema version tracking, from each version to the next

Functions§

  • cmeta_from_row πŸ”’
    Create a ConsensusMeta from a Row returned by one of FIND_LATEST_CONSENSUS_META or FIND_CONSENSUS_AND_META_BY_DIGEST.
  • digest_from_dstr πŸ”’
    Convert a hexadecimal sha3-256 β€œdigest string” as used in the digest column from the database into an array.
  • digest_from_hex πŸ”’
    Convert a hexadecimal sha3-256 digest from the database into an array.