396 lines
13 KiB
Go
396 lines
13 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.11
|
|
// protoc v3.19.6
|
|
// source: service_message.proto
|
|
|
|
package pb
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
reflect "reflect"
|
|
sync "sync"
|
|
unsafe "unsafe"
|
|
)
|
|
|
|
const (
|
|
// Verify that this generated code is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
|
|
// Verify that runtime/protoimpl is sufficiently up-to-date.
|
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
|
)
|
|
|
|
// 计算未读消息数
|
|
type CountUnreadMessagesRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CountUnreadMessagesRequest) Reset() {
|
|
*x = CountUnreadMessagesRequest{}
|
|
mi := &file_service_message_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *CountUnreadMessagesRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CountUnreadMessagesRequest) ProtoMessage() {}
|
|
|
|
func (x *CountUnreadMessagesRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_service_message_proto_msgTypes[0]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use CountUnreadMessagesRequest.ProtoReflect.Descriptor instead.
|
|
func (*CountUnreadMessagesRequest) Descriptor() ([]byte, []int) {
|
|
return file_service_message_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
// 列出单页未读消息
|
|
type ListUnreadMessagesRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Offset int64 `protobuf:"varint,1,opt,name=offset,proto3" json:"offset,omitempty"`
|
|
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListUnreadMessagesRequest) Reset() {
|
|
*x = ListUnreadMessagesRequest{}
|
|
mi := &file_service_message_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListUnreadMessagesRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListUnreadMessagesRequest) ProtoMessage() {}
|
|
|
|
func (x *ListUnreadMessagesRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_service_message_proto_msgTypes[1]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListUnreadMessagesRequest.ProtoReflect.Descriptor instead.
|
|
func (*ListUnreadMessagesRequest) Descriptor() ([]byte, []int) {
|
|
return file_service_message_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *ListUnreadMessagesRequest) GetOffset() int64 {
|
|
if x != nil {
|
|
return x.Offset
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *ListUnreadMessagesRequest) GetSize() int64 {
|
|
if x != nil {
|
|
return x.Size
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type ListUnreadMessagesResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Messages []*Message `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ListUnreadMessagesResponse) Reset() {
|
|
*x = ListUnreadMessagesResponse{}
|
|
mi := &file_service_message_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ListUnreadMessagesResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ListUnreadMessagesResponse) ProtoMessage() {}
|
|
|
|
func (x *ListUnreadMessagesResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_service_message_proto_msgTypes[2]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use ListUnreadMessagesResponse.ProtoReflect.Descriptor instead.
|
|
func (*ListUnreadMessagesResponse) Descriptor() ([]byte, []int) {
|
|
return file_service_message_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *ListUnreadMessagesResponse) GetMessages() []*Message {
|
|
if x != nil {
|
|
return x.Messages
|
|
}
|
|
return nil
|
|
}
|
|
|
|
// 设置消息已读状态
|
|
type UpdateMessageReadRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
MessageId int64 `protobuf:"varint,1,opt,name=messageId,proto3" json:"messageId,omitempty"`
|
|
IsRead bool `protobuf:"varint,2,opt,name=isRead,proto3" json:"isRead,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UpdateMessageReadRequest) Reset() {
|
|
*x = UpdateMessageReadRequest{}
|
|
mi := &file_service_message_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UpdateMessageReadRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UpdateMessageReadRequest) ProtoMessage() {}
|
|
|
|
func (x *UpdateMessageReadRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_service_message_proto_msgTypes[3]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use UpdateMessageReadRequest.ProtoReflect.Descriptor instead.
|
|
func (*UpdateMessageReadRequest) Descriptor() ([]byte, []int) {
|
|
return file_service_message_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *UpdateMessageReadRequest) GetMessageId() int64 {
|
|
if x != nil {
|
|
return x.MessageId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *UpdateMessageReadRequest) GetIsRead() bool {
|
|
if x != nil {
|
|
return x.IsRead
|
|
}
|
|
return false
|
|
}
|
|
|
|
// 设置一组消息已读状态
|
|
type UpdateMessagesReadRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
MessageIds []int64 `protobuf:"varint,1,rep,packed,name=messageIds,proto3" json:"messageIds,omitempty"`
|
|
IsRead bool `protobuf:"varint,2,opt,name=isRead,proto3" json:"isRead,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UpdateMessagesReadRequest) Reset() {
|
|
*x = UpdateMessagesReadRequest{}
|
|
mi := &file_service_message_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UpdateMessagesReadRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UpdateMessagesReadRequest) ProtoMessage() {}
|
|
|
|
func (x *UpdateMessagesReadRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_service_message_proto_msgTypes[4]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use UpdateMessagesReadRequest.ProtoReflect.Descriptor instead.
|
|
func (*UpdateMessagesReadRequest) Descriptor() ([]byte, []int) {
|
|
return file_service_message_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *UpdateMessagesReadRequest) GetMessageIds() []int64 {
|
|
if x != nil {
|
|
return x.MessageIds
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *UpdateMessagesReadRequest) GetIsRead() bool {
|
|
if x != nil {
|
|
return x.IsRead
|
|
}
|
|
return false
|
|
}
|
|
|
|
// 设置所有消息为已读
|
|
type UpdateAllMessagesReadRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UpdateAllMessagesReadRequest) Reset() {
|
|
*x = UpdateAllMessagesReadRequest{}
|
|
mi := &file_service_message_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UpdateAllMessagesReadRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UpdateAllMessagesReadRequest) ProtoMessage() {}
|
|
|
|
func (x *UpdateAllMessagesReadRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_service_message_proto_msgTypes[5]
|
|
if x != nil {
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
if ms.LoadMessageInfo() == nil {
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
return ms
|
|
}
|
|
return mi.MessageOf(x)
|
|
}
|
|
|
|
// Deprecated: Use UpdateAllMessagesReadRequest.ProtoReflect.Descriptor instead.
|
|
func (*UpdateAllMessagesReadRequest) Descriptor() ([]byte, []int) {
|
|
return file_service_message_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
var File_service_message_proto protoreflect.FileDescriptor
|
|
|
|
const file_service_message_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x15service_message.proto\x12\x02pb\x1a\x1amodels/model_message.proto\x1a\x19models/rpc_messages.proto\"\x1c\n" +
|
|
"\x1aCountUnreadMessagesRequest\"G\n" +
|
|
"\x19ListUnreadMessagesRequest\x12\x16\n" +
|
|
"\x06offset\x18\x01 \x01(\x03R\x06offset\x12\x12\n" +
|
|
"\x04size\x18\x02 \x01(\x03R\x04size\"E\n" +
|
|
"\x1aListUnreadMessagesResponse\x12'\n" +
|
|
"\bmessages\x18\x01 \x03(\v2\v.pb.MessageR\bmessages\"P\n" +
|
|
"\x18UpdateMessageReadRequest\x12\x1c\n" +
|
|
"\tmessageId\x18\x01 \x01(\x03R\tmessageId\x12\x16\n" +
|
|
"\x06isRead\x18\x02 \x01(\bR\x06isRead\"S\n" +
|
|
"\x19UpdateMessagesReadRequest\x12\x1e\n" +
|
|
"\n" +
|
|
"messageIds\x18\x01 \x03(\x03R\n" +
|
|
"messageIds\x12\x16\n" +
|
|
"\x06isRead\x18\x02 \x01(\bR\x06isRead\"\x1e\n" +
|
|
"\x1cUpdateAllMessagesReadRequest2\x85\x03\n" +
|
|
"\x0eMessageService\x12K\n" +
|
|
"\x13countUnreadMessages\x12\x1e.pb.CountUnreadMessagesRequest\x1a\x14.pb.RPCCountResponse\x12S\n" +
|
|
"\x12listUnreadMessages\x12\x1d.pb.ListUnreadMessagesRequest\x1a\x1e.pb.ListUnreadMessagesResponse\x12A\n" +
|
|
"\x11updateMessageRead\x12\x1c.pb.UpdateMessageReadRequest\x1a\x0e.pb.RPCSuccess\x12C\n" +
|
|
"\x12updateMessagesRead\x12\x1d.pb.UpdateMessagesReadRequest\x1a\x0e.pb.RPCSuccess\x12I\n" +
|
|
"\x15updateAllMessagesRead\x12 .pb.UpdateAllMessagesReadRequest\x1a\x0e.pb.RPCSuccessB\x06Z\x04./pbb\x06proto3"
|
|
|
|
var (
|
|
file_service_message_proto_rawDescOnce sync.Once
|
|
file_service_message_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_service_message_proto_rawDescGZIP() []byte {
|
|
file_service_message_proto_rawDescOnce.Do(func() {
|
|
file_service_message_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_service_message_proto_rawDesc), len(file_service_message_proto_rawDesc)))
|
|
})
|
|
return file_service_message_proto_rawDescData
|
|
}
|
|
|
|
var file_service_message_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
|
var file_service_message_proto_goTypes = []any{
|
|
(*CountUnreadMessagesRequest)(nil), // 0: pb.CountUnreadMessagesRequest
|
|
(*ListUnreadMessagesRequest)(nil), // 1: pb.ListUnreadMessagesRequest
|
|
(*ListUnreadMessagesResponse)(nil), // 2: pb.ListUnreadMessagesResponse
|
|
(*UpdateMessageReadRequest)(nil), // 3: pb.UpdateMessageReadRequest
|
|
(*UpdateMessagesReadRequest)(nil), // 4: pb.UpdateMessagesReadRequest
|
|
(*UpdateAllMessagesReadRequest)(nil), // 5: pb.UpdateAllMessagesReadRequest
|
|
(*Message)(nil), // 6: pb.Message
|
|
(*RPCCountResponse)(nil), // 7: pb.RPCCountResponse
|
|
(*RPCSuccess)(nil), // 8: pb.RPCSuccess
|
|
}
|
|
var file_service_message_proto_depIdxs = []int32{
|
|
6, // 0: pb.ListUnreadMessagesResponse.messages:type_name -> pb.Message
|
|
0, // 1: pb.MessageService.countUnreadMessages:input_type -> pb.CountUnreadMessagesRequest
|
|
1, // 2: pb.MessageService.listUnreadMessages:input_type -> pb.ListUnreadMessagesRequest
|
|
3, // 3: pb.MessageService.updateMessageRead:input_type -> pb.UpdateMessageReadRequest
|
|
4, // 4: pb.MessageService.updateMessagesRead:input_type -> pb.UpdateMessagesReadRequest
|
|
5, // 5: pb.MessageService.updateAllMessagesRead:input_type -> pb.UpdateAllMessagesReadRequest
|
|
7, // 6: pb.MessageService.countUnreadMessages:output_type -> pb.RPCCountResponse
|
|
2, // 7: pb.MessageService.listUnreadMessages:output_type -> pb.ListUnreadMessagesResponse
|
|
8, // 8: pb.MessageService.updateMessageRead:output_type -> pb.RPCSuccess
|
|
8, // 9: pb.MessageService.updateMessagesRead:output_type -> pb.RPCSuccess
|
|
8, // 10: pb.MessageService.updateAllMessagesRead:output_type -> pb.RPCSuccess
|
|
6, // [6:11] is the sub-list for method output_type
|
|
1, // [1:6] is the sub-list for method input_type
|
|
1, // [1:1] is the sub-list for extension type_name
|
|
1, // [1:1] is the sub-list for extension extendee
|
|
0, // [0:1] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_service_message_proto_init() }
|
|
func file_service_message_proto_init() {
|
|
if File_service_message_proto != nil {
|
|
return
|
|
}
|
|
file_models_model_message_proto_init()
|
|
file_models_rpc_messages_proto_init()
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_service_message_proto_rawDesc), len(file_service_message_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 6,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_service_message_proto_goTypes,
|
|
DependencyIndexes: file_service_message_proto_depIdxs,
|
|
MessageInfos: file_service_message_proto_msgTypes,
|
|
}.Build()
|
|
File_service_message_proto = out.File
|
|
file_service_message_proto_goTypes = nil
|
|
file_service_message_proto_depIdxs = nil
|
|
}
|