Remove needless storage interface, add comments

This commit is contained in:
Neil Alexander 2020-04-29 11:17:46 +01:00
parent ad607f29a6
commit 0ced974131
2 changed files with 6 additions and 11 deletions

View file

@ -8,7 +8,10 @@ import (
)
const (
// FederationSenderPerformJoinRequestPath is the HTTP path for the PerformJoinRequest API.
FederationSenderPerformJoinRequestPath = "/api/federationsender/performJoinRequest"
// FederationSenderPerformLeaveRequestPath is the HTTP path for the PerformLeaveRequest API.
FederationSenderPerformLeaveRequestPath = "/api/federationsender/performLeaveRequest"
)

View file

@ -1,28 +1,20 @@
package query
import (
"context"
"encoding/json"
"net/http"
"github.com/matrix-org/dendrite/common"
"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"
"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
type FederationSenderInternalAPI struct {
api.FederationSenderInternalAPI
DB FederationSenderQueryDatabase
DB storage.Database
RoomserverInputAPI rsAPI.RoomserverInputAPI
}