2016-10-07 13:22:39 -07:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
|
|
// -------------------------------------------
|
|
|
|
|
// This file just describes the interface
|
|
|
|
|
//
|
|
|
|
|
// New backends can start from here
|
|
|
|
|
// -------------------------------------------
|
|
|
|
|
|
|
|
|
|
exports = module.exports = {
|
2019-10-29 20:08:45 -07:00
|
|
|
getServerIp,
|
|
|
|
|
testConfig
|
2016-10-07 13:22:39 -07:00
|
|
|
};
|
|
|
|
|
|
2019-12-04 10:23:16 -08:00
|
|
|
var assert = require('assert'),
|
|
|
|
|
BoxError = require('../boxerror.js');
|
2016-10-07 13:22:39 -07:00
|
|
|
|
2019-10-29 15:46:33 -07:00
|
|
|
function getServerIp(config, callback) {
|
2019-12-04 10:23:16 -08:00
|
|
|
assert.strictEqual(typeof config, 'object');
|
2016-10-07 13:22:39 -07:00
|
|
|
assert.strictEqual(typeof callback, 'function');
|
|
|
|
|
|
2019-12-04 10:23:16 -08:00
|
|
|
callback(new BoxError(BoxError.NOT_IMPLEMENTED, 'testConfig is not implemented'));
|
2016-10-07 13:22:39 -07:00
|
|
|
}
|
|
|
|
|
|
2019-10-29 20:08:45 -07:00
|
|
|
function testConfig(config, callback) {
|
|
|
|
|
assert.strictEqual(typeof config, 'object');
|
|
|
|
|
assert.strictEqual(typeof callback, 'function');
|
|
|
|
|
|
|
|
|
|
callback(null);
|
|
|
|
|
}
|