From 930e447fc49e263c2a1ecdd537a6e26df849e6ef Mon Sep 17 00:00:00 2001 From: fish <920886811@163.com> Date: Mon, 5 Dec 2022 15:03:20 +0800 Subject: [PATCH] feat: add DoDailySignReportHandler of online --- js/protos/online/online_pb.js | 451 ++++++++++++++++++++-- protos/online/online.pb.go | 684 ++++++++++++++++++++++++++++++---- protos/online/online.proto | 17 +- 3 files changed, 1047 insertions(+), 105 deletions(-) diff --git a/js/protos/online/online_pb.js b/js/protos/online/online_pb.js index c4b84fa..17316e0 100644 --- a/js/protos/online/online_pb.js +++ b/js/protos/online/online_pb.js @@ -19,9 +19,11 @@ 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.ReqSignMetrics', null, global); goog.exportSymbol('proto.online.RespSignMetrics', null, global); goog.exportSymbol('proto.online.ResponseCode', null, global); +goog.exportSymbol('proto.online.Result', null, global); goog.exportSymbol('proto.online.SignedInfo', null, global); /** * Generated by JsPbCodeGenerator. @@ -33,16 +35,16 @@ goog.exportSymbol('proto.online.SignedInfo', null, global); * @extends {jspb.Message} * @constructor */ -proto.online.ReqSignMetrics = function(opt_data) { +proto.online.ReqLatestSignReport = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.online.ReqSignMetrics, jspb.Message); +goog.inherits(proto.online.ReqLatestSignReport, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.online.ReqSignMetrics.displayName = 'proto.online.ReqSignMetrics'; + proto.online.ReqLatestSignReport.displayName = 'proto.online.ReqLatestSignReport'; } /** * Generated by JsPbCodeGenerator. @@ -107,6 +109,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.online.SignedInfo.displayName = 'proto.online.SignedInfo'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.online.ReqSignMetrics = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.online.ReqSignMetrics, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.online.ReqSignMetrics.displayName = 'proto.online.ReqSignMetrics'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.online.Result = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.online.Result, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.online.Result.displayName = 'proto.online.Result'; +} @@ -123,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.ReqLatestSignReport.prototype.toObject = function(opt_includeInstance) { + return proto.online.ReqLatestSignReport.toObject(opt_includeInstance, this); }; @@ -133,11 +177,11 @@ 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.ReqLatestSignReport} 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.ReqLatestSignReport.toObject = function(includeInstance, msg) { var f, obj = { publicKey: msg.getPublicKey_asB64(), signature: msg.getSignature_asB64(), @@ -155,23 +199,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.ReqLatestSignReport} */ -proto.online.ReqSignMetrics.deserializeBinary = function(bytes) { +proto.online.ReqLatestSignReport.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.ReqLatestSignReport; + return proto.online.ReqLatestSignReport.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.ReqLatestSignReport} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.online.ReqSignMetrics} + * @return {!proto.online.ReqLatestSignReport} */ -proto.online.ReqSignMetrics.deserializeBinaryFromReader = function(msg, reader) { +proto.online.ReqLatestSignReport.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -203,9 +247,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.ReqLatestSignReport.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.online.ReqSignMetrics.serializeBinaryToWriter(this, writer); + proto.online.ReqLatestSignReport.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -213,11 +257,11 @@ 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.ReqLatestSignReport} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.online.ReqSignMetrics.serializeBinaryToWriter = function(message, writer) { +proto.online.ReqLatestSignReport.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getPublicKey_asU8(); if (f.length > 0) { @@ -247,7 +291,7 @@ proto.online.ReqSignMetrics.serializeBinaryToWriter = function(message, writer) * optional bytes public_key = 1; * @return {!(string|Uint8Array)} */ -proto.online.ReqSignMetrics.prototype.getPublicKey = function() { +proto.online.ReqLatestSignReport.prototype.getPublicKey = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; @@ -257,7 +301,7 @@ proto.online.ReqSignMetrics.prototype.getPublicKey = function() { * This is a type-conversion wrapper around `getPublicKey()` * @return {string} */ -proto.online.ReqSignMetrics.prototype.getPublicKey_asB64 = function() { +proto.online.ReqLatestSignReport.prototype.getPublicKey_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPublicKey())); }; @@ -270,7 +314,7 @@ proto.online.ReqSignMetrics.prototype.getPublicKey_asB64 = function() { * This is a type-conversion wrapper around `getPublicKey()` * @return {!Uint8Array} */ -proto.online.ReqSignMetrics.prototype.getPublicKey_asU8 = function() { +proto.online.ReqLatestSignReport.prototype.getPublicKey_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPublicKey())); }; @@ -278,9 +322,9 @@ proto.online.ReqSignMetrics.prototype.getPublicKey_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.online.ReqSignMetrics} returns this + * @return {!proto.online.ReqLatestSignReport} returns this */ -proto.online.ReqSignMetrics.prototype.setPublicKey = function(value) { +proto.online.ReqLatestSignReport.prototype.setPublicKey = function(value) { return jspb.Message.setProto3BytesField(this, 1, value); }; @@ -289,7 +333,7 @@ proto.online.ReqSignMetrics.prototype.setPublicKey = function(value) { * optional bytes signature = 2; * @return {!(string|Uint8Array)} */ -proto.online.ReqSignMetrics.prototype.getSignature = function() { +proto.online.ReqLatestSignReport.prototype.getSignature = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -299,7 +343,7 @@ proto.online.ReqSignMetrics.prototype.getSignature = function() { * This is a type-conversion wrapper around `getSignature()` * @return {string} */ -proto.online.ReqSignMetrics.prototype.getSignature_asB64 = function() { +proto.online.ReqLatestSignReport.prototype.getSignature_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getSignature())); }; @@ -312,7 +356,7 @@ proto.online.ReqSignMetrics.prototype.getSignature_asB64 = function() { * This is a type-conversion wrapper around `getSignature()` * @return {!Uint8Array} */ -proto.online.ReqSignMetrics.prototype.getSignature_asU8 = function() { +proto.online.ReqLatestSignReport.prototype.getSignature_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getSignature())); }; @@ -320,9 +364,9 @@ proto.online.ReqSignMetrics.prototype.getSignature_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.online.ReqSignMetrics} returns this + * @return {!proto.online.ReqLatestSignReport} returns this */ -proto.online.ReqSignMetrics.prototype.setSignature = function(value) { +proto.online.ReqLatestSignReport.prototype.setSignature = function(value) { return jspb.Message.setProto3BytesField(this, 2, value); }; @@ -331,7 +375,7 @@ proto.online.ReqSignMetrics.prototype.setSignature = function(value) { * optional bytes payload = 3; * @return {!(string|Uint8Array)} */ -proto.online.ReqSignMetrics.prototype.getPayload = function() { +proto.online.ReqLatestSignReport.prototype.getPayload = function() { return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; @@ -341,7 +385,7 @@ proto.online.ReqSignMetrics.prototype.getPayload = function() { * This is a type-conversion wrapper around `getPayload()` * @return {string} */ -proto.online.ReqSignMetrics.prototype.getPayload_asB64 = function() { +proto.online.ReqLatestSignReport.prototype.getPayload_asB64 = function() { return /** @type {string} */ (jspb.Message.bytesAsB64( this.getPayload())); }; @@ -354,7 +398,7 @@ proto.online.ReqSignMetrics.prototype.getPayload_asB64 = function() { * This is a type-conversion wrapper around `getPayload()` * @return {!Uint8Array} */ -proto.online.ReqSignMetrics.prototype.getPayload_asU8 = function() { +proto.online.ReqLatestSignReport.prototype.getPayload_asU8 = function() { return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( this.getPayload())); }; @@ -362,9 +406,9 @@ proto.online.ReqSignMetrics.prototype.getPayload_asU8 = function() { /** * @param {!(string|Uint8Array)} value - * @return {!proto.online.ReqSignMetrics} returns this + * @return {!proto.online.ReqLatestSignReport} returns this */ -proto.online.ReqSignMetrics.prototype.setPayload = function(value) { +proto.online.ReqLatestSignReport.prototype.setPayload = function(value) { return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -1203,6 +1247,347 @@ proto.online.SignedInfo.prototype.setSignedTime = function(value) { }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.online.ReqSignMetrics.prototype.toObject = function(opt_includeInstance) { + return proto.online.ReqSignMetrics.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.online.ReqSignMetrics.toObject = function(includeInstance, msg) { + var f, obj = { + nodeId: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.online.ReqSignMetrics} + */ +proto.online.ReqSignMetrics.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.ReqSignMetrics} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.online.ReqSignMetrics} + */ +proto.online.ReqSignMetrics.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNodeId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.online.ReqSignMetrics.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.online.ReqSignMetrics.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.online.ReqSignMetrics} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.online.ReqSignMetrics.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string node_id = 1; + * @return {string} + */ +proto.online.ReqSignMetrics.prototype.getNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.online.ReqSignMetrics} returns this + */ +proto.online.ReqSignMetrics.prototype.setNodeId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.online.Result.prototype.toObject = function(opt_includeInstance) { + return proto.online.Result.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @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. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.online.Result.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) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.online.Result} + */ +proto.online.Result.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.Result} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.online.Result} + */ +proto.online.Result.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + 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.setMessage(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setResponseTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.online.Result.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.online.Result.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.online.Result} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.online.Result.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getResponseTime(); + if (f != null) { + writer.writeMessage( + 3, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ResponseCode code = 1; + * @return {!proto.online.ResponseCode} + */ +proto.online.Result.prototype.getCode = function() { + return /** @type {!proto.online.ResponseCode} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.online.ResponseCode} value + * @return {!proto.online.Result} returns this + */ +proto.online.Result.prototype.setCode = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.online.Result.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.online.Result} returns this + */ +proto.online.Result.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional google.protobuf.Timestamp response_time = 3; + * @return {?proto.google.protobuf.Timestamp} + */ +proto.online.Result.prototype.getResponseTime = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); +}; + + +/** + * @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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.online.Result} returns this + */ +proto.online.Result.prototype.clearResponseTime = function() { + return this.setResponseTime(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.online.Result.prototype.hasResponseTime = function() { + return jspb.Message.getField(this, 3) != null; +}; + + /** * @enum {number} */ diff --git a/protos/online/online.pb.go b/protos/online/online.pb.go index fbfba7c..7e8dcb2 100644 --- a/protos/online/online.pb.go +++ b/protos/online/online.pb.go @@ -68,7 +68,7 @@ func (ResponseCode) EnumDescriptor() ([]byte, []int) { return fileDescriptor_ee5923c3111b600a, []int{0} } -type ReqSignMetrics struct { +type ReqLatestSignReport 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"` Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty" pg:"payload"` @@ -77,18 +77,18 @@ type ReqSignMetrics struct { XXX_sizecache int32 `json:"-" pg:"-"` } -func (m *ReqSignMetrics) Reset() { *m = ReqSignMetrics{} } -func (m *ReqSignMetrics) String() string { return proto.CompactTextString(m) } -func (*ReqSignMetrics) ProtoMessage() {} -func (*ReqSignMetrics) Descriptor() ([]byte, []int) { +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{0} } -func (m *ReqSignMetrics) XXX_Unmarshal(b []byte) error { +func (m *ReqLatestSignReport) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) } -func (m *ReqSignMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { +func (m *ReqLatestSignReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { if deterministic { - return xxx_messageInfo_ReqSignMetrics.Marshal(b, m, deterministic) + return xxx_messageInfo_ReqLatestSignReport.Marshal(b, m, deterministic) } else { b = b[:cap(b)] n, err := m.MarshalToSizedBuffer(b) @@ -98,41 +98,41 @@ func (m *ReqSignMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, erro return b[:n], nil } } -func (m *ReqSignMetrics) XXX_Merge(src proto.Message) { - xxx_messageInfo_ReqSignMetrics.Merge(m, src) +func (m *ReqLatestSignReport) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReqLatestSignReport.Merge(m, src) } -func (m *ReqSignMetrics) XXX_Size() int { +func (m *ReqLatestSignReport) XXX_Size() int { return m.Size() } -func (m *ReqSignMetrics) XXX_DiscardUnknown() { - xxx_messageInfo_ReqSignMetrics.DiscardUnknown(m) +func (m *ReqLatestSignReport) XXX_DiscardUnknown() { + xxx_messageInfo_ReqLatestSignReport.DiscardUnknown(m) } -var xxx_messageInfo_ReqSignMetrics proto.InternalMessageInfo +var xxx_messageInfo_ReqLatestSignReport proto.InternalMessageInfo -func (m *ReqSignMetrics) GetPublicKey() []byte { +func (m *ReqLatestSignReport) GetPublicKey() []byte { if m != nil { return m.PublicKey } return nil } -func (m *ReqSignMetrics) GetSignature() []byte { +func (m *ReqLatestSignReport) GetSignature() []byte { if m != nil { return m.Signature } return nil } -func (m *ReqSignMetrics) GetPayload() []byte { +func (m *ReqLatestSignReport) GetPayload() []byte { if m != nil { return m.Payload } return nil } -func (*ReqSignMetrics) XXX_MessageName() string { - return "online.ReqSignMetrics" +func (*ReqLatestSignReport) XXX_MessageName() string { + return "online.ReqLatestSignReport" } type PayLoadInfo struct { @@ -383,66 +383,194 @@ func (m *SignedInfo) GetSignedTime() uint32 { func (*SignedInfo) XXX_MessageName() string { return "online.SignedInfo" } + +type ReqSignMetrics 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 *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{4} +} +func (m *ReqSignMetrics) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ReqSignMetrics) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ReqSignMetrics.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 *ReqSignMetrics) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReqSignMetrics.Merge(m, src) +} +func (m *ReqSignMetrics) XXX_Size() int { + return m.Size() +} +func (m *ReqSignMetrics) XXX_DiscardUnknown() { + xxx_messageInfo_ReqSignMetrics.DiscardUnknown(m) +} + +var xxx_messageInfo_ReqSignMetrics proto.InternalMessageInfo + +func (m *ReqSignMetrics) GetNodeId() string { + if m != nil { + return m.NodeId + } + return "" +} + +func (*ReqSignMetrics) XXX_MessageName() string { + return "online.ReqSignMetrics" +} + +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((*ReqSignMetrics)(nil), "online.ReqSignMetrics") - golang_proto.RegisterType((*ReqSignMetrics)(nil), "online.ReqSignMetrics") + proto.RegisterType((*ReqLatestSignReport)(nil), "online.ReqLatestSignReport") + golang_proto.RegisterType((*ReqLatestSignReport)(nil), "online.ReqLatestSignReport") proto.RegisterType((*PayLoadInfo)(nil), "online.PayLoadInfo") golang_proto.RegisterType((*PayLoadInfo)(nil), "online.PayLoadInfo") proto.RegisterType((*RespSignMetrics)(nil), "online.RespSignMetrics") golang_proto.RegisterType((*RespSignMetrics)(nil), "online.RespSignMetrics") proto.RegisterType((*SignedInfo)(nil), "online.SignedInfo") golang_proto.RegisterType((*SignedInfo)(nil), "online.SignedInfo") + proto.RegisterType((*ReqSignMetrics)(nil), "online.ReqSignMetrics") + golang_proto.RegisterType((*ReqSignMetrics)(nil), "online.ReqSignMetrics") + 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{ - // 670 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xcd, 0x6e, 0xd3, 0x4c, - 0x14, 0xed, 0xb4, 0x69, 0x5a, 0x5f, 0x37, 0x69, 0x3b, 0xea, 0xd7, 0xe6, 0x8b, 0xc0, 0x81, 0x48, - 0x48, 0x15, 0x52, 0x1d, 0x94, 0x6e, 0x58, 0x20, 0xa1, 0x34, 0x35, 0x10, 0x41, 0x9a, 0x68, 0x9c, - 0x6c, 0xd8, 0x58, 0x8e, 0x3d, 0x31, 0x16, 0x89, 0xc7, 0x78, 0x9c, 0x4a, 0x79, 0x0b, 0x96, 0x3c, - 0x02, 0x6f, 0xc0, 0x96, 0x65, 0x97, 0x3c, 0x01, 0xa0, 0x76, 0xcf, 0x33, 0xa0, 0x99, 0xb1, 0x13, - 0x23, 0xb1, 0x60, 0x93, 0xcc, 0x3d, 0xf7, 0xe7, 0xcc, 0x39, 0xd7, 0x36, 0xd4, 0xe3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, 0x79, - 0xa1, 0x2b, 0xfa, 0xa1, 0x78, 0x16, 0x87, 0xe8, 0x6d, 0xf6, 0x6d, 0x99, 0x94, 0xe5, 0xc3, 0x79, - 0xfe, 0x3b, 0x00, 0x00, 0xff, 0xff, 0xc8, 0x75, 0xbf, 0xac, 0x88, 0x04, 0x00, 0x00, + // 760 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcb, 0x6e, 0xf3, 0x44, + 0x14, 0xfe, 0xe7, 0x6f, 0xfe, 0xb4, 0x39, 0x4e, 0xd2, 0x76, 0x5a, 0xda, 0x10, 0x20, 0x81, 0x48, + 0x48, 0x05, 0xa9, 0x0e, 0x4a, 0x37, 0x2c, 0x90, 0x50, 0x6e, 0xb4, 0x51, 0x9b, 0x26, 0x1a, 0x27, + 0x1b, 0x36, 0x96, 0x63, 0x4f, 0x8c, 0x85, 0xe3, 0x71, 0x3d, 0x93, 0x4a, 0x79, 0x0b, 0x76, 0xf0, + 0x08, 0xbc, 0x01, 0x5b, 0x96, 0x5d, 0xf2, 0x04, 0x80, 0x5a, 0x89, 0x25, 0xcf, 0x80, 0x66, 0xc6, + 0x6e, 0xcc, 0xa5, 0x12, 0x48, 0x6c, 0x92, 0x39, 0x97, 0xef, 0x9c, 0xf3, 0x7d, 0xc7, 0x3a, 0x50, + 0x8f, 0x13, 0x26, 0x18, 0x6f, 0xb3, 0x28, 0x0c, 0x22, 0x9a, 0xfe, 0x99, 0xca, 0x89, 0x8b, 0xda, + 0xaa, 0x7f, 0xea, 0x07, 0xe2, 0xab, 0xf5, 0xc2, 0x74, 0xd9, 0xaa, 0x2d, 0x12, 0x16, 0x9d, 0xaf, + 0x79, 0xdb, 0x67, 0xe7, 0x0b, 0xb1, 0xe4, 0xe7, 0x2e, 0x5b, 0xad, 0x58, 0xd4, 0x4e, 0xab, 0x44, + 0xcc, 0xa3, 0xea, 0x47, 0x57,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0x0e, 0xd4, 0xfb, 0xfc, 0xe1, 0xb1, 0x81, + 0x7e, 0x7a, 0x6c, 0xa0, 0x5f, 0x1f, 0x1b, 0xe8, 0xbb, 0xa7, 0x06, 0xfa, 0xf1, 0xa9, 0x81, 0x1e, + 0x9e, 0x1a, 0x08, 0xaa, 0x01, 0x33, 0xe5, 0xf5, 0x4d, 0x91, 0x3d, 0x43, 0xeb, 0x31, 0x95, 0xcb, + 0x9b, 0xa2, 0x2f, 0xd3, 0xbb, 0xbd, 0x28, 0xaa, 0x6d, 0x5e, 0xfc, 0x11, 0x00, 0x00, 0xff, 0xff, + 0x61, 0x5a, 0xdc, 0x79, 0xe4, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -458,6 +586,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) } type onlineServiceClient struct { @@ -477,9 +607,29 @@ 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) { + out := new(Result) + err := c.cc.Invoke(ctx, "/online.OnlineService/DoDailySignReportHandler", 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) { + out := new(RespSignMetrics) + err := c.cc.Invoke(ctx, "/online.OnlineService/GetLatestSignReport", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // 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) } // UnimplementedOnlineServiceServer can be embedded to have forward compatible implementations. @@ -489,6 +639,12 @@ 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) GetLatestSignReport(ctx context.Context, req *ReqLatestSignReport) (*RespSignMetrics, error) { + return nil, status.Errorf(codes.Unimplemented, "method GetLatestSignReport not implemented") +} func RegisterOnlineServiceServer(s *grpc.Server, srv OnlineServiceServer) { s.RegisterService(&_OnlineService_serviceDesc, srv) @@ -512,6 +668,42 @@ 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) { + in := new(ReqSignMetrics) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OnlineServiceServer).DoDailySignReportHandler(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/online.OnlineService/DoDailySignReportHandler", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OnlineServiceServer).DoDailySignReportHandler(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) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(OnlineServiceServer).GetLatestSignReport(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/online.OnlineService/GetLatestSignReport", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(OnlineServiceServer).GetLatestSignReport(ctx, req.(*ReqLatestSignReport)) + } + return interceptor(ctx, in, info, handler) +} + var _OnlineService_serviceDesc = grpc.ServiceDesc{ ServiceName: "online.OnlineService", HandlerType: (*OnlineServiceServer)(nil), @@ -520,12 +712,20 @@ var _OnlineService_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateSignMetrics", Handler: _OnlineService_UpdateSignMetrics_Handler, }, + { + MethodName: "DoDailySignReportHandler", + Handler: _OnlineService_DoDailySignReportHandler_Handler, + }, + { + MethodName: "GetLatestSignReport", + Handler: _OnlineService_GetLatestSignReport_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "protos/online/online.proto", } -func (m *ReqSignMetrics) Marshal() (dAtA []byte, err error) { +func (m *ReqLatestSignReport) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -535,12 +735,12 @@ func (m *ReqSignMetrics) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *ReqSignMetrics) MarshalTo(dAtA []byte) (int, error) { +func (m *ReqLatestSignReport) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *ReqSignMetrics) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *ReqLatestSignReport) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -767,6 +967,87 @@ func (m *SignedInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { 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.NodeId) > 0 { + i -= len(m.NodeId) + copy(dAtA[i:], m.NodeId) + i = encodeVarintOnline(dAtA, i, uint64(len(m.NodeId))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +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 + } + 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 + } + 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 + } + if m.Code != 0 { + i = encodeVarintOnline(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + func encodeVarintOnline(dAtA []byte, offset int, v uint64) int { offset -= sovOnline(v) base := offset @@ -778,7 +1059,7 @@ func encodeVarintOnline(dAtA []byte, offset int, v uint64) int { dAtA[offset] = uint8(v) return base } -func (m *ReqSignMetrics) Size() (n int) { +func (m *ReqLatestSignReport) Size() (n int) { if m == nil { return 0 } @@ -892,13 +1173,50 @@ func (m *SignedInfo) Size() (n int) { return n } +func (m *ReqSignMetrics) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.NodeId) + if l > 0 { + n += 1 + l + sovOnline(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + 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) + } + 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)))) } -func (m *ReqSignMetrics) Unmarshal(dAtA []byte) error { +func (m *ReqLatestSignReport) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 for iNdEx < l { @@ -921,10 +1239,10 @@ func (m *ReqSignMetrics) Unmarshal(dAtA []byte) error { fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return fmt.Errorf("proto: ReqSignMetrics: wiretype end group for non-group") + return fmt.Errorf("proto: ReqLatestSignReport: wiretype end group for non-group") } if fieldNum <= 0 { - return fmt.Errorf("proto: ReqSignMetrics: illegal tag %d (wire type %d)", fieldNum, wire) + return fmt.Errorf("proto: ReqLatestSignReport: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -1657,6 +1975,230 @@ func (m *SignedInfo) Unmarshal(dAtA []byte) error { } return nil } +func (m *ReqSignMetrics) 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: ReqSignMetrics: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReqSignMetrics: 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 diff --git a/protos/online/online.proto b/protos/online/online.proto index 5d69a06..3fe6e25 100644 --- a/protos/online/online.proto +++ b/protos/online/online.proto @@ -22,9 +22,11 @@ import "google/protobuf/timestamp.proto"; service OnlineService { rpc UpdateSignMetrics(ReqSignMetrics) returns (RespSignMetrics); + rpc DoDailySignReportHandler(ReqSignMetrics) returns (Result); + rpc GetLatestSignReport(ReqLatestSignReport) returns (RespSignMetrics); } -message ReqSignMetrics { +message ReqLatestSignReport { bytes public_key = 1; bytes signature = 2; bytes payload = 3; @@ -64,3 +66,16 @@ message SignedInfo { string bttc_address = 5; uint32 signed_time = 6; } + +message ReqSignMetrics { + string node_id = 1; +} + +message Result { + ResponseCode code = 1; + string message = 2; + google.protobuf.Timestamp response_time = 3 [ + (gogoproto.nullable) = false, + (gogoproto.stdtime) = true + ]; +}