aboutsummaryrefslogtreecommitdiff
path: root/roomserver/storage/interface.go
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-09-02 10:02:48 +0100
committerGitHub <noreply@github.com>2020-09-02 10:02:48 +0100
commit02a73f29f861c637f30df4a2bb1fce400e481a3c (patch)
tree6923a7c4db81321e7286cda410fc94f986f9cde8 /roomserver/storage/interface.go
parent82a96176599aad737e5052a501442b29a5be5c69 (diff)
Expand RoomInfo to cover more DB storage functions (#1377)
* Factor more things to RoomInfo * Factor out remaining bits for RoomInfo * Linting for now
Diffstat (limited to 'roomserver/storage/interface.go')
-rw-r--r--roomserver/storage/interface.go6
1 files changed, 1 insertions, 5 deletions
diff --git a/roomserver/storage/interface.go b/roomserver/storage/interface.go
index 5f641614..ef7a9f09 100644
--- a/roomserver/storage/interface.go
+++ b/roomserver/storage/interface.go
@@ -66,8 +66,6 @@ type Database interface {
Events(ctx context.Context, eventNIDs []types.EventNID) ([]types.Event, error)
// Look up snapshot NID for an event ID string
SnapshotNIDFromEventID(ctx context.Context, eventID string) (types.StateSnapshotNID, error)
- // Look up a room version from the room NID.
- GetRoomVersionForRoomNID(ctx context.Context, roomNID types.RoomNID) (gomatrixserverlib.RoomVersion, error)
// Stores a matrix room event in the database. Returns the room NID, the state snapshot and the redacted event ID if any, or an error.
StoreEvent(
ctx context.Context, event gomatrixserverlib.Event, txnAndSessionID *api.TransactionID, authEventNIDs []types.EventNID,
@@ -91,7 +89,7 @@ type Database interface {
// The RoomRecentEventsUpdater must have Commit or Rollback called on it if this doesn't return an error.
// Returns the latest events in the room and the last eventID sent to the log along with an updater.
// If this returns an error then no further action is required.
- GetLatestEventsForUpdate(ctx context.Context, roomNID types.RoomNID) (*shared.LatestEventsUpdater, error)
+ GetLatestEventsForUpdate(ctx context.Context, roomInfo types.RoomInfo) (*shared.LatestEventsUpdater, error)
// Look up event ID by transaction's info.
// This is used to determine if the room event is processed/processing already.
// Returns an empty string if no such event exists.
@@ -136,8 +134,6 @@ type Database interface {
// not found.
// Returns an error if the retrieval went wrong.
EventsFromIDs(ctx context.Context, eventIDs []string) ([]types.Event, error)
- // Look up the room version for a given room.
- GetRoomVersionForRoom(ctx context.Context, roomID string) (gomatrixserverlib.RoomVersion, error)
// Publish or unpublish a room from the room directory.
PublishRoom(ctx context.Context, roomID string, publish bool) error
// Returns a list of room IDs for rooms which are published.