msg

package
v0.0.0-...-4702bed Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 13, 2023 License: Apache-2.0 Imports: 41 Imported by: 0

Documentation

Index

Constants

View Source
const GlOBLLOCK = "GLOBAL_LOCK"
View Source
const GroupMemberNum = 500

When the number of group members is greater than this value,Online users will be sent first,Guaranteed service availability

Variables

Functions

func BlackAddedNotification

func BlackAddedNotification(req *pbFriend.AddBlacklistReq)

func BlackDeletedNotification

func BlackDeletedNotification(req *pbFriend.RemoveBlacklistReq)

func ConversationChangeNotification

func ConversationChangeNotification(operationID, userID string)

会话改变

func ConversationSetPrivateNotification

func ConversationSetPrivateNotification(operationID, sendID, recvID string, isPrivateChat bool)

SetPrivate调用

func ConversationUnreadChangeNotification

func ConversationUnreadChangeNotification(operationID, userID, conversationID string, updateUnreadCountTime int64)

会话未读数同步

func DeleteMessageNotification

func DeleteMessageNotification(opUserID, userID string, seqList []uint32, operationID string)

func ExtendMessageAddedNotification

func ExtendMessageAddedNotification(operationID, sendID string, sourceID string, senderPlatformID, sessionType int32,
	req *msg.AddMessageReactionExtensionsReq, resp *msg.AddMessageReactionExtensionsResp, isHistory bool, isReactionFromCache bool)

func ExtendMessageDeleteNotification

func ExtendMessageDeleteNotification(operationID, sendID string, sourceID string, senderPlatformID, sessionType int32,
	req *msg.DeleteMessageListReactionExtensionsReq, resp *msg.DeleteMessageListReactionExtensionsResp, isHistory bool, isReactionFromCache bool)

func ExtendMessageUpdatedNotification

func ExtendMessageUpdatedNotification(operationID, sendID string, sourceID string, senderPlatformID, sessionType int32,
	req *msg.SetMessageReactionExtensionsReq, resp *msg.SetMessageReactionExtensionsResp, isHistory bool, isReactionFromCache bool)

func FriendAddedNotification

func FriendAddedNotification(operationID, opUserID, fromUserID, toUserID string)

func FriendApplicationApprovedNotification

func FriendApplicationApprovedNotification(req *pbFriend.AddFriendResponseReq)

func FriendApplicationNotification

func FriendApplicationNotification(req *pbFriend.AddFriendReq)

func FriendApplicationRejectedNotification

func FriendApplicationRejectedNotification(req *pbFriend.AddFriendResponseReq)

func FriendDeletedNotification

func FriendDeletedNotification(req *pbFriend.DeleteFriendReq)

func FriendInfoUpdatedNotification

func FriendInfoUpdatedNotification(operationID, changedUserID string, needNotifiedUserID string, opUserID string)

func FriendRemarkSetNotification

func FriendRemarkSetNotification(operationID, opUserID, fromUserID, toUserID string)

func GetMsgID

func GetMsgID(sendID string) string

func GroupApplicationAcceptedNotification

func GroupApplicationAcceptedNotification(req *pbGroup.GroupApplicationResponseReq)
message ApplicationProcessedTips{
 GroupInfo Group = 1;
 GroupMemberFullInfo OpUser = 2;
 int32 Result = 3;
 string 	Reason = 4;
}

处理进群请求后调用

func GroupApplicationRejectedNotification

func GroupApplicationRejectedNotification(req *pbGroup.GroupApplicationResponseReq)

func GroupCancelMutedNotification

func GroupCancelMutedNotification(operationID, opUserID, groupID string)

func GroupCreatedNotification

func GroupCreatedNotification(operationID, opUserID, groupID string, initMemberList []string)

创建群后调用

func GroupDismissedNotification

func GroupDismissedNotification(req *pbGroup.DismissGroupReq)

func GroupInfoSetNotification

func GroupInfoSetNotification(operationID, opUserID, groupID string, groupName, notification, introduction, faceURL string, needVerification, applyMemberFriend, lookMemberInfo *wrapperspb.Int32Value)

