linx-simulator2/node_modules/protobufjs/tests/services.js

39 lines
1.2 KiB
JavaScript
Raw Normal View History

2019-09-18 08:11:16 +00:00
var root = require("..").newBuilder({
"convertFieldsToCamelCase": true,
"populateAccessors": false
})['import']({
"package": "my.namespace",
"messages": [
{
"name": "something",
"fields": [],
"messages": [
{
"name": "v1",
"fields": [],
"messages": [
{
"name": "GetRequest",
"fields": []
},
{
"name": "GetResponse",
"fields": []
}
],
"enums": [],
"services": [{
"name": "SomeService",
"rpc": {
"get": {
"request": "GetRequest",
"response": "GetResponse"
}
}
}]
}
]
}
]
}).build();
console.log(require("util").inspect(root, { depth: 10}));