Define component interfaces based on consumers (2/2) (#2425)

* convert remaining interfaces

* Tidy up the userapi interfaces
This commit is contained in:
kegsay 2022-05-05 19:30:38 +01:00 committed by GitHub
parent e4da04e75b
commit 9957752a9d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
42 changed files with 153 additions and 162 deletions

View file

@ -38,7 +38,7 @@ const maxBackfillServers = 5
type Backfiller struct {
ServerName gomatrixserverlib.ServerName
DB storage.Database
FSAPI federationAPI.FederationInternalAPI
FSAPI federationAPI.RoomserverFederationAPI
KeyRing gomatrixserverlib.JSONVerifier
// The servers which should be preferred above other servers when backfilling
@ -228,7 +228,7 @@ func (r *Backfiller) fetchAndStoreMissingEvents(ctx context.Context, roomVer gom
// backfillRequester implements gomatrixserverlib.BackfillRequester
type backfillRequester struct {
db storage.Database
fsAPI federationAPI.FederationInternalAPI
fsAPI federationAPI.RoomserverFederationAPI
thisServer gomatrixserverlib.ServerName
preferServer map[gomatrixserverlib.ServerName]bool
bwExtrems map[string][]string
@ -240,7 +240,7 @@ type backfillRequester struct {
}
func newBackfillRequester(
db storage.Database, fsAPI federationAPI.FederationInternalAPI, thisServer gomatrixserverlib.ServerName,
db storage.Database, fsAPI federationAPI.RoomserverFederationAPI, thisServer gomatrixserverlib.ServerName,
bwExtrems map[string][]string, preferServers []gomatrixserverlib.ServerName,
) *backfillRequester {
preferServer := make(map[gomatrixserverlib.ServerName]bool)

View file

@ -35,7 +35,7 @@ import (
type Inviter struct {
DB storage.Database
Cfg *config.RoomServer
FSAPI federationAPI.FederationInternalAPI
FSAPI federationAPI.RoomserverFederationAPI
Inputer *input.Inputer
}

View file

@ -38,7 +38,7 @@ import (
type Joiner struct {
ServerName gomatrixserverlib.ServerName
Cfg *config.RoomServer
FSAPI fsAPI.FederationInternalAPI
FSAPI fsAPI.RoomserverFederationAPI
RSAPI rsAPI.RoomserverInternalAPI
DB storage.Database

View file

@ -37,7 +37,7 @@ import (
type Leaver struct {
Cfg *config.RoomServer
DB storage.Database
FSAPI fsAPI.FederationInternalAPI
FSAPI fsAPI.RoomserverFederationAPI
UserAPI userapi.UserInternalAPI
Inputer *input.Inputer
}

View file

@ -33,7 +33,7 @@ import (
type Peeker struct {
ServerName gomatrixserverlib.ServerName
Cfg *config.RoomServer
FSAPI fsAPI.FederationInternalAPI
FSAPI fsAPI.RoomserverFederationAPI
DB storage.Database
Inputer *input.Inputer

View file

@ -30,7 +30,7 @@ import (
type Unpeeker struct {
ServerName gomatrixserverlib.ServerName
Cfg *config.RoomServer
FSAPI fsAPI.FederationInternalAPI
FSAPI fsAPI.RoomserverFederationAPI
DB storage.Database
Inputer *input.Inputer