Documentation
¶
Index ¶
- type IdsDB
- func (db *IdsDB) Close()
- func (db *IdsDB) Gc()
- func (db *IdsDB) GetByTgIds(tgAccount, xmppAccount string, tgChatId, tgMsgId int64) (string, error)
- func (db *IdsDB) GetByXmppId(tgAccount, xmppAccount, xmppId string) (int64, int64, error)
- func (db *IdsDB) ReplaceIdPair(tgAccount, xmppAccount, oldXmppId, newXmppId string, newMsgId int64) error
- func (db *IdsDB) ReplaceTgId(tgAccount, xmppAccount string, chatId, oldMsgId, newMsgId int64) error
- func (db *IdsDB) ReplaceXmppId(tgAccount, xmppAccount, oldXmppId, newXmppId string) error
- func (db *IdsDB) Set(tgAccount, xmppAccount string, tgChatId, tgMsgId int64, xmppId string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IdsDB ¶
type IdsDB struct {
// contains filtered or unexported fields
}
IdsDB represents a Badger database
func (*IdsDB) GetByTgIds ¶
GetByTgIds obtains an XMPP id by Telegram chat/message ids
func (*IdsDB) GetByXmppId ¶
GetByXmppId obtains Telegram chat/message ids by an XMPP id
func (*IdsDB) ReplaceIdPair ¶
func (db *IdsDB) ReplaceIdPair(tgAccount, xmppAccount, oldXmppId, newXmppId string, newMsgId int64) error
ReplaceIdPair replaces an old entry by XMPP ID with both new XMPP and Tg ID
func (*IdsDB) ReplaceTgId ¶
ReplaceTgId replaces an old Tg ID with new Tg ID and keeps Tg chat ID and XMPP ID intact
func (*IdsDB) ReplaceXmppId ¶
ReplaceXmppId replaces an old XMPP ID with new XMPP ID and keeps Tg ID intact
Click to show internal directories.
Click to hide internal directories.