da68f0cda7
Change-Id: I7f9856fd48477cf54ade62b74935c26c411998aa
78 lines
1.9 KiB
Protocol Buffer
78 lines
1.9 KiB
Protocol Buffer
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
syntax = "proto3";
|
|
|
|
package fastpb;
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
import "gogo.proto";
|
|
|
|
// This is a reduced version of pointerdb.proto for things that are
|
|
// relevant to migration.
|
|
|
|
message RedundancyScheme {
|
|
enum SchemeType {
|
|
INVALID = 0;
|
|
RS = 1;
|
|
}
|
|
SchemeType type = 1;
|
|
|
|
// these values apply to RS encoding
|
|
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
|
|
|
|
int32 erasure_share_size = 6;
|
|
}
|
|
|
|
message RemotePiece {
|
|
int32 piece_num = 1;
|
|
bytes node_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
|
|
}
|
|
|
|
message RemoteSegment {
|
|
RedundancyScheme redundancy = 1;
|
|
bytes root_piece_id = 2 [(gogoproto.customtype) = "PieceID", (gogoproto.nullable) = false];
|
|
repeated RemotePiece remote_pieces = 3 [(gogoproto.nullable) = false];
|
|
}
|
|
|
|
message Pointer {
|
|
enum DataType {
|
|
INLINE = 0;
|
|
REMOTE = 1;
|
|
}
|
|
|
|
DataType type = 1;
|
|
|
|
bytes inline_segment = 3;
|
|
RemoteSegment remote = 4;
|
|
int64 segment_size = 5;
|
|
|
|
google.protobuf.Timestamp creation_date = 6 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
|
google.protobuf.Timestamp expiration_date = 7 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
|
|
|
bytes metadata = 8;
|
|
}
|
|
|
|
message SegmentMeta {
|
|
bytes encrypted_key = 1;
|
|
bytes key_nonce = 2;
|
|
}
|
|
|
|
message StreamInfo {
|
|
int64 deprecated_number_of_segments = 1;
|
|
int64 segments_size = 2;
|
|
int64 last_segment_size = 3;
|
|
bytes metadata = 4;
|
|
}
|
|
|
|
message StreamMeta {
|
|
bytes encrypted_stream_info = 1;
|
|
int32 encryption_type = 2;
|
|
int32 encryption_block_size = 3;
|
|
SegmentMeta last_segment_meta = 4;
|
|
int64 number_of_segments = 5;
|
|
}
|