restructure command/api to use stable IDs (#2261)
This commit is contained in:
parent
08bd4b9bc5
commit
64fd1f9483
29 changed files with 1902 additions and 3613 deletions
|
|
@ -1,6 +1,6 @@
|
|||
syntax = "proto3";
|
||||
package headscale.v1;
|
||||
option go_package = "github.com/juanfont/headscale/gen/go/v1";
|
||||
option go_package = "github.com/juanfont/headscale/gen/go/v1";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
|
|
@ -8,76 +8,69 @@ import "google/protobuf/timestamp.proto";
|
|||
// https://github.com/tailscale/tailscale/blob/main/api.md
|
||||
|
||||
message Latency {
|
||||
float latency_ms = 1;
|
||||
bool preferred = 2;
|
||||
float latency_ms = 1;
|
||||
bool preferred = 2;
|
||||
}
|
||||
|
||||
message ClientSupports {
|
||||
bool hair_pinning = 1;
|
||||
bool ipv6 = 2;
|
||||
bool pcp = 3;
|
||||
bool pmp = 4;
|
||||
bool udp = 5;
|
||||
bool upnp = 6;
|
||||
bool hair_pinning = 1;
|
||||
bool ipv6 = 2;
|
||||
bool pcp = 3;
|
||||
bool pmp = 4;
|
||||
bool udp = 5;
|
||||
bool upnp = 6;
|
||||
}
|
||||
|
||||
message ClientConnectivity {
|
||||
repeated string endpoints = 1;
|
||||
string derp = 2;
|
||||
bool mapping_varies_by_dest_ip = 3;
|
||||
map<string, Latency> latency = 4;
|
||||
ClientSupports client_supports = 5;
|
||||
repeated string endpoints = 1;
|
||||
string derp = 2;
|
||||
bool mapping_varies_by_dest_ip = 3;
|
||||
map<string, Latency> latency = 4;
|
||||
ClientSupports client_supports = 5;
|
||||
}
|
||||
|
||||
message GetDeviceRequest {
|
||||
string id = 1;
|
||||
}
|
||||
message GetDeviceRequest { string id = 1; }
|
||||
|
||||
message GetDeviceResponse {
|
||||
repeated string addresses = 1;
|
||||
string id = 2;
|
||||
string user = 3;
|
||||
string name = 4;
|
||||
string hostname = 5;
|
||||
string client_version = 6;
|
||||
bool update_available = 7;
|
||||
string os = 8;
|
||||
google.protobuf.Timestamp created = 9;
|
||||
google.protobuf.Timestamp last_seen = 10;
|
||||
bool key_expiry_disabled = 11;
|
||||
google.protobuf.Timestamp expires = 12;
|
||||
bool authorized = 13;
|
||||
bool is_external = 14;
|
||||
string machine_key = 15;
|
||||
string node_key = 16;
|
||||
bool blocks_incoming_connections = 17;
|
||||
repeated string enabled_routes = 18;
|
||||
repeated string advertised_routes = 19;
|
||||
ClientConnectivity client_connectivity = 20;
|
||||
repeated string addresses = 1;
|
||||
string id = 2;
|
||||
string user = 3;
|
||||
string name = 4;
|
||||
string hostname = 5;
|
||||
string client_version = 6;
|
||||
bool update_available = 7;
|
||||
string os = 8;
|
||||
google.protobuf.Timestamp created = 9;
|
||||
google.protobuf.Timestamp last_seen = 10;
|
||||
bool key_expiry_disabled = 11;
|
||||
google.protobuf.Timestamp expires = 12;
|
||||
bool authorized = 13;
|
||||
bool is_external = 14;
|
||||
string machine_key = 15;
|
||||
string node_key = 16;
|
||||
bool blocks_incoming_connections = 17;
|
||||
repeated string enabled_routes = 18;
|
||||
repeated string advertised_routes = 19;
|
||||
ClientConnectivity client_connectivity = 20;
|
||||
}
|
||||
|
||||
message DeleteDeviceRequest {
|
||||
string id = 1;
|
||||
}
|
||||
message DeleteDeviceRequest { string id = 1; }
|
||||
|
||||
message DeleteDeviceResponse {
|
||||
}
|
||||
message DeleteDeviceResponse {}
|
||||
|
||||
message GetDeviceRoutesRequest {
|
||||
string id = 1;
|
||||
}
|
||||
message GetDeviceRoutesRequest { string id = 1; }
|
||||
|
||||
message GetDeviceRoutesResponse {
|
||||
repeated string enabled_routes = 1;
|
||||
repeated string advertised_routes = 2;
|
||||
repeated string enabled_routes = 1;
|
||||
repeated string advertised_routes = 2;
|
||||
}
|
||||
|
||||
message EnableDeviceRoutesRequest {
|
||||
string id = 1;
|
||||
repeated string routes = 2;
|
||||
string id = 1;
|
||||
repeated string routes = 2;
|
||||
}
|
||||
|
||||
message EnableDeviceRoutesResponse {
|
||||
repeated string enabled_routes = 1;
|
||||
repeated string advertised_routes = 2;
|
||||
repeated string enabled_routes = 1;
|
||||
repeated string advertised_routes = 2;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue