core

package
v0.0.0-...-e41513e Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	TOKEN_TYPE_APNS         = 1
	TOKEN_TYPE_GCM          = 2
	TOKEN_TYPE_MPNS         = 3
	TOKEN_TYPE_SIMPLE_PUSH  = 4
	TOKEN_TYPE_UBUNTU_PHONE = 5
	TOKEN_TYPE_BLACKBERRY   = 6
	// Android里使用
	TOKEN_TYPE_INTERNAL_PUSH = 7
	// web
	TOKEN_TYPE_WEB_PUSH = 10
	TOKEN_TYPE_MAXSIZE  = 10
)

Variables

This section is empty.

Functions

func CurrentChannelMessageBoxId

func CurrentChannelMessageBoxId(key int32) (seq int64)

func CurrentChannelPtsId

func CurrentChannelPtsId(key int32) (seq int64)

func CurrentMessageBoxId

func CurrentMessageBoxId(key int32) (seq int64)

func CurrentPtsId

func CurrentPtsId(key int32) (seq int64)

func CurrentQtsId

func CurrentQtsId(key int32) (seq int64)

func CurrentSeqId

func CurrentSeqId(key int32) (seq int64)

func GetUUID

func GetUUID() (uuid int64)

func NextChannelMessageBoxId

func NextChannelMessageBoxId(key int32) (seq int64)

func NextChannelNPtsId

func NextChannelNPtsId(key int32, n int) (seq int64)

func NextChannelPtsId

func NextChannelPtsId(key int32) (seq int64)

func NextMessageBoxId

func NextMessageBoxId(key int32) (seq int64)

func NextMessageDataId

func NextMessageDataId(key int64) (seq int64)

func NextNPtsId

func NextNPtsId(key int32, n int) (seq int64)

func NextPtsId

func NextPtsId(key int32) (seq int64)

func NextQtsId

func NextQtsId(key int32) (seq int64)

func NextSeqId

func NextSeqId(key int32) (seq int64)

func RegisterCoreModel

func RegisterCoreModel(model CoreModel)

Types

type ChannelCallback

type ChannelCallback interface {
	GetTopMessageListByIdList(idList []int32) (topMessages map[int32]int32)
}

dialog#e4def5db flags:#

pinned:flags.2?true
unread_mark:flags.3?true
peer:Peer
top_message:int
read_inbox_max_id:int
read_outbox_max_id:int
unread_count:int
unread_mentions_count:int
notify_settings:PeerNotifySettings
pts:flags.0?int
draft:flags.1?DraftMessage = Dialog;

type ContactCallback

type ContactCallback interface {
	GetContactAndMutual(selfUserId, id int32) (bool, bool)
}

type CoreModel

type CoreModel interface {
	InstallModel()
	RegisterCallback(cb interface{})
}

func InstallCoreModels

func InstallCoreModels(serverId int32, inited func()) []CoreModel

必须在mysql/redis等依赖安装完后才能执行

type DialogCallback

type DialogCallback interface {
	InsertOrUpdateDialog(userId, peerType, peerId, topMessage int32, hasMentioned, isInbox bool)
	InsertOrChannelUpdateDialog(userId, peerType, peerId int32)
}

type NotifySettingCallback

type NotifySettingCallback interface {
	GetNotifySettings(selfUserId int32, peer *base.PeerUtil) *mtproto.PeerNotifySettings
}

type PhotoCallback

type PhotoCallback interface {
	GetUserProfilePhoto(photoId int64) *mtproto.UserProfilePhoto
	GetChatPhoto(photoId int64) *mtproto.ChatPhoto
	GetPhoto(photoId int64) *mtproto.Photo
}

type UsernameCallback

type UsernameCallback interface {
	GetAccountUsername(userId int32) string
	GetChannelUsername(channelId int32) string
}

Directories

Path Synopsis
Package account is a generated protocol buffer package.
Package account is a generated protocol buffer package.
Package phone_call is a generated protocol buffer package.
Package phone_call is a generated protocol buffer package.
Package user is a generated protocol buffer package.
Package user is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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