UNPKG

driver-interface

Version:

Standardized interface for common functionality, expressed in layers. Covers communication with databases, hardware, web services, and more.

68 lines (47 loc) 1.77 kB
module.exports = { friendlyName: 'Get cached value', description: 'Look up the cached value associated with the specified key.', sideEffects: 'cacheable', inputs: { connection: { friendlyName: 'Connection', description: 'An active connection.', extendedDescription: 'The provided connection instance must still be active. Only connection instances created by the `getConnection()` machine in the same driver are supported.', example: '===', required: true }, key: { friendlyName: 'Key', description: 'The unique key to look up.', extendedDescription: 'The case-sensitivity and allowable characters in keys may vary between drivers.', required: true, example: 'myNamespace.foo.bar_baz' }, meta: { friendlyName: 'Meta (custom)', description: 'Additional metadata to pass to the driver.', extendedDescription: 'This input is not currently in use, but is reserved for driver-specific customizations in the future.', example: '===' } }, exits: { success: { description: 'Value was successfully fetched.', outputVariableName: 'report', outputDescription: 'The `value` property is the cached value that was just retrieved. The `meta` property is reserved for custom driver-specific extensions.', outputExample: { value: '*', meta: '===' } }, notFound: { description: 'No value exists under the specified key.', outputVariableName: 'report', outputDescription: 'The `meta` property is reserved for custom driver-specific extensions.', outputExample: { meta: '===' } }, badConnection: require('../../constants/badConnection.exit') } };