diff options
author | kegsay <kegan@matrix.org> | 2022-05-05 09:56:03 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-05 09:56:03 +0100 |
commit | d86dcbef66dad344bc38c58762a9634ff126d5c7 (patch) | |
tree | a8c95692a64a6303e02911c9a2d6b00fec3c84c8 /userapi/api | |
parent | 3c940c428d529476b6fa2cbf1ba28d53ec011584 (diff) |
syncapi: define specific interfaces for internal HTTP communications (#2416)
* syncapi: use finer-grained interfaces when making the syncapi
* Use specific interfaces for syncapi-roomserver interactions
* Define query access token api for shared http auth code
Diffstat (limited to 'userapi/api')
-rw-r--r-- | userapi/api/api.go | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/userapi/api/api.go b/userapi/api/api.go index 6ab68fa0..6f00fe44 100644 --- a/userapi/api/api.go +++ b/userapi/api/api.go @@ -31,7 +31,8 @@ type UserInternalAPI interface { UserRegisterAPI UserAccountAPI UserThreePIDAPI - UserDeviceAPI + QueryAcccessTokenAPI + SyncUserAPI InputAccountData(ctx context.Context, req *InputAccountDataRequest, res *InputAccountDataResponse) error @@ -42,15 +43,20 @@ type UserInternalAPI interface { PerformPushRulesPut(ctx context.Context, req *PerformPushRulesPutRequest, res *struct{}) error QueryKeyBackup(ctx context.Context, req *QueryKeyBackupRequest, res *QueryKeyBackupResponse) - QueryAccessToken(ctx context.Context, req *QueryAccessTokenRequest, res *QueryAccessTokenResponse) error - QueryAccountData(ctx context.Context, req *QueryAccountDataRequest, res *QueryAccountDataResponse) error + QueryOpenIDToken(ctx context.Context, req *QueryOpenIDTokenRequest, res *QueryOpenIDTokenResponse) error QueryPushers(ctx context.Context, req *QueryPushersRequest, res *QueryPushersResponse) error QueryPushRules(ctx context.Context, req *QueryPushRulesRequest, res *QueryPushRulesResponse) error QueryNotifications(ctx context.Context, req *QueryNotificationsRequest, res *QueryNotificationsResponse) error } -type UserDeviceAPI interface { +type QueryAcccessTokenAPI interface { + QueryAccessToken(ctx context.Context, req *QueryAccessTokenRequest, res *QueryAccessTokenResponse) error +} + +type SyncUserAPI interface { + QueryAccountData(ctx context.Context, req *QueryAccountDataRequest, res *QueryAccountDataResponse) error + QueryAccessToken(ctx context.Context, req *QueryAccessTokenRequest, res *QueryAccessTokenResponse) error PerformDeviceDeletion(ctx context.Context, req *PerformDeviceDeletionRequest, res *PerformDeviceDeletionResponse) error PerformLastSeenUpdate(ctx context.Context, req *PerformLastSeenUpdateRequest, res *PerformLastSeenUpdateResponse) error PerformDeviceUpdate(ctx context.Context, req *PerformDeviceUpdateRequest, res *PerformDeviceUpdateResponse) error |