proto BatchSetConversationsReq field format

pull/458/head
withchao 2 years ago
parent 6345617ab4
commit d02d39abbc

@ -1,48 +0,0 @@
package zookeeper
import (
"context"
"fmt"
"strings"
"github.com/OpenIMSDK/Open-IM-Server/pkg/common/log"
"google.golang.org/grpc"
)
func newClientConnInterface(cc grpc.ClientConnInterface) grpc.ClientConnInterface {
return &clientConnInterface{cc: cc}
}
type clientConnInterface struct {
cc grpc.ClientConnInterface
}
func (c *clientConnInterface) callOptionToString(opts []grpc.CallOption) string {
arr := make([]string, 0, len(opts)+1)
arr = append(arr, fmt.Sprintf("opts len: %d", len(opts)))
for i, opt := range opts {
arr = append(arr, fmt.Sprintf("[%d:%T]", i, opt))
}
return strings.Join(arr, ", ")
}
func (c *clientConnInterface) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...grpc.CallOption) error {
log.ZDebug(ctx, "grpc.ClientConnInterface.Invoke in", "method", method, "args", args, "reply", reply, "opts", c.callOptionToString(opts))
if err := c.cc.Invoke(ctx, method, args, reply, opts...); err != nil {
log.ZError(ctx, "grpc.ClientConnInterface.Invoke error", err, "method", method, "args", args, "reply", reply)
return err
}
log.ZDebug(ctx, "grpc.ClientConnInterface.Invoke success", "method", method, "args", args, "reply", reply)
return nil
}
func (c *clientConnInterface) NewStream(ctx context.Context, desc *grpc.StreamDesc, method string, opts ...grpc.CallOption) (grpc.ClientStream, error) {
log.ZDebug(ctx, "grpc.ClientConnInterface.NewStream in", "desc", desc, "method", method, "opts", c.callOptionToString(opts))
cs, err := c.cc.NewStream(ctx, desc, method, opts...)
if err != nil {
log.ZError(ctx, "grpc.ClientConnInterface.NewStream error", err, "desc", desc, "method", method, "opts", len(opts))
return nil, err
}
log.ZDebug(ctx, "grpc.ClientConnInterface.NewStream success", "desc", desc, "method", method, "opts", len(opts))
return cs, nil
}

@ -965,7 +965,7 @@ type BatchSetConversationsReq struct {
sizeCache protoimpl.SizeCache sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields unknownFields protoimpl.UnknownFields
Conversations []*Conversation `protobuf:"bytes,1,rep,name=Conversations,proto3" json:"Conversations"` Conversations []*Conversation `protobuf:"bytes,1,rep,name=conversations,proto3" json:"conversations"`
OwnerUserID string `protobuf:"bytes,2,opt,name=ownerUserID,proto3" json:"ownerUserID"` OwnerUserID string `protobuf:"bytes,2,opt,name=ownerUserID,proto3" json:"ownerUserID"`
} }
@ -1999,11 +1999,11 @@ var file_conversation_conversation_proto_rawDesc = []byte{
0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63,
0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8b, 0x01, 0x0a, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x8b, 0x01, 0x0a,
0x18, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x18, 0x42, 0x61, 0x74, 0x63, 0x68, 0x53, 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x4d, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x12, 0x4d, 0x0a, 0x0d, 0x63, 0x6f, 0x6e,
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e, 0x32, 0x27, 0x2e, 0x4f, 0x70, 0x65, 0x6e, 0x49, 0x4d, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2e,
0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6e,
0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x76, 0x65,
0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x6f, 0x77, 0x6e, 0x65,
0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6f,
0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x4d, 0x0a, 0x19, 0x42, 0x61, 0x77, 0x6e, 0x65, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x44, 0x22, 0x4d, 0x0a, 0x19, 0x42, 0x61,
@ -2283,7 +2283,7 @@ var file_conversation_conversation_proto_depIdxs = []int32{
0, // 14: OpenIMServer.conversation.GetConversationResp.conversation:type_name -> OpenIMServer.conversation.Conversation 0, // 14: OpenIMServer.conversation.GetConversationResp.conversation:type_name -> OpenIMServer.conversation.Conversation
0, // 15: OpenIMServer.conversation.GetConversationsResp.conversations:type_name -> OpenIMServer.conversation.Conversation 0, // 15: OpenIMServer.conversation.GetConversationsResp.conversations:type_name -> OpenIMServer.conversation.Conversation
0, // 16: OpenIMServer.conversation.GetAllConversationsResp.conversations:type_name -> OpenIMServer.conversation.Conversation 0, // 16: OpenIMServer.conversation.GetAllConversationsResp.conversations:type_name -> OpenIMServer.conversation.Conversation
0, // 17: OpenIMServer.conversation.BatchSetConversationsReq.Conversations:type_name -> OpenIMServer.conversation.Conversation 0, // 17: OpenIMServer.conversation.BatchSetConversationsReq.conversations:type_name -> OpenIMServer.conversation.Conversation
1, // 18: OpenIMServer.conversation.SetConversationsReq.conversation:type_name -> OpenIMServer.conversation.ConversationReq 1, // 18: OpenIMServer.conversation.SetConversationsReq.conversation:type_name -> OpenIMServer.conversation.ConversationReq
0, // 19: OpenIMServer.conversation.GetConversationsByConversationIDResp.conversations:type_name -> OpenIMServer.conversation.Conversation 0, // 19: OpenIMServer.conversation.GetConversationsByConversationIDResp.conversations:type_name -> OpenIMServer.conversation.Conversation
2, // 20: OpenIMServer.conversation.conversation.ModifyConversationField:input_type -> OpenIMServer.conversation.ModifyConversationFieldReq 2, // 20: OpenIMServer.conversation.conversation.ModifyConversationField:input_type -> OpenIMServer.conversation.ModifyConversationFieldReq

@ -95,7 +95,7 @@ message GetAllConversationsResp{
} }
message BatchSetConversationsReq{ message BatchSetConversationsReq{
repeated Conversation Conversations = 1; repeated Conversation conversations = 1;
string ownerUserID = 2; string ownerUserID = 2;
} }

Loading…
Cancel
Save