open_im_sdk

package
v3.5.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: Apache-2.0 Imports: 36 Imported by: 2

Documentation

Index

Constants

View Source
const (
	LogoutStatus = iota + 1
	Logging
	Logged
)
View Source
const (
	LogoutTips = "js sdk socket close"
)

Variables

View Source
var ErrNotImplemented = errors.New("not set listener")

Functions

func AcceptFriendApplication

func AcceptFriendApplication(callback open_im_sdk_callback.Base, operationID string, userIDHandleMsg string)

func AcceptGroupApplication

func AcceptGroupApplication(callback open_im_sdk_callback.Base, operationID string, groupID string, fromUserID string, handleMsg string)

func AddBlack

func AddBlack(callback open_im_sdk_callback.Base, operationID string, blackUserID string, ex string)

func AddFriend

func AddFriend(callback open_im_sdk_callback.Base, operationID string, userIDReqMsg string)

func ChangeGroupMemberMute

func ChangeGroupMemberMute(callback open_im_sdk_callback.Base, operationID string, groupID string, userID string, mutedSeconds int)

func ChangeGroupMute

func ChangeGroupMute(callback open_im_sdk_callback.Base, operationID string, groupID string, isMute bool)

func ChangeInputStates added in v3.5.1

func ChangeInputStates(callback open_im_sdk_callback.Base, operationID string, conversationID string, focus bool)

func CheckFriend

func CheckFriend(callback open_im_sdk_callback.Base, operationID string, userIDList string)

func CheckResourceLoad

func CheckResourceLoad(uSDK *LoginMgr, funcName string) error

CheckResourceLoad checks the SDK is resource load status.

func ClearConversationAndDeleteAllMsg

func ClearConversationAndDeleteAllMsg(callback open_im_sdk_callback.Base, operationID string, conversationID string)

func CreateAdvancedQuoteMessage

func CreateAdvancedQuoteMessage(operationID string, text string, message, messageEntityList string) string

func CreateAdvancedTextMessage

func CreateAdvancedTextMessage(operationID string, text, messageEntityList string) string

func CreateCardMessage

func CreateCardMessage(operationID string, cardInfo string) string

func CreateCustomMessage

func CreateCustomMessage(operationID string, data, extension string, description string) string

func CreateFaceMessage

func CreateFaceMessage(operationID string, index int, data string) string

func CreateFileMessage

func CreateFileMessage(operationID string, filePath string, fileName string) string

func CreateFileMessageByURL

func CreateFileMessageByURL(operationID string, fileBaseInfo string) string

func CreateFileMessageFromFullPath

func CreateFileMessageFromFullPath(operationID string, fileFullPath, fileName string) string

func CreateForwardMessage

func CreateForwardMessage(operationID string, m string) string

func CreateGroup

func CreateGroup(callback open_im_sdk_callback.Base, operationID string, groupReqInfo string)

func CreateImageMessage

func CreateImageMessage(operationID string, imagePath string) string

func CreateImageMessageByURL

func CreateImageMessageByURL(operationID string, sourcePath string, sourcePicture, bigPicture, snapshotPicture string) string

func CreateImageMessageFromFullPath

func CreateImageMessageFromFullPath(operationID string, imageFullPath string) string

func CreateLocationMessage

func CreateLocationMessage(operationID string, description string, longitude, latitude float64) string

func CreateMergerMessage

func CreateMergerMessage(operationID string, messageList, title, summaryList string) string

func CreateQuoteMessage

func CreateQuoteMessage(operationID string, text string, message string) string

func CreateSoundMessage

func CreateSoundMessage(operationID string, soundPath string, duration int64) string

func CreateSoundMessageByURL

func CreateSoundMessageByURL(operationID string, soundBaseInfo string) string

func CreateSoundMessageFromFullPath

func CreateSoundMessageFromFullPath(operationID string, soundPath string, duration int64) string

func CreateTextAtMessage

func CreateTextAtMessage(operationID string, text, atUserList, atUsersInfo, message string) string

func CreateTextMessage

func CreateTextMessage(operationID string, text string) string

func CreateVideoMessage

func CreateVideoMessage(operationID string, videoPath string, videoType string, duration int64, snapshotPath string) string

func CreateVideoMessageByURL

func CreateVideoMessageByURL(operationID string, videoBaseInfo string) string

func CreateVideoMessageFromFullPath

func CreateVideoMessageFromFullPath(operationID string, videoFullPath string, videoType string, duration int64, snapshotFullPath string) string

func DeleteAllMsgFromLocal

func DeleteAllMsgFromLocal(callback open_im_sdk_callback.Base, operationID string)

func DeleteAllMsgFromLocalAndSvr

func DeleteAllMsgFromLocalAndSvr(callback open_im_sdk_callback.Base, operationID string)

func DeleteConversationAndDeleteAllMsg

func DeleteConversationAndDeleteAllMsg(callback open_im_sdk_callback.Base, operationID string, conversationID string)

func DeleteFriend

func DeleteFriend(callback open_im_sdk_callback.Base, operationID string, friendUserID string)

func DeleteMessage

func DeleteMessage(callback open_im_sdk_callback.Base, operationID string, conversationID string, clientMsgID string)

func DeleteMessageFromLocalStorage

func DeleteMessageFromLocalStorage(callback open_im_sdk_callback.Base, operationID string, conversationID string, clientMsgID string)

func DismissGroup

func DismissGroup(callback open_im_sdk_callback.Base, operationID string, groupID string)

func FindMessageList

func FindMessageList(callback open_im_sdk_callback.Base, operationID string, findMessageOptions string)

func GetAdvancedHistoryMessageList

func GetAdvancedHistoryMessageList(callback open_im_sdk_callback.Base, operationID string, getMessageOptions string)

func GetAdvancedHistoryMessageListReverse

func GetAdvancedHistoryMessageListReverse(callback open_im_sdk_callback.Base, operationID string, getMessageOptions string)

func GetAllConversationList

func GetAllConversationList(callback open_im_sdk_callback.Base, operationID string)

func GetAtAllTag

func GetAtAllTag(operationID string) string

func GetBlackList

func GetBlackList(callback open_im_sdk_callback.Base, operationID string)

func GetConversationIDBySessionType

func GetConversationIDBySessionType(operationID string, sourceID string, sessionType int) string

func GetConversationListSplit

func GetConversationListSplit(callback open_im_sdk_callback.Base, operationID string, offset int, count int)

func GetConversationRecvMessageOpt

func GetConversationRecvMessageOpt(callback open_im_sdk_callback.Base, operationID string, conversationIDList string)

deprecated

func GetFriendApplicationListAsApplicant

func GetFriendApplicationListAsApplicant(callback open_im_sdk_callback.Base, operationID string)

func GetFriendApplicationListAsRecipient

func GetFriendApplicationListAsRecipient(callback open_im_sdk_callback.Base, operationID string)

func GetFriendList

func GetFriendList(callback open_im_sdk_callback.Base, operationID string)

func GetFriendListPage

func GetFriendListPage(callback open_im_sdk_callback.Base, operationID string, offset int32, count int32)

func GetGroupApplicationListAsApplicant

func GetGroupApplicationListAsApplicant(callback open_im_sdk_callback.Base, operationID string)

func GetGroupApplicationListAsRecipient

func GetGroupApplicationListAsRecipient(callback open_im_sdk_callback.Base, operationID string)

func GetGroupMemberList

func GetGroupMemberList(callback open_im_sdk_callback.Base, operationID string, groupID string, filter int32, offset int32, count int32)

func GetGroupMemberListByJoinTimeFilter

func GetGroupMemberListByJoinTimeFilter(callback open_im_sdk_callback.Base, operationID string, groupID string, offset int32, count int32, joinTimeBegin int64, joinTimeEnd int64, filterUserIDList string)

func GetGroupMemberOwnerAndAdmin

func GetGroupMemberOwnerAndAdmin(callback open_im_sdk_callback.Base, operationID string, groupID string)

func GetInputStates added in v3.5.1

func GetInputStates(callback open_im_sdk_callback.Base, operationID string, conversationID string, userID string)

func GetJoinedGroupList

func GetJoinedGroupList(callback open_im_sdk_callback.Base, operationID string)

func GetLoginStatus

func GetLoginStatus(operationID string) int

func GetLoginUserID

func GetLoginUserID() string

func GetMultipleConversation

