f9248c21d4
* Satellite verification on storage node * fix formatting * fix formatting * rename SignatureAuth to SignedMessage * fixes after review * fix linter errors * improve errors handling * remove SignedMessageProvider * fix liter errors * params changed to authorization, signed message in audit, minor fixes * fix formatting
109 lines
2.0 KiB
Protocol Buffer
109 lines
2.0 KiB
Protocol Buffer
// Copyright (C) 2018 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
syntax = "proto3";
|
|
option go_package = "pb";
|
|
|
|
package piecestoreroutes;
|
|
|
|
service PieceStoreRoutes {
|
|
rpc Piece(PieceId) returns (PieceSummary) {}
|
|
|
|
rpc Retrieve(stream PieceRetrieval) returns (stream PieceRetrievalStream) {}
|
|
|
|
rpc Store(stream PieceStore) returns (PieceStoreSummary) {}
|
|
|
|
rpc Delete(PieceDelete) returns (PieceDeleteSummary) {}
|
|
|
|
rpc Stats(StatsReq) returns (StatSummary) {}
|
|
}
|
|
|
|
message PayerBandwidthAllocation {
|
|
message Data {
|
|
bytes payer = 1;
|
|
bytes renter = 2;
|
|
int64 max_size = 3;
|
|
int64 expiration_unix_sec = 4;
|
|
string serial_number = 5;
|
|
}
|
|
bytes signature = 1;
|
|
bytes data = 2; // Serialization of above Data Struct
|
|
}
|
|
|
|
message RenterBandwidthAllocation {
|
|
message Data {
|
|
PayerBandwidthAllocation payer_allocation = 1;
|
|
int64 total = 2;
|
|
}
|
|
|
|
bytes signature = 1;
|
|
bytes data = 2; // Serialization of above Data Struct
|
|
}
|
|
|
|
message PieceStore {
|
|
message PieceData {
|
|
string id = 1;
|
|
int64 expiration_unix_sec = 2;
|
|
bytes content = 3;
|
|
}
|
|
|
|
RenterBandwidthAllocation bandwidthallocation = 1;
|
|
PieceData piecedata = 2;
|
|
SignedMessage authorization = 3;
|
|
}
|
|
|
|
message PieceId {
|
|
string id = 1;
|
|
}
|
|
|
|
message PieceSummary {
|
|
string id = 1;
|
|
int64 size = 2;
|
|
int64 expiration_unix_sec = 3;
|
|
}
|
|
|
|
message PieceRetrieval {
|
|
message PieceData {
|
|
string id = 1;
|
|
int64 size = 2;
|
|
int64 offset = 3;
|
|
}
|
|
|
|
RenterBandwidthAllocation bandwidthallocation = 1;
|
|
PieceData pieceData = 2;
|
|
SignedMessage authorization = 3;
|
|
}
|
|
|
|
message PieceRetrievalStream {
|
|
int64 size = 1;
|
|
bytes content = 2;
|
|
}
|
|
|
|
message PieceDelete {
|
|
string id = 1;
|
|
SignedMessage authorization = 3;
|
|
}
|
|
|
|
message PieceDeleteSummary {
|
|
string message = 1;
|
|
}
|
|
|
|
message PieceStoreSummary {
|
|
string message = 1;
|
|
int64 totalReceived = 2;
|
|
}
|
|
|
|
message StatsReq {}
|
|
|
|
message StatSummary {
|
|
int64 usedSpace = 1;
|
|
int64 availableSpace = 2;
|
|
int64 usedBandwidth = 3;
|
|
int64 availableBandwidth = 4;
|
|
}
|
|
|
|
message SignedMessage {
|
|
bytes data = 1;
|
|
bytes signature = 2;
|
|
bytes publicKey = 3;
|
|
} |