protobuf-platform 1.2.91 → 1.2.93

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.
@@ -29,6 +29,7 @@ service Config {
29
29
  rpc updateMirror(ModifyMirrorRequest) returns (MirrorResponse);
30
30
  rpc getMirrorsList(PaginationRequest) returns (MirrorItemsResponse);
31
31
  rpc deleteSingleMirror(GetZoneRequest) returns (MirrorStatusResponse);
32
+ rpc syncActivatedMirrors(GetZoneRequest) returns (ActivatedMirrorsResponse);
32
33
  }
33
34
 
34
35
  message PingRequest { string ping = 1; }
@@ -173,6 +174,7 @@ message MirrorItem {
173
174
  optional string priority = 7;
174
175
  optional string status = 8;
175
176
  optional int32 is_active = 9;
177
+ optional string id = 10;
176
178
  }
177
179
  message MirrorResponse {
178
180
  MirrorItem data = 1;
@@ -191,4 +193,7 @@ message ModifyMirrorRequest {
191
193
  optional string priority = 3;
192
194
  optional string status = 4;
193
195
  optional int32 is_active = 5;
196
+ }
197
+ message ActivatedMirrorsResponse {
198
+ repeated string domains = 1;
194
199
  }
@@ -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_ActivatedMirrorsResponse(arg) {
8
+ if (!(arg instanceof config_pb.ActivatedMirrorsResponse)) {
9
+ throw new Error('Expected argument of type config.ActivatedMirrorsResponse');
10
+ }
11
+ return Buffer.from(arg.serializeBinary());
12
+ }
13
+
14
+ function deserialize_config_ActivatedMirrorsResponse(buffer_arg) {
15
+ return config_pb.ActivatedMirrorsResponse.deserializeBinary(new Uint8Array(buffer_arg));
16
+ }
17
+
7
18
  function serialize_config_CommonCountriesRequest(arg) {
8
19
  if (!(arg instanceof config_pb.CommonCountriesRequest)) {
9
20
  throw new Error('Expected argument of type config.CommonCountriesRequest');
@@ -520,6 +531,17 @@ getZonesList: {
520
531
  responseSerialize: serialize_config_MirrorStatusResponse,
521
532
  responseDeserialize: deserialize_config_MirrorStatusResponse,
522
533
  },
534
+ syncActivatedMirrors: {
535
+ path: '/config.Config/syncActivatedMirrors',
536
+ requestStream: false,
537
+ responseStream: false,
538
+ requestType: config_pb.GetZoneRequest,
539
+ responseType: config_pb.ActivatedMirrorsResponse,
540
+ requestSerialize: serialize_config_GetZoneRequest,
541
+ requestDeserialize: deserialize_config_GetZoneRequest,
542
+ responseSerialize: serialize_config_ActivatedMirrorsResponse,
543
+ responseDeserialize: deserialize_config_ActivatedMirrorsResponse,
544
+ },
523
545
  };
524
546
 
525
547
  exports.ConfigClient = grpc.makeGenericClientConstructor(ConfigService, 'Config');
@@ -21,6 +21,7 @@ var global = (function() {
21
21
  return Function('return this')();
22
22
  }.call(null));
23
23
 
24
+ goog.exportSymbol('proto.config.ActivatedMirrorsResponse', null, global);
24
25
  goog.exportSymbol('proto.config.CommonCountriesRequest', null, global);
25
26
  goog.exportSymbol('proto.config.CommonCountriesResponse', null, global);
26
27
  goog.exportSymbol('proto.config.ConfigDataResponse', null, global);
@@ -725,6 +726,27 @@ if (goog.DEBUG && !COMPILED) {
725
726
  */
726
727
  proto.config.ModifyMirrorRequest.displayName = 'proto.config.ModifyMirrorRequest';
727
728
  }
729
+ /**
730
+ * Generated by JsPbCodeGenerator.
731
+ * @param {Array=} opt_data Optional initial data array, typically from a
732
+ * server response, or constructed directly in Javascript. The array is used
733
+ * in place and becomes part of the constructed object. It is not cloned.
734
+ * If no data is provided, the constructed object will be empty, but still
735
+ * valid.
736
+ * @extends {jspb.Message}
737
+ * @constructor
738
+ */
739
+ proto.config.ActivatedMirrorsResponse = function(opt_data) {
740
+ jspb.Message.initialize(this, opt_data, 0, -1, proto.config.ActivatedMirrorsResponse.repeatedFields_, null);
741
+ };
742
+ goog.inherits(proto.config.ActivatedMirrorsResponse, jspb.Message);
743
+ if (goog.DEBUG && !COMPILED) {
744
+ /**
745
+ * @public
746
+ * @override
747
+ */
748
+ proto.config.ActivatedMirrorsResponse.displayName = 'proto.config.ActivatedMirrorsResponse';
749
+ }
728
750
 
729
751
 
730
752
 
@@ -6423,7 +6445,8 @@ proto.config.MirrorItem.toObject = function(includeInstance, msg) {
6423
6445
  countriesList: (f = jspb.Message.getRepeatedField(msg, 6)) == null ? undefined : f,
6424
6446
  priority: jspb.Message.getFieldWithDefault(msg, 7, ""),
6425
6447
  status: jspb.Message.getFieldWithDefault(msg, 8, ""),
6426
- isActive: jspb.Message.getFieldWithDefault(msg, 9, 0)
6448
+ isActive: jspb.Message.getFieldWithDefault(msg, 9, 0),
6449
+ id: jspb.Message.getFieldWithDefault(msg, 10, "")
6427
6450
  };
6428
6451
 
6429
6452
  if (includeInstance) {
@@ -6496,6 +6519,10 @@ proto.config.MirrorItem.deserializeBinaryFromReader = function(msg, reader) {
6496
6519
  var value = /** @type {number} */ (reader.readInt32());
6497
6520
  msg.setIsActive(value);
6498
6521
  break;
6522
+ case 10:
6523
+ var value = /** @type {string} */ (reader.readString());
6524
+ msg.setId(value);
6525
+ break;
6499
6526
  default:
6500
6527
  reader.skipField();
6501
6528
  break;
@@ -6588,6 +6615,13 @@ proto.config.MirrorItem.serializeBinaryToWriter = function(message, writer) {
6588
6615
  f
6589
6616
  );
6590
6617
  }
6618
+ f = /** @type {string} */ (jspb.Message.getField(message, 10));
6619
+ if (f != null) {
6620
+ writer.writeString(
6621
+ 10,
6622
+ f
6623
+ );
6624
+ }
6591
6625
  };
6592
6626
 
6593
6627
 
@@ -6916,6 +6950,42 @@ proto.config.MirrorItem.prototype.hasIsActive = function() {
6916
6950
  };
6917
6951
 
6918
6952
 
6953
+ /**
6954
+ * optional string id = 10;
6955
+ * @return {string}
6956
+ */
6957
+ proto.config.MirrorItem.prototype.getId = function() {
6958
+ return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, ""));
6959
+ };
6960
+
6961
+
6962
+ /**
6963
+ * @param {string} value
6964
+ * @return {!proto.config.MirrorItem} returns this
6965
+ */
6966
+ proto.config.MirrorItem.prototype.setId = function(value) {
6967
+ return jspb.Message.setField(this, 10, value);
6968
+ };
6969
+
6970
+
6971
+ /**
6972
+ * Clears the field making it undefined.
6973
+ * @return {!proto.config.MirrorItem} returns this
6974
+ */
6975
+ proto.config.MirrorItem.prototype.clearId = function() {
6976
+ return jspb.Message.setField(this, 10, undefined);
6977
+ };
6978
+
6979
+
6980
+ /**
6981
+ * Returns whether this field is set.
6982
+ * @return {boolean}
6983
+ */
6984
+ proto.config.MirrorItem.prototype.hasId = function() {
6985
+ return jspb.Message.getField(this, 10) != null;
6986
+ };
6987
+
6988
+
6919
6989
 