func GetMultipleConversation(callback open_im_sdk_callback.Base, operationID string, conversationIDList string)

func GetOneConversation

func GetOneConversation(callback open_im_sdk_callback.Base, operationID string, sessionType int32, sourceID string)

func GetSdkVersion

func GetSdkVersion() string

func GetSelfUserInfo

func GetSelfUserInfo(callback open_im_sdk_callback.Base, operationID string)

GetSelfUserInfo obtains the user's own information.

func GetSpecifiedFriendsInfo

func GetSpecifiedFriendsInfo(callback open_im_sdk_callback.Base, operationID string, userIDList string)

func GetSpecifiedGroupMembersInfo

func GetSpecifiedGroupMembersInfo(callback open_im_sdk_callback.Base, operationID string, groupID string, userIDList string)

func GetSpecifiedGroupsInfo

func GetSpecifiedGroupsInfo(callback open_im_sdk_callback.Base, operationID string, groupIDList string)

func GetSubscribeUsersStatus

func GetSubscribeUsersStatus(callback open_im_sdk_callback.Base, operationID string)

GetSubscribeUsersStatus Get the online status of subscribers.

func GetTotalUnreadMsgCount

func GetTotalUnreadMsgCount(callback open_im_sdk_callback.Base, operationID string)

func GetUserStatus

func GetUserStatus(callback open_im_sdk_callback.Base, operationID string, userIDs string)

GetUserStatus Get the online status of users.

func GetUsersInfo

func GetUsersInfo(callback open_im_sdk_callback.Base, operationID string, userIDs string)

func GetUsersInfoFromSrv

func GetUsersInfoFromSrv(callback open_im_sdk_callback.Base, operationID string, userIDs string)

GetUsersInfoFromSrv obtains the information about multiple users.

func GetUsersInfoWithCache added in v3.4.0

func GetUsersInfoWithCache(callback open_im_sdk_callback.Base, operationID string, userIDs, groupID string)

func HideAllConversations added in v3.4.0

func HideAllConversations(callback open_im_sdk_callback.Base, operationID string)

func HideConversation

func HideConversation(callback open_im_sdk_callback.Base, operationID string, conversationID string)

func InitSDK

func InitSDK(listener open_im_sdk_callback.OnConnListener, operationID string, config string) bool

func InsertGroupMessageToLocalStorage

func InsertGroupMessageToLocalStorage(callback open_im_sdk_callback.Base, operationID string, message string, groupID string, sendID string)

func InsertSingleMessageToLocalStorage

func InsertSingleMessageToLocalStorage(callback open_im_sdk_callback.Base, operationID string, message string, recvID string, sendID string)

func InviteUserToGroup

func InviteUserToGroup(callback open_im_sdk_callback.Base, operationID string, groupID string, reason string, userIDList string)

func IsJoinGroup

func IsJoinGroup(callback open_im_sdk_callback.Base, operationID string, groupID string)

func JoinGroup

func JoinGroup(callback open_im_sdk_callback.Base, operationID string, groupID string, reqMsg string, joinSource int32, ex string)

func KickGroupMember

func KickGroupMember(callback open_im_sdk_callback.Base, operationID string, groupID string, reason string, userIDList string)

func Login

func Login(callback open_im_sdk_callback.Base, operationID string, userID, token string)

func Logout

func Logout(callback open_im_sdk_callback.Base, operationID string)

func MarkConversationMessageAsRead

func MarkConversationMessageAsRead(callback open_im_sdk_callback.Base, operationID string, conversationID string)

mark as read

func MarkMessagesAsReadByMsgID

func MarkMessagesAsReadByMsgID(callback open_im_sdk_callback.Base, operationID string, conversationID string, clientMsgIDs string)

func NetworkStatusChanged

func NetworkStatusChanged(callback open_im_sdk_callback.Base, operationID string)

func PinConversation

func PinConversation(callback open_im_sdk_callback.Base, operationID string, conversationID string, isPinned bool)

func PinFriends added in v3.5.0

func PinFriends(callback open_im_sdk_callback.Base, operationID string, setFriendPinParams string)

func QuitGroup

func QuitGroup(callback open_im_sdk_callback.Base, operationID string, groupID string)

func RefuseFriendApplication

func RefuseFriendApplication(callback open_im_sdk_callback.Base, operationID string, userIDHandleMsg string)

