store

package
v0.0.0-...-a0a47c7 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type StateStore

type StateStore struct {
	DB *sql.DB
	// contains filtered or unexported fields
}

func NewStateStore

func NewStateStore(db *sql.DB, dialect string, botUsername mid.UserID) *StateStore

func (*StateStore) CreateTables

func (store *StateStore) CreateTables() error

func (*StateStore) FindSharedRooms

func (store *StateStore) FindSharedRooms(userId mid.UserID) []mid.RoomID

func (*StateStore) GetChatwootConversationIDFromMatrixRoom

func (store *StateStore) GetChatwootConversationIDFromMatrixRoom(roomID mid.RoomID) (int, error)

func (*StateStore) GetChatwootMessageIdForMatrixEventId

func (store *StateStore) GetChatwootMessageIdForMatrixEventId(matrixEventId mid.EventID) (int, error)

func (*StateStore) GetEncryptionEvent

func (store *StateStore) GetEncryptionEvent(roomID mid.RoomID) *mevent.EncryptionEventContent

func (*StateStore) GetMatrixEventIdsForChatwootMessage

func (store *StateStore) GetMatrixEventIdsForChatwootMessage(chatwootMessageId int) []mid.EventID

func (*StateStore) GetMatrixRoomFromChatwootConversation

func (store *StateStore) GetMatrixRoomFromChatwootConversation(conversationID int) (mid.RoomID, mid.EventID, error)

func (*StateStore) GetNonBotRoomMembers

func (store *StateStore) GetNonBotRoomMembers(roomId mid.RoomID) []mid.UserID

func (*StateStore) GetRoomMembers

func (store *StateStore) GetRoomMembers(roomId mid.RoomID) []mid.UserID

func (*StateStore) IsEncrypted

func (store *StateStore) IsEncrypted(roomID mid.RoomID) bool

IsEncrypted returns whether a room is encrypted.

func (*StateStore) LoadFilterID

func (store *StateStore) LoadFilterID(userID mid.UserID) string

func (*StateStore) LoadNextBatch

func (store *StateStore) LoadNextBatch(userID mid.UserID) string

func (*StateStore) LoadRoom

func (store *StateStore) LoadRoom(roomId mid.RoomID) *mautrix.Room

func (*StateStore) SaveFilterID

func (store *StateStore) SaveFilterID(userID mid.UserID, filterID string)

func (*StateStore) SaveNextBatch

func (store *StateStore) SaveNextBatch(userID mid.UserID, nextBatchToken string)

func (*StateStore) SaveRoom

func (store *StateStore) SaveRoom(room *mautrix.Room)

func (*StateStore) SetChatwootMessageIdForMatrixEvent

func (store *StateStore) SetChatwootMessageIdForMatrixEvent(eventID mid.EventID, chatwootMessageId int) error

func (*StateStore) SetEncryptionEvent

func (store *StateStore) SetEncryptionEvent(event *mevent.Event)

func (*StateStore) SetMembership

func (store *StateStore) SetMembership(event *mevent.Event)

func (*StateStore) UpdateConversationIdForRoom

func (store *StateStore) UpdateConversationIdForRoom(roomID mid.RoomID, conversationID int) error

func (*StateStore) UpdateMostRecentEventIdForRoom

func (store *StateStore) UpdateMostRecentEventIdForRoom(roomID mid.RoomID, mostRecentEventID mid.EventID) error

Jump to

Keyboard shortcuts

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