0.1.0 • Published 7 years ago

nbp-adapter-google-datastore v0.1.0

Weekly downloads
2
License
ISC
Repository
github
Last release
7 years ago

Google Datastore adapter

import googleDatastoreAdapterFactory from 'nbp-adapter-google-datastore';
const datastoreAdapter = googleDatastoreAdapterFactory({
    platform: 'name-of-your-platform',
    projectId: 'google-project-id',
    keyFilename: 'path-to-your-keys-json',
    logger: 'your logger instance'
});

Then you can get a namespaced datastore instance by passing entryId (can be a FB Page ID for example) and senderId (this is user ID):

const datastore = datastoreAdapter({
   entryId: 'fb-page-id',
   senderId: 'user-id'
});

datastore is a usual datastore instance. So you can check docs.

Tunneling

Check tunneling.js. To bind context of all client's function we need to perform tunneling on each request, so inside skills you can do memcached.set('key', 'Some text) without specifying application tokens, with suffixes (platform.entryId.senderId.key) for keys.

Look at router-builder.js as an example.

0.1.0

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

8 years ago

0.0.1

8 years ago