897 lines
27 KiB
Go
897 lines
27 KiB
Go
// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
// versions:
|
|
// protoc-gen-go v1.36.6
|
|
// protoc v3.21.12
|
|
// source: messages.proto
|
|
|
|
package proto
|
|
|
|
import (
|
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
|
timestamppb "google.golang.org/protobuf/types/known/timestamppb"
|
|
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 CreateChatRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
User1Id int32 `protobuf:"varint,1,opt,name=user1_id,json=user1Id,proto3" json:"user1_id,omitempty"`
|
|
User2Id int32 `protobuf:"varint,2,opt,name=user2_id,json=user2Id,proto3" json:"user2_id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *CreateChatRequest) Reset() {
|
|
*x = CreateChatRequest{}
|
|
mi := &file_messages_proto_msgTypes[0]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *CreateChatRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*CreateChatRequest) ProtoMessage() {}
|
|
|
|
func (x *CreateChatRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_messages_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 CreateChatRequest.ProtoReflect.Descriptor instead.
|
|
func (*CreateChatRequest) Descriptor() ([]byte, []int) {
|
|
return file_messages_proto_rawDescGZIP(), []int{0}
|
|
}
|
|
|
|
func (x *CreateChatRequest) GetUser1Id() int32 {
|
|
if x != nil {
|
|
return x.User1Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *CreateChatRequest) GetUser2Id() int32 {
|
|
if x != nil {
|
|
return x.User2Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type SendMessageRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ChatId int32 `protobuf:"varint,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
|
|
SenderId int32 `protobuf:"varint,2,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"`
|
|
Content string `protobuf:"bytes,3,opt,name=content,proto3" json:"content,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *SendMessageRequest) Reset() {
|
|
*x = SendMessageRequest{}
|
|
mi := &file_messages_proto_msgTypes[1]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *SendMessageRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*SendMessageRequest) ProtoMessage() {}
|
|
|
|
func (x *SendMessageRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_messages_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 SendMessageRequest.ProtoReflect.Descriptor instead.
|
|
func (*SendMessageRequest) Descriptor() ([]byte, []int) {
|
|
return file_messages_proto_rawDescGZIP(), []int{1}
|
|
}
|
|
|
|
func (x *SendMessageRequest) GetChatId() int32 {
|
|
if x != nil {
|
|
return x.ChatId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *SendMessageRequest) GetSenderId() int32 {
|
|
if x != nil {
|
|
return x.SenderId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *SendMessageRequest) GetContent() string {
|
|
if x != nil {
|
|
return x.Content
|
|
}
|
|
return ""
|
|
}
|
|
|
|
type GetChatRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
User1Id int32 `protobuf:"varint,1,opt,name=user1_id,json=user1Id,proto3" json:"user1_id,omitempty"`
|
|
User2Id int32 `protobuf:"varint,2,opt,name=user2_id,json=user2Id,proto3" json:"user2_id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetChatRequest) Reset() {
|
|
*x = GetChatRequest{}
|
|
mi := &file_messages_proto_msgTypes[2]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetChatRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetChatRequest) ProtoMessage() {}
|
|
|
|
func (x *GetChatRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_messages_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 GetChatRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetChatRequest) Descriptor() ([]byte, []int) {
|
|
return file_messages_proto_rawDescGZIP(), []int{2}
|
|
}
|
|
|
|
func (x *GetChatRequest) GetUser1Id() int32 {
|
|
if x != nil {
|
|
return x.User1Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *GetChatRequest) GetUser2Id() int32 {
|
|
if x != nil {
|
|
return x.User2Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetChatMessagesRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
ChatId int32 `protobuf:"varint,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
|
|
Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"`
|
|
Offset int32 `protobuf:"varint,3,opt,name=offset,proto3" json:"offset,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetChatMessagesRequest) Reset() {
|
|
*x = GetChatMessagesRequest{}
|
|
mi := &file_messages_proto_msgTypes[3]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetChatMessagesRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetChatMessagesRequest) ProtoMessage() {}
|
|
|
|
func (x *GetChatMessagesRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_messages_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 GetChatMessagesRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetChatMessagesRequest) Descriptor() ([]byte, []int) {
|
|
return file_messages_proto_rawDescGZIP(), []int{3}
|
|
}
|
|
|
|
func (x *GetChatMessagesRequest) GetChatId() int32 {
|
|
if x != nil {
|
|
return x.ChatId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *GetChatMessagesRequest) GetLimit() int32 {
|
|
if x != nil {
|
|
return x.Limit
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *GetChatMessagesRequest) GetOffset() int32 {
|
|
if x != nil {
|
|
return x.Offset
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type GetUserChatsRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *GetUserChatsRequest) Reset() {
|
|
*x = GetUserChatsRequest{}
|
|
mi := &file_messages_proto_msgTypes[4]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *GetUserChatsRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*GetUserChatsRequest) ProtoMessage() {}
|
|
|
|
func (x *GetUserChatsRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_messages_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 GetUserChatsRequest.ProtoReflect.Descriptor instead.
|
|
func (*GetUserChatsRequest) Descriptor() ([]byte, []int) {
|
|
return file_messages_proto_rawDescGZIP(), []int{4}
|
|
}
|
|
|
|
func (x *GetUserChatsRequest) GetUserId() int32 {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type UpdateMessageStatusRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
MessageId int32 `protobuf:"varint,1,opt,name=message_id,json=messageId,proto3" json:"message_id,omitempty"`
|
|
Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"`
|
|
UserId int32 `protobuf:"varint,3,opt,name=userId,proto3" json:"userId,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UpdateMessageStatusRequest) Reset() {
|
|
*x = UpdateMessageStatusRequest{}
|
|
mi := &file_messages_proto_msgTypes[5]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UpdateMessageStatusRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UpdateMessageStatusRequest) ProtoMessage() {}
|
|
|
|
func (x *UpdateMessageStatusRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_messages_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 UpdateMessageStatusRequest.ProtoReflect.Descriptor instead.
|
|
func (*UpdateMessageStatusRequest) Descriptor() ([]byte, []int) {
|
|
return file_messages_proto_rawDescGZIP(), []int{5}
|
|
}
|
|
|
|
func (x *UpdateMessageStatusRequest) GetMessageId() int32 {
|
|
if x != nil {
|
|
return x.MessageId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *UpdateMessageStatusRequest) GetStatus() string {
|
|
if x != nil {
|
|
return x.Status
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *UpdateMessageStatusRequest) GetUserId() int32 {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type StreamMessagesRequest struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
UserId int32 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *StreamMessagesRequest) Reset() {
|
|
*x = StreamMessagesRequest{}
|
|
mi := &file_messages_proto_msgTypes[6]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *StreamMessagesRequest) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*StreamMessagesRequest) ProtoMessage() {}
|
|
|
|
func (x *StreamMessagesRequest) ProtoReflect() protoreflect.Message {
|
|
mi := &file_messages_proto_msgTypes[6]
|
|
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 StreamMessagesRequest.ProtoReflect.Descriptor instead.
|
|
func (*StreamMessagesRequest) Descriptor() ([]byte, []int) {
|
|
return file_messages_proto_rawDescGZIP(), []int{6}
|
|
}
|
|
|
|
func (x *StreamMessagesRequest) GetUserId() int32 {
|
|
if x != nil {
|
|
return x.UserId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
type Message struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
ChatId int32 `protobuf:"varint,2,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
|
|
SenderId int32 `protobuf:"varint,3,opt,name=sender_id,json=senderId,proto3" json:"sender_id,omitempty"`
|
|
ReceiverId int32 `protobuf:"varint,4,opt,name=receiver_id,json=receiverId,proto3" json:"receiver_id,omitempty"`
|
|
Content string `protobuf:"bytes,5,opt,name=content,proto3" json:"content,omitempty"`
|
|
Status string `protobuf:"bytes,6,opt,name=status,proto3" json:"status,omitempty"`
|
|
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Message) Reset() {
|
|
*x = Message{}
|
|
mi := &file_messages_proto_msgTypes[7]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Message) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Message) ProtoMessage() {}
|
|
|
|
func (x *Message) ProtoReflect() protoreflect.Message {
|
|
mi := &file_messages_proto_msgTypes[7]
|
|
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 Message.ProtoReflect.Descriptor instead.
|
|
func (*Message) Descriptor() ([]byte, []int) {
|
|
return file_messages_proto_rawDescGZIP(), []int{7}
|
|
}
|
|
|
|
func (x *Message) GetId() int32 {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Message) GetChatId() int32 {
|
|
if x != nil {
|
|
return x.ChatId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Message) GetSenderId() int32 {
|
|
if x != nil {
|
|
return x.SenderId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Message) GetReceiverId() int32 {
|
|
if x != nil {
|
|
return x.ReceiverId
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Message) GetContent() string {
|
|
if x != nil {
|
|
return x.Content
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Message) GetStatus() string {
|
|
if x != nil {
|
|
return x.Status
|
|
}
|
|
return ""
|
|
}
|
|
|
|
func (x *Message) GetCreatedAt() *timestamppb.Timestamp {
|
|
if x != nil {
|
|
return x.CreatedAt
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type Chat struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Id int32 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
|
|
User1Id int32 `protobuf:"varint,2,opt,name=user1_id,json=user1Id,proto3" json:"user1_id,omitempty"`
|
|
User2Id int32 `protobuf:"varint,3,opt,name=user2_id,json=user2Id,proto3" json:"user2_id,omitempty"`
|
|
CreatedAt *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
|
|
UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"`
|
|
LastMessage *Message `protobuf:"bytes,6,opt,name=last_message,json=lastMessage,proto3" json:"last_message,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *Chat) Reset() {
|
|
*x = Chat{}
|
|
mi := &file_messages_proto_msgTypes[8]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *Chat) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*Chat) ProtoMessage() {}
|
|
|
|
func (x *Chat) ProtoReflect() protoreflect.Message {
|
|
mi := &file_messages_proto_msgTypes[8]
|
|
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 Chat.ProtoReflect.Descriptor instead.
|
|
func (*Chat) Descriptor() ([]byte, []int) {
|
|
return file_messages_proto_rawDescGZIP(), []int{8}
|
|
}
|
|
|
|
func (x *Chat) GetId() int32 {
|
|
if x != nil {
|
|
return x.Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Chat) GetUser1Id() int32 {
|
|
if x != nil {
|
|
return x.User1Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Chat) GetUser2Id() int32 {
|
|
if x != nil {
|
|
return x.User2Id
|
|
}
|
|
return 0
|
|
}
|
|
|
|
func (x *Chat) GetCreatedAt() *timestamppb.Timestamp {
|
|
if x != nil {
|
|
return x.CreatedAt
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Chat) GetUpdatedAt() *timestamppb.Timestamp {
|
|
if x != nil {
|
|
return x.UpdatedAt
|
|
}
|
|
return nil
|
|
}
|
|
|
|
func (x *Chat) GetLastMessage() *Message {
|
|
if x != nil {
|
|
return x.LastMessage
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type MessageResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *MessageResponse) Reset() {
|
|
*x = MessageResponse{}
|
|
mi := &file_messages_proto_msgTypes[9]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *MessageResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*MessageResponse) ProtoMessage() {}
|
|
|
|
func (x *MessageResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_messages_proto_msgTypes[9]
|
|
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 MessageResponse.ProtoReflect.Descriptor instead.
|
|
func (*MessageResponse) Descriptor() ([]byte, []int) {
|
|
return file_messages_proto_rawDescGZIP(), []int{9}
|
|
}
|
|
|
|
func (x *MessageResponse) GetMessage() *Message {
|
|
if x != nil {
|
|
return x.Message
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type MessagesResponse 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 *MessagesResponse) Reset() {
|
|
*x = MessagesResponse{}
|
|
mi := &file_messages_proto_msgTypes[10]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *MessagesResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*MessagesResponse) ProtoMessage() {}
|
|
|
|
func (x *MessagesResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_messages_proto_msgTypes[10]
|
|
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 MessagesResponse.ProtoReflect.Descriptor instead.
|
|
func (*MessagesResponse) Descriptor() ([]byte, []int) {
|
|
return file_messages_proto_rawDescGZIP(), []int{10}
|
|
}
|
|
|
|
func (x *MessagesResponse) GetMessages() []*Message {
|
|
if x != nil {
|
|
return x.Messages
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type ChatResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Chat *Chat `protobuf:"bytes,1,opt,name=chat,proto3" json:"chat,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *ChatResponse) Reset() {
|
|
*x = ChatResponse{}
|
|
mi := &file_messages_proto_msgTypes[11]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *ChatResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*ChatResponse) ProtoMessage() {}
|
|
|
|
func (x *ChatResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_messages_proto_msgTypes[11]
|
|
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 ChatResponse.ProtoReflect.Descriptor instead.
|
|
func (*ChatResponse) Descriptor() ([]byte, []int) {
|
|
return file_messages_proto_rawDescGZIP(), []int{11}
|
|
}
|
|
|
|
func (x *ChatResponse) GetChat() *Chat {
|
|
if x != nil {
|
|
return x.Chat
|
|
}
|
|
return nil
|
|
}
|
|
|
|
type UserChatsResponse struct {
|
|
state protoimpl.MessageState `protogen:"open.v1"`
|
|
Chats []*Chat `protobuf:"bytes,1,rep,name=chats,proto3" json:"chats,omitempty"`
|
|
unknownFields protoimpl.UnknownFields
|
|
sizeCache protoimpl.SizeCache
|
|
}
|
|
|
|
func (x *UserChatsResponse) Reset() {
|
|
*x = UserChatsResponse{}
|
|
mi := &file_messages_proto_msgTypes[12]
|
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
|
ms.StoreMessageInfo(mi)
|
|
}
|
|
|
|
func (x *UserChatsResponse) String() string {
|
|
return protoimpl.X.MessageStringOf(x)
|
|
}
|
|
|
|
func (*UserChatsResponse) ProtoMessage() {}
|
|
|
|
func (x *UserChatsResponse) ProtoReflect() protoreflect.Message {
|
|
mi := &file_messages_proto_msgTypes[12]
|
|
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 UserChatsResponse.ProtoReflect.Descriptor instead.
|
|
func (*UserChatsResponse) Descriptor() ([]byte, []int) {
|
|
return file_messages_proto_rawDescGZIP(), []int{12}
|
|
}
|
|
|
|
func (x *UserChatsResponse) GetChats() []*Chat {
|
|
if x != nil {
|
|
return x.Chats
|
|
}
|
|
return nil
|
|
}
|
|
|
|
var File_messages_proto protoreflect.FileDescriptor
|
|
|
|
const file_messages_proto_rawDesc = "" +
|
|
"\n" +
|
|
"\x0emessages.proto\x12\x05proto\x1a\x1fgoogle/protobuf/timestamp.proto\"I\n" +
|
|
"\x11CreateChatRequest\x12\x19\n" +
|
|
"\buser1_id\x18\x01 \x01(\x05R\auser1Id\x12\x19\n" +
|
|
"\buser2_id\x18\x02 \x01(\x05R\auser2Id\"d\n" +
|
|
"\x12SendMessageRequest\x12\x17\n" +
|
|
"\achat_id\x18\x01 \x01(\x05R\x06chatId\x12\x1b\n" +
|
|
"\tsender_id\x18\x02 \x01(\x05R\bsenderId\x12\x18\n" +
|
|
"\acontent\x18\x03 \x01(\tR\acontent\"F\n" +
|
|
"\x0eGetChatRequest\x12\x19\n" +
|
|
"\buser1_id\x18\x01 \x01(\x05R\auser1Id\x12\x19\n" +
|
|
"\buser2_id\x18\x02 \x01(\x05R\auser2Id\"_\n" +
|
|
"\x16GetChatMessagesRequest\x12\x17\n" +
|
|
"\achat_id\x18\x01 \x01(\x05R\x06chatId\x12\x14\n" +
|
|
"\x05limit\x18\x02 \x01(\x05R\x05limit\x12\x16\n" +
|
|
"\x06offset\x18\x03 \x01(\x05R\x06offset\".\n" +
|
|
"\x13GetUserChatsRequest\x12\x17\n" +
|
|
"\auser_id\x18\x01 \x01(\x05R\x06userId\"k\n" +
|
|
"\x1aUpdateMessageStatusRequest\x12\x1d\n" +
|
|
"\n" +
|
|
"message_id\x18\x01 \x01(\x05R\tmessageId\x12\x16\n" +
|
|
"\x06status\x18\x02 \x01(\tR\x06status\x12\x16\n" +
|
|
"\x06userId\x18\x03 \x01(\x05R\x06userId\"0\n" +
|
|
"\x15StreamMessagesRequest\x12\x17\n" +
|
|
"\auser_id\x18\x01 \x01(\x05R\x06userId\"\xdd\x01\n" +
|
|
"\aMessage\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\x05R\x02id\x12\x17\n" +
|
|
"\achat_id\x18\x02 \x01(\x05R\x06chatId\x12\x1b\n" +
|
|
"\tsender_id\x18\x03 \x01(\x05R\bsenderId\x12\x1f\n" +
|
|
"\vreceiver_id\x18\x04 \x01(\x05R\n" +
|
|
"receiverId\x12\x18\n" +
|
|
"\acontent\x18\x05 \x01(\tR\acontent\x12\x16\n" +
|
|
"\x06status\x18\x06 \x01(\tR\x06status\x129\n" +
|
|
"\n" +
|
|
"created_at\x18\a \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\"\xf5\x01\n" +
|
|
"\x04Chat\x12\x0e\n" +
|
|
"\x02id\x18\x01 \x01(\x05R\x02id\x12\x19\n" +
|
|
"\buser1_id\x18\x02 \x01(\x05R\auser1Id\x12\x19\n" +
|
|
"\buser2_id\x18\x03 \x01(\x05R\auser2Id\x129\n" +
|
|
"\n" +
|
|
"created_at\x18\x04 \x01(\v2\x1a.google.protobuf.TimestampR\tcreatedAt\x129\n" +
|
|
"\n" +
|
|
"updated_at\x18\x05 \x01(\v2\x1a.google.protobuf.TimestampR\tupdatedAt\x121\n" +
|
|
"\flast_message\x18\x06 \x01(\v2\x0e.proto.MessageR\vlastMessage\";\n" +
|
|
"\x0fMessageResponse\x12(\n" +
|
|
"\amessage\x18\x01 \x01(\v2\x0e.proto.MessageR\amessage\">\n" +
|
|
"\x10MessagesResponse\x12*\n" +
|
|
"\bmessages\x18\x01 \x03(\v2\x0e.proto.MessageR\bmessages\"/\n" +
|
|
"\fChatResponse\x12\x1f\n" +
|
|
"\x04chat\x18\x01 \x01(\v2\v.proto.ChatR\x04chat\"6\n" +
|
|
"\x11UserChatsResponse\x12!\n" +
|
|
"\x05chats\x18\x01 \x03(\v2\v.proto.ChatR\x05chats2\xf3\x03\n" +
|
|
"\x0eMessageService\x12;\n" +
|
|
"\n" +
|
|
"CreateChat\x12\x18.proto.CreateChatRequest\x1a\x13.proto.ChatResponse\x12@\n" +
|
|
"\vSendMessage\x12\x19.proto.SendMessageRequest\x1a\x16.proto.MessageResponse\x125\n" +
|
|
"\aGetChat\x12\x15.proto.GetChatRequest\x1a\x13.proto.ChatResponse\x12I\n" +
|
|
"\x0fGetChatMessages\x12\x1d.proto.GetChatMessagesRequest\x1a\x17.proto.MessagesResponse\x12D\n" +
|
|
"\fGetUserChats\x12\x1a.proto.GetUserChatsRequest\x1a\x18.proto.UserChatsResponse\x12P\n" +
|
|
"\x13UpdateMessageStatus\x12!.proto.UpdateMessageStatusRequest\x1a\x16.proto.MessageResponse\x12H\n" +
|
|
"\x0eStreamMessages\x12\x1c.proto.StreamMessagesRequest\x1a\x16.proto.MessageResponse0\x01B\n" +
|
|
"Z\b./;protob\x06proto3"
|
|
|
|
var (
|
|
file_messages_proto_rawDescOnce sync.Once
|
|
file_messages_proto_rawDescData []byte
|
|
)
|
|
|
|
func file_messages_proto_rawDescGZIP() []byte {
|
|
file_messages_proto_rawDescOnce.Do(func() {
|
|
file_messages_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_messages_proto_rawDesc), len(file_messages_proto_rawDesc)))
|
|
})
|
|
return file_messages_proto_rawDescData
|
|
}
|
|
|
|
var file_messages_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
|
|
var file_messages_proto_goTypes = []any{
|
|
(*CreateChatRequest)(nil), // 0: proto.CreateChatRequest
|
|
(*SendMessageRequest)(nil), // 1: proto.SendMessageRequest
|
|
(*GetChatRequest)(nil), // 2: proto.GetChatRequest
|
|
(*GetChatMessagesRequest)(nil), // 3: proto.GetChatMessagesRequest
|
|
(*GetUserChatsRequest)(nil), // 4: proto.GetUserChatsRequest
|
|
(*UpdateMessageStatusRequest)(nil), // 5: proto.UpdateMessageStatusRequest
|
|
(*StreamMessagesRequest)(nil), // 6: proto.StreamMessagesRequest
|
|
(*Message)(nil), // 7: proto.Message
|
|
(*Chat)(nil), // 8: proto.Chat
|
|
(*MessageResponse)(nil), // 9: proto.MessageResponse
|
|
(*MessagesResponse)(nil), // 10: proto.MessagesResponse
|
|
(*ChatResponse)(nil), // 11: proto.ChatResponse
|
|
(*UserChatsResponse)(nil), // 12: proto.UserChatsResponse
|
|
(*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp
|
|
}
|
|
var file_messages_proto_depIdxs = []int32{
|
|
13, // 0: proto.Message.created_at:type_name -> google.protobuf.Timestamp
|
|
13, // 1: proto.Chat.created_at:type_name -> google.protobuf.Timestamp
|
|
13, // 2: proto.Chat.updated_at:type_name -> google.protobuf.Timestamp
|
|
7, // 3: proto.Chat.last_message:type_name -> proto.Message
|
|
7, // 4: proto.MessageResponse.message:type_name -> proto.Message
|
|
7, // 5: proto.MessagesResponse.messages:type_name -> proto.Message
|
|
8, // 6: proto.ChatResponse.chat:type_name -> proto.Chat
|
|
8, // 7: proto.UserChatsResponse.chats:type_name -> proto.Chat
|
|
0, // 8: proto.MessageService.CreateChat:input_type -> proto.CreateChatRequest
|
|
1, // 9: proto.MessageService.SendMessage:input_type -> proto.SendMessageRequest
|
|
2, // 10: proto.MessageService.GetChat:input_type -> proto.GetChatRequest
|
|
3, // 11: proto.MessageService.GetChatMessages:input_type -> proto.GetChatMessagesRequest
|
|
4, // 12: proto.MessageService.GetUserChats:input_type -> proto.GetUserChatsRequest
|
|
5, // 13: proto.MessageService.UpdateMessageStatus:input_type -> proto.UpdateMessageStatusRequest
|
|
6, // 14: proto.MessageService.StreamMessages:input_type -> proto.StreamMessagesRequest
|
|
11, // 15: proto.MessageService.CreateChat:output_type -> proto.ChatResponse
|
|
9, // 16: proto.MessageService.SendMessage:output_type -> proto.MessageResponse
|
|
11, // 17: proto.MessageService.GetChat:output_type -> proto.ChatResponse
|
|
10, // 18: proto.MessageService.GetChatMessages:output_type -> proto.MessagesResponse
|
|
12, // 19: proto.MessageService.GetUserChats:output_type -> proto.UserChatsResponse
|
|
9, // 20: proto.MessageService.UpdateMessageStatus:output_type -> proto.MessageResponse
|
|
9, // 21: proto.MessageService.StreamMessages:output_type -> proto.MessageResponse
|
|
15, // [15:22] is the sub-list for method output_type
|
|
8, // [8:15] is the sub-list for method input_type
|
|
8, // [8:8] is the sub-list for extension type_name
|
|
8, // [8:8] is the sub-list for extension extendee
|
|
0, // [0:8] is the sub-list for field type_name
|
|
}
|
|
|
|
func init() { file_messages_proto_init() }
|
|
func file_messages_proto_init() {
|
|
if File_messages_proto != nil {
|
|
return
|
|
}
|
|
type x struct{}
|
|
out := protoimpl.TypeBuilder{
|
|
File: protoimpl.DescBuilder{
|
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_messages_proto_rawDesc), len(file_messages_proto_rawDesc)),
|
|
NumEnums: 0,
|
|
NumMessages: 13,
|
|
NumExtensions: 0,
|
|
NumServices: 1,
|
|
},
|
|
GoTypes: file_messages_proto_goTypes,
|
|
DependencyIndexes: file_messages_proto_depIdxs,
|
|
MessageInfos: file_messages_proto_msgTypes,
|
|
}.Build()
|
|
File_messages_proto = out.File
|
|
file_messages_proto_goTypes = nil
|
|
file_messages_proto_depIdxs = nil
|
|
}
|