diff options
author | kegsay <kegan@matrix.org> | 2022-05-06 12:39:26 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-06 12:39:26 +0100 |
commit | 85704eff207f7690d197172abb991ae1ac238239 (patch) | |
tree | 3d43faf35034c270ebaf40a27a75a646e40829d7 /roomserver/inthttp/client.go | |
parent | 4705f5761e620e7f8a35151eeb2007e884847152 (diff) |
Clean up interface definitions (#2427)
* tidy up interfaces
* remove unused GetCreatorIDForAlias
* Add RoomserverUserAPI interface
* Define more interfaces
* Use AppServiceInternalAPI for consistent naming
* clean up federationapi constructor a bit
* Fix monolith in -http mode
Diffstat (limited to 'roomserver/inthttp/client.go')
-rw-r--r-- | roomserver/inthttp/client.go | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/roomserver/inthttp/client.go b/roomserver/inthttp/client.go index 4fc75ff4..09358001 100644 --- a/roomserver/inthttp/client.go +++ b/roomserver/inthttp/client.go @@ -91,11 +91,11 @@ func (h *httpRoomserverInternalAPI) SetFederationAPI(fsAPI fsInputAPI.Roomserver } // SetAppserviceAPI no-ops in HTTP client mode as there is no chicken/egg scenario -func (h *httpRoomserverInternalAPI) SetAppserviceAPI(asAPI asAPI.AppServiceQueryAPI) { +func (h *httpRoomserverInternalAPI) SetAppserviceAPI(asAPI asAPI.AppServiceInternalAPI) { } // 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 @@ -137,19 +137,6 @@ func (h *httpRoomserverInternalAPI) GetAliasesForRoomID( return httputil.PostJSON(ctx, span, h.httpClient, apiURL, request, response) } -// GetCreatorIDForAlias implements RoomserverAliasAPI -func (h *httpRoomserverInternalAPI) GetCreatorIDForAlias( - ctx context.Context, - request *api.GetCreatorIDForAliasRequest, - response *api.GetCreatorIDForAliasResponse, -) error { - span, ctx := opentracing.StartSpanFromContext(ctx, "GetCreatorIDForAlias") - defer span.Finish() - - apiURL := h.roomserverURL + RoomserverGetCreatorIDForAliasPath - return httputil.PostJSON(ctx, span, h.httpClient, apiURL, request, response) -} - // RemoveRoomAlias implements RoomserverAliasAPI func (h *httpRoomserverInternalAPI) RemoveRoomAlias( ctx context.Context, |