Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Envelope ¶
type Envelope struct { // ID is the hash of the Marshaled Letter + the Public key of Sender ID string `json:"id"` // Timestamp is the time at which the envelope was created Timestamp time.Time `json:"timestamp"` // Sender is public key of the sender Sender keypair.KeyPair `json:"sender"` SenderRaw string `json:"sender_raw"` // Signature is the public key of the sender encrypted by // the Sender private key, against the public Region key // to authenticate sender. I.e., Sender == Decrypt(Signature) must be true. // A valid Signature is also used to prevent the Envelope from being deleted. // I.e., if a Region key is not able to decrypt it, then it is meant for another Region // and would be deleted. Signature string `json:"signature"` // SealedRecipients is list of encypted passphrase (used to encrypt the Content) // encrypted against each of the public keys of the recipients. SealedRecipients []string `json:"sealed_recipients"` // SealedLetter contains the encryoted and compressed letter, encoded as base64 string SealedLetter string `json:"sealed_letter,omitempty"` // Letter is the unsealed letter. Once a Envelope is "unsealed", then this // variable is set and the SealedLetter is set to "" (deleted). This will // then be saved in a bucket for unsealed letters. When the letter remains // sealed then this Letter is set to nil. Letter Letter `json:"letter,omitempty"` // Opened is a variable set to true if the Letter is opened, to make // it easier to index the opened/unopened letters in the database.false Opened bool `json:"opened"` }
Envelope is the sealed letter to be transfered among carriers
type Letter ¶
type Letter struct { // Purpose specifies the purpose of letter. Currently the purposes are: // "action-X" - used to action public data for reputation purposes (likes, follows, channel subscriptions, settting profile images and text and names) // "share-X" - used to share content either "post" or "image/png"/"image/jpg" Purpose string `json:"purpose,omitempty"` // To is a list of who the letter is addressed to: "public", "friends", "self" or the public key of any person To []string `json:"to,omitempty"` // Content is is the content of the letter (base64 encoded image, text, or HTML) Content string `json:"content,omitempty"` // FirstID is the first ID for chains of edits, which must be constant FirstID string `json:"first_id,omitempty"` // ReplyTo is the ID of the post being responded to ReplyTo string `json:"reply_to,omitempty"` }
Letter specifies the content being transfered to the self, or other users. The Letter has a purpose - either to "share" or to do an "action". You can "share" posts or images. You action things like follows, likes, profile names, etc.
Click to show internal directories.
Click to hide internal directories.