mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-05-10 04:59:01 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
This commit is contained in:
commit
e175ef2b4e
@ -23,52 +23,6 @@ var _ = math.Inf
|
|||||||
// proto package needs to be updated.
|
// proto package needs to be updated.
|
||||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
|
||||||
|
|
||||||
type CommonResp struct {
|
|
||||||
ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"`
|
|
||||||
ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"`
|
|
||||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
||||||
XXX_unrecognized []byte `json:"-"`
|
|
||||||
XXX_sizecache int32 `json:"-"`
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *CommonResp) Reset() { *m = CommonResp{} }
|
|
||||||
func (m *CommonResp) String() string { return proto.CompactTextString(m) }
|
|
||||||
func (*CommonResp) ProtoMessage() {}
|
|
||||||
func (*CommonResp) Descriptor() ([]byte, []int) {
|
|
||||||
return fileDescriptor_conversation_7438d6c35155b4e4, []int{0}
|
|
||||||
}
|
|
||||||
func (m *CommonResp) XXX_Unmarshal(b []byte) error {
|
|
||||||
return xxx_messageInfo_CommonResp.Unmarshal(m, b)
|
|
||||||
}
|
|
||||||
func (m *CommonResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
||||||
return xxx_messageInfo_CommonResp.Marshal(b, m, deterministic)
|
|
||||||
}
|
|
||||||
func (dst *CommonResp) XXX_Merge(src proto.Message) {
|
|
||||||
xxx_messageInfo_CommonResp.Merge(dst, src)
|
|
||||||
}
|
|
||||||
func (m *CommonResp) XXX_Size() int {
|
|
||||||
return xxx_messageInfo_CommonResp.Size(m)
|
|
||||||
}
|
|
||||||
func (m *CommonResp) XXX_DiscardUnknown() {
|
|
||||||
xxx_messageInfo_CommonResp.DiscardUnknown(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
var xxx_messageInfo_CommonResp proto.InternalMessageInfo
|
|
||||||
|
|
||||||
func (m *CommonResp) GetErrCode() int32 {
|
|
||||||
if m != nil {
|
|
||||||
return m.ErrCode
|
|
||||||
}
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
|
|
||||||
func (m *CommonResp) GetErrMsg() string {
|
|
||||||
if m != nil {
|
|
||||||
return m.ErrMsg
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
type Conversation struct {
|
type Conversation struct {
|
||||||
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
|
OwnerUserID string `protobuf:"bytes,1,opt,name=ownerUserID" json:"ownerUserID,omitempty"`
|
||||||
ConversationID string `protobuf:"bytes,2,opt,name=conversationID" json:"conversationID,omitempty"`
|
ConversationID string `protobuf:"bytes,2,opt,name=conversationID" json:"conversationID,omitempty"`
|
||||||
@ -95,7 +49,7 @@ func (m *Conversation) Reset() { *m = Conversation{} }
|
|||||||
func (m *Conversation) String() string { return proto.CompactTextString(m) }
|
func (m *Conversation) String() string { return proto.CompactTextString(m) }
|
||||||
func (*Conversation) ProtoMessage() {}
|
func (*Conversation) ProtoMessage() {}
|
||||||
func (*Conversation) Descriptor() ([]byte, []int) {
|
func (*Conversation) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_conversation_7438d6c35155b4e4, []int{1}
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{0}
|
||||||
}
|
}
|
||||||
func (m *Conversation) XXX_Unmarshal(b []byte) error {
|
func (m *Conversation) XXX_Unmarshal(b []byte) error {
|
||||||
return xxx_messageInfo_Conversation.Unmarshal(m, b)
|
return xxx_messageInfo_Conversation.Unmarshal(m, b)
|
||||||
@ -231,7 +185,6 @@ type ModifyConversationFieldReq struct {
|
|||||||
Conversation *Conversation `protobuf:"bytes,1,opt,name=conversation" json:"conversation,omitempty"`
|
Conversation *Conversation `protobuf:"bytes,1,opt,name=conversation" json:"conversation,omitempty"`
|
||||||
FieldType int32 `protobuf:"varint,2,opt,name=fieldType" json:"fieldType,omitempty"`
|
FieldType int32 `protobuf:"varint,2,opt,name=fieldType" json:"fieldType,omitempty"`
|
||||||
UserIDList []string `protobuf:"bytes,3,rep,name=userIDList" json:"userIDList,omitempty"`
|
UserIDList []string `protobuf:"bytes,3,rep,name=userIDList" json:"userIDList,omitempty"`
|
||||||
OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"`
|
|
||||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
XXX_unrecognized []byte `json:"-"`
|
XXX_unrecognized []byte `json:"-"`
|
||||||
XXX_sizecache int32 `json:"-"`
|
XXX_sizecache int32 `json:"-"`
|
||||||
@ -241,7 +194,7 @@ func (m *ModifyConversationFieldReq) Reset() { *m = ModifyConversationFi
|
|||||||
func (m *ModifyConversationFieldReq) String() string { return proto.CompactTextString(m) }
|
func (m *ModifyConversationFieldReq) String() string { return proto.CompactTextString(m) }
|
||||||
func (*ModifyConversationFieldReq) ProtoMessage() {}
|
func (*ModifyConversationFieldReq) ProtoMessage() {}
|
||||||
func (*ModifyConversationFieldReq) Descriptor() ([]byte, []int) {
|
func (*ModifyConversationFieldReq) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_conversation_7438d6c35155b4e4, []int{2}
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{1}
|
||||||
}
|
}
|
||||||
func (m *ModifyConversationFieldReq) XXX_Unmarshal(b []byte) error {
|
func (m *ModifyConversationFieldReq) XXX_Unmarshal(b []byte) error {
|
||||||
return xxx_messageInfo_ModifyConversationFieldReq.Unmarshal(m, b)
|
return xxx_messageInfo_ModifyConversationFieldReq.Unmarshal(m, b)
|
||||||
@ -282,15 +235,7 @@ func (m *ModifyConversationFieldReq) GetUserIDList() []string {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (m *ModifyConversationFieldReq) GetOperationID() string {
|
|
||||||
if m != nil {
|
|
||||||
return m.OperationID
|
|
||||||
}
|
|
||||||
return ""
|
|
||||||
}
|
|
||||||
|
|
||||||
type ModifyConversationFieldResp struct {
|
type ModifyConversationFieldResp struct {
|
||||||
CommonResp *CommonResp `protobuf:"bytes,1,opt,name=commonResp" json:"commonResp,omitempty"`
|
|
||||||
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
XXX_unrecognized []byte `json:"-"`
|
XXX_unrecognized []byte `json:"-"`
|
||||||
XXX_sizecache int32 `json:"-"`
|
XXX_sizecache int32 `json:"-"`
|
||||||
@ -300,7 +245,7 @@ func (m *ModifyConversationFieldResp) Reset() { *m = ModifyConversationF
|
|||||||
func (m *ModifyConversationFieldResp) String() string { return proto.CompactTextString(m) }
|
func (m *ModifyConversationFieldResp) String() string { return proto.CompactTextString(m) }
|
||||||
func (*ModifyConversationFieldResp) ProtoMessage() {}
|
func (*ModifyConversationFieldResp) ProtoMessage() {}
|
||||||
func (*ModifyConversationFieldResp) Descriptor() ([]byte, []int) {
|
func (*ModifyConversationFieldResp) Descriptor() ([]byte, []int) {
|
||||||
return fileDescriptor_conversation_7438d6c35155b4e4, []int{3}
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{2}
|
||||||
}
|
}
|
||||||
func (m *ModifyConversationFieldResp) XXX_Unmarshal(b []byte) error {
|
func (m *ModifyConversationFieldResp) XXX_Unmarshal(b []byte) error {
|
||||||
return xxx_messageInfo_ModifyConversationFieldResp.Unmarshal(m, b)
|
return xxx_messageInfo_ModifyConversationFieldResp.Unmarshal(m, b)
|
||||||
@ -320,18 +265,534 @@ func (m *ModifyConversationFieldResp) XXX_DiscardUnknown() {
|
|||||||
|
|
||||||
var xxx_messageInfo_ModifyConversationFieldResp proto.InternalMessageInfo
|
var xxx_messageInfo_ModifyConversationFieldResp proto.InternalMessageInfo
|
||||||
|
|
||||||
func (m *ModifyConversationFieldResp) GetCommonResp() *CommonResp {
|
type SetConversationReq struct {
|
||||||
|
Conversation *Conversation `protobuf:"bytes,1,opt,name=Conversation" json:"Conversation,omitempty"`
|
||||||
|
NotificationType int32 `protobuf:"varint,2,opt,name=notificationType" json:"notificationType,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SetConversationReq) Reset() { *m = SetConversationReq{} }
|
||||||
|
func (m *SetConversationReq) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*SetConversationReq) ProtoMessage() {}
|
||||||
|
func (*SetConversationReq) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{3}
|
||||||
|
}
|
||||||
|
func (m *SetConversationReq) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_SetConversationReq.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *SetConversationReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_SetConversationReq.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *SetConversationReq) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_SetConversationReq.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *SetConversationReq) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_SetConversationReq.Size(m)
|
||||||
|
}
|
||||||
|
func (m *SetConversationReq) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_SetConversationReq.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_SetConversationReq proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *SetConversationReq) GetConversation() *Conversation {
|
||||||
if m != nil {
|
if m != nil {
|
||||||
return m.CommonResp
|
return m.Conversation
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SetConversationReq) GetNotificationType() int32 {
|
||||||
|
if m != nil {
|
||||||
|
return m.NotificationType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type SetConversationResp struct {
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SetConversationResp) Reset() { *m = SetConversationResp{} }
|
||||||
|
func (m *SetConversationResp) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*SetConversationResp) ProtoMessage() {}
|
||||||
|
func (*SetConversationResp) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{4}
|
||||||
|
}
|
||||||
|
func (m *SetConversationResp) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_SetConversationResp.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *SetConversationResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_SetConversationResp.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *SetConversationResp) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_SetConversationResp.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *SetConversationResp) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_SetConversationResp.Size(m)
|
||||||
|
}
|
||||||
|
func (m *SetConversationResp) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_SetConversationResp.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_SetConversationResp proto.InternalMessageInfo
|
||||||
|
|
||||||
|
type SetRecvMsgOptReq struct {
|
||||||
|
OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"`
|
||||||
|
ConversationID string `protobuf:"bytes,2,opt,name=ConversationID" json:"ConversationID,omitempty"`
|
||||||
|
RecvMsgOpt int32 `protobuf:"varint,3,opt,name=RecvMsgOpt" json:"RecvMsgOpt,omitempty"`
|
||||||
|
NotificationType int32 `protobuf:"varint,4,opt,name=notificationType" json:"notificationType,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SetRecvMsgOptReq) Reset() { *m = SetRecvMsgOptReq{} }
|
||||||
|
func (m *SetRecvMsgOptReq) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*SetRecvMsgOptReq) ProtoMessage() {}
|
||||||
|
func (*SetRecvMsgOptReq) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{5}
|
||||||
|
}
|
||||||
|
func (m *SetRecvMsgOptReq) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_SetRecvMsgOptReq.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *SetRecvMsgOptReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_SetRecvMsgOptReq.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *SetRecvMsgOptReq) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_SetRecvMsgOptReq.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *SetRecvMsgOptReq) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_SetRecvMsgOptReq.Size(m)
|
||||||
|
}
|
||||||
|
func (m *SetRecvMsgOptReq) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_SetRecvMsgOptReq.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_SetRecvMsgOptReq proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *SetRecvMsgOptReq) GetOwnerUserID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.OwnerUserID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SetRecvMsgOptReq) GetConversationID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.ConversationID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SetRecvMsgOptReq) GetRecvMsgOpt() int32 {
|
||||||
|
if m != nil {
|
||||||
|
return m.RecvMsgOpt
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SetRecvMsgOptReq) GetNotificationType() int32 {
|
||||||
|
if m != nil {
|
||||||
|
return m.NotificationType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type SetRecvMsgOptResp struct {
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *SetRecvMsgOptResp) Reset() { *m = SetRecvMsgOptResp{} }
|
||||||
|
func (m *SetRecvMsgOptResp) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*SetRecvMsgOptResp) ProtoMessage() {}
|
||||||
|
func (*SetRecvMsgOptResp) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{6}
|
||||||
|
}
|
||||||
|
func (m *SetRecvMsgOptResp) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_SetRecvMsgOptResp.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *SetRecvMsgOptResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_SetRecvMsgOptResp.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *SetRecvMsgOptResp) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_SetRecvMsgOptResp.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *SetRecvMsgOptResp) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_SetRecvMsgOptResp.Size(m)
|
||||||
|
}
|
||||||
|
func (m *SetRecvMsgOptResp) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_SetRecvMsgOptResp.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_SetRecvMsgOptResp proto.InternalMessageInfo
|
||||||
|
|
||||||
|
type GetConversationReq struct {
|
||||||
|
ConversationID string `protobuf:"bytes,1,opt,name=ConversationID" json:"ConversationID,omitempty"`
|
||||||
|
OwnerUserID string `protobuf:"bytes,2,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetConversationReq) Reset() { *m = GetConversationReq{} }
|
||||||
|
func (m *GetConversationReq) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*GetConversationReq) ProtoMessage() {}
|
||||||
|
func (*GetConversationReq) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{7}
|
||||||
|
}
|
||||||
|
func (m *GetConversationReq) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_GetConversationReq.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *GetConversationReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_GetConversationReq.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *GetConversationReq) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_GetConversationReq.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *GetConversationReq) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_GetConversationReq.Size(m)
|
||||||
|
}
|
||||||
|
func (m *GetConversationReq) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_GetConversationReq.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_GetConversationReq proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *GetConversationReq) GetConversationID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.ConversationID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetConversationReq) GetOwnerUserID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.OwnerUserID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetConversationResp struct {
|
||||||
|
Conversation *Conversation `protobuf:"bytes,2,opt,name=Conversation" json:"Conversation,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetConversationResp) Reset() { *m = GetConversationResp{} }
|
||||||
|
func (m *GetConversationResp) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*GetConversationResp) ProtoMessage() {}
|
||||||
|
func (*GetConversationResp) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{8}
|
||||||
|
}
|
||||||
|
func (m *GetConversationResp) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_GetConversationResp.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *GetConversationResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_GetConversationResp.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *GetConversationResp) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_GetConversationResp.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *GetConversationResp) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_GetConversationResp.Size(m)
|
||||||
|
}
|
||||||
|
func (m *GetConversationResp) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_GetConversationResp.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_GetConversationResp proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *GetConversationResp) GetConversation() *Conversation {
|
||||||
|
if m != nil {
|
||||||
|
return m.Conversation
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetConversationsReq struct {
|
||||||
|
OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"`
|
||||||
|
ConversationIDs []string `protobuf:"bytes,2,rep,name=ConversationIDs" json:"ConversationIDs,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetConversationsReq) Reset() { *m = GetConversationsReq{} }
|
||||||
|
func (m *GetConversationsReq) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*GetConversationsReq) ProtoMessage() {}
|
||||||
|
func (*GetConversationsReq) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{9}
|
||||||
|
}
|
||||||
|
func (m *GetConversationsReq) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_GetConversationsReq.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *GetConversationsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_GetConversationsReq.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *GetConversationsReq) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_GetConversationsReq.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *GetConversationsReq) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_GetConversationsReq.Size(m)
|
||||||
|
}
|
||||||
|
func (m *GetConversationsReq) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_GetConversationsReq.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_GetConversationsReq proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *GetConversationsReq) GetOwnerUserID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.OwnerUserID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetConversationsReq) GetConversationIDs() []string {
|
||||||
|
if m != nil {
|
||||||
|
return m.ConversationIDs
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetConversationsResp struct {
|
||||||
|
Conversations []*Conversation `protobuf:"bytes,2,rep,name=Conversations" json:"Conversations,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetConversationsResp) Reset() { *m = GetConversationsResp{} }
|
||||||
|
func (m *GetConversationsResp) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*GetConversationsResp) ProtoMessage() {}
|
||||||
|
func (*GetConversationsResp) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{10}
|
||||||
|
}
|
||||||
|
func (m *GetConversationsResp) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_GetConversationsResp.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *GetConversationsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_GetConversationsResp.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *GetConversationsResp) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_GetConversationsResp.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *GetConversationsResp) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_GetConversationsResp.Size(m)
|
||||||
|
}
|
||||||
|
func (m *GetConversationsResp) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_GetConversationsResp.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_GetConversationsResp proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *GetConversationsResp) GetConversations() []*Conversation {
|
||||||
|
if m != nil {
|
||||||
|
return m.Conversations
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetAllConversationsReq struct {
|
||||||
|
OwnerUserID string `protobuf:"bytes,1,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetAllConversationsReq) Reset() { *m = GetAllConversationsReq{} }
|
||||||
|
func (m *GetAllConversationsReq) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*GetAllConversationsReq) ProtoMessage() {}
|
||||||
|
func (*GetAllConversationsReq) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{11}
|
||||||
|
}
|
||||||
|
func (m *GetAllConversationsReq) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_GetAllConversationsReq.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *GetAllConversationsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_GetAllConversationsReq.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *GetAllConversationsReq) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_GetAllConversationsReq.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *GetAllConversationsReq) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_GetAllConversationsReq.Size(m)
|
||||||
|
}
|
||||||
|
func (m *GetAllConversationsReq) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_GetAllConversationsReq.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_GetAllConversationsReq proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *GetAllConversationsReq) GetOwnerUserID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.OwnerUserID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
type GetAllConversationsResp struct {
|
||||||
|
Conversations []*Conversation `protobuf:"bytes,2,rep,name=Conversations" json:"Conversations,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *GetAllConversationsResp) Reset() { *m = GetAllConversationsResp{} }
|
||||||
|
func (m *GetAllConversationsResp) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*GetAllConversationsResp) ProtoMessage() {}
|
||||||
|
func (*GetAllConversationsResp) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{12}
|
||||||
|
}
|
||||||
|
func (m *GetAllConversationsResp) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_GetAllConversationsResp.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *GetAllConversationsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_GetAllConversationsResp.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *GetAllConversationsResp) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_GetAllConversationsResp.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *GetAllConversationsResp) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_GetAllConversationsResp.Size(m)
|
||||||
|
}
|
||||||
|
func (m *GetAllConversationsResp) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_GetAllConversationsResp.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_GetAllConversationsResp proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *GetAllConversationsResp) GetConversations() []*Conversation {
|
||||||
|
if m != nil {
|
||||||
|
return m.Conversations
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
type BatchSetConversationsReq struct {
|
||||||
|
Conversations []*Conversation `protobuf:"bytes,1,rep,name=Conversations" json:"Conversations,omitempty"`
|
||||||
|
OwnerUserID string `protobuf:"bytes,2,opt,name=OwnerUserID" json:"OwnerUserID,omitempty"`
|
||||||
|
NotificationType int32 `protobuf:"varint,3,opt,name=notificationType" json:"notificationType,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *BatchSetConversationsReq) Reset() { *m = BatchSetConversationsReq{} }
|
||||||
|
func (m *BatchSetConversationsReq) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*BatchSetConversationsReq) ProtoMessage() {}
|
||||||
|
func (*BatchSetConversationsReq) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{13}
|
||||||
|
}
|
||||||
|
func (m *BatchSetConversationsReq) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_BatchSetConversationsReq.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *BatchSetConversationsReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_BatchSetConversationsReq.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *BatchSetConversationsReq) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_BatchSetConversationsReq.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *BatchSetConversationsReq) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_BatchSetConversationsReq.Size(m)
|
||||||
|
}
|
||||||
|
func (m *BatchSetConversationsReq) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_BatchSetConversationsReq.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_BatchSetConversationsReq proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *BatchSetConversationsReq) GetConversations() []*Conversation {
|
||||||
|
if m != nil {
|
||||||
|
return m.Conversations
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *BatchSetConversationsReq) GetOwnerUserID() string {
|
||||||
|
if m != nil {
|
||||||
|
return m.OwnerUserID
|
||||||
|
}
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *BatchSetConversationsReq) GetNotificationType() int32 {
|
||||||
|
if m != nil {
|
||||||
|
return m.NotificationType
|
||||||
|
}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
type BatchSetConversationsResp struct {
|
||||||
|
Success []string `protobuf:"bytes,1,rep,name=Success" json:"Success,omitempty"`
|
||||||
|
Failed []string `protobuf:"bytes,2,rep,name=Failed" json:"Failed,omitempty"`
|
||||||
|
XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
||||||
|
XXX_unrecognized []byte `json:"-"`
|
||||||
|
XXX_sizecache int32 `json:"-"`
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *BatchSetConversationsResp) Reset() { *m = BatchSetConversationsResp{} }
|
||||||
|
func (m *BatchSetConversationsResp) String() string { return proto.CompactTextString(m) }
|
||||||
|
func (*BatchSetConversationsResp) ProtoMessage() {}
|
||||||
|
func (*BatchSetConversationsResp) Descriptor() ([]byte, []int) {
|
||||||
|
return fileDescriptor_conversation_b0216cb81f8b796f, []int{14}
|
||||||
|
}
|
||||||
|
func (m *BatchSetConversationsResp) XXX_Unmarshal(b []byte) error {
|
||||||
|
return xxx_messageInfo_BatchSetConversationsResp.Unmarshal(m, b)
|
||||||
|
}
|
||||||
|
func (m *BatchSetConversationsResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
||||||
|
return xxx_messageInfo_BatchSetConversationsResp.Marshal(b, m, deterministic)
|
||||||
|
}
|
||||||
|
func (dst *BatchSetConversationsResp) XXX_Merge(src proto.Message) {
|
||||||
|
xxx_messageInfo_BatchSetConversationsResp.Merge(dst, src)
|
||||||
|
}
|
||||||
|
func (m *BatchSetConversationsResp) XXX_Size() int {
|
||||||
|
return xxx_messageInfo_BatchSetConversationsResp.Size(m)
|
||||||
|
}
|
||||||
|
func (m *BatchSetConversationsResp) XXX_DiscardUnknown() {
|
||||||
|
xxx_messageInfo_BatchSetConversationsResp.DiscardUnknown(m)
|
||||||
|
}
|
||||||
|
|
||||||
|
var xxx_messageInfo_BatchSetConversationsResp proto.InternalMessageInfo
|
||||||
|
|
||||||
|
func (m *BatchSetConversationsResp) GetSuccess() []string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Success
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (m *BatchSetConversationsResp) GetFailed() []string {
|
||||||
|
if m != nil {
|
||||||
|
return m.Failed
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterType((*CommonResp)(nil), "conversation.CommonResp")
|
|
||||||
proto.RegisterType((*Conversation)(nil), "conversation.Conversation")
|
proto.RegisterType((*Conversation)(nil), "conversation.Conversation")
|
||||||
proto.RegisterType((*ModifyConversationFieldReq)(nil), "conversation.ModifyConversationFieldReq")
|
proto.RegisterType((*ModifyConversationFieldReq)(nil), "conversation.ModifyConversationFieldReq")
|
||||||
proto.RegisterType((*ModifyConversationFieldResp)(nil), "conversation.ModifyConversationFieldResp")
|
proto.RegisterType((*ModifyConversationFieldResp)(nil), "conversation.ModifyConversationFieldResp")
|
||||||
|
proto.RegisterType((*SetConversationReq)(nil), "conversation.SetConversationReq")
|
||||||
|
proto.RegisterType((*SetConversationResp)(nil), "conversation.SetConversationResp")
|
||||||
|
proto.RegisterType((*SetRecvMsgOptReq)(nil), "conversation.SetRecvMsgOptReq")
|
||||||
|
proto.RegisterType((*SetRecvMsgOptResp)(nil), "conversation.SetRecvMsgOptResp")
|
||||||
|
proto.RegisterType((*GetConversationReq)(nil), "conversation.GetConversationReq")
|
||||||
|
proto.RegisterType((*GetConversationResp)(nil), "conversation.GetConversationResp")
|
||||||
|
proto.RegisterType((*GetConversationsReq)(nil), "conversation.GetConversationsReq")
|
||||||
|
proto.RegisterType((*GetConversationsResp)(nil), "conversation.GetConversationsResp")
|
||||||
|
proto.RegisterType((*GetAllConversationsReq)(nil), "conversation.GetAllConversationsReq")
|
||||||
|
proto.RegisterType((*GetAllConversationsResp)(nil), "conversation.GetAllConversationsResp")
|
||||||
|
proto.RegisterType((*BatchSetConversationsReq)(nil), "conversation.BatchSetConversationsReq")
|
||||||
|
proto.RegisterType((*BatchSetConversationsResp)(nil), "conversation.BatchSetConversationsResp")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reference imports to suppress errors if they are not otherwise used.
|
// Reference imports to suppress errors if they are not otherwise used.
|
||||||
@ -346,6 +807,12 @@ const _ = grpc.SupportPackageIsVersion4
|
|||||||
|
|
||||||
type ConversationClient interface {
|
type ConversationClient interface {
|
||||||
ModifyConversationField(ctx context.Context, in *ModifyConversationFieldReq, opts ...grpc.CallOption) (*ModifyConversationFieldResp, error)
|
ModifyConversationField(ctx context.Context, in *ModifyConversationFieldReq, opts ...grpc.CallOption) (*ModifyConversationFieldResp, error)
|
||||||
|
GetConversation(ctx context.Context, in *GetConversationReq, opts ...grpc.CallOption) (*GetConversationResp, error)
|
||||||
|
GetAllConversations(ctx context.Context, in *GetAllConversationsReq, opts ...grpc.CallOption) (*GetAllConversationsResp, error)
|
||||||
|
GetConversations(ctx context.Context, in *GetConversationsReq, opts ...grpc.CallOption) (*GetConversationsResp, error)
|
||||||
|
BatchSetConversations(ctx context.Context, in *BatchSetConversationsReq, opts ...grpc.CallOption) (*BatchSetConversationsResp, error)
|
||||||
|
SetConversation(ctx context.Context, in *SetConversationReq, opts ...grpc.CallOption) (*SetConversationResp, error)
|
||||||
|
SetRecvMsgOpt(ctx context.Context, in *SetRecvMsgOptReq, opts ...grpc.CallOption) (*SetRecvMsgOptResp, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
type conversationClient struct {
|
type conversationClient struct {
|
||||||
@ -365,10 +832,70 @@ func (c *conversationClient) ModifyConversationField(ctx context.Context, in *Mo
|
|||||||
return out, nil
|
return out, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *conversationClient) GetConversation(ctx context.Context, in *GetConversationReq, opts ...grpc.CallOption) (*GetConversationResp, error) {
|
||||||
|
out := new(GetConversationResp)
|
||||||
|
err := grpc.Invoke(ctx, "/conversation.conversation/GetConversation", in, out, c.cc, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *conversationClient) GetAllConversations(ctx context.Context, in *GetAllConversationsReq, opts ...grpc.CallOption) (*GetAllConversationsResp, error) {
|
||||||
|
out := new(GetAllConversationsResp)
|
||||||
|
err := grpc.Invoke(ctx, "/conversation.conversation/GetAllConversations", in, out, c.cc, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *conversationClient) GetConversations(ctx context.Context, in *GetConversationsReq, opts ...grpc.CallOption) (*GetConversationsResp, error) {
|
||||||
|
out := new(GetConversationsResp)
|
||||||
|
err := grpc.Invoke(ctx, "/conversation.conversation/GetConversations", in, out, c.cc, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *conversationClient) BatchSetConversations(ctx context.Context, in *BatchSetConversationsReq, opts ...grpc.CallOption) (*BatchSetConversationsResp, error) {
|
||||||
|
out := new(BatchSetConversationsResp)
|
||||||
|
err := grpc.Invoke(ctx, "/conversation.conversation/BatchSetConversations", in, out, c.cc, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *conversationClient) SetConversation(ctx context.Context, in *SetConversationReq, opts ...grpc.CallOption) (*SetConversationResp, error) {
|
||||||
|
out := new(SetConversationResp)
|
||||||
|
err := grpc.Invoke(ctx, "/conversation.conversation/SetConversation", in, out, c.cc, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (c *conversationClient) SetRecvMsgOpt(ctx context.Context, in *SetRecvMsgOptReq, opts ...grpc.CallOption) (*SetRecvMsgOptResp, error) {
|
||||||
|
out := new(SetRecvMsgOptResp)
|
||||||
|
err := grpc.Invoke(ctx, "/conversation.conversation/SetRecvMsgOpt", in, out, c.cc, opts...)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
return out, nil
|
||||||
|
}
|
||||||
|
|
||||||
// Server API for Conversation service
|
// Server API for Conversation service
|
||||||
|
|
||||||
type ConversationServer interface {
|
type ConversationServer interface {
|
||||||
ModifyConversationField(context.Context, *ModifyConversationFieldReq) (*ModifyConversationFieldResp, error)
|
ModifyConversationField(context.Context, *ModifyConversationFieldReq) (*ModifyConversationFieldResp, error)
|
||||||
|
GetConversation(context.Context, *GetConversationReq) (*GetConversationResp, error)
|
||||||
|
GetAllConversations(context.Context, *GetAllConversationsReq) (*GetAllConversationsResp, error)
|
||||||
|
GetConversations(context.Context, *GetConversationsReq) (*GetConversationsResp, error)
|
||||||
|
BatchSetConversations(context.Context, *BatchSetConversationsReq) (*BatchSetConversationsResp, error)
|
||||||
|
SetConversation(context.Context, *SetConversationReq) (*SetConversationResp, error)
|
||||||
|
SetRecvMsgOpt(context.Context, *SetRecvMsgOptReq) (*SetRecvMsgOptResp, error)
|
||||||
}
|
}
|
||||||
|
|
||||||
func RegisterConversationServer(s *grpc.Server, srv ConversationServer) {
|
func RegisterConversationServer(s *grpc.Server, srv ConversationServer) {
|
||||||
@ -393,6 +920,114 @@ func _Conversation_ModifyConversationField_Handler(srv interface{}, ctx context.
|
|||||||
return interceptor(ctx, in, info, handler)
|
return interceptor(ctx, in, info, handler)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func _Conversation_GetConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetConversationReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ConversationServer).GetConversation(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/conversation.conversation/GetConversation",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ConversationServer).GetConversation(ctx, req.(*GetConversationReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Conversation_GetAllConversations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetAllConversationsReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ConversationServer).GetAllConversations(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/conversation.conversation/GetAllConversations",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ConversationServer).GetAllConversations(ctx, req.(*GetAllConversationsReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Conversation_GetConversations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(GetConversationsReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ConversationServer).GetConversations(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/conversation.conversation/GetConversations",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ConversationServer).GetConversations(ctx, req.(*GetConversationsReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Conversation_BatchSetConversations_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(BatchSetConversationsReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ConversationServer).BatchSetConversations(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/conversation.conversation/BatchSetConversations",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ConversationServer).BatchSetConversations(ctx, req.(*BatchSetConversationsReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Conversation_SetConversation_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(SetConversationReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ConversationServer).SetConversation(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/conversation.conversation/SetConversation",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ConversationServer).SetConversation(ctx, req.(*SetConversationReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
|
func _Conversation_SetRecvMsgOpt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
||||||
|
in := new(SetRecvMsgOptReq)
|
||||||
|
if err := dec(in); err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
if interceptor == nil {
|
||||||
|
return srv.(ConversationServer).SetRecvMsgOpt(ctx, in)
|
||||||
|
}
|
||||||
|
info := &grpc.UnaryServerInfo{
|
||||||
|
Server: srv,
|
||||||
|
FullMethod: "/conversation.conversation/SetRecvMsgOpt",
|
||||||
|
}
|
||||||
|
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
||||||
|
return srv.(ConversationServer).SetRecvMsgOpt(ctx, req.(*SetRecvMsgOptReq))
|
||||||
|
}
|
||||||
|
return interceptor(ctx, in, info, handler)
|
||||||
|
}
|
||||||
|
|
||||||
var _Conversation_serviceDesc = grpc.ServiceDesc{
|
var _Conversation_serviceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "conversation.conversation",
|
ServiceName: "conversation.conversation",
|
||||||
HandlerType: (*ConversationServer)(nil),
|
HandlerType: (*ConversationServer)(nil),
|
||||||
@ -401,48 +1036,89 @@ var _Conversation_serviceDesc = grpc.ServiceDesc{
|
|||||||
MethodName: "ModifyConversationField",
|
MethodName: "ModifyConversationField",
|
||||||
Handler: _Conversation_ModifyConversationField_Handler,
|
Handler: _Conversation_ModifyConversationField_Handler,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetConversation",
|
||||||
|
Handler: _Conversation_GetConversation_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetAllConversations",
|
||||||
|
Handler: _Conversation_GetAllConversations_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "GetConversations",
|
||||||
|
Handler: _Conversation_GetConversations_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "BatchSetConversations",
|
||||||
|
Handler: _Conversation_BatchSetConversations_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "SetConversation",
|
||||||
|
Handler: _Conversation_SetConversation_Handler,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
MethodName: "SetRecvMsgOpt",
|
||||||
|
Handler: _Conversation_SetRecvMsgOpt_Handler,
|
||||||
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "conversation/conversation.proto",
|
Metadata: "conversation/conversation.proto",
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
proto.RegisterFile("conversation/conversation.proto", fileDescriptor_conversation_7438d6c35155b4e4)
|
proto.RegisterFile("conversation/conversation.proto", fileDescriptor_conversation_b0216cb81f8b796f)
|
||||||
}
|
}
|
||||||
|
|
||||||
var fileDescriptor_conversation_7438d6c35155b4e4 = []byte{
|
var fileDescriptor_conversation_b0216cb81f8b796f = []byte{
|
||||||
// 520 bytes of a gzipped FileDescriptorProto
|
// 789 bytes of a gzipped FileDescriptorProto
|
||||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xd1, 0x6b, 0x13, 0x41,
|
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x5b, 0x4f, 0xdb, 0x48,
|
||||||
0x10, 0xc6, 0xb9, 0xb4, 0x4d, 0x93, 0x49, 0x1a, 0xcb, 0x82, 0xba, 0x44, 0xd1, 0x10, 0x44, 0x4e,
|
0x14, 0x96, 0x13, 0x6e, 0x39, 0x49, 0x20, 0x7b, 0x58, 0x60, 0xd6, 0xbb, 0x0b, 0x59, 0x8b, 0x65,
|
||||||
0xc5, 0x06, 0xaa, 0x0f, 0x82, 0x50, 0xd0, 0x04, 0xe5, 0xc0, 0xd8, 0x72, 0xa4, 0x08, 0xbe, 0xc8,
|
0xb3, 0xac, 0x16, 0x24, 0x76, 0x9f, 0x5a, 0xa9, 0x2a, 0x24, 0x22, 0x8a, 0xd4, 0x34, 0xc8, 0x81,
|
||||||
0x35, 0x37, 0x49, 0x0f, 0xcd, 0xee, 0xba, 0xbb, 0x17, 0xd3, 0x17, 0xff, 0x2a, 0x1f, 0xfd, 0xe3,
|
0xaa, 0x17, 0xa9, 0x95, 0x89, 0x27, 0xc4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 0x2a, 0x59, 0x5b, 0x05, 0xd1, 0x84, 0x25, 0x8f, 0x9f,
|
||||||
0x70, 0x61, 0x47, 0xc5, 0x0c, 0x79, 0xad, 0x13, 0xc5, 0x3b, 0x69, 0x08, 0x59, 0x1b, 0x6a, 0x85,
|
0x78, 0xbe, 0x4f, 0x5d, 0x92, 0x2b, 0x1b, 0x95, 0x25, 0xfb, 0xee, 0x8c, 0x16, 0x14, 0x1c, 0x21,
|
||||||
0x39, 0x2b, 0x84, 0xc0, 0x9c, 0xd7, 0x3b, 0x51, 0x5c, 0x4b, 0xaf, 0x6b, 0xd6, 0x85, 0x66, 0x66,
|
0x9c, 0x4e, 0x8f, 0xba, 0x0d, 0xbf, 0x1b, 0x10, 0x90, 0x14, 0x14, 0x2c, 0xce, 0xe2, 0xf1, 0x93,
|
||||||
0x6d, 0x36, 0xbe, 0xc4, 0x3c, 0x11, 0x13, 0xc9, 0x81, 0x2c, 0x04, 0xcc, 0x4d, 0x29, 0xcc, 0x99,
|
0xd0, 0xbb, 0x74, 0x04, 0xad, 0xf6, 0x1c, 0x41, 0xf2, 0x32, 0x88, 0x0a, 0xc6, 0x6c, 0x25, 0xf1,
|
||||||
0x2e, 0xe6, 0x99, 0xc5, 0xfe, 0x65, 0x66, 0x79, 0x83, 0x44, 0x42, 0xe8, 0xdc, 0x92, 0xf1, 0x37,
|
0x43, 0x21, 0xdb, 0x50, 0x18, 0xb0, 0x4d, 0x40, 0x71, 0x2e, 0x8f, 0x3f, 0x0d, 0x44, 0xc3, 0xaf,
|
||||||
0x96, 0xae, 0xa1, 0xb9, 0x74, 0xeb, 0x21, 0x37, 0xab, 0x30, 0x1f, 0xa5, 0x4d, 0xc4, 0x7b, 0x47,
|
0xc7, 0x28, 0x29, 0xca, 0x30, 0x0a, 0x86, 0xcb, 0x90, 0xa1, 0x57, 0x64, 0x59, 0xb2, 0xc8, 0xd0,
|
||||||
0xf9, 0x01, 0xc9, 0x04, 0x8c, 0xb5, 0xa0, 0x82, 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 0x3d, 0xa5, 0x25, 0x67,
|
||||||
|
0xf8, 0x0c, 0x56, 0x86, 0xf4, 0x86, 0x65, 0xd5, 0x5b, 0x5f, 0x54, 0xf3, 0x8f, 0x09, 0x16, 0x9c,
|
||||||
|
0xe1, 0xb9, 0x5c, 0x95, 0x61, 0xc5, 0xe0, 0xb6, 0xe6, 0x99, 0x22, 0x48, 0xf3, 0xcf, 0x29, 0xac,
|
||||||
|
0x38, 0xc3, 0x17, 0x50, 0x1a, 0xde, 0x15, 0x1c, 0x4f, 0x4d, 0x46, 0xb7, 0x26, 0x99, 0x70, 0x86,
|
||||||
|
0x3d, 0x58, 0x4b, 0x1d, 0x33, 0xee, 0xa8, 0xce, 0xa3, 0x74, 0x6b, 0xfe, 0x35, 0x95, 0xdd, 0x60,
|
||||||
|
0x00, 0xed, 0xf1, 0x03, 0x68, 0x4f, 0x1c, 0x40, 0xca, 0x13, 0x81, 0x27, 0x50, 0x54, 0xee, 0x5d,
|
||||||
|
0xdc, 0xd4, 0x7c, 0x94, 0xe7, 0xc3, 0xdc, 0x1a, 0xfb, 0x9d, 0xb3, 0xa3, 0x7f, 0x5f, 0xfe, 0xd3,
|
||||||
|
0x62, 0xd4, 0x7f, 0xd3, 0x68, 0xee, 0xb3, 0xb7, 0x17, 0xfb, 0xf2, 0x27, 0x51, 0xf9, 0x6f, 0x7c,
|
||||||
|
0x98, 0x3c, 0x9c, 0x2f, 0x48, 0x83, 0xff, 0xbe, 0x07, 0x00, 0x00, 0xff, 0xff, 0xae, 0x18, 0x3d,
|
||||||
|
0x4f, 0x68, 0x0a, 0x00, 0x00,
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,6 @@ syntax = "proto3";
|
|||||||
option go_package = "Open_IM/pkg/proto/conversation;conversation";
|
option go_package = "Open_IM/pkg/proto/conversation;conversation";
|
||||||
package conversation;
|
package conversation;
|
||||||
|
|
||||||
message CommonResp{
|
|
||||||
int32 errCode = 1;
|
|
||||||
string errMsg = 2;
|
|
||||||
}
|
|
||||||
message Conversation{
|
message Conversation{
|
||||||
string ownerUserID = 1;
|
string ownerUserID = 1;
|
||||||
string conversationID = 2;
|
string conversationID = 2;
|
||||||
@ -29,13 +25,73 @@ message ModifyConversationFieldReq{
|
|||||||
Conversation conversation = 1;
|
Conversation conversation = 1;
|
||||||
int32 fieldType = 2;
|
int32 fieldType = 2;
|
||||||
repeated string userIDList = 3;
|
repeated string userIDList = 3;
|
||||||
string operationID = 4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message ModifyConversationFieldResp{
|
message ModifyConversationFieldResp{
|
||||||
CommonResp commonResp = 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
message SetConversationReq{
|
||||||
|
Conversation Conversation = 1;
|
||||||
|
int32 notificationType = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetConversationResp{
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetRecvMsgOptReq {
|
||||||
|
string OwnerUserID = 1;
|
||||||
|
string ConversationID = 2;
|
||||||
|
int32 RecvMsgOpt = 3;
|
||||||
|
int32 notificationType = 4;
|
||||||
|
}
|
||||||
|
|
||||||
|
message SetRecvMsgOptResp {
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetConversationReq{
|
||||||
|
string ConversationID = 1;
|
||||||
|
string OwnerUserID = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetConversationResp{
|
||||||
|
Conversation Conversation = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetConversationsReq{
|
||||||
|
string OwnerUserID = 1;
|
||||||
|
repeated string ConversationIDs = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetConversationsResp{
|
||||||
|
repeated Conversation Conversations = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetAllConversationsReq{
|
||||||
|
string OwnerUserID = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
message GetAllConversationsResp{
|
||||||
|
repeated Conversation Conversations = 2;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BatchSetConversationsReq{
|
||||||
|
repeated Conversation Conversations = 1;
|
||||||
|
string OwnerUserID = 2;
|
||||||
|
int32 notificationType = 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
message BatchSetConversationsResp{
|
||||||
|
repeated string Success = 1;
|
||||||
|
repeated string Failed = 2;
|
||||||
|
}
|
||||||
|
|
||||||
service conversation {
|
service conversation {
|
||||||
rpc ModifyConversationField(ModifyConversationFieldReq)returns(ModifyConversationFieldResp);
|
rpc ModifyConversationField(ModifyConversationFieldReq)returns(ModifyConversationFieldResp);
|
||||||
|
rpc GetConversation(GetConversationReq)returns(GetConversationResp);
|
||||||
|
rpc GetAllConversations(GetAllConversationsReq)returns(GetAllConversationsResp);
|
||||||
|
rpc GetConversations(GetConversationsReq)returns(GetConversationsResp);
|
||||||
|
rpc BatchSetConversations(BatchSetConversationsReq)returns(BatchSetConversationsResp);
|
||||||
|
rpc SetConversation(SetConversationReq)returns(SetConversationResp);
|
||||||
|
rpc SetRecvMsgOpt(SetRecvMsgOptReq)returns(SetRecvMsgOptResp);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,21 +1,15 @@
|
|||||||
package utilsv2
|
package utilsv2
|
||||||
|
|
||||||
//func DuplicateRemoval[T comparable](ts []T) []T {
|
import (
|
||||||
// v := make([]T, 0, len(ts))
|
"sort"
|
||||||
// tmp := map[T]struct{}{}
|
)
|
||||||
// for _, t := range ts {
|
|
||||||
// if _, ok := tmp[t]; !ok {
|
|
||||||
// tmp[t] = struct{}{}
|
|
||||||
// v = append(v, t)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// return v
|
|
||||||
//}
|
|
||||||
|
|
||||||
func DuplicateRemovalAny[T any, V comparable](ts []T, fn func(t T) V) []T {
|
// DistinctAny 切片去重
|
||||||
|
func DistinctAny[T any, V comparable](ts []T, fn func(t T) V) []T {
|
||||||
v := make([]T, 0, len(ts))
|
v := make([]T, 0, len(ts))
|
||||||
tmp := map[V]struct{}{}
|
tmp := map[V]struct{}{}
|
||||||
for _, t := range ts {
|
for i := 0; i < len(ts); i++ {
|
||||||
|
t := ts[i]
|
||||||
k := fn(t)
|
k := fn(t)
|
||||||
if _, ok := tmp[k]; !ok {
|
if _, ok := tmp[k]; !ok {
|
||||||
tmp[k] = struct{}{}
|
tmp[k] = struct{}{}
|
||||||
@ -25,29 +19,134 @@ func DuplicateRemovalAny[T any, V comparable](ts []T, fn func(t T) V) []T {
|
|||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
func DuplicateRemoval[T comparable](ts []T) []T {
|
// Distinct 切片去重
|
||||||
return DuplicateRemovalAny(ts, func(t T) T {
|
func Distinct[T comparable](ts []T) []T {
|
||||||
|
return DistinctAny(ts, func(t T) T {
|
||||||
return t
|
return t
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// DeleteAt 删除切片元素, 支持负数删除倒数第几个
|
||||||
func DeleteAt[T any](ts []T, index ...int) []T {
|
func DeleteAt[T any](ts []T, index ...int) []T {
|
||||||
l := len(ts)
|
|
||||||
switch len(index) {
|
switch len(index) {
|
||||||
case 0:
|
case 0:
|
||||||
return ts
|
return ts
|
||||||
case 1:
|
case 1:
|
||||||
return append(ts[:index[0]], ts[index[0]+1:]...)
|
i := index[0]
|
||||||
|
if i < 0 {
|
||||||
|
i = len(ts) + i
|
||||||
|
}
|
||||||
|
if len(ts) <= i {
|
||||||
|
return ts
|
||||||
|
}
|
||||||
|
return append(ts[:i], ts[i+1:]...)
|
||||||
default:
|
default:
|
||||||
tmp := make(map[int]struct{})
|
tmp := make(map[int]struct{})
|
||||||
for _, v := range index {
|
for _, i := range index {
|
||||||
tmp[v] = struct{}{}
|
if i < 0 {
|
||||||
|
i = len(ts) + i
|
||||||
|
}
|
||||||
|
tmp[i] = struct{}{}
|
||||||
|
}
|
||||||
|
v := make([]T, 0, len(ts))
|
||||||
|
for i := 0; i < len(ts); i++ {
|
||||||
|
if _, ok := tmp[i]; !ok {
|
||||||
|
v = append(v, ts[i])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return v
|
||||||
}
|
}
|
||||||
v := make([]byte)
|
|
||||||
for i, t := range ts {
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// IndexAny 获取元素所在的下标
|
||||||
|
func IndexAny[T any, V comparable](ts []T, t T, fn func(t T) V) int {
|
||||||
|
k := fn(t)
|
||||||
|
for i := 0; i < len(ts); i++ {
|
||||||
|
if fn(ts[i]) == k {
|
||||||
|
return i
|
||||||
}
|
}
|
||||||
return nil
|
}
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
|
||||||
|
// IndexOf 可比较的元素index下标
|
||||||
|
func IndexOf[T comparable](ts []T, t T) int {
|
||||||
|
return IndexAny(ts, t, func(t T) T {
|
||||||
|
return t
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// IsContain 是否包含元素
|
||||||
|
func IsContain[T comparable](ts []T, t T) bool {
|
||||||
|
return IndexOf(ts, t) >= 0
|
||||||
|
}
|
||||||
|
|
||||||
|
// SliceToMap 切片转map
|
||||||
|
func SliceToMap[T any, K comparable](ts []T, fn func(t T) K) map[K]T {
|
||||||
|
kv := make(map[K]T)
|
||||||
|
for i := 0; i < len(ts); i++ {
|
||||||
|
t := ts[i]
|
||||||
|
k := fn(t)
|
||||||
|
kv[k] = t
|
||||||
|
}
|
||||||
|
return kv
|
||||||
|
}
|
||||||
|
|
||||||
|
// MapKey map获取所有key
|
||||||
|
func MapKey[K comparable, V any](kv map[K]V) []K {
|
||||||
|
ks := make([]K, 0, len(kv))
|
||||||
|
for k := range kv {
|
||||||
|
ks = append(ks, k)
|
||||||
|
}
|
||||||
|
return ks
|
||||||
|
}
|
||||||
|
|
||||||
|
// MapValue map获取所有key
|
||||||
|
func MapValue[K comparable, V any](kv map[K]V) []V {
|
||||||
|
vs := make([]V, 0, len(kv))
|
||||||
|
for k := range kv {
|
||||||
|
vs = append(vs, kv[k])
|
||||||
|
}
|
||||||
|
return vs
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sort 排序
|
||||||
|
func Sort[T Ordered](ts []T, asc bool) []T {
|
||||||
|
SortAny(ts, func(a, b T) bool {
|
||||||
|
if asc {
|
||||||
|
return a < b
|
||||||
|
} else {
|
||||||
|
return a > b
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return ts
|
||||||
|
}
|
||||||
|
|
||||||
|
// SortAny 排序
|
||||||
|
func SortAny[T any](ts []T, fn func(a, b T) bool) {
|
||||||
|
sort.Sort(&sortSlice[T]{
|
||||||
|
ts: ts,
|
||||||
|
fn: fn,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
type sortSlice[T any] struct {
|
||||||
|
ts []T
|
||||||
|
fn func(a, b T) bool
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *sortSlice[T]) Len() int {
|
||||||
|
return len(o.ts)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *sortSlice[T]) Less(i, j int) bool {
|
||||||
|
return o.fn(o.ts[i], o.ts[j])
|
||||||
|
}
|
||||||
|
|
||||||
|
func (o *sortSlice[T]) Swap(i, j int) {
|
||||||
|
o.ts[i], o.ts[j] = o.ts[j], o.ts[i]
|
||||||
|
}
|
||||||
|
|
||||||
|
type Ordered interface {
|
||||||
|
~int | ~int8 | ~int16 | ~int32 | ~int64 | ~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr | ~float32 | ~float64 | ~string
|
||||||
}
|
}
|
||||||
|
50
pkg/utilsv2/slice_test.go
Normal file
50
pkg/utilsv2/slice_test.go
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
package utilsv2
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
"testing"
|
||||||
|
)
|
||||||
|
|
||||||
|
func TestDistinct(t *testing.T) {
|
||||||
|
arr := []int{1, 1, 1, 4, 4, 5, 2, 3, 3, 3, 6}
|
||||||
|
fmt.Println(Distinct(arr))
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestDeleteAt(t *testing.T) {
|
||||||
|
arr := []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
|
||||||
|
fmt.Println(DeleteAt(arr, 0, 1, -1, -2))
|
||||||
|
fmt.Println(DeleteAt(arr))
|
||||||
|
fmt.Println(DeleteAt(arr, 1))
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestSliceToMap(t *testing.T) {
|
||||||
|
type Item struct {
|
||||||
|
ID string
|
||||||
|
Name string
|
||||||
|
}
|
||||||
|
list := []Item{
|
||||||
|
{ID: "111", Name: "111"},
|
||||||
|
{ID: "222", Name: "222"},
|
||||||
|
{ID: "333", Name: "333"},
|
||||||
|
}
|
||||||
|
|
||||||
|
m := SliceToMap(list, func(t Item) string {
|
||||||
|
return t.ID
|
||||||
|
})
|
||||||
|
|
||||||
|
fmt.Printf("%+v\n", m)
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestIndexOf(t *testing.T) {
|
||||||
|
arr := []int{0, 1, 2, 3, 4, 5, 6, 7, 8, 9}
|
||||||
|
|
||||||
|
fmt.Println(IndexOf(arr, 3))
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestSort(t *testing.T) {
|
||||||
|
arr := []int{1, 1, 1, 4, 4, 5, 2, 3, 3, 3, 6}
|
||||||
|
fmt.Println(Sort(arr, false))
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user