You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#[derive(Deserialize,Debug)]#[serde(rename_all = "camelCase")]structSuccessRes{pub(crate)user_or_group:UserOrGroupRes,}#[derive(Deserialize,Debug)]#[serde(rename_all = "camelCase")]structFailRes{pub(crate)user_or_group:UserOrGroupRes,pub(crate)error_message:String,}#[derive(Deserialize,Debug)]#[serde(tag = "type", rename_all = "camelCase")]enumUserOrGroupRes{User{id:String},Group{id:String},}#[derive(Serialize,Deserialize,Debug,Clone,PartialEq)]#[serde(rename_all = "camelCase")]pubstructAccessGrant{pub(crate)user_or_group:UserOrGroupWithKey,#[serde(flatten)]pub(crate)encrypted_value:EncryptedOnceValue,}#[derive(Serialize,Deserialize,Debug,Clone,PartialEq)]#[serde(rename_all = "camelCase", tag = "type")]pubenumUserOrGroupWithKey{#[serde(rename_all = "camelCase")]User{id:String,// optional because the resp on document create does not return a public keymaster_public_key:Option<PublicKey>,},#[serde(rename_all = "camelCase")]Group{id:String,master_public_key:Option<PublicKey>,},}
Notice that UserOrGroupWithKey's master_public_key is optional to support the response coming back from Document create. Document access revoke and other group apis may also be using similar types.
The text was updated successfully, but these errors were encountered:
clintfred
changed the title
Combine UserOrGroup/PublicKey req/resp types in request layer
[SPIKE] Combine UserOrGroup/PublicKey req/resp types in request layer
Apr 12, 2019
We have some identical or nearly identical types in the request layer that could be cleaned up and/or unified.
Note that
Examples:
In group_api/requests
In document_api/requests
Notice that UserOrGroupWithKey's master_public_key is optional to support the response coming back from Document create. Document access revoke and other group apis may also be using similar types.
The text was updated successfully, but these errors were encountered: