sqlite

package
v0.0.0-...-e41826d Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const ErrNoRowsStr = "sql: no rows in result set"

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

Backend implements a matrix storage backend using sqlite

func New

func New(path string) *Backend

func (*Backend) AccessToken

func (b *Backend) AccessToken() string

AccessToken implements the Backend interface

func (*Backend) Account

func (b *Backend) Account() string

func (*Backend) AccountData

func (b *Backend) AccountData(room *matrix.Room, type_ string) (matrix.AccountDataEvent, bool)

AccountData implements the Backend interface

func (*Backend) AddInboundGroupSession

func (b *Backend) AddInboundGroupSession(roomID, deviceKey, sessionID, session string)

func (*Backend) AddLatestEvents

func (b *Backend) AddLatestEvents(room matrix.Room, events []matrix.Event, prevBatch string)

func (*Backend) Close

func (b *Backend) Close()

Close closes the underlying database. After calling Close() the Backend will become unusable

func (*Backend) DeviceID

func (b *Backend) DeviceID() string

DeviceID implements the Backend interface

func (*Backend) DeviceInfo

func (b *Backend) DeviceInfo(user matrix.User, id string) (matrix.DeviceInfo, bool)

func (*Backend) DeviceList

func (b *Backend) DeviceList(user matrix.User) []matrix.Device

func (*Backend) DeviceListUntrack

func (b *Backend) DeviceListUntrack(user matrix.User)

func (*Backend) DeviceListUpdate

func (b *Backend) DeviceListUpdate(user matrix.User, devices []matrix.DeviceInfo)

func (*Backend) InboundGroupSession

func (b *Backend) InboundGroupSession(roomID, deviceKey, sessionID string) string

func (*Backend) Initialize

func (b *Backend) Initialize(mxid, deviceID, accessToken string)

Initialize implements the backend interface

func (*Backend) LatestEvents

func (b *Backend) LatestEvents(room matrix.Room) (events []matrix.Event, prevBatch string)

func (*Backend) MxID

func (b *Backend) MxID() string

MxID implements the Backend interface

func (*Backend) Open

func (b *Backend) Open(mxid, deviceID string) error

func (*Backend) OutboundGroupSessions

func (b *Backend) OutboundGroupSessions(roomID string) []string

func (*Backend) RoomState

func (b *Backend) RoomState(room matrix.Room, type_ string, key string) (matrix.StateEvent, bool)

func (*Backend) RoomStateList

func (b *Backend) RoomStateList(room matrix.Room, type_ string) []matrix.StateEvent

func (*Backend) Sessions

func (b *Backend) Sessions(deviceKey string) []string

func (*Backend) UpdateAccount

func (b *Backend) UpdateAccount(account string)

func (*Backend) UpdateAccountData

func (b *Backend) UpdateAccountData(event matrix.AccountDataEvent)

func (*Backend) UpdateOutboundGroupSessions

func (b *Backend) UpdateOutboundGroupSessions(roomID string, sessions []string)

func (*Backend) UpdateRoomState

func (b *Backend) UpdateRoomState(event matrix.StateEvent)

func (*Backend) UpdateSessions

func (b *Backend) UpdateSessions(deviceKey string, sessions []string)

Jump to

Keyboard shortcuts

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