CreateInvitation(filename string, recipientUsername string) (invitationPtr UUID, err error)
filenamein the personal namespace of the caller, this function creates a secure file share invitation that contains all of the information required for
recipientUsernameto take the actions detailed in Sharing and Revoking on the corresponding file.
invitationPtrmust be the UUID storage key at which the secure file share invitation is stored in the Datastore.
You should assume that, after this function is called, the recipient receives a notification via a secure communication channel that is separate from your client. This notification includes the
invitationPtrand the username of the caller who created the invitation.
Note that the first parameter to the
AppendToFile()functions in the client API is a filename in the caller’s personal namespace. The recipient will not have a name for the shared file in their personal namespace until they accept the invitation by calling
You may assume this function will not be called on a recipient who is already currently authorized to access the file (see Sharing and Revoking).
Returns an error if:
- The given
filenamedoes not exist in the personal file namespace of the caller.
- The given
recipientUsernamedoes not exist.
- Sharing cannot complete due to any malicious action.
filename (string) - the name of the file to share with the recipient
recipient (string) - the username of the user with whom the file should be shared
invitationPtr (UUID), err (error)