renumber fields, add timestamp
This commit is contained in:
parent
92b92c190d
commit
4fd76850da
|
@ -2,43 +2,54 @@ syntax = "proto3";
|
||||||
|
|
||||||
option go_package = "mfer";
|
option go_package = "mfer";
|
||||||
|
|
||||||
|
import "google/protobuf/timestamp.proto";
|
||||||
|
|
||||||
message MFFile {
|
message MFFile {
|
||||||
enum Version {
|
enum Version {
|
||||||
NONE = 0;
|
NONE = 0;
|
||||||
ONE = 1; // only one for now
|
ONE = 1; // only one for now
|
||||||
}
|
}
|
||||||
Version version = 1;
|
|
||||||
bytes innerMessage = 2;
|
|
||||||
|
|
||||||
|
// required mffile root attributes 1xx
|
||||||
|
Version version = 101;
|
||||||
|
bytes innerMessage = 102;
|
||||||
// these are used solely to detect corruption/truncation
|
// these are used solely to detect corruption/truncation
|
||||||
// and not for cryptographic integrity.
|
// and not for cryptographic integrity.
|
||||||
uint64 size = 3;
|
uint64 size = 103;
|
||||||
bytes sha256 = 4;
|
bytes sha256 = 104;
|
||||||
|
|
||||||
|
// 2xx for optional manifest root attributes
|
||||||
// think we might use gosignify instead of gpg:
|
// think we might use gosignify instead of gpg:
|
||||||
// github.com/frankbraun/gosignify
|
// github.com/frankbraun/gosignify
|
||||||
|
|
||||||
//detached signature, ascii or binary
|
//detached signature, ascii or binary
|
||||||
optional bytes signature = 5;
|
optional bytes signature = 201;
|
||||||
//full GPG key id
|
//full GPG key id
|
||||||
optional bytes signer = 6;
|
optional bytes signer = 202;
|
||||||
//full GPG signing public key, ascii or binary
|
//full GPG signing public key, ascii or binary
|
||||||
optional bytes signingPubKey = 7;
|
optional bytes signingPubKey = 203;
|
||||||
}
|
}
|
||||||
|
|
||||||
message MFFilePath {
|
message MFFilePath {
|
||||||
string path = 1;
|
|
||||||
uint64 size = 2;
|
// required attributes:
|
||||||
// when verifying, count(hashes) must be > 0.
|
string path = 101;
|
||||||
optional repeated MFFileChecksum hashes = 201;
|
uint64 size = 102;
|
||||||
optional string mimeType = 101;
|
|
||||||
optional string mtime = 102;
|
// gotta have at least one:
|
||||||
optional string ctime = 103;
|
repeated MFFileChecksum hashes = 201;
|
||||||
optional string atime = 104;
|
|
||||||
|
// optional per-file metadata
|
||||||
|
optional string mimeType = 301;
|
||||||
|
optional string mtime = 302;
|
||||||
|
optional string ctime = 303;
|
||||||
|
optional string atime = 304;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message MFFileChecksum {
|
message MFFileChecksum {
|
||||||
|
// 1.0 golang implementation must write a multihash here
|
||||||
|
// it's ok to only ever use/verify sha256 multihash
|
||||||
bytes multiHash = 1;
|
bytes multiHash = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +58,13 @@ message MFFileInner {
|
||||||
NONE = 0;
|
NONE = 0;
|
||||||
ONE = 1; // only one for now
|
ONE = 1; // only one for now
|
||||||
}
|
}
|
||||||
Version version = 1;
|
Version version = 101;
|
||||||
uint64 count = 2;
|
|
||||||
repeated MFFilePath files = 3;
|
// required manifest attributes:
|
||||||
|
uint64 fileCount = 102;
|
||||||
|
repeated MFFilePath files = 103;
|
||||||
|
|
||||||
|
// optional manifest attributes 2xx:
|
||||||
|
optional google.protobuf.Timestamp createdAt = 201;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue