Documentation
¶
Index ¶
- type DatabaseStore
- func (s *DatabaseStore) BackfillProductConversations(ctx context.Context) error
- func (s *DatabaseStore) ClaimOperation(ctx context.Context, record operations.Record, owner string, ...) (operations.Record, bool, error)
- func (s *DatabaseStore) Close() error
- func (s *DatabaseStore) CompareAndSwapContact(ctx context.Context, contact contactRecord, expected contactRecord) (bool, error)
- func (s *DatabaseStore) CompareAndSwapContactProjection(ctx context.Context, contact contactRecord, expected contactRecord) (bool, error)
- func (s *DatabaseStore) CompareAndSwapMemberGeneration(ctx context.Context, member memberRecord, ...) (bool, error)
- func (s *DatabaseStore) CompareAndSwapOperation(ctx context.Context, record operations.Record, expectedRevision int64, ...) (operations.Record, bool, error)
- func (s *DatabaseStore) CountActiveReactions(ctx context.Context, targetType, targetID, reaction string) (int64, error)
- func (s *DatabaseStore) CountJoinedMembers(ctx context.Context, roomID, channelID string) (int64, error)
- func (s *DatabaseStore) CountProductMembers(ctx context.Context, roomID, channelID string) (int64, int64, error)
- func (s *DatabaseStore) DB() *sql.DB
- func (s *DatabaseStore) DeleteBlock(ctx context.Context, targetType, targetID string) (bool, error)
- func (s *DatabaseStore) DeleteChannel(ctx context.Context, channelID string) error
- func (s *DatabaseStore) DeleteChannelComment(ctx context.Context, commentID string) (bool, error)
- func (s *DatabaseStore) DeleteChannelPost(ctx context.Context, postID string) (bool, error)
- func (s *DatabaseStore) DeleteContact(ctx context.Context, roomID string) error
- func (s *DatabaseStore) DeleteConversationByRoomID(ctx context.Context, matrixRoomID string) error
- func (s *DatabaseStore) DeleteFavorite(ctx context.Context, id int64) error
- func (s *DatabaseStore) DeleteFollow(ctx context.Context, domain string) error
- func (s *DatabaseStore) DeleteGroup(ctx context.Context, roomID string) error
- func (s *DatabaseStore) EventBounds(ctx context.Context) (eventBounds, error)
- func (s *DatabaseStore) FindFavoriteByEvent(ctx context.Context, eventID, roomID string) (favoriteRecord, bool, error)
- func (s *DatabaseStore) GetChannelByIDOrRoom(ctx context.Context, channelID, roomID string) (channel, bool, error)
- func (s *DatabaseStore) GetChannelCommentByEventID(ctx context.Context, eventID, channelID string) (channelCommentRecord, bool, error)
- func (s *DatabaseStore) GetChannelCommentByID(ctx context.Context, commentID, postID string) (channelCommentRecord, bool, error)
- func (s *DatabaseStore) GetChannelPostByEventID(ctx context.Context, eventID, channelID string) (channelPostRecord, bool, error)
- func (s *DatabaseStore) GetChannelPostByID(ctx context.Context, postID, channelID string) (channelPostRecord, bool, error)
- func (s *DatabaseStore) GetConversationByID(ctx context.Context, conversationID string) (conversationRecord, bool, error)
- func (s *DatabaseStore) GetConversationByRoomID(ctx context.Context, matrixRoomID string) (conversationRecord, bool, error)
- func (s *DatabaseStore) GetGroupByRoom(ctx context.Context, roomID string) (groupRecord, bool, error)
- func (s *DatabaseStore) GetPlugin(ctx context.Context, id string) (pluginInstance, bool, error)
- func (s *DatabaseStore) GetPluginJob(ctx context.Context, jobID string) (pluginJob, bool, error)
- func (s *DatabaseStore) GetPluginSecret(ctx context.Context, pluginID, name string) (pluginSecret, bool, error)
- func (s *DatabaseStore) GetReaction(ctx context.Context, targetType, targetID, reaction, userID string) (reactionRecord, bool, error)
- func (s *DatabaseStore) GetReadMarker(ctx context.Context, roomID string) (readMarker, bool, error)
- func (s *DatabaseStore) InsertChannelComment(ctx context.Context, comment channelCommentRecord) error
- func (s *DatabaseStore) InsertChannelPost(ctx context.Context, post channelPostRecord) error
- func (s *DatabaseStore) InsertEvent(ctx context.Context, event p2pEvent) (bool, error)
- func (s *DatabaseStore) InsertMemberIfAbsent(ctx context.Context, member memberRecord) (bool, error)
- func (s *DatabaseStore) InsertReport(ctx context.Context, report reportRecord) error
- func (s *DatabaseStore) ListBlocks(ctx context.Context) ([]blockRecord, error)
- func (s *DatabaseStore) ListCalls(ctx context.Context, roomID string, activeOnly bool) ([]callRecord, error)
- func (s *DatabaseStore) ListChannelComments(ctx context.Context, postID string) ([]channelCommentRecord, error)
- func (s *DatabaseStore) ListChannelCommentsPage(ctx context.Context, postID string, fromTS, snapshotTS, cursorTS int64, ...) ([]channelCommentRecord, bool, error)
- func (s *DatabaseStore) ListChannelInviteGrants(ctx context.Context) ([]channelInviteGrant, error)
- func (s *DatabaseStore) ListChannelPosts(ctx context.Context, channelID string) ([]channelPostRecord, error)
- func (s *DatabaseStore) ListChannelPostsPage(ctx context.Context, channelID string, fromTS, snapshotTS, cursorTS int64, ...) ([]channelPostRecord, bool, error)
- func (s *DatabaseStore) ListChannels(ctx context.Context) ([]channel, error)
- func (s *DatabaseStore) ListContacts(ctx context.Context) ([]contactRecord, error)
- func (s *DatabaseStore) ListConversations(ctx context.Context) ([]conversationRecord, error)
- func (s *DatabaseStore) ListEvents(ctx context.Context, since int64, limit int) ([]p2pEvent, error)
- func (s *DatabaseStore) ListFavorites(ctx context.Context, messageType string) ([]favoriteRecord, error)
- func (s *DatabaseStore) ListFollows(ctx context.Context) ([]followRecord, error)
- func (s *DatabaseStore) ListGroups(ctx context.Context) ([]groupRecord, error)
- func (s *DatabaseStore) ListJoinedChannelsForUser(ctx context.Context, userID string) ([]channel, error)
- func (s *DatabaseStore) ListJoinedGroupsForUser(ctx context.Context, userID string) ([]groupRecord, error)
- func (s *DatabaseStore) ListMembers(ctx context.Context, roomID, channelID string) ([]memberRecord, error)
- func (s *DatabaseStore) ListMembersForUser(ctx context.Context, userID string) ([]memberRecord, error)
- func (s *DatabaseStore) ListPlugins(ctx context.Context) ([]pluginInstance, error)
- func (s *DatabaseStore) ListPublicChannelsForOwner(ctx context.Context, userID string) ([]channel, error)
- func (s *DatabaseStore) ListReactions(ctx context.Context, userID string) ([]reactionRecord, error)
- func (s *DatabaseStore) ListReadMarkers(ctx context.Context) ([]readMarker, error)
- func (s *DatabaseStore) ListReports(ctx context.Context, targetRoomID string, limit int) ([]reportRecord, error)
- func (s *DatabaseStore) LoadPortal(ctx context.Context) (portalState, bool, error)
- func (s *DatabaseStore) LookupMember(ctx context.Context, roomID, userID string) (memberRecord, bool, error)
- func (s *DatabaseStore) LookupOperation(ctx context.Context, operationID string) (operations.Record, bool, error)
- func (s *DatabaseStore) MarkAccepted(ctx context.Context, matrixRoomID, requestID string, sourceDigest [32]byte, ...) (legacygateway.InvocationRecord, error)
- func (s *DatabaseStore) MarkRejected(ctx context.Context, matrixRoomID, requestID string, sourceDigest [32]byte, ...) (legacygateway.InvocationRecord, error)
- func (s *DatabaseStore) Migrate(ctx context.Context) error
- func (s *DatabaseStore) PruneEventsBefore(ctx context.Context, beforeSeq int64) (int64, error)
- func (s *DatabaseStore) PruneEventsToMaxRows(ctx context.Context, maxRows int64) (int64, error)
- func (s *DatabaseStore) ReserveInvocation(ctx context.Context, candidate legacygateway.InvocationCandidate) (legacygateway.Reservation, error)
- func (s *DatabaseStore) SaveClientBuild(ctx context.Context, expectedDeviceID string, build clientBuild) (bool, error)
- func (s *DatabaseStore) SavePortal(ctx context.Context, state portalState) error
- func (s *DatabaseStore) SaveReadMarker(ctx context.Context, marker readMarker) error
- func (s *DatabaseStore) SearchPublicChannels(ctx context.Context, query string, limit int) ([]channel, error)
- func (s *DatabaseStore) UpsertBlock(ctx context.Context, block blockRecord) error
- func (s *DatabaseStore) UpsertCall(ctx context.Context, call callRecord) error
- func (s *DatabaseStore) UpsertChannel(ctx context.Context, ch channel) error
- func (s *DatabaseStore) UpsertChannelInviteGrant(ctx context.Context, grant channelInviteGrant) error
- func (s *DatabaseStore) UpsertContact(ctx context.Context, contact contactRecord) error
- func (s *DatabaseStore) UpsertConversation(ctx context.Context, record conversationRecord) error
- func (s *DatabaseStore) UpsertFavorite(ctx context.Context, favorite favoriteRecord) error
- func (s *DatabaseStore) UpsertFollow(ctx context.Context, follow followRecord) error
- func (s *DatabaseStore) UpsertGroup(ctx context.Context, group groupRecord) error
- func (s *DatabaseStore) UpsertMember(ctx context.Context, member memberRecord) error
- func (s *DatabaseStore) UpsertOperation(ctx context.Context, record operations.Record) error
- func (s *DatabaseStore) UpsertPlugin(ctx context.Context, plugin pluginInstance) error
- func (s *DatabaseStore) UpsertPluginJob(ctx context.Context, job pluginJob) error
- func (s *DatabaseStore) UpsertPluginSecret(ctx context.Context, secret pluginSecret) error
- func (s *DatabaseStore) UpsertReaction(ctx context.Context, reaction reactionRecord) error
- type MemoryStore
- func (s *MemoryStore) ClaimOperation(_ context.Context, record operations.Record, owner string, ...) (operations.Record, bool, error)
- func (s *MemoryStore) CompareAndSwapContact(_ context.Context, contact, expected contactRecord) (bool, error)
- func (s *MemoryStore) CompareAndSwapContactProjection(_ context.Context, contact, expected contactRecord) (bool, error)
- func (s *MemoryStore) CompareAndSwapMemberGeneration(_ context.Context, member memberRecord, ...) (bool, error)
- func (s *MemoryStore) CompareAndSwapOperation(_ context.Context, record operations.Record, expectedRevision int64, ...) (operations.Record, bool, error)
- func (s *MemoryStore) CountActiveReactions(ctx context.Context, targetType, targetID, reaction string) (int64, error)
- func (s *MemoryStore) CountJoinedMembers(ctx context.Context, roomID, channelID string) (int64, error)
- func (s *MemoryStore) CountProductMembers(ctx context.Context, roomID, channelID string) (int64, int64, error)
- func (s *MemoryStore) DeleteBlock(ctx context.Context, targetType, targetID string) (bool, error)
- func (s *MemoryStore) DeleteChannel(ctx context.Context, channelID string) error
- func (s *MemoryStore) DeleteChannelComment(ctx context.Context, commentID string) (bool, error)
- func (s *MemoryStore) DeleteChannelPost(ctx context.Context, postID string) (bool, error)
- func (s *MemoryStore) DeleteConversationByRoomID(ctx context.Context, matrixRoomID string) error
- func (s *MemoryStore) DeleteFavorite(ctx context.Context, id int64) error
- func (s *MemoryStore) DeleteFollow(ctx context.Context, domain string) error
- func (s *MemoryStore) DeleteGroup(ctx context.Context, roomID string) error
- func (s *MemoryStore) EventBounds(ctx context.Context) (eventBounds, error)
- func (s *MemoryStore) FindFavoriteByEvent(ctx context.Context, eventID, roomID string) (favoriteRecord, bool, error)
- func (s *MemoryStore) GetChannelByIDOrRoom(ctx context.Context, channelID, roomID string) (channel, bool, error)
- func (s *MemoryStore) GetChannelCommentByEventID(ctx context.Context, eventID, channelID string) (channelCommentRecord, bool, error)
- func (s *MemoryStore) GetChannelCommentByID(ctx context.Context, commentID, postID string) (channelCommentRecord, bool, error)
- func (s *MemoryStore) GetChannelPostByEventID(ctx context.Context, eventID, channelID string) (channelPostRecord, bool, error)
- func (s *MemoryStore) GetChannelPostByID(ctx context.Context, postID, channelID string) (channelPostRecord, bool, error)
- func (s *MemoryStore) GetConversationByID(ctx context.Context, conversationID string) (conversationRecord, bool, error)
- func (s *MemoryStore) GetConversationByRoomID(ctx context.Context, matrixRoomID string) (conversationRecord, bool, error)
- func (s *MemoryStore) GetGroupByRoom(ctx context.Context, roomID string) (groupRecord, bool, error)
- func (s *MemoryStore) GetPlugin(ctx context.Context, id string) (pluginInstance, bool, error)
- func (s *MemoryStore) GetPluginJob(ctx context.Context, jobID string) (pluginJob, bool, error)
- func (s *MemoryStore) GetPluginSecret(ctx context.Context, pluginID, name string) (pluginSecret, bool, error)
- func (s *MemoryStore) GetReaction(ctx context.Context, targetType, targetID, reaction, userID string) (reactionRecord, bool, error)
- func (s *MemoryStore) GetReadMarker(ctx context.Context, roomID string) (readMarker, bool, error)
- func (s *MemoryStore) InsertChannelComment(ctx context.Context, comment channelCommentRecord) error
- func (s *MemoryStore) InsertChannelPost(ctx context.Context, post channelPostRecord) error
- func (s *MemoryStore) InsertEvent(ctx context.Context, event p2pEvent) (bool, error)
- func (s *MemoryStore) InsertMemberIfAbsent(_ context.Context, member memberRecord) (bool, error)
- func (s *MemoryStore) InsertReport(ctx context.Context, report reportRecord) error
- func (s *MemoryStore) ListBlocks(ctx context.Context) ([]blockRecord, error)
- func (s *MemoryStore) ListCalls(ctx context.Context, roomID string, activeOnly bool) ([]callRecord, error)
- func (s *MemoryStore) ListChannelComments(ctx context.Context, postID string) ([]channelCommentRecord, error)
- func (s *MemoryStore) ListChannelCommentsPage(ctx context.Context, postID string, fromTS, snapshotTS, cursorTS int64, ...) ([]channelCommentRecord, bool, error)
- func (s *MemoryStore) ListChannelInviteGrants(ctx context.Context) ([]channelInviteGrant, error)
- func (s *MemoryStore) ListChannelPosts(ctx context.Context, channelID string) ([]channelPostRecord, error)
- func (s *MemoryStore) ListChannelPostsPage(ctx context.Context, channelID string, fromTS, snapshotTS, cursorTS int64, ...) ([]channelPostRecord, bool, error)
- func (s *MemoryStore) ListChannels(ctx context.Context) ([]channel, error)
- func (s *MemoryStore) ListContacts(ctx context.Context) ([]contactRecord, error)
- func (s *MemoryStore) ListConversations(ctx context.Context) ([]conversationRecord, error)
- func (s *MemoryStore) ListEvents(ctx context.Context, since int64, limit int) ([]p2pEvent, error)
- func (s *MemoryStore) ListFavorites(ctx context.Context, messageType string) ([]favoriteRecord, error)
- func (s *MemoryStore) ListFollows(ctx context.Context) ([]followRecord, error)
- func (s *MemoryStore) ListGroups(ctx context.Context) ([]groupRecord, error)
- func (s *MemoryStore) ListJoinedChannelsForUser(ctx context.Context, userID string) ([]channel, error)
- func (s *MemoryStore) ListJoinedGroupsForUser(ctx context.Context, userID string) ([]groupRecord, error)
- func (s *MemoryStore) ListMembers(ctx context.Context, roomID, channelID string) ([]memberRecord, error)
- func (s *MemoryStore) ListMembersForUser(ctx context.Context, userID string) ([]memberRecord, error)
- func (s *MemoryStore) ListPlugins(ctx context.Context) ([]pluginInstance, error)
- func (s *MemoryStore) ListPublicChannelsForOwner(ctx context.Context, userID string) ([]channel, error)
- func (s *MemoryStore) ListReactions(ctx context.Context, userID string) ([]reactionRecord, error)
- func (s *MemoryStore) ListReadMarkers(ctx context.Context) ([]readMarker, error)
- func (s *MemoryStore) LoadPortal(ctx context.Context) (portalState, bool, error)
- func (s *MemoryStore) LookupMember(ctx context.Context, roomID, userID string) (memberRecord, bool, error)
- func (s *MemoryStore) LookupOperation(_ context.Context, operationID string) (operations.Record, bool, error)
- func (s *MemoryStore) MarkAccepted(_ context.Context, matrixRoomID, requestID string, sourceDigest [32]byte, ...) (legacygateway.InvocationRecord, error)
- func (s *MemoryStore) MarkRejected(_ context.Context, matrixRoomID, requestID string, sourceDigest [32]byte, ...) (legacygateway.InvocationRecord, error)
- func (s *MemoryStore) PruneEventsBefore(ctx context.Context, beforeSeq int64) (int64, error)
- func (s *MemoryStore) PruneEventsToMaxRows(ctx context.Context, maxRows int64) (int64, error)
- func (s *MemoryStore) ReserveInvocation(_ context.Context, candidate legacygateway.InvocationCandidate) (legacygateway.Reservation, error)
- func (s *MemoryStore) ResetAccountState()
- func (s *MemoryStore) SaveClientBuild(ctx context.Context, expectedDeviceID string, build clientBuild) (bool, error)
- func (s *MemoryStore) SavePortal(ctx context.Context, state portalState) error
- func (s *MemoryStore) SaveReadMarker(ctx context.Context, marker readMarker) error
- func (s *MemoryStore) SearchPublicChannels(ctx context.Context, query string, limit int) ([]channel, error)
- func (s *MemoryStore) UpsertBlock(ctx context.Context, block blockRecord) error
- func (s *MemoryStore) UpsertCall(ctx context.Context, call callRecord) error
- func (s *MemoryStore) UpsertChannel(ctx context.Context, ch channel) error
- func (s *MemoryStore) UpsertChannelInviteGrant(ctx context.Context, grant channelInviteGrant) error
- func (s *MemoryStore) UpsertContact(ctx context.Context, contact contactRecord) error
- func (s *MemoryStore) UpsertConversation(ctx context.Context, record conversationRecord) error
- func (s *MemoryStore) UpsertFavorite(ctx context.Context, favorite favoriteRecord) error
- func (s *MemoryStore) UpsertFollow(ctx context.Context, follow followRecord) error
- func (s *MemoryStore) UpsertGroup(ctx context.Context, group groupRecord) error
- func (s *MemoryStore) UpsertMember(ctx context.Context, member memberRecord) error
- func (s *MemoryStore) UpsertOperation(_ context.Context, record operations.Record) error
- func (s *MemoryStore) UpsertPlugin(ctx context.Context, plugin pluginInstance) error
- func (s *MemoryStore) UpsertPluginJob(ctx context.Context, job pluginJob) error
- func (s *MemoryStore) UpsertPluginSecret(ctx context.Context, secret pluginSecret) error
- func (s *MemoryStore) UpsertReaction(ctx context.Context, reaction reactionRecord) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DatabaseStore ¶
type DatabaseStore struct {
// contains filtered or unexported fields
}
func NewDatabaseStore ¶
func NewDatabaseStore(ctx context.Context, cm *sqlutil.Connections, dbProperties *config.DatabaseOptions) (*DatabaseStore, error)
func NewUnmigratedDatabaseStore ¶
func NewUnmigratedDatabaseStore(db *sql.DB, writer sqlutil.Writer) *DatabaseStore
func (*DatabaseStore) BackfillProductConversations ¶
func (s *DatabaseStore) BackfillProductConversations(ctx context.Context) error
func (*DatabaseStore) ClaimOperation ¶ added in v1.0.3
func (s *DatabaseStore) ClaimOperation( ctx context.Context, record operations.Record, owner string, leaseDurationMillis int64, ) (operations.Record, bool, error)
func (*DatabaseStore) Close ¶
func (s *DatabaseStore) Close() error
func (*DatabaseStore) CompareAndSwapContact ¶ added in v1.0.3
func (s *DatabaseStore) CompareAndSwapContact( ctx context.Context, contact contactRecord, expected contactRecord, ) (bool, error)
func (*DatabaseStore) CompareAndSwapContactProjection ¶ added in v1.0.3
func (s *DatabaseStore) CompareAndSwapContactProjection( ctx context.Context, contact contactRecord, expected contactRecord, ) (bool, error)
CompareAndSwapContactProjection commits a contact generation and its direct-conversation projection atomically. It also preserves the historic contact-over-group ownership rule for a Matrix room inside that transaction.
func (*DatabaseStore) CompareAndSwapMemberGeneration ¶ added in v1.0.3
func (*DatabaseStore) CompareAndSwapOperation ¶ added in v1.0.3
func (s *DatabaseStore) CompareAndSwapOperation( ctx context.Context, record operations.Record, expectedRevision int64, owner string, leaseDurationMillis int64, ) (operations.Record, bool, error)
func (*DatabaseStore) CountActiveReactions ¶
func (*DatabaseStore) CountJoinedMembers ¶
func (*DatabaseStore) CountProductMembers ¶
func (*DatabaseStore) DB ¶
func (s *DatabaseStore) DB() *sql.DB
func (*DatabaseStore) DeleteBlock ¶
func (*DatabaseStore) DeleteChannel ¶
func (s *DatabaseStore) DeleteChannel(ctx context.Context, channelID string) error
func (*DatabaseStore) DeleteChannelComment ¶
func (*DatabaseStore) DeleteChannelPost ¶
func (*DatabaseStore) DeleteContact ¶
func (s *DatabaseStore) DeleteContact(ctx context.Context, roomID string) error
func (*DatabaseStore) DeleteConversationByRoomID ¶
func (s *DatabaseStore) DeleteConversationByRoomID(ctx context.Context, matrixRoomID string) error
func (*DatabaseStore) DeleteFavorite ¶
func (s *DatabaseStore) DeleteFavorite(ctx context.Context, id int64) error
func (*DatabaseStore) DeleteFollow ¶
func (s *DatabaseStore) DeleteFollow(ctx context.Context, domain string) error
func (*DatabaseStore) DeleteGroup ¶
func (s *DatabaseStore) DeleteGroup(ctx context.Context, roomID string) error
func (*DatabaseStore) EventBounds ¶
func (s *DatabaseStore) EventBounds(ctx context.Context) (eventBounds, error)
func (*DatabaseStore) FindFavoriteByEvent ¶
func (*DatabaseStore) GetChannelByIDOrRoom ¶
func (*DatabaseStore) GetChannelCommentByEventID ¶
func (*DatabaseStore) GetChannelCommentByID ¶
func (*DatabaseStore) GetChannelPostByEventID ¶
func (*DatabaseStore) GetChannelPostByID ¶
func (*DatabaseStore) GetConversationByID ¶
func (*DatabaseStore) GetConversationByRoomID ¶
func (*DatabaseStore) GetGroupByRoom ¶
func (*DatabaseStore) GetPluginJob ¶
func (*DatabaseStore) GetPluginSecret ¶
func (*DatabaseStore) GetReaction ¶
func (*DatabaseStore) GetReadMarker ¶ added in v1.0.4
func (*DatabaseStore) InsertChannelComment ¶
func (s *DatabaseStore) InsertChannelComment(ctx context.Context, comment channelCommentRecord) error
func (*DatabaseStore) InsertChannelPost ¶
func (s *DatabaseStore) InsertChannelPost(ctx context.Context, post channelPostRecord) error
func (*DatabaseStore) InsertEvent ¶
func (s *DatabaseStore) InsertEvent(ctx context.Context, event p2pEvent) (bool, error)
func (*DatabaseStore) InsertMemberIfAbsent ¶ added in v1.0.3
func (s *DatabaseStore) InsertMemberIfAbsent(ctx context.Context, member memberRecord) (bool, error)
func (*DatabaseStore) InsertReport ¶
func (s *DatabaseStore) InsertReport(ctx context.Context, report reportRecord) error
func (*DatabaseStore) ListBlocks ¶
func (s *DatabaseStore) ListBlocks(ctx context.Context) ([]blockRecord, error)
func (*DatabaseStore) ListChannelComments ¶
func (s *DatabaseStore) ListChannelComments(ctx context.Context, postID string) ([]channelCommentRecord, error)
func (*DatabaseStore) ListChannelCommentsPage ¶
func (*DatabaseStore) ListChannelInviteGrants ¶
func (s *DatabaseStore) ListChannelInviteGrants(ctx context.Context) ([]channelInviteGrant, error)
func (*DatabaseStore) ListChannelPosts ¶
func (s *DatabaseStore) ListChannelPosts(ctx context.Context, channelID string) ([]channelPostRecord, error)
func (*DatabaseStore) ListChannelPostsPage ¶
func (*DatabaseStore) ListChannels ¶
func (s *DatabaseStore) ListChannels(ctx context.Context) ([]channel, error)
func (*DatabaseStore) ListContacts ¶
func (s *DatabaseStore) ListContacts(ctx context.Context) ([]contactRecord, error)
func (*DatabaseStore) ListConversations ¶
func (s *DatabaseStore) ListConversations(ctx context.Context) ([]conversationRecord, error)
func (*DatabaseStore) ListEvents ¶
func (*DatabaseStore) ListFavorites ¶
func (s *DatabaseStore) ListFavorites(ctx context.Context, messageType string) ([]favoriteRecord, error)
func (*DatabaseStore) ListFollows ¶
func (s *DatabaseStore) ListFollows(ctx context.Context) ([]followRecord, error)
func (*DatabaseStore) ListGroups ¶
func (s *DatabaseStore) ListGroups(ctx context.Context) ([]groupRecord, error)
func (*DatabaseStore) ListJoinedChannelsForUser ¶
func (s *DatabaseStore) ListJoinedChannelsForUser(ctx context.Context, userID string) ([]channel, error)
func (*DatabaseStore) ListJoinedGroupsForUser ¶
func (s *DatabaseStore) ListJoinedGroupsForUser(ctx context.Context, userID string) ([]groupRecord, error)
func (*DatabaseStore) ListMembers ¶
func (s *DatabaseStore) ListMembers(ctx context.Context, roomID, channelID string) ([]memberRecord, error)
func (*DatabaseStore) ListMembersForUser ¶
func (s *DatabaseStore) ListMembersForUser(ctx context.Context, userID string) ([]memberRecord, error)
func (*DatabaseStore) ListPlugins ¶
func (s *DatabaseStore) ListPlugins(ctx context.Context) ([]pluginInstance, error)
func (*DatabaseStore) ListPublicChannelsForOwner ¶
func (s *DatabaseStore) ListPublicChannelsForOwner(ctx context.Context, userID string) ([]channel, error)
func (*DatabaseStore) ListReactions ¶
func (s *DatabaseStore) ListReactions(ctx context.Context, userID string) ([]reactionRecord, error)
func (*DatabaseStore) ListReadMarkers ¶ added in v1.0.4
func (s *DatabaseStore) ListReadMarkers(ctx context.Context) ([]readMarker, error)
func (*DatabaseStore) ListReports ¶
func (*DatabaseStore) LoadPortal ¶
func (s *DatabaseStore) LoadPortal(ctx context.Context) (portalState, bool, error)
func (*DatabaseStore) LookupMember ¶
func (*DatabaseStore) LookupOperation ¶ added in v1.0.3
func (s *DatabaseStore) LookupOperation(ctx context.Context, operationID string) (operations.Record, bool, error)
func (*DatabaseStore) MarkAccepted ¶ added in v1.0.4
func (s *DatabaseStore) MarkAccepted( ctx context.Context, matrixRoomID, requestID string, sourceDigest [32]byte, receipt legacygateway.CreateRunReceipt, updatedAt time.Time, ) (legacygateway.InvocationRecord, error)
MarkAccepted records the first accepted Router result. Both terminal states are immutable; an exact replay returns the already accepted record.
func (*DatabaseStore) MarkRejected ¶ added in v1.0.4
func (s *DatabaseStore) MarkRejected( ctx context.Context, matrixRoomID, requestID string, sourceDigest [32]byte, errorCode string, updatedAt time.Time, ) (legacygateway.InvocationRecord, error)
MarkRejected records the first rejection. Both terminal states are immutable; an exact replay returns the already rejected record.
func (*DatabaseStore) PruneEventsBefore ¶
func (*DatabaseStore) PruneEventsToMaxRows ¶
func (*DatabaseStore) ReserveInvocation ¶ added in v1.0.4
func (s *DatabaseStore) ReserveInvocation( ctx context.Context, candidate legacygateway.InvocationCandidate, ) (legacygateway.Reservation, error)
ReserveInvocation durably claims one Matrix invocation without ever overwriting an existing claim. Conflicts on the public request key, source event, or idempotency digest are loaded and compared after the insert so the result remains correct when concurrent PostgreSQL writers race.
func (*DatabaseStore) SaveClientBuild ¶
func (*DatabaseStore) SavePortal ¶
func (s *DatabaseStore) SavePortal(ctx context.Context, state portalState) error
func (*DatabaseStore) SaveReadMarker ¶
func (s *DatabaseStore) SaveReadMarker(ctx context.Context, marker readMarker) error
func (*DatabaseStore) SearchPublicChannels ¶
func (*DatabaseStore) UpsertBlock ¶
func (s *DatabaseStore) UpsertBlock(ctx context.Context, block blockRecord) error
func (*DatabaseStore) UpsertCall ¶
func (s *DatabaseStore) UpsertCall(ctx context.Context, call callRecord) error
func (*DatabaseStore) UpsertChannel ¶
func (s *DatabaseStore) UpsertChannel(ctx context.Context, ch channel) error
func (*DatabaseStore) UpsertChannelInviteGrant ¶
func (s *DatabaseStore) UpsertChannelInviteGrant(ctx context.Context, grant channelInviteGrant) error
func (*DatabaseStore) UpsertContact ¶
func (s *DatabaseStore) UpsertContact(ctx context.Context, contact contactRecord) error
func (*DatabaseStore) UpsertConversation ¶
func (s *DatabaseStore) UpsertConversation(ctx context.Context, record conversationRecord) error
func (*DatabaseStore) UpsertFavorite ¶
func (s *DatabaseStore) UpsertFavorite(ctx context.Context, favorite favoriteRecord) error
func (*DatabaseStore) UpsertFollow ¶
func (s *DatabaseStore) UpsertFollow(ctx context.Context, follow followRecord) error
func (*DatabaseStore) UpsertGroup ¶
func (s *DatabaseStore) UpsertGroup(ctx context.Context, group groupRecord) error
func (*DatabaseStore) UpsertMember ¶
func (s *DatabaseStore) UpsertMember(ctx context.Context, member memberRecord) error
func (*DatabaseStore) UpsertOperation ¶ added in v1.0.3
func (s *DatabaseStore) UpsertOperation(ctx context.Context, record operations.Record) error
func (*DatabaseStore) UpsertPlugin ¶
func (s *DatabaseStore) UpsertPlugin(ctx context.Context, plugin pluginInstance) error
func (*DatabaseStore) UpsertPluginJob ¶
func (s *DatabaseStore) UpsertPluginJob(ctx context.Context, job pluginJob) error
func (*DatabaseStore) UpsertPluginSecret ¶
func (s *DatabaseStore) UpsertPluginSecret(ctx context.Context, secret pluginSecret) error
func (*DatabaseStore) UpsertReaction ¶
func (s *DatabaseStore) UpsertReaction(ctx context.Context, reaction reactionRecord) error
type MemoryStore ¶ added in v1.0.3
type MemoryStore struct {
// contains filtered or unexported fields
}
MemoryStore is an in-process implementation of the P2P product-state store. It is intended for tests and the legacy no-database service path only. Server startup must continue to require the durable PostgreSQL store.
func NewMemoryStore ¶ added in v1.0.3
func NewMemoryStore() *MemoryStore
NewMemoryStore returns an empty, concurrency-safe store. It deliberately has no configuration hook so it cannot silently replace durable production state.
func (*MemoryStore) ClaimOperation ¶ added in v1.0.3
func (s *MemoryStore) ClaimOperation( _ context.Context, record operations.Record, owner string, leaseDurationMillis int64, ) (operations.Record, bool, error)
func (*MemoryStore) CompareAndSwapContact ¶ added in v1.0.3
func (s *MemoryStore) CompareAndSwapContact(_ context.Context, contact, expected contactRecord) (bool, error)
func (*MemoryStore) CompareAndSwapContactProjection ¶ added in v1.0.3
func (s *MemoryStore) CompareAndSwapContactProjection( _ context.Context, contact, expected contactRecord, ) (bool, error)
func (*MemoryStore) CompareAndSwapMemberGeneration ¶ added in v1.0.3
func (*MemoryStore) CompareAndSwapOperation ¶ added in v1.0.3
func (s *MemoryStore) CompareAndSwapOperation( _ context.Context, record operations.Record, expectedRevision int64, owner string, leaseDurationMillis int64, ) (operations.Record, bool, error)
func (*MemoryStore) CountActiveReactions ¶ added in v1.0.3
func (*MemoryStore) CountJoinedMembers ¶ added in v1.0.3
func (*MemoryStore) CountProductMembers ¶ added in v1.0.3
func (*MemoryStore) DeleteBlock ¶ added in v1.0.3
func (*MemoryStore) DeleteChannel ¶ added in v1.0.3
func (s *MemoryStore) DeleteChannel(ctx context.Context, channelID string) error
func (*MemoryStore) DeleteChannelComment ¶ added in v1.0.3
func (*MemoryStore) DeleteChannelPost ¶ added in v1.0.3
func (*MemoryStore) DeleteConversationByRoomID ¶ added in v1.0.3
func (s *MemoryStore) DeleteConversationByRoomID(ctx context.Context, matrixRoomID string) error
func (*MemoryStore) DeleteFavorite ¶ added in v1.0.3
func (s *MemoryStore) DeleteFavorite(ctx context.Context, id int64) error
func (*MemoryStore) DeleteFollow ¶ added in v1.0.3
func (s *MemoryStore) DeleteFollow(ctx context.Context, domain string) error
func (*MemoryStore) DeleteGroup ¶ added in v1.0.3
func (s *MemoryStore) DeleteGroup(ctx context.Context, roomID string) error
func (*MemoryStore) EventBounds ¶ added in v1.0.3
func (s *MemoryStore) EventBounds(ctx context.Context) (eventBounds, error)
func (*MemoryStore) FindFavoriteByEvent ¶ added in v1.0.3
func (*MemoryStore) GetChannelByIDOrRoom ¶ added in v1.0.3
func (*MemoryStore) GetChannelCommentByEventID ¶ added in v1.0.3
func (*MemoryStore) GetChannelCommentByID ¶ added in v1.0.3
func (*MemoryStore) GetChannelPostByEventID ¶ added in v1.0.3
func (*MemoryStore) GetChannelPostByID ¶ added in v1.0.3
func (*MemoryStore) GetConversationByID ¶ added in v1.0.3
func (*MemoryStore) GetConversationByRoomID ¶ added in v1.0.3
func (*MemoryStore) GetGroupByRoom ¶ added in v1.0.3
func (*MemoryStore) GetPluginJob ¶ added in v1.0.3
func (*MemoryStore) GetPluginSecret ¶ added in v1.0.3
func (*MemoryStore) GetReaction ¶ added in v1.0.3
func (*MemoryStore) GetReadMarker ¶ added in v1.0.4
func (*MemoryStore) InsertChannelComment ¶ added in v1.0.3
func (s *MemoryStore) InsertChannelComment(ctx context.Context, comment channelCommentRecord) error
func (*MemoryStore) InsertChannelPost ¶ added in v1.0.3
func (s *MemoryStore) InsertChannelPost(ctx context.Context, post channelPostRecord) error
func (*MemoryStore) InsertEvent ¶ added in v1.0.3
func (s *MemoryStore) InsertEvent(ctx context.Context, event p2pEvent) (bool, error)
func (*MemoryStore) InsertMemberIfAbsent ¶ added in v1.0.3
func (s *MemoryStore) InsertMemberIfAbsent(_ context.Context, member memberRecord) (bool, error)
func (*MemoryStore) InsertReport ¶ added in v1.0.3
func (s *MemoryStore) InsertReport(ctx context.Context, report reportRecord) error
func (*MemoryStore) ListBlocks ¶ added in v1.0.3
func (s *MemoryStore) ListBlocks(ctx context.Context) ([]blockRecord, error)
func (*MemoryStore) ListChannelComments ¶ added in v1.0.3
func (s *MemoryStore) ListChannelComments(ctx context.Context, postID string) ([]channelCommentRecord, error)
func (*MemoryStore) ListChannelCommentsPage ¶ added in v1.0.3
func (*MemoryStore) ListChannelInviteGrants ¶ added in v1.0.3
func (s *MemoryStore) ListChannelInviteGrants(ctx context.Context) ([]channelInviteGrant, error)
func (*MemoryStore) ListChannelPosts ¶ added in v1.0.3
func (s *MemoryStore) ListChannelPosts(ctx context.Context, channelID string) ([]channelPostRecord, error)
func (*MemoryStore) ListChannelPostsPage ¶ added in v1.0.3
func (*MemoryStore) ListChannels ¶ added in v1.0.3
func (s *MemoryStore) ListChannels(ctx context.Context) ([]channel, error)
func (*MemoryStore) ListContacts ¶ added in v1.0.3
func (s *MemoryStore) ListContacts(ctx context.Context) ([]contactRecord, error)
func (*MemoryStore) ListConversations ¶ added in v1.0.3
func (s *MemoryStore) ListConversations(ctx context.Context) ([]conversationRecord, error)
func (*MemoryStore) ListEvents ¶ added in v1.0.3
func (*MemoryStore) ListFavorites ¶ added in v1.0.3
func (s *MemoryStore) ListFavorites(ctx context.Context, messageType string) ([]favoriteRecord, error)
func (*MemoryStore) ListFollows ¶ added in v1.0.3
func (s *MemoryStore) ListFollows(ctx context.Context) ([]followRecord, error)
func (*MemoryStore) ListGroups ¶ added in v1.0.3
func (s *MemoryStore) ListGroups(ctx context.Context) ([]groupRecord, error)
func (*MemoryStore) ListJoinedChannelsForUser ¶ added in v1.0.3
func (s *MemoryStore) ListJoinedChannelsForUser(ctx context.Context, userID string) ([]channel, error)
func (*MemoryStore) ListJoinedGroupsForUser ¶ added in v1.0.3
func (s *MemoryStore) ListJoinedGroupsForUser(ctx context.Context, userID string) ([]groupRecord, error)
func (*MemoryStore) ListMembers ¶ added in v1.0.3
func (s *MemoryStore) ListMembers(ctx context.Context, roomID, channelID string) ([]memberRecord, error)
func (*MemoryStore) ListMembersForUser ¶ added in v1.0.3
func (s *MemoryStore) ListMembersForUser(ctx context.Context, userID string) ([]memberRecord, error)
func (*MemoryStore) ListPlugins ¶ added in v1.0.3
func (s *MemoryStore) ListPlugins(ctx context.Context) ([]pluginInstance, error)
func (*MemoryStore) ListPublicChannelsForOwner ¶ added in v1.0.3
func (s *MemoryStore) ListPublicChannelsForOwner(ctx context.Context, userID string) ([]channel, error)
func (*MemoryStore) ListReactions ¶ added in v1.0.3
func (s *MemoryStore) ListReactions(ctx context.Context, userID string) ([]reactionRecord, error)
func (*MemoryStore) ListReadMarkers ¶ added in v1.0.4
func (s *MemoryStore) ListReadMarkers(ctx context.Context) ([]readMarker, error)
func (*MemoryStore) LoadPortal ¶ added in v1.0.3
func (s *MemoryStore) LoadPortal(ctx context.Context) (portalState, bool, error)
func (*MemoryStore) LookupMember ¶ added in v1.0.3
func (*MemoryStore) LookupOperation ¶ added in v1.0.3
func (s *MemoryStore) LookupOperation(_ context.Context, operationID string) (operations.Record, bool, error)
func (*MemoryStore) MarkAccepted ¶ added in v1.0.4
func (s *MemoryStore) MarkAccepted( _ context.Context, matrixRoomID, requestID string, sourceDigest [32]byte, receipt legacygateway.CreateRunReceipt, updatedAt time.Time, ) (legacygateway.InvocationRecord, error)
func (*MemoryStore) MarkRejected ¶ added in v1.0.4
func (s *MemoryStore) MarkRejected( _ context.Context, matrixRoomID, requestID string, sourceDigest [32]byte, errorCode string, updatedAt time.Time, ) (legacygateway.InvocationRecord, error)
func (*MemoryStore) PruneEventsBefore ¶ added in v1.0.3
func (*MemoryStore) PruneEventsToMaxRows ¶ added in v1.0.3
func (*MemoryStore) ReserveInvocation ¶ added in v1.0.4
func (s *MemoryStore) ReserveInvocation( _ context.Context, candidate legacygateway.InvocationCandidate, ) (legacygateway.Reservation, error)
func (*MemoryStore) ResetAccountState ¶ added in v1.0.3
func (s *MemoryStore) ResetAccountState()
ResetAccountState atomically clears the volatile product and portal state removed by the legacy no-database account-deletion path. Installed plugin state is intentionally retained to preserve that path's existing behavior. This optional capability is not part of the durable Store contract.
func (*MemoryStore) SaveClientBuild ¶ added in v1.0.3
func (*MemoryStore) SavePortal ¶ added in v1.0.3
func (s *MemoryStore) SavePortal(ctx context.Context, state portalState) error
func (*MemoryStore) SaveReadMarker ¶ added in v1.0.3
func (s *MemoryStore) SaveReadMarker(ctx context.Context, marker readMarker) error
func (*MemoryStore) SearchPublicChannels ¶ added in v1.0.3
func (*MemoryStore) UpsertBlock ¶ added in v1.0.3
func (s *MemoryStore) UpsertBlock(ctx context.Context, block blockRecord) error
func (*MemoryStore) UpsertCall ¶ added in v1.0.3
func (s *MemoryStore) UpsertCall(ctx context.Context, call callRecord) error
func (*MemoryStore) UpsertChannel ¶ added in v1.0.3
func (s *MemoryStore) UpsertChannel(ctx context.Context, ch channel) error
func (*MemoryStore) UpsertChannelInviteGrant ¶ added in v1.0.3
func (s *MemoryStore) UpsertChannelInviteGrant(ctx context.Context, grant channelInviteGrant) error
func (*MemoryStore) UpsertContact ¶ added in v1.0.3
func (s *MemoryStore) UpsertContact(ctx context.Context, contact contactRecord) error
func (*MemoryStore) UpsertConversation ¶ added in v1.0.3
func (s *MemoryStore) UpsertConversation(ctx context.Context, record conversationRecord) error
func (*MemoryStore) UpsertFavorite ¶ added in v1.0.3
func (s *MemoryStore) UpsertFavorite(ctx context.Context, favorite favoriteRecord) error
func (*MemoryStore) UpsertFollow ¶ added in v1.0.3
func (s *MemoryStore) UpsertFollow(ctx context.Context, follow followRecord) error
func (*MemoryStore) UpsertGroup ¶ added in v1.0.3
func (s *MemoryStore) UpsertGroup(ctx context.Context, group groupRecord) error
func (*MemoryStore) UpsertMember ¶ added in v1.0.3
func (s *MemoryStore) UpsertMember(ctx context.Context, member memberRecord) error
func (*MemoryStore) UpsertOperation ¶ added in v1.0.3
func (s *MemoryStore) UpsertOperation(_ context.Context, record operations.Record) error
func (*MemoryStore) UpsertPlugin ¶ added in v1.0.3
func (s *MemoryStore) UpsertPlugin(ctx context.Context, plugin pluginInstance) error
func (*MemoryStore) UpsertPluginJob ¶ added in v1.0.3
func (s *MemoryStore) UpsertPluginJob(ctx context.Context, job pluginJob) error
func (*MemoryStore) UpsertPluginSecret ¶ added in v1.0.3
func (s *MemoryStore) UpsertPluginSecret(ctx context.Context, secret pluginSecret) error
func (*MemoryStore) UpsertReaction ¶ added in v1.0.3
func (s *MemoryStore) UpsertReaction(ctx context.Context, reaction reactionRecord) error
Source Files
¶
- aliases.go
- channel_pagination.go
- close.go
- conversation_store.go
- memory_channel_content.go
- memory_channels.go
- memory_conversations.go
- memory_events.go
- memory_legacy_gateway.go
- memory_members.go
- memory_operations.go
- memory_plugins.go
- memory_portal.go
- memory_relationships.go
- memory_reports.go
- memory_reset.go
- memory_social.go
- memory_store.go
- storage.go
- storage_blocks.go
- storage_channels.go
- storage_contacts_groups_calls.go
- storage_helpers.go
- storage_legacy_gateway.go
- storage_members_events.go
- storage_migrations.go
- storage_operations.go
- storage_plugins.go
- storage_portal.go
- storage_reports.go
- storage_social.go