mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 14:12:47 +00:00
* Fix #897 and shuffle directory around * Update find-lint * goimports Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
parent
3fdb045116
commit
24d8df664c
260 changed files with 901 additions and 901 deletions
|
@ -6,10 +6,10 @@ import (
|
|||
"sync"
|
||||
|
||||
"github.com/Shopify/sarama"
|
||||
"github.com/matrix-org/dendrite/common"
|
||||
"github.com/matrix-org/dendrite/common/caching"
|
||||
"github.com/matrix-org/dendrite/common/config"
|
||||
fsAPI "github.com/matrix-org/dendrite/federationsender/api"
|
||||
"github.com/matrix-org/dendrite/internal"
|
||||
"github.com/matrix-org/dendrite/internal/caching"
|
||||
"github.com/matrix-org/dendrite/internal/config"
|
||||
"github.com/matrix-org/dendrite/roomserver/api"
|
||||
"github.com/matrix-org/dendrite/roomserver/storage"
|
||||
"github.com/matrix-org/gomatrixserverlib"
|
||||
|
@ -34,7 +34,7 @@ type RoomserverInternalAPI struct {
|
|||
// nolint: gocyclo
|
||||
func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
||||
servMux.Handle(api.RoomserverInputRoomEventsPath,
|
||||
common.MakeInternalAPI("inputRoomEvents", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("inputRoomEvents", func(req *http.Request) util.JSONResponse {
|
||||
var request api.InputRoomEventsRequest
|
||||
var response api.InputRoomEventsResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -47,7 +47,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
}),
|
||||
)
|
||||
servMux.Handle(api.RoomserverPerformJoinPath,
|
||||
common.MakeInternalAPI("performJoin", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("performJoin", func(req *http.Request) util.JSONResponse {
|
||||
var request api.PerformJoinRequest
|
||||
var response api.PerformJoinResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -60,7 +60,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
}),
|
||||
)
|
||||
servMux.Handle(api.RoomserverPerformLeavePath,
|
||||
common.MakeInternalAPI("performLeave", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("performLeave", func(req *http.Request) util.JSONResponse {
|
||||
var request api.PerformLeaveRequest
|
||||
var response api.PerformLeaveResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -74,7 +74,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverQueryLatestEventsAndStatePath,
|
||||
common.MakeInternalAPI("queryLatestEventsAndState", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("queryLatestEventsAndState", func(req *http.Request) util.JSONResponse {
|
||||
var request api.QueryLatestEventsAndStateRequest
|
||||
var response api.QueryLatestEventsAndStateResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -88,7 +88,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverQueryStateAfterEventsPath,
|
||||
common.MakeInternalAPI("queryStateAfterEvents", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("queryStateAfterEvents", func(req *http.Request) util.JSONResponse {
|
||||
var request api.QueryStateAfterEventsRequest
|
||||
var response api.QueryStateAfterEventsResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -102,7 +102,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverQueryEventsByIDPath,
|
||||
common.MakeInternalAPI("queryEventsByID", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("queryEventsByID", func(req *http.Request) util.JSONResponse {
|
||||
var request api.QueryEventsByIDRequest
|
||||
var response api.QueryEventsByIDResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -116,7 +116,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverQueryMembershipForUserPath,
|
||||
common.MakeInternalAPI("QueryMembershipForUser", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("QueryMembershipForUser", func(req *http.Request) util.JSONResponse {
|
||||
var request api.QueryMembershipForUserRequest
|
||||
var response api.QueryMembershipForUserResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -130,7 +130,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverQueryMembershipsForRoomPath,
|
||||
common.MakeInternalAPI("queryMembershipsForRoom", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("queryMembershipsForRoom", func(req *http.Request) util.JSONResponse {
|
||||
var request api.QueryMembershipsForRoomRequest
|
||||
var response api.QueryMembershipsForRoomResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -144,7 +144,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverQueryInvitesForUserPath,
|
||||
common.MakeInternalAPI("queryInvitesForUser", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("queryInvitesForUser", func(req *http.Request) util.JSONResponse {
|
||||
var request api.QueryInvitesForUserRequest
|
||||
var response api.QueryInvitesForUserResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -158,7 +158,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverQueryServerAllowedToSeeEventPath,
|
||||
common.MakeInternalAPI("queryServerAllowedToSeeEvent", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("queryServerAllowedToSeeEvent", func(req *http.Request) util.JSONResponse {
|
||||
var request api.QueryServerAllowedToSeeEventRequest
|
||||
var response api.QueryServerAllowedToSeeEventResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -172,7 +172,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverQueryMissingEventsPath,
|
||||
common.MakeInternalAPI("queryMissingEvents", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("queryMissingEvents", func(req *http.Request) util.JSONResponse {
|
||||
var request api.QueryMissingEventsRequest
|
||||
var response api.QueryMissingEventsResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -186,7 +186,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverQueryStateAndAuthChainPath,
|
||||
common.MakeInternalAPI("queryStateAndAuthChain", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("queryStateAndAuthChain", func(req *http.Request) util.JSONResponse {
|
||||
var request api.QueryStateAndAuthChainRequest
|
||||
var response api.QueryStateAndAuthChainResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -200,7 +200,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverQueryBackfillPath,
|
||||
common.MakeInternalAPI("QueryBackfill", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("QueryBackfill", func(req *http.Request) util.JSONResponse {
|
||||
var request api.QueryBackfillRequest
|
||||
var response api.QueryBackfillResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -214,7 +214,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverQueryRoomVersionCapabilitiesPath,
|
||||
common.MakeInternalAPI("QueryRoomVersionCapabilities", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("QueryRoomVersionCapabilities", func(req *http.Request) util.JSONResponse {
|
||||
var request api.QueryRoomVersionCapabilitiesRequest
|
||||
var response api.QueryRoomVersionCapabilitiesResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -228,7 +228,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverQueryRoomVersionForRoomPath,
|
||||
common.MakeInternalAPI("QueryRoomVersionForRoom", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("QueryRoomVersionForRoom", func(req *http.Request) util.JSONResponse {
|
||||
var request api.QueryRoomVersionForRoomRequest
|
||||
var response api.QueryRoomVersionForRoomResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -242,7 +242,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverSetRoomAliasPath,
|
||||
common.MakeInternalAPI("setRoomAlias", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("setRoomAlias", func(req *http.Request) util.JSONResponse {
|
||||
var request api.SetRoomAliasRequest
|
||||
var response api.SetRoomAliasResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -256,7 +256,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverGetRoomIDForAliasPath,
|
||||
common.MakeInternalAPI("GetRoomIDForAlias", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("GetRoomIDForAlias", func(req *http.Request) util.JSONResponse {
|
||||
var request api.GetRoomIDForAliasRequest
|
||||
var response api.GetRoomIDForAliasResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -270,7 +270,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverGetCreatorIDForAliasPath,
|
||||
common.MakeInternalAPI("GetCreatorIDForAlias", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("GetCreatorIDForAlias", func(req *http.Request) util.JSONResponse {
|
||||
var request api.GetCreatorIDForAliasRequest
|
||||
var response api.GetCreatorIDForAliasResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -284,7 +284,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverGetAliasesForRoomIDPath,
|
||||
common.MakeInternalAPI("getAliasesForRoomID", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("getAliasesForRoomID", func(req *http.Request) util.JSONResponse {
|
||||
var request api.GetAliasesForRoomIDRequest
|
||||
var response api.GetAliasesForRoomIDResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
@ -298,7 +298,7 @@ func (r *RoomserverInternalAPI) SetupHTTP(servMux *http.ServeMux) {
|
|||
)
|
||||
servMux.Handle(
|
||||
api.RoomserverRemoveRoomAliasPath,
|
||||
common.MakeInternalAPI("removeRoomAlias", func(req *http.Request) util.JSONResponse {
|
||||
internal.MakeInternalAPI("removeRoomAlias", func(req *http.Request) util.JSONResponse {
|
||||
var request api.RemoveRoomAliasRequest
|
||||
var response api.RemoveRoomAliasResponse
|
||||
if err := json.NewDecoder(req.Body).Decode(&request); err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue