aboutsummaryrefslogtreecommitdiff
path: root/keyserver/api/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'keyserver/api/api.go')
-rw-r--r--keyserver/api/api.go18
1 files changed, 12 insertions, 6 deletions
diff --git a/keyserver/api/api.go b/keyserver/api/api.go
index 6cee2c01..140f0356 100644
--- a/keyserver/api/api.go
+++ b/keyserver/api/api.go
@@ -29,15 +29,11 @@ import (
type KeyInternalAPI interface {
SyncKeyAPI
ClientKeyAPI
+ FederationKeyAPI
UserKeyAPI
// SetUserAPI assigns a user API to query when extracting device names.
- SetUserAPI(i userapi.UserInternalAPI)
- // InputDeviceListUpdate from a federated server EDU
- InputDeviceListUpdate(ctx context.Context, req *InputDeviceListUpdateRequest, res *InputDeviceListUpdateResponse)
-
- QueryDeviceMessages(ctx context.Context, req *QueryDeviceMessagesRequest, res *QueryDeviceMessagesResponse)
- QuerySignatures(ctx context.Context, req *QuerySignaturesRequest, res *QuerySignaturesResponse)
+ SetUserAPI(i userapi.KeyserverUserAPI)
}
// API functions required by the clientapi
@@ -62,6 +58,16 @@ type SyncKeyAPI interface {
QueryOneTimeKeys(ctx context.Context, req *QueryOneTimeKeysRequest, res *QueryOneTimeKeysResponse)
}
+type FederationKeyAPI interface {
+ QueryKeys(ctx context.Context, req *QueryKeysRequest, res *QueryKeysResponse)
+ QuerySignatures(ctx context.Context, req *QuerySignaturesRequest, res *QuerySignaturesResponse)
+ QueryDeviceMessages(ctx context.Context, req *QueryDeviceMessagesRequest, res *QueryDeviceMessagesResponse)
+ // InputDeviceListUpdate from a federated server EDU
+ InputDeviceListUpdate(ctx context.Context, req *InputDeviceListUpdateRequest, res *InputDeviceListUpdateResponse)
+ PerformUploadDeviceKeys(ctx context.Context, req *PerformUploadDeviceKeysRequest, res *PerformUploadDeviceKeysResponse)
+ PerformClaimKeys(ctx context.Context, req *PerformClaimKeysRequest, res *PerformClaimKeysResponse)
+}
+
// KeyError is returned if there was a problem performing/querying the server
type KeyError struct {
Err string `json:"error"`