Documentation ¶
Index ¶
- Constants
- Variables
- type SQLStateStore
- func (store *SQLStateStore) FindSharedRooms(userID id.UserID) (rooms []id.RoomID)
- func (store *SQLStateStore) GetMember(roomID id.RoomID, userID id.UserID) *event.MemberEventContent
- func (store *SQLStateStore) GetMembership(roomID id.RoomID, userID id.UserID) event.Membership
- func (store *SQLStateStore) GetPowerLevel(roomID id.RoomID, userID id.UserID) int
- func (store *SQLStateStore) GetPowerLevelRequirement(roomID id.RoomID, eventType event.Type) int
- func (store *SQLStateStore) GetPowerLevels(roomID id.RoomID) (levels *event.PowerLevelsEventContent)
- func (store *SQLStateStore) GetRoomMembers(roomID id.RoomID) map[id.UserID]*event.MemberEventContent
- func (store *SQLStateStore) HasPowerLevel(roomID id.RoomID, userID id.UserID, eventType event.Type) bool
- func (store *SQLStateStore) IsInRoom(roomID id.RoomID, userID id.UserID) bool
- func (store *SQLStateStore) IsInvited(roomID id.RoomID, userID id.UserID) bool
- func (store *SQLStateStore) IsMembership(roomID id.RoomID, userID id.UserID, allowedMemberships ...event.Membership) bool
- func (store *SQLStateStore) IsRegistered(userID id.UserID) bool
- func (store *SQLStateStore) MarkRegistered(userID id.UserID)
- func (store *SQLStateStore) SetMember(roomID id.RoomID, userID id.UserID, member *event.MemberEventContent)
- func (store *SQLStateStore) SetMembership(roomID id.RoomID, userID id.UserID, membership event.Membership)
- func (store *SQLStateStore) SetPowerLevels(roomID id.RoomID, levels *event.PowerLevelsEventContent)
- func (store *SQLStateStore) TryGetMember(roomID id.RoomID, userID id.UserID) (*event.MemberEventContent, bool)
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 (*SQLStateStore) GetPowerLevelRequirement ¶
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 (*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)
Click to show internal directories.
Click to hide internal directories.