0
0
Fork 0
mirror of https://github.com/matrix-org/dendrite synced 2024-11-16 06:41:06 +01:00
dendrite/serverkeyapi/api/api.go

41 lines
915 B
Go
Raw Normal View History

package api
import (
"context"
"github.com/matrix-org/gomatrixserverlib"
)
type ServerKeyInternalAPI interface {
gomatrixserverlib.KeyDatabase
KeyRing() *gomatrixserverlib.KeyRing
InputPublicKeys(
ctx context.Context,
request *InputPublicKeysRequest,
response *InputPublicKeysResponse,
) error
QueryPublicKeys(
ctx context.Context,
request *QueryPublicKeysRequest,
response *QueryPublicKeysResponse,
) error
}
2020-06-04 17:26:35 +02:00
type QueryPublicKeysRequest struct {
Requests map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.Timestamp `json:"requests"`
}
2020-06-04 17:26:35 +02:00
type QueryPublicKeysResponse struct {
Results map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult `json:"results"`
}
2020-06-04 17:26:35 +02:00
type InputPublicKeysRequest struct {
Keys map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult `json:"keys"`
}
2020-06-04 17:26:35 +02:00
type InputPublicKeysResponse struct {
}