This commit is contained in:
parent
6628325843
commit
7b869592ce
5
Makefile
5
Makefile
@ -24,10 +24,7 @@ devprereqs:
|
|||||||
which golangci-lint || go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
which golangci-lint || go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest
|
||||||
|
|
||||||
mfer: $(PROTOC_GEN_GO) src/*.go cmd/*/*.go
|
mfer: $(PROTOC_GEN_GO) src/*.go cmd/*/*.go
|
||||||
-echo PATH is $(PATH)
|
protoc --version
|
||||||
-find $(GOPATH)
|
|
||||||
-echo GOPATH/bin contents:
|
|
||||||
-find $(GOPATH)/bin
|
|
||||||
cd proto && go generate .
|
cd proto && go generate .
|
||||||
cd cmd/mfer && go build -o ../../mfer $(GOFLAGS) .
|
cd cmd/mfer && go build -o ../../mfer $(GOFLAGS) .
|
||||||
|
|
||||||
|
@ -11,45 +11,45 @@ message MFFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// required mffile root attributes 1xx
|
// required mffile root attributes 1xx
|
||||||
Version version = 101;
|
required Version version = 101;
|
||||||
bytes innerMessage = 102;
|
required 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 = 103;
|
required uint64 size = 103;
|
||||||
bytes sha256 = 104;
|
required bytes sha256 = 104;
|
||||||
|
|
||||||
// 2xx for optional manifest root attributes
|
// 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 = 201;
|
bytes signature = 201;
|
||||||
//full GPG key id
|
//full GPG key id
|
||||||
optional bytes signer = 202;
|
bytes signer = 202;
|
||||||
//full GPG signing public key, ascii or binary
|
//full GPG signing public key, ascii or binary
|
||||||
optional bytes signingPubKey = 203;
|
bytes signingPubKey = 203;
|
||||||
}
|
}
|
||||||
|
|
||||||
message MFFilePath {
|
message MFFilePath {
|
||||||
// required attributes:
|
// required attributes:
|
||||||
string path = 101;
|
required string path = 101;
|
||||||
uint64 size = 102;
|
required uint64 size = 102;
|
||||||
|
|
||||||
// gotta have at least one:
|
// gotta have at least one:
|
||||||
repeated MFFileChecksum hashes = 201;
|
repeated MFFileChecksum hashes = 201;
|
||||||
|
|
||||||
// optional per-file metadata
|
// optional per-file metadata
|
||||||
optional string mimeType = 301;
|
string mimeType = 301;
|
||||||
optional google.protobuf.Timestamp mtime = 302;
|
google.protobuf.Timestamp mtime = 302;
|
||||||
optional google.protobuf.Timestamp ctime = 303;
|
google.protobuf.Timestamp ctime = 303;
|
||||||
optional google.protobuf.Timestamp atime = 304;
|
google.protobuf.Timestamp atime = 304;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message MFFileChecksum {
|
message MFFileChecksum {
|
||||||
// 1.0 golang implementation must write a multihash here
|
// 1.0 golang implementation must write a multihash here
|
||||||
// it's ok to only ever use/verify sha256 multihash
|
// it's ok to only ever use/verify sha256 multihash
|
||||||
bytes multiHash = 1;
|
required bytes multiHash = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
message MFFileInner {
|
message MFFileInner {
|
||||||
@ -57,13 +57,13 @@ message MFFileInner {
|
|||||||
NONE = 0;
|
NONE = 0;
|
||||||
ONE = 1; // only one for now
|
ONE = 1; // only one for now
|
||||||
}
|
}
|
||||||
Version version = 101;
|
required Version version = 101;
|
||||||
|
|
||||||
// required manifest attributes:
|
// required manifest attributes:
|
||||||
uint64 fileCount = 102; //FIXME is this necessary?
|
required uint64 fileCount = 102; //FIXME is this necessary?
|
||||||
repeated MFFilePath files = 103;
|
repeated MFFilePath files = 103;
|
||||||
|
|
||||||
// optional manifest attributes 2xx:
|
// optional manifest attributes 2xx:
|
||||||
optional google.protobuf.Timestamp createdAt = 201;
|
google.protobuf.Timestamp createdAt = 201;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user