6920
6990
 
6921
6991
 
@@ -7793,4 +7863,160 @@ proto.config.ModifyMirrorRequest.prototype.hasIsActive = function() {
7793
7863
  };
7794
7864
 
7795
7865
 
7866
+
7867
+ /**
7868
+ * List of repeated fields within this message type.
7869
+ * @private {!Array<number>}
7870
+ * @const
7871
+ */
7872
+ proto.config.ActivatedMirrorsResponse.repeatedFields_ = [1];
7873
+
7874
+
7875
+
7876
+ if (jspb.Message.GENERATE_TO_OBJECT) {
7877
+ /**
7878
+ * Creates an object representation of this proto.
7879
+ * Field names that are reserved in JavaScript and will be renamed to pb_name.
7880
+ * Optional fields that are not set will be set to undefined.
7881
+ * To access a reserved field use, foo.pb_<name>, eg, foo.pb_default.
7882
+ * For the list of reserved names please see:
7883
+ * net/proto2/compiler/js/internal/generator.cc#kKeyword.
7884
+ * @param {boolean=} opt_includeInstance Deprecated. whether to include the
7885
+ * JSPB instance for transitional soy proto support:
7886
+ * http://goto/soy-param-migration
7887
+ * @return {!Object}
7888
+ */
7889
+ proto.config.ActivatedMirrorsResponse.prototype.toObject = function(opt_includeInstance) {
7890
+ return proto.config.ActivatedMirrorsResponse.toObject(opt_includeInstance, this);
7891
+ };
7892
+
7893
+
7894
+ /**
7895
+ * Static version of the {@see toObject} method.
7896
+ * @param {boolean|undefined} includeInstance Deprecated. Whether to include
7897
+ * the JSPB instance for transitional soy proto support:
7898
+ * http://goto/soy-param-migration
7899
+ * @param {!proto.config.ActivatedMirrorsResponse} msg The msg instance to transform.
7900
+ * @return {!Object}
7901
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7902
+ */
7903
+ proto.config.ActivatedMirrorsResponse.toObject = function(includeInstance, msg) {
7904
+ var f, obj = {
7905
+ domainsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f
7906
+ };
7907
+
7908
+ if (includeInstance) {
7909
+ obj.$jspbMessageInstance = msg;
7910
+ }
7911
+ return obj;
7912
+ };
7913
+ }
7914
+
7915
+
7916
+ /**
7917
+ * Deserializes binary data (in protobuf wire format).
7918
+ * @param {jspb.ByteSource} bytes The bytes to deserialize.
7919
+ * @return {!proto.config.ActivatedMirrorsResponse}
7920
+ */
7921
+ proto.config.ActivatedMirrorsResponse.deserializeBinary = function(bytes) {
7922
+ var reader = new jspb.BinaryReader(bytes);
7923
+ var msg = new proto.config.ActivatedMirrorsResponse;
7924
+ return proto.config.ActivatedMirrorsResponse.deserializeBinaryFromReader(msg, reader);
7925
+ };
7926
+
7927
+
7928
+ /**
7929
+ * Deserializes binary data (in protobuf wire format) from the
7930
+ * given reader into the given message object.
7931
+ * @param {!proto.config.ActivatedMirrorsResponse} msg The message object to deserialize into.
7932
+ * @param {!jspb.BinaryReader} reader The BinaryReader to use.
7933
+ * @return {!proto.config.ActivatedMirrorsResponse}
7934
+ */
7935
+ proto.config.ActivatedMirrorsResponse.deserializeBinaryFromReader = function(msg, reader) {
7936
+ while (reader.nextField()) {
7937
+ if (reader.isEndGroup()) {
7938
+ break;
7939
+ }
7940
+ var field = reader.getFieldNumber();
7941
+ switch (field) {
7942
+ case 1:
7943
+ var value = /** @type {string} */ (reader.readString());
7944
+ msg.addDomains(value);
7945
+ break;
7946
+ default:
7947
+ reader.skipField();
7948
+ break;
7949
+ }
7950
+ }
7951
+ return msg;
7952
+ };
7953
+
7954
+
7955
+ /**
7956
+ * Serializes the message to binary data (in protobuf wire format).
7957
+ * @return {!Uint8Array}
7958
+ */
7959
+ proto.config.ActivatedMirrorsResponse.prototype.serializeBinary = function() {
7960
+ var writer = new jspb.BinaryWriter();
7961
+ proto.config.ActivatedMirrorsResponse.serializeBinaryToWriter(this, writer);
7962
+ return writer.getResultBuffer();
7963
+ };
7964
+
7965
+
7966
+ /**
7967
+ * Serializes the given message to binary data (in protobuf wire
7968
+ * format), writing to the given BinaryWriter.
7969
+ * @param {!proto.config.ActivatedMirrorsResponse} message
7970
+ * @param {!jspb.BinaryWriter} writer
7971
+ * @suppress {unusedLocalVariables} f is only used for nested messages
7972
+ */
7973
+ proto.config.ActivatedMirrorsResponse.serializeBinaryToWriter = function(message, writer) {
7974
+ var f = undefined;
7975
+ f = message.getDomainsList();
7976
+ if (f.length > 0) {
7977
+ writer.writeRepeatedString(
7978
+ 1,
7979
+ f
7980
+ );
7981
+ }
7982
+ };
7983
+
7984
+
7985
+ /**
7986
+ * repeated string domains = 1;
7987
+ * @return {!Array<string>}
7988
+ */
7989
+ proto.config.ActivatedMirrorsResponse.prototype.getDomainsList = function() {
7990
+ return /** @type {!Array<string>} */ (jspb.Message.getRepeatedField(this, 1));
7991
+ };
7992
+
7993
+
7994
+ /**
7995
+ * @param {!Array<string>} value
7996
+ * @return {!proto.config.ActivatedMirrorsResponse} returns this
7997
+ */
7998
+ proto.config.ActivatedMirrorsResponse.prototype.setDomainsList = function(value) {
7999
+ return jspb.Message.setField(this, 1, value || []);
8000
+ };
8001
+
8002
+
8003
+ /**
8004
+ * @param {string} value
8005
+ * @param {number=} opt_index
8006
+ * @return {!proto.config.ActivatedMirrorsResponse} returns this
8007
+ */
8008
+ proto.config.ActivatedMirrorsResponse.prototype.addDomains = function(value, opt_index) {
8009
+ return jspb.Message.addToRepeatedField(this, 1, value, opt_index);
8010
+ };
8011
+
8012
+
8013
+ /**
8014
+ * Clears the list making it empty but non-null.
8015
+ * @return {!proto.config.ActivatedMirrorsResponse} returns this
8016
+ */
8017
+ proto.config.ActivatedMirrorsResponse.prototype.clearDomainsList = function() {
8018
+ return this.setDomainsList([]);
8019
+ };
8020
+
8021
+
7796
8022
  goog.object.extend(exports, proto.config);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "protobuf-platform",
3
- "version": "1.2.91",
3
+ "version": "1.2.93",
4
4
  "description": "Protobuf structures",
5
5
  "main": "index.js",
6
6
  "scripts": {