2019-01-24 20:15:10 +00:00
|
|
|
// Copyright (C) 2019 Storj Labs, Inc.
|
2018-05-15 01:31:26 +01:00
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
syntax = "proto3";
|
2018-09-21 19:48:54 +01:00
|
|
|
option go_package = "pb";
|
|
|
|
|
|
|
|
package pointerdb;
|
2018-05-15 01:31:26 +01:00
|
|
|
|
2018-07-26 21:20:02 +01:00
|
|
|
import "google/protobuf/timestamp.proto";
|
2018-11-29 18:39:27 +00:00
|
|
|
import "gogo.proto";
|
|
|
|
import "node.proto";
|
2019-03-18 10:55:06 +00:00
|
|
|
import "orders.proto";
|
2018-05-30 03:47:40 +01:00
|
|
|
|
|
|
|
message RedundancyScheme {
|
|
|
|
enum SchemeType {
|
|
|
|
RS = 0;
|
|
|
|
}
|
|
|
|
SchemeType type = 1;
|
|
|
|
|
|
|
|
// these values apply to RS encoding
|
2018-07-27 07:02:59 +01:00
|
|
|
int32 min_req = 2; // minimum required for reconstruction
|
|
|
|
int32 total = 3; // total amount of pieces we generated
|
|
|
|
int32 repair_threshold = 4; // amount of pieces we need to drop to before triggering repair
|
|
|
|
int32 success_threshold = 5; // amount of pieces we need to store to call it a success
|
2018-08-14 16:15:22 +01:00
|
|
|
|
|
|
|
int32 erasure_share_size = 6;
|
2018-05-30 03:47:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message RemotePiece {
|
2018-07-27 07:02:59 +01:00
|
|
|
int32 piece_num = 1;
|
2018-11-29 18:39:27 +00:00
|
|
|
bytes node_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
|
2019-03-18 10:55:06 +00:00
|
|
|
orders.PieceHash hash = 3;
|
2018-05-30 03:47:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message RemoteSegment {
|
|
|
|
RedundancyScheme redundancy = 1;
|
2019-03-18 10:55:06 +00:00
|
|
|
bytes root_piece_id = 2 [(gogoproto.customtype) = "PieceID", (gogoproto.nullable) = false];
|
2018-05-30 03:47:40 +01:00
|
|
|
repeated RemotePiece remote_pieces = 3;
|
|
|
|
bytes merkle_root = 4; // root hash of the hashes of all of these pieces
|
|
|
|
}
|
|
|
|
|
|
|
|
message Pointer {
|
|
|
|
enum DataType {
|
|
|
|
INLINE = 0;
|
|
|
|
REMOTE = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
DataType type = 1;
|
|
|
|
|
|
|
|
bytes inline_segment = 3;
|
|
|
|
RemoteSegment remote = 4;
|
2018-11-20 17:09:35 +00:00
|
|
|
int64 segment_size = 5;
|
2018-05-30 03:47:40 +01:00
|
|
|
|
2019-07-08 23:16:50 +01:00
|
|
|
google.protobuf.Timestamp creation_date = 6 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
2019-07-09 22:54:00 +01:00
|
|
|
google.protobuf.Timestamp expiration_date = 7 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
2018-06-26 16:18:05 +01:00
|
|
|
|
|
|
|
bytes metadata = 8;
|
2018-05-30 03:47:40 +01:00
|
|
|
}
|
|
|
|
|
2018-05-15 01:31:26 +01:00
|
|
|
// ListResponse is a response message for the List rpc call
|
|
|
|
message ListResponse {
|
2018-07-27 07:02:59 +01:00
|
|
|
message Item {
|
2018-09-07 15:20:15 +01:00
|
|
|
string path = 1;
|
2018-07-30 19:57:50 +01:00
|
|
|
Pointer pointer = 2;
|
2018-09-07 15:20:15 +01:00
|
|
|
bool is_prefix = 3;
|
2018-07-27 07:02:59 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
repeated Item items = 1;
|
|
|
|
bool more = 2;
|
2018-05-15 01:31:26 +01:00
|
|
|
}
|