container

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: GPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const CHATS_TABLE = `` /* 247-byte string literal not displayed */
View Source
const DELETE_ALL_CHATS = `DELETE FROM whatsmeow_chats WHERE our_jid = $1`
View Source
const INSERT_CHATS = `INSERT INTO whatsmeow_chats (our_jid, chat_jid, messages) VALUES ($1, $2, $3)`
View Source
const SELECT_ALL_CHATS = `SELECT messages FROM whatsmeow_chats WHERE our_jid = $1`
View Source
const SELECT_CHATS_BY_JID = `SELECT messages FROM whatsmeow_chats WHERE our_jid = $1 AND chat_jid = $2`
View Source
const UPDATE_MESSAGES_IN_CHAT = `UPDATE whatsmeow_chats SET messages = $1 WHERE our_jid = $1 AND chat_jid = $2`
View Source
const UPSERT_CHATS = `` /* 152-byte string literal not displayed */

Variables

This section is empty.

Functions

func ReleaseContainer

func ReleaseContainer(c *Container)

Types

type Container

type Container struct {
	DB *sql.DB

	NewDevice bool
	// contains filtered or unexported fields
}

func AcquireContainer

func AcquireContainer() *Container

func NewContainer

func NewContainer(options *options.Options) (*Container, error)

func (*Container) AcquireDevice

func (container *Container) AcquireDevice(hostNumber string) (*store.Device, error)

func (*Container) ClientJID

func (container *Container) ClientJID() waTypes.JID

func (*Container) FindMessageByID

func (container *Container) FindMessageByID(jid waTypes.JID, id string) *events.Message

func (*Container) GetAllChats

func (container *Container) GetAllChats() []*events.Message

func (*Container) GetChatInJID

func (container *Container) GetChatInJID(jid waTypes.JID) []*events.Message

func (*Container) GetStatusMessages

func (container *Container) GetStatusMessages() []*events.Message

func (*Container) HandleHistorySync

func (container *Container) HandleHistorySync(evt *waProto.HistorySync)

func (*Container) HandleMessageUpdates

func (container *Container) HandleMessageUpdates(evt *events.Message)

func (*Container) InitializeTables

func (container *Container) InitializeTables()

func (*Container) ParseWebMessage

func (container *Container) ParseWebMessage(chatJID waTypes.JID, webMsg *waProto.WebMessageInfo) (*events.Message, error)

func (*Container) SetClientJID

func (container *Container) SetClientJID(jid waTypes.JID)

func (*Container) UpsertMessages

func (container *Container) UpsertMessages(jid waTypes.JID, message []*events.Message)

Jump to

Keyboard shortcuts

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