storage

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 11, 2026 License: AGPL-3.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 (s *DatabaseStore) CountActiveReactions(ctx context.Context, targetType, targetID, reaction string) (int64, error)

func (*DatabaseStore) CountJoinedMembers

func (s *DatabaseStore) CountJoinedMembers(ctx context.Context, roomID, channelID string) (int64, error)

func (*DatabaseStore) CountProductMembers

func (s *DatabaseStore) CountProductMembers(ctx context.Context, roomID, channelID string) (int64, int64, error)

func (*DatabaseStore) DB

func (s *DatabaseStore) DB() *sql.DB

func (*DatabaseStore) DeleteBlock

func (s *DatabaseStore) DeleteBlock(ctx context.Context, targetType, targetID string) (bool, error)

func (*DatabaseStore) DeleteChannel

func (s *DatabaseStore) DeleteChannel(ctx context.Context, channelID string) error

func (*DatabaseStore) DeleteChannelComment

func (s *DatabaseStore) DeleteChannelComment(ctx context.Context, commentID string) (bool, error)

func (*DatabaseStore) DeleteChannelPost

func (s *DatabaseStore) DeleteChannelPost(ctx context.Context, postID string) (bool, error)

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 (s *DatabaseStore) FindFavoriteByEvent(ctx context.Context, eventID, roomID string) (favoriteRecord, bool, error)

func (*DatabaseStore) GetChannelByIDOrRoom

func (s *DatabaseStore) GetChannelByIDOrRoom(ctx context.Context, channelID, roomID string) (channel, bool, error)

func (*DatabaseStore) GetChannelCommentByEventID

func (s *DatabaseStore) GetChannelCommentByEventID(ctx context.Context, eventID, channelID string) (channelCommentRecord, bool, error)

func (*DatabaseStore) GetChannelCommentByID

func (s *DatabaseStore) GetChannelCommentByID(ctx context.Context, commentID, postID string) (channelCommentRecord, bool, error)

func (*DatabaseStore) GetChannelPostByEventID

func (s *DatabaseStore) GetChannelPostByEventID(ctx context.Context, eventID, channelID string) (channelPostRecord, bool, error)

func (*DatabaseStore) GetChannelPostByID

func (s *DatabaseStore) GetChannelPostByID(ctx context.Context, postID, channelID string) (channelPostRecord, bool, error)

func (*DatabaseStore) GetConversationByID

func (s *DatabaseStore) GetConversationByID(ctx context.Context, conversationID string) (conversationRecord, bool, error)

func (*DatabaseStore) GetConversationByRoomID

func (s *DatabaseStore) GetConversationByRoomID(ctx context.Context, matrixRoomID string) (conversationRecord, bool, error)

func (*DatabaseStore) GetGroupByRoom

func (s *DatabaseStore) GetGroupByRoom(ctx context.Context, roomID string) (groupRecord, bool, error)

func (*DatabaseStore) GetPlugin

func (s *DatabaseStore) GetPlugin(ctx context.Context, id string) (pluginInstance, bool, error)

func (*DatabaseStore) GetPluginJob

func (s *DatabaseStore) GetPluginJob(ctx context.Context, jobID string) (pluginJob, bool, error)

func (*DatabaseStore) GetPluginSecret

func (s *DatabaseStore) GetPluginSecret(ctx context.Context, pluginID, name string) (pluginSecret, bool, error)

func (*DatabaseStore) GetReaction

func (s *DatabaseStore) GetReaction(ctx context.Context, targetType, targetID, reaction, userID string) (reactionRecord, bool, error)

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) ListCalls

func (s *DatabaseStore) ListCalls(ctx context.Context, roomID string, activeOnly bool) ([]callRecord, error)

func (*DatabaseStore) ListChannelComments

func (s *DatabaseStore) ListChannelComments(ctx context.Context, postID string) ([]channelCommentRecord, error)

func (*DatabaseStore) ListChannelCommentsPage

func (s *DatabaseStore) ListChannelCommentsPage(ctx context.Context, postID string, fromTS, snapshotTS, cursorTS int64, cursorID string, limit int) ([]channelCommentRecord, bool, error)

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 (s *DatabaseStore) ListChannelPostsPage(ctx context.Context, channelID string, fromTS, snapshotTS, cursorTS int64, cursorID string, limit int) ([]channelPostRecord, bool, error)

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 (s *DatabaseStore) ListEvents(ctx context.Context, since int64, limit int) ([]p2pEvent, error)

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 (s *DatabaseStore) ListReports(ctx context.Context, targetRoomID string, limit int) ([]reportRecord, error)

func (*DatabaseStore) LoadPortal

func (s *DatabaseStore) LoadPortal(ctx context.Context) (portalState, bool, error)

func (*DatabaseStore) LookupMember

func (s *DatabaseStore) LookupMember(ctx context.Context, roomID, userID string) (memberRecord, bool, error)

func (*DatabaseStore) Migrate

func (s *DatabaseStore) Migrate(ctx context.Context) error

func (*DatabaseStore) PruneEventsBefore

func (s *DatabaseStore) PruneEventsBefore(ctx context.Context, beforeSeq int64) (int64, error)

func (*DatabaseStore) PruneEventsToMaxRows

func (s *DatabaseStore) PruneEventsToMaxRows(ctx context.Context, maxRows int64) (int64, error)

func (*DatabaseStore) SaveClientBuild

func (s *DatabaseStore) SaveClientBuild(ctx context.Context, expectedDeviceID string, build clientBuild) (bool, error)

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 (s *DatabaseStore) SearchPublicChannels(ctx context.Context, query string, limit int) ([]channel, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL