mirror of
https://github.com/matrix-org/dendrite.git
synced 2025-12-17 03:43:11 -06:00
Remove needless storage interface, add comments
This commit is contained in:
parent
ad607f29a6
commit
0ced974131
|
|
@ -8,7 +8,10 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
// FederationSenderPerformJoinRequestPath is the HTTP path for the PerformJoinRequest API.
|
||||||
FederationSenderPerformJoinRequestPath = "/api/federationsender/performJoinRequest"
|
FederationSenderPerformJoinRequestPath = "/api/federationsender/performJoinRequest"
|
||||||
|
|
||||||
|
// FederationSenderPerformLeaveRequestPath is the HTTP path for the PerformLeaveRequest API.
|
||||||
FederationSenderPerformLeaveRequestPath = "/api/federationsender/performLeaveRequest"
|
FederationSenderPerformLeaveRequestPath = "/api/federationsender/performLeaveRequest"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,20 @@
|
||||||
package query
|
package query
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"github.com/matrix-org/dendrite/common"
|
"github.com/matrix-org/dendrite/common"
|
||||||
"github.com/matrix-org/dendrite/federationsender/api"
|
"github.com/matrix-org/dendrite/federationsender/api"
|
||||||
"github.com/matrix-org/dendrite/federationsender/types"
|
"github.com/matrix-org/dendrite/federationsender/storage"
|
||||||
rsAPI "github.com/matrix-org/dendrite/roomserver/api"
|
rsAPI "github.com/matrix-org/dendrite/roomserver/api"
|
||||||
"github.com/matrix-org/util"
|
"github.com/matrix-org/util"
|
||||||
)
|
)
|
||||||
|
|
||||||
// FederationSenderQueryDatabase has the APIs needed to implement the query API.
|
|
||||||
type FederationSenderQueryDatabase interface {
|
|
||||||
GetJoinedHosts(
|
|
||||||
ctx context.Context, roomID string,
|
|
||||||
) ([]types.JoinedHost, error)
|
|
||||||
}
|
|
||||||
|
|
||||||
// FederationSenderInternalAPI is an implementation of api.FederationSenderInternalAPI
|
// FederationSenderInternalAPI is an implementation of api.FederationSenderInternalAPI
|
||||||
type FederationSenderInternalAPI struct {
|
type FederationSenderInternalAPI struct {
|
||||||
api.FederationSenderInternalAPI
|
api.FederationSenderInternalAPI
|
||||||
DB FederationSenderQueryDatabase
|
DB storage.Database
|
||||||
RoomserverInputAPI rsAPI.RoomserverInputAPI
|
RoomserverInputAPI rsAPI.RoomserverInputAPI
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue