Skip to content
This repository has been archived by the owner on Mar 9, 2020. It is now read-only.

Epic/hwsc-app-gateway-svc ShareDocument #7

Open
faraonc opened this issue Nov 5, 2018 · 0 comments
Open

Epic/hwsc-app-gateway-svc ShareDocument #7

faraonc opened this issue Nov 5, 2018 · 0 comments

Comments

@faraonc
Copy link
Member

faraonc commented Nov 5, 2018

Let us say Chrome(User) wants to share a Document. At this point Chrome has the User object already.

  1. Chrome calls app-gateway-svc's ListUsers.
  2. app-gateway-svc calls user-svc's ListUsers.
  3. user-svc returns a list of users to app-gateway-svc
  4. app-gateway-svc returns a list of users
  5. Chrome picks the users he/she wants to share a document(document name goes with the callTypeName)
  6. Chrome calls app-gateway-svc's ShareDocument with the following:
    message AppGatewayRequest{
    hwsc.User user = N; //this is not a complete User object, it may only have uuid
    hwsc.Document doc = N; //this is not a complete Document object, it may only have duid
    repeated string uuids_to_share_doc
    }
  7. app-gateway-svc calls user-svc's ShareDocument with the following:
message UserRequest {
    User user = 1;
    string duid = 2;
    repeated string uuids_to_share_duid = 3;
}
  1. user-svc's ShareDocument has to do the following:
    1. GetUser
    2. Modify themap<string, UserDocumentMetadata > user_documents = 7
    3. UpdateUser
    4. Traverse and GetUser each friend fromuuids_to_share_doc in UserRequest.
    5. Modify each friend's map<string, UserFriendMetadata> shared_to_me = 8
    6. UpdateUser for each friend
message User {
    string uuid = 1;
    string first_name = 2;
    string last_name = 3;
    string email = 4;
    string password = 5;
    string organization = 6;
    // Key = duid in string
    map<string, UserDocumentMetadata > user_documents = 7;
    // Key = friend's uuid
    map<string, UserFriendMetadata> shared_to_me = 8;
  1. user-svc returns the updated User who shared the document to app-gateway-svc.
  2. app-gateway-svc returns the User to Chrome.
@kimlisa kimlisa transferred this issue from hwsc-org/hwsc-gateway-svc Dec 2, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants