sqlstatestore

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2023 License: MPL-2.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

View Source
const VersionTableName = "mx_version"

Variables

View Source
var UpgradeTable dbutil.UpgradeTable

Functions

This section is empty.

Types

type SQLStateStore

type SQLStateStore struct {
	*dbutil.Database
	IsBridge bool
}

func NewSQLStateStore

func NewSQLStateStore(db *dbutil.Database, log dbutil.DatabaseLogger, isBridge bool) *SQLStateStore

func (*SQLStateStore) ClearCachedMembers added in v0.15.2

func (store *SQLStateStore) ClearCachedMembers(roomID id.RoomID, memberships ...event.Membership)

func (*SQLStateStore) FindSharedRooms

func (store *SQLStateStore) FindSharedRooms(userID id.UserID) (rooms []id.RoomID)

func (*SQLStateStore) GetEncryptionEvent

func (store *SQLStateStore) GetEncryptionEvent(roomID id.RoomID) *event.EncryptionEventContent

func (*SQLStateStore) GetMember

func (store *SQLStateStore) GetMember(roomID id.RoomID, userID id.UserID) *event.MemberEventContent

func (*SQLStateStore) GetMembership

func (store *SQLStateStore) GetMembership(roomID id.RoomID, userID id.UserID) event.Membership

func (*SQLStateStore) GetPowerLevel

func (store *SQLStateStore) GetPowerLevel(roomID id.RoomID, userID id.UserID) int

func (*SQLStateStore) GetPowerLevelRequirement

func (store *SQLStateStore) GetPowerLevelRequirement(roomID id.RoomID, eventType event.Type) int

func (*SQLStateStore) GetPowerLevels

func (store *SQLStateStore) GetPowerLevels(roomID id.RoomID) (levels *event.PowerLevelsEventContent)

func (*SQLStateStore) GetRoomJoinedOrInvitedMembers

func (store *SQLStateStore) GetRoomJoinedOrInvitedMembers(roomID id.RoomID) (members []id.UserID, err error)

func (*SQLStateStore) GetRoomMembers

func (store *SQLStateStore) GetRoomMembers(roomID id.RoomID, memberships ...event.Membership) map[id.UserID]*event.MemberEventContent

func (*SQLStateStore) HasPowerLevel

func (store *SQLStateStore) HasPowerLevel(roomID id.RoomID, userID id.UserID, eventType event.Type) bool

func (*SQLStateStore) IsEncrypted

func (store *SQLStateStore) IsEncrypted(roomID id.RoomID) bool

func (*SQLStateStore) IsInRoom

func (store *SQLStateStore) IsInRoom(roomID id.RoomID, userID id.UserID) bool

func (*SQLStateStore) IsInvited

func (store *SQLStateStore) IsInvited(roomID id.RoomID, userID id.UserID) bool

func (*SQLStateStore) IsMembership

func (store *SQLStateStore) IsMembership(roomID id.RoomID, userID id.UserID, allowedMemberships ...event.Membership) bool

func (*SQLStateStore) IsRegistered

func (store *SQLStateStore) IsRegistered(userID id.UserID) bool

func (*SQLStateStore) MarkRegistered

func (store *SQLStateStore) MarkRegistered(userID id.UserID)

func (*SQLStateStore) SetEncryptionEvent

func (store *SQLStateStore) SetEncryptionEvent(roomID id.RoomID, content *event.EncryptionEventContent)

func (*SQLStateStore) SetMember

func (store *SQLStateStore) SetMember(roomID id.RoomID, userID id.UserID, member *event.MemberEventContent)

func (*SQLStateStore) SetMembership

func (store *SQLStateStore) SetMembership(roomID id.RoomID, userID id.UserID, membership event.Membership)

func (*SQLStateStore) SetPowerLevels

func (store *SQLStateStore) SetPowerLevels(roomID id.RoomID, levels *event.PowerLevelsEventContent)

func (*SQLStateStore) TryGetMember

func (store *SQLStateStore) TryGetMember(roomID id.RoomID, userID id.UserID) (*event.MemberEventContent, bool)

Jump to

Keyboard shortcuts

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