opt: message pb data type

api-v2
zijiren233 5 months ago
parent d24dc7c7a5
commit e9784fe5aa

@ -213,7 +213,7 @@ type Message struct {
unknownFields protoimpl.UnknownFields
Type MessageType `protobuf:"varint,1,opt,name=type,proto3,enum=proto.MessageType" json:"type,omitempty"`
Timestamp int64 `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Timestamp int64 `protobuf:"fixed64,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Sender *Sender `protobuf:"bytes,3,opt,name=sender,proto3,oneof" json:"sender,omitempty"`
// Types that are assignable to Payload:
//
@ -335,7 +335,7 @@ type Message_PlaybackStatus struct {
}
type Message_ExpirationId struct {
ExpirationId uint64 `protobuf:"varint,7,opt,name=expiration_id,json=expirationId,proto3,oneof"`
ExpirationId uint64 `protobuf:"fixed64,7,opt,name=expiration_id,json=expirationId,proto3,oneof"`
}
type Message_ViewerCount struct {
@ -372,7 +372,7 @@ var file_proto_message_message_proto_rawDesc = []byte{
0x12, 0x26, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x12,
0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x54, 0x79,
0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x74, 0x69, 0x6d, 0x65,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x74, 0x69, 0x6d,
0x73, 0x74, 0x61, 0x6d, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x10, 0x52, 0x09, 0x74, 0x69, 0x6d,
0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x12, 0x2a, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72,
0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x53,
0x65, 0x6e, 0x64, 0x65, 0x72, 0x48, 0x01, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x88,
@ -385,7 +385,7 @@ var file_proto_message_message_proto_rawDesc = []byte{
0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0d, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e,
0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x48, 0x00, 0x52, 0x0e, 0x70, 0x6c, 0x61, 0x79, 0x62, 0x61,
0x63, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x25, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x69,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x04, 0x48,
0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x06, 0x48,
0x00, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12,
0x23, 0x0a, 0x0c, 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
0x08, 0x20, 0x01, 0x28, 0x03, 0x48, 0x00, 0x52, 0x0b, 0x76, 0x69, 0x65, 0x77, 0x65, 0x72, 0x43,

@ -30,14 +30,14 @@ message Status {
message Message {
MessageType type = 1;
int64 timestamp = 2;
sfixed64 timestamp = 2;
optional Sender sender = 3;
oneof payload {
string error_message = 4;
string chat_content = 5;
Status playback_status = 6;
uint64 expiration_id = 7;
fixed64 expiration_id = 7;
int64 viewer_count = 8;
}
}

Loading…
Cancel
Save