Documentation ¶
Index ¶
- Constants
- Variables
- func Auth() openim_auth
- func Friend() openim_friend
- func GenOperationID() string
- func GetCsGroupId(id int64) string
- func GetHomeUserId(id int64) string
- func GetSysUserId(id int64) string
- func GetToken(userId string) string
- func Group() openim_group
- func HttpPost(headers map[string]string, url string, req_body interface{}) (body []byte, err error)
- func Msg() openim_msg
- func User() openim_user
- type GroupInfo
- type HashTable
- type Req_account_check
- type Req_add_black
- type Req_add_friend
- type Req_add_friend_response
- type Req_cancel_mute_group
- type Req_cancel_mute_group_member
- type Req_create_group
- type Req_delete_friend
- type Req_dismiss_group
- type Req_force_logout
- type Req_get_all_users_uid
- type Req_get_black_list
- type Req_get_friend_apply_list
- type Req_get_friend_list
- type Req_get_group_member_list
- type Req_get_group_members_info
- type Req_get_group_users_req_application_list
- type Req_get_groups_info
- type Req_get_joined_group_list
- type Req_get_recv_group_applicationList
- type Req_get_self_friend_apply_list
- type Req_get_subscribe_users_status
- type Req_get_user_req_group_applicationList
- type Req_get_users
- type Req_get_users_info
- type Req_get_users_online_status
- type Req_get_users_online_token_detail
- type Req_group_application_response
- type Req_import_friend
- type Req_invite_user_to_group
- type Req_is_friend
- type Req_join_group
- type Req_kick_group
- type Req_mute_group
- type Req_mute_group_member
- type Req_quit_group
- type Req_remove_black
- type Req_revoke_msg
- type Req_send_msg
- type Req_send_text_msg
- type Req_set_friend_remark
- type Req_set_global_msg_recv_opt
- type Req_set_group_info
- type Req_set_group_member_info
- type Req_subscribe_users_status
- type Req_transfer_group
- type Req_update_user_info
- type Req_user_clear_all_msg
- type Req_user_register
- type Req_user_token
- type Resp_account_check
- type Resp_add_black
- type Resp_add_friend
- type Resp_add_friend_response
- type Resp_cancel_mute_group
- type Resp_cancel_mute_group_member
- type Resp_create_group
- type Resp_delete_friend
- type Resp_dismiss_group
- type Resp_force_logout
- type Resp_get_all_users_uid
- type Resp_get_black_list
- type Resp_get_friend_apply_list
- type Resp_get_friend_list
- type Resp_get_group_member_list
- type Resp_get_group_members_info
- type Resp_get_group_users_req_application_list
- type Resp_get_groups_info
- type Resp_get_joined_group_list
- type Resp_get_recv_group_applicationList
- type Resp_get_self_friend_apply_list
- type Resp_get_subscribe_users_status
- type Resp_get_user_req_group_applicationList
- type Resp_get_users
- type Resp_get_users_info
- type Resp_get_users_online_status
- type Resp_get_users_online_token_detail
- type Resp_group_application_response
- type Resp_import_friend
- type Resp_invite_user_to_group
- type Resp_is_friend
- type Resp_join_group
- type Resp_kick_group
- type Resp_mute_group
- type Resp_mute_group_member
- type Resp_quit_group
- type Resp_remove_black
- type Resp_revoke_msg
- type Resp_send_msg
- type Resp_set_friend_remark
- type Resp_set_global_msg_recv_opt
- type Resp_set_group_info
- type Resp_set_group_member_info
- type Resp_subscribe_users_status
- type Resp_transfer_group
- type Resp_update_user_info
- type Resp_user_clear_all_msg
- type Resp_user_register
- type Resp_user_token
- type Userinfo
Constants ¶
View Source
const DEBUG = true
Variables ¶
View Source
var Admin_userId = "openIM123"
View Source
var Openim_api string = "http://api.openim.com"
View Source
var Secret = "openIM123"
Functions ¶
func GenOperationID ¶
func GenOperationID() string
func GetCsGroupId ¶
func GetHomeUserId ¶
func GetSysUserId ¶
Types ¶
type GroupInfo ¶
type GroupInfo struct { GroupID string `json:"groupID"` GroupName string `json:"groupName"` Notification string `json:"notification"` Introduction string `json:"introduction"` FaceURL string `json:"faceURL"` Ex string `json:"ex"` GroupType int `json:"groupType"` NeedVerification int `json:"needVerification"` LookMemberInfo int `json:"lookMemberInfo"` ApplyMemberFriend int `json:"applyMemberFriend"` }
type Req_account_check ¶
type Req_account_check struct {
CheckUserIDs []string `json:"checkUserIDs"`
}
type Req_add_black ¶
type Req_add_friend ¶
type Req_add_friend_response ¶
type Req_cancel_mute_group ¶
type Req_cancel_mute_group struct {
GroupID string `json:"groupID"`
}
type Req_create_group ¶
type Req_delete_friend ¶
type Req_dismiss_group ¶
type Req_dismiss_group struct {
GroupID string `json:"groupID"`
}
type Req_force_logout ¶
type Req_get_all_users_uid ¶
type Req_get_black_list ¶
type Req_get_friend_list ¶
type Req_get_groups_info ¶
type Req_get_groups_info struct {
GroupIDs []string `json:"groupIDs"`
}
type Req_get_subscribe_users_status ¶
type Req_get_subscribe_users_status struct {
UserID string `json:"userID"`
}
type Req_get_users ¶
type Req_get_users_info ¶
type Req_get_users_info struct {
UserIDs []string `json:"userIDs"`
}
type Req_get_users_online_status ¶
type Req_get_users_online_status struct {
UserIDs []string `json:"userIDs"`
}
type Req_get_users_online_token_detail ¶
type Req_get_users_online_token_detail struct {
UserIDs []string `json:"userIDs"`
}
type Req_import_friend ¶
type Req_is_friend ¶
type Req_join_group ¶
type Req_kick_group ¶
type Req_mute_group ¶
type Req_mute_group struct {
GroupID string `json:"groupID"`
}
type Req_mute_group_member ¶
type Req_quit_group ¶
type Req_remove_black ¶
type Req_revoke_msg ¶
type Req_send_msg ¶
type Req_send_msg struct { SendID string `json:"sendID"` RecvID string `json:"recvID"` GroupID string `json:"groupID"` SenderNickname string `json:"senderNickname"` SenderFaceURL string `json:"senderFaceURL"` SenderPlatformID int `json:"senderPlatformID"` Content any `json:"content"` ContentType int `json:"contentType"` SessionType int `json:"sessionType"` IsOnlineOnly bool `json:"isOnlineOnly"` NotOfflinePush bool `json:"notOfflinePush"` SendTime int `json:"sendTime"` OfflinePushInfo any `json:"offlinePushInfo"` }
type Req_send_text_msg ¶
type Req_set_friend_remark ¶
type Req_set_group_info ¶
type Req_set_group_info struct { GroupInfoForSet struct { GroupID string `json:"groupID"` GroupName string `json:"groupName"` Notification string `json:"notification"` Introduction string `json:"introduction"` FaceURL string `json:"faceURL"` Ex string `json:"ex"` NeedVerification int `json:"needVerification"` LookMemberInfo int `json:"lookMemberInfo"` ApplyMemberFriend int `json:"applyMemberFriend"` } `json:"groupInfoForSet"` }
type Req_transfer_group ¶
type Req_update_user_info ¶
type Req_user_clear_all_msg ¶
type Req_user_clear_all_msg struct {
UserID string `json:"userID"`
}
type Req_user_register ¶
type Req_user_token ¶
type Resp_account_check ¶
type Resp_add_black ¶
type Resp_add_friend ¶
type Resp_cancel_mute_group ¶
type Resp_create_group ¶
type Resp_create_group struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data struct { GroupInfo struct { GroupID string `json:"groupID"` GroupName string `json:"groupName"` Notification string `json:"notification"` Introduction string `json:"introduction"` FaceURL string `json:"faceURL"` OwnerUserID string `json:"ownerUserID"` CreateTime int64 `json:"createTime"` MemberCount int `json:"memberCount"` Ex string `json:"ex"` Status int `json:"status"` CreatorUserID string `json:"creatorUserID"` GroupType int `json:"groupType"` NeedVerification int `json:"needVerification"` LookMemberInfo int `json:"lookMemberInfo"` ApplyMemberFriend int `json:"applyMemberFriend"` NotificationUpdateTime int `json:"notificationUpdateTime"` NotificationUserID string `json:"notificationUserID"` } `json:"groupInfo"` } `json:"data"` }
type Resp_delete_friend ¶
type Resp_dismiss_group ¶
type Resp_force_logout ¶
type Resp_get_all_users_uid ¶
type Resp_get_black_list ¶
type Resp_get_black_list struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data struct { Blacks []struct { OwnerUserID string `json:"ownerUserID"` CreateTime int `json:"createTime"` BlackUserInfo struct { UserID string `json:"userID"` Nickname string `json:"nickname"` FaceURL string `json:"faceURL"` Ex string `json:"ex"` } `json:"blackUserInfo"` AddSource int `json:"addSource"` OperatorUserID string `json:"operatorUserID"` Ex string `json:"ex"` } `json:"blacks"` Total int `json:"total"` } `json:"data"` }
type Resp_get_friend_apply_list ¶
type Resp_get_friend_apply_list struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data struct { FriendRequests []struct { FromUserID string `json:"fromUserID"` FromNickname string `json:"fromNickname"` FromFaceURL string `json:"fromFaceURL"` ToUserID string `json:"toUserID"` ToNickname string `json:"toNickname"` ToFaceURL string `json:"toFaceURL"` HandleResult int `json:"handleResult"` ReqMsg string `json:"reqMsg"` CreateTime int64 `json:"createTime"` HandlerUserID string `json:"handlerUserID"` HandleMsg string `json:"handleMsg"` HandleTime int64 `json:"handleTime"` Ex string `json:"ex"` } `json:"FriendRequests"` Total int `json:"total"` } `json:"data"` }
type Resp_get_friend_list ¶
type Resp_get_friend_list struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data struct { FriendsInfo []struct { OwnerUserID string `json:"ownerUserID"` Remark string `json:"remark"` CreateTime int `json:"createTime"` FriendUser struct { UserID string `json:"userID"` Nickname string `json:"nickname"` FaceURL string `json:"faceURL"` Ex string `json:"ex"` CreateTime int `json:"createTime"` AppMangerLevel int `json:"appMangerLevel"` GlobalRecvMsgOpt int `json:"globalRecvMsgOpt"` } `json:"friendUser"` AddSource int `json:"addSource"` OperatorUserID string `json:"operatorUserID"` Ex string `json:"ex"` } `json:"friendsInfo"` Total int `json:"total"` } `json:"data"` }
type Resp_get_group_member_list ¶
type Resp_get_group_member_list struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data struct { Total int `json:"total"` Members []struct { GroupID string `json:"groupID"` UserID string `json:"userID"` RoleLevel int `json:"roleLevel"` JoinTime int64 `json:"joinTime"` Nickname string `json:"nickname"` FaceURL string `json:"faceURL"` AppMangerLevel int `json:"appMangerLevel"` JoinSource int `json:"joinSource"` OperatorUserID string `json:"operatorUserID"` Ex string `json:"ex"` MuteEndTime int `json:"muteEndTime"` InviterUserID string `json:"inviterUserID"` } `json:"members"` } `json:"data"` }
type Resp_get_group_members_info ¶
type Resp_get_group_members_info struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data struct { Members []struct { GroupID string `json:"groupID"` UserID string `json:"userID"` RoleLevel int `json:"roleLevel"` JoinTime int64 `json:"joinTime"` Nickname string `json:"nickname"` FaceURL string `json:"faceURL"` AppMangerLevel int `json:"appMangerLevel"` JoinSource int `json:"joinSource"` OperatorUserID string `json:"operatorUserID"` Ex string `json:"ex"` MuteEndTime int `json:"muteEndTime"` InviterUserID string `json:"inviterUserID"` } `json:"members"` } `json:"data"` }
type Resp_get_group_users_req_application_list ¶
type Resp_get_group_users_req_application_list struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data struct { Total int `json:"total"` GroupRequests []struct { UserInfo struct { UserID string `json:"userID"` Nickname string `json:"nickname"` FaceURL string `json:"faceURL"` Ex string `json:"ex"` } `json:"userInfo"` GroupInfo struct { GroupID string `json:"groupID"` GroupName string `json:"groupName"` Notification string `json:"notification"` Introduction string `json:"introduction"` FaceURL string `json:"faceURL"` OwnerUserID string `json:"ownerUserID"` CreateTime int64 `json:"createTime"` MemberCount int `json:"memberCount"` Ex string `json:"ex"` Status int `json:"status"` CreatorUserID string `json:"creatorUserID"` GroupType int `json:"groupType"` NeedVerification int `json:"needVerification"` LookMemberInfo int `json:"lookMemberInfo"` ApplyMemberFriend int `json:"applyMemberFriend"` NotificationUpdateTime int `json:"notificationUpdateTime"` NotificationUserID string `json:"notificationUserID"` } `json:"groupInfo"` HandleResult int `json:"handleResult"` ReqMsg string `json:"reqMsg"` HandleMsg string `json:"handleMsg"` ReqTime int64 `json:"reqTime"` HandleUserID string `json:"handleUserID"` HandleTime int `json:"handleTime"` Ex string `json:"ex"` JoinSource int `json:"joinSource"` InviterUserID string `json:"inviterUserID"` } `json:"groupRequests"` } `json:"data"` }
type Resp_get_groups_info ¶
type Resp_get_recv_group_applicationList ¶
type Resp_get_recv_group_applicationList struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data struct { Total int `json:"total"` GroupRequests []struct { UserInfo struct { UserID string `json:"userID"` Nickname string `json:"nickname"` FaceURL string `json:"faceURL"` Ex string `json:"ex"` } `json:"userInfo"` GroupInfo struct { GroupID string `json:"groupID"` GroupName string `json:"groupName"` Notification string `json:"notification"` Introduction string `json:"introduction"` FaceURL string `json:"faceURL"` OwnerUserID string `json:"ownerUserID"` CreateTime int64 `json:"createTime"` MemberCount int `json:"memberCount"` Ex string `json:"ex"` Status int `json:"status"` CreatorUserID string `json:"creatorUserID"` GroupType int `json:"groupType"` NeedVerification int `json:"needVerification"` LookMemberInfo int `json:"lookMemberInfo"` ApplyMemberFriend int `json:"applyMemberFriend"` NotificationUpdateTime int `json:"notificationUpdateTime"` NotificationUserID string `json:"notificationUserID"` } `json:"groupInfo"` HandleResult int `json:"handleResult"` ReqMsg string `json:"reqMsg"` HandleMsg string `json:"handleMsg"` ReqTime int64 `json:"reqTime"` HandleUserID string `json:"handleUserID"` HandleTime int `json:"handleTime"` Ex string `json:"ex"` JoinSource int `json:"joinSource"` InviterUserID string `json:"inviterUserID"` } `json:"groupRequests"` } `json:"data"` }
type Resp_get_self_friend_apply_list ¶
type Resp_get_self_friend_apply_list struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data struct { FriendRequests []struct { FromUserID string `json:"fromUserID"` FromNickname string `json:"fromNickname"` FromFaceURL string `json:"fromFaceURL"` ToUserID string `json:"toUserID"` ToNickname string `json:"toNickname"` ToFaceURL string `json:"toFaceURL"` HandleResult int `json:"handleResult"` ReqMsg string `json:"reqMsg"` CreateTime int64 `json:"createTime"` HandlerUserID string `json:"handlerUserID"` HandleMsg string `json:"handleMsg"` HandleTime int64 `json:"handleTime"` Ex string `json:"ex"` } `json:"friendRequests"` Total int `json:"total"` } `json:"data"` }
type Resp_get_subscribe_users_status ¶
type Resp_get_subscribe_users_status struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data struct { StatusList []struct { UserID string `json:"userID"` Status int `json:"status"` PlatformIDs interface{} `json:"platformIDs"` } `json:"statusList"` } `json:"data"` }
type Resp_get_user_req_group_applicationList ¶
type Resp_get_user_req_group_applicationList struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data struct { Total int `json:"total"` GroupRequests []struct { UserInfo struct { UserID string `json:"userID"` Nickname string `json:"nickname"` FaceURL string `json:"faceURL"` Ex string `json:"ex"` } `json:"userInfo"` GroupInfo struct { GroupID string `json:"groupID"` GroupName string `json:"groupName"` Notification string `json:"notification"` Introduction string `json:"introduction"` FaceURL string `json:"faceURL"` OwnerUserID string `json:"ownerUserID"` CreateTime int64 `json:"createTime"` MemberCount int `json:"memberCount"` Ex string `json:"ex"` Status int `json:"status"` CreatorUserID string `json:"creatorUserID"` GroupType int `json:"groupType"` NeedVerification int `json:"needVerification"` LookMemberInfo int `json:"lookMemberInfo"` ApplyMemberFriend int `json:"applyMemberFriend"` NotificationUpdateTime int `json:"notificationUpdateTime"` NotificationUserID string `json:"notificationUserID"` } `json:"groupInfo"` HandleResult int `json:"handleResult"` ReqMsg string `json:"reqMsg"` HandleMsg string `json:"handleMsg"` ReqTime int64 `json:"reqTime"` HandleUserID string `json:"handleUserID"` HandleTime int `json:"handleTime"` Ex string `json:"ex"` JoinSource int `json:"joinSource"` InviterUserID string `json:"inviterUserID"` } `json:"groupRequests"` } `json:"data"` }
type Resp_get_users ¶
type Resp_get_users struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data struct { Total int `json:"total"` Users []struct { UserID string `json:"userID"` Nickname string `json:"nickname"` FaceURL string `json:"faceURL"` Ex string `json:"ex"` CreateTime int64 `json:"createTime"` AppMangerLevel int `json:"appMangerLevel"` GlobalRecvMsgOpt int `json:"globalRecvMsgOpt"` } `json:"users"` } `json:"data"` }
type Resp_get_users_info ¶
type Resp_get_users_info struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data struct { UsersInfo []struct { UserID string `json:"userID"` Nickname string `json:"nickname"` FaceURL string `json:"faceURL"` Ex string `json:"ex"` CreateTime int64 `json:"createTime"` AppMangerLevel int `json:"appMangerLevel"` GlobalRecvMsgOpt int `json:"globalRecvMsgOpt"` } `json:"usersInfo"` } `json:"data"` }
type Resp_get_users_online_status ¶
type Resp_get_users_online_status struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data []struct { UserID string `json:"userID"` Status string `json:"status"` DetailPlatformStatus []struct { Platform string `json:"platform"` Status string `json:"status"` ConnID string `json:"connID"` IsBackground bool `json:"isBackground"` Token string `json:"token"` } `json:"detailPlatformStatus"` } `json:"data"` }
type Resp_get_users_online_token_detail ¶
type Resp_get_users_online_token_detail struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data []struct { UserID string `json:"userID"` Status string `json:"status"` SinglePlatformToken []struct { Platform string `json:"platform"` Total int `json:"total"` Token []string `json:"token"` } `json:"singlePlatformToken"` } `json:"data"` }
type Resp_import_friend ¶
type Resp_is_friend ¶
type Resp_join_group ¶
type Resp_kick_group ¶
type Resp_mute_group ¶
type Resp_mute_group_member ¶
type Resp_quit_group ¶
type Resp_remove_black ¶
type Resp_revoke_msg ¶
type Resp_send_msg ¶
type Resp_set_friend_remark ¶
type Resp_set_group_info ¶
type Resp_subscribe_users_status ¶
type Resp_subscribe_users_status struct { ErrCode int `json:"errCode"` ErrMsg string `json:"errMsg"` ErrDlt string `json:"errDlt"` Data struct { StatusList []struct { UserID string `json:"userID"` Status int `json:"status"` PlatformIDs []int `json:"platformIDs"` } `json:"statusList"` } `json:"data"` }
type Resp_transfer_group ¶
type Resp_update_user_info ¶
type Resp_user_clear_all_msg ¶
type Resp_user_register ¶
type Resp_user_token ¶
Click to show internal directories.
Click to hide internal directories.