Documentation ¶
Overview ¶
Package repositories represents data storage/source for miounne
Index ¶
- func NewCryptoStore(db *sql.DB, driver string, logger crypto.Logger, userID id.UserID, ...) (*crypto.SQLCryptoStore, error)
- type Registration
- func (c *Registration) CreateToken(maxUsage, expirationDate string) (*models.RegistrationToken, error)
- func (c *Registration) DisableToken(token string) (*models.RegistrationToken, error)
- func (c *Registration) GetList() ([]models.RegistrationToken, error)
- func (c *Registration) GetRoomID() id.RoomID
- func (c *Registration) GetStatus(token string) (*models.RegistrationToken, error)
- type SQL
- func (store *SQL) CreateTables() error
- func (store *SQL) FindSharedRooms(userID id.UserID) []id.RoomID
- func (store *SQL) GetEncryptionEvent(roomID id.RoomID) *event.EncryptionEventContent
- func (store *SQL) GetRoomMembers(roomID id.RoomID) []id.UserID
- func (store *SQL) IsEncrypted(roomID id.RoomID) bool
- func (store *SQL) LoadFilterID(userID id.UserID) string
- func (store *SQL) LoadNextBatch(userID id.UserID) string
- func (store *SQL) LoadRoom(roomID id.RoomID) *mautrix.Room
- func (store *SQL) SaveFilterID(userID id.UserID, filterID string)
- func (store *SQL) SaveNextBatch(userID id.UserID, nextBatchToken string)
- func (store *SQL) SaveRoom(_ *mautrix.Room)
- func (store *SQL) SetEncryptionEvent(event *event.Event)
- func (store *SQL) SetMembership(event *event.Event)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Registration ¶ added in v1.1.0
type Registration struct {
// contains filtered or unexported fields
}
Registration matrix-registration integration
func NewRegistration ¶ added in v1.1.0
func NewRegistration(url string, secret string, roomID id.RoomID) *Registration
NewRegistration object
func (*Registration) CreateToken ¶ added in v1.1.0
func (c *Registration) CreateToken(maxUsage, expirationDate string) (*models.RegistrationToken, error)
CreateToken ...
func (*Registration) DisableToken ¶ added in v1.1.0
func (c *Registration) DisableToken(token string) (*models.RegistrationToken, error)
DisableToken ...
func (*Registration) GetList ¶ added in v1.1.0
func (c *Registration) GetList() ([]models.RegistrationToken, error)
GetList of invite tokens
func (*Registration) GetRoomID ¶ added in v1.1.0
func (c *Registration) GetRoomID() id.RoomID
GetRoomID of control room
func (*Registration) GetStatus ¶ added in v1.1.0
func (c *Registration) GetStatus(token string) (*models.RegistrationToken, error)
GetStatus of matrix-registration token
type SQL ¶ added in v1.1.0
type SQL struct {
// contains filtered or unexported fields
}
SQL implements mautrix.Storer and mautrix/crypto.StateStore interfaces, based on git.sr.ht/~sumner/standupbot StateStore
func NewSQLStore ¶ added in v1.1.0
NewSQLStore sqlite/postgres persistent storage
func (*SQL) CreateTables ¶ added in v1.1.0
CreateTables == migrations
func (*SQL) FindSharedRooms ¶ added in v1.1.0
FindSharedRooms returns list of known rooms where userID is member
func (*SQL) GetEncryptionEvent ¶ added in v1.1.0
func (store *SQL) GetEncryptionEvent(roomID id.RoomID) *event.EncryptionEventContent
GetEncryptionEvent for room
func (*SQL) GetRoomMembers ¶ added in v1.1.0
GetRoomMembers ...
func (*SQL) IsEncrypted ¶ added in v1.1.0
IsEncrypted returns whether a room is encrypted.
func (*SQL) LoadFilterID ¶ added in v1.1.0
LoadFilterID ...
func (*SQL) LoadNextBatch ¶ added in v1.1.0
LoadNextBatch token for /sync
func (*SQL) LoadRoom ¶ added in v1.1.0
LoadRoom is passthrought to mautrix.NewRoom(), because Miounne doesn't need it
func (*SQL) SaveFilterID ¶ added in v1.1.0
SaveFilterID ...
func (*SQL) SaveNextBatch ¶ added in v1.1.0
SaveNextBatch token for /sync
func (*SQL) SetEncryptionEvent ¶ added in v1.1.0
SetEncryptionEvent is wrapper of upsertEncryptionEvent
func (*SQL) SetMembership ¶ added in v1.1.0
SetMembership saves room members