protobuf-platform 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/config.proto +6 -2
- package/config/config_grpc_pb.js +22 -0
- package/config/config_pb.js +184 -14
- package/package.json +1 -1
package/config/config.proto
CHANGED
@@ -8,6 +8,7 @@ service Config {
|
|
8
8
|
rpc getConfigSettings(SettingsRequest) returns (SettingsResponse);
|
9
9
|
//Set config for particular customer
|
10
10
|
rpc setConfig(ConfigRequest) returns (ConfigStatusResponse);
|
11
|
+
rpc getConfig(ConfigRequest) returns (ConfigDataResponse);
|
11
12
|
}
|
12
13
|
|
13
14
|
message PingRequest { string ping = 1; }
|
@@ -28,9 +29,12 @@ message SettingsResponse {
|
|
28
29
|
message ConfigRequest {
|
29
30
|
string environment = 1;
|
30
31
|
string customer = 2;
|
31
|
-
string
|
32
|
-
string
|
32
|
+
string service_key = 3;
|
33
|
+
optional string service_data = 4;
|
33
34
|
}
|
34
35
|
message ConfigStatusResponse {
|
35
36
|
string status = 1;
|
37
|
+
}
|
38
|
+
message ConfigDataResponse {
|
39
|
+
string data = 1;
|
36
40
|
}
|
package/config/config_grpc_pb.js
CHANGED
@@ -4,6 +4,17 @@
|
|
4
4
|
var grpc = require('@grpc/grpc-js');
|
5
5
|
var config_pb = require('./config_pb.js');
|
6
6
|
|
7
|
+
function serialize_config_ConfigDataResponse(arg) {
|
8
|
+
if (!(arg instanceof config_pb.ConfigDataResponse)) {
|
9
|
+
throw new Error('Expected argument of type config.ConfigDataResponse');
|
10
|
+
}
|
11
|
+
return Buffer.from(arg.serializeBinary());
|
12
|
+
}
|
13
|
+
|
14
|
+
function deserialize_config_ConfigDataResponse(buffer_arg) {
|
15
|
+
return config_pb.ConfigDataResponse.deserializeBinary(new Uint8Array(buffer_arg));
|
16
|
+
}
|
17
|
+
|
7
18
|
function serialize_config_ConfigRequest(arg) {
|
8
19
|
if (!(arg instanceof config_pb.ConfigRequest)) {
|
9
20
|
throw new Error('Expected argument of type config.ConfigRequest');
|
@@ -107,6 +118,17 @@ setConfig: {
|
|
107
118
|
responseSerialize: serialize_config_ConfigStatusResponse,
|
108
119
|
responseDeserialize: deserialize_config_ConfigStatusResponse,
|
109
120
|
},
|
121
|
+
getConfig: {
|
122
|
+
path: '/config.Config/getConfig',
|
123
|
+
requestStream: false,
|
124
|
+
responseStream: false,
|
125
|
+
requestType: config_pb.ConfigRequest,
|
126
|
+
responseType: config_pb.ConfigDataResponse,
|
127
|
+
requestSerialize: serialize_config_ConfigRequest,
|
128
|
+
requestDeserialize: deserialize_config_ConfigRequest,
|
129
|
+
responseSerialize: serialize_config_ConfigDataResponse,
|
130
|
+
responseDeserialize: deserialize_config_ConfigDataResponse,
|
131
|
+
},
|
110
132
|
};
|
111
133
|
|
112
134
|
exports.ConfigClient = grpc.makeGenericClientConstructor(ConfigService);
|
package/config/config_pb.js
CHANGED
@@ -21,6 +21,7 @@ var global = (function() {
|
|
21
21
|
return Function('return this')();
|
22
22
|
}.call(null));
|
23
23
|
|
24
|
+
goog.exportSymbol('proto.config.ConfigDataResponse', null, global);
|
24
25
|
goog.exportSymbol('proto.config.ConfigRequest', null, global);
|
25
26
|
goog.exportSymbol('proto.config.ConfigStatusResponse', null, global);
|
26
27
|
goog.exportSymbol('proto.config.PingRequest', null, global);
|
@@ -153,6 +154,27 @@ if (goog.DEBUG && !COMPILED) {
|
|
153
154
|
*/
|
154
155
|
proto.config.ConfigStatusResponse.displayName = 'proto.config.ConfigStatusResponse';
|
155
156
|
}
|
157
|
+
/**
|
158
|
+
* Generated by JsPbCodeGenerator.
|
159
|
+
* @param {Array=} opt_data Optional initial data array, typically from a
|
160
|
+
* server response, or constructed directly in Javascript. The array is used
|
161
|
+
* in place and becomes part of the constructed object. It is not cloned.
|
162
|
+
* If no data is provided, the constructed object will be empty, but still
|
163
|
+
* valid.
|
164
|
+
* @extends {jspb.Message}
|
165
|
+
* @constructor
|
166
|
+
*/
|
167
|
+
proto.config.ConfigDataResponse = function(opt_data) {
|
168
|
+
jspb.Message.initialize(this, opt_data, 0, -1, null, null);
|
169
|
+
};
|
170
|
+
goog.inherits(proto.config.ConfigDataResponse, jspb.Message);
|
171
|
+
if (goog.DEBUG && !COMPILED) {
|
172
|
+
/**
|
173
|
+
* @public
|
174
|
+
* @override
|
175
|
+
*/
|
176
|
+
proto.config.ConfigDataResponse.displayName = 'proto.config.ConfigDataResponse';
|
177
|
+
}
|
156
178
|
|
157
179
|
|
158
180
|
|
@@ -899,8 +921,8 @@ proto.config.ConfigRequest.toObject = function(includeInstance, msg) {
|
|
899
921
|
var f, obj = {
|
900
922
|
environment: jspb.Message.getFieldWithDefault(msg, 1, ""),
|
901
923
|
customer: jspb.Message.getFieldWithDefault(msg, 2, ""),
|
902
|
-
|
903
|
-
|
924
|
+
serviceKey: jspb.Message.getFieldWithDefault(msg, 3, ""),
|
925
|
+
serviceData: jspb.Message.getFieldWithDefault(msg, 4, "")
|
904
926
|
};
|
905
927
|
|
906
928
|
if (includeInstance) {
|
@@ -947,11 +969,11 @@ proto.config.ConfigRequest.deserializeBinaryFromReader = function(msg, reader) {
|
|
947
969
|
break;
|
948
970
|
case 3:
|
949
971
|
var value = /** @type {string} */ (reader.readString());
|
950
|
-
msg.
|
972
|
+
msg.setServiceKey(value);
|
951
973
|
break;
|
952
974
|
case 4:
|
953
975
|
var value = /** @type {string} */ (reader.readString());
|
954
|
-
msg.
|
976
|
+
msg.setServiceData(value);
|
955
977
|
break;
|
956
978
|
default:
|
957
979
|
reader.skipField();
|
@@ -996,15 +1018,15 @@ proto.config.ConfigRequest.serializeBinaryToWriter = function(message, writer) {
|
|
996
1018
|
f
|
997
1019
|
);
|
998
1020
|
}
|
999
|
-
f = message.
|
1021
|
+
f = message.getServiceKey();
|
1000
1022
|
if (f.length > 0) {
|
1001
1023
|
writer.writeString(
|
1002
1024
|
3,
|
1003
1025
|
f
|
1004
1026
|
);
|
1005
1027
|
}
|
1006
|
-
f =
|
1007
|
-
if (f
|
1028
|
+
f = /** @type {string} */ (jspb.Message.getField(message, 4));
|
1029
|
+
if (f != null) {
|
1008
1030
|
writer.writeString(
|
1009
1031
|
4,
|
1010
1032
|
f
|
@@ -1050,10 +1072,10 @@ proto.config.ConfigRequest.prototype.setCustomer = function(value) {
|
|
1050
1072
|
|
1051
1073
|
|
1052
1074
|
/**
|
1053
|
-
* optional string
|
1075
|
+
* optional string service_key = 3;
|
1054
1076
|
* @return {string}
|
1055
1077
|
*/
|
1056
|
-
proto.config.ConfigRequest.prototype.
|
1078
|
+
proto.config.ConfigRequest.prototype.getServiceKey = function() {
|
1057
1079
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, ""));
|
1058
1080
|
};
|
1059
1081
|
|
@@ -1062,16 +1084,16 @@ proto.config.ConfigRequest.prototype.getServicekey = function() {
|
|
1062
1084
|
* @param {string} value
|
1063
1085
|
* @return {!proto.config.ConfigRequest} returns this
|
1064
1086
|
*/
|
1065
|
-
proto.config.ConfigRequest.prototype.
|
1087
|
+
proto.config.ConfigRequest.prototype.setServiceKey = function(value) {
|
1066
1088
|
return jspb.Message.setProto3StringField(this, 3, value);
|
1067
1089
|
};
|
1068
1090
|
|
1069
1091
|
|
1070
1092
|
/**
|
1071
|
-
* optional string
|
1093
|
+
* optional string service_data = 4;
|
1072
1094
|
* @return {string}
|
1073
1095
|
*/
|
1074
|
-
proto.config.ConfigRequest.prototype.
|
1096
|
+
proto.config.ConfigRequest.prototype.getServiceData = function() {
|
1075
1097
|
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, ""));
|
1076
1098
|
};
|
1077
1099
|
|
@@ -1080,8 +1102,26 @@ proto.config.ConfigRequest.prototype.getServicedata = function() {
|
|
1080
1102
|
* @param {string} value
|
1081
1103
|
* @return {!proto.config.ConfigRequest} returns this
|
1082
1104
|
*/
|
1083
|
-
proto.config.ConfigRequest.prototype.
|
1084
|
-
return jspb.Message.
|
1105
|
+
proto.config.ConfigRequest.prototype.setServiceData = function(value) {
|
1106
|
+
return jspb.Message.setField(this, 4, value);
|
1107
|
+
};
|
1108
|
+
|
1109
|
+
|
1110
|
+
/**
|
1111
|
+
* Clears the field making it undefined.
|
1112
|
+
* @return {!proto.config.ConfigRequest} returns this
|
1113
|
+
*/
|
1114
|
+
proto.config.ConfigRequest.prototype.clearServiceData = function() {
|
1115
|
+
return jspb.Message.setField(this, 4, undefined);
|
1116
|
+
};
|
1117
|
+
|
1118
|
+
|
1119
|
+
/**
|
1120
|
+
* Returns whether this field is set.
|
1121
|
+
* @return {boolean}
|
1122
|
+
*/
|
1123
|
+
proto.config.ConfigRequest.prototype.hasServiceData = function() {
|
1124
|
+
return jspb.Message.getField(this, 4) != null;
|
1085
1125
|
};
|
1086
1126
|
|
1087
1127
|
|
@@ -1215,4 +1255,134 @@ proto.config.ConfigStatusResponse.prototype.setStatus = function(value) {
|
|
1215
1255
|
};
|
1216
1256
|
|
1217
1257
|
|
1258
|
+
|
1259
|
+
|
1260
|
+
|
1261
|
+
if (jspb.Message.GENERATE_TO_OBJECT) {
|
1262
|
+
/**
|
1263
|
+
* Creates an object representation of this proto.
|
1264
|
+
* Field names that are reserved in JavaScript and will be renamed to pb_name.
|
1265
|
+
* Optional fields that are not set will be set to undefined.
|
1266
|
+
* To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
|
1267
|
+
* For the list of reserved names please see:
|
1268
|
+
* net/proto2/compiler/js/internal/generator.cc#kKeyword.
|
1269
|
+
* @param {boolean=} opt_includeInstance Deprecated. whether to include the
|
1270
|
+
* JSPB instance for transitional soy proto support:
|
1271
|
+
* http://goto/soy-param-migration
|
1272
|
+
* @return {!Object}
|
1273
|
+
*/
|
1274
|
+
proto.config.ConfigDataResponse.prototype.toObject = function(opt_includeInstance) {
|
1275
|
+
return proto.config.ConfigDataResponse.toObject(opt_includeInstance, this);
|
1276
|
+
};
|
1277
|
+
|
1278
|
+
|
1279
|
+
/**
|
1280
|
+
* Static version of the {@see toObject} method.
|
1281
|
+
* @param {boolean|undefined} includeInstance Deprecated. Whether to include
|
1282
|
+
* the JSPB instance for transitional soy proto support:
|
1283
|
+
* http://goto/soy-param-migration
|
1284
|
+
* @param {!proto.config.ConfigDataResponse} msg The msg instance to transform.
|
1285
|
+
* @return {!Object}
|
1286
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1287
|
+
*/
|
1288
|
+
proto.config.ConfigDataResponse.toObject = function(includeInstance, msg) {
|
1289
|
+
var f, obj = {
|
1290
|
+
data: jspb.Message.getFieldWithDefault(msg, 1, "")
|
1291
|
+
};
|
1292
|
+
|
1293
|
+
if (includeInstance) {
|
1294
|
+
obj.$jspbMessageInstance = msg;
|
1295
|
+
}
|
1296
|
+
return obj;
|
1297
|
+
};
|
1298
|
+
}
|
1299
|
+
|
1300
|
+
|
1301
|
+
/**
|
1302
|
+
* Deserializes binary data (in protobuf wire format).
|
1303
|
+
* @param {jspb.ByteSource} bytes The bytes to deserialize.
|
1304
|
+
* @return {!proto.config.ConfigDataResponse}
|
1305
|
+
*/
|
1306
|
+
proto.config.ConfigDataResponse.deserializeBinary = function(bytes) {
|
1307
|
+
var reader = new jspb.BinaryReader(bytes);
|
1308
|
+
var msg = new proto.config.ConfigDataResponse;
|
1309
|
+
return proto.config.ConfigDataResponse.deserializeBinaryFromReader(msg, reader);
|
1310
|
+
};
|
1311
|
+
|
1312
|
+
|
1313
|
+
/**
|
1314
|
+
* Deserializes binary data (in protobuf wire format) from the
|
1315
|
+
* given reader into the given message object.
|
1316
|
+
* @param {!proto.config.ConfigDataResponse} msg The message object to deserialize into.
|
1317
|
+
* @param {!jspb.BinaryReader} reader The BinaryReader to use.
|
1318
|
+
* @return {!proto.config.ConfigDataResponse}
|
1319
|
+
*/
|
1320
|
+
proto.config.ConfigDataResponse.deserializeBinaryFromReader = function(msg, reader) {
|
1321
|
+
while (reader.nextField()) {
|
1322
|
+
if (reader.isEndGroup()) {
|
1323
|
+
break;
|
1324
|
+
}
|
1325
|
+
var field = reader.getFieldNumber();
|
1326
|
+
switch (field) {
|
1327
|
+
case 1:
|
1328
|
+
var value = /** @type {string} */ (reader.readString());
|
1329
|
+
msg.setData(value);
|
1330
|
+
break;
|
1331
|
+
default:
|
1332
|
+
reader.skipField();
|
1333
|
+
break;
|
1334
|
+
}
|
1335
|
+
}
|
1336
|
+
return msg;
|
1337
|
+
};
|
1338
|
+
|
1339
|
+
|
1340
|
+
/**
|
1341
|
+
* Serializes the message to binary data (in protobuf wire format).
|
1342
|
+
* @return {!Uint8Array}
|
1343
|
+
*/
|
1344
|
+
proto.config.ConfigDataResponse.prototype.serializeBinary = function() {
|
1345
|
+
var writer = new jspb.BinaryWriter();
|
1346
|
+
proto.config.ConfigDataResponse.serializeBinaryToWriter(this, writer);
|
1347
|
+
return writer.getResultBuffer();
|
1348
|
+
};
|
1349
|
+
|
1350
|
+
|
1351
|
+
/**
|
1352
|
+
* Serializes the given message to binary data (in protobuf wire
|
1353
|
+
* format), writing to the given BinaryWriter.
|
1354
|
+
* @param {!proto.config.ConfigDataResponse} message
|
1355
|
+
* @param {!jspb.BinaryWriter} writer
|
1356
|
+
* @suppress {unusedLocalVariables} f is only used for nested messages
|
1357
|
+
*/
|
1358
|
+
proto.config.ConfigDataResponse.serializeBinaryToWriter = function(message, writer) {
|
1359
|
+
var f = undefined;
|
1360
|
+
f = message.getData();
|
1361
|
+
if (f.length > 0) {
|
1362
|
+
writer.writeString(
|
1363
|
+
1,
|
1364
|
+
f
|
1365
|
+
);
|
1366
|
+
}
|
1367
|
+
};
|
1368
|
+
|
1369
|
+
|
1370
|
+
/**
|
1371
|
+
* optional string data = 1;
|
1372
|
+
* @return {string}
|
1373
|
+
*/
|
1374
|
+
proto.config.ConfigDataResponse.prototype.getData = function() {
|
1375
|
+
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, ""));
|
1376
|
+
};
|
1377
|
+
|
1378
|
+
|
1379
|
+
/**
|
1380
|
+
* @param {string} value
|
1381
|
+
* @return {!proto.config.ConfigDataResponse} returns this
|
1382
|
+
*/
|
1383
|
+
proto.config.ConfigDataResponse.prototype.setData = function(value) {
|
1384
|
+
return jspb.Message.setProto3StringField(this, 1, value);
|
1385
|
+
};
|
1386
|
+
|
1387
|
+
|
1218
1388
|
goog.object.extend(exports, proto.config);
|