Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
//
// Autogenerated by Thrift Compiler (0.8.0)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
var Thrift = require('thrift').Thrift;
var ttypes = require('./flowservices_types');
//HELPER FUNCTIONS AND STRUCTURES
var FARService_init_args = function(args) {
this.token = null;
this.info = null;
if (args) {
if (args.token !== undefined) {
this.token = args.token;
}
if (args.info !== undefined) {
this.info = args.info;
}
}
};
//
// Autogenerated by Thrift Compiler (0.8.0)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
var Thrift = require('thrift').Thrift;
var ttypes = module.exports = {};
var Account = module.exports.Account = function(args) {
this.id = null;
if (args) {
if (args.id !== undefined) {
this.id = args.id;
}
}
};
Account.prototype = {};
Account.prototype.read = function(input) {
input.readStructBegin();
while (true)
{
var ret = input.readFieldBegin();
var fname = ret.fname;
//
// Autogenerated by Thrift Compiler (0.9.1)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
var Thrift = require('thrift').Thrift;
var ttypes = module.exports = {};
ttypes.ConsistencyLevel = {
'ONE' : 1,
'QUORUM' : 2,
'LOCAL_QUORUM' : 3,
'EACH_QUORUM' : 4,
'ALL' : 5,
'ANY' : 6,
'TWO' : 7,
'THREE' : 8,
'SERIAL' : 9,
'LOCAL_SERIAL' : 10,
'LOCAL_ONE' : 11
};
ttypes.IndexOperator = {
//
// Autogenerated by Thrift Compiler (0.9.0)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
var Thrift = require('thrift').Thrift;
var ttypes = module.exports = {};
ttypes.EDAM_ATTRIBUTE_LEN_MIN = 1;
ttypes.EDAM_ATTRIBUTE_LEN_MAX = 4096;
ttypes.EDAM_ATTRIBUTE_REGEX = '^[^\p{Cc}\p{Zl}\p{Zp}]{1,4096}$';
ttypes.EDAM_ATTRIBUTE_LIST_MAX = 100;
ttypes.EDAM_ATTRIBUTE_MAP_MAX = 100;
ttypes.EDAM_GUID_LEN_MIN = 36;
ttypes.EDAM_GUID_LEN_MAX = 36;
ttypes.EDAM_GUID_REGEX = '^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$';
ttypes.EDAM_EMAIL_LEN_MIN = 6;
ttypes.EDAM_EMAIL_LEN_MAX = 255;
ttypes.EDAM_EMAIL_LOCAL_REGEX = "^[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*$";
ttypes.EDAM_EMAIL_DOMAIN_REGEX = '^[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.([A-Za-z]{2,})$';
ttypes.EDAM_EMAIL_REGEX = "^[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.([A-Za-z]{2,})$";
ttypes.EDAM_VAT_REGEX = '[A-Za-z]{2}.+';
ttypes.EDAM_TIMEZONE_LEN_MIN = 1;
//
// Autogenerated by Thrift Compiler (0.8.0)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
var Thrift = require('thrift').Thrift;
var ttypes = module.exports = {};
var NotAuthorizedException = module.exports.NotAuthorizedException = function(args) {
Thrift.TException.call(this, "NotAuthorizedException")
this.name = "NotAuthorizedException"
this.message = null;
if (args) {
if (args.message !== undefined) {
this.message = args.message;
}
}
};
Thrift.inherits(NotAuthorizedException, Thrift.TException);
NotAuthorizedException.prototype.name = 'NotAuthorizedException';
NotAuthorizedException.prototype.read = function(input) {
input.readStructBegin();
while (true)
//
// Autogenerated by Thrift Compiler (1.0.0-dev)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
"use strict";
var thrift = require('thrift');
var Thrift = thrift.Thrift;
var Q = thrift.Q;
var ttypes = module.exports = {};
ttypes.Type = {
'BOOLEAN' : 0,
'INT32' : 1,
'INT64' : 2,
'INT96' : 3,
'FLOAT' : 4,
'DOUBLE' : 5,
'BYTE_ARRAY' : 6,
'FIXED_LEN_BYTE_ARRAY' : 7
};
ttypes.ConvertedType = {
'UTF8' : 0,
//
// Autogenerated by Thrift Compiler (0.12.0)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
"use strict";
const buffer = require('buffer');
const Buffer = buffer.Buffer;
const thrift = require('thrift');
const Thrift = thrift.Thrift;
const data_ttypes = require('./data_types');
const shared_ttypes = require('./shared_types');
const exceptions_ttypes = require('./exceptions_types');
const complex_ttypes = require('./complex_types');
const ttypes = module.exports = {};
ttypes.VERSION = '0.10.0';
ttypes.NULL = new data_ttypes.TObject({
'data' : Buffer.alloc(0),
'type' : 9
});
ttypes.JSON_RESERVED_IDENTIFIER_NAME = '$id$';
//
// Autogenerated by Thrift Compiler (0.9.0)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
var Thrift = require('thrift').Thrift;
var Types_ttypes = require('./Types_types')
var Errors_ttypes = require('./Errors_types')
var ttypes = require('./UserStore_types');
//HELPER FUNCTIONS AND STRUCTURES
UserStore_checkVersion_args = function(args) {
this.clientName = null;
this.edamVersionMajor = 1;
this.edamVersionMinor = 23;
if (args) {
if (args.clientName !== undefined) {
this.clientName = args.clientName;
}
if (args.edamVersionMajor !== undefined) {
//
// Autogenerated by Thrift Compiler (0.8.0)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
var Thrift = require('thrift').Thrift;
var ttypes = module.exports = {};
ttypes.EntityType = {
'FLOW' : 0,
'QUERY' : 1
};
var NotAuthorizedException = module.exports.NotAuthorizedException = function(args) {
Thrift.TException.call(this, "NotAuthorizedException")
this.name = "NotAuthorizedException"
this.message = null;
if (args) {
if (args.message !== undefined) {
this.message = args.message;
}
}
};
Thrift.inherits(NotAuthorizedException, Thrift.TException);
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* 'License'); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
var thrift = require('thrift');
var Thrift = thrift.Thrift;
var ttransport = require('transport');
var ThriftTest = require('./gen-nodejs/ThriftTest'),
ttypes = require('./gen-nodejs/ThriftTest_types');
var server = thrift.createServer(ThriftTest, {
testVoid: function(result) {
console.log('testVoid()');
result(null);
},
testString: function(thing, result) {
console.log('testString(\'' + thing + '\')');
result(null, thing);
},