2019-03-18 10:55:06 +00:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
option go_package = "pb";
|
|
|
|
|
|
|
|
package metainfo;
|
|
|
|
|
2019-07-01 23:17:30 +01:00
|
|
|
import "encryption.proto";
|
2019-03-18 10:55:06 +00:00
|
|
|
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 {
|
2019-07-01 23:17:30 +01:00
|
|
|
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);
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
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);
|
|
|
|
|
2019-06-24 18:15:45 +01:00
|
|
|
rpc ProjectInfo(ProjectInfoRequest) returns (ProjectInfoResponse);
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
|
2019-07-03 20:44:02 +01:00
|
|
|
message Bucket {
|
2019-07-01 23:17:30 +01:00
|
|
|
bytes name = 1;
|
|
|
|
encryption.CipherSuite path_cipher = 2;
|
|
|
|
|
2019-07-12 13:57:02 +01:00
|
|
|
google.protobuf.Timestamp created_at = 3 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
2019-07-01 23:17:30 +01:00
|
|
|
|
2019-07-12 13:57:02 +01:00
|
|
|
int64 default_segment_size = 4;
|
|
|
|
pointerdb.RedundancyScheme default_redundancy_scheme = 5;
|
|
|
|
encryption.EncryptionParameters default_encryption_parameters = 6;
|
2019-07-01 23:17:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
|
2019-07-12 13:57:02 +01:00
|
|
|
int64 default_segment_size = 3;
|
|
|
|
pointerdb.RedundancyScheme default_redundancy_scheme = 4;
|
|
|
|
encryption.EncryptionParameters default_encryption_parameters = 5;
|
2019-07-01 23:17:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message BucketCreateResponse {
|
2019-07-03 20:44:02 +01:00
|
|
|
Bucket bucket = 1;
|
2019-07-01 23:17:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message BucketGetRequest {
|
|
|
|
bytes name = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BucketGetResponse {
|
2019-07-03 20:44:02 +01:00
|
|
|
Bucket bucket = 1;
|
2019-07-01 23:17:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message BucketDeleteRequest {
|
|
|
|
bytes name = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BucketDeleteResponse {
|
|
|
|
}
|
|
|
|
|
|
|
|
message BucketListRequest {
|
|
|
|
bytes cursor = 1;
|
|
|
|
int32 limit = 2;
|
2019-07-12 13:57:02 +01:00
|
|
|
int32 direction = 3;
|
2019-07-01 23:17:30 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message BucketListResponse {
|
|
|
|
repeated BucketListItem items = 1;
|
|
|
|
bool more = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BucketSetAttributionRequest {
|
|
|
|
bytes name = 1;
|
|
|
|
bytes attribution_id = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BucketSetAttributionResponse {
|
|
|
|
}
|
|
|
|
|
2019-03-18 10:55:06 +00:00
|
|
|
message AddressedOrderLimit {
|
2019-07-01 16:54:11 +01:00
|
|
|
orders.OrderLimit limit = 1;
|
2019-03-18 10:55:06 +00:00
|
|
|
node.NodeAddress storage_node_address = 2;
|
|
|
|
}
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
message SegmentWriteRequestOld {
|
2019-03-18 10:55:06 +00:00
|
|
|
bytes bucket = 1;
|
|
|
|
bytes path = 2;
|
|
|
|
int64 segment = 3;
|
|
|
|
pointerdb.RedundancyScheme redundancy = 4;
|
|
|
|
int64 max_encrypted_segment_size = 5;
|
2019-07-09 22:54:00 +01:00
|
|
|
google.protobuf.Timestamp expiration = 6 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
message SegmentWriteResponseOld {
|
2019-03-18 10:55:06 +00:00
|
|
|
repeated AddressedOrderLimit addressed_limits = 1;
|
|
|
|
bytes root_piece_id = 2 [(gogoproto.customtype) = "PieceID", (gogoproto.nullable) = false];
|
2019-07-11 21:51:40 +01:00
|
|
|
bytes private_key = 3 [(gogoproto.customtype) = "PiecePrivateKey", (gogoproto.nullable) = false];
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
message SegmentCommitRequestOld {
|
2019-03-18 10:55:06 +00:00
|
|
|
bytes bucket = 1;
|
|
|
|
bytes path = 2;
|
|
|
|
int64 segment = 3;
|
|
|
|
pointerdb.Pointer pointer = 4;
|
2019-07-01 16:54:11 +01:00
|
|
|
repeated orders.OrderLimit original_limits = 5;
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
message SegmentCommitResponseOld {
|
2019-03-18 10:55:06 +00:00
|
|
|
pointerdb.Pointer pointer = 1;
|
|
|
|
}
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
message SegmentDownloadRequestOld {
|
2019-06-24 18:15:45 +01:00
|
|
|
bytes bucket = 1;
|
2019-03-18 10:55:06 +00:00
|
|
|
bytes path = 2;
|
|
|
|
int64 segment = 3;
|
|
|
|
}
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
message SegmentDownloadResponseOld {
|
2019-03-18 10:55:06 +00:00
|
|
|
repeated AddressedOrderLimit addressed_limits = 1;
|
|
|
|
pointerdb.Pointer pointer = 2;
|
2019-07-11 21:51:40 +01:00
|
|
|
bytes private_key = 3 [(gogoproto.customtype) = "PiecePrivateKey", (gogoproto.nullable) = false];
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
message SegmentInfoRequestOld {
|
2019-06-24 18:15:45 +01:00
|
|
|
bytes bucket = 1;
|
2019-03-18 10:55:06 +00:00
|
|
|
bytes path = 2;
|
|
|
|
int64 segment = 3;
|
|
|
|
}
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
message SegmentInfoResponseOld {
|
2019-03-18 10:55:06 +00:00
|
|
|
pointerdb.Pointer pointer = 2;
|
|
|
|
}
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
message SegmentDeleteRequestOld {
|
2019-03-18 10:55:06 +00:00
|
|
|
bytes bucket = 1;
|
|
|
|
bytes path = 2;
|
|
|
|
int64 segment = 3;
|
|
|
|
}
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
message SegmentDeleteResponseOld {
|
2019-03-18 10:55:06 +00:00
|
|
|
repeated AddressedOrderLimit addressed_limits = 1;
|
2019-07-11 21:51:40 +01:00
|
|
|
bytes private_key = 2 [(gogoproto.customtype) = "PiecePrivateKey", (gogoproto.nullable) = false];
|
2019-03-18 10:55:06 +00:00
|
|
|
}
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
message ListSegmentsRequestOld {
|
2019-03-18 10:55:06 +00:00
|
|
|
bytes bucket = 1;
|
|
|
|
bytes prefix = 2;
|
|
|
|
bytes start_after = 3;
|
|
|
|
bytes end_before = 4;
|
|
|
|
bool recursive = 5;
|
|
|
|
int32 limit = 6;
|
|
|
|
fixed32 meta_flags = 7;
|
|
|
|
}
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
message ListSegmentsResponseOld {
|
2019-03-18 10:55:06 +00:00
|
|
|
message Item {
|
|
|
|
bytes path = 1;
|
|
|
|
pointerdb.Pointer pointer = 2;
|
|
|
|
bool is_prefix = 3;
|
|
|
|
}
|
2019-06-24 18:15:45 +01:00
|
|
|
|
2019-03-18 10:55:06 +00:00
|
|
|
repeated Item items = 1;
|
|
|
|
bool more = 2;
|
2019-06-13 02:35:37 +01:00
|
|
|
}
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
message SetAttributionRequestOld {
|
2019-06-13 02:35:37 +01:00
|
|
|
bytes bucket_name = 1;
|
2019-06-19 13:02:37 +01:00
|
|
|
bytes partner_id = 2 ;
|
2019-06-13 02:35:37 +01:00
|
|
|
}
|
|
|
|
|
2019-07-08 14:33:15 +01:00
|
|
|
message SetAttributionResponseOld {
|
2019-06-24 18:15:45 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message ProjectInfoRequest {
|
|
|
|
}
|
|
|
|
|
|
|
|
message ProjectInfoResponse {
|
|
|
|
bytes project_salt = 1;
|
|
|
|
}
|