Add filesystem storage backend only as noop currently

This commit is contained in:
Johannes Zellner
2016-09-15 11:29:45 +02:00
parent 982caee380
commit 1736d50260
2 changed files with 47 additions and 0 deletions

45
src/storage/filesystem.js Normal file
View File

@@ -0,0 +1,45 @@
'use strict';
exports = module.exports = {
getRestoreUrl: getRestoreUrl,
copyObject: copyObject,
getAllPaged: getAllPaged,
getBackupCredentials: getBackupCredentials
};
var assert = require('assert');
function getBackupCredentials(apiConfig, callback) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof callback, 'function');
callback(null, {});
}
function getAllPaged(apiConfig, page, perPage, callback) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof page, 'number');
assert.strictEqual(typeof perPage, 'number');
assert.strictEqual(typeof callback, 'function');
return callback(null, []);
}
function getRestoreUrl(apiConfig, filename, callback) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof filename, 'string');
assert.strictEqual(typeof callback, 'function');
callback(null, { url: '' });
}
function copyObject(apiConfig, from, to, callback) {
assert.strictEqual(typeof apiConfig, 'object');
assert.strictEqual(typeof from, 'string');
assert.strictEqual(typeof to, 'string');
assert.strictEqual(typeof callback, 'function');
callback(null);
}