From a35e30c05c4f7fe29a37b1e1e10f708a20ad7b34 Mon Sep 17 00:00:00 2001 From: sneak Date: Tue, 26 Oct 2021 02:00:50 -0700 Subject: [PATCH] beginning of pb --- .gitignore | 1 + Makefile | 2 ++ mf.proto | 39 +++++++++++++++++++++++++++++++++++++++ mfer/.keep | 0 4 files changed, 42 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 mf.proto create mode 100644 mfer/.keep diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c61a5e8 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.pb.go diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..819e7e2 --- /dev/null +++ b/Makefile @@ -0,0 +1,2 @@ +mfer/app.pb.go: mf.proto + protoc --go_out=./mfer $< diff --git a/mf.proto b/mf.proto new file mode 100644 index 0000000..aedc477 --- /dev/null +++ b/mf.proto @@ -0,0 +1,39 @@ +syntax = "proto3"; + +option go_package = "mfer"; + +message MFFile { + enum Version { + NONE = 0; + ONE = 1; // only one for now + } + Version version = 1; + bytes innerMessage = 2; + uint64 size = 3; + bytes crc32 = 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; +} + +message MFFilePath { + string path = 1; + // FIXME checksum/hash here +} + +message MFFileInner { + enum Version { + NONE = 0; + ONE = 1; // only one for now + } + Version version = 1; + uint64 count = 2; + repeated MFFilePath files = 3; +} diff --git a/mfer/.keep b/mfer/.keep new file mode 100644 index 0000000..e69de29