Documentation ¶
Index ¶
- type Dao
- func (d *Dao) DeleteByMessageIdList(ctx context.Context, userId int64, idList []int32) (rowsAffected int64, err error)
- func (d *Dao) DeleteInboxMessages(ctx context.Context, deleteUserId int64, deleteMsgDataIds []int64, ...) error
- func (d *Dao) DeleteMessages(ctx context.Context, userId int64, msgIds []int32) ([]int64, error)
- func (d *Dao) DeletePhoneCallHistory(ctx context.Context, userId int64) ([]int32, []int64, error)
- func (d *Dao) EditChatInboxMessage(ctx context.Context, fromId int64, peerChatId, toId int64, ...) (box *mtproto.MessageBox, err error)
- func (d *Dao) EditChatOutboxMessage(ctx context.Context, fromId, toId int64, message *mtproto.Message) (*mtproto.MessageBox, error)
- func (d *Dao) EditUserInboxMessage(ctx context.Context, fromId, peerId int64, message *mtproto.Message) (box *mtproto.MessageBox, err error)
- func (d *Dao) EditUserOutboxMessage(ctx context.Context, fromId, toId int64, message *mtproto.Message) (*mtproto.MessageBox, error)
- func (d *Dao) GetDuplicateMessage(ctx context.Context, senderUserId, clientRandomId int64) (*mtproto.Updates, error)
- func (d *Dao) GetLastMessageAndIdListByDialog(ctx context.Context, userId int64, peer *mtproto.PeerUtil) (lastMessage *mtproto.Message, idList []int32)
- func (d *Dao) GetMessageIdListByDialog(ctx context.Context, userId int64, peer *mtproto.PeerUtil) []int32
- func (d *Dao) GetPeerDialogMessageIdList(ctx context.Context, userId int64, idList []int32) map[int64][]int32
- func (d *Dao) HasDuplicateMessage(ctx context.Context, senderUserId, clientRandomId int64) (bool, error)
- func (d *Dao) PutDuplicateMessage(ctx context.Context, senderUserId, clientRandomId int64, upd *mtproto.Updates) error
- func (d *Dao) SendChatMessage(ctx context.Context, fromId, chatId int64, outBox *msg.OutboxMessage) (*mtproto.MessageBox, error)
- func (d *Dao) SendChatMessageToInbox(ctx context.Context, fromId, chatId, toId int64, ...) (*mtproto.MessageBox, error)
- func (d *Dao) SendChatMultiMessage(ctx context.Context, fromId, chatId int64, outBoxList []*msg.OutboxMessage) ([]*mtproto.MessageBox, error)
- func (d *Dao) SendChatMultiMessageToInbox(ctx context.Context, fromId, chatId, toId int64, ...) ([]*mtproto.MessageBox, error)
- func (d *Dao) SendUserMessage(ctx context.Context, fromId, toId int64, outBox *msg.OutboxMessage) (*mtproto.MessageBox, error)
- func (d *Dao) SendUserMessageToInbox(ctx context.Context, fromId, toId int64, dialogMessageId, clientRandomId int64, ...) (*mtproto.MessageBox, error)
- func (d *Dao) SendUserMultiMessage(ctx context.Context, fromId, toId int64, outBoxList []*msg.OutboxMessage) ([]*mtproto.MessageBox, error)
- func (d *Dao) SendUserMultiMessageToInbox(ctx context.Context, fromId, toId int64, inBoxList []*inbox.InboxMessageData) ([]*mtproto.MessageBox, error)
- type Mysql
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct { *Mysql KV kv.Store idgen_client.IDGenClient2 user_client.UserClient chat_client.ChatClient inbox_client.InboxClient SyncClient sync_client.SyncClient BotSyncClient sync_client.SyncClient dialog_client.DialogClient }
func (*Dao) DeleteByMessageIdList ¶
func (*Dao) DeleteInboxMessages ¶
func (*Dao) DeleteMessages ¶
func (*Dao) DeletePhoneCallHistory ¶
func (*Dao) EditChatInboxMessage ¶
func (*Dao) EditChatOutboxMessage ¶
func (*Dao) EditUserInboxMessage ¶
func (*Dao) EditUserOutboxMessage ¶
func (*Dao) GetDuplicateMessage ¶
func (*Dao) GetLastMessageAndIdListByDialog ¶
func (*Dao) GetMessageIdListByDialog ¶
func (*Dao) GetPeerDialogMessageIdList ¶
func (*Dao) HasDuplicateMessage ¶
func (*Dao) PutDuplicateMessage ¶
func (*Dao) SendChatMessage ¶
func (d *Dao) SendChatMessage(ctx context.Context, fromId, chatId int64, outBox *msg.OutboxMessage) (*mtproto.MessageBox, error)
func (*Dao) SendChatMessageToInbox ¶
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 (*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 ¶
type Mysql struct { *sqlx.DB *mysql_dao.MessagesDAO *mysql_dao.ChatParticipantsDAO *mysql_dao.HashTagsDAO *mysql_dao.DialogsDAO *sqlx.CommonDAO }
func NewMysqlDao ¶
Click to show internal directories.
Click to hide internal directories.