From 9d3e13275f274a369f56bb912a8b2c61e5a1a008 Mon Sep 17 00:00:00 2001 From: fish <920886811@163.com> Date: Mon, 5 Dec 2022 20:50:13 +0800 Subject: [PATCH] mod: online DoDailyStatusReportHandler --- js/protos/online/online_pb.js | 1240 ++++++++++++++++----------------- protos/online/online.pb.go | 1149 +++++++++++++++--------------- 2 files changed, 1195 insertions(+), 1194 deletions(-) diff --git a/js/protos/online/online_pb.js b/js/protos/online/online_pb.js index f031655..72b27a6 100644 --- a/js/protos/online/online_pb.js +++ b/js/protos/online/online_pb.js @@ -19,7 +19,7 @@ goog.object.extend(proto, github_com_tron$us_protobuf_gogoproto_gogo_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); goog.exportSymbol('proto.online.PayLoadInfo', null, global); -goog.exportSymbol('proto.online.ReqLatestSignReport', null, global); +goog.exportSymbol('proto.online.ReqLastDailySignedInfo', null, global); goog.exportSymbol('proto.online.ReqSignMetrics', null, global); goog.exportSymbol('proto.online.RespSignMetrics', null, global); goog.exportSymbol('proto.online.ResponseCode', null, global); @@ -35,16 +35,16 @@ goog.exportSymbol('proto.online.SignedInfo', null, global); * @extends {jspb.Message} * @constructor */ -proto.online.ReqSignMetrics = function(opt_data) { +proto.online.ReqLastDailySignedInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.online.ReqSignMetrics, jspb.Message); +goog.inherits(proto.online.ReqLastDailySignedInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.online.ReqSignMetrics.displayName = 'proto.online.ReqSignMetrics'; + proto.online.ReqLastDailySignedInfo.displayName = 'proto.online.ReqLastDailySignedInfo'; } /** * Generated by JsPbCodeGenerator. @@ -56,16 +56,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.online.PayLoadInfo = function(opt_data) { +proto.online.Result = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.online.PayLoadInfo, jspb.Message); +goog.inherits(proto.online.Result, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.online.PayLoadInfo.displayName = 'proto.online.PayLoadInfo'; + proto.online.Result.displayName = 'proto.online.Result'; } /** * Generated by JsPbCodeGenerator. @@ -77,16 +77,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.online.RespSignMetrics = function(opt_data) { +proto.online.ReqSignMetrics = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.online.RespSignMetrics, jspb.Message); +goog.inherits(proto.online.ReqSignMetrics, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.online.RespSignMetrics.displayName = 'proto.online.RespSignMetrics'; + proto.online.ReqSignMetrics.displayName = 'proto.online.ReqSignMetrics'; } /** * Generated by JsPbCodeGenerator. @@ -98,16 +98,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.online.SignedInfo = function(opt_data) { +proto.online.PayLoadInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.online.SignedInfo, jspb.Message); +goog.inherits(proto.online.PayLoadInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.online.SignedInfo.displayName = 'proto.online.SignedInfo'; + proto.online.PayLoadInfo.displayName = 'proto.online.PayLoadInfo'; } /** * Generated by JsPbCodeGenerator. @@ -119,16 +119,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.online.ReqLatestSignReport = function(opt_data) { +proto.online.RespSignMetrics = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.online.ReqLatestSignReport, jspb.Message); +goog.inherits(proto.online.RespSignMetrics, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.online.ReqLatestSignReport.displayName = 'proto.online.ReqLatestSignReport'; + proto.online.RespSignMetrics.displayName = 'proto.online.RespSignMetrics'; } /** * Generated by JsPbCodeGenerator. @@ -140,16 +140,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.online.Result = function(opt_data) { +proto.online.SignedInfo = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.online.Result, jspb.Message); +goog.inherits(proto.online.SignedInfo, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.online.Result.displayName = 'proto.online.Result'; + proto.online.SignedInfo.displayName = 'proto.online.SignedInfo'; } @@ -167,8 +167,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.online.ReqSignMetrics.prototype.toObject = function(opt_includeInstance) { - return proto.online.ReqSignMetrics.toObject(opt_includeInstance, this); +proto.online.ReqLastDailySignedInfo.prototype.toObject = function(opt_includeInstance) { + return proto.online.ReqLastDailySignedInfo.toObject(opt_includeInstance, this); }; @@ -177,15 +177,13 @@ proto.online.ReqSignMetrics.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.online.ReqSignMetrics} msg The msg instance to transform. + * @param {!proto.online.ReqLastDailySignedInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.online.ReqSignMetrics.toObject = function(includeInstance, msg) { +proto.online.ReqLastDailySignedInfo.toObject = function(includeInstance, msg) { var f, obj = { - publicKey: msg.getPublicKey_asB64(), - signature: msg.getSignature_asB64(), - payload: msg.getPayload_asB64() + peerId: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -199,23 +197,23 @@ proto.online.ReqSignMetrics.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.online.ReqSignMetrics} + * @return {!proto.online.ReqLastDailySignedInfo} */ -proto.online.ReqSignMetrics.deserializeBinary = function(bytes) { +proto.online.ReqLastDailySignedInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.online.ReqSignMetrics; - return proto.online.ReqSignMetrics.deserializeBinaryFromReader(msg, reader); + var msg = new proto.online.ReqLastDailySignedInfo; + return proto.online.ReqLastDailySignedInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.online.ReqSignMetrics} msg The message object to deserialize into. + * @param {!proto.online.ReqLastDailySignedInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.online.ReqSignMetrics} + * @return {!proto.online.ReqLastDailySignedInfo} */ -proto.online.ReqSignMetrics.deserializeBinaryFromReader = function(msg, reader) { +proto.online.ReqLastDailySignedInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -223,16 +221,8 @@ proto.online.ReqSignMetrics.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPublicKey(value); - break; - case 2: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setSignature(value); - break; - case 3: - var value = /** @type {!Uint8Array} */ (reader.readBytes()); - msg.setPayload(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPeerId(value); break; default: reader.skipField(); @@ -247,9 +237,9 @@ proto.online.ReqSignMetrics.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.online.ReqSignMetrics.prototype.serializeBinary = function() { +proto.online.ReqLastDailySignedInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.online.ReqSignMetrics.serializeBinaryToWriter(this, writer); + proto.online.ReqLastDailySignedInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -257,159 +247,37 @@ proto.online.ReqSignMetrics.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.online.ReqSignMetrics} message + * @param {!proto.online.ReqLastDailySignedInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.online.ReqSignMetrics.serializeBinaryToWriter = function(message, writer) { +proto.online.ReqLastDailySignedInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPublicKey_asU8(); + f = message.getPeerId(); if (f.length > 0) { - writer.writeBytes( + writer.writeString( 1, f ); } - f = message.getSignature_asU8(); - if (f.length > 0) { - writer.writeBytes( - 2, - f - ); - } - f = message.getPayload_asU8(); - if (f.length > 0) { - writer.writeBytes( - 3, - f - ); - } -}; - - -/** - * optional bytes public_key = 1; - * @return {!(string|Uint8Array)} - */ -proto.online.ReqSignMetrics.prototype.getPublicKey = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * optional bytes public_key = 1; - * This is a type-conversion wrapper around `getPublicKey()` - * @return {string} - */ -proto.online.ReqSignMetrics.prototype.getPublicKey_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPublicKey())); -}; - - -/** - * optional bytes public_key = 1; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPublicKey()` - * @return {!Uint8Array} - */ -proto.online.ReqSignMetrics.prototype.getPublicKey_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPublicKey())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.online.ReqSignMetrics} returns this - */ -proto.online.ReqSignMetrics.prototype.setPublicKey = function(value) { - return jspb.Message.setProto3BytesField(this, 1, value); -}; - - -/** - * optional bytes signature = 2; - * @return {!(string|Uint8Array)} - */ -proto.online.ReqSignMetrics.prototype.getSignature = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * optional bytes signature = 2; - * This is a type-conversion wrapper around `getSignature()` - * @return {string} - */ -proto.online.ReqSignMetrics.prototype.getSignature_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getSignature())); -}; - - -/** - * optional bytes signature = 2; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getSignature()` - * @return {!Uint8Array} - */ -proto.online.ReqSignMetrics.prototype.getSignature_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getSignature())); -}; - - -/** - * @param {!(string|Uint8Array)} value - * @return {!proto.online.ReqSignMetrics} returns this - */ -proto.online.ReqSignMetrics.prototype.setSignature = function(value) { - return jspb.Message.setProto3BytesField(this, 2, value); }; /** - * optional bytes payload = 3; - * @return {!(string|Uint8Array)} - */ -proto.online.ReqSignMetrics.prototype.getPayload = function() { - return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * optional bytes payload = 3; - * This is a type-conversion wrapper around `getPayload()` + * optional string peer_id = 1; * @return {string} */ -proto.online.ReqSignMetrics.prototype.getPayload_asB64 = function() { - return /** @type {string} */ (jspb.Message.bytesAsB64( - this.getPayload())); -}; - - -/** - * optional bytes payload = 3; - * Note that Uint8Array is not supported on all browsers. - * @see http://caniuse.com/Uint8Array - * This is a type-conversion wrapper around `getPayload()` - * @return {!Uint8Array} - */ -proto.online.ReqSignMetrics.prototype.getPayload_asU8 = function() { - return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( - this.getPayload())); +proto.online.ReqLastDailySignedInfo.prototype.getPeerId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!(string|Uint8Array)} value - * @return {!proto.online.ReqSignMetrics} returns this + * @param {string} value + * @return {!proto.online.ReqLastDailySignedInfo} returns this */ -proto.online.ReqSignMetrics.prototype.setPayload = function(value) { - return jspb.Message.setProto3BytesField(this, 3, value); +proto.online.ReqLastDailySignedInfo.prototype.setPeerId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -429,8 +297,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.online.PayLoadInfo.prototype.toObject = function(opt_includeInstance) { - return proto.online.PayLoadInfo.toObject(opt_includeInstance, this); +proto.online.Result.prototype.toObject = function(opt_includeInstance) { + return proto.online.Result.toObject(opt_includeInstance, this); }; @@ -439,17 +307,15 @@ proto.online.PayLoadInfo.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.online.PayLoadInfo} msg The msg instance to transform. + * @param {!proto.online.Result} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.online.PayLoadInfo.toObject = function(includeInstance, msg) { +proto.online.Result.toObject = function(includeInstance, msg) { var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), - node: (f = msg.getNode()) && github_com_tron$us_go$btfs$common_protos_node_node_pb.Node.toObject(includeInstance, f), - lastSignedInfo: (f = msg.getLastSignedInfo()) && proto.online.SignedInfo.toObject(includeInstance, f), - lastSignature: jspb.Message.getFieldWithDefault(msg, 4, ""), - lastTime: (f = msg.getLastTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, ""), + responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; if (includeInstance) { @@ -463,23 +329,23 @@ proto.online.PayLoadInfo.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.online.PayLoadInfo} + * @return {!proto.online.Result} */ -proto.online.PayLoadInfo.deserializeBinary = function(bytes) { +proto.online.Result.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.online.PayLoadInfo; - return proto.online.PayLoadInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.online.Result; + return proto.online.Result.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.online.PayLoadInfo} msg The message object to deserialize into. + * @param {!proto.online.Result} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.online.PayLoadInfo} + * @return {!proto.online.Result} */ -proto.online.PayLoadInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.online.Result.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -487,27 +353,17 @@ proto.online.PayLoadInfo.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNodeId(value); + var value = /** @type {!proto.online.ResponseCode} */ (reader.readEnum()); + msg.setCode(value); break; case 2: - var value = new github_com_tron$us_go$btfs$common_protos_node_node_pb.Node; - reader.readMessage(value,github_com_tron$us_go$btfs$common_protos_node_node_pb.Node.deserializeBinaryFromReader); - msg.setNode(value); - break; - case 3: - var value = new proto.online.SignedInfo; - reader.readMessage(value,proto.online.SignedInfo.deserializeBinaryFromReader); - msg.setLastSignedInfo(value); - break; - case 4: var value = /** @type {string} */ (reader.readString()); - msg.setLastSignature(value); + msg.setMessage(value); break; - case 5: + case 3: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastTime(value); + msg.setResponseTime(value); break; default: reader.skipField(); @@ -522,9 +378,9 @@ proto.online.PayLoadInfo.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.online.PayLoadInfo.prototype.serializeBinary = function() { +proto.online.Result.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.online.PayLoadInfo.serializeBinaryToWriter(this, writer); + proto.online.Result.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -532,46 +388,30 @@ proto.online.PayLoadInfo.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.online.PayLoadInfo} message + * @param {!proto.online.Result} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.online.PayLoadInfo.serializeBinaryToWriter = function(message, writer) { +proto.online.Result.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodeId(); - if (f.length > 0) { - writer.writeString( - 1, + f = message.getCode(); + if (f !== 0.0) { + writer.writeEnum( + 1, f ); } - f = message.getNode(); - if (f != null) { - writer.writeMessage( - 2, - f, - github_com_tron$us_go$btfs$common_protos_node_node_pb.Node.serializeBinaryToWriter - ); - } - f = message.getLastSignedInfo(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.online.SignedInfo.serializeBinaryToWriter - ); - } - f = message.getLastSignature(); + f = message.getMessage(); if (f.length > 0) { writer.writeString( - 4, + 2, f ); } - f = message.getLastTime(); + f = message.getResponseTime(); if (f != null) { writer.writeMessage( - 5, + 3, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); @@ -580,140 +420,66 @@ proto.online.PayLoadInfo.serializeBinaryToWriter = function(message, writer) { /** - * optional string node_id = 1; - * @return {string} - */ -proto.online.PayLoadInfo.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.online.PayLoadInfo} returns this - */ -proto.online.PayLoadInfo.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional node.Node node = 2; - * @return {?proto.node.Node} - */ -proto.online.PayLoadInfo.prototype.getNode = function() { - return /** @type{?proto.node.Node} */ ( - jspb.Message.getWrapperField(this, github_com_tron$us_go$btfs$common_protos_node_node_pb.Node, 2)); -}; - - -/** - * @param {?proto.node.Node|undefined} value - * @return {!proto.online.PayLoadInfo} returns this -*/ -proto.online.PayLoadInfo.prototype.setNode = function(value) { - return jspb.Message.setWrapperField(this, 2, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.online.PayLoadInfo} returns this - */ -proto.online.PayLoadInfo.prototype.clearNode = function() { - return this.setNode(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.online.PayLoadInfo.prototype.hasNode = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional SignedInfo last_signed_info = 3; - * @return {?proto.online.SignedInfo} - */ -proto.online.PayLoadInfo.prototype.getLastSignedInfo = function() { - return /** @type{?proto.online.SignedInfo} */ ( - jspb.Message.getWrapperField(this, proto.online.SignedInfo, 3)); -}; - - -/** - * @param {?proto.online.SignedInfo|undefined} value - * @return {!proto.online.PayLoadInfo} returns this -*/ -proto.online.PayLoadInfo.prototype.setLastSignedInfo = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.online.PayLoadInfo} returns this + * optional ResponseCode code = 1; + * @return {!proto.online.ResponseCode} */ -proto.online.PayLoadInfo.prototype.clearLastSignedInfo = function() { - return this.setLastSignedInfo(undefined); +proto.online.Result.prototype.getCode = function() { + return /** @type {!proto.online.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!proto.online.ResponseCode} value + * @return {!proto.online.Result} returns this */ -proto.online.PayLoadInfo.prototype.hasLastSignedInfo = function() { - return jspb.Message.getField(this, 3) != null; +proto.online.Result.prototype.setCode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional string last_signature = 4; + * optional string message = 2; * @return {string} */ -proto.online.PayLoadInfo.prototype.getLastSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.online.Result.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.online.PayLoadInfo} returns this + * @return {!proto.online.Result} returns this */ -proto.online.PayLoadInfo.prototype.setLastSignature = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.online.Result.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional google.protobuf.Timestamp last_time = 5; + * optional google.protobuf.Timestamp response_time = 3; * @return {?proto.google.protobuf.Timestamp} */ -proto.online.PayLoadInfo.prototype.getLastTime = function() { +proto.online.Result.prototype.getResponseTime = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); }; /** * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.online.PayLoadInfo} returns this + * @return {!proto.online.Result} returns this */ -proto.online.PayLoadInfo.prototype.setLastTime = function(value) { - return jspb.Message.setWrapperField(this, 5, value); +proto.online.Result.prototype.setResponseTime = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; /** * Clears the message field making it undefined. - * @return {!proto.online.PayLoadInfo} returns this + * @return {!proto.online.Result} returns this */ -proto.online.PayLoadInfo.prototype.clearLastTime = function() { - return this.setLastTime(undefined); +proto.online.Result.prototype.clearResponseTime = function() { + return this.setResponseTime(undefined); }; @@ -721,8 +487,8 @@ proto.online.PayLoadInfo.prototype.clearLastTime = function() { * Returns whether this field is set. * @return {boolean} */ -proto.online.PayLoadInfo.prototype.hasLastTime = function() { - return jspb.Message.getField(this, 5) != null; +proto.online.Result.prototype.hasResponseTime = function() { + return jspb.Message.getField(this, 3) != null; }; @@ -742,8 +508,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.online.RespSignMetrics.prototype.toObject = function(opt_includeInstance) { - return proto.online.RespSignMetrics.toObject(opt_includeInstance, this); +proto.online.ReqSignMetrics.prototype.toObject = function(opt_includeInstance) { + return proto.online.ReqSignMetrics.toObject(opt_includeInstance, this); }; @@ -752,16 +518,15 @@ proto.online.RespSignMetrics.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.online.RespSignMetrics} msg The msg instance to transform. + * @param {!proto.online.ReqSignMetrics} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.online.RespSignMetrics.toObject = function(includeInstance, msg) { +proto.online.ReqSignMetrics.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - signedInfo: (f = msg.getSignedInfo()) && proto.online.SignedInfo.toObject(includeInstance, f), - signature: jspb.Message.getFieldWithDefault(msg, 4, "") + publicKey: msg.getPublicKey_asB64(), + signature: msg.getSignature_asB64(), + payload: msg.getPayload_asB64() }; if (includeInstance) { @@ -775,23 +540,23 @@ proto.online.RespSignMetrics.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.online.RespSignMetrics} + * @return {!proto.online.ReqSignMetrics} */ -proto.online.RespSignMetrics.deserializeBinary = function(bytes) { +proto.online.ReqSignMetrics.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.online.RespSignMetrics; - return proto.online.RespSignMetrics.deserializeBinaryFromReader(msg, reader); + var msg = new proto.online.ReqSignMetrics; + return proto.online.ReqSignMetrics.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.online.RespSignMetrics} msg The message object to deserialize into. + * @param {!proto.online.ReqSignMetrics} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.online.RespSignMetrics} + * @return {!proto.online.ReqSignMetrics} */ -proto.online.RespSignMetrics.deserializeBinaryFromReader = function(msg, reader) { +proto.online.ReqSignMetrics.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -799,21 +564,16 @@ proto.online.RespSignMetrics.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.online.ResponseCode} */ (reader.readEnum()); - msg.setCode(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPublicKey(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setSignature(value); break; case 3: - var value = new proto.online.SignedInfo; - reader.readMessage(value,proto.online.SignedInfo.deserializeBinaryFromReader); - msg.setSignedInfo(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setPayload(value); break; default: reader.skipField(); @@ -828,9 +588,9 @@ proto.online.RespSignMetrics.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.online.RespSignMetrics.prototype.serializeBinary = function() { +proto.online.ReqSignMetrics.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.online.RespSignMetrics.serializeBinaryToWriter(this, writer); + proto.online.ReqSignMetrics.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -838,38 +598,30 @@ proto.online.RespSignMetrics.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.online.RespSignMetrics} message + * @param {!proto.online.ReqSignMetrics} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.online.RespSignMetrics.serializeBinaryToWriter = function(message, writer) { +proto.online.ReqSignMetrics.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getPublicKey_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, f ); } - f = message.getMessage(); + f = message.getSignature_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 2, f ); } - f = message.getSignedInfo(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.online.SignedInfo.serializeBinaryToWriter - ); - } - f = message.getSignature(); + f = message.getPayload_asU8(); if (f.length > 0) { - writer.writeString( - 4, + writer.writeBytes( + 3, f ); } @@ -877,93 +629,128 @@ proto.online.RespSignMetrics.serializeBinaryToWriter = function(message, writer) /** - * optional ResponseCode code = 1; - * @return {!proto.online.ResponseCode} - */ -proto.online.RespSignMetrics.prototype.getCode = function() { - return /** @type {!proto.online.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); -}; - - -/** - * @param {!proto.online.ResponseCode} value - * @return {!proto.online.RespSignMetrics} returns this + * optional bytes public_key = 1; + * @return {!(string|Uint8Array)} */ -proto.online.RespSignMetrics.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.online.ReqSignMetrics.prototype.getPublicKey = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional string message = 2; + * optional bytes public_key = 1; + * This is a type-conversion wrapper around `getPublicKey()` * @return {string} */ -proto.online.RespSignMetrics.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.online.ReqSignMetrics.prototype.getPublicKey_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPublicKey())); }; /** - * @param {string} value - * @return {!proto.online.RespSignMetrics} returns this + * optional bytes public_key = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPublicKey()` + * @return {!Uint8Array} */ -proto.online.RespSignMetrics.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.online.ReqSignMetrics.prototype.getPublicKey_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPublicKey())); }; /** - * optional SignedInfo signed_info = 3; - * @return {?proto.online.SignedInfo} + * @param {!(string|Uint8Array)} value + * @return {!proto.online.ReqSignMetrics} returns this */ -proto.online.RespSignMetrics.prototype.getSignedInfo = function() { - return /** @type{?proto.online.SignedInfo} */ ( - jspb.Message.getWrapperField(this, proto.online.SignedInfo, 3)); +proto.online.ReqSignMetrics.prototype.setPublicKey = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; /** - * @param {?proto.online.SignedInfo|undefined} value - * @return {!proto.online.RespSignMetrics} returns this -*/ -proto.online.RespSignMetrics.prototype.setSignedInfo = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * optional bytes signature = 2; + * @return {!(string|Uint8Array)} + */ +proto.online.ReqSignMetrics.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Clears the message field making it undefined. - * @return {!proto.online.RespSignMetrics} returns this + * optional bytes signature = 2; + * This is a type-conversion wrapper around `getSignature()` + * @return {string} */ -proto.online.RespSignMetrics.prototype.clearSignedInfo = function() { - return this.setSignedInfo(undefined); +proto.online.ReqSignMetrics.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional bytes signature = 2; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} */ -proto.online.RespSignMetrics.prototype.hasSignedInfo = function() { - return jspb.Message.getField(this, 3) != null; +proto.online.ReqSignMetrics.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); }; /** - * optional string signature = 4; + * @param {!(string|Uint8Array)} value + * @return {!proto.online.ReqSignMetrics} returns this + */ +proto.online.ReqSignMetrics.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 2, value); +}; + + +/** + * optional bytes payload = 3; + * @return {!(string|Uint8Array)} + */ +proto.online.ReqSignMetrics.prototype.getPayload = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes payload = 3; + * This is a type-conversion wrapper around `getPayload()` * @return {string} */ -proto.online.RespSignMetrics.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.online.ReqSignMetrics.prototype.getPayload_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getPayload())); }; /** - * @param {string} value - * @return {!proto.online.RespSignMetrics} returns this + * optional bytes payload = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getPayload()` + * @return {!Uint8Array} */ -proto.online.RespSignMetrics.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.online.ReqSignMetrics.prototype.getPayload_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getPayload())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.online.ReqSignMetrics} returns this + */ +proto.online.ReqSignMetrics.prototype.setPayload = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -983,8 +770,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.online.SignedInfo.prototype.toObject = function(opt_includeInstance) { - return proto.online.SignedInfo.toObject(opt_includeInstance, this); +proto.online.PayLoadInfo.prototype.toObject = function(opt_includeInstance) { + return proto.online.PayLoadInfo.toObject(opt_includeInstance, this); }; @@ -993,18 +780,17 @@ proto.online.SignedInfo.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.online.SignedInfo} msg The msg instance to transform. + * @param {!proto.online.PayLoadInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.online.SignedInfo.toObject = function(includeInstance, msg) { +proto.online.PayLoadInfo.toObject = function(includeInstance, msg) { var f, obj = { - peer: jspb.Message.getFieldWithDefault(msg, 1, ""), - createdTime: jspb.Message.getFieldWithDefault(msg, 2, 0), - version: jspb.Message.getFieldWithDefault(msg, 3, ""), - nonce: jspb.Message.getFieldWithDefault(msg, 4, 0), - bttcAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), - signedTime: jspb.Message.getFieldWithDefault(msg, 6, 0) + nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), + node: (f = msg.getNode()) && github_com_tron$us_go$btfs$common_protos_node_node_pb.Node.toObject(includeInstance, f), + lastSignedInfo: (f = msg.getLastSignedInfo()) && proto.online.SignedInfo.toObject(includeInstance, f), + lastSignature: jspb.Message.getFieldWithDefault(msg, 4, ""), + lastTime: (f = msg.getLastTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; if (includeInstance) { @@ -1018,23 +804,23 @@ proto.online.SignedInfo.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.online.SignedInfo} + * @return {!proto.online.PayLoadInfo} */ -proto.online.SignedInfo.deserializeBinary = function(bytes) { +proto.online.PayLoadInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.online.SignedInfo; - return proto.online.SignedInfo.deserializeBinaryFromReader(msg, reader); + var msg = new proto.online.PayLoadInfo; + return proto.online.PayLoadInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.online.SignedInfo} msg The message object to deserialize into. + * @param {!proto.online.PayLoadInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.online.SignedInfo} + * @return {!proto.online.PayLoadInfo} */ -proto.online.SignedInfo.deserializeBinaryFromReader = function(msg, reader) { +proto.online.PayLoadInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1043,27 +829,26 @@ proto.online.SignedInfo.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setPeer(value); + msg.setNodeId(value); break; case 2: - var value = /** @type {number} */ (reader.readUint32()); - msg.setCreatedTime(value); + var value = new github_com_tron$us_go$btfs$common_protos_node_node_pb.Node; + reader.readMessage(value,github_com_tron$us_go$btfs$common_protos_node_node_pb.Node.deserializeBinaryFromReader); + msg.setNode(value); break; case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); + var value = new proto.online.SignedInfo; + reader.readMessage(value,proto.online.SignedInfo.deserializeBinaryFromReader); + msg.setLastSignedInfo(value); break; case 4: - var value = /** @type {number} */ (reader.readUint32()); - msg.setNonce(value); - break; - case 5: var value = /** @type {string} */ (reader.readString()); - msg.setBttcAddress(value); + msg.setLastSignature(value); break; - case 6: - var value = /** @type {number} */ (reader.readUint32()); - msg.setSignedTime(value); + case 5: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastTime(value); break; default: reader.skipField(); @@ -1078,9 +863,9 @@ proto.online.SignedInfo.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.online.SignedInfo.prototype.serializeBinary = function() { +proto.online.PayLoadInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.online.SignedInfo.serializeBinaryToWriter(this, writer); + proto.online.PayLoadInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1088,162 +873,197 @@ proto.online.SignedInfo.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.online.SignedInfo} message + * @param {!proto.online.PayLoadInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.online.SignedInfo.serializeBinaryToWriter = function(message, writer) { +proto.online.PayLoadInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getPeer(); + f = message.getNodeId(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getCreatedTime(); - if (f !== 0) { - writer.writeUint32( + f = message.getNode(); + if (f != null) { + writer.writeMessage( 2, - f + f, + github_com_tron$us_go$btfs$common_protos_node_node_pb.Node.serializeBinaryToWriter ); } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( + f = message.getLastSignedInfo(); + if (f != null) { + writer.writeMessage( 3, - f - ); - } - f = message.getNonce(); - if (f !== 0) { - writer.writeUint32( - 4, - f + f, + proto.online.SignedInfo.serializeBinaryToWriter ); } - f = message.getBttcAddress(); + f = message.getLastSignature(); if (f.length > 0) { writer.writeString( - 5, + 4, f ); } - f = message.getSignedTime(); - if (f !== 0) { - writer.writeUint32( - 6, - f + f = message.getLastTime(); + if (f != null) { + writer.writeMessage( + 5, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } }; /** - * optional string peer = 1; + * optional string node_id = 1; * @return {string} */ -proto.online.SignedInfo.prototype.getPeer = function() { +proto.online.PayLoadInfo.prototype.getNodeId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.online.SignedInfo} returns this + * @return {!proto.online.PayLoadInfo} returns this */ -proto.online.SignedInfo.prototype.setPeer = function(value) { +proto.online.PayLoadInfo.prototype.setNodeId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional uint32 created_time = 2; - * @return {number} + * optional node.Node node = 2; + * @return {?proto.node.Node} */ -proto.online.SignedInfo.prototype.getCreatedTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.online.PayLoadInfo.prototype.getNode = function() { + return /** @type{?proto.node.Node} */ ( + jspb.Message.getWrapperField(this, github_com_tron$us_go$btfs$common_protos_node_node_pb.Node, 2)); }; /** - * @param {number} value - * @return {!proto.online.SignedInfo} returns this - */ -proto.online.SignedInfo.prototype.setCreatedTime = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); + * @param {?proto.node.Node|undefined} value + * @return {!proto.online.PayLoadInfo} returns this +*/ +proto.online.PayLoadInfo.prototype.setNode = function(value) { + return jspb.Message.setWrapperField(this, 2, value); }; /** - * optional string version = 3; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.online.PayLoadInfo} returns this */ -proto.online.SignedInfo.prototype.getVersion = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.online.PayLoadInfo.prototype.clearNode = function() { + return this.setNode(undefined); }; /** - * @param {string} value - * @return {!proto.online.SignedInfo} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.online.SignedInfo.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.online.PayLoadInfo.prototype.hasNode = function() { + return jspb.Message.getField(this, 2) != null; }; /** - * optional uint32 nonce = 4; - * @return {number} + * optional SignedInfo last_signed_info = 3; + * @return {?proto.online.SignedInfo} */ -proto.online.SignedInfo.prototype.getNonce = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.online.PayLoadInfo.prototype.getLastSignedInfo = function() { + return /** @type{?proto.online.SignedInfo} */ ( + jspb.Message.getWrapperField(this, proto.online.SignedInfo, 3)); }; /** - * @param {number} value - * @return {!proto.online.SignedInfo} returns this + * @param {?proto.online.SignedInfo|undefined} value + * @return {!proto.online.PayLoadInfo} returns this +*/ +proto.online.PayLoadInfo.prototype.setLastSignedInfo = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.online.PayLoadInfo} returns this */ -proto.online.SignedInfo.prototype.setNonce = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.online.PayLoadInfo.prototype.clearLastSignedInfo = function() { + return this.setLastSignedInfo(undefined); }; /** - * optional string bttc_address = 5; + * Returns whether this field is set. + * @return {boolean} + */ +proto.online.PayLoadInfo.prototype.hasLastSignedInfo = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string last_signature = 4; * @return {string} */ -proto.online.SignedInfo.prototype.getBttcAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.online.PayLoadInfo.prototype.getLastSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** * @param {string} value - * @return {!proto.online.SignedInfo} returns this + * @return {!proto.online.PayLoadInfo} returns this */ -proto.online.SignedInfo.prototype.setBttcAddress = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); +proto.online.PayLoadInfo.prototype.setLastSignature = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; /** - * optional uint32 signed_time = 6; - * @return {number} + * optional google.protobuf.Timestamp last_time = 5; + * @return {?proto.google.protobuf.Timestamp} */ -proto.online.SignedInfo.prototype.getSignedTime = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.online.PayLoadInfo.prototype.getLastTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 5)); }; /** - * @param {number} value - * @return {!proto.online.SignedInfo} returns this + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.online.PayLoadInfo} returns this +*/ +proto.online.PayLoadInfo.prototype.setLastTime = function(value) { + return jspb.Message.setWrapperField(this, 5, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.online.PayLoadInfo} returns this */ -proto.online.SignedInfo.prototype.setSignedTime = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.online.PayLoadInfo.prototype.clearLastTime = function() { + return this.setLastTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.online.PayLoadInfo.prototype.hasLastTime = function() { + return jspb.Message.getField(this, 5) != null; }; @@ -1263,8 +1083,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.online.ReqLatestSignReport.prototype.toObject = function(opt_includeInstance) { - return proto.online.ReqLatestSignReport.toObject(opt_includeInstance, this); +proto.online.RespSignMetrics.prototype.toObject = function(opt_includeInstance) { + return proto.online.RespSignMetrics.toObject(opt_includeInstance, this); }; @@ -1273,13 +1093,16 @@ proto.online.ReqLatestSignReport.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.online.ReqLatestSignReport} msg The msg instance to transform. + * @param {!proto.online.RespSignMetrics} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.online.ReqLatestSignReport.toObject = function(includeInstance, msg) { +proto.online.RespSignMetrics.toObject = function(includeInstance, msg) { var f, obj = { - nodeId: jspb.Message.getFieldWithDefault(msg, 1, "") + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, ""), + signedInfo: (f = msg.getSignedInfo()) && proto.online.SignedInfo.toObject(includeInstance, f), + signature: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -1293,23 +1116,23 @@ proto.online.ReqLatestSignReport.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.online.ReqLatestSignReport} + * @return {!proto.online.RespSignMetrics} */ -proto.online.ReqLatestSignReport.deserializeBinary = function(bytes) { +proto.online.RespSignMetrics.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.online.ReqLatestSignReport; - return proto.online.ReqLatestSignReport.deserializeBinaryFromReader(msg, reader); + var msg = new proto.online.RespSignMetrics; + return proto.online.RespSignMetrics.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.online.ReqLatestSignReport} msg The message object to deserialize into. + * @param {!proto.online.RespSignMetrics} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.online.ReqLatestSignReport} + * @return {!proto.online.RespSignMetrics} */ -proto.online.ReqLatestSignReport.deserializeBinaryFromReader = function(msg, reader) { +proto.online.RespSignMetrics.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1317,8 +1140,21 @@ proto.online.ReqLatestSignReport.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: + var value = /** @type {!proto.online.ResponseCode} */ (reader.readEnum()); + msg.setCode(value); + break; + case 2: var value = /** @type {string} */ (reader.readString()); - msg.setNodeId(value); + msg.setMessage(value); + break; + case 3: + var value = new proto.online.SignedInfo; + reader.readMessage(value,proto.online.SignedInfo.deserializeBinaryFromReader); + msg.setSignedInfo(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); break; default: reader.skipField(); @@ -1333,9 +1169,9 @@ proto.online.ReqLatestSignReport.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.online.ReqLatestSignReport.prototype.serializeBinary = function() { +proto.online.RespSignMetrics.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.online.ReqLatestSignReport.serializeBinaryToWriter(this, writer); + proto.online.RespSignMetrics.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1343,16 +1179,38 @@ proto.online.ReqLatestSignReport.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.online.ReqLatestSignReport} message + * @param {!proto.online.RespSignMetrics} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.online.ReqLatestSignReport.serializeBinaryToWriter = function(message, writer) { +proto.online.RespSignMetrics.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNodeId(); + f = message.getCode(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getMessage(); if (f.length > 0) { writer.writeString( - 1, + 2, + f + ); + } + f = message.getSignedInfo(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.online.SignedInfo.serializeBinaryToWriter + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 4, f ); } @@ -1360,20 +1218,93 @@ proto.online.ReqLatestSignReport.serializeBinaryToWriter = function(message, wri /** - * optional string node_id = 1; + * optional ResponseCode code = 1; + * @return {!proto.online.ResponseCode} + */ +proto.online.RespSignMetrics.prototype.getCode = function() { + return /** @type {!proto.online.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.online.ResponseCode} value + * @return {!proto.online.RespSignMetrics} returns this + */ +proto.online.RespSignMetrics.prototype.setCode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string message = 2; * @return {string} */ -proto.online.ReqLatestSignReport.prototype.getNodeId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.online.RespSignMetrics.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.online.ReqLatestSignReport} returns this + * @return {!proto.online.RespSignMetrics} returns this */ -proto.online.ReqLatestSignReport.prototype.setNodeId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.online.RespSignMetrics.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional SignedInfo signed_info = 3; + * @return {?proto.online.SignedInfo} + */ +proto.online.RespSignMetrics.prototype.getSignedInfo = function() { + return /** @type{?proto.online.SignedInfo} */ ( + jspb.Message.getWrapperField(this, proto.online.SignedInfo, 3)); +}; + + +/** + * @param {?proto.online.SignedInfo|undefined} value + * @return {!proto.online.RespSignMetrics} returns this +*/ +proto.online.RespSignMetrics.prototype.setSignedInfo = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.online.RespSignMetrics} returns this + */ +proto.online.RespSignMetrics.prototype.clearSignedInfo = function() { + return this.setSignedInfo(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.online.RespSignMetrics.prototype.hasSignedInfo = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional string signature = 4; + * @return {string} + */ +proto.online.RespSignMetrics.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.online.RespSignMetrics} returns this + */ +proto.online.RespSignMetrics.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; @@ -1393,8 +1324,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.online.Result.prototype.toObject = function(opt_includeInstance) { - return proto.online.Result.toObject(opt_includeInstance, this); +proto.online.SignedInfo.prototype.toObject = function(opt_includeInstance) { + return proto.online.SignedInfo.toObject(opt_includeInstance, this); }; @@ -1403,15 +1334,18 @@ proto.online.Result.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.online.Result} msg The msg instance to transform. + * @param {!proto.online.SignedInfo} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.online.Result.toObject = function(includeInstance, msg) { +proto.online.SignedInfo.toObject = function(includeInstance, msg) { var f, obj = { - code: jspb.Message.getFieldWithDefault(msg, 1, 0), - message: jspb.Message.getFieldWithDefault(msg, 2, ""), - responseTime: (f = msg.getResponseTime()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + peer: jspb.Message.getFieldWithDefault(msg, 1, ""), + createdTime: jspb.Message.getFieldWithDefault(msg, 2, 0), + version: jspb.Message.getFieldWithDefault(msg, 3, ""), + nonce: jspb.Message.getFieldWithDefault(msg, 4, 0), + bttcAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), + signedTime: jspb.Message.getFieldWithDefault(msg, 6, 0) }; if (includeInstance) { @@ -1425,23 +1359,23 @@ proto.online.Result.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.online.Result} + * @return {!proto.online.SignedInfo} */ -proto.online.Result.deserializeBinary = function(bytes) { +proto.online.SignedInfo.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.online.Result; - return proto.online.Result.deserializeBinaryFromReader(msg, reader); + var msg = new proto.online.SignedInfo; + return proto.online.SignedInfo.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.online.Result} msg The message object to deserialize into. + * @param {!proto.online.SignedInfo} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.online.Result} + * @return {!proto.online.SignedInfo} */ -proto.online.Result.deserializeBinaryFromReader = function(msg, reader) { +proto.online.SignedInfo.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1449,17 +1383,28 @@ proto.online.Result.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.online.ResponseCode} */ (reader.readEnum()); - msg.setCode(value); + var value = /** @type {string} */ (reader.readString()); + msg.setPeer(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); + var value = /** @type {number} */ (reader.readUint32()); + msg.setCreatedTime(value); break; case 3: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setResponseTime(value); + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 4: + var value = /** @type {number} */ (reader.readUint32()); + msg.setNonce(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setBttcAddress(value); + break; + case 6: + var value = /** @type {number} */ (reader.readUint32()); + msg.setSignedTime(value); break; default: reader.skipField(); @@ -1474,9 +1419,9 @@ proto.online.Result.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.online.Result.prototype.serializeBinary = function() { +proto.online.SignedInfo.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.online.Result.serializeBinaryToWriter(this, writer); + proto.online.SignedInfo.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1484,107 +1429,162 @@ proto.online.Result.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.online.Result} message + * @param {!proto.online.SignedInfo} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.online.Result.serializeBinaryToWriter = function(message, writer) { +proto.online.SignedInfo.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getCode(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getPeer(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getMessage(); - if (f.length > 0) { - writer.writeString( + f = message.getCreatedTime(); + if (f !== 0) { + writer.writeUint32( 2, f ); } - f = message.getResponseTime(); - if (f != null) { - writer.writeMessage( + f = message.getVersion(); + if (f.length > 0) { + writer.writeString( 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + f + ); + } + f = message.getNonce(); + if (f !== 0) { + writer.writeUint32( + 4, + f + ); + } + f = message.getBttcAddress(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getSignedTime(); + if (f !== 0) { + writer.writeUint32( + 6, + f ); } }; /** - * optional ResponseCode code = 1; - * @return {!proto.online.ResponseCode} + * optional string peer = 1; + * @return {string} */ -proto.online.Result.prototype.getCode = function() { - return /** @type {!proto.online.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.online.SignedInfo.prototype.getPeer = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!proto.online.ResponseCode} value - * @return {!proto.online.Result} returns this + * @param {string} value + * @return {!proto.online.SignedInfo} returns this */ -proto.online.Result.prototype.setCode = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.online.SignedInfo.prototype.setPeer = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string message = 2; + * optional uint32 created_time = 2; + * @return {number} + */ +proto.online.SignedInfo.prototype.getCreatedTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.online.SignedInfo} returns this + */ +proto.online.SignedInfo.prototype.setCreatedTime = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string version = 3; * @return {string} */ -proto.online.Result.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.online.SignedInfo.prototype.getVersion = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.online.Result} returns this + * @return {!proto.online.SignedInfo} returns this */ -proto.online.Result.prototype.setMessage = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.online.SignedInfo.prototype.setVersion = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional google.protobuf.Timestamp response_time = 3; - * @return {?proto.google.protobuf.Timestamp} + * optional uint32 nonce = 4; + * @return {number} */ -proto.online.Result.prototype.getResponseTime = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +proto.online.SignedInfo.prototype.getNonce = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.online.Result} returns this -*/ -proto.online.Result.prototype.setResponseTime = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + * @param {number} value + * @return {!proto.online.SignedInfo} returns this + */ +proto.online.SignedInfo.prototype.setNonce = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.online.Result} returns this + * optional string bttc_address = 5; + * @return {string} */ -proto.online.Result.prototype.clearResponseTime = function() { - return this.setResponseTime(undefined); +proto.online.SignedInfo.prototype.getBttcAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.online.SignedInfo} returns this */ -proto.online.Result.prototype.hasResponseTime = function() { - return jspb.Message.getField(this, 3) != null; +proto.online.SignedInfo.prototype.setBttcAddress = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional uint32 signed_time = 6; + * @return {number} + */ +proto.online.SignedInfo.prototype.getSignedTime = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.online.SignedInfo} returns this + */ +proto.online.SignedInfo.prototype.setSignedTime = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); }; diff --git a/protos/online/online.pb.go b/protos/online/online.pb.go index 9e5e3a6..c70465d 100644 --- a/protos/online/online.pb.go +++ b/protos/online/online.pb.go @@ -68,6 +68,124 @@ func (ResponseCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_ee5923c3111b600a, []int{0} } +type ReqLastDailySignedInfo struct { + PeerId string `protobuf:"bytes,1,opt,name=peer_id,json=peerId,proto3" json:"peer_id,omitempty" pg:"peer_id"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *ReqLastDailySignedInfo) Reset() { *m = ReqLastDailySignedInfo{} } +func (m *ReqLastDailySignedInfo) String() string { return proto.CompactTextString(m) } +func (*ReqLastDailySignedInfo) ProtoMessage() {} +func (*ReqLastDailySignedInfo) Descriptor() ([]byte, []int) { + return fileDescriptor_ee5923c3111b600a, []int{0} +} +func (m *ReqLastDailySignedInfo) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ReqLastDailySignedInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ReqLastDailySignedInfo.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *ReqLastDailySignedInfo) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReqLastDailySignedInfo.Merge(m, src) +} +func (m *ReqLastDailySignedInfo) XXX_Size() int { + return m.Size() +} +func (m *ReqLastDailySignedInfo) XXX_DiscardUnknown() { + xxx_messageInfo_ReqLastDailySignedInfo.DiscardUnknown(m) +} + +var xxx_messageInfo_ReqLastDailySignedInfo proto.InternalMessageInfo + +func (m *ReqLastDailySignedInfo) GetPeerId() string { + if m != nil { + return m.PeerId + } + return "" +} + +func (*ReqLastDailySignedInfo) XXX_MessageName() string { + return "online.ReqLastDailySignedInfo" +} + +type Result struct { + Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=online.ResponseCode" json:"code,omitempty" pg:"code"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` + ResponseTime time.Time `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *Result) Reset() { *m = Result{} } +func (m *Result) String() string { return proto.CompactTextString(m) } +func (*Result) ProtoMessage() {} +func (*Result) Descriptor() ([]byte, []int) { + return fileDescriptor_ee5923c3111b600a, []int{1} +} +func (m *Result) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_Result.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *Result) XXX_Merge(src proto.Message) { + xxx_messageInfo_Result.Merge(m, src) +} +func (m *Result) XXX_Size() int { + return m.Size() +} +func (m *Result) XXX_DiscardUnknown() { + xxx_messageInfo_Result.DiscardUnknown(m) +} + +var xxx_messageInfo_Result proto.InternalMessageInfo + +func (m *Result) GetCode() ResponseCode { + if m != nil { + return m.Code + } + return ResponseCode_SUCCESS +} + +func (m *Result) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *Result) GetResponseTime() time.Time { + if m != nil { + return m.ResponseTime + } + return time.Time{} +} + +func (*Result) XXX_MessageName() string { + return "online.Result" +} + type ReqSignMetrics struct { PublicKey []byte `protobuf:"bytes,1,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty" pg:"public_key"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` @@ -81,7 +199,7 @@ func (m *ReqSignMetrics) Reset() { *m = ReqSignMetrics{} } func (m *ReqSignMetrics) String() string { return proto.CompactTextString(m) } func (*ReqSignMetrics) ProtoMessage() {} func (*ReqSignMetrics) Descriptor() ([]byte, []int) { - return fileDescriptor_ee5923c3111b600a, []int{0} + return fileDescriptor_ee5923c3111b600a, []int{2} } func (m *ReqSignMetrics) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -150,7 +268,7 @@ func (m *PayLoadInfo) Reset() { *m = PayLoadInfo{} } func (m *PayLoadInfo) String() string { return proto.CompactTextString(m) } func (*PayLoadInfo) ProtoMessage() {} func (*PayLoadInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ee5923c3111b600a, []int{1} + return fileDescriptor_ee5923c3111b600a, []int{3} } func (m *PayLoadInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -232,7 +350,7 @@ func (m *RespSignMetrics) Reset() { *m = RespSignMetrics{} } func (m *RespSignMetrics) String() string { return proto.CompactTextString(m) } func (*RespSignMetrics) ProtoMessage() {} func (*RespSignMetrics) Descriptor() ([]byte, []int) { - return fileDescriptor_ee5923c3111b600a, []int{2} + return fileDescriptor_ee5923c3111b600a, []int{4} } func (m *RespSignMetrics) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -309,7 +427,7 @@ func (m *SignedInfo) Reset() { *m = SignedInfo{} } func (m *SignedInfo) String() string { return proto.CompactTextString(m) } func (*SignedInfo) ProtoMessage() {} func (*SignedInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_ee5923c3111b600a, []int{3} + return fileDescriptor_ee5923c3111b600a, []int{5} } func (m *SignedInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -383,127 +501,13 @@ func (m *SignedInfo) GetSignedTime() uint32 { func (*SignedInfo) XXX_MessageName() string { return "online.SignedInfo" } - -type ReqLatestSignReport struct { - NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" pg:"node_id"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *ReqLatestSignReport) Reset() { *m = ReqLatestSignReport{} } -func (m *ReqLatestSignReport) String() string { return proto.CompactTextString(m) } -func (*ReqLatestSignReport) ProtoMessage() {} -func (*ReqLatestSignReport) Descriptor() ([]byte, []int) { - return fileDescriptor_ee5923c3111b600a, []int{4} -} -func (m *ReqLatestSignReport) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *ReqLatestSignReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_ReqLatestSignReport.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *ReqLatestSignReport) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReqLatestSignReport.Merge(m, src) -} -func (m *ReqLatestSignReport) XXX_Size() int { - return m.Size() -} -func (m *ReqLatestSignReport) XXX_DiscardUnknown() { - xxx_messageInfo_ReqLatestSignReport.DiscardUnknown(m) -} - -var xxx_messageInfo_ReqLatestSignReport proto.InternalMessageInfo - -func (m *ReqLatestSignReport) GetNodeId() string { - if m != nil { - return m.NodeId - } - return "" -} - -func (*ReqLatestSignReport) XXX_MessageName() string { - return "online.ReqLatestSignReport" -} - -type Result struct { - Code ResponseCode `protobuf:"varint,1,opt,name=code,proto3,enum=online.ResponseCode" json:"code,omitempty" pg:"code"` - Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` - ResponseTime time.Time `protobuf:"bytes,3,opt,name=response_time,json=responseTime,proto3,stdtime" json:"response_time" pg:"response_time"` - XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` - XXX_unrecognized []byte `json:"-" pg:"-"` - XXX_sizecache int32 `json:"-" pg:"-"` -} - -func (m *Result) Reset() { *m = Result{} } -func (m *Result) String() string { return proto.CompactTextString(m) } -func (*Result) ProtoMessage() {} -func (*Result) Descriptor() ([]byte, []int) { - return fileDescriptor_ee5923c3111b600a, []int{5} -} -func (m *Result) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Result) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Result.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Result) XXX_Merge(src proto.Message) { - xxx_messageInfo_Result.Merge(m, src) -} -func (m *Result) XXX_Size() int { - return m.Size() -} -func (m *Result) XXX_DiscardUnknown() { - xxx_messageInfo_Result.DiscardUnknown(m) -} - -var xxx_messageInfo_Result proto.InternalMessageInfo - -func (m *Result) GetCode() ResponseCode { - if m != nil { - return m.Code - } - return ResponseCode_SUCCESS -} - -func (m *Result) GetMessage() string { - if m != nil { - return m.Message - } - return "" -} - -func (m *Result) GetResponseTime() time.Time { - if m != nil { - return m.ResponseTime - } - return time.Time{} -} - -func (*Result) XXX_MessageName() string { - return "online.Result" -} func init() { proto.RegisterEnum("online.ResponseCode", ResponseCode_name, ResponseCode_value) golang_proto.RegisterEnum("online.ResponseCode", ResponseCode_name, ResponseCode_value) + proto.RegisterType((*ReqLastDailySignedInfo)(nil), "online.ReqLastDailySignedInfo") + golang_proto.RegisterType((*ReqLastDailySignedInfo)(nil), "online.ReqLastDailySignedInfo") + proto.RegisterType((*Result)(nil), "online.Result") + golang_proto.RegisterType((*Result)(nil), "online.Result") proto.RegisterType((*ReqSignMetrics)(nil), "online.ReqSignMetrics") golang_proto.RegisterType((*ReqSignMetrics)(nil), "online.ReqSignMetrics") proto.RegisterType((*PayLoadInfo)(nil), "online.PayLoadInfo") @@ -512,65 +516,62 @@ func init() { golang_proto.RegisterType((*RespSignMetrics)(nil), "online.RespSignMetrics") proto.RegisterType((*SignedInfo)(nil), "online.SignedInfo") golang_proto.RegisterType((*SignedInfo)(nil), "online.SignedInfo") - proto.RegisterType((*ReqLatestSignReport)(nil), "online.ReqLatestSignReport") - golang_proto.RegisterType((*ReqLatestSignReport)(nil), "online.ReqLatestSignReport") - proto.RegisterType((*Result)(nil), "online.Result") - golang_proto.RegisterType((*Result)(nil), "online.Result") } func init() { proto.RegisterFile("protos/online/online.proto", fileDescriptor_ee5923c3111b600a) } func init() { golang_proto.RegisterFile("protos/online/online.proto", fileDescriptor_ee5923c3111b600a) } var fileDescriptor_ee5923c3111b600a = []byte{ - // 757 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcb, 0x6e, 0xeb, 0x44, - 0x18, 0x3e, 0x73, 0x9a, 0x93, 0x36, 0xbf, 0x93, 0xb4, 0x9d, 0x96, 0x36, 0x04, 0x48, 0x20, 0x12, - 0x52, 0x85, 0x54, 0x07, 0xa5, 0x1b, 0x16, 0x48, 0x28, 0x37, 0xda, 0xa8, 0x4d, 0x13, 0x8d, 0x93, - 0x0d, 0x1b, 0xcb, 0xb1, 0x27, 0xc6, 0xc2, 0xf1, 0xb8, 0x9e, 0x49, 0xa5, 0xbc, 0x05, 0x3b, 0x78, - 0x04, 0xde, 0x80, 0x2d, 0xcb, 0x2e, 0x79, 0x02, 0x40, 0xad, 0xc4, 0x92, 0x67, 0x40, 0x33, 0x63, - 0x37, 0xe6, 0x52, 0x09, 0xa4, 0xb3, 0xb1, 0xe7, 0xbf, 0xff, 0xdf, 0xf7, 0x8d, 0x06, 0xea, 0x71, - 0xc2, 0x04, 0xe3, 0x6d, 0x16, 0x85, 0x41, 0x44, 0xd3, 0x9f, 0xa9, 0x9c, 0xb8, 0xa8, 0xad, 0xfa, - 0x67, 0x7e, 0x20, 0xbe, 0x5e, 0x2f, 0x4c, 0x97, 0xad, 0xda, 0x22, 0x61, 0xd1, 0xf9, 0x9a, 0xb7, - 0x7d, 0x76, 0xbe, 0x10, 0x4b, 0x7e, 0xee, 0xb2, 0xd5, 0x8a, 0x45, 0xed, 0x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 0xdd, 0xf7, - 0x72, 0xe5, 0x7f, 0x0f, 0xbe, 0xb8, 0x50, 0xef, 0x8b, 0x87, 0xc7, 0x06, 0xfa, 0xf9, 0xb1, 0x81, - 0x7e, 0x7b, 0x6c, 0xa0, 0xef, 0x9f, 0x1a, 0xe8, 0xa7, 0xa7, 0x06, 0x7a, 0x78, 0x6a, 0x20, 0xa8, - 0x06, 0xcc, 0x94, 0xaf, 0x6f, 0x5a, 0xd9, 0x33, 0x34, 0x1f, 0x53, 0x29, 0xde, 0x14, 0x7d, 0x95, - 0xbe, 0xdb, 0x8b, 0xa2, 0x52, 0xf3, 0xe2, 0xcf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xd9, 0x02, - 0x60, 0xe4, 0x05, 0x00, 0x00, + // 774 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x4f, 0xe3, 0x46, + 0x14, 0x67, 0x20, 0x04, 0xf2, 0x9c, 0x04, 0x18, 0x51, 0x48, 0xa3, 0xe2, 0xd0, 0x48, 0x95, 0x50, + 0x25, 0x9c, 0x36, 0x5c, 0x7a, 0xa8, 0x54, 0x85, 0x24, 0x85, 0xa8, 0x84, 0x44, 0xe3, 0x44, 0xaa, + 0x7a, 0xb1, 0x1c, 0x7b, 0xe2, 0x5a, 0x75, 0x3c, 0xc6, 0x33, 0x41, 0xca, 0xb7, 0xe8, 0xad, 0xfd, + 0x08, 0xfd, 0x06, 0xbd, 0xf6, 0xc8, 0xb1, 0x9f, 0xa0, 0xad, 0xe0, 0xde, 0xdb, 0xde, 0x57, 0x33, + 0xb6, 0x89, 0x57, 0x02, 0x69, 0x57, 0xda, 0x4b, 0x32, 0xef, 0xcd, 0x7b, 0x6f, 0x7e, 0x7f, 0x3c, + 0x03, 0xf5, 0x28, 0x66, 0x82, 0xf1, 0x16, 0x0b, 0x03, 0x3f, 0xa4, 0xe9, 0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0x1f, 0xad, 0x1d, 0xce, 0xdf, 0xb1, 0xfa, 0x71, 0xde, 0xf9, 0x7c, 0x43, 0x0f, 0xea, 0x3d, 0x96, + 0x3c, 0x2b, 0xc2, 0x16, 0x4b, 0x4e, 0x68, 0xc4, 0x62, 0x71, 0x6d, 0x87, 0x6e, 0x40, 0xe3, 0x57, + 0xc7, 0x55, 0x73, 0xe3, 0xe4, 0x1b, 0xf3, 0x23, 0x9c, 0x5c, 0x51, 0xf1, 0xc2, 0x0b, 0x95, 0x0d, + 0xd2, 0x73, 0x83, 0x5e, 0x28, 0x7b, 0x15, 0xdf, 0xe5, 0x77, 0x0f, 0x8f, 0x3a, 0xfa, 0xfb, 0x51, + 0x47, 0xff, 0x3d, 0xea, 0xe8, 0xf7, 0x27, 0x1d, 0xfd, 0xf5, 0xa4, 0xa3, 0x87, 0x27, 0x1d, 0x41, + 0xd5, 0x67, 0x86, 0x7c, 0x8f, 0xd3, 0xce, 0x4b, 0x2d, 0x91, 0x67, 0x2c, 0x2f, 0xcb, 0x18, 0xfd, + 0x94, 0xbe, 0xe4, 0xb3, 0xa2, 0xba, 0x3d, 0x17, 0x6f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x2a, 0x1b, + 0x2f, 0xfd, 0xf6, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -586,8 +587,8 @@ const _ = grpc.SupportPackageIsVersion4 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. type OnlineServiceClient interface { UpdateSignMetrics(ctx context.Context, in *ReqSignMetrics, opts ...grpc.CallOption) (*RespSignMetrics, error) - DoDailySignReportHandler(ctx context.Context, in *ReqSignMetrics, opts ...grpc.CallOption) (*Result, error) - GetLatestSignReport(ctx context.Context, in *ReqLatestSignReport, opts ...grpc.CallOption) (*RespSignMetrics, error) + DoDailyStatusReportHandler(ctx context.Context, in *ReqSignMetrics, opts ...grpc.CallOption) (*Result, error) + GetLastDailySignedInfoHandler(ctx context.Context, in *ReqLastDailySignedInfo, opts ...grpc.CallOption) (*RespSignMetrics, error) } type onlineServiceClient struct { @@ -607,18 +608,18 @@ func (c *onlineServiceClient) UpdateSignMetrics(ctx context.Context, in *ReqSign return out, nil } -func (c *onlineServiceClient) DoDailySignReportHandler(ctx context.Context, in *ReqSignMetrics, opts ...grpc.CallOption) (*Result, error) { +func (c *onlineServiceClient) DoDailyStatusReportHandler(ctx context.Context, in *ReqSignMetrics, opts ...grpc.CallOption) (*Result, error) { out := new(Result) - err := c.cc.Invoke(ctx, "/online.OnlineService/DoDailySignReportHandler", in, out, opts...) + err := c.cc.Invoke(ctx, "/online.OnlineService/DoDailyStatusReportHandler", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *onlineServiceClient) GetLatestSignReport(ctx context.Context, in *ReqLatestSignReport, opts ...grpc.CallOption) (*RespSignMetrics, error) { +func (c *onlineServiceClient) GetLastDailySignedInfoHandler(ctx context.Context, in *ReqLastDailySignedInfo, opts ...grpc.CallOption) (*RespSignMetrics, error) { out := new(RespSignMetrics) - err := c.cc.Invoke(ctx, "/online.OnlineService/GetLatestSignReport", in, out, opts...) + err := c.cc.Invoke(ctx, "/online.OnlineService/GetLastDailySignedInfoHandler", in, out, opts...) if err != nil { return nil, err } @@ -628,8 +629,8 @@ func (c *onlineServiceClient) GetLatestSignReport(ctx context.Context, in *ReqLa // OnlineServiceServer is the server API for OnlineService service. type OnlineServiceServer interface { UpdateSignMetrics(context.Context, *ReqSignMetrics) (*RespSignMetrics, error) - DoDailySignReportHandler(context.Context, *ReqSignMetrics) (*Result, error) - GetLatestSignReport(context.Context, *ReqLatestSignReport) (*RespSignMetrics, error) + DoDailyStatusReportHandler(context.Context, *ReqSignMetrics) (*Result, error) + GetLastDailySignedInfoHandler(context.Context, *ReqLastDailySignedInfo) (*RespSignMetrics, error) } // UnimplementedOnlineServiceServer can be embedded to have forward compatible implementations. @@ -639,11 +640,11 @@ type UnimplementedOnlineServiceServer struct { func (*UnimplementedOnlineServiceServer) UpdateSignMetrics(ctx context.Context, req *ReqSignMetrics) (*RespSignMetrics, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateSignMetrics not implemented") } -func (*UnimplementedOnlineServiceServer) DoDailySignReportHandler(ctx context.Context, req *ReqSignMetrics) (*Result, error) { - return nil, status.Errorf(codes.Unimplemented, "method DoDailySignReportHandler not implemented") +func (*UnimplementedOnlineServiceServer) DoDailyStatusReportHandler(ctx context.Context, req *ReqSignMetrics) (*Result, error) { + return nil, status.Errorf(codes.Unimplemented, "method DoDailyStatusReportHandler not implemented") } -func (*UnimplementedOnlineServiceServer) GetLatestSignReport(ctx context.Context, req *ReqLatestSignReport) (*RespSignMetrics, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLatestSignReport not implemented") +func (*UnimplementedOnlineServiceServer) GetLastDailySignedInfoHandler(ctx context.Context, req *ReqLastDailySignedInfo) (*RespSignMetrics, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLastDailySignedInfoHandler not implemented") } func RegisterOnlineServiceServer(s *grpc.Server, srv OnlineServiceServer) { @@ -668,38 +669,38 @@ func _OnlineService_UpdateSignMetrics_Handler(srv interface{}, ctx context.Conte return interceptor(ctx, in, info, handler) } -func _OnlineService_DoDailySignReportHandler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +func _OnlineService_DoDailyStatusReportHandler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(ReqSignMetrics) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(OnlineServiceServer).DoDailySignReportHandler(ctx, in) + return srv.(OnlineServiceServer).DoDailyStatusReportHandler(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/online.OnlineService/DoDailySignReportHandler", + FullMethod: "/online.OnlineService/DoDailyStatusReportHandler", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OnlineServiceServer).DoDailySignReportHandler(ctx, req.(*ReqSignMetrics)) + return srv.(OnlineServiceServer).DoDailyStatusReportHandler(ctx, req.(*ReqSignMetrics)) } return interceptor(ctx, in, info, handler) } -func _OnlineService_GetLatestSignReport_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(ReqLatestSignReport) +func _OnlineService_GetLastDailySignedInfoHandler_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReqLastDailySignedInfo) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(OnlineServiceServer).GetLatestSignReport(ctx, in) + return srv.(OnlineServiceServer).GetLastDailySignedInfoHandler(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/online.OnlineService/GetLatestSignReport", + FullMethod: "/online.OnlineService/GetLastDailySignedInfoHandler", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(OnlineServiceServer).GetLatestSignReport(ctx, req.(*ReqLatestSignReport)) + return srv.(OnlineServiceServer).GetLastDailySignedInfoHandler(ctx, req.(*ReqLastDailySignedInfo)) } return interceptor(ctx, in, info, handler) } @@ -713,19 +714,19 @@ var _OnlineService_serviceDesc = grpc.ServiceDesc{ Handler: _OnlineService_UpdateSignMetrics_Handler, }, { - MethodName: "DoDailySignReportHandler", - Handler: _OnlineService_DoDailySignReportHandler_Handler, + MethodName: "DoDailyStatusReportHandler", + Handler: _OnlineService_DoDailyStatusReportHandler_Handler, }, { - MethodName: "GetLatestSignReport", - Handler: _OnlineService_GetLatestSignReport_Handler, + MethodName: "GetLastDailySignedInfoHandler", + Handler: _OnlineService_GetLastDailySignedInfoHandler_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "protos/online/online.proto", } -func (m *ReqSignMetrics) Marshal() (dAtA []byte, err error) { +func (m *ReqLastDailySignedInfo) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -735,12 +736,12 @@ func (m *ReqSignMetrics) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ReqSignMetrics) MarshalTo(dAtA []byte) (int, error) { +func (m *ReqLastDailySignedInfo) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ReqSignMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ReqLastDailySignedInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -749,31 +750,17 @@ func (m *ReqSignMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Payload) > 0 { - i -= len(m.Payload) - copy(dAtA[i:], m.Payload) - i = encodeVarintOnline(dAtA, i, uint64(len(m.Payload))) - i-- - dAtA[i] = 0x1a - } - if len(m.Signature) > 0 { - i -= len(m.Signature) - copy(dAtA[i:], m.Signature) - i = encodeVarintOnline(dAtA, i, uint64(len(m.Signature))) - i-- - dAtA[i] = 0x12 - } - if len(m.PublicKey) > 0 { - i -= len(m.PublicKey) - copy(dAtA[i:], m.PublicKey) - i = encodeVarintOnline(dAtA, i, uint64(len(m.PublicKey))) + if len(m.PeerId) > 0 { + i -= len(m.PeerId) + copy(dAtA[i:], m.PeerId) + i = encodeVarintOnline(dAtA, i, uint64(len(m.PeerId))) i-- dAtA[i] = 0xa } return len(dAtA) - i, nil } -func (m *PayLoadInfo) Marshal() (dAtA []byte, err error) { +func (m *Result) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -783,12 +770,12 @@ func (m *PayLoadInfo) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *PayLoadInfo) MarshalTo(dAtA []byte) (int, error) { +func (m *Result) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *PayLoadInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *Result) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -797,27 +784,122 @@ func (m *PayLoadInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - n1, err1 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastTime):]) + n1, err1 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) if err1 != nil { return 0, err1 } i -= n1 i = encodeVarintOnline(dAtA, i, uint64(n1)) i-- - dAtA[i] = 0x2a - if len(m.LastSignature) > 0 { - i -= len(m.LastSignature) - copy(dAtA[i:], m.LastSignature) - i = encodeVarintOnline(dAtA, i, uint64(len(m.LastSignature))) + dAtA[i] = 0x1a + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintOnline(dAtA, i, uint64(len(m.Message))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x12 } - if m.LastSignedInfo != nil { - { - size, err := m.LastSignedInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } + if m.Code != 0 { + i = encodeVarintOnline(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func (m *ReqSignMetrics) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *ReqSignMetrics) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReqSignMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Payload) > 0 { + i -= len(m.Payload) + copy(dAtA[i:], m.Payload) + i = encodeVarintOnline(dAtA, i, uint64(len(m.Payload))) + i-- + dAtA[i] = 0x1a + } + if len(m.Signature) > 0 { + i -= len(m.Signature) + copy(dAtA[i:], m.Signature) + i = encodeVarintOnline(dAtA, i, uint64(len(m.Signature))) + i-- + dAtA[i] = 0x12 + } + if len(m.PublicKey) > 0 { + i -= len(m.PublicKey) + copy(dAtA[i:], m.PublicKey) + i = encodeVarintOnline(dAtA, i, uint64(len(m.PublicKey))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *PayLoadInfo) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *PayLoadInfo) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *PayLoadInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + n2, err2 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.LastTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.LastTime):]) + if err2 != nil { + return 0, err2 + } + i -= n2 + i = encodeVarintOnline(dAtA, i, uint64(n2)) + i-- + dAtA[i] = 0x2a + if len(m.LastSignature) > 0 { + i -= len(m.LastSignature) + copy(dAtA[i:], m.LastSignature) + i = encodeVarintOnline(dAtA, i, uint64(len(m.LastSignature))) + i-- + dAtA[i] = 0x22 + } + if m.LastSignedInfo != nil { + { + size, err := m.LastSignedInfo.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } i -= size i = encodeVarintOnline(dAtA, i, uint64(size)) } @@ -967,98 +1049,54 @@ func (m *SignedInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *ReqLatestSignReport) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func encodeVarintOnline(dAtA []byte, offset int, v uint64) int { + offset -= sovOnline(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ } - return dAtA[:n], nil -} - -func (m *ReqLatestSignReport) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) + dAtA[offset] = uint8(v) + return base } - -func (m *ReqLatestSignReport) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i +func (m *ReqLastDailySignedInfo) Size() (n int) { + if m == nil { + return 0 + } var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) + l = len(m.PeerId) + if l > 0 { + n += 1 + l + sovOnline(uint64(l)) } - if len(m.NodeId) > 0 { - i -= len(m.NodeId) - copy(dAtA[i:], m.NodeId) - i = encodeVarintOnline(dAtA, i, uint64(len(m.NodeId))) - i-- - dAtA[i] = 0xa + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return len(dAtA) - i, nil + return n } -func (m *Result) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err +func (m *Result) Size() (n int) { + if m == nil { + return 0 } - return dAtA[:n], nil -} - -func (m *Result) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Result) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i var l int _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - n5, err5 := github_com_tron_us_protobuf_types.StdTimeMarshalTo(m.ResponseTime, dAtA[i-github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime):]) - if err5 != nil { - return 0, err5 + if m.Code != 0 { + n += 1 + sovOnline(uint64(m.Code)) } - i -= n5 - i = encodeVarintOnline(dAtA, i, uint64(n5)) - i-- - dAtA[i] = 0x1a - if len(m.Message) > 0 { - i -= len(m.Message) - copy(dAtA[i:], m.Message) - i = encodeVarintOnline(dAtA, i, uint64(len(m.Message))) - i-- - dAtA[i] = 0x12 + l = len(m.Message) + if l > 0 { + n += 1 + l + sovOnline(uint64(l)) } - if m.Code != 0 { - i = encodeVarintOnline(dAtA, i, uint64(m.Code)) - i-- - dAtA[i] = 0x8 + l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) + n += 1 + l + sovOnline(uint64(l)) + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) } - return len(dAtA) - i, nil + return n } -func encodeVarintOnline(dAtA []byte, offset int, v uint64) int { - offset -= sovOnline(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} func (m *ReqSignMetrics) Size() (n int) { if m == nil { return 0 @@ -1173,48 +1211,235 @@ func (m *SignedInfo) Size() (n int) { return n } -func (m *ReqLatestSignReport) Size() (n int) { - if m == nil { - return 0 +func sovOnline(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozOnline(x uint64) (n int) { + return sovOnline(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *ReqLastDailySignedInfo) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOnline + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: ReqLastDailySignedInfo: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReqLastDailySignedInfo: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field PeerId", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOnline + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOnline + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOnline + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.PeerId = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOnline(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOnline + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthOnline + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } } - var l int - _ = l - l = len(m.NodeId) - if l > 0 { - n += 1 + l + sovOnline(uint64(l)) + + if iNdEx > l { + return io.ErrUnexpectedEOF } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + return nil +} +func (m *Result) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOnline + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: Result: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: Result: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) + } + m.Code = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOnline + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= ResponseCode(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOnline + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthOnline + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthOnline + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Message = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowOnline + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthOnline + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthOnline + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipOnline(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthOnline + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthOnline + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } } - return n -} -func (m *Result) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Code != 0 { - n += 1 + sovOnline(uint64(m.Code)) - } - l = len(m.Message) - if l > 0 { - n += 1 + l + sovOnline(uint64(l)) - } - l = github_com_tron_us_protobuf_types.SizeOfStdTime(m.ResponseTime) - n += 1 + l + sovOnline(uint64(l)) - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) + if iNdEx > l { + return io.ErrUnexpectedEOF } - return n -} - -func sovOnline(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozOnline(x uint64) (n int) { - return sovOnline(uint64((x << 1) ^ uint64((int64(x) >> 63)))) + return nil } func (m *ReqSignMetrics) Unmarshal(dAtA []byte) error { l := len(dAtA) @@ -1975,230 +2200,6 @@ func (m *SignedInfo) Unmarshal(dAtA []byte) error { } return nil } -func (m *ReqLatestSignReport) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: ReqLatestSignReport: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: ReqLatestSignReport: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.NodeId = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOnline(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOnline - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthOnline - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Result) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: Result: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Result: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Code", wireType) - } - m.Code = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Code |= ResponseCode(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Message", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Message = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResponseTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowOnline - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthOnline - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthOnline - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if err := github_com_tron_us_protobuf_types.StdTimeUnmarshal(&m.ResponseTime, dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipOnline(dAtA[iNdEx:]) - if err != nil { - return err - } - if skippy < 0 { - return ErrInvalidLengthOnline - } - if (iNdEx + skippy) < 0 { - return ErrInvalidLengthOnline - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} func skipOnline(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0