mirror of
https://github.com/kevin-DL/services.git
synced 2026-01-19 14:05:23 +00:00
Add idempotent_id to chat and threads services (#64)
* Add idempotent_id to chat and threads services * Rename
This commit is contained in:
@@ -62,14 +62,13 @@ func assertMessagesMatch(t *testing.T, exp, act *pb.Message) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// adapt this check so we can reuse the func in testing create, where we don't know the exact id
|
// adapt these checks so we can reuse the func in testing create, where we don't know the exact id /
|
||||||
// which will be generated
|
// idempotent_id which will be generated
|
||||||
if len(exp.Id) > 0 {
|
if len(exp.Id) > 0 {
|
||||||
assert.Equal(t, exp.Id, act.Id)
|
assert.Equal(t, exp.Id, act.Id)
|
||||||
} else {
|
} else {
|
||||||
assert.NotEmpty(t, act.Id)
|
assert.NotEmpty(t, act.Id)
|
||||||
}
|
}
|
||||||
|
|
||||||
assert.Equal(t, exp.Text, act.Text)
|
assert.Equal(t, exp.Text, act.Text)
|
||||||
assert.Equal(t, exp.AuthorId, act.AuthorId)
|
assert.Equal(t, exp.AuthorId, act.AuthorId)
|
||||||
assert.Equal(t, exp.ChatId, act.ChatId)
|
assert.Equal(t, exp.ChatId, act.ChatId)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/micro/v3/service/errors"
|
"github.com/micro/micro/v3/service/errors"
|
||||||
@@ -23,31 +24,40 @@ func (c *Chats) CreateMessage(ctx context.Context, req *pb.CreateMessageRequest,
|
|||||||
return ErrMissingText
|
return ErrMissingText
|
||||||
}
|
}
|
||||||
|
|
||||||
return c.DB.Transaction(func(tx *gorm.DB) error {
|
// lookup the chat
|
||||||
// lookup the chat
|
var conv Chat
|
||||||
var conv Chat
|
if err := c.DB.Where(&Chat{ID: req.ChatId}).First(&conv).Error; err == gorm.ErrRecordNotFound {
|
||||||
if err := tx.Where(&Chat{ID: req.ChatId}).First(&conv).Error; err == gorm.ErrRecordNotFound {
|
return ErrNotFound
|
||||||
return ErrNotFound
|
} else if err != nil {
|
||||||
} else if err != nil {
|
logger.Errorf("Error reading chat: %v", err)
|
||||||
logger.Errorf("Error reading chat: %v", err)
|
return errors.InternalServerError("DATABASE_ERROR", "Error connecting to database")
|
||||||
return errors.InternalServerError("DATABASE_ERROR", "Error connecting to database")
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// create the message
|
// create the message
|
||||||
msg := &Message{
|
msg := &Message{
|
||||||
ID: uuid.New().String(),
|
ID: req.Id,
|
||||||
SentAt: c.Time(),
|
SentAt: c.Time(),
|
||||||
Text: req.Text,
|
Text: req.Text,
|
||||||
AuthorID: req.AuthorId,
|
AuthorID: req.AuthorId,
|
||||||
ChatID: req.ChatId,
|
ChatID: req.ChatId,
|
||||||
}
|
}
|
||||||
if err := tx.Create(msg).Error; err != nil {
|
if len(msg.ID) == 0 {
|
||||||
logger.Errorf("Error creating message: %v", err)
|
msg.ID = uuid.New().String()
|
||||||
return errors.InternalServerError("DATABASE_ERROR", "Error connecting to database")
|
}
|
||||||
}
|
if err := c.DB.Create(msg).Error; err == nil {
|
||||||
|
|
||||||
// serialize the response
|
|
||||||
rsp.Message = msg.Serialize()
|
rsp.Message = msg.Serialize()
|
||||||
return nil
|
return nil
|
||||||
})
|
} else if !strings.Contains(err.Error(), "messages_pkey") {
|
||||||
|
logger.Errorf("Error creating message: %v", err)
|
||||||
|
return errors.InternalServerError("DATABASE_ERROR", "Error connecting to database")
|
||||||
|
}
|
||||||
|
|
||||||
|
// a message already exists with this id
|
||||||
|
var existing Message
|
||||||
|
if err := c.DB.Where(&Message{ID: msg.ID}).First(&existing).Error; err != nil {
|
||||||
|
logger.Errorf("Error creating message: %v", err)
|
||||||
|
return errors.InternalServerError("DATABASE_ERROR", "Error connecting to database")
|
||||||
|
}
|
||||||
|
rsp.Message = existing.Serialize()
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,12 +25,14 @@ func TestCreateMessage(t *testing.T) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iid := uuid.New().String()
|
||||||
tt := []struct {
|
tt := []struct {
|
||||||
Name string
|
Name string
|
||||||
AuthorID string
|
AuthorID string
|
||||||
ChatID string
|
ChatID string
|
||||||
Text string
|
Text string
|
||||||
Error error
|
Error error
|
||||||
|
ID string
|
||||||
}{
|
}{
|
||||||
{
|
{
|
||||||
Name: "MissingChatID",
|
Name: "MissingChatID",
|
||||||
@@ -58,18 +60,35 @@ func TestCreateMessage(t *testing.T) {
|
|||||||
Error: handler.ErrNotFound,
|
Error: handler.ErrNotFound,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Valid",
|
Name: "WithoutID",
|
||||||
ChatID: cRsp.Chat.Id,
|
ChatID: cRsp.Chat.Id,
|
||||||
AuthorID: uuid.New().String(),
|
AuthorID: uuid.New().String(),
|
||||||
Text: "HelloWorld",
|
Text: "HelloWorld",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "WithID",
|
||||||
|
ChatID: cRsp.Chat.Id,
|
||||||
|
AuthorID: "johndoe",
|
||||||
|
Text: "HelloWorld",
|
||||||
|
ID: iid,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "RepeatID",
|
||||||
|
ChatID: cRsp.Chat.Id,
|
||||||
|
AuthorID: "johndoe",
|
||||||
|
Text: "HelloWorld",
|
||||||
|
ID: iid,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tc := range tt {
|
for _, tc := range tt {
|
||||||
t.Run(tc.Name, func(t *testing.T) {
|
t.Run(tc.Name, func(t *testing.T) {
|
||||||
var rsp pb.CreateMessageResponse
|
var rsp pb.CreateMessageResponse
|
||||||
err := h.CreateMessage(context.TODO(), &pb.CreateMessageRequest{
|
err := h.CreateMessage(context.TODO(), &pb.CreateMessageRequest{
|
||||||
Text: tc.Text, ChatId: tc.ChatID, AuthorId: tc.AuthorID,
|
AuthorId: tc.AuthorID,
|
||||||
|
ChatId: tc.ChatID,
|
||||||
|
Text: tc.Text,
|
||||||
|
Id: tc.ID,
|
||||||
}, &rsp)
|
}, &rsp)
|
||||||
|
|
||||||
assert.Equal(t, tc.Error, err)
|
assert.Equal(t, tc.Error, err)
|
||||||
@@ -83,6 +102,7 @@ func TestCreateMessage(t *testing.T) {
|
|||||||
ChatId: tc.ChatID,
|
ChatId: tc.ChatID,
|
||||||
SentAt: timestamppb.New(h.Time()),
|
SentAt: timestamppb.New(h.Time()),
|
||||||
Text: tc.Text,
|
Text: tc.Text,
|
||||||
|
Id: tc.ID,
|
||||||
}, rsp.Message)
|
}, rsp.Message)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.25.0
|
// protoc-gen-go v1.23.0
|
||||||
// protoc v3.6.1
|
// protoc v3.13.0
|
||||||
// source: proto/chats.proto
|
// source: proto/chats.proto
|
||||||
|
|
||||||
package chats
|
package chats
|
||||||
@@ -268,9 +268,10 @@ type CreateMessageRequest struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
ChatId string `protobuf:"bytes,1,opt,name=chat_id,json=chatId,proto3" json:"chat_id,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,2,opt,name=chat_id,json=chatId,proto3" json:"chat_id,omitempty"`
|
||||||
Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CreateMessageRequest) Reset() {
|
func (x *CreateMessageRequest) Reset() {
|
||||||
@@ -305,6 +306,13 @@ func (*CreateMessageRequest) Descriptor() ([]byte, []int) {
|
|||||||
return file_proto_chats_proto_rawDescGZIP(), []int{4}
|
return file_proto_chats_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *CreateMessageRequest) GetId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Id
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
func (x *CreateMessageRequest) GetChatId() string {
|
func (x *CreateMessageRequest) GetChatId() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.ChatId
|
return x.ChatId
|
||||||
@@ -514,13 +522,14 @@ var file_proto_chats_proto_rawDesc = []byte{
|
|||||||
0x72, 0x49, 0x64, 0x73, 0x22, 0x35, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68,
|
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, 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,
|
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, 0x60, 0x0a, 0x14, 0x43,
|
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,
|
0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75,
|
||||||
0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x63, 0x68, 0x61, 0x74, 0x5f, 0x69, 0x64, 0x18, 0x01,
|
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,
|
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, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
|
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,
|
0x08, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78,
|
||||||
0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x65, 0x78, 0x74, 0x22, 0x41, 0x0a,
|
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,
|
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,
|
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,
|
0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x73, 0x2e,
|
||||||
|
|||||||
@@ -39,9 +39,10 @@ message CreateChatResponse {
|
|||||||
}
|
}
|
||||||
|
|
||||||
message CreateMessageRequest {
|
message CreateMessageRequest {
|
||||||
string chat_id = 1;
|
string id = 1;
|
||||||
string author_id = 2;
|
string chat_id = 2;
|
||||||
string text = 3;
|
string author_id = 3;
|
||||||
|
string text = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message CreateMessageResponse {
|
message CreateMessageResponse {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package handler
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"github.com/micro/micro/v3/service/errors"
|
"github.com/micro/micro/v3/service/errors"
|
||||||
@@ -23,31 +24,40 @@ func (s *Threads) CreateMessage(ctx context.Context, req *pb.CreateMessageReques
|
|||||||
return ErrMissingText
|
return ErrMissingText
|
||||||
}
|
}
|
||||||
|
|
||||||
return s.DB.Transaction(func(tx *gorm.DB) error {
|
// lookup the conversation
|
||||||
// lookup the conversation
|
var conv Conversation
|
||||||
var conv Conversation
|
if err := s.DB.Where(&Conversation{ID: req.ConversationId}).First(&conv).Error; err == gorm.ErrRecordNotFound {
|
||||||
if err := tx.Where(&Conversation{ID: req.ConversationId}).First(&conv).Error; err == gorm.ErrRecordNotFound {
|
return ErrNotFound
|
||||||
return ErrNotFound
|
} else if err != nil {
|
||||||
} else if err != nil {
|
logger.Errorf("Error reading conversation: %v", err)
|
||||||
logger.Errorf("Error reading conversation: %v", err)
|
return errors.InternalServerError("DATABASE_ERROR", "Error connecting to database")
|
||||||
return errors.InternalServerError("DATABASE_ERROR", "Error connecting to database")
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// create the message
|
// create the message
|
||||||
msg := &Message{
|
msg := &Message{
|
||||||
ID: uuid.New().String(),
|
ID: req.Id,
|
||||||
SentAt: s.Time(),
|
SentAt: s.Time(),
|
||||||
Text: req.Text,
|
Text: req.Text,
|
||||||
AuthorID: req.AuthorId,
|
AuthorID: req.AuthorId,
|
||||||
ConversationID: req.ConversationId,
|
ConversationID: req.ConversationId,
|
||||||
}
|
}
|
||||||
if err := tx.Create(msg).Error; err != nil {
|
if len(msg.ID) == 0 {
|
||||||
logger.Errorf("Error creating message: %v", err)
|
msg.ID = uuid.New().String()
|
||||||
return errors.InternalServerError("DATABASE_ERROR", "Error connecting to database")
|
}
|
||||||
}
|
if err := s.DB.Create(msg).Error; err == nil {
|
||||||
|
|
||||||
// serialize the response
|
|
||||||
rsp.Message = msg.Serialize()
|
rsp.Message = msg.Serialize()
|
||||||
return nil
|
return nil
|
||||||
})
|
} else if !strings.Contains(err.Error(), "messages_pkey") {
|
||||||
|
logger.Errorf("Error creating message: %v", err)
|
||||||
|
return errors.InternalServerError("DATABASE_ERROR", "Error connecting to database")
|
||||||
|
}
|
||||||
|
|
||||||
|
// a message already exists with this id
|
||||||
|
var existing Message
|
||||||
|
if err := s.DB.Where(&Message{ID: msg.ID}).First(&existing).Error; err != nil {
|
||||||
|
logger.Errorf("Error creating message: %v", err)
|
||||||
|
return errors.InternalServerError("DATABASE_ERROR", "Error connecting to database")
|
||||||
|
}
|
||||||
|
rsp.Message = existing.Serialize()
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,10 +25,12 @@ func TestCreateMessage(t *testing.T) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iid := uuid.New().String()
|
||||||
tt := []struct {
|
tt := []struct {
|
||||||
Name string
|
Name string
|
||||||
AuthorID string
|
AuthorID string
|
||||||
ConversationID string
|
ConversationID string
|
||||||
|
ID string
|
||||||
Text string
|
Text string
|
||||||
Error error
|
Error error
|
||||||
}{
|
}{
|
||||||
@@ -58,18 +60,35 @@ func TestCreateMessage(t *testing.T) {
|
|||||||
Error: handler.ErrNotFound,
|
Error: handler.ErrNotFound,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "Valid",
|
Name: "NoID",
|
||||||
ConversationID: cRsp.Conversation.Id,
|
ConversationID: cRsp.Conversation.Id,
|
||||||
AuthorID: uuid.New().String(),
|
AuthorID: uuid.New().String(),
|
||||||
Text: "HelloWorld",
|
Text: "HelloWorld",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "WithID",
|
||||||
|
ConversationID: cRsp.Conversation.Id,
|
||||||
|
Text: "HelloWorld",
|
||||||
|
AuthorID: "johndoe",
|
||||||
|
ID: iid,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "RepeatID",
|
||||||
|
ConversationID: cRsp.Conversation.Id,
|
||||||
|
Text: "HelloWorld",
|
||||||
|
AuthorID: "johndoe",
|
||||||
|
ID: iid,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tc := range tt {
|
for _, tc := range tt {
|
||||||
t.Run(tc.Name, func(t *testing.T) {
|
t.Run(tc.Name, func(t *testing.T) {
|
||||||
var rsp pb.CreateMessageResponse
|
var rsp pb.CreateMessageResponse
|
||||||
err := h.CreateMessage(context.TODO(), &pb.CreateMessageRequest{
|
err := h.CreateMessage(context.TODO(), &pb.CreateMessageRequest{
|
||||||
Text: tc.Text, ConversationId: tc.ConversationID, AuthorId: tc.AuthorID,
|
AuthorId: tc.AuthorID,
|
||||||
|
ConversationId: tc.ConversationID,
|
||||||
|
Text: tc.Text,
|
||||||
|
Id: tc.ID,
|
||||||
}, &rsp)
|
}, &rsp)
|
||||||
|
|
||||||
assert.Equal(t, tc.Error, err)
|
assert.Equal(t, tc.Error, err)
|
||||||
@@ -79,6 +98,7 @@ func TestCreateMessage(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
assertMessagesMatch(t, &pb.Message{
|
assertMessagesMatch(t, &pb.Message{
|
||||||
|
Id: tc.ID,
|
||||||
AuthorId: tc.AuthorID,
|
AuthorId: tc.AuthorID,
|
||||||
ConversationId: tc.ConversationID,
|
ConversationId: tc.ConversationID,
|
||||||
SentAt: timestamppb.New(h.Time()),
|
SentAt: timestamppb.New(h.Time()),
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.25.0
|
// protoc-gen-go v1.23.0
|
||||||
// protoc v3.6.1
|
// protoc v3.13.0
|
||||||
// source: proto/threads.proto
|
// source: proto/threads.proto
|
||||||
|
|
||||||
package threads
|
package threads
|
||||||
@@ -667,9 +667,10 @@ type CreateMessageRequest struct {
|
|||||||
sizeCache protoimpl.SizeCache
|
sizeCache protoimpl.SizeCache
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
||||||
ConversationId string `protobuf:"bytes,1,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,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"`
|
ConversationId string `protobuf:"bytes,2,opt,name=conversation_id,json=conversationId,proto3" json:"conversation_id,omitempty"`
|
||||||
Text string `protobuf:"bytes,3,opt,name=text,proto3" json:"text,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"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *CreateMessageRequest) Reset() {
|
func (x *CreateMessageRequest) Reset() {
|
||||||
@@ -704,6 +705,13 @@ func (*CreateMessageRequest) Descriptor() ([]byte, []int) {
|
|||||||
return file_proto_threads_proto_rawDescGZIP(), []int{12}
|
return file_proto_threads_proto_rawDescGZIP(), []int{12}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (x *CreateMessageRequest) GetId() string {
|
||||||
|
if x != nil {
|
||||||
|
return x.Id
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
func (x *CreateMessageRequest) GetConversationId() string {
|
func (x *CreateMessageRequest) GetConversationId() string {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.ConversationId
|
return x.ConversationId
|
||||||
@@ -1058,94 +1066,95 @@ var file_proto_threads_proto_rawDesc = []byte{
|
|||||||
0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
|
||||||
0x02, 0x69, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e,
|
0x02, 0x69, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e,
|
||||||
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
||||||
0x65, 0x22, 0x70, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
0x65, 0x22, 0x80, 0x01, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73,
|
||||||
0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e,
|
0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
|
||||||
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
|
0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f,
|
||||||
0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20,
|
||||||
0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x5f, 0x69, 0x64, 0x18,
|
0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f,
|
||||||
0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x49, 0x64, 0x12,
|
0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x5f, 0x69, 0x64,
|
||||||
0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74,
|
0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x49, 0x64,
|
||||||
0x65, 0x78, 0x74, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73,
|
0x12, 0x12, 0x0a, 0x04, 0x74, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
|
||||||
0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a, 0x07,
|
0x74, 0x65, 0x78, 0x74, 0x22, 0x43, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65,
|
||||||
0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e,
|
0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2a, 0x0a,
|
||||||
0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52,
|
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10,
|
||||||
0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73,
|
0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
|
||||||
0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0xae, 0x01, 0x0a, 0x13, 0x4c, 0x69,
|
||||||
0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
|
0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76, 0x65,
|
0x74, 0x12, 0x27, 0x0a, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f,
|
||||||
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65, 0x6e,
|
0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x63, 0x6f, 0x6e, 0x76,
|
||||||
0x74, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
|
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x73, 0x65,
|
||||||
0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
|
0x6e, 0x74, 0x5f, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
|
||||||
0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x6e, 0x74,
|
0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
|
||||||
0x42, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x12, 0x31, 0x0a, 0x05, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x18,
|
0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x73, 0x65, 0x6e,
|
||||||
0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
|
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, 0x44, 0x0a, 0x14, 0x4c, 0x69,
|
||||||
|
0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
|
0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01,
|
||||||
|
0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x4d,
|
||||||
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73,
|
||||||
|
0x22, 0x95, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
||||||
|
0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f,
|
||||||
|
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01,
|
||||||
|
0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
||||||
|
0x6f, 0x6e, 0x49, 0x64, 0x73, 0x12, 0x51, 0x0a, 0x16, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x70,
|
||||||
|
0x65, 0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
|
||||||
|
0x02, 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,
|
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, 0x44, 0x0a, 0x14, 0x4c, 0x69, 0x73,
|
0x75, 0x65, 0x52, 0x14, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76,
|
||||||
0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x16, 0x52, 0x65, 0x63, 0x65,
|
||||||
0x65, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20,
|
0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x4d, 0x65,
|
0x73, 0x65, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01,
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x22,
|
0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x4d,
|
||||||
0x95, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73,
|
||||||
0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e,
|
0x32, 0xcb, 0x05, 0x0a, 0x07, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x12, 0x5d, 0x0a, 0x12,
|
||||||
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20,
|
|
||||||
0x03, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f,
|
|
||||||
0x6e, 0x49, 0x64, 0x73, 0x12, 0x51, 0x0a, 0x16, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x5f, 0x70, 0x65,
|
|
||||||
0x72, 0x5f, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
|
|
||||||
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, 0x14, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x50, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65,
|
|
||||||
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x46, 0x0a, 0x16, 0x52, 0x65, 0x63, 0x65, 0x6e,
|
|
||||||
0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
|
||||||
0x65, 0x12, 0x2c, 0x0a, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x01, 0x20,
|
|
||||||
0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x4d, 0x65,
|
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x32,
|
|
||||||
0xcb, 0x05, 0x0a, 0x07, 0x54, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x12, 0x5d, 0x0a, 0x12, 0x43,
|
|
||||||
0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f,
|
|
||||||
0x6e, 0x12, 0x22, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61,
|
|
||||||
0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
|
|
||||||
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e,
|
|
||||||
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
||||||
0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x52, 0x65,
|
0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x43, 0x72, 0x65,
|
||||||
0x61, 0x64, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x20,
|
0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
|
||||||
0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x43, 0x6f, 0x6e,
|
0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73,
|
||||||
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
|
0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74,
|
||||||
0x1a, 0x21, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x43,
|
0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x52,
|
||||||
|
0x65, 0x61, 0x64, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
|
||||||
|
0x20, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x43, 0x6f,
|
||||||
|
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
|
||||||
|
0x74, 0x1a, 0x21, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x52, 0x65, 0x61, 0x64,
|
||||||
|
0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70,
|
||||||
|
0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f,
|
||||||
|
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x74, 0x68, 0x72,
|
||||||
|
0x65, 0x61, 0x64, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65,
|
||||||
|
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23,
|
||||||
|
0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43,
|
||||||
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
|
||||||
0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e,
|
0x6e, 0x73, 0x65, 0x12, 0x5d, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e,
|
||||||
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x74, 0x68, 0x72, 0x65,
|
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x74, 0x68, 0x72, 0x65,
|
||||||
0x61, 0x64, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
0x61, 0x64, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
||||||
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e,
|
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e,
|
||||||
0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x6f,
|
0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f,
|
||||||
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
|
||||||
0x73, 0x65, 0x12, 0x5d, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76,
|
0x73, 0x65, 0x12, 0x5a, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
|
||||||
0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x22, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61,
|
0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64,
|
||||||
0x64, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69,
|
||||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x23, 0x2e, 0x74,
|
0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x74, 0x68, 0x72,
|
||||||
0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x43, 0x6f, 0x6e,
|
0x65, 0x61, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
||||||
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
|
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e,
|
||||||
0x65, 0x12, 0x5a, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
|
0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
|
||||||
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x21, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73,
|
0x1d, 0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
|
||||||
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f,
|
0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e,
|
||||||
0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e, 0x74, 0x68, 0x72, 0x65,
|
|
||||||
0x61, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61,
|
|
||||||
0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4e, 0x0a,
|
|
||||||
0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1d,
|
|
||||||
0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d,
|
0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d,
|
||||||
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e,
|
0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b,
|
||||||
0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x65,
|
0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1c,
|
||||||
0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a,
|
0x2e, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73,
|
||||||
0x0c, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1c, 0x2e,
|
0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74,
|
||||||
0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73,
|
0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61,
|
||||||
0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x74, 0x68,
|
0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x52,
|
||||||
0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
|
0x65, 0x63, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x2e,
|
||||||
0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x52, 0x65,
|
0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4d, 0x65,
|
||||||
0x63, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1e, 0x2e, 0x74,
|
0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e,
|
||||||
0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73,
|
0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4d, 0x65,
|
||||||
0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x74,
|
0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0f,
|
||||||
0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x4d, 0x65, 0x73,
|
0x5a, 0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x62,
|
||||||
0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x0f, 0x5a,
|
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x0d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x62, 0x06,
|
|
||||||
0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|||||||
@@ -84,9 +84,10 @@ message DeleteConversationRequest {
|
|||||||
message DeleteConversationResponse {}
|
message DeleteConversationResponse {}
|
||||||
|
|
||||||
message CreateMessageRequest {
|
message CreateMessageRequest {
|
||||||
string conversation_id = 1;
|
string id = 1;
|
||||||
string author_id = 2;
|
string conversation_id = 2;
|
||||||
string text = 3;
|
string author_id = 3;
|
||||||
|
string text = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
message CreateMessageResponse {
|
message CreateMessageResponse {
|
||||||
|
|||||||
Reference in New Issue
Block a user