mirror of
https://github.com/juanfont/headscale.git
synced 2025-02-20 00:18:41 +01:00
remove routes api
Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
This commit is contained in:
parent
ff96ac5259
commit
7bee615c33
@ -7,10 +7,8 @@ import "google/api/annotations.proto";
|
||||
import "headscale/v1/user.proto";
|
||||
import "headscale/v1/preauthkey.proto";
|
||||
import "headscale/v1/node.proto";
|
||||
import "headscale/v1/routes.proto";
|
||||
import "headscale/v1/apikey.proto";
|
||||
import "headscale/v1/policy.proto";
|
||||
// import "headscale/v1/device.proto";
|
||||
|
||||
service HeadscaleService {
|
||||
// --- User start ---
|
||||
@ -133,39 +131,6 @@ service HeadscaleService {
|
||||
|
||||
// --- Node end ---
|
||||
|
||||
// --- Route start ---
|
||||
rpc GetRoutes(GetRoutesRequest) returns (GetRoutesResponse) {
|
||||
option (google.api.http) = {
|
||||
get : "/api/v1/routes"
|
||||
};
|
||||
}
|
||||
|
||||
rpc EnableRoute(EnableRouteRequest) returns (EnableRouteResponse) {
|
||||
option (google.api.http) = {
|
||||
post : "/api/v1/routes/{route_id}/enable"
|
||||
};
|
||||
}
|
||||
|
||||
rpc DisableRoute(DisableRouteRequest) returns (DisableRouteResponse) {
|
||||
option (google.api.http) = {
|
||||
post : "/api/v1/routes/{route_id}/disable"
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetNodeRoutes(GetNodeRoutesRequest) returns (GetNodeRoutesResponse) {
|
||||
option (google.api.http) = {
|
||||
get : "/api/v1/node/{node_id}/routes"
|
||||
};
|
||||
}
|
||||
|
||||
rpc DeleteRoute(DeleteRouteRequest) returns (DeleteRouteResponse) {
|
||||
option (google.api.http) = {
|
||||
delete : "/api/v1/routes/{route_id}"
|
||||
};
|
||||
}
|
||||
|
||||
// --- Route end ---
|
||||
|
||||
// --- ApiKeys start ---
|
||||
rpc CreateApiKey(CreateApiKeyRequest) returns (CreateApiKeyResponse) {
|
||||
option (google.api.http) = {
|
||||
|
@ -48,6 +48,7 @@ message Node {
|
||||
repeated string valid_tags = 20;
|
||||
string given_name = 21;
|
||||
bool online = 22;
|
||||
repeated string approved_routes = 23;
|
||||
}
|
||||
|
||||
message RegisterNodeRequest {
|
||||
|
@ -1,39 +0,0 @@
|
||||
syntax = "proto3";
|
||||
package headscale.v1;
|
||||
option go_package = "github.com/juanfont/headscale/gen/go/v1";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "headscale/v1/node.proto";
|
||||
|
||||
message Route {
|
||||
uint64 id = 1;
|
||||
Node node = 2;
|
||||
string prefix = 3;
|
||||
bool advertised = 4;
|
||||
bool enabled = 5;
|
||||
bool is_primary = 6;
|
||||
|
||||
google.protobuf.Timestamp created_at = 7;
|
||||
google.protobuf.Timestamp updated_at = 8;
|
||||
google.protobuf.Timestamp deleted_at = 9;
|
||||
}
|
||||
|
||||
message GetRoutesRequest {}
|
||||
|
||||
message GetRoutesResponse { repeated Route routes = 1; }
|
||||
|
||||
message EnableRouteRequest { uint64 route_id = 1; }
|
||||
|
||||
message EnableRouteResponse {}
|
||||
|
||||
message DisableRouteRequest { uint64 route_id = 1; }
|
||||
|
||||
message DisableRouteResponse {}
|
||||
|
||||
message GetNodeRoutesRequest { uint64 node_id = 1; }
|
||||
|
||||
message GetNodeRoutesResponse { repeated Route routes = 1; }
|
||||
|
||||
message DeleteRouteRequest { uint64 route_id = 1; }
|
||||
|
||||
message DeleteRouteResponse {}
|
Loading…
Reference in New Issue
Block a user