2020-12-26 01:16:43 +00:00
|
|
|
// Copyright (C) 2020 Storj Labs, Inc.
|
|
|
|
// See LICENSE for copying information.
|
|
|
|
|
|
|
|
syntax = "proto3";
|
|
|
|
option go_package = "storj.io/storj/private/multinodepb";
|
|
|
|
|
|
|
|
package multinode;
|
|
|
|
|
|
|
|
import "gogo.proto";
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
|
|
|
|
message RequestHeader {
|
|
|
|
bytes api_key = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
service Storage {
|
|
|
|
rpc DiskSpace(DiskSpaceRequest) returns (DiskSpaceResponse);
|
|
|
|
}
|
|
|
|
|
|
|
|
message DiskSpaceRequest {
|
|
|
|
RequestHeader header = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DiskSpaceResponse {
|
|
|
|
int64 allocated = 1;
|
|
|
|
int64 used_pieces = 2;
|
|
|
|
int64 used_trash = 3;
|
|
|
|
int64 free = 4;
|
|
|
|
int64 available = 5;
|
|
|
|
int64 overused = 6;
|
|
|
|
}
|
|
|
|
|
|
|
|
service Bandwidth {
|
|
|
|
rpc MonthSummary(BandwidthMonthSummaryRequest) returns (BandwidthMonthSummaryResponse);
|
|
|
|
}
|
|
|
|
|
|
|
|
message BandwidthMonthSummaryRequest {
|
|
|
|
RequestHeader header = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message BandwidthMonthSummaryResponse {
|
|
|
|
int64 used = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
service Node {
|
|
|
|
rpc Version(VersionRequest) returns (VersionResponse);
|
|
|
|
rpc LastContact(LastContactRequest) returns (LastContactResponse);
|
2021-01-05 07:59:22 +00:00
|
|
|
rpc Reputation(ReputationRequest) returns (ReputationResponse);
|
2021-01-07 23:26:31 +00:00
|
|
|
rpc TrustedSatellites(TrustedSatellitesRequest) returns (TrustedSatellitesResponse);
|
2020-12-26 01:16:43 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message VersionRequest {
|
|
|
|
RequestHeader header = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message VersionResponse {
|
|
|
|
string version = 1; // must be semver formatted
|
|
|
|
}
|
|
|
|
|
|
|
|
message LastContactRequest {
|
|
|
|
RequestHeader header = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message LastContactResponse {
|
|
|
|
google.protobuf.Timestamp last_contact = 1 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
|
|
|
}
|
2021-01-05 07:59:22 +00:00
|
|
|
|
|
|
|
message ReputationRequest {
|
|
|
|
RequestHeader header = 1;
|
|
|
|
bytes satellite_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
|
|
|
|
}
|
|
|
|
|
|
|
|
message ReputationResponse {
|
|
|
|
message Online {
|
|
|
|
double score = 1;
|
|
|
|
}
|
|
|
|
message Audit {
|
|
|
|
double score = 1;
|
|
|
|
double suspension_score = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
Online online = 1;
|
|
|
|
Audit audit = 2;
|
|
|
|
}
|
2021-01-07 23:26:31 +00:00
|
|
|
|
|
|
|
message TrustedSatellitesRequest {
|
|
|
|
RequestHeader header = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message TrustedSatellitesResponse {
|
|
|
|
message NodeURL {
|
|
|
|
bytes node_id = 1 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
|
|
|
|
string address = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
repeated NodeURL trusted_satellites = 1;
|
|
|
|
}
|
2021-01-07 19:17:46 +00:00
|
|
|
|
|
|
|
service Payout {
|
2021-05-05 18:34:10 +01:00
|
|
|
rpc AllSatellitesSummary(AllSatellitesSummaryRequest) returns (AllSatellitesSummaryResponse);
|
|
|
|
rpc AllSatellitesPeriodSummary(AllSatellitesPeriodSummaryRequest) returns (AllSatellitesPeriodSummaryResponse);
|
2021-01-07 19:17:46 +00:00
|
|
|
rpc Earned(EarnedRequest) returns (EarnedResponse);
|
2021-02-04 15:44:31 +00:00
|
|
|
rpc EarnedPerSatellite(EarnedPerSatelliteRequest) returns (EarnedPerSatelliteResponse);
|
2021-05-05 18:10:58 +01:00
|
|
|
rpc EstimatedPayoutSatellite(EstimatedPayoutSatelliteRequest) returns (EstimatedPayoutSatelliteResponse);
|
|
|
|
rpc EstimatedPayoutTotal(EstimatedPayoutTotalRequest) returns (EstimatedPayoutTotalResponse);
|
|
|
|
}
|
|
|
|
|
|
|
|
message EstimatedPayoutSatelliteRequest {
|
|
|
|
RequestHeader header = 1;
|
|
|
|
bytes satellite_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
|
|
|
|
}
|
|
|
|
message EstimatedPayoutSatelliteResponse {
|
|
|
|
int64 estimated_earnings = 1;
|
|
|
|
}
|
|
|
|
message EstimatedPayoutTotalRequest {
|
|
|
|
RequestHeader header = 1;
|
|
|
|
}
|
|
|
|
message EstimatedPayoutTotalResponse {
|
|
|
|
int64 estimated_earnings = 1;
|
2021-01-07 19:17:46 +00:00
|
|
|
}
|
|
|
|
|
2021-05-05 18:34:10 +01:00
|
|
|
message AllSatellitesSummaryRequest {
|
|
|
|
RequestHeader header = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AllSatellitesSummaryResponse {
|
|
|
|
PayoutInfo payout_info = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AllSatellitesPeriodSummaryRequest {
|
|
|
|
RequestHeader header = 1;
|
|
|
|
string period = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AllSatellitesPeriodSummaryResponse {
|
|
|
|
PayoutInfo payout_info = 1;
|
|
|
|
}
|
|
|
|
|
2021-01-07 19:17:46 +00:00
|
|
|
message EarnedRequest {
|
|
|
|
RequestHeader header = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message EarnedResponse {
|
|
|
|
int64 total = 1;
|
|
|
|
}
|
2021-02-04 15:44:31 +00:00
|
|
|
|
|
|
|
message EarnedPerSatelliteRequest {
|
|
|
|
RequestHeader header = 1;
|
|
|
|
}
|
2021-05-05 18:34:10 +01:00
|
|
|
|
2021-02-04 15:44:31 +00:00
|
|
|
message EarnedPerSatelliteResponse {
|
|
|
|
repeated EarnedSatellite earned_satellite = 1;
|
|
|
|
}
|
2021-05-05 18:34:10 +01:00
|
|
|
|
2021-02-04 15:44:31 +00:00
|
|
|
message EarnedSatellite {
|
|
|
|
int64 total = 1;
|
|
|
|
bytes satellite_id = 2 [(gogoproto.customtype) = "NodeID", (gogoproto.nullable) = false];
|
|
|
|
}
|
2021-05-05 18:34:10 +01:00
|
|
|
|
|
|
|
message PayoutInfo {
|
|
|
|
int64 held = 1;
|
|
|
|
int64 paid = 2;
|
|
|
|
}
|