UNPKG

@sap/cds-dk

Version:

Command line client and development toolkit for the SAP Cloud Application Programming Model

60 lines (52 loc) 1.79 kB
/* eslint-disable no-unused-vars */ module.exports = class BindPlugin { /** * The product name used in the command line logs * @returns {string} The display name */ displayName() { throw new Error('displayName not implemented') } /** * Returns a description for the given binding * @param {Object} binding - The binding configuration object * @returns {string} A description of the binding */ description4(_binding) { throw new Error('description4 not implemented') } /** * Parses the [service]:[key] string into a binding configuration object * @param {string} service - The passed service instance name * @returns {Object} The parsed binding configuration */ binding4(_service) { throw new Error('binding4 not implemented') } /** * Returns a description for the given binding * @param {Object} binding - The binding configuration object * @param {Object} services – Service candidates * @returns {string} The name of the service matching the binding */ service4(_binding, _services) { throw new Error('credentials4 not implemented') } /** * Returns the services for the given app * @param {string} app - The name of the app * @returns {Promise<Array>} A promise that resolves to an array of bound service names */ services4(_app) { throw new Error('services4 not implemented') } /** * Resolves the binding configuration for the given service name * @param {string} name - The name of the service * @param {Object} binding - The binding configuration object * @returns {Promise<{binding: Object, credentials: Object}>} A promise that resolves to the resolved binding */ async resolve(_name, _binding) { throw new Error('resolve not implemented') } }