types

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

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

Functions

func PlatformIDToName

func PlatformIDToName(num int32) string

func PlatformNameToClass

func PlatformNameToClass(name string) string

func PlatformNameToID

func PlatformNameToID(name string) int32

Types

This section is empty.

Jump to

Keyboard shortcuts

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