func RefuseGroupApplication

func RefuseGroupApplication(callback open_im_sdk_callback.Base, operationID string, groupID string, fromUserID string, handleMsg string)

func RemoveBlack

func RemoveBlack(callback open_im_sdk_callback.Base, operationID string, removeUserID string)

func ResetConversationGroupAtType

func ResetConversationGroupAtType(callback open_im_sdk_callback.Base, operationID string, conversationID string)

func RevokeMessage

func RevokeMessage(callback open_im_sdk_callback.Base, operationID string, conversationID, clientMsgID string)

func SearchConversation added in v3.5.0

func SearchConversation(callback open_im_sdk_callback.Base, operationID string, searchParam string)

func SearchFriends

func SearchFriends(callback open_im_sdk_callback.Base, operationID string, searchParam string)

func SearchGroupMembers

func SearchGroupMembers(callback open_im_sdk_callback.Base, operationID string, searchParam string)

func SearchGroups

func SearchGroups(callback open_im_sdk_callback.Base, operationID string, searchParam string)

func SearchLocalMessages

func SearchLocalMessages(callback open_im_sdk_callback.Base, operationID string, searchParam string)

func SendMessage

func SendMessage(callback open_im_sdk_callback.SendMsgCallBack, operationID, message, recvID, groupID, offlinePushInfo string, isOnlineOnly bool)

func SendMessageNotOss

func SendMessageNotOss(callback open_im_sdk_callback.SendMsgCallBack, operationID string, message, recvID, groupID string, offlinePushInfo string, isOnlineOnly bool)

func SetAdvancedMsgListener

func SetAdvancedMsgListener(listener open_im_sdk_callback.OnAdvancedMsgListener)

func SetAppBackgroundStatus

func SetAppBackgroundStatus(callback open_im_sdk_callback.Base, operationID string, isBackground bool)

func SetAppBadge

func SetAppBadge(callback open_im_sdk_callback.Base, operationID string, appUnreadCount int32)

func SetBatchMsgListener

func SetBatchMsgListener(listener open_im_sdk_callback.OnBatchMsgListener)

func SetConversationBurnDuration

func SetConversationBurnDuration(callback open_im_sdk_callback.Base, operationID string, conversationID string, duration int32)

func SetConversationDraft

func SetConversationDraft(callback open_im_sdk_callback.Base, operationID string, conversationID string, draftText string)

func SetConversationEx added in v3.5.0

func SetConversationEx(callback open_im_sdk_callback.Base, operationID string, conversationID string, ex string)

func SetConversationIsMsgDestruct

func SetConversationIsMsgDestruct(callback open_im_sdk_callback.Base, operationID string, conversationID string, isMsgDestruct bool)

func SetConversationListener

func SetConversationListener(listener open_im_sdk_callback.OnConversationListener)

func SetConversationMsgDestructTime

func SetConversationMsgDestructTime(callback open_im_sdk_callback.Base, operationID string, conversationID string, msgDestructTime int64)

func SetConversationPrivateChat

func SetConversationPrivateChat(callback open_im_sdk_callback.Base, operationID string, conversationID string, isPrivate bool)

func SetConversationRecvMessageOpt

func SetConversationRecvMessageOpt(callback open_im_sdk_callback.Base, operationID string, conversationID string, opt int)

func SetCustomBusinessListener

func SetCustomBusinessListener(listener open_im_sdk_callback.OnCustomBusinessListener)

func SetFriendListener

func SetFriendListener(listener open_im_sdk_callback.OnFriendshipListener)

func SetFriendRemark

func SetFriendRemark(callback open_im_sdk_callback.Base, operationID string, userIDRemark string)

func SetFriendsEx added in v3.5.0

func SetFriendsEx(callback open_im_sdk_callback.Base, operationID string, friendIDs string, ex string)

func SetGlobalRecvMessageOpt

func SetGlobalRecvMessageOpt(callback open_im_sdk_callback.Base, operationID string, opt int)

func SetGroupApplyMemberFriend

func SetGroupApplyMemberFriend(callback open_im_sdk_callback.Base, operationID string, groupID string, rule int32)

func SetGroupInfo

func SetGroupInfo(callback open_im_sdk_callback.Base, operationID string, groupInfo string)

