Documentation
¶
Overview ¶
* @Descripttion: * @version: * @Author: ran.ding * @Date: 2019-09-02 18:29:55 * @LastEditors: ran.ding * @LastEditTime: 2019-09-10 11:37:14
* @Descripttion: * @version: * @Author: ran.ding * @Date: 2019-09-02 18:29:55 * @LastEditors: ran.ding * @LastEditTime: 2019-09-10 11:22:38
Index ¶
- Constants
- Variables
- func RCErrorNew(code int, text string) error
- func RCErrorNewV2(code int, text string) error
- func WithKeepAlive(t time.Duration) rongCloudOption
- func WithMaxIdleConnsPerHost(n int) rongCloudOption
- func WithRongCloudURI(rongCloudURI string) rongCloudOption
- func WithTimeout(t time.Duration) rongCloudOption
- func WithTransport(transport http.RoundTripper) rongCloudOption
- type AndroidPush
- type Audience
- type BlacklistResult
- type BlockListResult
- type Broadcast
- type BroadcastRecallContent
- type CMDMsg
- type CMDNtf
- type ChatRoom
- type ChatRoomAttr
- type ChatRoomAttrResult
- type ChatRoomGetResult
- type ChatRoomInfo
- type ChatRoomKVNotiMessage
- type ChatRoomQueryResult
- type ChatRoomResult
- type ChatRoomUser
- type ChatUserExistObj
- type ChatroomOption
- func WithChatroomDestroyTime(destroyTime int) ChatroomOption
- func WithChatroomDestroyType(destroyType int) ChatroomOption
- func WithChatroomEntryInfo(entryInfo map[string]interface{}) ChatroomOption
- func WithChatroomEntryOwnerId(entryOwnerId string) ChatroomOption
- func WithChatroomExtra(extra string) ChatroomOption
- func WithChatroomIsBan(isBan bool) ChatroomOption
- func WithChatroomNeedNotify(isNeedNotify bool) ChatroomOption
- func WithChatroomWhiteUserIds(whiteUserIds []string) ChatroomOption
- type CodeResult
- type CodeResultV2
- type ContactNtf
- type ConversationType
- type DizNtf
- type Extras
- type FileMsg
- type Group
- type GroupForQuery
- type GroupInfo
- type GroupRemarksGetObj
- type GroupUser
- type GroupUserQueryGroup
- type GroupUserQueryObj
- type GrpNtf
- type HQVCMsg
- type History
- type IMGTextMsg
- type IOSPush
- type ImgMsg
- type InfoNtf
- type LBSMsg
- type ListWordFilterResult
- type MentionMsgContent
- type MentionedInfo
- type Message
- type MessageExpansionItem
- type MsgOption
- func WithExtraContent(extraContent string) MsgOption
- func WithIsAdmin(isAdmin int) MsgOption
- func WithIsDelete(isDelete int) MsgOption
- func WithMsgBusChannel(busChannel string) MsgOption
- func WithMsgContentAvailable(contentAvailable int) MsgOption
- func WithMsgDisablePush(isDisablePush bool) MsgOption
- func WithMsgExpansion(isExpansion bool) MsgOption
- func WithMsgIsCounted(isCounted int) MsgOption
- func WithMsgMentioned(isMentioned int) MsgOption
- func WithMsgPushContent(pushContent string) MsgOption
- func WithMsgPushData(pushData string) MsgOption
- func WithMsgPushExt(pushExt string) MsgOption
- func WithMsgVerifyBlacklist(verifyBlacklist int) MsgOption
- type MsgUserInfo
- type Notification
- type PlatForm
- type ProfileNtf
- type Push
- type PushCustomData
- type PushCustomObj
- type PushExt
- type PushNotification
- type PushPeriodGet
- type PushResult
- type Region
- type RespDataArray
- type RespDataKV
- type RongCloud
- func (rc *RongCloud) AddWhiteList(userId string, whiteList []string) error
- func (rc *RongCloud) BlacklistAdd(id string, blacklist []string) error
- func (rc *RongCloud) BlacklistGet(id string) (BlacklistResult, error)
- func (rc *RongCloud) BlacklistRemove(id string, blacklist []string) error
- func (rc *RongCloud) BlockAdd(id string, minute uint64) error
- func (rc *RongCloud) BlockGetList() (BlockListResult, error)
- func (rc *RongCloud) BlockRemove(id string) error
- func (rc *RongCloud) ChangeURI()
- func (rc *RongCloud) ChatRoomBan(chatroomId string, options ...ChatroomOption) error
- func (rc *RongCloud) ChatRoomBanAdd(members []string, minute uint, options ...ChatroomOption) error
- func (rc *RongCloud) ChatRoomBanCheck(chatroomId string) (bool, error)
- func (rc *RongCloud) ChatRoomBanGetList() ([]ChatRoomUser, error)
- func (rc *RongCloud) ChatRoomBanQuery(size, page int) ([]string, error)
- func (rc *RongCloud) ChatRoomBanRemove(members []string, options ...ChatroomOption) error
- func (rc *RongCloud) ChatRoomBanRollback(chatroomId string, options ...ChatroomOption) error
- func (rc *RongCloud) ChatRoomBlockAdd(id string, members []string, minute uint, options ...ChatroomOption) error
- func (rc *RongCloud) ChatRoomBlockGetList(id string) (ChatRoomResult, error)
- func (rc *RongCloud) ChatRoomBlockRemove(id string, members []string, options ...ChatroomOption) error
- func (rc *RongCloud) ChatRoomBroadcast(senderID, objectName string, msg rcMsg, isIncludeSender ...string) error
- func (rc *RongCloud) ChatRoomCreate(id, name string) error
- func (rc *RongCloud) ChatRoomCreateNew(chatroomId string, options ...ChatroomOption) error
- func (rc *RongCloud) ChatRoomDemotionAdd(objectNames []string) error
- func (rc *RongCloud) ChatRoomDemotionGetList() ([]string, error)
- func (rc *RongCloud) ChatRoomDemotionRemove(objectNames []string) error
- func (rc *RongCloud) ChatRoomDestroy(id string) error
- func (rc *RongCloud) ChatRoomDestroySet(chatroomId string, destroyType, destroyTime int) error
- func (rc *RongCloud) ChatRoomDistributionResume(id string) error
- func (rc *RongCloud) ChatRoomDistributionStop(id string) error
- func (rc *RongCloud) ChatRoomEntryBatchSet(chatroomId string, autoDelete int, entryOwnerId string, ...) error
- func (rc *RongCloud) ChatRoomEntryQuery(chatRoomID string, keys ...string) ([]ChatRoomAttr, error)
- func (rc *RongCloud) ChatRoomEntryRemove(chatRoomID, userID, key string) error
- func (rc *RongCloud) ChatRoomEntrySet(chatRoomID, userID, key, value string, autoDelete bool) error
- func (rc *RongCloud) ChatRoomGagAdd(id string, members []string, minute uint, options ...ChatroomOption) error
- func (rc *RongCloud) ChatRoomGagGetList(id string) ([]ChatRoomUser, error)
- func (rc *RongCloud) ChatRoomGagRemove(id string, members []string, options ...ChatroomOption) error
- func (rc *RongCloud) ChatRoomGet(id string, count, order int) (ChatRoomResult, error)
- func (rc *RongCloud) ChatRoomGetNew(chatroomId string) (ChatRoomGetResult, error)
- func (rc *RongCloud) ChatRoomIsExist(id string, members []string) ([]ChatRoomUser, error)
- func (rc *RongCloud) ChatRoomKeepAliveAdd(id string) error
- func (rc *RongCloud) ChatRoomKeepAliveGetList() ([]string, error)
- func (rc *RongCloud) ChatRoomKeepAliveRemove(id string) error
- func (rc *RongCloud) ChatRoomMuteMembersAdd(id string, members []string, minute uint, options ...ChatroomOption) error
- func (rc *RongCloud) ChatRoomMuteMembersGetList(id string) ([]ChatRoomUser, error)
- func (rc *RongCloud) ChatRoomMuteMembersRemove(id string, members []string, options ...ChatroomOption) error
- func (rc *RongCloud) ChatRoomQuery(chatRoomID []string) ([]ChatRoom, error)
- func (rc *RongCloud) ChatRoomRecall(userId string, targetId string, messageId string, sentTime int, ...) error
- func (rc *RongCloud) ChatRoomSend(senderID string, targetID []string, objectName string, msg rcMsg, ...) error
- func (rc *RongCloud) ChatRoomUserBanWhitelistAdd(chatroomId string, members []string, options ...ChatroomOption) error
- func (rc *RongCloud) ChatRoomUserBanWhitelistQuery(chatroomId string) ([]string, error)
- func (rc *RongCloud) ChatRoomUserBanWhitelistRollback(chatroomId string, members []string, options ...ChatroomOption) error
- func (rc *RongCloud) ChatRoomUserWhitelistAdd(id string, members []string) error
- func (rc *RongCloud) ChatRoomUserWhitelistGetList(id string) ([]string, error)
- func (rc *RongCloud) ChatRoomUserWhitelistRemove(id string, members []string) error
- func (rc *RongCloud) ChatRoomWhitelistAdd(objectNames []string) error
- func (rc *RongCloud) ChatRoomWhitelistGetList() ([]string, error)
- func (rc *RongCloud) ChatRoomWhitelistRemove(objectNames []string) error
- func (rc *RongCloud) ChatUserExist(chatroomId, userId string) ([]byte, error)
- func (rc *RongCloud) ChatUserExistResObj(chatroomId, userId string) (ChatUserExistObj, error)
- func (rc *RongCloud) ConversationGet(conversationType ConversationType, userID, targetID string, ...) (int, error)
- func (rc *RongCloud) ConversationMute(conversationType ConversationType, userID, targetID string, ...) error
- func (rc *RongCloud) ConversationNotificationGet(ct ConversationType, requestId, targetId, busChannel string) (int, error)
- func (rc *RongCloud) ConversationNotificationSet(ct ConversationType, requestId, targetId, busChannel string, ...) error
- func (rc *RongCloud) ConversationTop(conversationType ConversationType, userId, targetId, setTop string) error
- func (rc *RongCloud) ConversationTypeNotificationGet(ct ConversationType, requestId string) (int, error)
- func (rc *RongCloud) ConversationTypeNotificationSet(ct ConversationType, requestId string, unPushLevel int) error
- func (rc *RongCloud) ConversationUnmute(conversationType ConversationType, userID, targetID string, ...) error
- func (rc *RongCloud) DeleteMessageExpansion(msgUID, userId, conversationType, targetId string, isSyncSender int, ...) error
- func (rc *RongCloud) GetHttpTransport() http.RoundTripper
- func (rc *RongCloud) GroupCreate(id, name string, members []string) error
- func (rc *RongCloud) GroupDismiss(id, member string) error
- func (rc *RongCloud) GroupGagAdd(id string, members []string, minute int) error
- func (rc *RongCloud) GroupGagList(id string) (Group, error)
- func (rc *RongCloud) GroupGagRemove(id string, members []string) error
- func (rc *RongCloud) GroupGet(id string) (Group, error)
- func (rc *RongCloud) GroupJoin(groupId, groupName string, memberId ...string) error
- func (rc *RongCloud) GroupMuteAllMembersAdd(members []string) error
- func (rc *RongCloud) GroupMuteAllMembersGetList(groupIds []string, page int, size int) (GroupInfo, error)
- func (rc *RongCloud) GroupMuteAllMembersRemove(members []string) error
- func (rc *RongCloud) GroupMuteMembersAdd(id string, members []string, minute int) error
- func (rc *RongCloud) GroupMuteMembersGetList(id string) (Group, error)
- func (rc *RongCloud) GroupMuteMembersRemove(id string, members []string) error
- func (rc *RongCloud) GroupMuteWhiteListUserAdd(id string, members []string) error
- func (rc *RongCloud) GroupMuteWhiteListUserGetList(id string) ([]string, error)
- func (rc *RongCloud) GroupMuteWhiteListUserRemove(id string, members []string) error
- func (rc *RongCloud) GroupQuit(member []string, id string) error
- func (rc *RongCloud) GroupRecall(senderID, targetID, uID string, sentTime int, options ...MsgOption) error
- func (rc *RongCloud) GroupRemarksDel(userId string, groupId string) error
- func (rc *RongCloud) GroupRemarksGet(userId string, groupId string) ([]byte, error)
- func (rc *RongCloud) GroupRemarksGetResObj(userId string, groupId string) (GroupRemarksGetObj, error)
- func (rc *RongCloud) GroupRemarksSet(userId string, groupId string, remark string) error
- func (rc *RongCloud) GroupSend(senderID string, targetID, userID []string, objectName string, msg rcMsg, ...) error
- func (rc *RongCloud) GroupSendMention(senderID string, targetID []string, objectName string, msg MentionMsgContent, ...) error
- func (rc *RongCloud) GroupStatusSend(senderID string, toGroupIds []string, objectName string, msg rcMsg, ...) error
- func (rc *RongCloud) GroupSync(id string, groups []Group) error
- func (rc *RongCloud) GroupUpdate(id, name string) error
- func (rc *RongCloud) GroupUserGagAdd(userId string, groupId string, minute string) error
- func (rc *RongCloud) GroupUserQuery(userId string) ([]byte, error)
- func (rc *RongCloud) GroupUserQueryResObj(userId string) (GroupUserQueryObj, error)
- func (rc *RongCloud) HistoryGet(date string) (History, error)
- func (rc *RongCloud) HistoryRemove(date string) error
- func (rc *RongCloud) MessageBroadcastRecall(userId string, objectName string, content BroadcastRecallContent) error
- func (rc *RongCloud) MessageExpansionDel(msgUID, userId, conversationType, targetId, extraKey string, isSyncSender int) error
- func (rc *RongCloud) MessageExpansionSet(msgUID, userId, conversationType, targetId, extraKeyVal string, ...) error
- func (rc *RongCloud) OnlineBroadcast(fromUserId string, objectName string, content string) ([]byte, error)
- func (rc *RongCloud) OnlineStatusCheck(userID string) (int, error)
- func (rc *RongCloud) PrivateRecall(senderID, targetID, uID string, sentTime int, options ...MsgOption) error
- func (rc *RongCloud) PrivateSend(senderID string, targetID []string, objectName string, msg rcMsg, ...) error
- func (rc *RongCloud) PrivateSendTemplate(senderID, objectName string, template TXTMsg, content []TemplateMsgContent, ...) error
- func (rc *RongCloud) PrivateStatusSend(senderID string, targetID []string, objectName string, msg rcMsg, ...) error
- func (rc *RongCloud) PrivateURI(uri string)
- func (rc *RongCloud) PushCustom(p []byte) ([]byte, error)
- func (rc *RongCloud) PushCustomObj(data PushCustomData) (PushCustomObj, error)
- func (rc *RongCloud) PushCustomResObj(p []byte) (PushCustomObj, error)
- func (rc *RongCloud) PushSend(sender Sender) (PushResult, error)
- func (rc *RongCloud) PushUser(notification *PushNotification, users ...string) error
- func (rc *RongCloud) QueryMessageExpansion(msgUID string, page int) ([]MessageExpansionItem, error)
- func (rc *RongCloud) QueryWhiteList(userId string) (WhiteList, error)
- func (rc *RongCloud) RemoveWhiteList(userId string, whiteList []string) error
- func (rc *RongCloud) SensitiveAdd(keyword, replace string, sensitiveType int) error
- func (rc *RongCloud) SensitiveGetList() (ListWordFilterResult, error)
- func (rc *RongCloud) SensitiveRemove(keywords []string) error
- func (rc *RongCloud) SetHttpTransport(httpTransport http.RoundTripper)
- func (rc *RongCloud) SetMessageExpansion(msgUID, userId, conversationType, targetId string, extra map[string]string, ...) error
- func (rc *RongCloud) SystemBroadcast(senderID, objectName string, msg rcMsg, options ...MsgOption) error
- func (rc *RongCloud) SystemRecall(userId string, targetId string, messageId string, sentTime int, ...) error
- func (rc *RongCloud) SystemSend(senderID string, targetID []string, objectName string, msg rcMsg, ...) error
- func (rc *RongCloud) SystemSendTemplate(senderID, objectName string, template TXTMsg, content []TemplateMsgContent, ...) error
- func (rc *RongCloud) TagBatchSet(tagBatch TagBatch) error
- func (rc *RongCloud) TagGet(userIds []string) (TagResult, error)
- func (rc *RongCloud) TagSet(tag Tag) error
- func (rc *RongCloud) UGChannelCreate(groupId, channelId string) (err error, requestId string)
- func (rc *RongCloud) UGChannelDelete(groupId, channelId string) (err error, requestId string)
- func (rc *RongCloud) UGChannelPrivateUserAdd(groupId, busChannel, userIds string) ([]byte, error)
- func (rc *RongCloud) UGChannelPrivateUserAddResObj(groupId, busChannel, userIds string) (UGChannelPrivateUserAddObj, error)
- func (rc *RongCloud) UGChannelPrivateUserDel(groupId, busChannel, userIds string) ([]byte, error)
- func (rc *RongCloud) UGChannelPrivateUserDelResObj(groupId, busChannel, userIds string) (UGChannelPrivateUserDelObj, error)
- func (rc *RongCloud) UGChannelPrivateUserGet(groupId, busChannel, page, pageSize string) ([]byte, error)
- func (rc *RongCloud) UGChannelPrivateUserGetResObj(groupId, busChannel, page, pageSize string) (UGChannelPrivateUserGetObj, error)
- func (rc *RongCloud) UGChannelQuery(groupId string, page, size int) (channels []UGChannelInfo, err error, requestId string)
- func (rc *RongCloud) UGChannelUserGroupBind(groupId, busChannel string, userGroupIds []string) (err error)
- func (rc *RongCloud) UGChannelUserGroupQuery(groupId, busChannel string, page, pageSize int) (userGroupIds []string, err error)
- func (rc *RongCloud) UGChannelUserGroupUnbind(groupId, busChannel string, userGroupIds []string) (err error)
- func (rc *RongCloud) UGGroupChannelChange(groupId, busChannel, t string) ([]byte, error)
- func (rc *RongCloud) UGGroupChannelChangeResObj(groupId, busChannel, t string) (UGGroupChannelChangeObj, error)
- func (rc *RongCloud) UGGroupChannelCreate(groupId, busChannel, t string) ([]byte, error)
- func (rc *RongCloud) UGGroupChannelGet(groupId string, page, limit int) ([]byte, error)
- func (rc *RongCloud) UGGroupCreate(userId, groupId, groupName string) (err error, requestId string)
- func (rc *RongCloud) UGGroupDismiss(groupId string) (err error, requestId string)
- func (rc *RongCloud) UGGroupJoin(userId, groupId string) (err error, requestId string)
- func (rc *RongCloud) UGGroupMuteMembersAdd(groupId string, userIds []string) (err error, requestId string)
- func (rc *RongCloud) UGGroupMuteMembersGetList(groupId string) (users []UGUserInfo, err error, requestId string)
- func (rc *RongCloud) UGGroupMuteMembersRemove(groupId string, userIds []string) (err error, requestId string)
- func (rc *RongCloud) UGGroupMuted(groupId string, status bool) (err error, requestId string)
- func (rc *RongCloud) UGGroupMutedQuery(groupId string) (status bool, err error, requestId string)
- func (rc *RongCloud) UGGroupMutedWhitelistAdd(groupId string, userIds []string) (err error, requestId string)
- func (rc *RongCloud) UGGroupMutedWhitelistQuery(groupId string) (users []UGUserInfo, err error, requestId string)
- func (rc *RongCloud) UGGroupMutedWhitelistRemove(groupId string, userIds []string) (err error, requestId string)
- func (rc *RongCloud) UGGroupQuit(userId, groupId string) (err error, requestId string)
- func (rc *RongCloud) UGGroupSend(msg UGMessage) (err error, requestId string)
- func (rc *RongCloud) UGGroupUpdate(groupId, groupName string) (err error, requestId string)
- func (rc *RongCloud) UGHisMsgIdQuery(groupId, busChannel, msgUID, prevNum, lastNum string) (UGHisMsgIdQueryResp, error)
- func (rc *RongCloud) UGHistoryQuery(groupId, busChannel string, startTime, endTime int64, fromUserId string, ...) (UGHisMsgQueryResp, error)
- func (rc *RongCloud) UGMemberExists(groupId, userId string) (bool, error)
- func (rc *RongCloud) UGMessageExpansionDelete(groupId, userId, msgUID, busChannel string, keys ...string) error
- func (rc *RongCloud) UGMessageExpansionQuery(groupId, msgUID, busChannel string) ([]UGMessageExpansionItem, error)
- func (rc *RongCloud) UGMessageExpansionSet(groupId, userId, msgUID, busChannel string, extra map[string]string) error
- func (rc *RongCloud) UGMessageGet(groupId string, msgList []UGMessageData, options ...MsgOption) ([]byte, error)
- func (rc *RongCloud) UGMessageGetObj(groupId string, msgList []UGMessageData, options ...MsgOption) (UGMessageGetData, error)
- func (rc *RongCloud) UGMessageModify(groupId, fromUserId, msgUID, content string, options ...UgMessageExtension) ([]byte, error)
- func (rc *RongCloud) UGMessagePublish(...) error
- func (rc *RongCloud) UGMessageRecall(userId, targetId, messageId string, sentTime int, options ...MsgOption) error
- func (rc *RongCloud) UGNotDisturbGet(groupId, busChannel string) (*UGNotDisturbGetResponses, error)
- func (rc *RongCloud) UGNotDisturbSet(groupId string, unPushLevel int, busChannel string) error
- func (rc *RongCloud) UGQueryGroupUsers(groupId string, page, size int) (users []UGUserInfo, err error, requestId string)
- func (rc *RongCloud) UGQueryUserGroups(userId string, page, size int) (groups []UGGroupInfo, err error, requestId string)
- func (rc *RongCloud) UGUserChannelQuery(groupId, userId string, page, pageSize int) (busChannelIds []string, err error)
- func (rc *RongCloud) UGUserGroupAdd(groupId string, userGroups []UGUserGroupInfo) (err error)
- func (rc *RongCloud) UGUserGroupChannelQuery(groupId, userGroupId string, page, pageSize int) (busChannelIds []string, err error)
- func (rc *RongCloud) UGUserGroupDelete(groupId string, userGroupIds []string) (err error)
- func (rc *RongCloud) UGUserGroupQuery(groupId string, page, pageSize int) (userGroups []UGUserGroupInfo, err error)
- func (rc *RongCloud) UGUserGroupUserAdd(groupId, userGroupId string, userIds []string) (err error)
- func (rc *RongCloud) UGUserGroupUserDelete(groupId, userGroupId string, userIds []string) (err error)
- func (rc *RongCloud) UGUserUserGroupQuery(groupId, userId string, page, pageSize int) (userGroupIds []string, err error)
- func (rc *RongCloud) UltraGroupBannedWhiteListAdd(groupId, busChannel string, userIds ...string) error
- func (rc *RongCloud) UltraGroupBannedWhiteListDel(groupId, busChannel string, userIds ...string) error
- func (rc *RongCloud) UltraGroupBannedWhiteListGet(groupId, busChannel string, page, pageSize int) ([]UltraGroupBannedWhiteListGetResponseItem, error)
- func (rc *RongCloud) UltraGroupChannelCreate(groupId, busChannel string) error
- func (rc *RongCloud) UltraGroupChannelDel(groupId, busChannel string) error
- func (rc *RongCloud) UltraGroupChannelGet(groupId string, page, limit int) ([]UltraGroupChannelGetResponseItem, error)
- func (rc *RongCloud) UltraGroupCreate(userId, groupId, groupName string) error
- func (rc *RongCloud) UltraGroupDis(groupId string) error
- func (rc *RongCloud) UltraGroupGlobalBannedGet(groupId, busChannel string) (bool, error)
- func (rc *RongCloud) UltraGroupGlobalBannedSet(groupId, busChannel string, status bool) error
- func (rc *RongCloud) UltraGroupJoin(userId, groupId string) error
- func (rc *RongCloud) UltraGroupQuit(userId, groupId string) error
- func (rc *RongCloud) UltraGroupRefresh(groupId, groupName string) error
- func (rc *RongCloud) UltraGroupUserBannedAdd(groupId, busChannel string, userIds ...string) error
- func (rc *RongCloud) UltraGroupUserBannedDel(groupId, busChannel string, userIds ...string) error
- func (rc *RongCloud) UltraGroupUserBannedGet(groupId, busChannel string, page, pageSize int) ([]UltraGroupUserBannedResponseItem, error)
- func (rc *RongCloud) UserBlockPushPeriodDelete(userId string) error
- func (rc *RongCloud) UserBlockPushPeriodGet(userId string) (PushPeriodGet, error)
- func (rc *RongCloud) UserBlockPushPeriodSet(userId, startTime, period, level string) error
- func (rc *RongCloud) UserChatFbQueryList(num, offset int, t string) ([]byte, error)
- func (rc *RongCloud) UserChatFbQueryListResObj(num, offset int, t string) (UserChatFbQueryListObj, error)
- func (rc *RongCloud) UserChatFbSet(userId string, state int, t string) error
- func (rc *RongCloud) UserDeactivate(userIds []string) (*UserDeactivateResponse, error)
- func (rc *RongCloud) UserDeactivateQuery(pageNo, pageSize int) (*UserDeactivateQueryResponse, error)
- func (rc *RongCloud) UserProfilBatchQuery(userId string) (*UserProfileQueryResponse, error)
- func (rc *RongCloud) UserProfilQuery(page int, size int, order int) (*UserProfileQueryResponse, error)
- func (rc *RongCloud) UserProfileClean(userId string) error
- func (rc *RongCloud) UserProfileSet(userId string, userProfile string, userExtProfile string) error
- func (rc *RongCloud) UserReactivate(userIds []string) (*UserReactivateResponse, error)
- func (rc *RongCloud) UserRegister(userID, name, portraitURI string) (User, error)
- func (rc *RongCloud) UserRemarksDel(userId, targetId string) error
- func (rc *RongCloud) UserRemarksGet(userId string, page, size int) ([]byte, error)
- func (rc *RongCloud) UserRemarksGetResObj(userId string, page, size int) (UserRemarksGetObj, error)
- func (rc *RongCloud) UserRemarksSet(userId string, remarks []UserRemark) error
- func (rc *RongCloud) UserTokenExpire(userId string, t int64) ([]byte, error)
- func (rc *RongCloud) UserTokenExpireResObj(userId string, t int64) (UserTokenExpireObj, error)
- func (rc *RongCloud) UserUpdate(userID, name, portraitURI string) error
- type Sender
- type SensitiveWord
- type TXTMsg
- type Tag
- type TagBatch
- type TagResult
- type TemplateMsgContent
- type UGChannelInfo
- type UGChannelPrivateUserAddObj
- type UGChannelPrivateUserDelObj
- type UGChannelPrivateUserGetObj
- type UGGroupChannelChangeObj
- type UGGroupInfo
- type UGHisMsgIdQueryData
- type UGHisMsgIdQueryResp
- type UGHisMsgQueryData
- type UGHisMsgQueryResp
- type UGMessage
- type UGMessageData
- type UGMessageExpansionItem
- type UGMessageGetData
- type UGMessageGetDataList
- type UGNotDisturbGetResponses
- type UGUserGroupInfo
- type UGUserInfo
- type UgMessageExtension
- type UltraGroupBannedWhiteListGetResponseItem
- type UltraGroupChannelGetResponseItem
- type UltraGroupUserBannedResponseItem
- type User
- type UserChatFbQueryListObj
- type UserDeactivateQueryResponse
- type UserDeactivateResponse
- type UserProfileQueryResponse
- type UserProfileResponse
- type UserReactivateResponse
- type UserRemark
- type UserRemarksGetObj
- type UserRemarksUsers
- type UserTokenExpireObj
- type VCMsg
- type WhiteList
Constants ¶
const ( PRIVATE ConversationType = iota + 1 // PRIVATE one-to-one chat DISCUSSION // DISCUSSION discussion group chat GROUP // GROUP group chat CHATROOM // CHATROOM chatroom chat CUSTOM // CUSTOM customer service chat SYSTEM // SYSTEM system notification APP_PUBLIC_SERVICE // APP_PUBLIC_SERVICE app public service PUBLIC_SERVICE // PUBLIC_SERVICE public service ULTRA_GROUP // ULTRA_GROUP ultra group service ConversationTypePrivate ConversationType = 1 // ConversationTypePrivate one-to-one chat ConversationTypeGroup ConversationType = 3 // ConversationTypeGroup group chat ConversationTypeSystem ConversationType = 6 // ConversationTypeSystem system ConversationTypeUG ConversationType = 10 // ConversationTypeUG ultra group ConversationUnPushLevelAllMessage = -1 // ConversationUnPushLevelAllMessage all message notifications ConversationUnPushLevelNotSet = 0 // ConversationUnPushLevelNotSet not set ConversationUnPushLevelAtMessage = 1 // ConversationUnPushLevelAtMessage only @message notifications ConversationUnPushLevelAtUser = 2 // ConversationUnPushLevelAtUser @specific user notifications ConversationUnPushLevelAtAllGroupMembers = 4 // ConversationUnPushLevelAtAllGroupMembers @all group members notifications ConversationUnPushLevelNotRecv = 5 // ConversationUnPushLevelNotRecv do not receive notifications )
const ( MessagePrivateType = 1 // MessagePrivateType one-to-one chat MessageGroupType = 3 // MessageGroupType group chat )
const ( // ReqType Body type ReqType = "json" // USERAGENT SDK name USERAGENT = "rc-go-sdk/3.2.23" // DEFAULTTIMEOUT Default timeout, 10 seconds DEFAULTTIMEOUT = 10 // DEFAULT_KEEPALIVE Default HTTP keepalive time, 30 seconds DEFAULT_KEEPALIVE = 30 // DEFAULT_MAXIDLECONNSPERHOST Default maximum idle connections per host, 100 DEFAULT_MAXIDLECONNSPERHOST = 100 // DEFAULT_CHANGE_URI_DURATION Interval for automatic API URL switching, in seconds DEFAULT_CHANGE_URI_DURATION = 30 )
const ( UGUnPushLevelAllMessage = -1 // UGUnPushLevelAllMessage Notify all messages UGUnPushLevelNotSet = 0 // UGUnPushLevelNotSet Not set UGUnPushLevelAtMessage = 1 // UGUnPushLevelAtMessage Notify only @ messages UGUnPushLevelAtUser = 2 // UGUnPushLevelAtUser Notify @ specific users UGUnPushLevelAtAllGroupMembers = 4 // UGUnPushLevelAtAllGroupMembers Notify @ all group members UGUnPushLevelNotRecv = 5 // UGUnPushLevelNotRecv Do not receive notifications )
Variables ¶
var ( REGION_BJ = Region{"https://api.rong-api.com", "https://api-b.rong-api.com"} REGION_SG = Region{"https://api.sg-light-api.com", "https://api-b.sg-light-api.com"} REGION_SG_B = Region{"https://api.sg-b-light-api.com", "https://api-b.sg-b-light-api.com"} REGION_NA = Region{"https://api.us-light-api.com", "https://api-b.us-light-api.com"} REGION_SAU = Region{"https://api.sau-light-api.com", "https://api-b.sau-light-api.com"} )
Functions ¶
func RCErrorNew ¶
RCErrorNew creates a new error message.
func RCErrorNewV2 ¶ added in v3.2.8
RCErrorNewV2 creates a new error message for API v2.
func WithKeepAlive ¶ added in v3.2.0
WithKeepAlive sets the connection keep-alive duration, with the minimum unit in seconds
func WithMaxIdleConnsPerHost ¶ added in v3.2.0
func WithMaxIdleConnsPerHost(n int) rongCloudOption
WithMaxIdleConnsPerHost sets the maximum number of connections per host
func WithRongCloudURI ¶
func WithRongCloudURI(rongCloudURI string) rongCloudOption
WithRongCloudURI sets the RongCloud URI
func WithTimeout ¶
WithTimeout sets the timeout duration, with the minimum unit in seconds
func WithTransport ¶ added in v3.2.8
func WithTransport(transport http.RoundTripper) rongCloudOption
Types ¶
type AndroidPush ¶
type AndroidPush struct { Alert string `json:"alert,omitempty"` // Push message content for iOS or Android platforms. If specified, the default push message content is overridden and cannot be empty. (Optional) Extras Extras `json:"extras,omitempty"` // Extras should implement the Extras Interface. Additional information for iOS or Android platforms. Developers can parse this in the App as needed. PushNotification does not have this field. (Optional) ChannelId string `json:"channelId,omitempty"` // ChannelId for vendor-specific push channels. Currently supported vendors include: "MI" for Xiaomi, "HW" for Huawei, "OPPO". (Optional) Importance string `json:"importance,omitempty"` // Importance for Huawei notification priority, values: NORMAL, LOW, default is NORMAL for important messages. (Optional) Image string `json:"image,omitempty"` // Image URL for custom notification bar icon on the right for Huawei push. If not set, the icon is not displayed. URL must use HTTPS protocol, e.g., https://example.com/image.png. Icon file must be less than 512KB, recommended size: 40dp x 40dp, corner radius: 8dp. Icons larger than the recommended size may be compressed or not fully displayed. (Optional) LargeIconUri string `json:"large_icon_uri,omitempty"` // LargeIconUri for custom notification bar icon on the right for Xiaomi push. If not set, the icon is not displayed. Domestic version only supports MIUI12 and above; international version supports. Image requirements: 120 * 120px, png or jpg format. (Optional) Classification string `json:"classification,omitempty"` // Classification for vivo push channel type. 0 for operational messages, 1 for system messages, default is the push channel type set in the developer backend for vivo push. (Optional) }
AndroidPush Settings for Android platform push and additional information.
type Audience ¶
type Audience struct { Tag []string `json:"tag,omitempty"` // User tags. Up to 20 tags can be sent at a time, with an AND relationship between tags. Invalid if is_to_all is true. (Optional) TagOr []string `json:"tag_or,omitempty"` // User tags. Up to 20 tags can be sent at a time, with an OR relationship between tags. Invalid if is_to_all is true. tag_or can coexist with tag. (Optional) UserID []string `json:"userid,omitempty"` // User IDs. Up to 1000 users can be sent at a time. If both tag and userid conditions exist, userid takes precedence. If userid is specified, the platform parameter is invalid. Invalid if is_to_all is true. (Optional) IsToAll bool `json:"is_to_all"` // Whether to push to all users. false means push based on tag, tag_or, or userid conditions. true means push to all users, and tag, tag_or, and userid conditions are invalid. (Required) PackageName string `json:"packageName"` // Application package name. Invalid if is_to_all is true. If coexisting with tag or tag_or, it has an AND relationship, pushing to users who meet all conditions. If coexisting with userid, userid takes precedence. (Optional) }
Audience Push conditions.
type BlacklistResult ¶
type BlacklistResult struct {
Users []string `json:"users"`
}
BlacklistResult Response information
type BlockListResult ¶
type BlockListResult struct {
Users []User `json:"users"`
}
BlockListResult Response information
type Broadcast ¶
type Broadcast struct { PlatForm []PlatForm `json:"platform"` // Target operating system, at least one of iOS or Android must be specified. If you need to push messages to both systems, both must be filled in. (Required) FromUserID string `json:"fromuserid"` // Sender's user ID. (Required) Message Message `json:"message"` // Broadcast message. (Required) Audience Audience `json:"audience"` // Push conditions, including: tag, userid, packageName, is_to_all. (Required) Notification Notification `json:"notification,omitempty"` // Push content by operating system type. If both iOS and Android are set in platform, but only iOS content is set in notification, Android will use the initial alert content. (Optional) }
Broadcast Broadcast message
type BroadcastRecallContent ¶
type BroadcastRecallContent struct { MessageId string `json:"messageUId"` ConversationType int `json:"conversationType"` IsAdmin int `json:"isAdmin"` IsDelete int `json:"isDelete"` }
BroadcastRecallContent Content of message broadcast recall
func (*BroadcastRecallContent) ToString ¶
func (content *BroadcastRecallContent) ToString() (string, error)
*
- @name: ToString
- @test:
- @msg: Converts the content structure parameter required for the broadcast message recall API to JSON
- @param {type}
- @return: string error
type CMDMsg ¶
type CMDMsg struct { Name string `json:"name"` Data string `json:"data"` User MsgUserInfo `json:"user"` }
CMDMsg message
type CMDNtf ¶
type CMDNtf struct { Name string `json:"operation"` Data string `json:"data"` User MsgUserInfo `json:"user"` }
CMDNtf message
type ChatRoom ¶
type ChatRoom struct { ChatRoomID string `json:"chrmId"` Name string `json:"name"` Time string `json:"time"` }
ChatRoom chatroom information
type ChatRoomAttr ¶
type ChatRoomAttr struct { Key string `json:"key"` Value string `json:"value"` UserID string `json:"userID"` AutoDelete string `json:"autoDelete"` LastSetTime string `json:"lastSetTime"` }
ChatRoomAttr Chatroom custom attributes structure
type ChatRoomAttrResult ¶
type ChatRoomAttrResult struct {
Keys []ChatRoomAttr `json:"keys"`
}
ChatRoomAttrResult Chatroom custom attributes return result
type ChatRoomGetResult ¶ added in v3.2.20
type ChatRoomGetResult struct { Code int `json:"code"` ChatroomId string `json:"chatroomId"` CreateTime int64 `json:"createTime"` MemberCount int `json:"memberCount"` DestroyType int `json:"destroyType"` DestroyTime int `json:"destroyTime"` IsBan bool `json:"ban"` }
Query chatroom information return result
type ChatRoomInfo ¶
ChatRoomInfo chatroom information
type ChatRoomKVNotiMessage ¶
type ChatRoomKVNotiMessage struct { Type int `json:"type"` Key string `json:"string"` Value string `json:"value"` Extra string `json:"extra"` }
ChatRoomKVNotiMessage Chatroom custom attributes notification message
func (*ChatRoomKVNotiMessage) ToString ¶
func (msg *ChatRoomKVNotiMessage) ToString() (string, error)
ToString ChatRoomKVNotiMessage
type ChatRoomQueryResult ¶
type ChatRoomQueryResult struct {
ChatRooms []ChatRoom `json:"chatRooms"`
}
ChatRoomQueryResult chatroom query interface return data
type ChatRoomResult ¶
type ChatRoomResult struct { Total int `json:"total"` Users []ChatRoomUser `json:"users"` Result []ChatRoomUser `json:"result"` ObjectNames []string `json:"objectNames"` ChatRoomIDs []string `json:"chatroomids"` WhitelistMsgType []string `json:"whitlistMsgType"` }
ChatRoomResult ChatRoom return result
type ChatRoomUser ¶
type ChatRoomUser struct { ID string `json:"id"` UserID string `json:"userId"` Time string `json:"time"` IsInChrm int `json:"isInChrm"` }
ChatRoomUser Chatroom user information
type ChatUserExistObj ¶ added in v3.2.12
type ChatUserExistObj struct { // 200: Success. Code int `json:"code"` // Indicates whether the user is in the chatroom, true means in the chatroom, false means not in the chatroom. IsInChrm bool `json:"isInChrm"` }
ChatUserExistObj : Return value of ChatUserExistResObj
type ChatroomOption ¶ added in v3.2.19
type ChatroomOption func(*chatroomOptions)
ChatroomOption Interface function
func WithChatroomDestroyTime ¶ added in v3.2.20
func WithChatroomDestroyTime(destroyTime int) ChatroomOption
Sets the chatroom destruction time, effective when destroyType=1, unit is minutes, minimum 60 minutes, maximum 10080 minutes (7 days). If not set, defaults to 60 minutes.
func WithChatroomDestroyType ¶ added in v3.2.20
func WithChatroomDestroyType(destroyType int) ChatroomOption
Specifies the chatroom destruction type: 0: Default value, means destruction when inactive, 1: Fixed time destruction
func WithChatroomEntryInfo ¶ added in v3.2.20
func WithChatroomEntryInfo(entryInfo map[string]interface{}) ChatroomOption
The KV pairs of chatroom custom attributes, in JSON structure
func WithChatroomEntryOwnerId ¶ added in v3.2.20
func WithChatroomEntryOwnerId(entryOwnerId string) ChatroomOption
The user ID to whom the chatroom custom attributes belong
func WithChatroomExtra ¶ added in v3.2.19
func WithChatroomExtra(extra string) ChatroomOption
The extra information in JSON format carried by the notification, valid only when needNotify is true.
func WithChatroomIsBan ¶ added in v3.2.20
func WithChatroomIsBan(isBan bool) ChatroomOption
Whether to mute all members of the chatroom, default is false
func WithChatroomNeedNotify ¶ added in v3.2.19
func WithChatroomNeedNotify(isNeedNotify bool) ChatroomOption
Whether to notify members. Default is false (no notification)
func WithChatroomWhiteUserIds ¶ added in v3.2.20
func WithChatroomWhiteUserIds(whiteUserIds []string) ChatroomOption
The allowlist of user IDs for muting, supports batch setting, maximum of 20 users
type CodeResult ¶
type CodeResult struct { Code int `json:"code"` // The return code, 200 indicates success. ErrorMessage string `json:"errorMessage"` // The error message. }
CodeResult represents the status code and error code returned by RongCloud.
func (CodeResult) ErrorCode ¶
func (e CodeResult) ErrorCode() int
ErrorCode retrieves the error code.
type CodeResultV2 ¶ added in v3.2.8
type CodeResultV2 struct { Code int `json:"code"` // The return code, 10000 indicates success. Message string `json:"msg"` // The error message. }
func (CodeResultV2) Error ¶ added in v3.2.8
func (e CodeResultV2) Error() string
Error retrieves the error message
func (CodeResultV2) ErrorCode ¶ added in v3.2.8
func (e CodeResultV2) ErrorCode() int
ErrorCode retrieves the error code
type ContactNtf ¶
type ContactNtf struct { Operation string `json:"operation"` SourceUserID string `json:"sourceUserId"` TargetUserID string `json:"targetUserId"` Message string `json:"message"` Extra string `json:"extra"` User MsgUserInfo `json:"user"` }
ContactNtf message
type DizNtf ¶
type DizNtf struct { Type int `json:"type"` Extension string `json:"extension"` Operation string `json:"operation"` User MsgUserInfo `json:"user"` }
DizNtf message
type FileMsg ¶
type FileMsg struct { Name string `json:"name"` Size string `json:"size"` Type string `json:"type"` FileURL string `json:"fileUrl"` User MsgUserInfo `json:"user"` }
FileMsg Message
type Group ¶
type Group struct { ID string `json:"id"` Users []GroupUser `json:"users"` Name string `json:"name"` Stat string `json:"stat"` }
Group represents group information
type GroupForQuery ¶ added in v3.3.0
type GroupInfo ¶
type GroupInfo struct {
GroupInfo []GroupForQuery `json:"groupinfo"`
}
GroupInfo represents group information
type GroupRemarksGetObj ¶ added in v3.2.12
type GroupUser ¶
type GroupUser struct { ID string `json:"id"` UserID string `json:"userId"` Time string `json:"time"` }
GroupUser represents group user information
type GroupUserQueryGroup ¶ added in v3.2.12
type GroupUserQueryObj ¶ added in v3.2.12
type GroupUserQueryObj struct { // Return code, 200 indicates success. Code int `json:"code"` // Array of group information the user has joined. Groups []GroupUserQueryGroup `json:"groups"` }
GroupUserQueryObj : Return value of GroupUserQueryResObj
type GrpNtf ¶
type GrpNtf struct { OperatorUserID string `json:"operatorUserId"` Operation string `json:"operation"` Data string `json:"data"` Message string `json:"message"` Extra string `json:"extra"` User MsgUserInfo `json:"user"` }
GrpNtf message
type HQVCMsg ¶ added in v3.2.2
type HQVCMsg struct { LocalPath string `json:"localPath"` RemoteUrl string `json:"remoteUrl"` Duration interface{} `json:"duration"` User MsgUserInfo `json:"user"` Extra string `json:"extra"` }
HQVCMsg High-Quality Voice Message RC:HQVCMsg
type IMGTextMsg ¶
type IMGTextMsg struct { Title string `json:"title"` Content string `json:"content"` User MsgUserInfo `json:"user"` Extra string `json:"extra"` ImageUri string `json:"imageUri"` URL string `json:"url"` }
IMGTextMsg Message
type IOSPush ¶
type IOSPush struct { Title string `json:"title,omitempty"` // The push title displayed in the notification bar, specific to the iOS platform, supported on iOS 8.2 and above. Parameters are set under the ios node. Refer to the "Set iOS Push Title Request Example" for details. (Optional) ContentAvailable int `json:"contentAvailable,omitempty"` // For the iOS platform, silent push is a push method introduced after iOS7. It allows the app to run a piece of code in the background upon receiving the notification and execute it immediately. 1 indicates enabled, 0 indicates disabled, default is 0. (Optional) Alert string `json:"alert,omitempty"` // Push message content for iOS or Android platforms. If specified, the default push message content is overridden and cannot be empty. (Optional) Extras Extras `json:"extras,omitempty"` // Extras should implement the Extras Interface. Additional information for iOS or Android platforms. Developers can parse this in the App as needed. (Optional) Badge int `json:"badge,omitempty"` // App badge number, specific to the iOS platform. If not specified, the badge number remains unchanged. If 0 or negative, the badge number is cleared. Otherwise, the specified number sets the badge number, with a maximum of 9999. Parameters are set under the ios node. Refer to the "Set iOS Badge Number HTTP Request Example" for details. (Optional) Category string `json:"category,omitempty"` // iOS rich push type defined by the developer, parsed in the App, used with richMediaUri. (Optional) RichMediaURI string `json:"richMediaUri,omitempty"` // URL for iOS rich push content, used with category. (Optional) ThreadId string `json:"threadId,omitempty"` // ThreadId for iOS platform notification grouping. Notifications with the same thread-id are grouped together, and groups with more than 5 notifications are collapsed. (Optional) ApnsCollapseId string `json:"apns-collapse-id,omitempty"` // ApnsCollapseId for the iOS platform, supported from iOS10. Messages with the same ID are merged into one. (Optional) }
IOSPush Settings for iOS platform push and additional information.
type ImgMsg ¶
type ImgMsg struct { Content string `json:"content"` User MsgUserInfo `json:"user"` ImageURI string `json:"imageUri"` Extra string `json:"extra"` }
ImgMsg message
type InfoNtf ¶
type InfoNtf struct { Message string `json:"message"` User MsgUserInfo `json:"user"` Extra string `json:"extra"` }
InfoNtf Message
type LBSMsg ¶
type LBSMsg struct { Content string `json:"content"` Extra string `json:"extra"` POI string `json:"poi"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` User MsgUserInfo `json:"user"` }
LBSMsg Message
type ListWordFilterResult ¶
type ListWordFilterResult struct {
Words []SensitiveWord `json:"words"`
}
ListWordFilterResult Result of listWordFilter
type MentionMsgContent ¶
type MentionMsgContent struct { Content string `json:"content"` MentionedInfo MentionedInfo `json:"mentionedInfo"` }
MentionMsgContent MentionMsgContent
type MentionedInfo ¶
type MentionedInfo struct { Type int `json:"type"` UserIDs []string `json:"userIdList"` PushContent string `json:"mentionedContent"` }
MentionedInfo Mentioned
type Message ¶
type Message struct { Content string `json:"content"` // RongCloud's built-in messages. Please refer to the RCMsg Interface. For custom messages, implement the RCMsg Interface and convert it to a String for passing. ObjectName string `json:"objectName"` // RongCloud's built-in messages or custom messages. }
Message Broadcast message content
type MessageExpansionItem ¶ added in v3.2.8
type MsgOption ¶ added in v3.1.0
type MsgOption func(*msgOptions)
MsgOption interface functions
func WithExtraContent ¶ added in v3.2.8
WithExtraContent Custom message extension information, which accepts key-value pairs in JSON string format.
func WithIsAdmin ¶ added in v3.2.6
Indicates whether the user is an administrator. Default is 0. When set to 1, IMKit will display a gray bar message as "Admin recalled a message" upon receiving this message.
func WithIsDelete ¶ added in v3.2.6
Default is 0. When recalling the message, the client will delete the message and replace it with a gray bar recall prompt. When set to 1, the message will be deleted without being replaced by a gray bar prompt.
func WithMsgBusChannel ¶ added in v3.2.6
busChannel Creates a sub-conversation
func WithMsgContentAvailable ¶ added in v3.1.0
For iOS platform, enables silent push when the SDK is in the background. A push method introduced after iOS7. Allows the app to run a piece of code in the background upon receiving a notification and execute it immediately. 1 represents enabled, 0 represents disabled. Default is 0.
func WithMsgDisablePush ¶ added in v3.1.0
disablePush Boolean Indicates whether it is a silent message. Default is false. When set to true, the end user will not receive a notification reminder when offline.
func WithMsgExpansion ¶ added in v3.1.0
Indicates whether the message is extensible. Default is false. When set to true, the client can set extended information upon receiving the message.
func WithMsgIsCounted ¶ added in v3.2.21
WithMsgIsCounted Specifies whether to count the message as unread when the user is offline. 0 means not counted, 1 means counted. Default is 1.
func WithMsgMentioned ¶ added in v3.1.0
Indicates whether the message is a mention message. 0 represents a normal message, 1 represents a mention message. Default is 0.
func WithMsgPushContent ¶ added in v3.1.1
pushContent String Defines the displayed push content. If objectName is a built-in message type of RongCloud, the user will definitely receive push information after sending. For custom messages, pushContent is the displayed push content of the custom message. If not provided, the user will not receive a push notification.
func WithMsgPushData ¶ added in v3.1.1
pushData String For iOS platform, it is appended to the payload when sending a push notification. The client retrieves the remote push content as appData. RongCloud by default carries the basic message information, which the client can obtain through the 'rc' attribute. For Android clients, the corresponding field name is pushData when receiving push messages.
func WithMsgPushExt ¶ added in v3.1.0
pushExt String Specifies the push notification attributes. For detailed information, refer to the pushExt structure description. pushExt is in JSON format and requires escaping when making requests. This attribute is invalid when disablePush is true.
func WithMsgVerifyBlacklist ¶ added in v3.1.0
Specifies whether to filter the sender's blocklist. 0 represents no filtering, 1 represents filtering. Default is 0 (no filtering).
type MsgUserInfo ¶
type MsgUserInfo struct { ID string `json:"id"` Name string `json:"name"` Icon string `json:"icon"` Portrait string `json:"portrait"` Extra string `json:"extra"` }
MsgUserInfo RongCloud built-in message user information
type Notification ¶
type Notification struct { Alert string `json:"alert"` // Default push message content. If alert is specified for iOS or Android, the push content will follow the alert for the respective platform. (Required) IOS IOSPush `json:"ios,omitempty"` // Settings for iOS platform push and additional information. Android AndroidPush `json:"android,omitempty"` // Settings for Android platform push and additional information. }
Notification Push message content by operating system type. If platform is set to push messages to both iOS and Android, but notification only sets iOS push content, the Android push content will default to the initial alert setting. (Required)
type ProfileNtf ¶
type ProfileNtf struct { Operation string `json:"operation"` Data string `json:"data"` User MsgUserInfo `json:"user"` Extra string `json:"extra"` }
ProfileNtf message
type Push ¶
type Push struct { PlatForm []PlatForm `json:"platform"` // Target operating systems. At least one of iOS or Android must be specified. If you need to push messages to both systems, both must be filled. (Required) Audience Audience `json:"audience"` // Push conditions, including: tag, userid, packageName, is_to_all. (Required) Notification Notification `json:"notification"` // Push message content by operating system type. If platform is set to push messages to both iOS and Android, but notification only sets iOS push content, the Android push content will default to the initial alert setting. (Required) }
Push Broadcast push
type PushCustomData ¶ added in v3.2.12
type PushCustomData struct { Platform []string `json:"platform"` Audience struct { Tag []string `json:"tag"` TagOr []string `json:"tag_or"` Packages string `json:"packageName"` TagItems []struct { Tags []string `json:"tags"` IsNot bool `json:"isNot"` TagsOperator string `json:"tagsOperator"` ItemsOperator string `json:"itemsOperator"` } `json:"tagItems,omitempty"` IsToAll bool `json:"is_to_all"` } `json:"audience"` Notification struct { Title string `json:"title"` Alert string `json:"alert"` Ios struct { Title string `json:"title,omitempty"` ContentAvailable int `json:"contentAvailable"` Badge int `json:"badge,omitempty"` ThreadId string `json:"thread-id"` ApnsCollapseId string `json:"apns-collapse-id"` Category string `json:"category,omitempty"` RichMediaUri string `json:"richMediaUri,omitempty"` Extras interface{} `json:"extras"` } `json:"ios"` Android struct { Hw struct { ChannelId string `json:"channelId"` Importance string `json:"importance"` Image string `json:"image"` } `json:"hw"` Mi struct { ChannelId string `json:"channelId"` LargeIconUri string `json:"large_icon_uri"` } `json:"mi"` Oppo struct { ChannelId string `json:"channelId"` } `json:"oppo"` Vivo struct { Classification string `json:"classification"` } `json:"vivo"` Extras struct { Id string `json:"id"` Name string `json:"name"` } `json:"extras"` } `json:"android"` } `json:"notification"` }
type PushCustomObj ¶ added in v3.2.12
type PushCustomObj struct { // Return code, 200 indicates success. Code int `json:"code"` // Unique identifier for the push notification. Id string `json:"id"` }
PushCustomObj : The return value of the PushCustomResObj method
type PushNotification ¶ added in v3.2.8
type PushNotification struct { Title string `json:"title,omitempty"` // Title The title displayed in the notification bar, with a maximum of 50 characters. PushContent string `json:"pushContent"` // PushContent The content of the push notification. IOS IOSPush `json:"ios,omitempty"` // IOS Settings for push notifications and additional information on the iOS platform. For details, refer to the ios structure description. Android map[string]interface{} `json:"android,omitempty"` // Android Settings for push notifications and additional information on the Android platform. For details, refer to the android structure description. }
type PushPeriodGet ¶ added in v3.2.13
type PushResult ¶
type PushResult struct { *CodeResult ID string `json:"id"` }
PushResult Return value of the Send function
type RespDataArray ¶ added in v3.2.8
type RespDataArray struct { Code int `json:"code"` Data map[string][]map[string]interface{} `json:"data"` }
API response, data array
type RespDataKV ¶ added in v3.2.8
API response, data
type RongCloud ¶
type RongCloud struct {
// contains filtered or unexported fields
}
RongCloud appKey appSecret extra
func NewRongCloud ¶
NewRongCloud creates a RongCloud object
func (*RongCloud) AddWhiteList ¶
*
- @name: AddWhiteList
- @test:
- @msg: Add a user to the allowlist (limited to 100 requests per second)
- @param string userId
- @param []string whiteList
- @return: error
func (*RongCloud) BlacklistAdd ¶
BlacklistAdd Adds users to the blocklist (limited to 100 times per second)
*@param id: User ID. *@param blacklist: List of users to be added to the blocklist. * *@return error
func (*RongCloud) BlacklistGet ¶
func (rc *RongCloud) BlacklistGet(id string) (BlacklistResult, error)
BlocklistGet Retrieves the blocklist of a user (limited to 100 requests per second)
*@param id: User ID. * *@return BlocklistResult error
func (*RongCloud) BlacklistRemove ¶
BlacklistRemove Removes users from the blocklist (limited to 100 times per second)
*@param id: User ID. *@param blacklist: List of users to be removed from the blocklist. * *@return error
func (*RongCloud) BlockAdd ¶
BlockAdd Adds a user to the blocklist
*@param id: User ID. *@param minute: Ban duration, 1 - 1 * 30 * 24 * 60 minutes, maximum value is 43200 minutes * *@return error
func (*RongCloud) BlockGetList ¶
func (rc *RongCloud) BlockGetList() (BlockListResult, error)
BlockGetList Get the blocklist of a user
*@return QueryBlockUserResult error
func (*RongCloud) BlockRemove ¶
BlockRemove Remove a user from the blocklist
*@param id: User ID. * *@return error
func (*RongCloud) ChangeURI ¶ added in v3.1.2
func (rc *RongCloud) ChangeURI()
changeURI automatically switches the API server address
func (*RongCloud) ChatRoomBan ¶ added in v3.2.19
func (rc *RongCloud) ChatRoomBan(chatroomId string, options ...ChatroomOption) error
Mute all users in the chatroom
func (*RongCloud) ChatRoomBanAdd ¶
func (rc *RongCloud) ChatRoomBanAdd(members []string, minute uint, options ...ChatroomOption) error
ChatRoomBanAdd Add a global mute for the chatroom
*@param members: The list of members, with a maximum of 20. *@param minute: Mute duration, range: 1 - 1 * 30 * 24 * 60 minutes. * *@return error
func (*RongCloud) ChatRoomBanCheck ¶ added in v3.2.19
Check the mute all status of a chatroom
func (*RongCloud) ChatRoomBanGetList ¶
func (rc *RongCloud) ChatRoomBanGetList() ([]ChatRoomUser, error)
ChatRoomBanGetList Get the list of globally muted users in the chatroom
*@return []ChatRoomUser error
func (*RongCloud) ChatRoomBanQuery ¶ added in v3.2.19
Query the list of muted chatrooms
func (*RongCloud) ChatRoomBanRemove ¶
func (rc *RongCloud) ChatRoomBanRemove(members []string, options ...ChatroomOption) error
ChatRoomBanRemove Unmute all chatrooms
*@param members: Member list, up to 20 members. * *@return error
func (*RongCloud) ChatRoomBanRollback ¶ added in v3.2.19
func (rc *RongCloud) ChatRoomBanRollback(chatroomId string, options ...ChatroomOption) error
Rollback mute all chatrooms
func (*RongCloud) ChatRoomBlockAdd ¶
func (rc *RongCloud) ChatRoomBlockAdd(id string, members []string, minute uint, options ...ChatroomOption) error
ChatRoomBlockAdd adds members to the chatroom blocklist *
* * @param id: The ID of the chatroom. * @param members: A list of members to be blocked. * @param minute: The duration of the block in minutes, with a maximum value of 43200 minutes. * * @return error
func (*RongCloud) ChatRoomBlockGetList ¶
func (rc *RongCloud) ChatRoomBlockGetList(id string) (ChatRoomResult, error)
ChatRoomBlockGetList Query the list of banned chatroom members
*@param id: The ID of the chatroom. * *@return ChatRoomResult error
func (*RongCloud) ChatRoomBlockRemove ¶
func (rc *RongCloud) ChatRoomBlockRemove(id string, members []string, options ...ChatroomOption) error
ChatRoomBlockRemove Remove banned users from the chatroom
* *@param id: Chatroom ID. *@param members: List of users. * *@return error
func (*RongCloud) ChatRoomBroadcast ¶
func (rc *RongCloud) ChatRoomBroadcast(senderID, objectName string, msg rcMsg, isIncludeSender ...string) error
ChatRoomBroadcast Broadcasts a message to all chatrooms in the application. This feature requires the Dedicated Cloud service. (Sends a message as a user to a group, with a maximum message size of 128k. The maximum sending rate is 20 messages per second.)
*@param senderID: The sender's user ID. *@param objectName: The message type. *@param msg: The message content. * @param isIncludeSender: 0 or 1. *@return error
func (*RongCloud) ChatRoomCreate ¶
ChatRoomCreate Create a chatroom
*@param id: the ID of the chatroom to create; *@param name: the name of the chatroom to create. * *@return error
func (*RongCloud) ChatRoomCreateNew ¶ added in v3.2.20
func (rc *RongCloud) ChatRoomCreateNew(chatroomId string, options ...ChatroomOption) error
Create a chatroom
func (*RongCloud) ChatRoomDemotionAdd ¶
ChatRoomDemotionAdd Add chatroom message priority
- @param objectName: List of message types, up to 20.
- @return err
func (*RongCloud) ChatRoomDemotionGetList ¶
ChatRoomDemotionGetList Get the list of downgraded messages in the chatroom
- @return []string error
func (*RongCloud) ChatRoomDemotionRemove ¶
ChatRoomDemotionRemove Remove the downgraded messages in the chatroom
- @param objectName: List of message types.
- @return err
func (*RongCloud) ChatRoomDestroy ¶
ChatRoomDestroy Destroys a chatroom *
* *@param id: The ID of the chatroom to be destroyed. * *@return error
func (*RongCloud) ChatRoomDestroySet ¶ added in v3.2.20
Set the chatroom destruction type
func (*RongCloud) ChatRoomDistributionResume ¶
ChatRoomDistributionResume Resumes message distribution in a chatroom
- @param id: The chatroom ID.
- @return error
func (*RongCloud) ChatRoomDistributionStop ¶
ChatRoomDistributionStop Stops message distribution in a chatroom (This method allows you to control whether messages in a chatroom are distributed. Once distribution is stopped, messages sent by users in the chatroom will not be forwarded to other users by the RongCloud server.)
- @param id: The chatroom ID.
- @return error
func (*RongCloud) ChatRoomEntryBatchSet ¶ added in v3.2.20
func (rc *RongCloud) ChatRoomEntryBatchSet(chatroomId string, autoDelete int, entryOwnerId string, entryInfo map[string]interface{}) error
Batch set chatroom custom attributes (KV)
func (*RongCloud) ChatRoomEntryQuery ¶
func (rc *RongCloud) ChatRoomEntryQuery(chatRoomID string, keys ...string) ([]ChatRoomAttr, error)
ChatRoomEntryQuery Query custom attributes of a chatroom *
- @param ChatRoomID The ID of the chatroom
- @param keys Specify the keys to retrieve from the chatroom. Up to 100 keys can be specified. If empty, all keys will be retrieved. *
- @return []ChatRoomAttr List of attributes
- @return error Error
func (*RongCloud) ChatRoomEntryRemove ¶
ChatRoomEntryRemove Remove custom attributes of a chatroom *
- @param chatRoomID The ID of the chatroom
- @param userID The ID of the user performing the operation. It can be set by a non-chatroom user via Server API.
- @param key The name of the chatroom attribute. The key supports a combination of uppercase and lowercase letters, numbers, and special characters + = - _. It is case-sensitive with a maximum length of 128 characters. *
- @return error
func (*RongCloud) ChatRoomEntrySet ¶
ChatRoomEntrySet Sets custom attributes for a chatroom *
- @param chatRoomID The ID of the chatroom
- @param userID The ID of the user performing the operation. Can be set via Server API by non-chatroom users.
- @param key The name of the chatroom attribute. Supports uppercase and lowercase letters, numbers, and special characters + = - _. Case sensitive. Maximum length: 128 characters
- @param value The value of the chatroom attribute. Maximum length: 4096 characters
- @param autoDelete Whether to delete this key after the user exits the chatroom. true: delete this key; false: do not delete this key after the user exits *
- @retrun error
func (*RongCloud) ChatRoomGagAdd ¶
func (rc *RongCloud) ChatRoomGagAdd(id string, members []string, minute uint, options ...ChatroomOption) error
ChatRoomGagAdd Mute a user in the chatroom (In the App, if you do not want a specific user to send messages in the chatroom, you can mute the user. The muted user can still receive and view messages in the chatroom but cannot send messages.)
* *@param id: Chatroom ID. *@param members: List of users to be muted. *@param minute: Duration of the mute in minutes, with a maximum value of 43200 minutes. (Required) * *@return error
func (*RongCloud) ChatRoomGagGetList ¶
func (rc *RongCloud) ChatRoomGagGetList(id string) ([]ChatRoomUser, error)
ChatRoomGagGetList Query the list of muted chatroom members
- @param id: Chatroom ID. (Required) *
- @return []ChatRoomUser error
func (*RongCloud) ChatRoomGagRemove ¶
func (rc *RongCloud) ChatRoomGagRemove(id string, members []string, options ...ChatroomOption) error
ChatRoomGagRemove Remove the gag from chatroom members
- @param id: The ID of the chatroom.
- @param members: The list of members to remove the gag from. *
- @return error
func (*RongCloud) ChatRoomGet ¶
func (rc *RongCloud) ChatRoomGet(id string, count, order int) (ChatRoomResult, error)
ChatRoomGet Query chatroom members
*@param id: The ID of the chatroom to query. *@param count: The number of chatroom members to retrieve, with a maximum limit of 500. If exceeded, only 500 members will be returned. *@param order: The order in which members joined the chatroom. 1 for ascending order by join time, 2 for descending order by join time. * *@return ChatRoomResult error
func (*RongCloud) ChatRoomGetNew ¶ added in v3.2.20
func (rc *RongCloud) ChatRoomGetNew(chatroomId string) (ChatRoomGetResult, error)
Query chatroom information
func (*RongCloud) ChatRoomIsExist ¶
func (rc *RongCloud) ChatRoomIsExist(id string, members []string) ([]ChatRoomUser, error)
ChatRoomIsExist checks if users exist in a chatroom
- @param id: The ID of the chatroom to query.
- @param members: A list of members to check, with a maximum of 1000 members per request. *
- @return ChatRoomResult error
func (*RongCloud) ChatRoomKeepAliveAdd ¶
ChatRoomKeepAliveAdd Add a chatroom to keepalive list
*@param id: Chatroom ID. *@return error
func (*RongCloud) ChatRoomKeepAliveGetList ¶
ChatRoomKeepAliveGetList Get the list of keepalive chatrooms
*@param id: Chatroom ID. *@return []string error
func (*RongCloud) ChatRoomKeepAliveRemove ¶
ChatRoomKeepAliveRemove Remove a chatroom from keepalive list
*@param id: Chatroom ID. *@return error
func (*RongCloud) ChatRoomMuteMembersAdd ¶
func (rc *RongCloud) ChatRoomMuteMembersAdd(id string, members []string, minute uint, options ...ChatroomOption) error
ChatRoomMuteMembersAdd Adds muted members to a chatroom (In the app, if you want to prevent a user from sending messages in a chatroom, you can mute the user. Muted users can still receive and view messages in the chatroom but cannot send messages.)
* *@param id: The chatroom ID. *@param members: The list of users to be muted. *@param minute: The duration of the mute in minutes, with a maximum value of 43200 minutes. (Required) * *@return error
func (*RongCloud) ChatRoomMuteMembersGetList ¶
func (rc *RongCloud) ChatRoomMuteMembersGetList(id string) ([]ChatRoomUser, error)
ChatRoomMuteMembersGetList Retrieves the list of muted members in a chatroom.
*@param id: The ID of the chatroom. (Required) * *@return []ChatRoomUser error
func (*RongCloud) ChatRoomMuteMembersRemove ¶
func (rc *RongCloud) ChatRoomMuteMembersRemove(id string, members []string, options ...ChatroomOption) error
ChatRoomMuteMembersRemove Removes muted members from the chatroom
*@param id: The ID of the chatroom. *@param members: List of members to unmute * *@return error
func (*RongCloud) ChatRoomQuery ¶
ChatRoomQuery Query basic information of a chatroom *
@param chatRoomID The ID of the chatroom to query
@return []ChatRoom Array of chatroom information
@return error Error message *
func (*RongCloud) ChatRoomRecall ¶
func (rc *RongCloud) ChatRoomRecall(userId string, targetId string, messageId string, sentTime int, options ...MsgOption) error
*
- @name: ChatRoomRecall
- @test:
- @msg: Message Recall - Chatroom
- @param string userId
- @param string targetId
- @param string messageId
- @param int sentTime
- @param int isAdmin
- @param int isDelete
- @param bool disablePush
- @return: error
func (*RongCloud) ChatRoomSend ¶
func (rc *RongCloud) ChatRoomSend(senderID string, targetID []string, objectName string, msg rcMsg, isPersisted, isIncludeSender int) error
ChatRoomSend sends a message to a chatroom. (A user can send a message to a group. The maximum size of a single message is 128k. A user can send up to 20 messages per second and up to 3 groups at a time. For example, sending a message to 3 groups counts as 3 messages.)
*@param senderID: The sender's user ID. *@param targetID: The target chatroom IDs. It is recommended not to exceed 10 chatrooms. *@param objectName: The message type. *@param msg: The message content. * *@return error
func (*RongCloud) ChatRoomUserBanWhitelistAdd ¶ added in v3.2.19
func (rc *RongCloud) ChatRoomUserBanWhitelistAdd(chatroomId string, members []string, options ...ChatroomOption) error
Add users to the chatroom mute exceptions list
func (*RongCloud) ChatRoomUserBanWhitelistQuery ¶ added in v3.2.19
Query the chatroom mute exceptions list
func (*RongCloud) ChatRoomUserBanWhitelistRollback ¶ added in v3.2.19
func (rc *RongCloud) ChatRoomUserBanWhitelistRollback(chatroomId string, members []string, options ...ChatroomOption) error
Remove users from the chatroom mute exceptions list
func (*RongCloud) ChatRoomUserWhitelistAdd ¶
ChatRoomUserWhitelistAdd Add a user to the chatroom allowlist
*@param id: Chatroom ID. *@param members: The allowlist, with a maximum of 5 members. *@return error
func (*RongCloud) ChatRoomUserWhitelistGetList ¶
ChatRoomUserWhitelistGetList Get the allowlist of users in a chatroom
- @param id: The ID of the chatroom.
- @return []string error
func (*RongCloud) ChatRoomUserWhitelistRemove ¶
ChatRoomUserWhitelistRemove Removes users from the allowlist
*@param id: The chatroom ID. *@param members: The allowlist, with a maximum of 5 members. *@return error
func (*RongCloud) ChatRoomWhitelistAdd ¶
ChatRoomWhitelistAdd Add a message to the chatroom allowlist
*@param objectNames: List of message types. *@return error
func (*RongCloud) ChatRoomWhitelistGetList ¶
ChatRoomWhitelistGetList Get the chatroom message allowlist
*@return []string error
func (*RongCloud) ChatRoomWhitelistRemove ¶
ChatRoomWhitelistRemove Remove a message from the chatroom allowlist
*@param objectNames: List of message types. *@return error
func (*RongCloud) ChatUserExist ¶ added in v3.2.12
ChatUserExist :/chatroom/user/exist.json Check if a user has joined a chatroom *
@param: chatroomId, the ID of the chatroom to query @param: userId, the ID of the user to query response: byte array
*//
func (*RongCloud) ChatUserExistResObj ¶ added in v3.2.12
func (rc *RongCloud) ChatUserExistResObj(chatroomId, userId string) (ChatUserExistObj, error)
ChatUserExistResObj :/chatroom/user/exist.json Check if a user has joined a chatroom *
@param: chatroomId, the ID of the chatroom to query @param: userId, the ID of the user to query response: ChatUserExistObj
*//
func (*RongCloud) ConversationGet ¶
func (rc *RongCloud) ConversationGet(conversationType ConversationType, userID, targetID string, options ...MsgOption) (int, error)
ConversationGet Get Conversation Do Not Disturb Status
* @param conversationType: Conversation type, can be PRIVATE, GROUP, DISCUSSION, or SYSTEM. * @param userID: User ID to set. * @param targetID: Target ID to be muted. * * @return int error
func (*RongCloud) ConversationMute ¶
func (rc *RongCloud) ConversationMute(conversationType ConversationType, userID, targetID string, options ...MsgOption) error
ConversationMute Mutes push notifications for a specific conversation of a user.
*@param conversationType: Specifies the conversation type: PRIVATE, GROUP, DISCUSSION, SYSTEM. *@param userID: The user ID for whom the conversation is being muted. *@param targetID: The target ID of the conversation to be muted. * *@return error
func (*RongCloud) ConversationNotificationGet ¶ added in v3.2.8
func (rc *RongCloud) ConversationNotificationGet(ct ConversationType, requestId, targetId, busChannel string) (int, error)
ConversationNotificationGet Retrieves the Do Not Disturb status for a specified conversation
func (*RongCloud) ConversationNotificationSet ¶ added in v3.2.8
func (rc *RongCloud) ConversationNotificationSet(ct ConversationType, requestId, targetId, busChannel string, isMuted, unPushLevel int) error
ConversationNotificationSet Sets the Do Not Disturb status for a specified conversation
func (*RongCloud) ConversationTop ¶ added in v3.2.9
func (rc *RongCloud) ConversationTop(conversationType ConversationType, userId, targetId, setTop string) error
ConversationTop : Pin a conversation * @param userId : Required User ID, the user to whom the conversation belongs @param conversationType: Optional Conversation type. Supported conversation types include: 1 (one-to-one chat), 3 (group chat), 6 (system conversation). @param targetId: Required Target ID to be set, which varies depending on the conversation type (user ID for one-to-one chat, group ID for group chat, system target ID for system conversation). @param setTop : Required true to pin, false to unpin.
@return error */
func (*RongCloud) ConversationTypeNotificationGet ¶ added in v3.2.8
func (rc *RongCloud) ConversationTypeNotificationGet(ct ConversationType, requestId string) (int, error)
ConversationTypeNotificationGet Queries the Do Not Disturb status for a specified conversation type (one-to-one chat, group chat, ultra group, system message) of a user.
func (*RongCloud) ConversationTypeNotificationSet ¶ added in v3.2.8
func (rc *RongCloud) ConversationTypeNotificationSet(ct ConversationType, requestId string, unPushLevel int) error
ConversationTypeNotificationSet Sets the Do Not Disturb status for a specific conversation type (one-to-one chat, group chat, ultra group, system message).
func (*RongCloud) ConversationUnmute ¶
func (rc *RongCloud) ConversationUnmute(conversationType ConversationType, userID, targetID string, options ...MsgOption) error
ConversationUnmute Sets the user to receive push notifications for a specific conversation
*@param conversationType: Conversation type, PRIVATE, GROUP, DISCUSSION, SYSTEM. *@param userID: The user ID to set. *@param targetID: The target ID to unmute. * *@return error
func (*RongCloud) DeleteMessageExpansion ¶ added in v3.2.8
func (rc *RongCloud) DeleteMessageExpansion(msgUID, userId, conversationType, targetId string, isSyncSender int, keys ...string) error
DeleteMessageExpansion Deletes message expansion
func (*RongCloud) GetHttpTransport ¶ added in v3.2.0
func (rc *RongCloud) GetHttpTransport() http.RoundTripper
func (*RongCloud) GroupCreate ¶
GroupCreate Creates a group and adds users to it. Users will receive messages from this group. A single user can join up to 500 groups, and each group can have up to 3000 members. There is no limit to the number of groups within an App. Note: This method is an alias for the /group/join method.
*@param id: The group ID, with a maximum length of 30 characters. It is recommended to use a combination of letters and numbers. *@param name: The group name, with a maximum length of 60 characters. *@param members: The list of users to be added to the group. * *@return error
func (*RongCloud) GroupDismiss ¶
GroupDismiss Dismiss group method
*@param id: Group ID, maximum length of 30 characters, recommended to use a mix of letters and numbers. *@param member: Group owner or administrator. * *@return error
func (*RongCloud) GroupGagAdd ¶
GroupGagAdd Adds a muted group member (In the app, if you don't want a user to speak in the group, you can mute the user in the group. The muted user can receive and view group chat messages but cannot send messages.)
*@param id: Group ID. *@param members: List of muted group members. *@param minute: Mute duration in minutes, with a maximum value of 43200 minutes. * *@return error
func (*RongCloud) GroupGagList ¶
GroupGagList Queries the list of muted members in a group.
*@param id: The group ID.
*@return Group error
func (*RongCloud) GroupGagRemove ¶
GroupGagRemove Removes the gag from group members
*@param id: The group ID. *@param members: The list of group members to un-gag. * *@return error
func (*RongCloud) GroupGet ¶
GroupGet Queries the members of a group.
*@param id: The ID of the group. * *@return Group error
func (*RongCloud) GroupJoin ¶
GroupJoin Adds users to a specified group in batch, enabling them to receive messages from the group.
*@param groupId: The ID of the group to join. *@param groupName: The name of the group, with a maximum length of 60 characters. *@param memberId: The users to be added to the group, with a maximum of 1000 users. * *@return error
func (*RongCloud) GroupMuteAllMembersAdd ¶
GroupMuteAllMembersAdd Mutes all members in a group, preventing them from sending messages. If certain users need to be allowed to send messages, they can be added to the group's mute exceptions list.
*@param members: List of group members to be muted. * *@return error
func (*RongCloud) GroupMuteAllMembersGetList ¶
func (rc *RongCloud) GroupMuteAllMembersGetList(groupIds []string, page int, size int) (GroupInfo, error)
GroupMuteAllMembersGetList Query the mute list for all groups
*@param groupIds: Group ID. You can specify one or multiple groups in a single query, with a maximum of 20 groups per query. *@param page: Page number. If this parameter is passed, the groupId parameter becomes invalid. If the groupId parameter is not passed, the default value is 1. *@param size: Number of items per page. If this parameter is passed, the groupId parameter becomes invalid. If the groupId parameter is not passed, the default value is 50, with a maximum of 200. * *@return Group error
func (*RongCloud) GroupMuteAllMembersRemove ¶
func (*RongCloud) GroupMuteMembersAdd ¶
GroupMuteMembersAdd Adds a list of members to the group mute list (In the app, if you want to prevent a user from sending messages in the group, you can mute the user in the group. Muted users can receive and view group messages but cannot send messages.)
*@param id: The group ID. *@param members: The list of members to be muted. *@param minute: The duration of the mute in minutes, with a maximum value of 43200 minutes. * *@return error
func (*RongCloud) GroupMuteMembersGetList ¶
GroupMuteMembersGetList Retrieves the list of muted group members
*@param id: Group ID. * *@return Group error
func (*RongCloud) GroupMuteMembersRemove ¶
GroupMuteMembersRemove Removes the mute from group members
*@param id: The group ID. *@param members: The list of group members to un-mute. * *@return error
func (*RongCloud) GroupMuteWhiteListUserAdd ¶
GroupMuteWhiteListUserAdd When a group is muted, if certain users need to be allowed to speak, you can add them to the group's mute allowlist. The group mute allowlist only takes effect when the group is set to mute all members.
*@param id: Group ID. *@param members: List of members to be allowed to speak. * *@return error
func (*RongCloud) GroupMuteWhiteListUserGetList ¶
GroupMuteWhiteListUserGetList Query the allowlist of muted users in a group.
*@param id: The group ID. * *@return error
func (*RongCloud) GroupMuteWhiteListUserRemove ¶
GroupMuteWhiteListUserRemove Remove users from the group mute allowlist.
*@param id: Group ID. *@param members: List of members to be removed from the allowlist. * *@return error
func (*RongCloud) GroupQuit ¶
GroupQuit Batch exit group method (Remove users from the group, they will no longer receive messages from this group.)
*@param id: The group ID to exit. *@param member: The group members to exit, with a maximum of 1000 members. * *@return error
func (*RongCloud) GroupRecall ¶
func (rc *RongCloud) GroupRecall(senderID, targetID, uID string, sentTime int, options ...MsgOption) error
GroupRecall Recall a group chat message
* @param senderID: The sender's user ID. * @param targetID: The recipient's user ID. * @param uID: The unique identifier of the message, returned by the SDK after the message is sent successfully. * @param sentTime: The timestamp when the message was sent, returned by the SDK after the message is sent successfully. * @param int isAdmin * @param int isDelete * @param bool disablePush * @return error
func (*RongCloud) GroupRemarksDel ¶ added in v3.2.11
GroupRemarksDel :/group/remarks/del.json Delete the push alias of a group member * @param : userId : The user ID of the group member @param : groupId : The group ID
*/
func (*RongCloud) GroupRemarksGet ¶ added in v3.2.11
GroupRemarksGet :/group/remarks/get.json Query the push remark name of a group member * @param : userId : The user ID of the group member @param : groupId : The group ID response : Byte array Documentation: https://doc.rongcloud.cn/imserver/server/v1/group/get-remark-for-group-push */
func (*RongCloud) GroupRemarksGetResObj ¶ added in v3.2.12
func (rc *RongCloud) GroupRemarksGetResObj(userId string, groupId string) (GroupRemarksGetObj, error)
GroupRemarksGetResObj : /group/remarks/get.json Query the push alias name for a group member * @param : userId : The user ID of the group member @param : groupId : The group ID response : byte array Documentation: https://doc.rongcloud.cn/imserver/server/v1/group/get-remark-for-group-push */
func (*RongCloud) GroupRemarksSet ¶ added in v3.2.11
GroupRemarksSet :/group/remarks/set.json Set the push alias for a specific group member * @param : userId : The user ID of the group member @param : groupId : The group ID @param : remark : The push alias for the group member
*/
func (*RongCloud) GroupSend ¶
func (rc *RongCloud) GroupSend(senderID string, targetID, userID []string, objectName string, msg rcMsg, pushContent string, pushData string, isPersisted, isIncludeSender int, options ...MsgOption) error
GroupSend Sends a group message (sends a message to a group as a user. The maximum size of a single message is 128k. The maximum number of messages that can be sent per second is 20. The maximum number of groups that can be sent to at a time is 3. For example, sending a message to 3 groups counts as 3 messages.)
- @param senderID: The sender's user ID.
- @param targetID: The target group ID.
- @param objectName: The message type.
- @param userID: The targeted message feature allows sending messages to one or more specified users in the group, while other users in the group will not receive the message. This parameter is valid when targetID is a group. Note: If the "Cloud Storage for One-to-One and Group Messages" feature is enabled, targeted messages will not be stored in the cloud. This feature can be used when sending read receipts to some users in the group. (Optional)
- @param msg: The message content to be sent.
- @param pushContent: Defines the displayed Push content. If the objectName is a built-in RongCloud message type, the user will definitely receive a Push notification after sending. If it is a custom message, pushContent is the displayed Push content of the custom message. If this parameter is not provided, the user will not receive a Push notification.
- @param pushData: For iOS platforms, this is the additional data attached to the Push notification payload. For Android clients, the corresponding field name is pushData.
- @param isPersisted: When the current version has a new custom message and the old version does not have this custom message, this parameter determines whether the old version client will store the message after receiving it. 0 means not to store, 1 means to store. The default is 1 (store the message).
- @param isIncludeSender: Whether the sender will receive the message. 0 means not to receive, 1 means to receive. The default is 0 (not to receive).
- @param options: Other extended parameters needed for sending the message. *
- @return error
func (*RongCloud) GroupSendMention ¶
func (rc *RongCloud) GroupSendMention(senderID string, targetID []string, objectName string, msg MentionMsgContent, pushContent, pushData string, isPersisted, isIncludeSender, isMentioned, contentAvailable int, options ...MsgOption) error
GroupSendMention Sends a group @ message
- @param senderID: The sender's user ID.
- @param targetID: The recipient group ID, with a maximum of 3 groups.
- @param objectName: The message type.
- @param msg: The message content to be sent.
- @param pushContent: Defines the push notification content to be displayed. If the objectName is a built-in RongCloud message type, the user will always receive a push notification. For custom messages, pushContent defines the push notification content. If not provided, the user will not receive a push notification.
- @param pushData: For iOS platforms, this is additional data attached to the push notification payload. For Android clients, the corresponding field name is pushData.
- @param isPersisted: Determines whether older versions of the client store the message when a new custom message type is introduced. 0 means do not store, 1 means store. Default is 1.
- @param isIncludeSender: Determines whether the sender also receives the message. 0 means do not receive, 1 means receive. Default is 0.
- @param isMentioned: Indicates whether this is an @ message. 0 means a regular message, 1 means an @ message. Default is 0. When set to 1, the content parameter must include mentionedInfo with the detailed content of the @ message. When set to 0, mentionedInfo is not required. If toUserId is specified, the @ user must be included in toUserId.
- @param contentAvailable: For iOS platforms, this enables silent push notifications when the SDK is in the background. This is a push method introduced in iOS7 that allows the app to execute code in the background upon receiving the notification. 1 means enabled, 0 means disabled. Default is 0. *
- @return error
func (*RongCloud) GroupStatusSend ¶ added in v3.2.6
func (rc *RongCloud) GroupStatusSend(senderID string, toGroupIds []string, objectName string, msg rcMsg, verifyBlacklist int, isIncludeSender int, options ...MsgOption) error
Send group status message senderID: The sender's user ID. toGroupIds: The recipient group IDs. Providing multiple parameters allows sending messages to multiple groups, with a maximum of 3 groups. objectName: The message type. msg: The content of the message to be sent. verifyBlacklist: Whether to filter the sender's blocklist. 0 indicates no filtering, 1 indicates filtering. Default is 0 (no filtering). isIncludeSender: Whether the sender should receive the message. 0 indicates not receiving, 1 indicates receiving. Default is 0 (not receiving).
func (*RongCloud) GroupSync ¶
GroupSync Synchronizes the groups a user belongs to. This method is used to ensure that the group information of a user in the application is consistent with the information known by RongCloud. It is primarily used when connecting to the RongCloud server for the first time.
*@param id: The user ID whose group information is to be synchronized. (Required) *@param groups: The list of groups the user belongs to. * *@return error
func (*RongCloud) GroupUpdate ¶
GroupUpdate Refreshes group information
*@param id: Group ID. *@param name: Group name. * *@return error
func (*RongCloud) GroupUserGagAdd ¶ added in v3.2.11
GroupUserGagAdd : Add muted members /group/user/gag/add.json * @param userId: User ID, up to 20 users can be added at a time. @param groupId: Group ID, if empty, the user will be muted in all groups they join. @param minute: Mute duration in minutes, maximum value is 43200 minutes, 0 means permanent mute. */
func (*RongCloud) GroupUserQuery ¶ added in v3.2.11
GroupUserQuery : Query all groups that a user has joined based on the user ID, returning the group ID and group name. * @param userId: User ID Documentation: https://doc.rongcloud.cn/imserver/server/v1/group/query-group-by-user */
func (*RongCloud) GroupUserQueryResObj ¶ added in v3.2.12
func (rc *RongCloud) GroupUserQueryResObj(userId string) (GroupUserQueryObj, error)
GroupUserQueryResObj : Query all groups that a user has joined based on the user ID, returning the group ID and group name. * @param userId: User ID response: GroupUserQueryObj Documentation: https://doc.rongcloud.cn/imserver/server/v1/group/query-group-by-user */
func (*RongCloud) HistoryGet ¶
HistoryGet retrieves the URL of the historical message log file by hour, which includes all messages generated by the application within that hour. The message log file will be deleted from RongCloud servers after 3 days, regardless of whether it has been downloaded.
* @param date: Specifies the hour, e.g., 2018030210 represents the data generated from 10:00 to 11:00 on March 2, 2018. * * @return History error
func (*RongCloud) HistoryRemove ¶
HistoryRemove Deletes historical message log files
*@param date: Specifies the hour, e.g., 2018030210 represents the data generated from 10:00 to 11:00 on March 2, 2018 * *@return error
func (*RongCloud) MessageBroadcastRecall ¶
func (rc *RongCloud) MessageBroadcastRecall(userId string, objectName string, content BroadcastRecallContent) error
*
- @name: MessageBroadcastRecall
- @test:
- @msg: Broadcast message recall
- @param string userId
- @param string objectName
- @param BroadcastRecallContent content
- @return: error
func (*RongCloud) MessageExpansionDel ¶ added in v3.2.11
func (rc *RongCloud) MessageExpansionDel(msgUID, userId, conversationType, targetId, extraKey string, isSyncSender int) error
MessageExpansionDel : Delete message expansion /message/expansion/delete.json * @param msgUID: The unique identifier of the message, which can be obtained through the full message routing feature. For details, see Post-messaging Callback. @param userId: The user ID of the operator, i.e., the user ID that needs to delete the extended information for the specified message (msgUID). @param conversationType: The type of conversation. Supported conversation types include: 1 (one-to-one chat), 3 (group chat). @param targetId: The target ID, which could be a user ID or group ID depending on the conversationType. @param extraKeyVal: The custom extended content of the message, in JSON format, set as Key-Value pairs, e.g., {"type":"3"}. A single message can have up to 300 extended information items, and a maximum of 100 can be set at once. @param isSyncSender: The operation will generate an "extension operation message". This field specifies whether the sender of the "extension operation message" can receive this message on the client. For details, see https://doc.rongcloud.cn/imserver/server/v1/message/expansion#delete */
func (*RongCloud) MessageExpansionSet ¶ added in v3.2.11
func (rc *RongCloud) MessageExpansionSet(msgUID, userId, conversationType, targetId, extraKeyVal string, isSyncSender int) error
MessageExpansionSet : Set message expansion /message/expansion/set.json * @param msgUID: The unique identifier of the message, which can be obtained through the full message routing feature. See full message routing for details. @param userId: The user ID of the operator, i.e., the user ID that needs to set the extended information for the specified message (msgUID). @param conversationType: The conversation type. Supported conversation types include: 1 (one-to-one chat), 3 (group chat). @param targetId: The target ID, which can be a user ID or group ID depending on the conversationType. @param extraKeyVal: The custom extended content of the message, in JSON format, set in Key-Value pairs, e.g., {"type":"3"}. A single message can have up to 300 extended information items, and a maximum of 100 can be set at once. @param isSyncSender: Specifies whether the sender of the "expansion operation message" can receive this message on the client. https://doc.rongcloud.cn/imserver/server/v1/message/expansion#set */
func (*RongCloud) OnlineBroadcast ¶ added in v3.2.4
func (rc *RongCloud) OnlineBroadcast(fromUserId string, objectName string, content string) ([]byte, error)
OnlineBroadcast Sends a message to all online users in the application. When users are actively using the app, the message will be displayed in the chat UI and conversation list, with the conversation type set to SYSTEM. @param fromUserId The sender's user ID. @param objectName The message type. @param content The message content.
func (*RongCloud) OnlineStatusCheck ¶
* @param userID: User ID, maximum length of 64 bytes. It is the unique identifier of the user within the App, and must be unique within the same App. Duplicate user IDs will be treated as the same user. * * @return int, error
func (*RongCloud) PrivateRecall ¶
func (rc *RongCloud) PrivateRecall(senderID, targetID, uID string, sentTime int, options ...MsgOption) error
PrivateRecall is used to recall a one-to-one chat message.
* *@param senderID: The sender's user ID. *@param targetID: The receiver's user ID. *@param uID: The unique identifier of the message, returned by the SDK after a successful message send. *@param sentTime: The timestamp when the message was sent, returned by the SDK after a successful message send. * @param int isAdmin * @param int isDelete * @param bool disablePush *@return error
func (*RongCloud) PrivateSend ¶
func (rc *RongCloud) PrivateSend(senderID string, targetID []string, objectName string, msg rcMsg, pushContent, pushData string, count, verifyBlacklist, isPersisted, isIncludeSender, contentAvailable int, options ...MsgOption) error
PrivateSend Sends a one-to-one chat message (a single user can send a message to multiple users, with a maximum message size of 128k. The maximum number of messages that can be sent per minute is 6000, and the maximum number of users that can be sent to in a single request is 1000. For example, sending to 1000 users counts as 1000 messages.)
*@param senderID: The sender's user ID. *@param targetID: The recipient user ID. This allows sending messages to multiple users, with a maximum of 1000 users per request. *@param objectName: The type of message being sent. *@param msg: Message content. *@param pushContent: Defines the displayed push notification content.If the objectName is a built-in message type of RongCloud, the user will definitely receive a push notification after sending.For custom messages, pushContent is the displayed push notification content of the custom message.If not provided, the user will not receive a push notification. *@param pushData: For iOS platforms, this is the additional payload attached to the push notification. For Android clients, the corresponding field name is pushData. *@param count: For iOS platforms, this controls the display count of unread messages in push notifications.It is only effective when toUserId is a single user ID. *@param verifyBlacklist: Whether to filter the sender's blocklist. 0 means no filtering, 1 means filtering. Default is 0 (no filtering). *@param isPersisted: When the current version has a new custom message and the older version does not, whether the older version client should store the message after receiving it. 0 means no storage, 1 means storage.Default is 1 (store the message). *@param isIncludeSender: Whether the sending user should receive the message.0 means no reception, 1 means reception.Default is 0 (no reception). *@param contentAvailable: For iOS platforms, this enables silent push notifications when the SDK is in the background suspended state.This is a push notification method introduced after iOS7.It allows the app to run a piece of code in the background immediately after receiving the notification.1 means enabled, 0 means disabled.Default is 0. *@param options: Other extended parameters needed for sending messages. * *@return error
func (*RongCloud) PrivateSendTemplate ¶
func (rc *RongCloud) PrivateSendTemplate(senderID, objectName string, template TXTMsg, content []TemplateMsgContent, options ...MsgOption) error
PrivateSendTemplate Sends different content messages to multiple users
- @param senderID: The sender's user ID.
- @param objectName: The type of message to be sent.
- @param template: The message template.
- @param content: The data content, including the message content and recipients.
- @param options: Additional extended parameters required for sending the message. *
- @return error
func (*RongCloud) PrivateStatusSend ¶ added in v3.2.6
func (rc *RongCloud) PrivateStatusSend(senderID string, targetID []string, objectName string, msg rcMsg, verifyBlacklist int, isIncludeSender int, options ...MsgOption) error
Send private status message senderID: The sender's user ID. targetID: The recipient user ID. Supports sending messages to multiple users, with a maximum of 1000 users per request. objectName: The message type. msg: The content of the message to be sent. verifyBlacklist: Whether to filter the sender's blocklist. 0 means no filtering, 1 means filtering. Default is 0 (no filtering). isIncludeSender: Whether the sender should receive the message. 0 means no, 1 means yes. Default is 0 (no).
func (*RongCloud) PrivateURI ¶
PrivateURI sets the API address for private cloud
func (*RongCloud) PushCustom ¶ added in v3.2.12
PushCustom: Broadcast to Users with Push-only Notification /push/custom.json
@param: p: Refer to the parameters passed in the TestRongCloud_PushCustom unit test @param: platform []string Target operating systems, at least one of iOS or Android must be specified. If messages need to be pushed to both systems, both must be filled. @param: audience string Push conditions, including: tag, tag_or, packageName, is_to_all. @param: notification string Push notification content by operating system type. If both iOS and Android are set in platform but only iOS content is set in notification, the Android push content will default to the initial alert setting. Refer to the notification structure for details. Request follows the PushCustomData struct: You can construct the above as a map or struct for JSON serialization before calling PushCustom. Response: Returns a byte array Documentation: https://doc.rongcloud.cn/imserver/server/v1/push-plus#push_custom
func (*RongCloud) PushCustomObj ¶ added in v3.2.13
func (rc *RongCloud) PushCustomObj(data PushCustomData) (PushCustomObj, error)
PushCustomObj : Push-only Notification for all users /push/custom.json *
@param: p:Refer to the parameters passed in the TestRongCloud_PushCustom unit test @param: platform []string Target operating systems, at least one of iOS or Android must be specified. If you need to send push notifications to both systems, all must be filled in. @param: audience string Push conditions, including: tag, tag_or, packageName, is_to_all. @param: notification string Push notification content by operating system type. If both iOS and Android are set in the platform, but only iOS push content is set in the notification, the Android push content will be the initial alert setting. For details, refer to the notification structure description.
Can be constructed as the above map or struct and serialized into JSON before calling PushCustom response: Return structure Documentation: https://doc.rongcloud.cn/imserver/server/v1/push-plus#push_custom *//
func (*RongCloud) PushCustomResObj ¶ added in v3.2.12
func (rc *RongCloud) PushCustomResObj(p []byte) (PushCustomObj, error)
PushCustomResObj: Broadcast to Users with Push-only Notification /push/custom.json
@param: p: Refer to the parameters passed in the TestRongCloud_PushCustom unit test @param: platform []string Target operating systems, at least one of iOS or Android must be specified. If messages need to be pushed to both systems, both must be filled. @param: audience string Push conditions, including: tag, tag_or, packageName, is_to_all. @param: notification string Push notification content by operating system type. If both iOS and Android are set in platform but only iOS content is set in notification, the Android push content will default to the initial alert setting. Refer to the notification structure for details. You can construct the above as a map or struct for JSON serialization before calling PushCustom. Request follows the PushCustomData struct: Response: Returns the struct Documentation: https://doc.rongcloud.cn/imserver/server/v1/push-plus#push_custom
func (*RongCloud) PushSend ¶
func (rc *RongCloud) PushSend(sender Sender) (PushResult, error)
PushSend This method has the same sending mechanism as the /message/broadcast broadcast message method, but allows for more sending conditions. This feature is free to use in the development environment. In the production environment, you need to enable the IM Enterprise Plan in the advanced feature settings of the developer console and then enable it in the "Broadcast Messages and Push Notifications" section before you can use it. The combined frequency of push notifications and broadcast messages is limited to 2 times per hour and 3 times per day. If you need to adjust the sending frequency, please contact us.
*@param Push: The push notification body. * *@return PushResult, error
func (*RongCloud) PushUser ¶ added in v3.2.8
func (rc *RongCloud) PushUser(notification *PushNotification, users ...string) error
PushUser Sends a Push-only Notification to specified users in the app. A Push-only Notification will be delivered to the user regardless of whether they are using the app. The notification will only appear in the notification bar and will not carry message content. After logging into the app, the user will not see this content in the chat UI, and it will not be stored in the local database.
func (*RongCloud) QueryMessageExpansion ¶ added in v3.2.8
func (rc *RongCloud) QueryMessageExpansion(msgUID string, page int) ([]MessageExpansionItem, error)
QueryMessageExpansion Retrieves message extension information Retrieves the specified message extension information based on the Message UID
func (*RongCloud) QueryWhiteList ¶
*
- @name: QueryWhiteList
- @test:
- @msg: Get the allowlist of a user (limit: 100 times per second)
- @param string userId
- @return: WhiteList error
func (*RongCloud) RemoveWhiteList ¶
*
- @name: RemoveWhiteList
- @test:
- @msg: Remove users from the allowlist (limit: 100 times per second)
- @param string userId
- @param []string whiteList
- @return: error
func (*RongCloud) SensitiveAdd ¶
SensitiveAdd Add a sensitive word
*@param keyword: Sensitive word, max length 32 characters, format: Chinese characters, numbers, letters *@param replace: Replacement for sensitive word, max length 32 characters, can be empty for blocking *@param sensitiveType: 0: Replace sensitive word, 1: Block sensitive word * *@return error
func (*RongCloud) SensitiveGetList ¶
func (rc *RongCloud) SensitiveGetList() (ListWordFilterResult, error)
SensitiveGetList Method to query the sensitive word list
*@return ListWordFilterResult error
func (*RongCloud) SensitiveRemove ¶
SensitiveRemove Method to remove a sensitive word (Removes a specific sensitive word from the sensitive word list.)
*@param keywords: You can delete up to 50 sensitive words at a time, and the changes will take effect after 2 hours. * *@return error
func (*RongCloud) SetHttpTransport ¶ added in v3.2.0
func (rc *RongCloud) SetHttpTransport(httpTransport http.RoundTripper)
Customizes HTTP parameters
func (*RongCloud) SetMessageExpansion ¶ added in v3.2.8
func (rc *RongCloud) SetMessageExpansion(msgUID, userId, conversationType, targetId string, extra map[string]string, isSyncSender int) error
SetMessageExpansion Sets message extension When sending a message, if expansion is set to true, you can set extended information for this message. Up to 100 custom attributes can be set at a time, with a maximum of 300 in total.
func (*RongCloud) SystemBroadcast ¶
func (rc *RongCloud) SystemBroadcast(senderID, objectName string, msg rcMsg, options ...MsgOption) error
SystemBroadcast Sends a message to all users in the application. It can be sent up to 2 times per hour and 3 times per day. (Sends a message to a group as a user, with a maximum message size of 128k. A maximum of 20 messages can be sent per second.)
*@param senderID: The sender's user ID. *@param objectName: The message type. *@param msg: The message content to be sent. * *@return error
func (*RongCloud) SystemRecall ¶ added in v3.2.6
func (rc *RongCloud) SystemRecall(userId string, targetId string, messageId string, sentTime int, options ...MsgOption) error
*
- @name: SystemRecall
- @test:
- @msg: Recall a message - System Conversation
- @param string userId
- @param string targetId
- @param string messageId
- @param int sentTime
- @param int isAdmin
- @param int isDelete
- @param bool disablePush
- @return: error
func (*RongCloud) SystemSend ¶
func (rc *RongCloud) SystemSend(senderID string, targetID []string, objectName string, msg rcMsg, pushContent, pushData string, count, isPersisted int, options ...MsgOption) error
SystemSend sends a system message from one user to one or multiple users. The maximum size of a single message is 128k, and the conversation type is SYSTEM.
*@param senderID: The sender's user ID. *@param targetID: The recipient user ID(s), with a maximum of 100 users. *@param objectName: The type of message being sent. *@param msg: The message content. *@param pushContent: Defines the displayed push notification content. If the objectName is a RongCloud built-in message type, the user will always receive a push notification. If it's a custom message, pushContent defines the push notification content to be displayed. If not provided, the user will not receive a push notification. *@param pushData: For iOS platforms, this is the additional data attached to the push notification payload. For Android clients, the corresponding field name is pushData. *@param count: For iOS platforms, this controls the number of unread messages displayed in the push notification. It is only effective when toUserId is a single user ID. *@param isPersisted: When a new version introduces a custom message that older versions do not support, this parameter determines whether the older client will store the message. 0 means not stored, 1 means stored. Default is 1 (store the message). *@param options: Additional extended parameters required for sending the message.
* *@return error
func (*RongCloud) SystemSendTemplate ¶
func (rc *RongCloud) SystemSendTemplate(senderID, objectName string, template TXTMsg, content []TemplateMsgContent, options ...MsgOption) error
SystemSendTemplate Sends a system message from one user to one or more users. The maximum size of a single message is 128k, and the conversation type is SYSTEM.
*@param senderID: The sender's user ID. *@param objectName: The type of message to be sent. *@param template: The message template. *@param content: The data content, including the message content and recipients. * *@return error
func (*RongCloud) TagBatchSet ¶
TagBatchSet Adds tags to users in batch for the application. If a user already has tags, adding new tags will overwrite the previous ones.
*@param t : The TagBatch struct. * *@return error
func (*RongCloud) TagGet ¶
TagGet Queries all tags for users, supporting batch queries with a maximum of 50 users per query.
*@param userIds: User IDs. * *@return error
func (*RongCloud) TagSet ¶
TagSet Adds tags to a user in the App. If a user already has tags, adding new tags will overwrite the previous tag content.
* @param tag: The Tag struct for the tag. * * @return error
func (*RongCloud) UGChannelCreate ¶ added in v3.2.8
Create a group channel
func (*RongCloud) UGChannelDelete ¶ added in v3.2.8
Delete a group channel
func (*RongCloud) UGChannelPrivateUserAdd ¶ added in v3.2.12
UGChannelPrivateUserAdd: Add users to the private channel allowlist /ultragroup/channel/private/users/add.json
groupId=ug_m_gid_lw_1&busChannel=channel001&userIds=a%2Cb%2Cc
func (*RongCloud) UGChannelPrivateUserAddResObj ¶ added in v3.2.12
func (rc *RongCloud) UGChannelPrivateUserAddResObj(groupId, busChannel, userIds string) (UGChannelPrivateUserAddObj, error)
UGChannelPrivateUserAddResObj : Add users to the private channel allowlist /ultragroup/channel/private/users/add.json
groupId=ug_m_gid_lw_1&busChannel=channel001&userIds=a%2Cb%2Cc
response: UGChannelPrivateUserAddObj
func (*RongCloud) UGChannelPrivateUserDel ¶ added in v3.2.12
UGChannelPrivateUserDel : Remove users from the private channel allowlist /ultragroup/channel/private/users/del.json
groupId=ug_m_gid_lw_1&busChannel=channel001&userIds=a%2Cb%2Cc response : byte array
func (*RongCloud) UGChannelPrivateUserDelResObj ¶ added in v3.2.12
func (rc *RongCloud) UGChannelPrivateUserDelResObj(groupId, busChannel, userIds string) (UGChannelPrivateUserDelObj, error)
UGChannelPrivateUserDelResObj : Delete private channel allowlist users /ultragroup/channel/private/users/del.json
groupId=ug_m_gid_lw_1&busChannel=channel001&userIds=a%2Cb%2Cc response: UGChannelPrivateUserDelObj
func (*RongCloud) UGChannelPrivateUserGet ¶ added in v3.2.12
func (rc *RongCloud) UGChannelPrivateUserGet(groupId, busChannel, page, pageSize string) ([]byte, error)
UGChannelPrivateUserGet : Query private channel allowlist users /ultragroup/channel/private/users/get.json
groupId=ug_m_gid_lw_1&busChannel=channel001&page=1&pageSize=1000 response: byte array
func (*RongCloud) UGChannelPrivateUserGetResObj ¶ added in v3.2.12
func (rc *RongCloud) UGChannelPrivateUserGetResObj(groupId, busChannel, page, pageSize string) (UGChannelPrivateUserGetObj, error)
UGChannelPrivateUserGetResObj : Query the allowlist users of a private channel /ultragroup/channel/private/users/get.json
groupId=ug_m_gid_lw_1&busChannel=channel001&page=1&pageSize=1000 response: UGChannelPrivateUserGetObj
func (*RongCloud) UGChannelQuery ¶ added in v3.2.8
func (rc *RongCloud) UGChannelQuery(groupId string, page, size int) (channels []UGChannelInfo, err error, requestId string)
Query group channel list
func (*RongCloud) UGChannelUserGroupBind ¶ added in v3.2.19
func (rc *RongCloud) UGChannelUserGroupBind(groupId, busChannel string, userGroupIds []string) (err error)
UGChannelUserGroupBind Bind user groups to a channel in bulk
func (*RongCloud) UGChannelUserGroupQuery ¶ added in v3.2.19
func (rc *RongCloud) UGChannelUserGroupQuery(groupId, busChannel string, page, pageSize int) (userGroupIds []string, err error)
UGChannelUserGroupQuery Query the list of user groups bound to the channel
func (*RongCloud) UGChannelUserGroupUnbind ¶ added in v3.2.19
func (rc *RongCloud) UGChannelUserGroupUnbind(groupId, busChannel string, userGroupIds []string) (err error)
UGChannelUserGroupUnbind Unbind user groups from a channel in bulk
func (*RongCloud) UGGroupChannelChange ¶ added in v3.2.12
UGGroupChannelChange : /ultragroup/channel/type/change Set public/private channel type (switch) *
@param: groupId @param: busChannel @param: type
*//
func (*RongCloud) UGGroupChannelChangeResObj ¶ added in v3.2.12
func (rc *RongCloud) UGGroupChannelChangeResObj(groupId, busChannel, t string) (UGGroupChannelChangeObj, error)
UGGroupChannelChangeResObj : /ultragroup/channel/type/change Set the public/private channel type (switch) *
@param: groupId @param: busChannel @param: type
*//
func (*RongCloud) UGGroupChannelCreate ¶ added in v3.2.12
UGGroupChannelCreate : Create a channel - supports setting the channel type /ultragroup/channel/create.json * groupId=ug_m_gid_lw_1&busChannel=channel001&type=0
response: byte array *//
func (*RongCloud) UGGroupChannelGet ¶ added in v3.2.12
UGGroupChannelGet: Channel query - Returns results with channel type /ultragroup/channel/get.json
groupId=ug_m_gid_lw_1&page=1&limit=20 response: Returns byte array
func (*RongCloud) UGGroupCreate ¶ added in v3.2.8
Create a group
func (*RongCloud) UGGroupDismiss ¶ added in v3.2.8
Dismiss an ultra group
func (*RongCloud) UGGroupJoin ¶ added in v3.2.8
Join an ultra group
func (*RongCloud) UGGroupMuteMembersAdd ¶ added in v3.2.8
func (rc *RongCloud) UGGroupMuteMembersAdd(groupId string, userIds []string) (err error, requestId string)
Add muted members to the group
func (*RongCloud) UGGroupMuteMembersGetList ¶ added in v3.2.8
func (rc *RongCloud) UGGroupMuteMembersGetList(groupId string) (users []UGUserInfo, err error, requestId string)
Get muted members of the ultra group
func (*RongCloud) UGGroupMuteMembersRemove ¶ added in v3.2.8
func (rc *RongCloud) UGGroupMuteMembersRemove(groupId string, userIds []string) (err error, requestId string)
Remove muted members from the group
func (*RongCloud) UGGroupMuted ¶ added in v3.2.8
Mute all members of the ultra group
func (*RongCloud) UGGroupMutedQuery ¶ added in v3.2.8
Query the mute status of all members in an ultra group
func (*RongCloud) UGGroupMutedWhitelistAdd ¶ added in v3.2.8
func (rc *RongCloud) UGGroupMutedWhitelistAdd(groupId string, userIds []string) (err error, requestId string)
Add users to the mute exceptions list
func (*RongCloud) UGGroupMutedWhitelistQuery ¶ added in v3.2.8
func (rc *RongCloud) UGGroupMutedWhitelistQuery(groupId string) (users []UGUserInfo, err error, requestId string)
Query the allowlist for muted users in an ultra group
func (*RongCloud) UGGroupMutedWhitelistRemove ¶ added in v3.2.8
func (rc *RongCloud) UGGroupMutedWhitelistRemove(groupId string, userIds []string) (err error, requestId string)
Remove users from the mute exceptions list
func (*RongCloud) UGGroupQuit ¶ added in v3.2.8
Quit an ultra group
func (*RongCloud) UGGroupSend ¶ added in v3.2.8
Send a message in an ultra group
func (*RongCloud) UGGroupUpdate ¶ added in v3.2.8
Refresh group information
func (*RongCloud) UGHisMsgIdQuery ¶ added in v3.2.17
func (rc *RongCloud) UGHisMsgIdQuery(groupId, busChannel, msgUID, prevNum, lastNum string) (UGHisMsgIdQueryResp, error)
UGHisMsgIdQuery API to retrieve historical messages around a specific message ID /ultragroup/hismsg/msgid/query.json param: groupId Required String The ID of the ultra group param: busChannel Required String The ID of the channel param: msgUID Required string The message ID to query, retrieves 10 messages before and after the specified message ID param: prevNum Optional string Default is 10 (maximum 50) messages to retrieve before the message ID. If 0 is passed, no messages before the message ID are retrieved param: lastNum Optional string Default is 10 (maximum 50) messages to retrieve after the message ID. If 0 is passed, no messages after the message ID are retrieved
func (*RongCloud) UGHistoryQuery ¶ added in v3.2.16
func (rc *RongCloud) UGHistoryQuery(groupId, busChannel string, startTime, endTime int64, fromUserId string, pageSize int) (UGHisMsgQueryResp, error)
UGHistoryQuery • API: /ultragroup/hismsg/query.json • Purpose: Query ultra group historical messages • Rate Limit: 100 requests per minute at the appKey level param: groupId Required String Ultra group ID param: busChannel Required String Channel ID param: startTime Required int64 Query start timestamp param: endTime Required int64 Query end timestamp. The maximum time span between start and end time is 14 days. param: fromUserId Optional String Sender ID of the message. If provided, only messages sent by this user will be queried; otherwise, all historical messages in the group will be queried. param: pageSize Optional int Default is 20, maximum is 100. UGHisMsgQueryResp: Returned data result set startTime<resultList<=endTime, and resultList data is sorted in ascending order by message timestamp.
func (*RongCloud) UGMemberExists ¶ added in v3.2.8
UGMemberExists Checks if a user exists in an ultra group
func (*RongCloud) UGMessageExpansionDelete ¶ added in v3.2.8
func (rc *RongCloud) UGMessageExpansionDelete(groupId, userId, msgUID, busChannel string, keys ...string) error
UGMessageExpansionDelete Deletes message expansion
func (*RongCloud) UGMessageExpansionQuery ¶ added in v3.2.8
func (rc *RongCloud) UGMessageExpansionQuery(groupId, msgUID, busChannel string) ([]UGMessageExpansionItem, error)
UGMessageExpansionQuery Query message expansion information
func (*RongCloud) UGMessageExpansionSet ¶ added in v3.2.8
func (rc *RongCloud) UGMessageExpansionSet(groupId, userId, msgUID, busChannel string, extra map[string]string) error
UGMessageExpansionSet Set message extension
func (*RongCloud) UGMessageGet ¶ added in v3.2.11
func (rc *RongCloud) UGMessageGet(groupId string, msgList []UGMessageData, options ...MsgOption) ([]byte, error)
UGMessageGet : Retrieve Ultra Group Messages by Message ID /ultragroup/msg/get * @param groupId: Ultra Group ID @param msgList: Message parameter array, each element is UGMessageData response: Returns byte array */
func (*RongCloud) UGMessageGetObj ¶ added in v3.2.12
func (rc *RongCloud) UGMessageGetObj(groupId string, msgList []UGMessageData, options ...MsgOption) (UGMessageGetData, error)
UGMessageGetObj : Batch retrieve ultra group messages by message ID /ultragroup/msg/get * @param groupId: Ultra group ID @param msgList: Message parameter array, each element is UGMessageData response: Response structure */
func (*RongCloud) UGMessageModify ¶ added in v3.2.11
func (rc *RongCloud) UGMessageModify(groupId, fromUserId, msgUID, content string, options ...UgMessageExtension) ([]byte, error)
UGMessageModify : Ultra Group Message Modification /ultragroup/msg/modify.json * @param groupId: Ultra group ID @param fromUserId: Message sender @param msgUID: Unique identifier of the message @param content: Message content, up to 128k @param busChannel: Channel ID, supports alphanumeric combinations, up to 20 characters @param msgRandom: Unique request identifier, ensures idempotency within one minute */
func (*RongCloud) UGMessagePublish ¶ added in v3.2.8
func (rc *RongCloud) UGMessagePublish(fromUserId, objectName, content, pushContent, pushData, isPersisted, isCounted, isMentioned, contentAvailable, busChannel, extraContent string, expansion, unreadCountFlag bool, pushExt *PushExt, toGroupIds ...string) error
UGMessagePublish Sends a message to an ultra group Documentation: https://doc.rongcloud.cn/imserver/server/v1/message/msgsend/ultragroup
func (*RongCloud) UGMessageRecall ¶ added in v3.2.8
func (rc *RongCloud) UGMessageRecall(userId, targetId, messageId string, sentTime int, options ...MsgOption) error
UGMessageRecall Ultra group message recall
func (*RongCloud) UGNotDisturbGet ¶ added in v3.2.8
func (rc *RongCloud) UGNotDisturbGet(groupId, busChannel string) (*UGNotDisturbGetResponses, error)
func (*RongCloud) UGNotDisturbSet ¶ added in v3.2.8
UGNotDisturbSet Sets the default Do Not Disturb level for a group/channel
func (*RongCloud) UGQueryGroupUsers ¶ added in v3.2.8
func (rc *RongCloud) UGQueryGroupUsers(groupId string, page, size int) (users []UGUserInfo, err error, requestId string)
Query group members (P1)
func (*RongCloud) UGQueryUserGroups ¶ added in v3.2.8
func (rc *RongCloud) UGQueryUserGroups(userId string, page, size int) (groups []UGGroupInfo, err error, requestId string)
Query groups that a user belongs to (P1)
func (*RongCloud) UGUserChannelQuery ¶ added in v3.2.19
func (rc *RongCloud) UGUserChannelQuery(groupId, userId string, page, pageSize int) (busChannelIds []string, err error)
UGUserChannelQuery Query the allowlist of channels the user belongs to
func (*RongCloud) UGUserGroupAdd ¶ added in v3.2.19
func (rc *RongCloud) UGUserGroupAdd(groupId string, userGroups []UGUserGroupInfo) (err error)
UGUserGroupAdd Batch create user groups
func (*RongCloud) UGUserGroupChannelQuery ¶ added in v3.2.19
func (rc *RongCloud) UGUserGroupChannelQuery(groupId, userGroupId string, page, pageSize int) (busChannelIds []string, err error)
UGUserGroupChannelQuery Query the list of channels bound to the user group
func (*RongCloud) UGUserGroupDelete ¶ added in v3.2.19
UGUserGroupDelete Batch delete user groups
func (*RongCloud) UGUserGroupQuery ¶ added in v3.2.19
func (rc *RongCloud) UGUserGroupQuery(groupId string, page, pageSize int) (userGroups []UGUserGroupInfo, err error)
UGUserGroupQuery Paginates and queries user group information under an ultra group
func (*RongCloud) UGUserGroupUserAdd ¶ added in v3.2.19
UGUserGroupUserAdd Adds users to a user group in bulk
func (*RongCloud) UGUserGroupUserDelete ¶ added in v3.2.19
func (rc *RongCloud) UGUserGroupUserDelete(groupId, userGroupId string, userIds []string) (err error)
UGUserGroupUserDelete Batch remove users from a user group
func (*RongCloud) UGUserUserGroupQuery ¶ added in v3.2.19
func (rc *RongCloud) UGUserUserGroupQuery(groupId, userId string, page, pageSize int) (userGroupIds []string, err error)
UGUserUserGroupQuery Query the list of user groups a user belongs to in an ultra group
func (*RongCloud) UltraGroupBannedWhiteListAdd ¶ added in v3.2.8
func (rc *RongCloud) UltraGroupBannedWhiteListAdd(groupId, busChannel string, userIds ...string) error
UltraGroupBannedWhiteListAdd Add users to the mute exceptions list
func (*RongCloud) UltraGroupBannedWhiteListDel ¶ added in v3.2.8
func (rc *RongCloud) UltraGroupBannedWhiteListDel(groupId, busChannel string, userIds ...string) error
UltraGroupBannedWhiteListDel Remove users from the mute exceptions list
func (*RongCloud) UltraGroupBannedWhiteListGet ¶ added in v3.2.8
func (rc *RongCloud) UltraGroupBannedWhiteListGet(groupId, busChannel string, page, pageSize int) ([]UltraGroupBannedWhiteListGetResponseItem, error)
UltraGroupBannedWhiteListGet Get the Mute Exceptions list
func (*RongCloud) UltraGroupChannelCreate ¶ added in v3.2.8
UltraGroupChannelCreate Create a channel
func (*RongCloud) UltraGroupChannelDel ¶ added in v3.2.8
UltraGroupChannelDel Deletes a channel
func (*RongCloud) UltraGroupChannelGet ¶ added in v3.2.8
func (rc *RongCloud) UltraGroupChannelGet(groupId string, page, limit int) ([]UltraGroupChannelGetResponseItem, error)
UltraGroupChannelGet Query the list of channels response:[]UltraGroupChannelGetResponseItem
func (*RongCloud) UltraGroupCreate ¶ added in v3.2.8
UltraGroupCreate Creates an ultra group
func (*RongCloud) UltraGroupDis ¶ added in v3.2.8
UltraGroupDis Dissolve an ultra group
func (*RongCloud) UltraGroupGlobalBannedGet ¶ added in v3.2.8
UltraGroupGlobalBannedGet Query the mute status of an ultra group
func (*RongCloud) UltraGroupGlobalBannedSet ¶ added in v3.2.8
UltraGroupGlobalBannedSet Set the mute status for an ultra group
func (*RongCloud) UltraGroupJoin ¶ added in v3.2.8
UltraGroupJoin Join an ultra group
func (*RongCloud) UltraGroupQuit ¶ added in v3.2.8
UltraGroupQuit Quit an ultra group
func (*RongCloud) UltraGroupRefresh ¶ added in v3.2.8
UltraGroupRefresh Refreshes ultra group information
func (*RongCloud) UltraGroupUserBannedAdd ¶ added in v3.2.8
UltraGroupUserBannedAdd Add banned members to the ultra group
func (*RongCloud) UltraGroupUserBannedDel ¶ added in v3.2.8
UltraGroupUserBannedDel Remove banned users from the ultra group
func (*RongCloud) UltraGroupUserBannedGet ¶ added in v3.2.8
func (rc *RongCloud) UltraGroupUserBannedGet(groupId, busChannel string, page, pageSize int) ([]UltraGroupUserBannedResponseItem, error)
UltraGroupUserBannedGet Get banned users in an ultra group
func (*RongCloud) UserBlockPushPeriodDelete ¶ added in v3.2.13
UserBlockPushPeriodDelete Delete user's Do Not Disturb period /user/blockPushPeriod/delete.json * @param: userId User ID, required
*//
func (*RongCloud) UserBlockPushPeriodGet ¶ added in v3.2.13
func (rc *RongCloud) UserBlockPushPeriodGet(userId string) (PushPeriodGet, error)
UserBlockPushPeriodGet UserBlockPushPeriodGet: Get user's Do Not Disturb period /user/blockPushPeriod/get.json * @param: userId User ID, required
response : PushPeriodGet
*//
func (*RongCloud) UserBlockPushPeriodSet ¶ added in v3.2.13
UserBlockPushPeriodSet : Set user's Do Not Disturb period /user/blockPushPeriod/set.json *
@param :userId User ID (required) @param :startTime Start time (in seconds) (required) @param :period Duration (in minutes) (required) @param :level Do Not Disturb Level (default is 1, optional) form data
*//
func (*RongCloud) UserChatFbQueryList ¶ added in v3.2.11
UserChatFbQueryList * /user/chat/fb/querylist Query the list of muted users @param: num : Number of rows to fetch, defaults to 100, maximum supported is 200 @param: offset : Starting position for the query, defaults to 0. @param: t : Conversation type, currently supports one-to-one chat PERSON. response: Returns a byte array https://doc.rongcloud.cn/imserver/server/v1/user/ban */
func (*RongCloud) UserChatFbQueryListResObj ¶ added in v3.2.12
func (rc *RongCloud) UserChatFbQueryListResObj(num, offset int, t string) (UserChatFbQueryListObj, error)
UserChatFbQueryListResObj * /user/chat/fb/querylist Query the list of muted users @param: num: Number of rows to fetch, default is 100, maximum supported is 200 @param: offset: Starting position for the query, default is 0 @param: t: Conversation type, currently supports one-to-one chat PERSON response: UserChatFbQueryListObj Documentation: https://doc.rongcloud.cn/imserver/server/v1/user/ban */
func (*RongCloud) UserChatFbSet ¶ added in v3.2.11
UserChatFbSet * Mute a user in one-to-one chat @param: userId : User ID to be muted, supports batch setting, maximum of 1000 users @param: state : Mute state, 0 to unmute, 1 to mute @param: type : Conversation type, currently supports one-to-one chat PERSON */
func (*RongCloud) UserDeactivate ¶ added in v3.2.22
func (rc *RongCloud) UserDeactivate(userIds []string) (*UserDeactivateResponse, error)
UserDeactivate Deactivates users @param userIds []string User IDs to be deactivated, up to 100 at a time @return string, error official doc https://doc.rongcloud.cn/imserver/server/v1/user/deactivate After initiating deactivation, the server will notify the deactivation result via callback within 15 minutes. https://doc.rongcloud.cn/imserver/server/v1/user/callback-deactivation
func (*RongCloud) UserDeactivateQuery ¶ added in v3.2.22
func (rc *RongCloud) UserDeactivateQuery(pageNo, pageSize int) (*UserDeactivateQueryResponse, error)
UserDeactivateQuery Queries deactivated users @param pageNo Current page number for paginated retrieval of deactivated user list, default is 1, minimum is 1. @param pageSize Number of rows per page for paginated retrieval of deactivated user list, default is 50, minimum is 1, maximum is 50. @return string, error official doc https://doc.rongcloud.cn/imserver/server/v1/user/query-deactivated-list
func (*RongCloud) UserProfilBatchQuery ¶ added in v3.2.24
func (rc *RongCloud) UserProfilBatchQuery(userId string) (*UserProfileQueryResponse, error)
UserProfilBatchQuery /user/profile/batch/query.json Batch query user profiles *
@param: userId: Required. Specifies the user ID to be queried. response: UserProfileQueryResponse, err
*//
func (*RongCloud) UserProfilQuery ¶ added in v3.2.24
func (rc *RongCloud) UserProfilQuery(page int, size int, order int) (*UserProfileQueryResponse, error)
@param: size: Optional. Specifies the number of items per page. @param: order: Optional. Defines the sorting mechanism based on registration time. Default is ascending order. 0 for ascending, 1 for descending. response: UserProfileQueryResponse, err
*//
func (*RongCloud) UserProfileClean ¶ added in v3.2.24
UserProfileClean /user/profile/clean.json Clear User Profile Hosting *
@param: userId: Required The user ID to be set response: err
*//
func (*RongCloud) UserProfileSet ¶ added in v3.2.24
UserProfileSet /user/profile/set.json User profile settings *
@param: userId: Required The user ID to be set @param: userProfile: Optional Basic user information @param: userExtProfile: Optional Extended user information response: err
*//
func (*RongCloud) UserReactivate ¶ added in v3.2.22
func (rc *RongCloud) UserReactivate(userIds []string) (*UserReactivateResponse, error)
UserReactivate Reactivate deactivated users @param userIds []string User IDs to reactivate, with a maximum of 100 user IDs per request. @return string, error Official documentation: https://doc.rongcloud.cn/imserver/server/v1/user/reactivate To get the reactivation result, use the (https://doc.rongcloud.cn/imserver/server/v1/user/callback-deactivation) interface. Repeated calls to this interface will not result in errors.
func (*RongCloud) UserRegister ¶
UserRegister Registers a user and generates a unique Token for the user in RongCloud.
*@param userID: User ID, maximum length of 64 bytes. It is the unique identifier for the user within the App. It must be unique within the same App, and duplicate user IDs will be treated as the same user. *@param name: User name, maximum length of 128 bytes. Used to display the user's name in push notifications. *@param portraitURI: User avatar URI, maximum length of 1024 bytes. Used to display the user's avatar in push notifications. Can be empty. * *@return User, error
func (*RongCloud) UserRemarksDel ¶ added in v3.2.11
UserRemarksDel /user/remarks/del.json Delete user-level push remark *
@param: userId :Operator user ID. @param: targetId: User ID for which the push remark needs to be deleted
*/
func (*RongCloud) UserRemarksGet ¶ added in v3.2.11
UserRemarksGet /user/remarks/get.json Query user push remark name *
@param: userId : User ID. @param: page : Page number, defaults to the first page. @param: size : Number of items per page, defaults to 50 items per page.
response : Byte array Documentation: https://doc.rongcloud.cn/imserver/server/v1/user/get-remark-for-push */
func (*RongCloud) UserRemarksGetResObj ¶ added in v3.2.12
func (rc *RongCloud) UserRemarksGetResObj(userId string, page, size int) (UserRemarksGetObj, error)
Documentation: https://doc.rongcloud.cn/imserver/server/v1/user/get-remark-for-push
*/
func (*RongCloud) UserRemarksSet ¶ added in v3.2.11
func (rc *RongCloud) UserRemarksSet(userId string, remarks []UserRemark) error
UserRemarksSet /user/remarks/set.json * @param: userId: User ID. @param: remarks: JSON string of the target user push remarks to be set
*/
func (*RongCloud) UserTokenExpire ¶ added in v3.2.12
Documentation: https://doc.rongcloud.cn/imserver/server/v1/user/expire
*//
func (*RongCloud) UserTokenExpireResObj ¶ added in v3.2.12
func (rc *RongCloud) UserTokenExpireResObj(userId string, t int64) (UserTokenExpireObj, error)
UserTokenExpireResObj /user/token/expire.json Token expiration *
@param: userId: Required The user ID(s) for which the Token needs to be invalidated. Supports multiple users, up to 20. @param: time: Required The expiration timestamp in milliseconds. All Tokens obtained before this timestamp will be invalidated. Users already connected with Tokens obtained before this timestamp will not be immediately disconnected but will be unable to reconnect after disconnection. response: UserTokenExpireObj Documentation: https://doc.rongcloud.cn/imserver/server/v1/user/expire
*//
func (*RongCloud) UserUpdate ¶
UserUpdate Updates user information
*@param userID: User ID, maximum length 64 bytes. It is the unique identifier of the user within the App. It must be ensured that it is not duplicated within the same App. Duplicate user IDs will be treated as the same user. *@param name: User name, maximum length 128 bytes. It is used to display the user's name in push notifications. The user name will take effect within 5 minutes after refreshing. (Optional, refresh if provided, ignore if not provided) *@param portraitURI: User avatar URI, maximum length 1024 bytes. It is used to display the user's avatar in push notifications. (Optional, refresh if provided, ignore if not provided) * *@return error
type Sender ¶
type Sender interface {
// contains filtered or unexported methods
}
Sender Broadcast push interface
type SensitiveWord ¶
type SensitiveWord struct { Type string `json:"type"` Word string `json:"word"` ReplaceWord string `json:"replaceWord"` }
SensitiveWord Sensitive word
type TXTMsg ¶
type TXTMsg struct { Content string `json:"content"` User MsgUserInfo `json:"user"` Extra string `json:"extra"` }
TXTMsg message
type Tag ¶
type Tag struct { UserID string `json:"userId"` // User ID (required) Tags []string `json:"tags"` // User tags. A user can have up to 20 tags, each tag cannot exceed 40 bytes, and special characters are not allowed in tags. (required) }
Tag TagSet parameters
type TagBatch ¶
type TagBatch struct { UserIDs []string `json:"userIds"` // User IDs, up to 1000 users per request. (required) Tags []string `json:"tags"` // User tags. A user can have up to 20 tags, each tag cannot exceed 40 bytes, and special characters are not allowed in tags. (required) }
TagBatch TagBatchSet parameters
type TagResult ¶
type TagResult struct { *CodeResult Result map[string][]string `json:"result"` // Array of all tags for the user. }
TagResult TagGet return value
type TemplateMsgContent ¶
type TemplateMsgContent struct { TargetID string Data map[string]string PushContent string PushData string }
TemplateMsgContent Message template
type UGChannelInfo ¶ added in v3.2.8
type UGChannelInfo struct { ChannelId string `json:"channel_id"` CreateTime string `json:"create_time"` }
Ultra group channel information
type UGChannelPrivateUserAddObj ¶ added in v3.2.12
type UGChannelPrivateUserAddObj struct {
Code int `json:"code"`
}
type UGChannelPrivateUserDelObj ¶ added in v3.2.12
type UGChannelPrivateUserDelObj struct {
Code int `json:"code"`
}
type UGChannelPrivateUserGetObj ¶ added in v3.2.12
UGChannelPrivateUserGetObj : The return value of UGChannelPrivateUserGetResObj
type UGGroupChannelChangeObj ¶ added in v3.2.12
type UGGroupChannelChangeObj struct {
Code int `json:"code"`
}
type UGGroupInfo ¶ added in v3.2.8
Ultra group group information
type UGHisMsgIdQueryData ¶ added in v3.2.17
type UGHisMsgIdQueryData struct { GroupId string `json:"groupId"` BusChannel string `json:"busChannel"` FromUserId string `json:"fromUserId"` MsgUID string `json:"msgUID"` MsgTime int64 `json:"msgTime"` ObjectName string `json:"objectName"` ConversionType int `json:"conversionType"` Content string `json:"content"` Expansion bool `json:"expansion"` ExtraContent string `json:"extraContent"` }
type UGHisMsgIdQueryResp ¶ added in v3.2.17
type UGHisMsgIdQueryResp struct { Code int `json:"code"` Data []UGHisMsgIdQueryData `json:"data"` }
type UGHisMsgQueryData ¶ added in v3.2.16
type UGHisMsgQueryData struct { GroupId string `json:"groupId"` BusChannel string `json:"busChannel"` FromUserId string `json:"fromUserId"` MsgUID string `json:"msgUID"` MsgTime int64 `json:"msgTime"` ObjectName string `json:"objectName"` ConversionType int `json:"conversionType"` Content string `json:"content"` Expansion bool `json:"expansion"` ExtraContent string `json:"extraContent"` }
type UGHisMsgQueryResp ¶ added in v3.2.16
type UGHisMsgQueryResp struct { Code int `json:"code"` Data []UGHisMsgQueryData `json:"data"` }
type UGMessage ¶ added in v3.2.8
type UGMessage struct { FromUserId string `json:"from_user_id"` ToGroupIds []string `json:"to_group_ids"` ToUserIds []string `json:"to_user_ids,omitempty"` ObjectName string `json:"object_name"` Content string `json:"content"` PushContent string `json:"push_content,omitempty"` PushData string `json:"push_data,omitempty"` IncludeSenderEnable bool `json:"include_sender_enable,omitempty"` StoreFlag bool `json:"store_flag"` MentionedFlag bool `json:"mentioned_flag,omitempty"` SilencePush bool `json:"silence_push,omitempty"` PushExt string `json:"push_ext,omitempty"` BusChannel string `json:"bus_channel,omitempty"` }
Ultra group message structure
type UGMessageData ¶ added in v3.2.11
type UGMessageData struct { // Unique identifier of the message MsgUid string `json:"msgUID"` // Channel ID, supports alphanumeric combinations, up to 20 characters BusChannel string `json:"busChannel,omitempty"` }
UGMessageData: Message parameter array in the UGMessageGet method
type UGMessageExpansionItem ¶ added in v3.2.8
type UGMessageGetData ¶ added in v3.2.12
type UGMessageGetData struct { Code int `json:"code"` Data []UGMessageGetDataList `json:"data"` }
type UGMessageGetDataList ¶ added in v3.2.12
type UGMessageGetDataList struct { FromUserId string `json:"fromUserId"` GroupId string `json:"groupId"` SentTime uint64 `json:"sentTime"` BusChannel string `json:"busChannel"` MsgUid string `json:"msgUID"` ObjectName string `json:"objectName"` Content string `json:"content"` Expansion bool `json:"expansion"` ExtraContent string `json:"extraContent"` }
type UGNotDisturbGetResponses ¶ added in v3.2.8
type UGUserGroupInfo ¶ added in v3.2.19
type UGUserGroupInfo struct {
UserGroupId string `json:"userGroupId"`
}
Ultra group user group information
type UGUserInfo ¶ added in v3.2.8
Ultra group user information
type UgMessageExtension ¶ added in v3.2.11
type UgMessageExtension struct { // Channel ID, supports a combination of letters and numbers, up to 20 characters. BusChannel string // Unique request identifier, ensures idempotency within one minute. MsgRandom int64 }
UgMessageExtension : Batch retrieves extended messages for ultra group messages based on message ID, optional.
type UltraGroupBannedWhiteListGetResponseItem ¶ added in v3.2.8
type UltraGroupBannedWhiteListGetResponseItem struct {
Id string `json:"id"`
}
type UltraGroupChannelGetResponseItem ¶ added in v3.2.8
type UltraGroupUserBannedResponseItem ¶ added in v3.2.8
type UltraGroupUserBannedResponseItem struct {
Id string `json:"id"`
}
type User ¶
type User struct { Token string `json:"token"` UserID string `json:"userId"` BlockEndTime string `json:"blockEndTime,omitempty"` Status string `json:"status,omitempty"` }
User User information response
type UserChatFbQueryListObj ¶ added in v3.2.12
type UserChatFbQueryListObj struct { // Response code, 200 indicates success. Code int `json:"code"` // Total number of muted users. Total int `json:"total"` // Array of muted users. Users []string `json:"users"` }
UserChatFbQueryListObj: Response object for querying the list of muted users
type UserDeactivateQueryResponse ¶ added in v3.2.22
type UserDeactivateResponse ¶ added in v3.2.22
type UserProfileQueryResponse ¶ added in v3.2.24
type UserProfileQueryResponse struct { Code int `json:"code"` // Response code, 200 indicates success UserProfiles []UserProfileResponse `json:"userList"` }
type UserProfileResponse ¶ added in v3.2.24
type UserReactivateResponse ¶ added in v3.2.22
type UserReactivateResponse struct { Code int `json:"code"` // Response code, 200 indicates success. The result of each user ID operation is passed through the User Deactivation and Activation Status Callback. OperateId string `json:"operateId"` // Operation ID, the unique identifier for the current operation. This parameter is included in the callback request body after enabling the User Deactivation and Activation Status Callback. }
type UserRemark ¶ added in v3.2.11
type UserRemark struct { // Target user ID. A maximum of 100 can be set at a time. Id string // The remark name displayed when receiving a push from the target user. Remark string }
UserRemark :Parameters received by the UserRemarksSet method
type UserRemarksGetObj ¶ added in v3.2.12
type UserRemarksGetObj struct { // Return code, 200 indicates success. Code int `json:"code"` // Total number of user remarks. Total int `json:"total"` // JSON object array containing user IDs (id) and corresponding remarks (remark). A maximum of 50 user remarks can be returned per request. Users []UserRemarksUsers `json:"users"` }
UserRemarksGetObj : The return value of UserRemarksGetResObj
type UserRemarksUsers ¶ added in v3.2.12
type UserTokenExpireObj ¶ added in v3.2.12
type UserTokenExpireObj struct { // Return code, 200 indicates success Code int `json:"code"` }
UserTokenExpireObj: Return value definition
type VCMsg ¶
type VCMsg struct { Content string `json:"content"` User MsgUserInfo `json:"user"` Extra string `json:"extra"` Duration interface{} `json:"duration"` }
VCMsg Message