群信息改变后掉用 groupName := ""

notification := ""
introduction := ""
faceURL := ""

func GroupMemberCancelMutedNotification

func GroupMemberCancelMutedNotification(operationID, opUserID, groupID, groupMemberUserID string)

func GroupMemberInfoSetNotification

func GroupMemberInfoSetNotification(operationID, opUserID, groupID, groupMemberUserID string)

func GroupMemberMutedNotification

func GroupMemberMutedNotification(operationID, opUserID, groupID, groupMemberUserID string, mutedSeconds uint32)

func GroupMemberRoleLevelChangeNotification

func GroupMemberRoleLevelChangeNotification(operationID, opUserID, groupID, groupMemberUserID string, notificationType int32)

func GroupMutedNotification

func GroupMutedNotification(operationID, opUserID, groupID string)

func GroupOwnerTransferredNotification

func GroupOwnerTransferredNotification(req *pbGroup.TransferGroupOwnerReq)

func JoinGroupApplicationNotification

func JoinGroupApplicationNotification(req *pbGroup.JoinGroupReq)
message ReceiveJoinApplicationTips{
 GroupInfo Group = 1;
 PublicUserInfo Applicant  = 2;
 string 	Reason = 3;
}  apply->all managers GroupID              string   `protobuf:"bytes,1,opt,name=GroupID" json:"GroupID,omitempty"`

ReqMessage           string   `protobuf:"bytes,2,opt,name=ReqMessage" json:"ReqMessage,omitempty"`
OpUserID             string   `protobuf:"bytes,3,opt,name=OpUserID" json:"OpUserID,omitempty"`
OperationID          string   `protobuf:"bytes,4,opt,name=OperationID" json:"OperationID,omitempty"`

申请进群后调用

func MemberEnterDirectlyNotification

func MemberEnterDirectlyNotification(groupID string, entrantUserID string, operationID string)

func MemberEnterNotification

func MemberEnterNotification(req *pbGroup.GroupApplicationResponseReq)
message MemberEnterTips{
 GroupInfo Group = 1;
 GroupMemberFullInfo EntrantUser = 2;
 uint64 OperationTime = 3;
}

群成员主动申请进群,管理员同意后调用,

func MemberInvitedNotification

func MemberInvitedNotification(operationID, groupID, opUserID, reason string, invitedUserIDList []string)
message MemberInvitedTips{
 GroupInfo Group = 1;
 GroupMemberFullInfo OpUser = 2;
 GroupMemberFullInfo InvitedUser = 3;
 uint64 OperationTime = 4;
}

被邀请进群后调用

func MemberKickedNotification

func MemberKickedNotification(req *pbGroup.KickGroupMemberReq, kickedUserIDList []string)
message MemberKickedTips{
 GroupInfo Group = 1;
 GroupMemberFullInfo OpUser = 2;
 GroupMemberFullInfo KickedUser = 3;
 uint64 OperationTime = 4;
}

被踢后调用

func MemberQuitNotification

func MemberQuitNotification(req *pbGroup.QuitGroupReq)

func MessageNotification

func MessageNotification(operationID, sendID, recvID string, contentType int32, m proto.Message)

func NewRpcChatServer

func NewRpcChatServer(port int) *rpcChat

func Notification

func Notification(n *NotificationMsg)

func OrganizationNotification

func OrganizationNotification(opUserID string, recvUserID string, contentType int32, m proto.Message, operationID string)

func OrganizationNotificationToAll

func OrganizationNotificationToAll(opUserID string, operationID string)

func SetConversationNotification

func SetConversationNotification(operationID, sendID, recvID string, contentType int, m proto.Message, tips open_im_sdk.TipsComm)

func SuperGroupNotification

func SuperGroupNotification(operationID, sendID, recvID string)

func TagSendMessage

func TagSendMessage(operationID string, user *db.User, recvID, content string, senderPlatformID int32)

func UserInfoUpdatedNotification

