sqlstatestore

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MPL-2.0 Imports: 9 Imported by: 0

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

	Typing map[id.RoomID]map[id.UserID]int64
	// contains filtered or unexported fields
}

func NewSQLStateStore

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

func (*SQLStateStore) FindSharedRooms

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

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) GetRoomMembers

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

func (*SQLStateStore) HasPowerLevel

func (store *SQLStateStore) HasPowerLevel(roomID id.RoomID, userID id.UserID, eventType event.Type) 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) 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