aboutsummaryrefslogtreecommitdiff
path: root/keyserver/api
diff options
context:
space:
mode:
authorKegsay <kegan@matrix.org>2020-07-15 18:40:41 +0100
committerGitHub <noreply@github.com>2020-07-15 18:40:41 +0100
commitf5e7e7513ca0ecddafc967e3b20f35cb1201a151 (patch)
tree6512c04fc20fed4e35c13f5e0a83cfb1b00298ab /keyserver/api
parentdf8d6823eefebc70f5c7333978dfd7da0ede1ede (diff)
Implement /keys/query locally (#1204)
* Implement /keys/query locally * Fix sqlite tests and close rows
Diffstat (limited to 'keyserver/api')
-rw-r--r--keyserver/api/api.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/keyserver/api/api.go b/keyserver/api/api.go
index d1eac703..0f6cb797 100644
--- a/keyserver/api/api.go
+++ b/keyserver/api/api.go
@@ -18,6 +18,7 @@ import (
"context"
"encoding/json"
"strings"
+ "time"
)
type KeyInternalAPI interface {
@@ -108,8 +109,16 @@ type PerformClaimKeysResponse struct {
}
type QueryKeysRequest struct {
+ // Maps user IDs to a list of devices
+ UserToDevices map[string][]string
+ Timeout time.Duration
}
type QueryKeysResponse struct {
+ // Map of remote server domain to error JSON
+ Failures map[string]interface{}
+ // Map of user_id to device_id to device_key
+ DeviceKeys map[string]map[string]json.RawMessage
+ // Set if there was a fatal error processing this query
Error *KeyError
}