dao

package
v0.86.2 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dao

func (*Dao) DeleteByMessageIdList

func (d *Dao) DeleteByMessageIdList(ctx context.Context, userId int64, idList []int32) (rowsAffected int64, err error)

func (*Dao) DeleteInboxMessages

func (d *Dao) DeleteInboxMessages(ctx context.Context, deleteUserId int64, deleteMsgDataIds []int64, cb func(ctx context.Context, userId int64, idList []int32)) error

func (*Dao) DeleteMessages

func (d *Dao) DeleteMessages(ctx context.Context, userId int64, msgIds []int32) ([]int64, error)

func (*Dao) DeletePhoneCallHistory

func (d *Dao) DeletePhoneCallHistory(ctx context.Context, userId int64) ([]int32, []int64, error)

func (*Dao) EditChatInboxMessage

func (d *Dao) EditChatInboxMessage(ctx context.Context, fromId int64, peerChatId, toId int64, message *mtproto.Message) (box *mtproto.MessageBox, err error)

func (*Dao) EditChatOutboxMessage

func (d *Dao) EditChatOutboxMessage(ctx context.Context, fromId, toId int64, message *mtproto.Message) (*mtproto.MessageBox, error)

func (*Dao) EditUserInboxMessage

func (d *Dao) EditUserInboxMessage(ctx context.Context, fromId, peerId int64, message *mtproto.Message) (box *mtproto.MessageBox, err error)

func (*Dao) EditUserOutboxMessage

func (d *Dao) EditUserOutboxMessage(ctx context.Context, fromId, toId int64, message *mtproto.Message) (*mtproto.MessageBox, error)

func (*Dao) GetDuplicateMessage

func (d *Dao) GetDuplicateMessage(ctx context.Context, senderUserId, clientRandomId int64) (*mtproto.Updates, error)

func (*Dao) GetLastMessageAndIdListByDialog

func (d *Dao) GetLastMessageAndIdListByDialog(ctx context.Context, userId int64, peer *mtproto.PeerUtil) (lastMessage *mtproto.Message, idList []int32)

func (*Dao) GetMessageIdListByDialog

func (d *Dao) GetMessageIdListByDialog(ctx context.Context, userId int64, peer *mtproto.PeerUtil) []int32

func (*Dao) GetPeerDialogMessageIdList

func (d *Dao) GetPeerDialogMessageIdList(ctx context.Context, userId int64, idList []int32) map[int64][]int32

func (*Dao) HasDuplicateMessage

func (d *Dao) HasDuplicateMessage(ctx context.Context, senderUserId, clientRandomId int64) (bool, error)

func (*Dao) PutDuplicateMessage

func (d *Dao) PutDuplicateMessage(ctx context.Context, senderUserId, clientRandomId int64, upd *mtproto.Updates) error

func (*Dao) SendChatMessage

func (d *Dao) SendChatMessage(ctx context.Context, fromId, chatId int64, outBox *msg.OutboxMessage) (*mtproto.MessageBox, error)

func (*Dao) SendChatMessageToInbox

func (d *Dao) SendChatMessageToInbox(ctx context.Context, fromId, chatId, toId int64, dialogMessageId, clientRandomId int64, message *mtproto.Message) (*mtproto.MessageBox, error)

func (*Dao) SendChatMultiMessage

func (d *Dao) SendChatMultiMessage(ctx context.Context, fromId, chatId int64, outBoxList []*msg.OutboxMessage) ([]*mtproto.MessageBox, error)

func (*Dao) SendChatMultiMessageToInbox

func (d *Dao) SendChatMultiMessageToInbox(ctx context.Context, fromId, chatId, toId int64, inBoxList []*inbox.InboxMessageData) ([]*mtproto.MessageBox, error)

func (*Dao) SendUserMessage

func (d *Dao) SendUserMessage(ctx context.Context, fromId, toId int64, outBox *msg.OutboxMessage) (*mtproto.MessageBox, error)

func (*Dao) SendUserMessageToInbox

func (d *Dao) SendUserMessageToInbox(ctx context.Context, fromId, toId int64, dialogMessageId, clientRandomId int64, message *mtproto.Message) (*mtproto.MessageBox, error)

func (*Dao) SendUserMultiMessage

func (d *Dao) SendUserMultiMessage(ctx context.Context, fromId, toId int64, outBoxList []*msg.OutboxMessage) ([]*mtproto.MessageBox, error)

func (*Dao) SendUserMultiMessageToInbox

func (d *Dao) SendUserMultiMessageToInbox(ctx context.Context, fromId, toId int64, inBoxList []*inbox.InboxMessageData) ([]*mtproto.MessageBox, error)

type Mysql

func NewMysqlDao

func NewMysqlDao(db *sqlx.DB) *Mysql

func (*Mysql) Close

func (d *Mysql) Close() error

func (*Mysql) Ping

func (d *Mysql) Ping(ctx context.Context) (err error)

Jump to

Keyboard shortcuts

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