mirror of
https://github.com/1f349/dendrite.git
synced 2024-11-08 18:16:59 +00:00
41 lines
915 B
Go
41 lines
915 B
Go
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
|
|
}
|
|
|
|
type QueryPublicKeysRequest struct {
|
|
Requests map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.Timestamp `json:"requests"`
|
|
}
|
|
|
|
type QueryPublicKeysResponse struct {
|
|
Results map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult `json:"results"`
|
|
}
|
|
|
|
type InputPublicKeysRequest struct {
|
|
Keys map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult `json:"keys"`
|
|
}
|
|
|
|
type InputPublicKeysResponse struct {
|
|
}
|