| 1 |
package proton |
| 2 |
|
| 3 |
// Block is a block of file contents. They are split in 4MB blocks although this number may change in the future. |
| 4 |
// Each block is its own data packet separated from the key packet which is held by the node, |
| 5 |
// which means the sessionKey is the same for every block. |
| 6 |
type Block struct { |
| 7 |
Index int |
| 8 |
|
| 9 |
BareURL string // URL to the block |
| 10 |
Token string // Token for download URL |
| 11 |
|
| 12 |
Hash string // Encrypted block's sha256 hash, in base64 |
| 13 |
EncSignature string // Encrypted signature of the block |
| 14 |
SignatureEmail string // Email used to sign the block |
| 15 |
} |
| 16 |
|
| 17 |
type BlockUploadReq struct { |
| 18 |
AddressID string |
| 19 |
ShareID string |
| 20 |
LinkID string |
| 21 |
RevisionID string |
| 22 |
|
| 23 |
BlockList []BlockUploadInfo |
| 24 |
} |
| 25 |
|
| 26 |
type BlockUploadInfo struct { |
| 27 |
Index int |
| 28 |
Size int64 |
| 29 |
EncSignature string |
| 30 |
Hash string |
| 31 |
} |
| 32 |
|
| 33 |
type BlockUploadLink struct { |
| 34 |
Token string |
| 35 |
BareURL string |
| 36 |
} |