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 = {
|
2022-01-05 18:07:36 -08:00
|
|
|
getServerIPv4,
|
|
|
|
|
getServerIPv6,
|
2022-02-15 12:31:55 -08:00
|
|
|
testIPv4Config,
|
|
|
|
|
testIPv6Config
|
2016-10-07 13:22:39 -07:00
|
|
|
};
|
|
|
|
|
|
2022-01-05 18:07:36 -08:00
|
|
|
const assert = require('assert'),
|
2019-12-04 10:23:16 -08:00
|
|
|
BoxError = require('../boxerror.js');
|
2016-10-07 13:22:39 -07:00
|
|
|
|
2022-01-05 18:07:36 -08:00
|
|
|
async function getServerIPv4(config) {
|
2019-12-04 10:23:16 -08:00
|
|
|
assert.strictEqual(typeof config, 'object');
|
2016-10-07 13:22:39 -07:00
|
|
|
|
2022-01-05 18:07:36 -08:00
|
|
|
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'getServerIPv4 is not implemented');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function getServerIPv6(config) {
|
|
|
|
|
assert.strictEqual(typeof config, 'object');
|
|
|
|
|
|
|
|
|
|
throw new BoxError(BoxError.NOT_IMPLEMENTED, 'getServerIPv6 is not implemented');
|
2016-10-07 13:22:39 -07:00
|
|
|
}
|
|
|
|
|
|
2022-02-15 12:31:55 -08:00
|
|
|
async function testIPv4Config(config) {
|
|
|
|
|
assert.strictEqual(typeof config, 'object');
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
async function testIPv6Config(config) {
|
2019-10-29 20:08:45 -07:00
|
|
|
assert.strictEqual(typeof config, 'object');
|
|
|
|
|
|
2021-08-27 09:52:24 -07:00
|
|
|
return null;
|
2019-10-29 20:08:45 -07:00
|
|
|
}
|