Documentation
¶
Index ¶
Constants ¶
View Source
const ( WSGetNewestSeq = 1001 WSPullMsgBySeqList = 1002 WSGetNewestGroupSeq = 1003 WSPullMsgByGroupSeqList = 1004 WSSendMsg = 2001 WSPushMsg = 2002 WSGroupPushMsg = 2003 WSErrorMsg = 3001 )
msg-gateway 用到的
View Source
const ( SingleChatType = 1 GroupChatType = 2 )
msg 用到的
View Source
const ( //OptionsKey IsHistory = "IsHistory" // 存储到 mongodb/cassandra IsPersistent = "IsPersistent" // 存储到 持久层 IsLocal = "IsLocal" // 存储到 客户端本地 UnreadCount = "UnreadCount" // 是否更新未读数 UpdateConversation = "UpdateConversation" // 更新会话 NeedBeFriend = "NeedBeFriend" // 是否需要成为好友 IsOfflinePush = "IsOfflinePush" // 是否离线推送 IsSenderSync = "IsSenderSync" // 是否需要同步给发送者 )
options
View Source
const ( ErrCodeOK = iota // 成功 ErrCodeFailed // 失败 ErrCodeLimit // 限流 ErrCodeProtoUnmarshal = 400 // proto解析错误 ErrCodeParams = 401 // 参数错误 )
error code
View Source
const ( //Platform ID IOSPlatformID = 1 AndroidPlatformID = 2 WindowsPlatformID = 3 OSXPlatformID = 4 LinuxPlatformID = 5 WebPlatformID = 6 MiniWebPlatformID = 7 //Platform string match to Platform ID IOSPlatformStr = "IOS" AndroidPlatformStr = "Android" WindowsPlatformStr = "Windows" OSXPlatformStr = "OSX" WebPlatformStr = "Web" MiniWebPlatformStr = "MiniWeb" LinuxPlatformStr = "Linux" //terminal types TerminalPC = "PC" TerminalMobile = "Mobile" )
View Source
const ( RedisKeyUserIncrSeq = "REDIS_USER_INCR_SEQ:" // user incr seq RedisKeyGroupIncrSeq = "REDIS_GROUP_INCR_SEQ:" // user incr seq RedisKeyGroupMinSeq = "REDIS_GROUP_MIN_SEQ:" // user incr seq RedisKeyUserMinSeq = "REDIS_USER_MIN_SEQ:" RedisKeyUserConn = "REDIS_USER_CONN:" )
View Source
const (
AtAllString = "AtAllTag"
)
Variables ¶
View Source
var Platform2class = map[string]string{ IOSPlatformStr: TerminalMobile, AndroidPlatformStr: TerminalMobile, MiniWebPlatformStr: WebPlatformStr, WebPlatformStr: WebPlatformStr, WindowsPlatformStr: TerminalPC, OSXPlatformStr: TerminalPC, LinuxPlatformStr: TerminalPC, }
Functions ¶
func PlatformIDToName ¶
func PlatformNameToClass ¶
func PlatformNameToID ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.