Skip to content

Commit

Permalink
feat: add token of guard
Browse files Browse the repository at this point in the history
  • Loading branch information
turingczz committed Nov 28, 2022
1 parent 8662b4e commit 22d1fa0
Show file tree
Hide file tree
Showing 3 changed files with 427 additions and 256 deletions.
64 changes: 62 additions & 2 deletions js/protos/guard/guard_pb.js
Original file line number Diff line number Diff line change
Expand Up @@ -3597,7 +3597,8 @@ proto.guard.Contract.toObject = function(includeInstance, msg) {
challengeTimes: jspb.Message.getFieldWithDefault(msg, 14, 0),
challengeWarnTimes: jspb.Message.getFieldWithDefault(msg, 15, 0),
challengeSuccessTimes: jspb.Message.getFieldWithDefault(msg, 16, 0),
firstChallengeSuccess: (f = msg.getFirstChallengeSuccess()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f)
firstChallengeSuccess: (f = msg.getFirstChallengeSuccess()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f),
token: jspb.Message.getFieldWithDefault(msg, 18, "")
};

if (includeInstance) {
Expand Down Expand Up @@ -3709,6 +3710,10 @@ proto.guard.Contract.deserializeBinaryFromReader = function(msg, reader) {
reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader);
msg.setFirstChallengeSuccess(value);
break;
case 18:
var value = /** @type {string} */ (reader.readString());
msg.setToken(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -3864,6 +3869,13 @@ proto.guard.Contract.serializeBinaryToWriter = function(message, writer) {
google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter
);
}
f = message.getToken();
if (f.length > 0) {
writer.writeString(
18,
f
);
}
};


Expand Down Expand Up @@ -4446,6 +4458,24 @@ proto.guard.Contract.prototype.hasFirstChallengeSuccess = function() {
};


/**
* optional string token = 18;
* @return {string}
*/
proto.guard.Contract.prototype.getToken = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 18, ""));
};


/**
* @param {string} value
* @return {!proto.guard.Contract} returns this
*/
proto.guard.Contract.prototype.setToken = function(value) {
return jspb.Message.setProto3StringField(this, 18, value);
};



/**
* List of repeated fields within this message type.
Expand Down Expand Up @@ -4839,7 +4869,8 @@ proto.guard.FileStoreMeta.toObject = function(includeInstance, msg) {
guardPid: jspb.Message.getFieldWithDefault(msg, 13, ""),
warnChallengeTimesLimit: jspb.Message.getFieldWithDefault(msg, 14, 0),
successChallengeTimesLimit: jspb.Message.getFieldWithDefault(msg, 15, 0),
checkFrequencyWarn: jspb.Message.getFieldWithDefault(msg, 16, 0)
checkFrequencyWarn: jspb.Message.getFieldWithDefault(msg, 16, 0),
token: jspb.Message.getFieldWithDefault(msg, 17, "")
};

if (includeInstance) {
Expand Down Expand Up @@ -4942,6 +4973,10 @@ proto.guard.FileStoreMeta.deserializeBinaryFromReader = function(msg, reader) {
var value = /** @type {number} */ (reader.readInt32());
msg.setCheckFrequencyWarn(value);
break;
case 17:
var value = /** @type {string} */ (reader.readString());
msg.setToken(value);
break;
default:
reader.skipField();
break;
Expand Down Expand Up @@ -5085,6 +5120,13 @@ proto.guard.FileStoreMeta.serializeBinaryToWriter = function(message, writer) {
f
);
}
f = message.getToken();
if (f.length > 0) {
writer.writeString(
17,
f
);
}
};


Expand Down Expand Up @@ -5414,6 +5456,24 @@ proto.guard.FileStoreMeta.prototype.setCheckFrequencyWarn = function(value) {
};


/**
* optional string token = 17;
* @return {string}
*/
proto.guard.FileStoreMeta.prototype.getToken = function() {
return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 17, ""));
};


/**
* @param {string} value
* @return {!proto.guard.FileStoreMeta} returns this
*/
proto.guard.FileStoreMeta.prototype.setToken = function(value) {
return jspb.Message.setProto3StringField(this, 17, value);
};



/**
* List of repeated fields within this message type.
Expand Down
Loading

0 comments on commit 22d1fa0

Please sign in to comment.