Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
tests
.travis.yml
README.md
index.js
package.json

README.md

node-pgp-postgres is a PostgreSQL backend for node-pgp. It provides an implementation of the Keyring class that stores keys in database tables.

Use the following code to create an instance of the Keyring class:

var pgpPg = require("node-pgp-postgres");
pgpPg.getKeyring("postgres://postgres@localhost/database", function(err, keyring) {
    if(err)
        ; // An error occurred

    // Now we do some stuff with the keyring

    // Once we are finished, we release the database connection:
    keyring.done();
}, true); // If the last parameter is set to true, the database layout will be initialised automatically

The connection string uses the format of node-postgres. It may also be specified as an object of the following format:

{
    user: "postgres",
    password: "password",
    host: "localhost",
    port: 1234,
    database: "database",
    schema: "public"
}
Something went wrong with that request. Please try again.