2019-10-03 13:49:23 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package io.stellarproject.heimdall.api.v1;
|
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
2019-10-05 02:56:46 +00:00
|
|
|
import "google/protobuf/empty.proto";
|
2019-10-07 02:10:29 +00:00
|
|
|
import "google/protobuf/timestamp.proto";
|
2019-10-03 13:49:23 +00:00
|
|
|
|
|
|
|
option go_package = "github.com/stellarproject/heimdall/api/v1;v1";
|
|
|
|
|
|
|
|
service Heimdall {
|
|
|
|
rpc Connect(ConnectRequest) returns (ConnectResponse);
|
2019-10-05 02:56:46 +00:00
|
|
|
rpc Routes(RoutesRequest) returns (RoutesResponse);
|
|
|
|
rpc CreateRoute(CreateRouteRequest) returns (google.protobuf.Empty);
|
|
|
|
rpc DeleteRoute(DeleteRouteRequest) returns (google.protobuf.Empty);
|
|
|
|
rpc Nodes(NodesRequest) returns (NodesResponse);
|
|
|
|
rpc Peers(PeersRequest) returns (PeersResponse);
|
2019-10-03 13:49:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message Master {
|
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
|
|
|
string grpc_address = 2 [(gogoproto.customname) = "GRPCAddress"];
|
|
|
|
string redis_url = 3 [(gogoproto.customname) = "RedisURL"];
|
|
|
|
}
|
|
|
|
|
|
|
|
message ConnectRequest {
|
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
2019-10-03 14:10:50 +00:00
|
|
|
string cluster_key = 2;
|
2019-10-03 13:49:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message ConnectResponse {
|
|
|
|
Master master = 1;
|
|
|
|
}
|
|
|
|
|
2019-10-04 13:46:03 +00:00
|
|
|
message KeyPair {
|
|
|
|
string private_key = 1;
|
|
|
|
string public_key = 2;
|
|
|
|
}
|
|
|
|
|
2019-10-03 13:49:23 +00:00
|
|
|
message Node {
|
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
|
|
|
string addr = 2;
|
2019-10-04 13:46:03 +00:00
|
|
|
KeyPair keypair = 3 [(gogoproto.customname) = "KeyPair"];
|
2019-10-06 07:11:45 +00:00
|
|
|
string endpoint_ip = 4 [(gogoproto.customname) = "EndpointIP"];
|
|
|
|
uint64 endpoint_port = 5;
|
|
|
|
string gateway_ip = 6 [(gogoproto.customname) = "GatewayIP"];
|
2019-10-07 02:10:29 +00:00
|
|
|
google.protobuf.Timestamp updated = 7 [(gogoproto.stdtime) = true, (gogoproto.nullable) = false];
|
2019-10-03 13:49:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message NodesRequest {}
|
|
|
|
|
|
|
|
message NodesResponse {
|
|
|
|
repeated Node nodes = 1;
|
|
|
|
}
|
2019-10-04 11:47:16 +00:00
|
|
|
|
|
|
|
message Peer {
|
2019-10-04 13:46:03 +00:00
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
|
|
|
KeyPair keypair = 2 [(gogoproto.customname) = "KeyPair"];
|
2019-10-04 11:47:16 +00:00
|
|
|
repeated string allowed_ips = 3 [(gogoproto.customname) = "AllowedIPs"];
|
|
|
|
string endpoint = 4;
|
|
|
|
}
|
2019-10-05 02:56:46 +00:00
|
|
|
|
|
|
|
message PeersRequest {}
|
|
|
|
|
|
|
|
message PeersResponse {
|
|
|
|
repeated Peer peers = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Route {
|
|
|
|
string node_id = 1 [(gogoproto.customname) = "NodeID"];
|
|
|
|
string network = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CreateRouteRequest {
|
|
|
|
string node_id = 1 [(gogoproto.customname) = "NodeID"];
|
|
|
|
string network = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteRouteRequest {
|
|
|
|
string network = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message RoutesRequest {}
|
|
|
|
|
|
|
|
message RoutesResponse {
|
|
|
|
repeated Route routes = 1;
|
|
|
|
}
|