diff --git a/chats/Makefile b/chats/Makefile index 1cd3626..54d5d7b 100644 --- a/chats/Makefile +++ b/chats/Makefile @@ -11,7 +11,7 @@ proto: docs: protoc --openapi_out=. --proto_path=. --micro_out=. --go_out=:. proto/chats.proto - @redoc-cli bundle api-protobuf.json + @redoc-cli bundle api-chats.json .PHONY: build build: diff --git a/chats/proto/chats.pb.go b/chats/proto/chats.pb.go index f035148..1c48903 100644 --- a/chats/proto/chats.pb.go +++ b/chats/proto/chats.pb.go @@ -1,736 +1,471 @@ // Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.23.0 -// protoc v3.13.0 // source: proto/chats.proto package chats import ( + fmt "fmt" proto "github.com/golang/protobuf/proto" timestamp "github.com/golang/protobuf/ptypes/timestamp" wrappers "github.com/golang/protobuf/ptypes/wrappers" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" + math "math" ) -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) -) +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf -// This is a compile-time assertion that a sufficiently up-to-date version -// of the legacy proto package is being used. -const _ = proto.ProtoPackageIsVersion4 +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package type Chat struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - UserIds []string `protobuf:"bytes,2,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` - CreatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + UserIds []string `protobuf:"bytes,2,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` + CreatedAt *timestamp.Timestamp `protobuf:"bytes,3,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *Chat) Reset() { - *x = Chat{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_chats_proto_msgTypes[0] - 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_proto_chats_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && 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 (m *Chat) Reset() { *m = Chat{} } +func (m *Chat) String() string { return proto.CompactTextString(m) } +func (*Chat) ProtoMessage() {} func (*Chat) Descriptor() ([]byte, []int) { - return file_proto_chats_proto_rawDescGZIP(), []int{0} + return fileDescriptor_5f41ca1a87b945e7, []int{0} } -func (x *Chat) GetId() string { - if x != nil { - return x.Id +func (m *Chat) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Chat.Unmarshal(m, b) +} +func (m *Chat) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Chat.Marshal(b, m, deterministic) +} +func (m *Chat) XXX_Merge(src proto.Message) { + xxx_messageInfo_Chat.Merge(m, src) +} +func (m *Chat) XXX_Size() int { + return xxx_messageInfo_Chat.Size(m) +} +func (m *Chat) XXX_DiscardUnknown() { + xxx_messageInfo_Chat.DiscardUnknown(m) +} + +var xxx_messageInfo_Chat proto.InternalMessageInfo + +func (m *Chat) GetId() string { + if m != nil { + return m.Id } return "" } -func (x *Chat) GetUserIds() []string { - if x != nil { - return x.UserIds +func (m *Chat) GetUserIds() []string { + if m != nil { + return m.UserIds } return nil } -func (x *Chat) GetCreatedAt() *timestamp.Timestamp { - if x != nil { - return x.CreatedAt +func (m *Chat) GetCreatedAt() *timestamp.Timestamp { + if m != nil { + return m.CreatedAt } return nil } type Message struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - AuthorId string `protobuf:"bytes,2,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` - ChatId string `protobuf:"bytes,3,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` - Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` - SentAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + AuthorId string `protobuf:"bytes,2,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` + ChatId string `protobuf:"bytes,3,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` + SentAt *timestamp.Timestamp `protobuf:"bytes,5,opt,name=sent_at,json=sentAt,proto3" json:"sent_at,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *Message) Reset() { - *x = Message{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_chats_proto_msgTypes[1] - 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_proto_chats_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && 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 (m *Message) Reset() { *m = Message{} } +func (m *Message) String() string { return proto.CompactTextString(m) } +func (*Message) ProtoMessage() {} func (*Message) Descriptor() ([]byte, []int) { - return file_proto_chats_proto_rawDescGZIP(), []int{1} + return fileDescriptor_5f41ca1a87b945e7, []int{1} } -func (x *Message) GetId() string { - if x != nil { - return x.Id +func (m *Message) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_Message.Unmarshal(m, b) +} +func (m *Message) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_Message.Marshal(b, m, deterministic) +} +func (m *Message) XXX_Merge(src proto.Message) { + xxx_messageInfo_Message.Merge(m, src) +} +func (m *Message) XXX_Size() int { + return xxx_messageInfo_Message.Size(m) +} +func (m *Message) XXX_DiscardUnknown() { + xxx_messageInfo_Message.DiscardUnknown(m) +} + +var xxx_messageInfo_Message proto.InternalMessageInfo + +func (m *Message) GetId() string { + if m != nil { + return m.Id } return "" } -func (x *Message) GetAuthorId() string { - if x != nil { - return x.AuthorId +func (m *Message) GetAuthorId() string { + if m != nil { + return m.AuthorId } return "" } -func (x *Message) GetChatId() string { - if x != nil { - return x.ChatId +func (m *Message) GetChatId() string { + if m != nil { + return m.ChatId } return "" } -func (x *Message) GetText() string { - if x != nil { - return x.Text +func (m *Message) GetText() string { + if m != nil { + return m.Text } return "" } -func (x *Message) GetSentAt() *timestamp.Timestamp { - if x != nil { - return x.SentAt +func (m *Message) GetSentAt() *timestamp.Timestamp { + if m != nil { + return m.SentAt } return nil } type CreateChatRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - UserIds []string `protobuf:"bytes,1,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` + UserIds []string `protobuf:"bytes,1,rep,name=user_ids,json=userIds,proto3" json:"user_ids,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *CreateChatRequest) Reset() { - *x = CreateChatRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_chats_proto_msgTypes[2] - 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_proto_chats_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && 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 (m *CreateChatRequest) Reset() { *m = CreateChatRequest{} } +func (m *CreateChatRequest) String() string { return proto.CompactTextString(m) } +func (*CreateChatRequest) ProtoMessage() {} func (*CreateChatRequest) Descriptor() ([]byte, []int) { - return file_proto_chats_proto_rawDescGZIP(), []int{2} + return fileDescriptor_5f41ca1a87b945e7, []int{2} } -func (x *CreateChatRequest) GetUserIds() []string { - if x != nil { - return x.UserIds +func (m *CreateChatRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateChatRequest.Unmarshal(m, b) +} +func (m *CreateChatRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateChatRequest.Marshal(b, m, deterministic) +} +func (m *CreateChatRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateChatRequest.Merge(m, src) +} +func (m *CreateChatRequest) XXX_Size() int { + return xxx_messageInfo_CreateChatRequest.Size(m) +} +func (m *CreateChatRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateChatRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateChatRequest proto.InternalMessageInfo + +func (m *CreateChatRequest) GetUserIds() []string { + if m != nil { + return m.UserIds } return nil } type CreateChatResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Chat *Chat `protobuf:"bytes,1,opt,name=chat,proto3" json:"chat,omitempty"` + Chat *Chat `protobuf:"bytes,1,opt,name=chat,proto3" json:"chat,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *CreateChatResponse) Reset() { - *x = CreateChatResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_chats_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateChatResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateChatResponse) ProtoMessage() {} - -func (x *CreateChatResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_chats_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateChatResponse.ProtoReflect.Descriptor instead. +func (m *CreateChatResponse) Reset() { *m = CreateChatResponse{} } +func (m *CreateChatResponse) String() string { return proto.CompactTextString(m) } +func (*CreateChatResponse) ProtoMessage() {} func (*CreateChatResponse) Descriptor() ([]byte, []int) { - return file_proto_chats_proto_rawDescGZIP(), []int{3} + return fileDescriptor_5f41ca1a87b945e7, []int{3} } -func (x *CreateChatResponse) GetChat() *Chat { - if x != nil { - return x.Chat +func (m *CreateChatResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateChatResponse.Unmarshal(m, b) +} +func (m *CreateChatResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateChatResponse.Marshal(b, m, deterministic) +} +func (m *CreateChatResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateChatResponse.Merge(m, src) +} +func (m *CreateChatResponse) XXX_Size() int { + return xxx_messageInfo_CreateChatResponse.Size(m) +} +func (m *CreateChatResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CreateChatResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateChatResponse proto.InternalMessageInfo + +func (m *CreateChatResponse) GetChat() *Chat { + if m != nil { + return m.Chat } return nil } type CreateMessageRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - ChatId string `protobuf:"bytes,2,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` - AuthorId string `protobuf:"bytes,3,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` - Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + ChatId string `protobuf:"bytes,2,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + AuthorId string `protobuf:"bytes,3,opt,name=author_id,json=authorId,proto3" json:"author_id,omitempty"` + Text string `protobuf:"bytes,4,opt,name=text,proto3" json:"text,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *CreateMessageRequest) Reset() { - *x = CreateMessageRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_chats_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateMessageRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateMessageRequest) ProtoMessage() {} - -func (x *CreateMessageRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_chats_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateMessageRequest.ProtoReflect.Descriptor instead. +func (m *CreateMessageRequest) Reset() { *m = CreateMessageRequest{} } +func (m *CreateMessageRequest) String() string { return proto.CompactTextString(m) } +func (*CreateMessageRequest) ProtoMessage() {} func (*CreateMessageRequest) Descriptor() ([]byte, []int) { - return file_proto_chats_proto_rawDescGZIP(), []int{4} + return fileDescriptor_5f41ca1a87b945e7, []int{4} } -func (x *CreateMessageRequest) GetId() string { - if x != nil { - return x.Id +func (m *CreateMessageRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateMessageRequest.Unmarshal(m, b) +} +func (m *CreateMessageRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateMessageRequest.Marshal(b, m, deterministic) +} +func (m *CreateMessageRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateMessageRequest.Merge(m, src) +} +func (m *CreateMessageRequest) XXX_Size() int { + return xxx_messageInfo_CreateMessageRequest.Size(m) +} +func (m *CreateMessageRequest) XXX_DiscardUnknown() { + xxx_messageInfo_CreateMessageRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateMessageRequest proto.InternalMessageInfo + +func (m *CreateMessageRequest) GetId() string { + if m != nil { + return m.Id } return "" } -func (x *CreateMessageRequest) GetChatId() string { - if x != nil { - return x.ChatId +func (m *CreateMessageRequest) GetChatId() string { + if m != nil { + return m.ChatId } return "" } -func (x *CreateMessageRequest) GetAuthorId() string { - if x != nil { - return x.AuthorId +func (m *CreateMessageRequest) GetAuthorId() string { + if m != nil { + return m.AuthorId } return "" } -func (x *CreateMessageRequest) GetText() string { - if x != nil { - return x.Text +func (m *CreateMessageRequest) GetText() string { + if m != nil { + return m.Text } return "" } type CreateMessageResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + Message *Message `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *CreateMessageResponse) Reset() { - *x = CreateMessageResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_chats_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateMessageResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateMessageResponse) ProtoMessage() {} - -func (x *CreateMessageResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_chats_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateMessageResponse.ProtoReflect.Descriptor instead. +func (m *CreateMessageResponse) Reset() { *m = CreateMessageResponse{} } +func (m *CreateMessageResponse) String() string { return proto.CompactTextString(m) } +func (*CreateMessageResponse) ProtoMessage() {} func (*CreateMessageResponse) Descriptor() ([]byte, []int) { - return file_proto_chats_proto_rawDescGZIP(), []int{5} + return fileDescriptor_5f41ca1a87b945e7, []int{5} } -func (x *CreateMessageResponse) GetMessage() *Message { - if x != nil { - return x.Message +func (m *CreateMessageResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_CreateMessageResponse.Unmarshal(m, b) +} +func (m *CreateMessageResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_CreateMessageResponse.Marshal(b, m, deterministic) +} +func (m *CreateMessageResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_CreateMessageResponse.Merge(m, src) +} +func (m *CreateMessageResponse) XXX_Size() int { + return xxx_messageInfo_CreateMessageResponse.Size(m) +} +func (m *CreateMessageResponse) XXX_DiscardUnknown() { + xxx_messageInfo_CreateMessageResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_CreateMessageResponse proto.InternalMessageInfo + +func (m *CreateMessageResponse) GetMessage() *Message { + if m != nil { + return m.Message } return nil } type ListMessagesRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` - SentBefore *timestamp.Timestamp `protobuf:"bytes,2,opt,name=sent_before,json=sentBefore,proto3" json:"sent_before,omitempty"` - Limit *wrappers.Int32Value `protobuf:"bytes,3,opt,name=limit,proto3" json:"limit,omitempty"` + ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"` + SentBefore *timestamp.Timestamp `protobuf:"bytes,2,opt,name=sent_before,json=sentBefore,proto3" json:"sent_before,omitempty"` + Limit *wrappers.Int32Value `protobuf:"bytes,3,opt,name=limit,proto3" json:"limit,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *ListMessagesRequest) Reset() { - *x = ListMessagesRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_chats_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListMessagesRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMessagesRequest) ProtoMessage() {} - -func (x *ListMessagesRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_chats_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMessagesRequest.ProtoReflect.Descriptor instead. +func (m *ListMessagesRequest) Reset() { *m = ListMessagesRequest{} } +func (m *ListMessagesRequest) String() string { return proto.CompactTextString(m) } +func (*ListMessagesRequest) ProtoMessage() {} func (*ListMessagesRequest) Descriptor() ([]byte, []int) { - return file_proto_chats_proto_rawDescGZIP(), []int{6} + return fileDescriptor_5f41ca1a87b945e7, []int{6} } -func (x *ListMessagesRequest) GetChatId() string { - if x != nil { - return x.ChatId +func (m *ListMessagesRequest) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListMessagesRequest.Unmarshal(m, b) +} +func (m *ListMessagesRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListMessagesRequest.Marshal(b, m, deterministic) +} +func (m *ListMessagesRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListMessagesRequest.Merge(m, src) +} +func (m *ListMessagesRequest) XXX_Size() int { + return xxx_messageInfo_ListMessagesRequest.Size(m) +} +func (m *ListMessagesRequest) XXX_DiscardUnknown() { + xxx_messageInfo_ListMessagesRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_ListMessagesRequest proto.InternalMessageInfo + +func (m *ListMessagesRequest) GetChatId() string { + if m != nil { + return m.ChatId } return "" } -func (x *ListMessagesRequest) GetSentBefore() *timestamp.Timestamp { - if x != nil { - return x.SentBefore +func (m *ListMessagesRequest) GetSentBefore() *timestamp.Timestamp { + if m != nil { + return m.SentBefore } return nil } -func (x *ListMessagesRequest) GetLimit() *wrappers.Int32Value { - if x != nil { - return x.Limit +func (m *ListMessagesRequest) GetLimit() *wrappers.Int32Value { + if m != nil { + return m.Limit } return nil } type ListMessagesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Messages []*Message `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` + Messages []*Message `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } -func (x *ListMessagesResponse) Reset() { - *x = ListMessagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_chats_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListMessagesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMessagesResponse) ProtoMessage() {} - -func (x *ListMessagesResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_chats_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMessagesResponse.ProtoReflect.Descriptor instead. +func (m *ListMessagesResponse) Reset() { *m = ListMessagesResponse{} } +func (m *ListMessagesResponse) String() string { return proto.CompactTextString(m) } +func (*ListMessagesResponse) ProtoMessage() {} func (*ListMessagesResponse) Descriptor() ([]byte, []int) { - return file_proto_chats_proto_rawDescGZIP(), []int{7} + return fileDescriptor_5f41ca1a87b945e7, []int{7} } -func (x *ListMessagesResponse) GetMessages() []*Message { - if x != nil { - return x.Messages +func (m *ListMessagesResponse) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_ListMessagesResponse.Unmarshal(m, b) +} +func (m *ListMessagesResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_ListMessagesResponse.Marshal(b, m, deterministic) +} +func (m *ListMessagesResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_ListMessagesResponse.Merge(m, src) +} +func (m *ListMessagesResponse) XXX_Size() int { + return xxx_messageInfo_ListMessagesResponse.Size(m) +} +func (m *ListMessagesResponse) XXX_DiscardUnknown() { + xxx_messageInfo_ListMessagesResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_ListMessagesResponse proto.InternalMessageInfo + +func (m *ListMessagesResponse) GetMessages() []*Message { + if m != nil { + return m.Messages } return nil } -var File_proto_chats_proto protoreflect.FileDescriptor - -var file_proto_chats_proto_rawDesc = []byte{ - 0x0a, 0x11, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x73, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x63, 0x68, 0x61, 0x74, 0x73, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, - 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6c, 0x0a, 0x04, 0x43, - 0x68, 0x61, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, - 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x73, 0x12, 0x39, - 0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x98, 0x01, 0x0a, 0x07, 0x4d, 0x65, - 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x5f, - 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, - 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x68, 0x61, 0x74, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, - 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x12, - 0x33, 0x0a, 0x07, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x06, 0x73, 0x65, - 0x6e, 0x74, 0x41, 0x74, 0x22, 0x2e, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, - 0x61, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x75, 0x73, 0x65, - 0x72, 0x49, 0x64, 0x73, 0x22, 0x35, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, - 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x04, 0x63, 0x68, - 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0b, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x73, - 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x04, 0x63, 0x68, 0x61, 0x74, 0x22, 0x70, 0x0a, 0x14, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x68, 0x61, 0x74, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, - 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x08, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, - 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x22, 0x41, 0x0a, - 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x28, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x73, 0x2e, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x22, 0x9e, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x68, 0x61, 0x74, 0x49, - 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x6e, 0x74, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, - 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x74, 0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x31, - 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52, 0x05, 0x6c, 0x69, 0x6d, 0x69, - 0x74, 0x22, 0x42, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x08, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x68, - 0x61, 0x74, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, - 0x73, 0x61, 0x67, 0x65, 0x73, 0x32, 0xdf, 0x01, 0x0a, 0x05, 0x43, 0x68, 0x61, 0x74, 0x73, 0x12, - 0x41, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x12, 0x18, 0x2e, - 0x63, 0x68, 0x61, 0x74, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x73, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x4a, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, - 0x61, 0x67, 0x65, 0x12, 0x1b, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x1c, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, - 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, - 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1a, - 0x2e, 0x63, 0x68, 0x61, 0x74, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, - 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1b, 0x2e, 0x63, 0x68, 0x61, - 0x74, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0d, 0x5a, 0x0b, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x3b, 0x63, 0x68, 0x61, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, +func init() { + proto.RegisterType((*Chat)(nil), "chats.Chat") + proto.RegisterType((*Message)(nil), "chats.Message") + proto.RegisterType((*CreateChatRequest)(nil), "chats.CreateChatRequest") + proto.RegisterType((*CreateChatResponse)(nil), "chats.CreateChatResponse") + proto.RegisterType((*CreateMessageRequest)(nil), "chats.CreateMessageRequest") + proto.RegisterType((*CreateMessageResponse)(nil), "chats.CreateMessageResponse") + proto.RegisterType((*ListMessagesRequest)(nil), "chats.ListMessagesRequest") + proto.RegisterType((*ListMessagesResponse)(nil), "chats.ListMessagesResponse") } -var ( - file_proto_chats_proto_rawDescOnce sync.Once - file_proto_chats_proto_rawDescData = file_proto_chats_proto_rawDesc -) +func init() { proto.RegisterFile("proto/chats.proto", fileDescriptor_5f41ca1a87b945e7) } -func file_proto_chats_proto_rawDescGZIP() []byte { - file_proto_chats_proto_rawDescOnce.Do(func() { - file_proto_chats_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_chats_proto_rawDescData) - }) - return file_proto_chats_proto_rawDescData -} - -var file_proto_chats_proto_msgTypes = make([]protoimpl.MessageInfo, 8) -var file_proto_chats_proto_goTypes = []interface{}{ - (*Chat)(nil), // 0: chats.Chat - (*Message)(nil), // 1: chats.Message - (*CreateChatRequest)(nil), // 2: chats.CreateChatRequest - (*CreateChatResponse)(nil), // 3: chats.CreateChatResponse - (*CreateMessageRequest)(nil), // 4: chats.CreateMessageRequest - (*CreateMessageResponse)(nil), // 5: chats.CreateMessageResponse - (*ListMessagesRequest)(nil), // 6: chats.ListMessagesRequest - (*ListMessagesResponse)(nil), // 7: chats.ListMessagesResponse - (*timestamp.Timestamp)(nil), // 8: google.protobuf.Timestamp - (*wrappers.Int32Value)(nil), // 9: google.protobuf.Int32Value -} -var file_proto_chats_proto_depIdxs = []int32{ - 8, // 0: chats.Chat.created_at:type_name -> google.protobuf.Timestamp - 8, // 1: chats.Message.sent_at:type_name -> google.protobuf.Timestamp - 0, // 2: chats.CreateChatResponse.chat:type_name -> chats.Chat - 1, // 3: chats.CreateMessageResponse.message:type_name -> chats.Message - 8, // 4: chats.ListMessagesRequest.sent_before:type_name -> google.protobuf.Timestamp - 9, // 5: chats.ListMessagesRequest.limit:type_name -> google.protobuf.Int32Value - 1, // 6: chats.ListMessagesResponse.messages:type_name -> chats.Message - 2, // 7: chats.Chats.CreateChat:input_type -> chats.CreateChatRequest - 4, // 8: chats.Chats.CreateMessage:input_type -> chats.CreateMessageRequest - 6, // 9: chats.Chats.ListMessages:input_type -> chats.ListMessagesRequest - 3, // 10: chats.Chats.CreateChat:output_type -> chats.CreateChatResponse - 5, // 11: chats.Chats.CreateMessage:output_type -> chats.CreateMessageResponse - 7, // 12: chats.Chats.ListMessages:output_type -> chats.ListMessagesResponse - 10, // [10:13] is the sub-list for method output_type - 7, // [7:10] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name -} - -func init() { file_proto_chats_proto_init() } -func file_proto_chats_proto_init() { - if File_proto_chats_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_chats_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Chat); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_chats_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Message); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_chats_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateChatRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_chats_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateChatResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_chats_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateMessageRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_chats_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateMessageResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_chats_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMessagesRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_chats_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMessagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_chats_proto_rawDesc, - NumEnums: 0, - NumMessages: 8, - NumExtensions: 0, - NumServices: 1, - }, - GoTypes: file_proto_chats_proto_goTypes, - DependencyIndexes: file_proto_chats_proto_depIdxs, - MessageInfos: file_proto_chats_proto_msgTypes, - }.Build() - File_proto_chats_proto = out.File - file_proto_chats_proto_rawDesc = nil - file_proto_chats_proto_goTypes = nil - file_proto_chats_proto_depIdxs = nil +var fileDescriptor_5f41ca1a87b945e7 = []byte{ + // 484 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0xcd, 0x8e, 0xd3, 0x30, + 0x10, 0x56, 0xd2, 0x9f, 0xb4, 0x13, 0x76, 0xa5, 0x35, 0x8b, 0xc8, 0xa6, 0x88, 0xad, 0x72, 0xaa, + 0x38, 0xa4, 0xa2, 0x15, 0x07, 0xb4, 0xa7, 0x76, 0x0f, 0xa8, 0x08, 0x2e, 0x11, 0xe2, 0xc0, 0x65, + 0xe5, 0x6e, 0xdc, 0x36, 0x52, 0xdb, 0x84, 0x78, 0x22, 0x78, 0x14, 0x4e, 0xbc, 0x1a, 0xaf, 0x82, + 0x3c, 0x76, 0xa0, 0x4e, 0x23, 0xb8, 0xc5, 0xf3, 0x7d, 0xf1, 0x7c, 0x3f, 0x86, 0xab, 0xa2, 0xcc, + 0x31, 0x9f, 0x3e, 0xee, 0x38, 0xca, 0x98, 0xbe, 0x59, 0x8f, 0x0e, 0xe1, 0xed, 0x36, 0xcf, 0xb7, + 0x7b, 0x31, 0xa5, 0xe1, 0xba, 0xda, 0x4c, 0x31, 0x3b, 0x08, 0x89, 0xfc, 0x50, 0x68, 0x5e, 0xf8, + 0xb2, 0x49, 0xf8, 0x56, 0xf2, 0xa2, 0x10, 0xa5, 0xb9, 0x27, 0xda, 0x43, 0xf7, 0x7e, 0xc7, 0x91, + 0x5d, 0x82, 0x9b, 0xa5, 0x81, 0x33, 0x76, 0x26, 0xc3, 0xc4, 0xcd, 0x52, 0x76, 0x03, 0x83, 0x4a, + 0x8a, 0xf2, 0x21, 0x4b, 0x65, 0xe0, 0x8e, 0x3b, 0x93, 0x61, 0xe2, 0xa9, 0xf3, 0x2a, 0x95, 0xec, + 0x2d, 0xc0, 0x63, 0x29, 0x38, 0x8a, 0xf4, 0x81, 0x63, 0xd0, 0x19, 0x3b, 0x13, 0x7f, 0x16, 0xc6, + 0x7a, 0x4f, 0x5c, 0xef, 0x89, 0x3f, 0xd5, 0x42, 0x92, 0xa1, 0x61, 0x2f, 0x30, 0xfa, 0xe1, 0x80, + 0xf7, 0x51, 0x48, 0xc9, 0xb7, 0xe2, 0x6c, 0xe3, 0x08, 0x86, 0xbc, 0xc2, 0x5d, 0xae, 0x76, 0x06, + 0x2e, 0x8d, 0x07, 0x7a, 0xb0, 0x4a, 0xd9, 0x73, 0xf0, 0x94, 0x61, 0x05, 0x75, 0x08, 0xea, 0xab, + 0xe3, 0x2a, 0x65, 0x0c, 0xba, 0x28, 0xbe, 0x63, 0xd0, 0xa5, 0x29, 0x7d, 0xb3, 0x39, 0x78, 0x52, + 0x1c, 0x51, 0xa9, 0xeb, 0xfd, 0x57, 0x5d, 0x5f, 0x51, 0x17, 0x18, 0xc5, 0x70, 0x75, 0x4f, 0x3a, + 0x55, 0x1c, 0x89, 0xf8, 0x5a, 0x09, 0x89, 0x56, 0x0a, 0x8e, 0x95, 0x42, 0xf4, 0x06, 0xd8, 0x29, + 0x5f, 0x16, 0xf9, 0x51, 0x0a, 0x76, 0x0b, 0x5d, 0x25, 0x8c, 0x6c, 0xf9, 0x33, 0x3f, 0xd6, 0x95, + 0x11, 0x85, 0x80, 0xa8, 0x80, 0x6b, 0xfd, 0x9b, 0x89, 0xa1, 0xde, 0xd4, 0x4c, 0xe3, 0xc4, 0xb0, + 0x6b, 0x19, 0xb6, 0x62, 0xea, 0x34, 0x62, 0x6a, 0x49, 0x23, 0x5a, 0xc0, 0xb3, 0xc6, 0x46, 0xa3, + 0x75, 0x02, 0xde, 0x41, 0x8f, 0x8c, 0xdc, 0x4b, 0x23, 0xb7, 0x26, 0xd6, 0x70, 0xf4, 0xd3, 0x81, + 0xa7, 0x1f, 0x32, 0x89, 0x06, 0x90, 0xb5, 0xe8, 0x13, 0x91, 0x8e, 0x25, 0xf2, 0x0e, 0x7c, 0x6a, + 0x60, 0x2d, 0x36, 0x79, 0x29, 0xc8, 0xc1, 0xbf, 0x5b, 0x00, 0x45, 0x5f, 0x12, 0x9b, 0xbd, 0x86, + 0xde, 0x3e, 0x3b, 0x64, 0xf5, 0xd3, 0x1a, 0x9d, 0xfd, 0xb6, 0x3a, 0xe2, 0x7c, 0xf6, 0x99, 0xef, + 0x2b, 0x91, 0x68, 0x66, 0xb4, 0x84, 0x6b, 0x5b, 0x9f, 0xb1, 0xf8, 0x0a, 0x06, 0xc6, 0x83, 0xee, + 0xef, 0xdc, 0xe3, 0x1f, 0x7c, 0xf6, 0xcb, 0x81, 0x9e, 0x2a, 0x4a, 0xb2, 0x05, 0xc0, 0xdf, 0x6a, + 0x59, 0x50, 0x97, 0xd8, 0x7c, 0x1d, 0xe1, 0x4d, 0x0b, 0x62, 0x16, 0xbf, 0x87, 0x0b, 0x2b, 0x74, + 0x36, 0xb2, 0xb8, 0x76, 0xf9, 0xe1, 0x8b, 0x76, 0xd0, 0xdc, 0xf5, 0x0e, 0x9e, 0x9c, 0x9a, 0x63, + 0xa1, 0x61, 0xb7, 0x34, 0x12, 0x8e, 0x5a, 0x31, 0x7d, 0xd1, 0xf2, 0xe2, 0x8b, 0x4f, 0x19, 0xde, + 0x11, 0x67, 0xdd, 0xa7, 0xc3, 0xfc, 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3d, 0x2d, 0x4f, 0xe4, + 0x5e, 0x04, 0x00, 0x00, } diff --git a/chats/proto/chats.proto b/chats/proto/chats.proto index 2da9b87..e46264d 100644 --- a/chats/proto/chats.proto +++ b/chats/proto/chats.proto @@ -1,7 +1,9 @@ syntax = "proto3"; package chats; + option go_package = "proto;chats"; + import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; @@ -57,4 +59,4 @@ message ListMessagesRequest { message ListMessagesResponse { repeated Message messages = 1; -} \ No newline at end of file +}