Documentation
¶
Index ¶
- type DatabaseStore
- func (s *DatabaseStore) BackfillProductConversations(ctx context.Context) error
- func (s *DatabaseStore) Close() 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) 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) 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) 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) 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) 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) 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
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) Close ¶
func (s *DatabaseStore) Close() 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) 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) 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) ListReports ¶
func (*DatabaseStore) LoadPortal ¶
func (s *DatabaseStore) LoadPortal(ctx context.Context) (portalState, bool, error)
func (*DatabaseStore) LookupMember ¶
func (*DatabaseStore) PruneEventsBefore ¶
func (*DatabaseStore) PruneEventsToMaxRows ¶
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) 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
Click to show internal directories.
Click to hide internal directories.