2021-10-26 09:00:50 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
option go_package = "mfer";
|
|
|
|
|
|
|
|
message MFFile {
|
2021-11-03 10:49:40 +00:00
|
|
|
enum Version {
|
|
|
|
NONE = 0;
|
|
|
|
ONE = 1; // only one for now
|
|
|
|
}
|
|
|
|
Version version = 1;
|
|
|
|
bytes innerMessage = 2;
|
|
|
|
|
|
|
|
// these are used solely to detect corruption/truncation
|
|
|
|
// and not for cryptographic integrity.
|
|
|
|
uint64 size = 3;
|
|
|
|
bytes sha256 = 4;
|
|
|
|
|
|
|
|
// think we might use gosignify instead of gpg:
|
|
|
|
// github.com/frankbraun/gosignify
|
|
|
|
|
|
|
|
//detached signature, ascii or binary
|
|
|
|
optional bytes signature = 5;
|
|
|
|
//full GPG key id
|
|
|
|
optional bytes signer = 6;
|
|
|
|
//full GPG signing public key, ascii or binary
|
|
|
|
optional bytes signingPubKey = 7;
|
2021-10-26 09:00:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message MFFilePath {
|
|
|
|
string path = 1;
|
2021-11-03 10:49:40 +00:00
|
|
|
uint64 size = 2;
|
2021-11-03 10:39:41 +00:00
|
|
|
// when verifying, count(hashes) must be > 0.
|
2021-11-03 10:49:40 +00:00
|
|
|
optional repeated MFFileChecksum hashes = 201;
|
2021-11-03 10:39:41 +00:00
|
|
|
optional string mimeType = 101;
|
|
|
|
optional string mtime = 102;
|
|
|
|
optional string ctime = 103;
|
|
|
|
optional string atime = 104;
|
|
|
|
|
2021-11-03 10:21:27 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message MFFileChecksum {
|
|
|
|
bytes multiHash = 1;
|
2021-10-26 09:00:50 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message MFFileInner {
|
2021-11-03 10:49:40 +00:00
|
|
|
enum Version {
|
|
|
|
NONE = 0;
|
|
|
|
ONE = 1; // only one for now
|
|
|
|
}
|
|
|
|
Version version = 1;
|
|
|
|
uint64 count = 2;
|
|
|
|
repeated MFFilePath files = 3;
|
2021-10-26 09:00:50 +00:00
|
|
|
}
|