func SetGroupListener

func SetGroupListener(listener open_im_sdk_callback.OnGroupListener)

func SetGroupLookMemberInfo

func SetGroupLookMemberInfo(callback open_im_sdk_callback.Base, operationID string, groupID string, rule int32)

func SetGroupMemberInfo

func SetGroupMemberInfo(callback open_im_sdk_callback.Base, operationID string, groupMemberInfo string)

func SetGroupMemberNickname

func SetGroupMemberNickname(callback open_im_sdk_callback.Base, operationID string, groupID string, userID string, groupMemberNickname string)

func SetGroupMemberRoleLevel

func SetGroupMemberRoleLevel(callback open_im_sdk_callback.Base, operationID string, groupID string, userID string, roleLevel int)

func SetGroupVerification

func SetGroupVerification(callback open_im_sdk_callback.Base, operationID string, groupID string, verification int32)

func SetHeartbeatInterval

func SetHeartbeatInterval(heartbeatInterval int)

func SetMessageKvInfoListener

func SetMessageKvInfoListener(listener open_im_sdk_callback.OnMessageKvInfoListener)

func SetMessageLocalEx

func SetMessageLocalEx(callback open_im_sdk_callback.Base, operationID string, conversationID, clientMsgID, localEx string)

func SetSelfInfo

func SetSelfInfo(callback open_im_sdk_callback.Base, operationID string, userInfo string)

SetSelfInfo sets the user's own information.

func SetUserListener

func SetUserListener(listener open_im_sdk_callback.OnUserListener)

func SubscribeUsersStatus

func SubscribeUsersStatus(callback open_im_sdk_callback.Base, operationID string, userIDs string)

SubscribeUsersStatus Presence status of subscribed users.

func TransferGroupOwner

func TransferGroupOwner(callback open_im_sdk_callback.Base, operationID string, groupID string, newOwnerUserID string)

func TypingStatusUpdate

func TypingStatusUpdate(callback open_im_sdk_callback.Base, operationID string, recvID string, msgTip string)

func UnInitSDK

func UnInitSDK(operationID string)

func UnsubscribeUsersStatus

func UnsubscribeUsersStatus(callback open_im_sdk_callback.Base, operationID string, userIDs string)

UnsubscribeUsersStatus Unsubscribe a user's presence.

func UpdateFcmToken

func UpdateFcmToken(callback open_im_sdk_callback.Base, operationID, fcmToken string, expireTime int64)

func UpdateMsgSenderInfo

func UpdateMsgSenderInfo(callback open_im_sdk_callback.Base, operationID string, nickname, faceURL string)

UpdateMsgSenderInfo updates the message sender's nickname and face URL.

func UploadFile

func UploadFile(callback open_im_sdk_callback.Base, operationID string, req string, progress open_im_sdk_callback.UploadFileCallback)

func UploadLogs added in v3.4.0

func UploadLogs(callback open_im_sdk_callback.Base, operationID string, ex string, progress open_im_sdk_callback.UploadLogProgress)

Types

type LoginMgr added in v3.4.0

type LoginMgr struct {
	// contains filtered or unexported fields
}
var (
	// UserForSDK Client-independent user class
	UserForSDK *LoginMgr
)

func NewLoginMgr added in v3.4.0

func NewLoginMgr() *LoginMgr

func (*LoginMgr) AdvancedMsgListener added in v3.5.0

func (u *LoginMgr) AdvancedMsgListener() open_im_sdk_callback.OnAdvancedMsgListener

func (*LoginMgr) BaseCtx added in v3.4.0

func (u *LoginMgr) BaseCtx() context.Context

func (*LoginMgr) BatchMsgListener added in v3.5.0

func (u *LoginMgr) BatchMsgListener() open_im_sdk_callback.OnBatchMsgListener

func (*LoginMgr) BusinessListener added in v3.5.0

func (*LoginMgr) Context added in v3.4.0

func (u *LoginMgr) Context() context.Context

func (*LoginMgr) Conversation added in v3.4.0

func (u *LoginMgr) Conversation() *conv.Conversation

func (*LoginMgr) ConversationListener added in v3.5.0

func (u *LoginMgr) ConversationListener() open_im_sdk_callback.OnConversationListener

