From 29a3c9bf7dc432da2608c5fa790f5224f4a9648d Mon Sep 17 00:00:00 2001 From: St4NNi Date: Wed, 21 Jun 2023 14:00:11 +0200 Subject: [PATCH 1/6] feat: Added AddKeyValueToCollection request --- .../services/v1/collection_service.proto | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/aruna/api/storage/services/v1/collection_service.proto b/aruna/api/storage/services/v1/collection_service.proto index 505ee1be..653de87d 100644 --- a/aruna/api/storage/services/v1/collection_service.proto +++ b/aruna/api/storage/services/v1/collection_service.proto @@ -107,6 +107,19 @@ service CollectionService { body : "*" }; } + + // AddKeyValueToCollection + // + // Status: BETA + // + // Adds key values (labels / hooks) to a collection + rpc AddKeyValueToCollection(AddKeyValueToCollectionRequest) + returns (AddKeyValueToCollectionResponse) { + option (google.api.http) = { + patch : "/v1/collection/{collection_id}/add_key_value" + body : "*" + }; + } } @@ -303,4 +316,10 @@ message DeleteCollectionRequest { bool force = 3; } -message DeleteCollectionResponse {} \ No newline at end of file +message DeleteCollectionResponse {} + + +message AddKeyValueToCollectionRequest { + repeated storage.models.v1.KeyValue labels = 1; + repeated storage.models.v1.KeyValue hooks = 2; +} \ No newline at end of file From 5f0bdaee51c41fa3234245e130c7de43a54be6f7 Mon Sep 17 00:00:00 2001 From: St4NNi Date: Wed, 21 Jun 2023 14:02:37 +0200 Subject: [PATCH 2/6] fix: Added missing AddKeyValueToCollectionResponse --- aruna/api/storage/services/v1/collection_service.proto | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aruna/api/storage/services/v1/collection_service.proto b/aruna/api/storage/services/v1/collection_service.proto index 653de87d..05a4e808 100644 --- a/aruna/api/storage/services/v1/collection_service.proto +++ b/aruna/api/storage/services/v1/collection_service.proto @@ -322,4 +322,9 @@ message DeleteCollectionResponse {} message AddKeyValueToCollectionRequest { repeated storage.models.v1.KeyValue labels = 1; repeated storage.models.v1.KeyValue hooks = 2; +} + +message AddKeyValueToCollectionResponse { + // New collection overview + storage.models.v1.CollectionOverview collection = 1; } \ No newline at end of file From 24fc061dd1efcc18cf4e1bd68ca04c792e52b35d Mon Sep 17 00:00:00 2001 From: St4NNi Date: Wed, 21 Jun 2023 14:24:17 +0200 Subject: [PATCH 3/6] fix: Fixed naming to AddKeyValue + s --- aruna/api/storage/services/v1/collection_service.proto | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/aruna/api/storage/services/v1/collection_service.proto b/aruna/api/storage/services/v1/collection_service.proto index 05a4e808..94133782 100644 --- a/aruna/api/storage/services/v1/collection_service.proto +++ b/aruna/api/storage/services/v1/collection_service.proto @@ -113,8 +113,8 @@ service CollectionService { // Status: BETA // // Adds key values (labels / hooks) to a collection - rpc AddKeyValueToCollection(AddKeyValueToCollectionRequest) - returns (AddKeyValueToCollectionResponse) { + rpc AddKeyValuesToCollection(AddKeyValuesToCollectionRequest) + returns (AddKeyValuesToCollectionResponse) { option (google.api.http) = { patch : "/v1/collection/{collection_id}/add_key_value" body : "*" @@ -319,12 +319,12 @@ message DeleteCollectionRequest { message DeleteCollectionResponse {} -message AddKeyValueToCollectionRequest { +message AddKeyValuesToCollectionRequest { repeated storage.models.v1.KeyValue labels = 1; repeated storage.models.v1.KeyValue hooks = 2; } -message AddKeyValueToCollectionResponse { +message AddKeyValuesToCollectionResponse { // New collection overview storage.models.v1.CollectionOverview collection = 1; } \ No newline at end of file From a53484d0f17e9034ba81a1cb03f0de906bbef58f Mon Sep 17 00:00:00 2001 From: St4NNi Date: Wed, 21 Jun 2023 17:53:15 +0200 Subject: [PATCH 4/6] feat: Add more detailed information to bundle --- aruna/api/internal/v1/bundler.proto | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/aruna/api/internal/v1/bundler.proto b/aruna/api/internal/v1/bundler.proto index a36494e4..1b74364d 100644 --- a/aruna/api/internal/v1/bundler.proto +++ b/aruna/api/internal/v1/bundler.proto @@ -5,6 +5,8 @@ option go_package = "github.com/ArunaStorage/go-api/aruna/api/internal/v1"; import "google/api/visibility.proto"; import "google/protobuf/timestamp.proto"; +import "aruna/api/internal/proxy.proto"; + service InternalBundlerService { option (google.api.api_visibility).restriction = "INTERNAL"; @@ -27,9 +29,10 @@ message PrepareBundleResponse {} message ObjectRef { - string object_location = 1; - string encryption_key = 2; - string object_path = 3; // Path + filename foo/bar/baz/test.txt + Location object_location = 1; + uint64 file_size = 2; + string file_name = 3; + string file_path = 4; } message Bundle { From 63e231215f184f91aa1d0c1d1090752376eb8349 Mon Sep 17 00:00:00 2001 From: St4NNi Date: Wed, 21 Jun 2023 17:56:03 +0200 Subject: [PATCH 5/6] feat: Added detailed object_info in bundle --- aruna/api/internal/v1/bundler.proto | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/aruna/api/internal/v1/bundler.proto b/aruna/api/internal/v1/bundler.proto index 1b74364d..00b8848e 100644 --- a/aruna/api/internal/v1/bundler.proto +++ b/aruna/api/internal/v1/bundler.proto @@ -5,7 +5,7 @@ option go_package = "github.com/ArunaStorage/go-api/aruna/api/internal/v1"; import "google/api/visibility.proto"; import "google/protobuf/timestamp.proto"; -import "aruna/api/internal/proxy.proto"; +import "aruna/api/storage/models/v1/models.proto"; service InternalBundlerService { @@ -29,10 +29,9 @@ message PrepareBundleResponse {} message ObjectRef { - Location object_location = 1; - uint64 file_size = 2; - string file_name = 3; - string file_path = 4; + aruna.api.internal.v1.Location object_location = 1; + aruna.api.storage.models.v1.Object object_info = 2; + string sub_path = 3; } message Bundle { From e1c5ad9c1569c4630da27bd24ee5202d35502e83 Mon Sep 17 00:00:00 2001 From: St4NNi Date: Wed, 21 Jun 2023 17:58:11 +0200 Subject: [PATCH 6/6] fix: Added missing proxy import --- aruna/api/internal/v1/bundler.proto | 2 ++ 1 file changed, 2 insertions(+) diff --git a/aruna/api/internal/v1/bundler.proto b/aruna/api/internal/v1/bundler.proto index 00b8848e..aee161c9 100644 --- a/aruna/api/internal/v1/bundler.proto +++ b/aruna/api/internal/v1/bundler.proto @@ -6,6 +6,8 @@ option go_package = "github.com/ArunaStorage/go-api/aruna/api/internal/v1"; import "google/api/visibility.proto"; import "google/protobuf/timestamp.proto"; import "aruna/api/storage/models/v1/models.proto"; +import "aruna/api/internal/v1/proxy.proto"; + service InternalBundlerService {