Add new storage.removeBackup() api

This currently is only used in the filesystem backend,
but may be expanded to also cleanup S3 in the future
This commit is contained in:
Johannes Zellner
2016-10-10 15:04:28 +02:00
parent bceeb092bf
commit 1b3ae1f178
5 changed files with 70 additions and 5 deletions

View File

@@ -14,7 +14,8 @@ exports = module.exports = {
getAppRestoreConfig: getAppRestoreConfig,
getLocalFilePath: getLocalFilePath,
copyObject: copyObject
copyObject: copyObject,
removeBackup: removeBackup
};
var assert = require('assert');
@@ -88,3 +89,13 @@ function copyObject(apiConfig, from, to, callback) {
callback(new Error('not implemented'));
}
function removeBackup(apiConfig, backupId, callback) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof backupId, 'string');
assert.strictEqual(typeof callback, 'function');
// Result: none
callback(new Error('not implemented'));
}