storj/pkg/pb/piecestore.proto
2019-03-29 16:40:06 +02:00

54 lines
1.8 KiB
Protocol Buffer

// Copyright (C) 2019 Storj Labs, Inc.
// See LICENSE for copying information.
syntax = "proto3";
option go_package = "pb";
package piecestoreroutes;
import "gogo.proto";
import "google/protobuf/duration.proto";
enum BandwidthAction {
PUT = 0;
GET = 1;
GET_AUDIT = 2;
GET_REPAIR = 3;
PUT_REPAIR = 4;
}
message PayerBandwidthAllocation { // Payer refers to satellite
bytes satellite_id = 1 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false]; // Satellite Identity
bytes uplink_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false]; // Uplink Identity
int64 max_size = 3; // Max amount of data the satellite will pay for in bytes
int64 expiration_unix_sec = 4; // Unix timestamp for when data is no longer being paid for
string serial_number = 5; // Unique serial number
BandwidthAction action = 6; // GET or PUT
int64 created_unix_sec = 7; // Unix timestamp for when PayerbandwidthAllocation was created
repeated bytes certs = 8; // Satellite certificate chain
bytes signature = 9; // Proof that the data was signed by the Satellite
}
message RenterBandwidthAllocation { // Renter refers to uplink
PayerBandwidthAllocation payer_allocation = 1 [(gogoproto.nullable) = false]; // Bandwidth Allocation from Satellite
int64 total = 2; // Total Bytes Stored
bytes storage_node_id = 3 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false]; // Storage Node Identity
repeated bytes certs = 4; // Uplink certificate chain
bytes signature = 5; // Proof that the data was signed by the Uplink
}
message SignedMessage {
bytes data = 1;
bytes signature = 2;
bytes public_key = 3;
}
message SignedHash {
bytes hash = 1;
repeated bytes certs = 2;
bytes signature = 3;
}