From bf2207e88db544e56f01e42533a7f5cf8876da48 Mon Sep 17 00:00:00 2001 From: Nils Diekmann Date: Sun, 24 Dec 2023 00:27:53 +0100 Subject: [PATCH] - introduce revision id --- proto/kinnekode/restaurant/file/v1/file.proto | 2 +- proto/kinnekode/restaurant/file/v1/file_service.proto | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/proto/kinnekode/restaurant/file/v1/file.proto b/proto/kinnekode/restaurant/file/v1/file.proto index d31bbd4..a844ac6 100644 --- a/proto/kinnekode/restaurant/file/v1/file.proto +++ b/proto/kinnekode/restaurant/file/v1/file.proto @@ -9,7 +9,7 @@ option go_package = "github.com/kinneko-de/api-contract/golang/kinnekode/restaur message StoredFile { kinnekode.protobuf.Uuid id = 1; - int64 revision = 2; + kinnekode.protobuf.Uuid revision_id = 2; } // Metadata for any stored file diff --git a/proto/kinnekode/restaurant/file/v1/file_service.proto b/proto/kinnekode/restaurant/file/v1/file_service.proto index ea2ad42..e8254f3 100644 --- a/proto/kinnekode/restaurant/file/v1/file_service.proto +++ b/proto/kinnekode/restaurant/file/v1/file_service.proto @@ -26,9 +26,12 @@ message StoreFileResponse { } message DownloadFileRequest { - // id is required - // revision is optional; if not set/set to zero the latest revision will be used - StoredFile file = 1; + oneof download { + // download the latest revision of the file + kinnekode.protobuf.Uuid file_id = 1; + // download the specific revision of the file + kinnekode.protobuf.Uuid revision_id = 2; + } } message DownloadFileResponse {