diff --git a/js/protos/nft/nft_pb.js b/js/protos/nft/nft_pb.js index 2f936fb..4ae5a79 100644 --- a/js/protos/nft/nft_pb.js +++ b/js/protos/nft/nft_pb.js @@ -19,10 +19,12 @@ goog.object.extend(proto, google_protobuf_timestamp_pb); goog.exportSymbol('proto.nft.NftTab', null, global); goog.exportSymbol('proto.nft.ReqCheckDownload', null, global); goog.exportSymbol('proto.nft.ReqGetFiles', null, global); +goog.exportSymbol('proto.nft.ReqStatus', null, global); goog.exportSymbol('proto.nft.ReqSubscribe', null, global); goog.exportSymbol('proto.nft.ReqUpLoad', null, global); goog.exportSymbol('proto.nft.RespCheckDownload', null, global); goog.exportSymbol('proto.nft.RespGetFiles', null, global); +goog.exportSymbol('proto.nft.RespStatus', null, global); goog.exportSymbol('proto.nft.RespSubscribe', null, global); goog.exportSymbol('proto.nft.RespUpLoad', null, global); goog.exportSymbol('proto.nft.UserTab', null, global); @@ -236,6 +238,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.nft.RespSubscribe.displayName = 'proto.nft.RespSubscribe'; } +/** + * 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.nft.ReqStatus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.nft.ReqStatus, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.nft.ReqStatus.displayName = 'proto.nft.ReqStatus'; +} +/** + * 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.nft.RespStatus = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.nft.RespStatus, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.nft.RespStatus.displayName = 'proto.nft.RespStatus'; +} @@ -273,11 +317,12 @@ proto.nft.NftTab.toObject = function(includeInstance, msg) { chainId: jspb.Message.getFieldWithDefault(msg, 3, ""), fileHash: jspb.Message.getFieldWithDefault(msg, 4, ""), fileName: jspb.Message.getFieldWithDefault(msg, 5, ""), - fileSize: jspb.Message.getFieldWithDefault(msg, 6, 0), - thumbnail: jspb.Message.getFieldWithDefault(msg, 7, ""), - transactionId: jspb.Message.getFieldWithDefault(msg, 8, ""), - signature: jspb.Message.getFieldWithDefault(msg, 9, ""), - description: jspb.Message.getFieldWithDefault(msg, 10, ""), + fileType: jspb.Message.getFieldWithDefault(msg, 6, ""), + fileSize: jspb.Message.getFieldWithDefault(msg, 7, 0), + thumbnail: jspb.Message.getFieldWithDefault(msg, 8, ""), + transactionId: jspb.Message.getFieldWithDefault(msg, 9, ""), + signature: jspb.Message.getFieldWithDefault(msg, 10, ""), + description: jspb.Message.getFieldWithDefault(msg, 11, ""), timeCreated: (f = msg.getTimeCreated()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; @@ -336,26 +381,30 @@ proto.nft.NftTab.deserializeBinaryFromReader = function(msg, reader) { msg.setFileName(value); break; case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setFileType(value); + break; + case 7: var value = /** @type {number} */ (reader.readInt32()); msg.setFileSize(value); break; - case 7: + case 8: var value = /** @type {string} */ (reader.readString()); msg.setThumbnail(value); break; - case 8: + case 9: var value = /** @type {string} */ (reader.readString()); msg.setTransactionId(value); break; - case 9: + case 10: var value = /** @type {string} */ (reader.readString()); msg.setSignature(value); break; - case 10: + case 11: var value = /** @type {string} */ (reader.readString()); msg.setDescription(value); break; - case 11: + case 12: var value = new google_protobuf_timestamp_pb.Timestamp; reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setTimeCreated(value); @@ -424,45 +473,52 @@ proto.nft.NftTab.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getFileType(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } f = message.getFileSize(); if (f !== 0) { writer.writeInt32( - 6, + 7, f ); } f = message.getThumbnail(); if (f.length > 0) { writer.writeString( - 7, + 8, f ); } f = message.getTransactionId(); if (f.length > 0) { writer.writeString( - 8, + 9, f ); } f = message.getSignature(); if (f.length > 0) { writer.writeString( - 9, + 10, f ); } f = message.getDescription(); if (f.length > 0) { writer.writeString( - 10, + 11, f ); } f = message.getTimeCreated(); if (f != null) { writer.writeMessage( - 11, + 12, f, google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); @@ -561,11 +617,29 @@ proto.nft.NftTab.prototype.setFileName = function(value) { /** - * optional int32 file_size = 6; + * optional string file_type = 6; + * @return {string} + */ +proto.nft.NftTab.prototype.getFileType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.nft.NftTab} returns this + */ +proto.nft.NftTab.prototype.setFileType = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional int32 file_size = 7; * @return {number} */ proto.nft.NftTab.prototype.getFileSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; @@ -574,16 +648,16 @@ proto.nft.NftTab.prototype.getFileSize = function() { * @return {!proto.nft.NftTab} returns this */ proto.nft.NftTab.prototype.setFileSize = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 7, value); }; /** - * optional string thumbnail = 7; + * optional string thumbnail = 8; * @return {string} */ proto.nft.NftTab.prototype.getThumbnail = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; @@ -592,16 +666,16 @@ proto.nft.NftTab.prototype.getThumbnail = function() { * @return {!proto.nft.NftTab} returns this */ proto.nft.NftTab.prototype.setThumbnail = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); + return jspb.Message.setProto3StringField(this, 8, value); }; /** - * optional string transaction_id = 8; + * optional string transaction_id = 9; * @return {string} */ proto.nft.NftTab.prototype.getTransactionId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; @@ -610,16 +684,16 @@ proto.nft.NftTab.prototype.getTransactionId = function() { * @return {!proto.nft.NftTab} returns this */ proto.nft.NftTab.prototype.setTransactionId = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); + return jspb.Message.setProto3StringField(this, 9, value); }; /** - * optional string signature = 9; + * optional string signature = 10; * @return {string} */ proto.nft.NftTab.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); }; @@ -628,16 +702,16 @@ proto.nft.NftTab.prototype.getSignature = function() { * @return {!proto.nft.NftTab} returns this */ proto.nft.NftTab.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); + return jspb.Message.setProto3StringField(this, 10, value); }; /** - * optional string description = 10; + * optional string description = 11; * @return {string} */ proto.nft.NftTab.prototype.getDescription = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 11, "")); }; @@ -646,17 +720,17 @@ proto.nft.NftTab.prototype.getDescription = function() { * @return {!proto.nft.NftTab} returns this */ proto.nft.NftTab.prototype.setDescription = function(value) { - return jspb.Message.setProto3StringField(this, 10, value); + return jspb.Message.setProto3StringField(this, 11, value); }; /** - * optional google.protobuf.Timestamp time_created = 11; + * optional google.protobuf.Timestamp time_created = 12; * @return {?proto.google.protobuf.Timestamp} */ proto.nft.NftTab.prototype.getTimeCreated = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 11)); + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 12)); }; @@ -665,7 +739,7 @@ proto.nft.NftTab.prototype.getTimeCreated = function() { * @return {!proto.nft.NftTab} returns this */ proto.nft.NftTab.prototype.setTimeCreated = function(value) { - return jspb.Message.setWrapperField(this, 11, value); + return jspb.Message.setWrapperField(this, 12, value); }; @@ -683,7 +757,7 @@ proto.nft.NftTab.prototype.clearTimeCreated = function() { * @return {boolean} */ proto.nft.NftTab.prototype.hasTimeCreated = function() { - return jspb.Message.getField(this, 11) != null; + return jspb.Message.getField(this, 12) != null; }; @@ -1024,11 +1098,12 @@ proto.nft.ReqUpLoad.toObject = function(includeInstance, msg) { chainId: jspb.Message.getFieldWithDefault(msg, 2, ""), fileHash: jspb.Message.getFieldWithDefault(msg, 3, ""), fileName: jspb.Message.getFieldWithDefault(msg, 4, ""), - fileSize: jspb.Message.getFieldWithDefault(msg, 5, 0), - thumbnail: jspb.Message.getFieldWithDefault(msg, 6, ""), - transactionId: jspb.Message.getFieldWithDefault(msg, 7, ""), - signature: jspb.Message.getFieldWithDefault(msg, 8, ""), - description: jspb.Message.getFieldWithDefault(msg, 9, "") + fileType: jspb.Message.getFieldWithDefault(msg, 5, ""), + fileSize: jspb.Message.getFieldWithDefault(msg, 6, 0), + thumbnail: jspb.Message.getFieldWithDefault(msg, 7, ""), + transactionId: jspb.Message.getFieldWithDefault(msg, 8, ""), + signature: jspb.Message.getFieldWithDefault(msg, 9, ""), + description: jspb.Message.getFieldWithDefault(msg, 10, "") }; if (includeInstance) { @@ -1082,22 +1157,26 @@ proto.nft.ReqUpLoad.deserializeBinaryFromReader = function(msg, reader) { msg.setFileName(value); break; case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setFileType(value); + break; + case 6: var value = /** @type {number} */ (reader.readInt32()); msg.setFileSize(value); break; - case 6: + case 7: var value = /** @type {string} */ (reader.readString()); msg.setThumbnail(value); break; - case 7: + case 8: var value = /** @type {string} */ (reader.readString()); msg.setTransactionId(value); break; - case 8: + case 9: var value = /** @type {string} */ (reader.readString()); msg.setSignature(value); break; - case 9: + case 10: var value = /** @type {string} */ (reader.readString()); msg.setDescription(value); break; @@ -1158,38 +1237,45 @@ proto.nft.ReqUpLoad.serializeBinaryToWriter = function(message, writer) { f ); } + f = message.getFileType(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } f = message.getFileSize(); if (f !== 0) { writer.writeInt32( - 5, + 6, f ); } f = message.getThumbnail(); if (f.length > 0) { writer.writeString( - 6, + 7, f ); } f = message.getTransactionId(); if (f.length > 0) { writer.writeString( - 7, + 8, f ); } f = message.getSignature(); if (f.length > 0) { writer.writeString( - 8, + 9, f ); } f = message.getDescription(); if (f.length > 0) { writer.writeString( - 9, + 10, f ); } @@ -1269,11 +1355,29 @@ proto.nft.ReqUpLoad.prototype.setFileName = function(value) { /** - * optional int32 file_size = 5; + * optional string file_type = 5; + * @return {string} + */ +proto.nft.ReqUpLoad.prototype.getFileType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.nft.ReqUpLoad} returns this + */ +proto.nft.ReqUpLoad.prototype.setFileType = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional int32 file_size = 6; * @return {number} */ proto.nft.ReqUpLoad.prototype.getFileSize = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; @@ -1282,16 +1386,16 @@ proto.nft.ReqUpLoad.prototype.getFileSize = function() { * @return {!proto.nft.ReqUpLoad} returns this */ proto.nft.ReqUpLoad.prototype.setFileSize = function(value) { - return jspb.Message.setProto3IntField(this, 5, value); + return jspb.Message.setProto3IntField(this, 6, value); }; /** - * optional string thumbnail = 6; + * optional string thumbnail = 7; * @return {string} */ proto.nft.ReqUpLoad.prototype.getThumbnail = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; @@ -1300,16 +1404,16 @@ proto.nft.ReqUpLoad.prototype.getThumbnail = function() { * @return {!proto.nft.ReqUpLoad} returns this */ proto.nft.ReqUpLoad.prototype.setThumbnail = function(value) { - return jspb.Message.setProto3StringField(this, 6, value); + return jspb.Message.setProto3StringField(this, 7, value); }; /** - * optional string transaction_id = 7; + * optional string transaction_id = 8; * @return {string} */ proto.nft.ReqUpLoad.prototype.getTransactionId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); }; @@ -1318,16 +1422,16 @@ proto.nft.ReqUpLoad.prototype.getTransactionId = function() { * @return {!proto.nft.ReqUpLoad} returns this */ proto.nft.ReqUpLoad.prototype.setTransactionId = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); + return jspb.Message.setProto3StringField(this, 8, value); }; /** - * optional string signature = 8; + * optional string signature = 9; * @return {string} */ proto.nft.ReqUpLoad.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); }; @@ -1336,16 +1440,16 @@ proto.nft.ReqUpLoad.prototype.getSignature = function() { * @return {!proto.nft.ReqUpLoad} returns this */ proto.nft.ReqUpLoad.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); + return jspb.Message.setProto3StringField(this, 9, value); }; /** - * optional string description = 9; + * optional string description = 10; * @return {string} */ proto.nft.ReqUpLoad.prototype.getDescription = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 9, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 10, "")); }; @@ -1354,7 +1458,7 @@ proto.nft.ReqUpLoad.prototype.getDescription = function() { * @return {!proto.nft.ReqUpLoad} returns this */ proto.nft.ReqUpLoad.prototype.setDescription = function(value) { - return jspb.Message.setProto3StringField(this, 9, value); + return jspb.Message.setProto3StringField(this, 10, value); }; @@ -1803,8 +1907,11 @@ proto.nft.RespCheckDownload.toObject = function(includeInstance, msg) { code: jspb.Message.getFieldWithDefault(msg, 1, 0), message: jspb.Message.getFieldWithDefault(msg, 2, ""), address: jspb.Message.getFieldWithDefault(msg, 3, ""), - fileHash: jspb.Message.getFieldWithDefault(msg, 4, ""), - exists: jspb.Message.getBooleanFieldWithDefault(msg, 5, false) + exists: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + fileHash: jspb.Message.getFieldWithDefault(msg, 5, ""), + fileName: jspb.Message.getFieldWithDefault(msg, 6, ""), + fileType: jspb.Message.getFieldWithDefault(msg, 7, ""), + fileSize: jspb.Message.getFieldWithDefault(msg, 8, 0) }; if (includeInstance) { @@ -1854,12 +1961,24 @@ proto.nft.RespCheckDownload.deserializeBinaryFromReader = function(msg, reader) msg.setAddress(value); break; case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setExists(value); + break; + case 5: var value = /** @type {string} */ (reader.readString()); msg.setFileHash(value); break; - case 5: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setExists(value); + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setFileName(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setFileType(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt32()); + msg.setFileSize(value); break; default: reader.skipField(); @@ -1911,17 +2030,38 @@ proto.nft.RespCheckDownload.serializeBinaryToWriter = function(message, writer) f ); } + f = message.getExists(); + if (f) { + writer.writeBool( + 4, + f + ); + } f = message.getFileHash(); if (f.length > 0) { writer.writeString( - 4, + 5, f ); } - f = message.getExists(); - if (f) { - writer.writeBool( - 5, + f = message.getFileName(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getFileType(); + if (f.length > 0) { + writer.writeString( + 7, + f + ); + } + f = message.getFileSize(); + if (f !== 0) { + writer.writeInt32( + 8, f ); } @@ -1983,11 +2123,29 @@ proto.nft.RespCheckDownload.prototype.setAddress = function(value) { /** - * optional string file_hash = 4; + * optional bool exists = 4; + * @return {boolean} + */ +proto.nft.RespCheckDownload.prototype.getExists = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.nft.RespCheckDownload} returns this + */ +proto.nft.RespCheckDownload.prototype.setExists = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); +}; + + +/** + * optional string file_hash = 5; * @return {string} */ proto.nft.RespCheckDownload.prototype.getFileHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; @@ -1996,32 +2154,68 @@ proto.nft.RespCheckDownload.prototype.getFileHash = function() { * @return {!proto.nft.RespCheckDownload} returns this */ proto.nft.RespCheckDownload.prototype.setFileHash = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); + return jspb.Message.setProto3StringField(this, 5, value); }; /** - * optional bool exists = 5; - * @return {boolean} + * optional string file_name = 6; + * @return {string} */ -proto.nft.RespCheckDownload.prototype.getExists = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 5, false)); +proto.nft.RespCheckDownload.prototype.getFileName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** - * @param {boolean} value + * @param {string} value * @return {!proto.nft.RespCheckDownload} returns this */ -proto.nft.RespCheckDownload.prototype.setExists = function(value) { - return jspb.Message.setProto3BooleanField(this, 5, value); +proto.nft.RespCheckDownload.prototype.setFileName = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * optional string file_type = 7; + * @return {string} + */ +proto.nft.RespCheckDownload.prototype.getFileType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.nft.RespCheckDownload} returns this + */ +proto.nft.RespCheckDownload.prototype.setFileType = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional int32 file_size = 8; + * @return {number} + */ +proto.nft.RespCheckDownload.prototype.getFileSize = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.nft.RespCheckDownload} returns this + */ +proto.nft.RespCheckDownload.prototype.setFileSize = function(value) { + return jspb.Message.setProto3IntField(this, 8, 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. @@ -2928,4 +3122,354 @@ proto.nft.RespSubscribe.prototype.setAddress = 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.nft.ReqStatus.prototype.toObject = function(opt_includeInstance) { + return proto.nft.ReqStatus.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.nft.ReqStatus} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.nft.ReqStatus.toObject = function(includeInstance, msg) { + var f, obj = { + address: 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.nft.ReqStatus} + */ +proto.nft.ReqStatus.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.nft.ReqStatus; + return proto.nft.ReqStatus.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.nft.ReqStatus} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.nft.ReqStatus} + */ +proto.nft.ReqStatus.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.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.nft.ReqStatus.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.nft.ReqStatus.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.nft.ReqStatus} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.nft.ReqStatus.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.nft.ReqStatus.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.nft.ReqStatus} returns this + */ +proto.nft.ReqStatus.prototype.setAddress = 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.nft.RespStatus.prototype.toObject = function(opt_includeInstance) { + return proto.nft.RespStatus.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.nft.RespStatus} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.nft.RespStatus.toObject = function(includeInstance, msg) { + var f, obj = { + code: jspb.Message.getFieldWithDefault(msg, 1, 0), + message: jspb.Message.getFieldWithDefault(msg, 2, ""), + address: jspb.Message.getFieldWithDefault(msg, 3, ""), + fileCount: jspb.Message.getFieldWithDefault(msg, 4, 0) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.nft.RespStatus} + */ +proto.nft.RespStatus.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.nft.RespStatus; + return proto.nft.RespStatus.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.nft.RespStatus} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.nft.RespStatus} + */ +proto.nft.RespStatus.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setCode(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setFileCount(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.nft.RespStatus.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.nft.RespStatus.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.nft.RespStatus} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.nft.RespStatus.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCode(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = message.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getFileCount(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * optional int32 code = 1; + * @return {number} + */ +proto.nft.RespStatus.prototype.getCode = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.nft.RespStatus} returns this + */ +proto.nft.RespStatus.prototype.setCode = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.nft.RespStatus.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.nft.RespStatus} returns this + */ +proto.nft.RespStatus.prototype.setMessage = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string address = 3; + * @return {string} + */ +proto.nft.RespStatus.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.nft.RespStatus} returns this + */ +proto.nft.RespStatus.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int32 file_count = 4; + * @return {number} + */ +proto.nft.RespStatus.prototype.getFileCount = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.nft.RespStatus} returns this + */ +proto.nft.RespStatus.prototype.setFileCount = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + goog.object.extend(exports, proto.nft); diff --git a/protos/nft/nft.pb.go b/protos/nft/nft.pb.go index e09555e..d9a6ae5 100644 --- a/protos/nft/nft.pb.go +++ b/protos/nft/nft.pb.go @@ -39,12 +39,13 @@ type NftTab struct { ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" pg:"chain_id"` FileHash string `protobuf:"bytes,4,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` FileName string `protobuf:"bytes,5,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty" pg:"file_name"` - FileSize int32 `protobuf:"varint,6,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty" pg:"file_size"` - Thumbnail string `protobuf:"bytes,7,opt,name=thumbnail,proto3" json:"thumbnail,omitempty" pg:"thumbnail"` - TransactionId string `protobuf:"bytes,8,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty" pg:"transaction_id"` - Signature string `protobuf:"bytes,9,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty" pg:"description"` - TimeCreated time.Time `protobuf:"bytes,11,opt,name=time_created,json=timeCreated,proto3,stdtime" json:"time_created" pg:"time_created"` + FileType string `protobuf:"bytes,6,opt,name=file_type,json=fileType,proto3" json:"file_type,omitempty" pg:"file_type"` + FileSize int32 `protobuf:"varint,7,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty" pg:"file_size"` + Thumbnail string `protobuf:"bytes,8,opt,name=thumbnail,proto3" json:"thumbnail,omitempty" pg:"thumbnail"` + TransactionId string `protobuf:"bytes,9,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty" pg:"transaction_id"` + Signature string `protobuf:"bytes,10,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` + Description string `protobuf:"bytes,11,opt,name=description,proto3" json:"description,omitempty" pg:"description"` + TimeCreated time.Time `protobuf:"bytes,12,opt,name=time_created,json=timeCreated,proto3,stdtime" json:"time_created" pg:"time_created"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` @@ -118,6 +119,13 @@ func (m *NftTab) GetFileName() string { return "" } +func (m *NftTab) GetFileType() string { + if m != nil { + return m.FileType + } + return "" +} + func (m *NftTab) GetFileSize() int32 { if m != nil { return m.FileSize @@ -261,11 +269,12 @@ type ReqUpLoad struct { ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" pg:"chain_id"` FileHash string `protobuf:"bytes,3,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` FileName string `protobuf:"bytes,4,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty" pg:"file_name"` - FileSize int32 `protobuf:"varint,5,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty" pg:"file_size"` - Thumbnail string `protobuf:"bytes,6,opt,name=thumbnail,proto3" json:"thumbnail,omitempty" pg:"thumbnail"` - TransactionId string `protobuf:"bytes,7,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty" pg:"transaction_id"` - Signature string `protobuf:"bytes,8,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` - Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty" pg:"description"` + FileType string `protobuf:"bytes,5,opt,name=file_type,json=fileType,proto3" json:"file_type,omitempty" pg:"file_type"` + FileSize int32 `protobuf:"varint,6,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty" pg:"file_size"` + Thumbnail string `protobuf:"bytes,7,opt,name=thumbnail,proto3" json:"thumbnail,omitempty" pg:"thumbnail"` + TransactionId string `protobuf:"bytes,8,opt,name=transaction_id,json=transactionId,proto3" json:"transaction_id,omitempty" pg:"transaction_id"` + Signature string `protobuf:"bytes,9,opt,name=signature,proto3" json:"signature,omitempty" pg:"signature"` + Description string `protobuf:"bytes,10,opt,name=description,proto3" json:"description,omitempty" pg:"description"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` @@ -332,6 +341,13 @@ func (m *ReqUpLoad) GetFileName() string { return "" } +func (m *ReqUpLoad) GetFileType() string { + if m != nil { + return m.FileType + } + return "" +} + func (m *ReqUpLoad) GetFileSize() int32 { if m != nil { return m.FileSize @@ -518,8 +534,11 @@ type RespCheckDownload struct { Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty" pg:"code"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty" pg:"address"` - FileHash string `protobuf:"bytes,4,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` - Exists bool `protobuf:"varint,5,opt,name=exists,proto3" json:"exists,omitempty" pg:"exists"` + Exists bool `protobuf:"varint,4,opt,name=exists,proto3" json:"exists,omitempty" pg:"exists"` + FileHash string `protobuf:"bytes,5,opt,name=file_hash,json=fileHash,proto3" json:"file_hash,omitempty" pg:"file_hash"` + FileName string `protobuf:"bytes,6,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty" pg:"file_name"` + FileType string `protobuf:"bytes,7,opt,name=file_type,json=fileType,proto3" json:"file_type,omitempty" pg:"file_type"` + FileSize int32 `protobuf:"varint,8,opt,name=file_size,json=fileSize,proto3" json:"file_size,omitempty" pg:"file_size"` XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` XXX_unrecognized []byte `json:"-" pg:"-"` XXX_sizecache int32 `json:"-" pg:"-"` @@ -579,6 +598,13 @@ func (m *RespCheckDownload) GetAddress() string { return "" } +func (m *RespCheckDownload) GetExists() bool { + if m != nil { + return m.Exists + } + return false +} + func (m *RespCheckDownload) GetFileHash() string { if m != nil { return m.FileHash @@ -586,17 +612,32 @@ func (m *RespCheckDownload) GetFileHash() string { return "" } -func (m *RespCheckDownload) GetExists() bool { +func (m *RespCheckDownload) GetFileName() string { if m != nil { - return m.Exists + return m.FileName } - return false + return "" +} + +func (m *RespCheckDownload) GetFileType() string { + if m != nil { + return m.FileType + } + return "" +} + +func (m *RespCheckDownload) GetFileSize() int32 { + if m != nil { + return m.FileSize + } + return 0 } func (*RespCheckDownload) XXX_MessageName() string { return "nft.RespCheckDownload" } +// get files type ReqGetFiles struct { Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" pg:"address"` ChainId string `protobuf:"bytes,2,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty" pg:"chain_id"` @@ -897,6 +938,133 @@ func (m *RespSubscribe) GetAddress() string { func (*RespSubscribe) XXX_MessageName() string { return "nft.RespSubscribe" } + +// status +type ReqStatus struct { + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty" pg:"address"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *ReqStatus) Reset() { *m = ReqStatus{} } +func (m *ReqStatus) String() string { return proto.CompactTextString(m) } +func (*ReqStatus) ProtoMessage() {} +func (*ReqStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_bbb523e0dae4ed64, []int{10} +} +func (m *ReqStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *ReqStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_ReqStatus.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 *ReqStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_ReqStatus.Merge(m, src) +} +func (m *ReqStatus) XXX_Size() int { + return m.Size() +} +func (m *ReqStatus) XXX_DiscardUnknown() { + xxx_messageInfo_ReqStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_ReqStatus proto.InternalMessageInfo + +func (m *ReqStatus) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (*ReqStatus) XXX_MessageName() string { + return "nft.ReqStatus" +} + +type RespStatus struct { + Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty" pg:"code"` + Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty" pg:"message"` + Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address,omitempty" pg:"address"` + FileCount int32 `protobuf:"varint,4,opt,name=file_count,json=fileCount,proto3" json:"file_count,omitempty" pg:"file_count"` + XXX_NoUnkeyedLiteral struct{} `json:"-" pg:"-"` + XXX_unrecognized []byte `json:"-" pg:"-"` + XXX_sizecache int32 `json:"-" pg:"-"` +} + +func (m *RespStatus) Reset() { *m = RespStatus{} } +func (m *RespStatus) String() string { return proto.CompactTextString(m) } +func (*RespStatus) ProtoMessage() {} +func (*RespStatus) Descriptor() ([]byte, []int) { + return fileDescriptor_bbb523e0dae4ed64, []int{11} +} +func (m *RespStatus) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *RespStatus) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_RespStatus.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 *RespStatus) XXX_Merge(src proto.Message) { + xxx_messageInfo_RespStatus.Merge(m, src) +} +func (m *RespStatus) XXX_Size() int { + return m.Size() +} +func (m *RespStatus) XXX_DiscardUnknown() { + xxx_messageInfo_RespStatus.DiscardUnknown(m) +} + +var xxx_messageInfo_RespStatus proto.InternalMessageInfo + +func (m *RespStatus) GetCode() int32 { + if m != nil { + return m.Code + } + return 0 +} + +func (m *RespStatus) GetMessage() string { + if m != nil { + return m.Message + } + return "" +} + +func (m *RespStatus) GetAddress() string { + if m != nil { + return m.Address + } + return "" +} + +func (m *RespStatus) GetFileCount() int32 { + if m != nil { + return m.FileCount + } + return 0 +} + +func (*RespStatus) XXX_MessageName() string { + return "nft.RespStatus" +} func init() { proto.RegisterType((*NftTab)(nil), "nft.NftTab") golang_proto.RegisterType((*NftTab)(nil), "nft.NftTab") @@ -918,65 +1086,74 @@ func init() { golang_proto.RegisterType((*ReqSubscribe)(nil), "nft.ReqSubscribe") proto.RegisterType((*RespSubscribe)(nil), "nft.RespSubscribe") golang_proto.RegisterType((*RespSubscribe)(nil), "nft.RespSubscribe") + proto.RegisterType((*ReqStatus)(nil), "nft.ReqStatus") + golang_proto.RegisterType((*ReqStatus)(nil), "nft.ReqStatus") + proto.RegisterType((*RespStatus)(nil), "nft.RespStatus") + golang_proto.RegisterType((*RespStatus)(nil), "nft.RespStatus") } func init() { proto.RegisterFile("protos/nft/nft.proto", fileDescriptor_bbb523e0dae4ed64) } func init() { golang_proto.RegisterFile("protos/nft/nft.proto", fileDescriptor_bbb523e0dae4ed64) } var fileDescriptor_bbb523e0dae4ed64 = []byte{ - // 830 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0x41, 0x6f, 0xe3, 0x44, - 0x14, 0x66, 0xea, 0x3a, 0xb5, 0x9f, 0xdb,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cc, - 0xd5, 0xfc, 0x75, 0x7d, 0x45, 0x77, 0xc7, 0x6e, 0x20, 0x4d, 0x6e, 0x72, 0xf4, 0xf7, 0x5f, 0x5d, - 0x74, 0x76, 0xd1, 0x45, 0xbf, 0x5d, 0x74, 0xd1, 0x9f, 0x17, 0x5d, 0xf4, 0xd3, 0x65, 0x17, 0xfd, - 0x7a, 0xd9, 0x45, 0x67, 0x97, 0x5d, 0x04, 0x16, 0x65, 0xc3, 0x40, 0xc4, 0x5c, 0x02, 0x27, 0xc6, - 0x34, 0x16, 0xc7, 0x72, 0x33, 0x1f, 0xa3, 0xaf, 0xe5, 0x0f, 0x93, 0xa0, 0xa5, 0xf6, 0xf4, 0x47, - 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0x2c, 0xe2, 0x88, 0x27, 0xbc, 0x08, 0x00, 0x00, + // 906 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcf, 0x6f, 0xe3, 0xc4, + 0x17, 0xff, 0x4e, 0x52, 0x3b, 0xce, 0x4b, 0xbb, 0xdf, 0x5d, 0xab, 0xac, 0x4c, 0x80, 0x24, 0x18, + 0xad, 0x94, 0x95, 0xba, 0x09, 0x94, 0x5b, 0x0f, 0x1c, 0x5a, 0xc4, 0xb2, 0x02, 0x55, 0x95, 0xdb, + 0x15, 0x82, 0x4b, 0x34, 0xb6, 0xc7, 0xc9, 0x68, 0x6d, 0x4f, 0xea, 0x19, 0xb3, 0xec, 0x1e, 0xb9, + 0x70, 0x41, 0x82, 0x03, 0x07, 0xfe, 0x15, 0x6e, 0x1c, 0x7b, 0xe0, 0xc0, 0x5f, 0x50, 0xa0, 0x3d, + 0x70, 0xdf, 0x13, 0x47, 0x34, 0x33, 0xfe, 0x91, 0xb0, 0xe0, 0x4a, 0x55, 0xf7, 0x50, 0x29, 0xef, + 0xd7, 0xf8, 0xbd, 0xcf, 0xe7, 0x33, 0x6f, 0x0a, 0xdb, 0xcb, 0x8c, 0x09, 0xc6, 0xa7, 0x69, 0x24, + 0xe4, 0xdf, 0x44, 0x99, 0x76, 0x3b, 0x8d, 0x44, 0xff, 0xdd, 0x39, 0x15, 0x8b, 0xdc, 0x9f, 0x04, + 0x2c, 0x99, 0x8a, 0x8c, 0xa5, 0x0f, 0x72, 0x3e, 0x55, 0x61, 0x3f, 0x8f, 0xa6, 0x73, 0x36, 0x67, + 0xca, 0x50, 0xbf, 0x74, 0x59, 0x7f, 0x38, 0x67, 0x6c, 0x1e, 0x93, 0x3a, 0x4b, 0xd0, 0x84, 0x70, + 0x81, 0x93, 0xa5, 0x4e, 0x70, 0x7f, 0x69, 0x83, 0x79, 0x18, 0x89, 0x13, 0xec, 0xdb, 0x9f, 0x00, + 0x08, 0xec, 0xc7, 0x64, 0x96, 0xe2, 0x84, 0x38, 0x68, 0x84, 0xc6, 0xdd, 0xfd, 0x9d, 0x17, 0xe7, + 0xc3, 0xf1, 0x72, 0xbe, 0xe7, 0xa6, 0x91, 0xd8, 0xc1, 0x31, 0xc5, 0x7c, 0x4f, 0xec, 0x84, 0x94, + 0x07, 0x38, 0x0b, 0x67, 0x79, 0xfa, 0x24, 0x65, 0x4f, 0xd3, 0x59, 0xc0, 0xe2, 0x3c, 0x49, 0xb9, + 0xeb, 0x75, 0x55, 0xfd, 0x21, 0x4e, 0x88, 0xed, 0x40, 0x07, 0x87, 0x61, 0x46, 0x38, 0x77, 0x5a, + 0xf2, 0x24, 0xaf, 0x34, 0xed, 0xd7, 0xc1, 0x0a, 0x16, 0x98, 0xa6, 0x33, 0x1a, 0x3a, 0x6d, 0x1d, + 0x52, 0xf6, 0xa3, 0xd0, 0x7e, 0x03, 0xba, 0x11, 0x8d, 0xc9, 0x6c, 0x81, 0xf9, 0xc2, 0xd9, 0x50, + 0x31, 0x4b, 0x3a, 0x3e, 0xc6, 0x7c, 0x51, 0x05, 0x55, 0x77, 0x46, 0x1d, 0x54, 0x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+ 0xa3, 0xed, 0x95, 0x79, 0xb4, 0x63, 0x7f, 0xef, 0xaf, 0x3f, 0x06, 0xe8, 0xec, 0x62, 0x80, 0x7e, + 0xbd, 0x18, 0xa0, 0xdf, 0x2f, 0x06, 0xe8, 0xc7, 0xcb, 0x01, 0xfa, 0xf9, 0x72, 0x80, 0xce, 0x2e, + 0x07, 0x08, 0x7a, 0x94, 0x4d, 0x7c, 0x11, 0x71, 0x59, 0xb5, 0x6f, 0x1d, 0x46, 0xe2, 0x48, 0x3e, + 0x6a, 0x47, 0xe8, 0x0b, 0xf9, 0x0f, 0x9f, 0x6f, 0xaa, 0x27, 0xee, 0xfd, 0xbf, 0x03, 0x00, 0x00, + 0xff, 0xff, 0x4a, 0xeb, 0x5a, 0x9e, 0x14, 0x0a, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -995,6 +1172,7 @@ type NftServiceClient interface { CheckDownload(ctx context.Context, in *ReqCheckDownload, opts ...grpc.CallOption) (*RespCheckDownload, error) GetFiles(ctx context.Context, in *ReqGetFiles, opts ...grpc.CallOption) (*RespGetFiles, error) Subscribe(ctx context.Context, in *ReqSubscribe, opts ...grpc.CallOption) (*RespSubscribe, error) + Status(ctx context.Context, in *ReqStatus, opts ...grpc.CallOption) (*RespStatus, error) } type nftServiceClient struct { @@ -1041,12 +1219,22 @@ func (c *nftServiceClient) Subscribe(ctx context.Context, in *ReqSubscribe, opts return out, nil } +func (c *nftServiceClient) Status(ctx context.Context, in *ReqStatus, opts ...grpc.CallOption) (*RespStatus, error) { + out := new(RespStatus) + err := c.cc.Invoke(ctx, "/nft.NftService/Status", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // NftServiceServer is the server API for NftService service. type NftServiceServer interface { UpLoad(context.Context, *ReqUpLoad) (*RespUpLoad, error) CheckDownload(context.Context, *ReqCheckDownload) (*RespCheckDownload, error) GetFiles(context.Context, *ReqGetFiles) (*RespGetFiles, error) Subscribe(context.Context, *ReqSubscribe) (*RespSubscribe, error) + Status(context.Context, *ReqStatus) (*RespStatus, error) } // UnimplementedNftServiceServer can be embedded to have forward compatible implementations. @@ -1065,6 +1253,9 @@ func (*UnimplementedNftServiceServer) GetFiles(ctx context.Context, req *ReqGetF func (*UnimplementedNftServiceServer) Subscribe(ctx context.Context, req *ReqSubscribe) (*RespSubscribe, error) { return nil, status.Errorf(codes.Unimplemented, "method Subscribe not implemented") } +func (*UnimplementedNftServiceServer) Status(ctx context.Context, req *ReqStatus) (*RespStatus, error) { + return nil, status.Errorf(codes.Unimplemented, "method Status not implemented") +} func RegisterNftServiceServer(s *grpc.Server, srv NftServiceServer) { s.RegisterService(&_NftService_serviceDesc, srv) @@ -1142,6 +1333,24 @@ func _NftService_Subscribe_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _NftService_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ReqStatus) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NftServiceServer).Status(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/nft.NftService/Status", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NftServiceServer).Status(ctx, req.(*ReqStatus)) + } + return interceptor(ctx, in, info, handler) +} + var _NftService_serviceDesc = grpc.ServiceDesc{ ServiceName: "nft.NftService", HandlerType: (*NftServiceServer)(nil), @@ -1162,6 +1371,10 @@ var _NftService_serviceDesc = grpc.ServiceDesc{ MethodName: "Subscribe", Handler: _NftService_Subscribe_Handler, }, + { + MethodName: "Status", + Handler: _NftService_Status_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "protos/nft/nft.proto", @@ -1198,39 +1411,46 @@ func (m *NftTab) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= n1 i = encodeVarintNft(dAtA, i, uint64(n1)) i-- - dAtA[i] = 0x5a + dAtA[i] = 0x62 if len(m.Description) > 0 { i -= len(m.Description) copy(dAtA[i:], m.Description) i = encodeVarintNft(dAtA, i, uint64(len(m.Description))) i-- - dAtA[i] = 0x52 + dAtA[i] = 0x5a } if len(m.Signature) > 0 { i -= len(m.Signature) copy(dAtA[i:], m.Signature) i = encodeVarintNft(dAtA, i, uint64(len(m.Signature))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x52 } if len(m.TransactionId) > 0 { i -= len(m.TransactionId) copy(dAtA[i:], m.TransactionId) i = encodeVarintNft(dAtA, i, uint64(len(m.TransactionId))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x4a } if len(m.Thumbnail) > 0 { i -= len(m.Thumbnail) copy(dAtA[i:], m.Thumbnail) i = encodeVarintNft(dAtA, i, uint64(len(m.Thumbnail))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x42 } if m.FileSize != 0 { i = encodeVarintNft(dAtA, i, uint64(m.FileSize)) i-- - dAtA[i] = 0x30 + dAtA[i] = 0x38 + } + if len(m.FileType) > 0 { + i -= len(m.FileType) + copy(dAtA[i:], m.FileType) + i = encodeVarintNft(dAtA, i, uint64(len(m.FileType))) + i-- + dAtA[i] = 0x32 } if len(m.FileName) > 0 { i -= len(m.FileName) @@ -1367,33 +1587,40 @@ func (m *ReqUpLoad) MarshalToSizedBuffer(dAtA []byte) (int, error) { copy(dAtA[i:], m.Description) i = encodeVarintNft(dAtA, i, uint64(len(m.Description))) i-- - dAtA[i] = 0x4a + dAtA[i] = 0x52 } if len(m.Signature) > 0 { i -= len(m.Signature) copy(dAtA[i:], m.Signature) i = encodeVarintNft(dAtA, i, uint64(len(m.Signature))) i-- - dAtA[i] = 0x42 + dAtA[i] = 0x4a } if len(m.TransactionId) > 0 { i -= len(m.TransactionId) copy(dAtA[i:], m.TransactionId) i = encodeVarintNft(dAtA, i, uint64(len(m.TransactionId))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x42 } if len(m.Thumbnail) > 0 { i -= len(m.Thumbnail) copy(dAtA[i:], m.Thumbnail) i = encodeVarintNft(dAtA, i, uint64(len(m.Thumbnail))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x3a } if m.FileSize != 0 { i = encodeVarintNft(dAtA, i, uint64(m.FileSize)) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x30 + } + if len(m.FileType) > 0 { + i -= len(m.FileType) + copy(dAtA[i:], m.FileType) + i = encodeVarintNft(dAtA, i, uint64(len(m.FileType))) + i-- + dAtA[i] = 0x2a } if len(m.FileName) > 0 { i -= len(m.FileName) @@ -1551,22 +1778,41 @@ func (m *RespCheckDownload) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if m.Exists { + if m.FileSize != 0 { + i = encodeVarintNft(dAtA, i, uint64(m.FileSize)) i-- - if m.Exists { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + dAtA[i] = 0x40 + } + if len(m.FileType) > 0 { + i -= len(m.FileType) + copy(dAtA[i:], m.FileType) + i = encodeVarintNft(dAtA, i, uint64(len(m.FileType))) i-- - dAtA[i] = 0x28 + dAtA[i] = 0x3a + } + if len(m.FileName) > 0 { + i -= len(m.FileName) + copy(dAtA[i:], m.FileName) + i = encodeVarintNft(dAtA, i, uint64(len(m.FileName))) + i-- + dAtA[i] = 0x32 } if len(m.FileHash) > 0 { i -= len(m.FileHash) copy(dAtA[i:], m.FileHash) i = encodeVarintNft(dAtA, i, uint64(len(m.FileHash))) i-- - dAtA[i] = 0x22 + dAtA[i] = 0x2a + } + if m.Exists { + i-- + if m.Exists { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x20 } if len(m.Address) > 0 { i -= len(m.Address) @@ -1807,49 +2053,135 @@ func (m *RespSubscribe) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func encodeVarintNft(dAtA []byte, offset int, v uint64) int { - offset -= sovNft(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ +func (m *ReqStatus) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err } - dAtA[offset] = uint8(v) - return base + return dAtA[:n], nil } -func NewPopulatedNftTab(r randyNft, easy bool) *NftTab { - this := &NftTab{} - this.tableName = string(randStringNft(r)) - this.Address = string(randStringNft(r)) - this.ChainId = string(randStringNft(r)) - this.FileHash = string(randStringNft(r)) - this.FileName = string(randStringNft(r)) - this.FileSize = int32(r.Int31()) - if r.Intn(2) == 0 { - this.FileSize *= -1 + +func (m *ReqStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *ReqStatus) 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) } - this.Thumbnail = string(randStringNft(r)) - this.TransactionId = string(randStringNft(r)) - this.Signature = string(randStringNft(r)) - this.Description = string(randStringNft(r)) - v1 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) - this.TimeCreated = *v1 - if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNft(r, 12) + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintNft(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0xa } - return this + return len(dAtA) - i, nil } -func NewPopulatedUserTab(r randyNft, easy bool) *UserTab { - this := &UserTab{} - this.tableName = string(randStringNft(r)) - this.Address = string(randStringNft(r)) - this.ChainId = string(randStringNft(r)) - this.Email = string(randStringNft(r)) - this.IsSubscribed = int32(r.Int31()) - if r.Intn(2) == 0 { - this.IsSubscribed *= -1 +func (m *RespStatus) 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 *RespStatus) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *RespStatus) 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 m.FileCount != 0 { + i = encodeVarintNft(dAtA, i, uint64(m.FileCount)) + i-- + dAtA[i] = 0x20 + } + if len(m.Address) > 0 { + i -= len(m.Address) + copy(dAtA[i:], m.Address) + i = encodeVarintNft(dAtA, i, uint64(len(m.Address))) + i-- + dAtA[i] = 0x1a + } + if len(m.Message) > 0 { + i -= len(m.Message) + copy(dAtA[i:], m.Message) + i = encodeVarintNft(dAtA, i, uint64(len(m.Message))) + i-- + dAtA[i] = 0x12 + } + if m.Code != 0 { + i = encodeVarintNft(dAtA, i, uint64(m.Code)) + i-- + dAtA[i] = 0x8 + } + return len(dAtA) - i, nil +} + +func encodeVarintNft(dAtA []byte, offset int, v uint64) int { + offset -= sovNft(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func NewPopulatedNftTab(r randyNft, easy bool) *NftTab { + this := &NftTab{} + this.tableName = string(randStringNft(r)) + this.Address = string(randStringNft(r)) + this.ChainId = string(randStringNft(r)) + this.FileHash = string(randStringNft(r)) + this.FileName = string(randStringNft(r)) + this.FileType = string(randStringNft(r)) + this.FileSize = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FileSize *= -1 + } + this.Thumbnail = string(randStringNft(r)) + this.TransactionId = string(randStringNft(r)) + this.Signature = string(randStringNft(r)) + this.Description = string(randStringNft(r)) + v1 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) + this.TimeCreated = *v1 + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedNft(r, 13) + } + return this +} + +func NewPopulatedUserTab(r randyNft, easy bool) *UserTab { + this := &UserTab{} + this.tableName = string(randStringNft(r)) + this.Address = string(randStringNft(r)) + this.ChainId = string(randStringNft(r)) + this.Email = string(randStringNft(r)) + this.IsSubscribed = int32(r.Int31()) + if r.Intn(2) == 0 { + this.IsSubscribed *= -1 } v2 := github_com_tron_us_protobuf_types.NewPopulatedStdTime(r, easy) this.TimeCreated = *v2 @@ -1865,6 +2197,7 @@ func NewPopulatedReqUpLoad(r randyNft, easy bool) *ReqUpLoad { this.ChainId = string(randStringNft(r)) this.FileHash = string(randStringNft(r)) this.FileName = string(randStringNft(r)) + this.FileType = string(randStringNft(r)) this.FileSize = int32(r.Int31()) if r.Intn(2) == 0 { this.FileSize *= -1 @@ -1874,7 +2207,7 @@ func NewPopulatedReqUpLoad(r randyNft, easy bool) *ReqUpLoad { this.Signature = string(randStringNft(r)) this.Description = string(randStringNft(r)) if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNft(r, 10) + this.XXX_unrecognized = randUnrecognizedNft(r, 11) } return this } @@ -1913,10 +2246,16 @@ func NewPopulatedRespCheckDownload(r randyNft, easy bool) *RespCheckDownload { } this.Message = string(randStringNft(r)) this.Address = string(randStringNft(r)) - this.FileHash = string(randStringNft(r)) this.Exists = bool(bool(r.Intn(2) == 0)) + this.FileHash = string(randStringNft(r)) + this.FileName = string(randStringNft(r)) + this.FileType = string(randStringNft(r)) + this.FileSize = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FileSize *= -1 + } if !easy && r.Intn(10) != 0 { - this.XXX_unrecognized = randUnrecognizedNft(r, 6) + this.XXX_unrecognized = randUnrecognizedNft(r, 9) } return this } @@ -1990,6 +2329,33 @@ func NewPopulatedRespSubscribe(r randyNft, easy bool) *RespSubscribe { return this } +func NewPopulatedReqStatus(r randyNft, easy bool) *ReqStatus { + this := &ReqStatus{} + this.Address = string(randStringNft(r)) + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedNft(r, 2) + } + return this +} + +func NewPopulatedRespStatus(r randyNft, easy bool) *RespStatus { + this := &RespStatus{} + this.Code = int32(r.Int31()) + if r.Intn(2) == 0 { + this.Code *= -1 + } + this.Message = string(randStringNft(r)) + this.Address = string(randStringNft(r)) + this.FileCount = int32(r.Int31()) + if r.Intn(2) == 0 { + this.FileCount *= -1 + } + if !easy && r.Intn(10) != 0 { + this.XXX_unrecognized = randUnrecognizedNft(r, 5) + } + return this +} + type randyNft interface { Float32() float32 Float64() float64 @@ -2088,6 +2454,10 @@ func (m *NftTab) Size() (n int) { if l > 0 { n += 1 + l + sovNft(uint64(l)) } + l = len(m.FileType) + if l > 0 { + n += 1 + l + sovNft(uint64(l)) + } if m.FileSize != 0 { n += 1 + sovNft(uint64(m.FileSize)) } @@ -2170,6 +2540,10 @@ func (m *ReqUpLoad) Size() (n int) { if l > 0 { n += 1 + l + sovNft(uint64(l)) } + l = len(m.FileType) + if l > 0 { + n += 1 + l + sovNft(uint64(l)) + } if m.FileSize != 0 { n += 1 + sovNft(uint64(m.FileSize)) } @@ -2263,12 +2637,23 @@ func (m *RespCheckDownload) Size() (n int) { if l > 0 { n += 1 + l + sovNft(uint64(l)) } + if m.Exists { + n += 2 + } l = len(m.FileHash) if l > 0 { n += 1 + l + sovNft(uint64(l)) } - if m.Exists { - n += 2 + l = len(m.FileName) + if l > 0 { + n += 1 + l + sovNft(uint64(l)) + } + l = len(m.FileType) + if l > 0 { + n += 1 + l + sovNft(uint64(l)) + } + if m.FileSize != 0 { + n += 1 + sovNft(uint64(m.FileSize)) } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -2385,6 +2770,48 @@ func (m *RespSubscribe) Size() (n int) { return n } +func (m *ReqStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Address) + if l > 0 { + n += 1 + l + sovNft(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *RespStatus) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Code != 0 { + n += 1 + sovNft(uint64(m.Code)) + } + l = len(m.Message) + if l > 0 { + n += 1 + l + sovNft(uint64(l)) + } + l = len(m.Address) + if l > 0 { + n += 1 + l + sovNft(uint64(l)) + } + if m.FileCount != 0 { + n += 1 + sovNft(uint64(m.FileCount)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func sovNft(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2581,6 +3008,38 @@ func (m *NftTab) Unmarshal(dAtA []byte) error { m.FileName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNft + } + 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 ErrInvalidLengthNft + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNft + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FileSize", wireType) } @@ -2599,7 +3058,7 @@ func (m *NftTab) Unmarshal(dAtA []byte) error { break } } - case 7: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Thumbnail", wireType) } @@ -2631,7 +3090,7 @@ func (m *NftTab) Unmarshal(dAtA []byte) error { } m.Thumbnail = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TransactionId", wireType) } @@ -2663,7 +3122,7 @@ func (m *NftTab) Unmarshal(dAtA []byte) error { } m.TransactionId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } @@ -2695,7 +3154,7 @@ func (m *NftTab) Unmarshal(dAtA []byte) error { } m.Signature = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 10: + case 11: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } @@ -2727,7 +3186,7 @@ func (m *NftTab) Unmarshal(dAtA []byte) error { } m.Description = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 11: + case 12: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TimeCreated", wireType) } @@ -3177,6 +3636,38 @@ func (m *ReqUpLoad) Unmarshal(dAtA []byte) error { m.FileName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNft + } + 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 ErrInvalidLengthNft + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNft + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 6: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field FileSize", wireType) } @@ -3195,7 +3686,7 @@ func (m *ReqUpLoad) Unmarshal(dAtA []byte) error { break } } - case 6: + case 7: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Thumbnail", wireType) } @@ -3227,7 +3718,7 @@ func (m *ReqUpLoad) Unmarshal(dAtA []byte) error { } m.Thumbnail = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 8: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TransactionId", wireType) } @@ -3259,7 +3750,7 @@ func (m *ReqUpLoad) Unmarshal(dAtA []byte) error { } m.TransactionId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 9: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Signature", wireType) } @@ -3291,7 +3782,7 @@ func (m *ReqUpLoad) Unmarshal(dAtA []byte) error { } m.Signature = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 9: + case 10: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Description", wireType) } @@ -3780,10 +4271,30 @@ func (m *RespCheckDownload) Unmarshal(dAtA []byte) error { m.Address = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Exists", wireType) } - var stringLen uint64 + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Exists = bool(v != 0) + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileHash", wireType) + } + var stringLen uint64 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNft @@ -3811,11 +4322,75 @@ func (m *RespCheckDownload) Unmarshal(dAtA []byte) error { } m.FileHash = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 5: + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileName", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNft + } + 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 ErrInvalidLengthNft + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNft + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileName = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 7: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field FileType", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNft + } + 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 ErrInvalidLengthNft + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNft + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.FileType = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 8: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Exists", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field FileSize", wireType) } - var v int + m.FileSize = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowNft @@ -3825,12 +4400,11 @@ func (m *RespCheckDownload) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.FileSize |= int32(b&0x7F) << shift if b < 0x80 { break } } - m.Exists = bool(v != 0) default: iNdEx = preIndex skippy, err := skipNft(dAtA[iNdEx:]) @@ -4521,6 +5095,248 @@ func (m *RespSubscribe) Unmarshal(dAtA []byte) error { } return nil } +func (m *ReqStatus) 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 ErrIntOverflowNft + } + 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: ReqStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: ReqStatus: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNft + } + 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 ErrInvalidLengthNft + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNft + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipNft(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthNft + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthNft + } + 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 *RespStatus) 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 ErrIntOverflowNft + } + 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: RespStatus: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: RespStatus: 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 ErrIntOverflowNft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.Code |= int32(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 ErrIntOverflowNft + } + 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 ErrInvalidLengthNft + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNft + } + 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 Address", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNft + } + 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 ErrInvalidLengthNft + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNft + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Address = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 4: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field FileCount", wireType) + } + m.FileCount = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNft + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.FileCount |= int32(b&0x7F) << shift + if b < 0x80 { + break + } + } + default: + iNdEx = preIndex + skippy, err := skipNft(dAtA[iNdEx:]) + if err != nil { + return err + } + if skippy < 0 { + return ErrInvalidLengthNft + } + if (iNdEx + skippy) < 0 { + return ErrInvalidLengthNft + } + 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 skipNft(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/protos/nft/nft.proto b/protos/nft/nft.proto index 6372f5b..0295e37 100644 --- a/protos/nft/nft.proto +++ b/protos/nft/nft.proto @@ -26,12 +26,13 @@ message NftTab { string chain_id = 3; string file_hash = 4; string file_name = 5; - int32 file_size = 6; - string thumbnail = 7; - string transaction_id = 8; - string signature = 9; - string description = 10; - google.protobuf.Timestamp time_created = 11 [ + string file_type = 6; + int32 file_size = 7; + string thumbnail = 8; + string transaction_id = 9; + string signature = 10; + string description = 11; + google.protobuf.Timestamp time_created = 12 [ (gogoproto.nullable) = false, (gogoproto.stdtime) = true ]; @@ -54,6 +55,7 @@ service NftService { rpc CheckDownload(ReqCheckDownload) returns (RespCheckDownload); rpc GetFiles(ReqGetFiles) returns (RespGetFiles); rpc Subscribe(ReqSubscribe) returns (RespSubscribe); + rpc Status(ReqStatus) returns (RespStatus); } // upload @@ -62,11 +64,12 @@ message ReqUpLoad { string chain_id = 2; string file_hash = 3; string file_name = 4; - int32 file_size = 5; - string thumbnail = 6; - string transaction_id = 7; - string signature = 8; - string description = 9; + string file_type = 5; + int32 file_size = 6; + string thumbnail = 7; + string transaction_id = 8; + string signature = 9; + string description = 10; } message RespUpLoad { @@ -87,25 +90,14 @@ message RespCheckDownload { int32 code = 1; string message = 2; string address = 3; - string file_hash = 4; - bool exists = 5; + bool exists = 4; + string file_hash = 5; + string file_name = 6; + string file_type = 7; + int32 file_size = 8; } // get files -//message FileInfo { -// string file_hash = 1; -// string file_name = 2; -// int32 file_size = 3; -// string thumbnail = 4; -// string transaction_id = 5; -// string signature = 6; -// string description = 7; -// google.protobuf.Timestamp time_created = 8 [ -// (gogoproto.nullable) = false, -// (gogoproto.stdtime) = true -// ]; -//} - message ReqGetFiles { string address = 1; string chain_id = 2; @@ -134,3 +126,15 @@ message RespSubscribe { string message = 2; string address = 3; } + +// status +message ReqStatus { + string address = 1; +} + +message RespStatus { + int32 code = 1; + string message = 2; + string address = 3; + int32 file_count = 4; +}