2020-05-27 04:19:24 -05:00
|
|
|
package api
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"github.com/matrix-org/gomatrixserverlib"
|
|
|
|
)
|
|
|
|
|
2020-10-07 10:23:18 -05:00
|
|
|
type SigningKeyServerAPI interface {
|
2020-05-27 04:19:24 -05:00
|
|
|
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 10:26:35 -05:00
|
|
|
type QueryPublicKeysRequest struct {
|
|
|
|
Requests map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.Timestamp `json:"requests"`
|
2020-05-27 04:19:24 -05:00
|
|
|
}
|
|
|
|
|
2020-06-04 10:26:35 -05:00
|
|
|
type QueryPublicKeysResponse struct {
|
|
|
|
Results map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult `json:"results"`
|
2020-05-27 04:19:24 -05:00
|
|
|
}
|
|
|
|
|
2020-06-04 10:26:35 -05:00
|
|
|
type InputPublicKeysRequest struct {
|
|
|
|
Keys map[gomatrixserverlib.PublicKeyLookupRequest]gomatrixserverlib.PublicKeyLookupResult `json:"keys"`
|
2020-05-27 04:19:24 -05:00
|
|
|
}
|
|
|
|
|
2020-06-04 10:26:35 -05:00
|
|
|
type InputPublicKeysResponse struct {
|
2020-05-27 04:19:24 -05:00
|
|
|
}
|