f11bf46a11
* add bucketstore, add init uplink bucket * update uplink to use bucket rpc * fix tests * wrap metainfo client errors * add allowedBucket struct, fix tests * update comment * add paging * updates per CR * add test for pagination * fix lint * fix uplink test so its easier tyo understand * fix gateway pagination bug * changes per cr * fix bug w/allowedBuckets, add test to catch
199 lines
5.2 KiB
Protocol Buffer
199 lines
5.2 KiB
Protocol Buffer
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
syntax = "proto3";
|
|
option go_package = "pb";
|
|
|
|
package metainfo;
|
|
|
|
import "encryption.proto";
|
|
import "gogo.proto";
|
|
import "google/protobuf/timestamp.proto";
|
|
import "node.proto";
|
|
import "pointerdb.proto";
|
|
import "orders.proto";
|
|
|
|
// Metainfo it's a satellite RPC service
|
|
service Metainfo {
|
|
rpc CreateBucket(BucketCreateRequest) returns (BucketCreateResponse);
|
|
rpc GetBucket(BucketGetRequest) returns (BucketGetResponse);
|
|
rpc DeleteBucket(BucketDeleteRequest) returns (BucketDeleteResponse);
|
|
rpc ListBuckets(BucketListRequest) returns (BucketListResponse);
|
|
rpc SetBucketAttribution(BucketSetAttributionRequest) returns (BucketSetAttributionResponse);
|
|
|
|
rpc CreateSegmentOld(SegmentWriteRequestOld) returns (SegmentWriteResponseOld);
|
|
rpc CommitSegmentOld(SegmentCommitRequestOld) returns (SegmentCommitResponseOld);
|
|
rpc SegmentInfoOld(SegmentInfoRequestOld) returns (SegmentInfoResponseOld);
|
|
rpc DownloadSegmentOld(SegmentDownloadRequestOld) returns (SegmentDownloadResponseOld);
|
|
rpc DeleteSegmentOld(SegmentDeleteRequestOld) returns (SegmentDeleteResponseOld);
|
|
rpc ListSegmentsOld(ListSegmentsRequestOld) returns (ListSegmentsResponseOld);
|
|
rpc SetAttributionOld(SetAttributionRequestOld) returns (SetAttributionResponseOld);
|
|
|
|
rpc ProjectInfo(ProjectInfoRequest) returns (ProjectInfoResponse);
|
|
}
|
|
|
|
message Bucket {
|
|
bytes name = 1;
|
|
encryption.CipherSuite path_cipher = 2;
|
|
|
|
google.protobuf.Timestamp created_at = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
|
|
|
int64 default_segment_size = 4;
|
|
pointerdb.RedundancyScheme default_redundancy_scheme = 5;
|
|
encryption.EncryptionParameters default_encryption_parameters = 6;
|
|
}
|
|
|
|
message BucketListItem {
|
|
bytes name = 1;
|
|
|
|
google.protobuf.Timestamp created_at = 2 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
|
}
|
|
|
|
message BucketCreateRequest {
|
|
bytes name = 1;
|
|
encryption.CipherSuite path_cipher = 2;
|
|
|
|
int64 default_segment_size = 3;
|
|
pointerdb.RedundancyScheme default_redundancy_scheme = 4;
|
|
encryption.EncryptionParameters default_encryption_parameters = 5;
|
|
}
|
|
|
|
message BucketCreateResponse {
|
|
Bucket bucket = 1;
|
|
}
|
|
|
|
message BucketGetRequest {
|
|
bytes name = 1;
|
|
}
|
|
|
|
message BucketGetResponse {
|
|
Bucket bucket = 1;
|
|
}
|
|
|
|
message BucketDeleteRequest {
|
|
bytes name = 1;
|
|
}
|
|
|
|
message BucketDeleteResponse {
|
|
}
|
|
|
|
message BucketListRequest {
|
|
bytes cursor = 1;
|
|
int32 limit = 2;
|
|
int32 direction = 3;
|
|
}
|
|
|
|
message BucketListResponse {
|
|
repeated BucketListItem items = 1;
|
|
bool more = 2;
|
|
}
|
|
|
|
message BucketSetAttributionRequest {
|
|
bytes name = 1;
|
|
bytes attribution_id = 2;
|
|
}
|
|
|
|
message BucketSetAttributionResponse {
|
|
}
|
|
|
|
message AddressedOrderLimit {
|
|
orders.OrderLimit limit = 1;
|
|
node.NodeAddress storage_node_address = 2;
|
|
}
|
|
|
|
message SegmentWriteRequestOld {
|
|
bytes bucket = 1;
|
|
bytes path = 2;
|
|
int64 segment = 3;
|
|
pointerdb.RedundancyScheme redundancy = 4;
|
|
int64 max_encrypted_segment_size = 5;
|
|
google.protobuf.Timestamp expiration = 6 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
|
}
|
|
|
|
message SegmentWriteResponseOld {
|
|
repeated AddressedOrderLimit addressed_limits = 1;
|
|
bytes root_piece_id = 2 [(gogoproto.customtype) = "PieceID", (gogoproto.nullable) = false];
|
|
bytes private_key = 3 [(gogoproto.customtype) = "PiecePrivateKey", (gogoproto.nullable) = false];
|
|
}
|
|
|
|
message SegmentCommitRequestOld {
|
|
bytes bucket = 1;
|
|
bytes path = 2;
|
|
int64 segment = 3;
|
|
pointerdb.Pointer pointer = 4;
|
|
repeated orders.OrderLimit original_limits = 5;
|
|
}
|
|
|
|
message SegmentCommitResponseOld {
|
|
pointerdb.Pointer pointer = 1;
|
|
}
|
|
|
|
message SegmentDownloadRequestOld {
|
|
bytes bucket = 1;
|
|
bytes path = 2;
|
|
int64 segment = 3;
|
|
}
|
|
|
|
message SegmentDownloadResponseOld {
|
|
repeated AddressedOrderLimit addressed_limits = 1;
|
|
pointerdb.Pointer pointer = 2;
|
|
bytes private_key = 3 [(gogoproto.customtype) = "PiecePrivateKey", (gogoproto.nullable) = false];
|
|
}
|
|
|
|
message SegmentInfoRequestOld {
|
|
bytes bucket = 1;
|
|
bytes path = 2;
|
|
int64 segment = 3;
|
|
}
|
|
|
|
message SegmentInfoResponseOld {
|
|
pointerdb.Pointer pointer = 2;
|
|
}
|
|
|
|
message SegmentDeleteRequestOld {
|
|
bytes bucket = 1;
|
|
bytes path = 2;
|
|
int64 segment = 3;
|
|
}
|
|
|
|
message SegmentDeleteResponseOld {
|
|
repeated AddressedOrderLimit addressed_limits = 1;
|
|
bytes private_key = 2 [(gogoproto.customtype) = "PiecePrivateKey", (gogoproto.nullable) = false];
|
|
}
|
|
|
|
message ListSegmentsRequestOld {
|
|
bytes bucket = 1;
|
|
bytes prefix = 2;
|
|
bytes start_after = 3;
|
|
bytes end_before = 4;
|
|
bool recursive = 5;
|
|
int32 limit = 6;
|
|
fixed32 meta_flags = 7;
|
|
}
|
|
|
|
message ListSegmentsResponseOld {
|
|
message Item {
|
|
bytes path = 1;
|
|
pointerdb.Pointer pointer = 2;
|
|
bool is_prefix = 3;
|
|
}
|
|
|
|
repeated Item items = 1;
|
|
bool more = 2;
|
|
}
|
|
|
|
message SetAttributionRequestOld {
|
|
bytes bucket_name = 1;
|
|
bytes partner_id = 2 ;
|
|
}
|
|
|
|
message SetAttributionResponseOld {
|
|
}
|
|
|
|
message ProjectInfoRequest {
|
|
}
|
|
|
|
message ProjectInfoResponse {
|
|
bytes project_salt = 1;
|
|
}
|