func (*LoginMgr) Exit added in v3.4.0

func (u *LoginMgr) Exit()

func (*LoginMgr) File added in v3.4.0

func (u *LoginMgr) File() *file.File

func (*LoginMgr) Friend added in v3.4.0

func (u *LoginMgr) Friend() *friend.Friend

func (*LoginMgr) FriendListener added in v3.5.0

func (*LoginMgr) Full added in v3.4.0

func (u *LoginMgr) Full() *full.Full

func (*LoginMgr) GetLoginStatus added in v3.4.0

func (u *LoginMgr) GetLoginStatus(ctx context.Context) int

func (*LoginMgr) GetLoginUserID added in v3.4.0

func (u *LoginMgr) GetLoginUserID() string

func (*LoginMgr) GetToken added in v3.4.0

func (u *LoginMgr) GetToken() string

func (*LoginMgr) Group added in v3.4.0

func (u *LoginMgr) Group() *group.Group

func (*LoginMgr) GroupListener added in v3.5.0

func (u *LoginMgr) GroupListener() open_im_sdk_callback.OnGroupListener

func (*LoginMgr) ImConfig added in v3.4.0

func (u *LoginMgr) ImConfig() sdk_struct.IMConfig

func (*LoginMgr) InitSDK added in v3.4.0

func (u *LoginMgr) InitSDK(config sdk_struct.IMConfig, listener open_im_sdk_callback.OnConnListener) bool

func (*LoginMgr) Login added in v3.4.0

func (u *LoginMgr) Login(ctx context.Context, userID, token string) error

func (*LoginMgr) Logout added in v3.4.0

func (u *LoginMgr) Logout(ctx context.Context) error

func (*LoginMgr) MsgKvListener added in v3.5.0

func (*LoginMgr) NetworkStatusChanged added in v3.4.0

func (u *LoginMgr) NetworkStatusChanged(ctx context.Context)

func (*LoginMgr) SetAdvancedMsgListener added in v3.4.0

func (u *LoginMgr) SetAdvancedMsgListener(advancedMsgListener open_im_sdk_callback.OnAdvancedMsgListener)

func (*LoginMgr) SetAppBackgroundStatus added in v3.4.0

func (u *LoginMgr) SetAppBackgroundStatus(ctx context.Context, isBackground bool) error

func (*LoginMgr) SetBatchMsgListener added in v3.4.0

func (u *LoginMgr) SetBatchMsgListener(batchMsgListener open_im_sdk_callback.OnBatchMsgListener)

func (*LoginMgr) SetConversationListener added in v3.4.0

func (u *LoginMgr) SetConversationListener(conversationListener open_im_sdk_callback.OnConversationListener)

func (*LoginMgr) SetCustomBusinessListener added in v3.5.0

func (u *LoginMgr) SetCustomBusinessListener(listener open_im_sdk_callback.OnCustomBusinessListener)

func (*LoginMgr) SetFriendListener added in v3.4.0

func (u *LoginMgr) SetFriendListener(friendListener open_im_sdk_callback.OnFriendshipListener)

func (*LoginMgr) SetGroupListener added in v3.4.0

func (u *LoginMgr) SetGroupListener(groupListener open_im_sdk_callback.OnGroupListener)

func (*LoginMgr) SetMessageKvInfoListener added in v3.4.0

func (u *LoginMgr) SetMessageKvInfoListener(messageKvInfoListener open_im_sdk_callback.OnMessageKvInfoListener)

func (*LoginMgr) SetUserListener added in v3.4.0

func (u *LoginMgr) SetUserListener(userListener open_im_sdk_callback.OnUserListener)

func (*LoginMgr) SignalingListener added in v3.5.0

func (u *LoginMgr) SignalingListener() open_im_sdk_callback.OnSignalingListener

func (*LoginMgr) Third added in v3.4.0

func (u *LoginMgr) Third() *third.Third

func (*LoginMgr) UnInitSDK added in v3.4.0

func (u *LoginMgr) UnInitSDK()

func (*LoginMgr) User added in v3.4.0

func (u *LoginMgr) User() *user.User

func (*LoginMgr) UserListener added in v3.5.0

func (u *LoginMgr) UserListener() open_im_sdk_callback.OnUserListener

Jump to

Keyboard shortcuts

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