Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountsDatabase ¶
type AccountsDatabase interface { RecoverCache() WriteDBEvent(ctx context.Context, update *dbtypes.DBEvent) error CreateAccount( ctx context.Context, userID, plaintextPassword, appServiceID, displayName string, ) (*authtypes.Account, error) CreateAccountWithCheck( ctx context.Context, oldAccount *authtypes.Account, userID, plaintextPassword, appServiceID, displayName string, ) (*authtypes.Account, error) GetAccount(ctx context.Context, userID string) (*authtypes.Account, error) UpsertProfile(ctx context.Context, userID, displayName, avatarURL string) error UpsertProfileSync(ctx context.Context, userID, displayName, avatarURL string) error UpsertDisplayName(ctx context.Context, userID, displayName string) error UpsertDisplayNameSync(ctx context.Context, userID, displayName string) error UpsertAvatar(ctx context.Context, userID, avatarURL string) error UpsertAvatarSync(ctx context.Context, userID, avatarURL string) error InsertAccount( ctx context.Context, userID, plaintextPassword, appServiceID, displayName string, ) (*authtypes.Account, error) PutFilter(ctx context.Context, userID, filterID, filter string) error AddRoomTag(ctx context.Context, userId, roomID, tag string, content []byte) error DeleteRoomTag(ctx context.Context, userId, roomID, tag string) error GetAccountsTotal(ctx context.Context) (int, error) GetActualTotal(ctx context.Context) (int, error) GetRoomTagsTotal(ctx context.Context) (int, error) SaveAccountData(ctx context.Context, userID, roomID, dataType, content string) error GetAccountDataTotal(ctx context.Context) (int, error) OnInsertAccountData(ctx context.Context, userID, roomID, dataType, content string) error OnInsertAccount(ctx context.Context, userID, hash, appServiceID string, createdTs int64) error OnInsertFilter(ctx context.Context, filter, filterID, userID string) error OnUpsertProfile(ctx context.Context, userID, displayName, avatarURL string) error OnInitProfile(ctx context.Context, userID, displayName, avatarURL string) error OnUpsertDisplayName(ctx context.Context, userID, displayName string) error OnUpsertAvatar(ctx context.Context, userID, avatarURL string) error OnInsertRoomTag(ctx context.Context, userId, roomID, tag string, content []byte) error OnDeleteRoomTag(ctx context.Context, userId, roomID, tag string) error GetAllProfile() ([]authtypes.Profile, error) GetProfileByUserID(ctx context.Context, userID string) (authtypes.Profile, error) UpsertUserInfo(ctx context.Context, userID, userName, jobNumber, mobile, landline, email string, state int) error OnUpsertUserInfo(ctx context.Context, userID, userName, jobNumber, mobile, landline, email string, state int) error OnInitUserInfo(ctx context.Context, userID, userName, jobNumber, mobile, landline, email string, state int) error GetAllUserInfo() ([]authtypes.UserInfo, error) DeleteUserInfo(ctx context.Context, userID string) error OnDeleteUserInfo(ctx context.Context, userID string) error }
type AppServiceDatabase ¶
type AppServiceDatabase interface { //NewDatabase(driver, createAddr, address, topic string, useAsync bool) (interface{}, error) StoreEvent( ctx context.Context, appServiceID string, event *gomatrixserverlib.ClientEvent, ) error GetEventsWithAppServiceID( ctx context.Context, appServiceID string, limit int, ) (int, int, []gomatrixserverlib.ClientEvent, bool, error) CountEventsWithAppServiceID( ctx context.Context, appServiceID string, ) (int, error) UpdateTxnIDForEvents( ctx context.Context, appserviceID string, maxID, txnID int, ) error RemoveEventsBeforeAndIncludingID( ctx context.Context, appserviceID string, eventTableID int, ) error GetLatestTxnID( ctx context.Context, ) (int, error) GetMsgEventsWithLimit( ctx context.Context, limit, offset int64, ) ([]int64, [][]byte, error) GetMsgEventsTotal( ctx context.Context, ) (count int, minID int64, err error) UpdateMsgEvent( ctx context.Context, id int64, NewBytes []byte, ) error GetEncMsgEventsWithLimit( ctx context.Context, limit, offset int64, ) ([]int64, [][]byte, error) GetEncMsgEventsTotal( ctx context.Context, ) (count int, err error) }
type ConfigDatabase ¶
type ConfigDatabase interface { UpsertServerName(ctx context.Context, nid int64, serverName string) error SelectServerNames(ctx context.Context) (results []string, err error) UpsertServerInstance(ctx context.Context, nid int64, serverName string) error SelectServerInstance(ctx context.Context, serverName string) (instance int64, err error) }
type DBMonitor ¶
type DBMonitor interface {
SetGauge(gauge mon.LabeledGauge)
}
type DeviceDatabase ¶
type DeviceDatabase interface { WriteDBEvent(ctx context.Context, update *dbtypes.DBEvent) error RecoverCache() CreateDevice( ctx context.Context, userID, deviceID, deviceType string, displayName *string, isHuman bool, identifier *string, specifiedTime int64, ) (dev *authtypes.Device, returnErr error) InsertDevice( ctx context.Context, userID string, deviceID *string, displayName *string, deviceType, identifier string, ) error OnInsertDevice( ctx context.Context, userID string, deviceID *string, displayName *string, createdTs, lastActiveTs int64, deviceType, identifier string, ) error OnInsertMigDevice( ctx context.Context, access_token, mig_access_token, deviceID, userID string, ) error RemoveDevice( ctx context.Context, deviceID, userID string, createTs int64, ) error OnDeleteDevice( ctx context.Context, deviceID, userID string, createTs int64, ) error GetDeviceTotal( ctx context.Context, ) (int, error) CreateMigDevice( ctx context.Context, userID, deviceID, token, migToken string, ) error RemoveMigDevice( ctx context.Context, deviceID, userID string, ) error RemoveAllUserMigDevices( ctx context.Context, userID string, ) error UpdateDeviceActiveTs( ctx context.Context, deviceID, userID string, lastActiveTs int64, ) error OnUpdateDeviceActiveTs( ctx context.Context, deviceID, userID string, lastActiveTs int64, ) error SelectUnActiveDevice( ctx context.Context, lastActiveTs int64, limit, offset int, ) ([]string, []string, []string, int, error) CheckDevice( ctx context.Context, identifier, userID string, ) (string, string, int64, error) LoadSimpleFilterData(ctx context.Context, f *filter.SimpleFilter) bool LoadFilterData(ctx context.Context, key string, f *filter.Filter) bool }
type EncryptorAPIDatabase ¶
type EncryptorAPIDatabase interface { WriteDBEvent(ctx context.Context, update *dbtypes.DBEvent) error RecoverCache() InsertDeviceKey( ctx context.Context, deviceID, userID, keyInfo, al, sig, identifier string, ) (err error) InsertOneTimeKey( ctx context.Context, deviceID, userID, keyID, keyInfo, al, sig, identifier string, ) (err error) OnInsertDeviceKey( ctx context.Context, deviceID, userID, keyInfo, al, sig, identifier string, ) (err error) OnInsertOneTimeKey( ctx context.Context, deviceID, userID, keyID, keyInfo, al, sig, identifier string, ) (err error) DeleteOneTimeKey( ctx context.Context, deviceID, userID, keyID, algorithm string, ) (err error) OnDeleteOneTimeKey( ctx context.Context, deviceID, userID, keyID, algorithm string, ) (err error) DeleteMacOneTimeKey( ctx context.Context, deviceID, userID, identifier string, ) (err error) OnDeleteMacOneTimeKey( ctx context.Context, deviceID, userID, identifier string, ) (err error) InsertAl( ctx context.Context, uid, device, als, identifier string, ) (err error) OnInsertAl( ctx context.Context, uid, device, als, identifier string, ) (err error) DeleteDeviceKeys( ctx context.Context, deviceID, userID string, ) error DeleteMacKeys( ctx context.Context, deviceID, userID, identifier string, ) error OnDeleteAl( ctx context.Context, userID, deviceID string, ) error OnDeleteMacAl( ctx context.Context, userID, deviceID, identifier string, ) error OnDeleteDeviceKey( ctx context.Context, deviceID, userID string, ) error OnDeleteMacDeviceKey( ctx context.Context, deviceID, userID, identifier string, ) error OnDeleteDeviceOneTimeKey( ctx context.Context, deviceID, userID string, ) error DeleteDeviceOneTimeKey( ctx context.Context, deviceID, userID string, ) error }
type KeyDatabase ¶
type KeyDatabase interface { FetcherName() string FetchKeys( ctx context.Context, requests map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.Timestamp, ) (map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult, error) StoreKeys( ctx context.Context, keyMap map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult, ) error InsertRootCA(ctx context.Context, rootCA string) error SelectAllCerts(ctx context.Context) (string, string, string, string, error) UpsertCert(ctx context.Context, serverCert, serverKey string) error UpsertCRL(ctx context.Context, CRL string) error }
type PresenceDatabase ¶
type PresenceDatabase interface { WriteDBEvent(ctx context.Context, update *dbtypes.DBEvent) error RecoverCache() UpsertPresences( ctx context.Context, userID, status, statusMsg, extStatusMsg string, ) error OnUpsertPresences( ctx context.Context, userID, status, statusMsg, extStatusMsg string, ) error }
type PublicRoomAPIDatabase ¶
type PublicRoomAPIDatabase interface { //NewDatabase(driver, createAddr, address, topic string, useAsync bool) (interface{}, error) SetIDGenerator(*uid.UidGenerator) WriteDBEvent(ctx context.Context, update *dbtypes.DBEvent) error UpdateRoomFromEvent( ctx context.Context, event gomatrixserverlib.ClientEvent, ) error OnIncrementJoinedMembersInRoom( ctx context.Context, roomID string, ) error OnDecrementJoinedMembersInRoom( ctx context.Context, roomID string, ) error OnInsertNewRoom( ctx context.Context, roomID string, seqID, joinedMembers int64, aliases []string, canonicalAlias, name, topic string, worldReadable, guestCanJoin bool, avatarUrl string, visibility bool, ) error CountPublicRooms(ctx context.Context) (int64, error) GetPublicRooms( ctx context.Context, offset int64, limit int64, filter string, ) ([]types.PublicRoom, error) OnUpdateRoomAttribute( ctx context.Context, attrName string, attrValue interface{}, roomID string, ) error }
type PushAPIDatabase ¶
type PushAPIDatabase interface { WriteDBEvent(ctx context.Context, update *dbtypes.DBEvent) error RecoverCache() AddPushRuleEnable( ctx context.Context, userID, ruleID string, enable int, ) error OnAddPushRuleEnable( ctx context.Context, userID, ruleID string, enable int, ) error DeletePushRule( ctx context.Context, userID, ruleID string, ) error OnDeletePushRule( ctx context.Context, userID, ruleID string, ) error AddPushRule( ctx context.Context, userID, ruleID string, priorityClass, priority int, conditions, actions []byte, ) error OnAddPushRule( ctx context.Context, userID, ruleID string, priorityClass, priority int, conditions, actions []byte, ) error AddPusher( ctx context.Context, userID, profileTag, kind, appID, appDisplayName, deviceDisplayName, pushKey, lang string, data []byte, deviceID string, ) error OnAddPusher( ctx context.Context, userID, profileTag, kind, appID, appDisplayName, deviceDisplayName, pushKey, lang string, data []byte, deviceID string, ) error DeleteUserPushers( ctx context.Context, userID, appID, pushKey string, ) error OnDeleteUserPushers( ctx context.Context, userID, appID, pushKey string, ) error DeletePushersByKey( ctx context.Context, appID, pushKey string, ) error OnDeletePushersByKey( ctx context.Context, appID, pushKey string, ) error DeletePushersByKeyOnly( ctx context.Context, pushKey string, ) error OnDeletePushersByKeyOnly( ctx context.Context, pushKey string, ) error GetPushRulesTotal( ctx context.Context, ) (int, error) GetPushRulesEnableTotal( ctx context.Context, ) (int, error) }
type RCSServerDatabase ¶
type RCSServerDatabase interface { SetIDGenerator(idg *uid.UidGenerator) InsertFriendship( ctx context.Context, ID, roomID, fcID, toFcID, fcIDState, toFcIDState string, fcIDIsBot, toFcIDIsBot bool, fcIDRemark, toFcIDRemark string, fcIDOnceJoined, toFcIDOnceJoined bool, fcIDDomain, toFcIDDomain, eventID string) error GetFriendshipByRoomID(ctx context.Context, roomID string) (*types.RCSFriendship, error) GetFriendshipByFcIDAndToFcID(ctx context.Context, fcID, toFcID string) (*types.RCSFriendship, error) UpdateFriendshipByRoomID( ctx context.Context, ID, roomID, fcID, toFcID, fcIDState, toFcIDState string, fcIDIsBot, toFcIDIsBot bool, fcIDRemark, toFcIDRemark string, fcIDOnceJoined, toFcIDOnceJoined bool, fcIDDomain, toFcIDDomain, eventID string) error DeleteFriendshipByRoomID(ctx context.Context, roomID string) error NotFound(error) bool // These function is used for api. GetFriendshipsByFcIDOrToFcID(ctx context.Context, userID string) ([]external.Friendship, error) GetFriendshipsByFcIDOrToFcIDWithBot(ctx context.Context, userID string) ([]external.Friendship, error) GetFriendshipByFcIDOrToFcID(ctx context.Context, fcID, toFcID string) (*external.GetFriendshipResponse, error) }
type RoomServerDatabase ¶
type RoomServerDatabase interface { //NewDatabase(driver, createAddr, address, topic string, useAsync bool) (interface{}, error) GetDB() *sql.DB SetIDGenerator(idg *uid.UidGenerator) WriteDBEvent(ctx context.Context, update *dbtypes.DBEvent) error RecoverCache() StoreEvent( ctx context.Context, event *gomatrixserverlib.Event, roomNID, stateNID int64, refId string, refHash []byte, ) error AssignRoomNID( ctx context.Context, roomID string, ) (int64, error) RoomInfo( ctx context.Context, roomID string, ) (int64, int64, int64, error) EventNIDs( ctx context.Context, eventIDs []string, ) (map[string]int64, error) EventNID( ctx context.Context, eventID string, ) (int64, error) Events( ctx context.Context, eventNIDs []int64, ) ([]*gomatrixserverlib.Event, []int64, error) AddState( ctx context.Context, roomNID int64, StateBlockNIDs []int64, ) (int64, error) SelectState(ctx context.Context, snapshotNID int64) (int64, []int64, error) RoomNID(ctx context.Context, roomID string) (roomservertypes.RoomNID, error) SetRoomAlias(ctx context.Context, alias string, roomID string) error GetRoomIDFromAlias(ctx context.Context, alias string) (string, error) GetAliasesFromRoomID(ctx context.Context, roomID string) ([]string, error) RemoveRoomAlias(ctx context.Context, alias string) error SetToInvite( ctx context.Context, roomNID int64, targetUser, senderUserID, eventID string, json []byte, eventNID int64, pre, roomID string, ) error SetToJoin( ctx context.Context, roomNID int64, targetUser, senderUserID string, eventNID int64, pre, roomID string, ) error SetToLeave( ctx context.Context, roomNID int64, targetUser, senderUserID string, eventNID int64, pre, roomID string, ) error SetToForget( ctx context.Context, roomNID int64, targetUser string, eventNID int64, pre, roomID string, ) error GetRoomStates( ctx context.Context, roomID string, ) ([]*gomatrixserverlib.Event, []int64, error) EventsCount(ctx context.Context) (count int, err error) FixCorruptRooms() InsertEventJSON(ctx context.Context, eventNID int64, eventJSON []byte, eventType string) error InsertEvent(ctx context.Context, eventNID int64, roomNID int64, eventType string, eventStateKey string, eventID string, referenceSHA256 []byte, authEventNIDs []int64, depth int64, stateNID int64, refId string, refHash []byte, offset int64, domain string) error InsertInvite(ctx context.Context, eventId string, roomNid int64, target, sender string, content []byte) error InviteUpdate(ctx context.Context, roomNid int64, target string) error MembershipInsert(ctx context.Context, roomNid int64, target, roomID string, membership, eventNID int64) error MembershipUpdate(ctx context.Context, roomNid int64, target, sender string, membership, eventNID, version int64) error MembershipForgetUpdate(ctx context.Context, roomNid int64, target string, forgetNid int64) error InsertRoomNID(ctx context.Context, roomNID int64, roomID string) error UpdateLatestEventNIDs( ctx context.Context, roomNID int64, eventNIDs []int64, lastEventSentNID int64, stateSnapshotNID int64, version int64, depth int64, ) error InsertStateRaw( ctx context.Context, stateNID int64, roomNID int64, nids []int64, ) (err error) RoomExists( ctx context.Context, roomId string, ) (exists bool, err error) LatestRoomEvent( ctx context.Context, roomId string, ) (eventId string, err error) EventCountForRoom( ctx context.Context, roomId string, ) (count int, err error) EventCountAll( ctx context.Context, ) (count int, err error) SetLatestEvents( ctx context.Context, roomNID int64, lastEventNIDSent, currentStateSnapshotNID, depth int64, ) error LoadFilterData(ctx context.Context, key string, f *filter.Filter) bool GetUserRooms( ctx context.Context, uid string, ) ([]string, []string, []string, error) AliaseInsertRaw(ctx context.Context, aliase, roomID string) error AliaseDeleteRaw(ctx context.Context, aliase string) error GetAllRooms(ctx context.Context, limit, offset int) ([]roomservertypes.RoomNIDs, error) GetRoomEvents(ctx context.Context, roomNID int64) ([][]byte, error) GetRoomEventsWithLimit(ctx context.Context, roomNID int64, limit, offset int) ([]int64, [][]byte, error) SaveRoomDomainsOffset(ctx context.Context, room_nid int64, domain string, offset int64) error RoomDomainsInsertRaw(ctx context.Context, room_nid int64, domain string, offset int64) error GetRoomDomainsOffset(ctx context.Context, room_nid int64) ([]string, []int64, error) BackFillNids(ctx context.Context, roomNID int64, domain string, eventNid int64, limit int, dir string) ([]int64, error) SelectEventNidForBackfill(ctx context.Context, roomNID int64, domain string) (int64, error) SelectRoomEventsByDomainOffset(ctx context.Context, roomNID int64, domain string, domainOffset int64, limit int) ([]int64, error) UpdateRoomEvent(ctx context.Context, eventNID, roomNID, depth, domainOffset int64, domain string) error OnUpdateRoomEvent(ctx context.Context, eventNID, roomNID, depth, domainOffset int64, domain string) error UpdateRoomDepth(ctx context.Context, depth, roomNid int64) error OnUpdateRoomDepth(ctx context.Context, depth, roomNid int64) error SettingsInsertRaw(ctx context.Context, settingKey string, val string) error SaveSettings(ctx context.Context, settingKey string, val string) error SelectSettingKey(ctx context.Context, settingKey string) (string, error) SelectRoomMaxDomainOffsets(ctx context.Context, roomNID int64) (domains, eventIDs []string, offsets []int64, err error) SelectEventStateSnapshotNID(ctx context.Context, eventID string) (int64, error) SelectRoomStateNIDByStateBlockNID(ctx context.Context, roomNID int64, stateBlockNID int64) ([]int64, []string, []string, []string, error) GetMsgEventsMigration(ctx context.Context, limit, offset int64) ([]int64, [][]byte, error) GetMsgEventsTotalMigration(ctx context.Context) (int, int64, error) UpdateMsgEventMigration(ctx context.Context, id int64, EncryptedEventBytes []byte) error GetRoomEventByNID(ctx context.Context, eventNID int64) ([]byte, error) }
type SyncAPIDatabase ¶
type SyncAPIDatabase interface { //NewDatabase(driver, createAddr, address, topic string, useAsync bool) (interface{}, error) GetDB() *sql.DB SetIDGenerator(idg *uid.UidGenerator) WriteDBEvent(ctx context.Context, update *dbtypes.DBEvent) error Events(ctx context.Context, eventIDs []string) ([]gomatrixserverlib.ClientEvent, error) StreamEvents(ctx context.Context, eventIDs []string) ([]gomatrixserverlib.ClientEvent, []int64, error) WriteEvent( ctx context.Context, ev *gomatrixserverlib.ClientEvent, addStateEvents []gomatrixserverlib.ClientEvent, addStateEventIDs, removeStateEventIDs []string, transactionID *roomservertypes.TransactionID, offset int64, domainOffset, depth int64, domain string, originTs int64, ) (returnErr error) InsertEventRaw( ctx context.Context, id int64, roomId, eventId string, json []byte, addState, removeState []string, device, txnID, eventType string, domainOffset, depth int64, domain string, originTs int64, ) (err error) UpdateRoomState( ctx context.Context, event gomatrixserverlib.ClientEvent, membership *string, streamPos syncapitypes.StreamPosition, ) error UpdateRoomStateRaw( ctx context.Context, roomId, eventId string, json []byte, eventType, stateKey string, membership string, addedAt int64, ) error UpdateRoomState2( ctx context.Context, roomId, eventId string, json []byte, eventType, stateKey string, membership string, addedAt int64, ) error GetStateEventsForRoom( ctx context.Context, roomID string, ) (stateEvents []gomatrixserverlib.ClientEvent, offset []int64, err error) GetStateEventsStreamForRoom( ctx context.Context, roomID string, ) (stateEvents []gomatrixserverlib.ClientEvent, offset []int64, err error) GetStateEventsStreamForRoomBeforePos( ctx context.Context, roomID string, pos int64, ) (stateEvents []gomatrixserverlib.ClientEvent, offset []int64, err error) UpdateEvent( ctx context.Context, event gomatrixserverlib.ClientEvent, eventID string, eventType string, RoomID string, ) error OnUpdateEvent(ctx context.Context, eventID, roomID string, eventJson []byte, eventType string) error SelectEventsByDir( ctx context.Context, userID, roomID string, dir string, from int64, limit int, ) ([]gomatrixserverlib.ClientEvent, []int64, []int64, error, int64, int64) SelectEventsByDirRange( ctx context.Context, userID, roomID string, dir string, from, to int64, ) ([]gomatrixserverlib.ClientEvent, []int64, []int64, error, int64, int64) GetRidsForUser( ctx context.Context, userID string, ) (res []string, offsets []int64, events []string, err error) GetFriendShip( ctx context.Context, roomIDs []string, ) (friends []string, err error) GetInviteRidsForUser( ctx context.Context, userID string, ) (rids []string, offsets []int64, events []string, err error) GetLeaveRidsForUser( ctx context.Context, userID string, ) (rids []string, offsets []int64, events []string, err error) InsertStdMessage( ctx context.Context, stdEvent syncapitypes.StdHolder, targetUID, targetDevice, identifier string, offset int64, ) (err error) OnInsertStdMessage( ctx context.Context, id int64, stdEvent syncapitypes.StdHolder, targetUID, targetDevice, identifier string, ) (pos int64, err error) DeleteStdMessage( ctx context.Context, id int64, targetUID, targetDevice string, ) error OnDeleteStdMessage( ctx context.Context, id int64, targetUID, targetDevice string, ) error DeleteMacStdMessage( ctx context.Context, identifier, targetUID, targetDevice string, ) error OnDeleteMacStdMessage( ctx context.Context, identifier, targetUID, targetDevice string, ) error DeleteDeviceStdMessage( ctx context.Context, targetUID, targetDevice string, ) error OnDeleteDeviceStdMessage( ctx context.Context, targetUID, targetDevice string, ) error GetHistoryStdStream( ctx context.Context, targetUserID, targetDeviceID string, limit int64, ) ([]types.StdEvent, []int64, error) GetHistoryEvents( ctx context.Context, roomid string, limit int, ) (events []gomatrixserverlib.ClientEvent, offsets []int64, err error) GetRoomLastOffsets( ctx context.Context, roomIDs []string, ) (map[string]int64, error) GetJoinRoomOffsets( ctx context.Context, eventIDs []string, ) ([]int64, []string, []string, error) GetRoomReceiptLastOffsets( ctx context.Context, roomIDs []string, ) (map[string]int64, error) GetUserMaxReceiptOffset( ctx context.Context, userID string, ) (offsets int64, err error) UpsertClientDataStream( ctx context.Context, userID, roomID, dataType, streamType string, ) (syncapitypes.StreamPosition, error) OnUpsertClientDataStream( ctx context.Context, id int64, userID, roomID, dataType, streamType string, ) (syncapitypes.StreamPosition, error) GetHistoryClientDataStream( ctx context.Context, userID string, limit int, ) (streams []types.ActDataStreamUpdate, offset []int64, err error) UpsertReceiptDataStream( ctx context.Context, offset, evtOffset int64, roomID, content string, ) error OnUpsertReceiptDataStream( ctx context.Context, id, evtOffset int64, roomID, content string, ) error GetHistoryReceiptDataStream( ctx context.Context, roomID string, ) (streams []types.ReceiptStream, offset []int64, err error) UpsertUserReceiptData( ctx context.Context, roomID, userID, content string, evtOffset int64, ) error OnUpsertUserReceiptData( ctx context.Context, roomID, userID, content string, evtOffset int64, ) (syncapitypes.StreamPosition, error) GetUserHistoryReceiptData( ctx context.Context, roomID, userID string, ) (evtOffset int64, content []byte, err error) InsertKeyChange(ctx context.Context, changedUserID string, offset int64) error OnInsertKeyChange(ctx context.Context, id int64, changedUserID string) error GetHistoryKeyChangeStream( ctx context.Context, users []string, ) (streams []types.KeyChangeStream, offset []int64, err error) UpsertPresenceDataStream( ctx context.Context, userID, content string, ) (syncapitypes.StreamPosition, error) OnUpsertPresenceDataStream( ctx context.Context, id int64, userID, content string, ) (syncapitypes.StreamPosition, error) GetHistoryPresenceDataStream( ctx context.Context, limit, offset int, ) ([]types.PresenceStream, []int64, error) GetUserPresenceDataStream( ctx context.Context, users []string, ) ([]types.PresenceStream, []int64, error) SelectTypeEventForward( ctx context.Context, typ []string, roomID string, ) (events []gomatrixserverlib.ClientEvent, offsets []int64, err error) UpdateSyncMemberEvent( ctx context.Context, userID, oldAvatarUrl, newAvatarUrl string, ) error GetAllSyncRooms() ([]string, error) SelectUserTimeLineEvents( ctx context.Context, userID string, id int64, limit int, ) (events []syncapitypes.UserTimeLineStream, err error) SelectUserTimeLineMinPos( ctx context.Context, userID string, ) (int64, error) InsertUserTimeLine( ctx context.Context, id int64, roomID string, evtNID int64, userID, roomState string, ts, eventOffset int64, ) (err error) OnInsertUserTimeLine( ctx context.Context, id int64, roomID string, evtNID int64, userID, roomState string, ts, eventOffset int64, ) (err error) SelectUserTimeLineHistory( ctx context.Context, userID string, limit int, ) (events []syncapitypes.UserTimeLineStream, err error) SelectUserTimeLineOffset( ctx context.Context, userID string, roomOffsets []int64, ) (events []syncapitypes.UserTimeLineStream, err error) InsertOutputMinStream( ctx context.Context, id int64, roomID string, ) error OnInsertOutputMinStream( ctx context.Context, id int64, roomID string, ) error SelectOutputMinStream( ctx context.Context, roomID string, ) (int64, error) SelectDomainMaxOffset( ctx context.Context, roomID string, ) ([]string, []int64, error) UpdateSyncEvent(ctx context.Context, domainOffset, originTs int64, domain, roomID, eventID string) error OnUpdateSyncEvent(ctx context.Context, domainOffset, originTs int64, domain, roomID, eventID string) error GetSyncEvents(ctx context.Context, start, end int64, limit, offset int64) ([][]byte, error) GetSyncMsgEventsMigration(ctx context.Context, limit, offset int64) ([]int64, []string, [][]byte, error) GetSyncMsgEventsTotalMigration(ctx context.Context) (int, int64, error) UpdateSyncMsgEventMigration(ctx context.Context, id int64, EncryptedEventBytes []byte) error GetEventRaw(ctx context.Context, eventID string) (int64, []byte, error) GetMsgEventsByRoomIDMigration(ctx context.Context, roomID string) ([]int64, []string, [][]byte, error) GetRoomStateWithLimit(ctx context.Context, limit, offset int64) ([]string, [][]byte, error) GetRoomStateTotal(ctx context.Context) (int, error) UpdateRoomStateWithEventID(ctx context.Context, eventID string, eventBytes []byte) error GetRoomStateByEventID(ctx context.Context, eventID string) ([]byte, error) }
Click to show internal directories.
Click to hide internal directories.