mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-06 13:43:09 -06:00
Add RoomserverUserAPI interface
This commit is contained in:
parent
dc6729c8be
commit
ed3cddeba3
|
|
@ -22,7 +22,7 @@ type RoomserverInternalAPI interface {
|
||||||
// interdependencies between the roomserver and other input APIs
|
// interdependencies between the roomserver and other input APIs
|
||||||
SetFederationAPI(fsAPI fsAPI.RoomserverFederationAPI, keyRing *gomatrixserverlib.KeyRing)
|
SetFederationAPI(fsAPI fsAPI.RoomserverFederationAPI, keyRing *gomatrixserverlib.KeyRing)
|
||||||
SetAppserviceAPI(asAPI asAPI.AppServiceQueryAPI)
|
SetAppserviceAPI(asAPI asAPI.AppServiceQueryAPI)
|
||||||
SetUserAPI(userAPI userapi.UserInternalAPI)
|
SetUserAPI(userAPI userapi.RoomserverUserAPI)
|
||||||
|
|
||||||
// QueryAuthChain returns the entire auth chain for the event IDs given.
|
// QueryAuthChain returns the entire auth chain for the event IDs given.
|
||||||
// The response includes the events in the request.
|
// The response includes the events in the request.
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ func (t *RoomserverInternalAPITrace) SetAppserviceAPI(asAPI asAPI.AppServiceQuer
|
||||||
t.Impl.SetAppserviceAPI(asAPI)
|
t.Impl.SetAppserviceAPI(asAPI)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *RoomserverInternalAPITrace) SetUserAPI(userAPI userapi.UserInternalAPI) {
|
func (t *RoomserverInternalAPITrace) SetUserAPI(userAPI userapi.RoomserverUserAPI) {
|
||||||
t.Impl.SetUserAPI(userAPI)
|
t.Impl.SetUserAPI(userAPI)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ func (r *RoomserverInternalAPI) SetFederationAPI(fsAPI fsAPI.RoomserverFederatio
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (r *RoomserverInternalAPI) SetUserAPI(userAPI userapi.UserInternalAPI) {
|
func (r *RoomserverInternalAPI) SetUserAPI(userAPI userapi.RoomserverUserAPI) {
|
||||||
r.Leaver.UserAPI = userAPI
|
r.Leaver.UserAPI = userAPI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ type Leaver struct {
|
||||||
Cfg *config.RoomServer
|
Cfg *config.RoomServer
|
||||||
DB storage.Database
|
DB storage.Database
|
||||||
FSAPI fsAPI.RoomserverFederationAPI
|
FSAPI fsAPI.RoomserverFederationAPI
|
||||||
UserAPI userapi.UserInternalAPI
|
UserAPI userapi.RoomserverUserAPI
|
||||||
Inputer *input.Inputer
|
Inputer *input.Inputer
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -95,7 +95,7 @@ func (h *httpRoomserverInternalAPI) SetAppserviceAPI(asAPI asAPI.AppServiceQuery
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetUserAPI no-ops in HTTP client mode as there is no chicken/egg scenario
|
// SetUserAPI no-ops in HTTP client mode as there is no chicken/egg scenario
|
||||||
func (h *httpRoomserverInternalAPI) SetUserAPI(userAPI userapi.UserInternalAPI) {
|
func (h *httpRoomserverInternalAPI) SetUserAPI(userAPI userapi.RoomserverUserAPI) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetRoomAlias implements RoomserverAliasAPI
|
// SetRoomAlias implements RoomserverAliasAPI
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@ type UserInternalAPI interface {
|
||||||
ClientUserAPI
|
ClientUserAPI
|
||||||
MediaUserAPI
|
MediaUserAPI
|
||||||
FederationUserAPI
|
FederationUserAPI
|
||||||
|
RoomserverUserAPI
|
||||||
|
|
||||||
QuerySearchProfilesAPI // used by p2p demos
|
QuerySearchProfilesAPI // used by p2p demos
|
||||||
}
|
}
|
||||||
|
|
@ -41,6 +42,10 @@ type AppserviceUserAPI interface {
|
||||||
PerformDeviceCreation(ctx context.Context, req *PerformDeviceCreationRequest, res *PerformDeviceCreationResponse) error
|
PerformDeviceCreation(ctx context.Context, req *PerformDeviceCreationRequest, res *PerformDeviceCreationResponse) error
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type RoomserverUserAPI interface {
|
||||||
|
QueryAccountData(ctx context.Context, req *QueryAccountDataRequest, res *QueryAccountDataResponse) error
|
||||||
|
}
|
||||||
|
|
||||||
// api functions required by the media api
|
// api functions required by the media api
|
||||||
type MediaUserAPI interface {
|
type MediaUserAPI interface {
|
||||||
QueryAcccessTokenAPI
|
QueryAcccessTokenAPI
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue