Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 24 additions & 8 deletions aruna/api/bundler/services/v1/bundler_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,26 @@ option java_package = "com.github.ArunaStorage.java_api.aruna.api.storage.servic
option java_outer_classname = "BundlerService";

import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";

// BundlerService
//
// Status: ALPHA
//
// A service that enables bundled downloads
service BundlerService {
rpc CreateBundle(CreateBundleRequest) returns (CreateBundleResponse) {}
rpc DeleteBundle(DeleteBundleRequest) returns (DeleteBundleResponse) {}
rpc CreateBundle(CreateBundleRequest) returns (CreateBundleResponse) {
option (google.api.http) = {
post : "/v1/collection/{collection_id}/bundle"
body : "*"
};
}
rpc DeleteBundle(DeleteBundleRequest) returns (DeleteBundleResponse) {
option (google.api.http) = {
delete : "/v1/collection/{collection_id}/bundle/{bundle_id}"
body : "*"
};
}
}

// An resourcetype used to identify generic authorizations
Expand All @@ -27,18 +38,23 @@ enum ArchiveType {
}

message CreateBundleRequest {
repeated string object_ids = 1;
string filename = 2;
ArchiveType archive_type = 3;
google.protobuf.Timestamp expires_at = 4;
string collection_id = 1;
repeated string object_ids = 2;
string filename = 3;
ArchiveType archive_type = 4;
google.protobuf.Timestamp expires_at = 5;
// Optional endpoint_id
string endpoint_id = 6;
}

message CreateBundleResponse {
string url = 1;
string bundle_id = 1;
string url = 2;
}

message DeleteBundleRequest {
string bundle_id = 1;
string collection_id = 1;
string bundle_id = 2;
}

message DeleteBundleResponse {}
4 changes: 3 additions & 1 deletion aruna/api/internal/v1/bundler.proto
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ message EnableBundleRequest{

message EnableBundleResponse{}

message GetBundlesRequest {}
message GetBundlesRequest {
string endpoint_id = 1;
}

message GetBundlesResponse {
repeated Bundle bundles = 1;
Expand Down
19 changes: 17 additions & 2 deletions aruna/api/storage/models/v1/models.proto
Original file line number Diff line number Diff line change
Expand Up @@ -147,16 +147,31 @@ enum EndpointType {
ENDPOINT_TYPE_FILE = 2;
}

enum EndpointHostType {
ENDPOINT_HOST_TYPE_UNSPECIFIED = 0;
ENDPOINT_HOST_TYPE_PROXY = 1;
ENDPOINT_HOST_TYPE_INTERNAL = 2;
ENDPOINT_HOST_TYPE_BUNDLER = 3;
}

message EndpointHostConfig {
string url = 1;
bool is_primary = 2;
bool ssl = 3;
bool public = 4;
EndpointHostType host_type = 5;
}

message Endpoint {
string id = 1;
EndpointType ep_type = 2;
string name = 3;
string proxy_hostname = 4;
string internal_hostname = 5;
string documentation_path = 6;
bool is_public = 7;
bool is_default = 8;
EndpointStatus status = 9;
bool is_bundler = 10;
repeated EndpointHostConfig host_configs = 11;
}

// RULES for Objects:
Expand Down
5 changes: 3 additions & 2 deletions aruna/api/storage/services/v1/collection_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,9 @@ message DeleteCollectionResponse {}


message AddKeyValuesToCollectionRequest {
repeated storage.models.v1.KeyValue labels = 1;
repeated storage.models.v1.KeyValue hooks = 2;
string collection_id = 1;
repeated storage.models.v1.KeyValue labels = 2;
repeated storage.models.v1.KeyValue hooks = 3;
}

message AddKeyValuesToCollectionResponse {
Expand Down
8 changes: 4 additions & 4 deletions aruna/api/storage/services/v1/endpoint_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@ message AddEndpointRequest {
string name = 1;
// Endpoint type
storage.models.v1.EndpointType ep_type = 2;
// Public hostname of the proxy
string proxy_hostname = 3;
// Internal hostname for the proxy
string internal_hostname = 4;
// (optional) URL to a offsite documentation
string documentation_path = 5;
// Is this endpoint public
bool is_public = 6;
// (optional) ED25519 Pubkey -> Pubkey to validate endpoint authenticated tokens
string pubkey = 7;
// Added option to make a Dataproxy a bundler
bool is_bundler = 8;
// List of EndpointHostConfigs
repeated storage.models.v1.EndpointHostConfig host_configs = 9;
}

message AddEndpointResponse {
Expand Down