func UserInfoUpdatedNotification(operationID, opUserID string, changedUserID string)

send to myself

func WorkMomentNotification

func WorkMomentNotification(operationID, sendID, recvID string, m proto.Message)

func WorkMomentSendNotification

func WorkMomentSendNotification(operationID, recvID string, notificationMsg *pbOffice.WorkMomentNotificationMsg)

Types

type LockerMessage

type LockerMessage struct{}

func NewLockerMessage

func NewLockerMessage() *LockerMessage

func (*LockerMessage) LockGlobalMessage

func (l *LockerMessage) LockGlobalMessage(clientMsgID string) (err error)

func (*LockerMessage) LockMessageTypeKey

func (l *LockerMessage) LockMessageTypeKey(clientMsgID, typeKey string) (err error)

func (*LockerMessage) UnLockGlobalMessage

func (l *LockerMessage) UnLockGlobalMessage(clientMsgID string) error

func (*LockerMessage) UnLockMessageTypeKey

func (l *LockerMessage) UnLockMessageTypeKey(clientMsgID string, typeKey string) error

type MessageLocker

type MessageLocker interface {
	LockMessageTypeKey(clientMsgID, typeKey string) (err error)
	UnLockMessageTypeKey(clientMsgID string, typeKey string) error
	LockGlobalMessage(clientMsgID string) (err error)
	UnLockGlobalMessage(clientMsgID string) (err error)
}

type MessageRevoked

type MessageRevoked struct {
	RevokerID                   string `json:"revokerID"`
	RevokerRole                 int32  `json:"revokerRole"`
	ClientMsgID                 string `json:"clientMsgID"`
	RevokerNickname             string `json:"revokerNickname"`
	RevokeTime                  int64  `json:"revokeTime"`
	SourceMessageSendTime       int64  `json:"sourceMessageSendTime"`
	SourceMessageSendID         string `json:"sourceMessageSendID"`
	SourceMessageSenderNickname string `json:"sourceMessageSenderNickname"`
	SessionType                 int32  `json:"sessionType"`
	Seq                         uint32 `json:"seq"`
}

type MessageWriter

type MessageWriter interface {
	SendMessage(m proto.Message, key string, operationID string) (int32, int64, error)
}

type MsgCallBackReq

type MsgCallBackReq struct {
	SendID       string `json:"sendID"`
	RecvID       string `json:"recvID"`
	Content      string `json:"content"`
	SendTime     int64  `json:"sendTime"`
	MsgFrom      int32  `json:"msgFrom"`
	ContentType  int32  `json:"contentType"`
	SessionType  int32  `json:"sessionType"`
	PlatformID   int32  `json:"senderPlatformID"`
	MsgID        string `json:"msgID"`
	IsOnlineOnly bool   `json:"isOnlineOnly"`
}

type MsgCallBackResp

type MsgCallBackResp struct {
	ErrCode         int32  `json:"errCode"`
	ErrMsg          string `json:"errMsg"`
	ResponseErrCode int32  `json:"responseErrCode"`
	ResponseResult  struct {
		ModifiedMsg string `json:"modifiedMsg"`
		Ext         string `json:"ext"`
	}
}

type MsgFormats

type MsgFormats []*open_im_sdk.MsgData

func (MsgFormats) Len

func (s MsgFormats) Len() int

Implement the sort.Interface interface to get the number of elements method

func (MsgFormats) Less

func (s MsgFormats) Less(i, j int) bool

Implement the sort.Interface interface comparison element method

func (MsgFormats) Swap

func (s MsgFormats) Swap(i, j int)

Implement the sort.Interface interface exchange element method

type NotificationMsg

type NotificationMsg struct {
	SendID         string
	RecvID         string
	Content        []byte //  open_im_sdk.TipsComm
	MsgFrom        int32
	ContentType    int32
	SessionType    int32
	OperationID    string
	SenderNickname string
	SenderFaceURL  string
}

type Validator

type Validator interface {
	// contains filtered or unexported methods
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL