mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-07-31 13:22:46 +00:00
Implement /keys/query locally (#1204)
* Implement /keys/query locally * Fix sqlite tests and close rows
This commit is contained in:
parent
df8d6823ee
commit
f5e7e7513c
11 changed files with 183 additions and 27 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue