Documentation ¶
Index ¶
Constants ¶
View Source
const ( // StatusMenusNormal 表示菜单状态正常 StatusMenusNormal = 1 // StatusMenusForbidden 表示菜单被禁止 StatusMenusForbidden = 2 // StatusUserNormal 表示账号正常状态 StatusUserNormal = 1 // StatusUserForbidden 表示账号处理停用状态 StatusUserForbidden = 2 )
View Source
const ( MsgText = "文本" MsgLocation = "位置" MsgFace = "表情" MsgSound = "语音" MsgImage = "图片" MsgFile = "文件" MsgVideo = "视频" MsgRelay = "合并转发消息" MsgCustom = "自定义" )
View Source
const ( TIMTextElem = "TIMTextElem" TIMLocationElem = "TIMLocationElem" TIMFaceElem = "TIMFaceElem" TIMSoundElem = "TIMSoundElem" TIMCustomElem = "TIMCustomElem" TIMImageElem = "TIMImageElem" TIMFileElem = "TIMFileElem" TIMVideoFileElem = "TIMVideoFileElem" TIMRelayElem = "TIMRelayElem" )
View Source
const ( //Platform ID IOSPlatformID = 1 AndroidPlatformID = 2 WindowsPlatformID = 3 OSXPlatformID = 4 WebPlatformID = 5 MiniWebPlatformID = 6 LinuxPlatformID = 7 AndroidPadPlatformID = 8 IPadPlatformID = 9 AdminPlatformID = 10 //Platform string match to Platform ID IOSPlatformStr = "IOS" AndroidPlatformStr = "Android" WindowsPlatformStr = "Windows" OSXPlatformStr = "OSX" WebPlatformStr = "Web" MiniWebPlatformStr = "MiniWeb" LinuxPlatformStr = "Linux" AndroidPadPlatformStr = "APad" IPadPlatformStr = "IPad" AdminPlatformStr = "Admin" //terminal types TerminalPC = "PC" TerminalMobile = "Mobile" )
View Source
const ( IPBlackList = "IM_IP_BLACK_LIST" IPWhiteList = "IM_IP_WHITE_LIST" GroupMemberNotificationStatus = "IM_GROUP_MEMBER_NOTIFICATION_LIST:" )
View Source
const ( PullSingleChatHistoryMsgApi = "v4/openim/admin_getroammsg" PullGroupChatHistoryMsgApi = "v4/group_open_http_svc/group_msg_get_simple" PullFriendListApi = "v4/sns/friend_get" //拉取用户好友列表接口 AddFriendApi = "v4/sns/friend_add" //添加用户好友接口 DeleteFriendApi = "v4/sns/friend_delete" //删除用户好友接口 AddBlackListApi = "v4/sns/black_list_add" //拉黑用户好友接口 SendMsgToAllUserApi = "v4/all_member_push/im_push" SendMsgToBatchUserApi = "v4/openim/batchsendmsg" AddSensitiveApi = "v4/im_msg_audit_mgr/add_cloud_audit_keywords" //添加敏感词接口 DeleteSensitiveApi = "v4/im_msg_audit_mgr/delete_cloud_audit_keywords" //删除敏感词接口 )
View Source
const NormalErrPrefix = "NORMAL_ERROR@"
Variables ¶
View Source
var ( OK = ErrInfo{0, ""} ErrServer = ErrInfo{500, "server error"} ErrParams = ErrInfo{ErrCode: 400, ErrMsg: "接口参数错误"} ErrParseToken = ErrInfo{700, "parse token failed"} ErrTokenExpired = ErrInfo{701, "token is timed out, please log in again"} ErrTokenInvalid = ErrInfo{702, "token is invalid"} ErrTokenMalformed = ErrInfo{703, "that's not even a token"} ErrTokenNotValidYet = ErrInfo{704, "token has been invalidated"} ErrTokenUnknown = ErrInfo{705, "that's not even a token"} ErrTokenKicked = ErrInfo{706, "user has been kicked"} ErrTokenDifferentPlatformID = ErrInfo{707, "different platformID"} ErrTokenDifferentUserID = ErrInfo{708, "different userID"} ErrAccess = ErrInfo{ErrCode: 801, ErrMsg: "no permission"} ErrDB = ErrInfo{ErrCode: 802, ErrMsg: "db failed"} ErrArgs = ErrInfo{ErrCode: 803, ErrMsg: "args failed"} ErrStatus = ErrInfo{ErrCode: 804, ErrMsg: "status is abnormal"} ErrCallback = ErrInfo{ErrCode: 809, ErrMsg: "callback failed"} ErrSendLimit = ErrInfo{ErrCode: 810, ErrMsg: "send msg limit, to many request, try again later"} ErrMessageHasReadDisable = ErrInfo{ErrCode: 811, ErrMsg: "message has read disable"} ErrInternal = ErrInfo{ErrCode: 812, ErrMsg: "internal error"} ErrWsConnNotExist = ErrInfo{ErrCode: 813, ErrMsg: "ws conn not exist"} ErrAccountHasRegistered = ErrInfo{ErrCode: 10002, ErrMsg: "account has been registered"} ErrAccountHasNotRegister = ErrInfo{ErrCode: 10003, ErrMsg: "account have not register"} ErrPasswordError = ErrInfo{ErrCode: 10004, ErrMsg: "password error"} ErrUpdateError = ErrInfo{ErrCode: 10005, ErrMsg: "update error"} ErrRepeatedError = ErrInfo{ErrCode: 10005, ErrMsg: "repeated error"} )
View Source
var PlatformID2Name = map[int]string{ IOSPlatformID: IOSPlatformStr, AndroidPlatformID: AndroidPlatformStr, WindowsPlatformID: WindowsPlatformStr, OSXPlatformID: OSXPlatformStr, WebPlatformID: WebPlatformStr, MiniWebPlatformID: MiniWebPlatformStr, LinuxPlatformID: LinuxPlatformStr, AndroidPadPlatformID: AndroidPadPlatformStr, IPadPlatformID: IPadPlatformStr, AdminPlatformID: AdminPlatformStr, }
View Source
var PlatformID2class = map[int]string{ IOSPlatformID: TerminalMobile, AndroidPlatformID: TerminalMobile, MiniWebPlatformID: WebPlatformStr, WebPlatformID: WebPlatformStr, WindowsPlatformID: TerminalPC, OSXPlatformID: TerminalPC, LinuxPlatformID: TerminalPC, }
View Source
var PlatformName2ID = map[string]int{ IOSPlatformStr: IOSPlatformID, AndroidPlatformStr: AndroidPlatformID, WindowsPlatformStr: WindowsPlatformID, OSXPlatformStr: OSXPlatformID, WebPlatformStr: WebPlatformID, MiniWebPlatformStr: MiniWebPlatformID, LinuxPlatformStr: LinuxPlatformID, AndroidPadPlatformStr: AndroidPadPlatformID, IPadPlatformStr: IPadPlatformID, AdminPlatformStr: AdminPlatformID, }
View Source
var PlatformName2class = map[string]string{ IOSPlatformStr: TerminalMobile, AndroidPlatformStr: TerminalMobile, MiniWebPlatformStr: WebPlatformStr, WebPlatformStr: WebPlatformStr, WindowsPlatformStr: TerminalPC, OSXPlatformStr: TerminalPC, LinuxPlatformStr: TerminalPC, }
View Source
var TIMElemIDToName = map[string]string{ TIMTextElem: MsgText, TIMLocationElem: MsgLocation, TIMFaceElem: MsgFace, TIMSoundElem: MsgSound, TIMCustomElem: MsgCustom, TIMImageElem: MsgImage, TIMFileElem: MsgFile, TIMVideoFileElem: MsgVideo, TIMRelayElem: MsgRelay, }
Functions ¶
func PlatformIDToClass ¶
func PlatformIDToName ¶
func PlatformNameToClass ¶
func PlatformNameToID ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.