2021-11-04 23:02:10 +01:00
|
|
|
syntax = "proto3";
|
|
|
|
package headscale.v1;
|
|
|
|
option go_package = "github.com/juanfont/headscale/gen/go/v1";
|
|
|
|
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
import "headscale/v1/namespace.proto";
|
|
|
|
import "headscale/v1/preauthkey.proto";
|
|
|
|
|
|
|
|
enum RegisterMethod {
|
|
|
|
REGISTER_METHOD_UNSPECIFIED = 0;
|
|
|
|
REGISTER_METHOD_AUTH_KEY = 1;
|
|
|
|
REGISTER_METHOD_CLI = 2;
|
|
|
|
REGISTER_METHOD_OIDC = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Machine {
|
2022-01-25 23:11:15 +01:00
|
|
|
uint64 id = 1;
|
|
|
|
string machine_key = 2;
|
|
|
|
string node_key = 3;
|
|
|
|
string disco_key = 4;
|
|
|
|
repeated string ip_addresses = 5;
|
|
|
|
string name = 6;
|
|
|
|
Namespace namespace = 7;
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2022-02-28 23:21:06 +01:00
|
|
|
google.protobuf.Timestamp last_seen = 8;
|
|
|
|
google.protobuf.Timestamp last_successful_update = 9;
|
|
|
|
google.protobuf.Timestamp expiry = 10;
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2022-02-28 23:21:06 +01:00
|
|
|
PreAuthKey pre_auth_key = 11;
|
2021-11-04 23:02:10 +01:00
|
|
|
|
2022-02-28 23:21:06 +01:00
|
|
|
google.protobuf.Timestamp created_at = 12;
|
|
|
|
|
|
|
|
RegisterMethod register_method = 13;
|
2022-04-15 13:11:41 +02:00
|
|
|
|
2022-04-16 11:30:51 +02:00
|
|
|
reserved 14 to 17;
|
2021-11-04 23:02:10 +01:00
|
|
|
// google.protobuf.Timestamp updated_at = 14;
|
|
|
|
// google.protobuf.Timestamp deleted_at = 15;
|
|
|
|
|
|
|
|
// bytes host_info = 15;
|
|
|
|
// bytes endpoints = 16;
|
|
|
|
// bytes enabled_routes = 17;
|
2022-03-13 22:03:20 +01:00
|
|
|
|
2022-04-25 22:27:44 +02:00
|
|
|
repeated string forced_tags = 18;
|
2022-04-16 11:30:51 +02:00
|
|
|
repeated string invalid_tags = 19;
|
2022-04-25 22:27:44 +02:00
|
|
|
repeated string valid_tags = 20;
|
2022-05-16 21:41:46 +02:00
|
|
|
string given_name = 21;
|
2021-11-04 23:02:10 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message RegisterMachineRequest {
|
|
|
|
string namespace = 1;
|
|
|
|
string key = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message RegisterMachineResponse {
|
|
|
|
Machine machine = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetMachineRequest {
|
|
|
|
uint64 machine_id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message GetMachineResponse {
|
|
|
|
Machine machine = 1;
|
|
|
|
}
|
|
|
|
|
2022-04-25 20:45:07 +02:00
|
|
|
message SetTagsRequest {
|
2022-04-25 22:27:44 +02:00
|
|
|
uint64 machine_id = 1;
|
|
|
|
repeated string tags = 2;
|
2022-04-15 13:11:41 +02:00
|
|
|
}
|
|
|
|
|
2022-04-25 20:45:07 +02:00
|
|
|
message SetTagsResponse {
|
2022-04-15 13:11:41 +02:00
|
|
|
Machine machine = 1;
|
|
|
|
}
|
|
|
|
|
2021-11-04 23:02:10 +01:00
|
|
|
message DeleteMachineRequest {
|
|
|
|
uint64 machine_id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DeleteMachineResponse {
|
|
|
|
}
|
|
|
|
|
2021-11-21 14:40:04 +01:00
|
|
|
message ExpireMachineRequest {
|
|
|
|
uint64 machine_id = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ExpireMachineResponse {
|
|
|
|
Machine machine = 1;
|
|
|
|
}
|
|
|
|
|
2022-03-13 22:03:20 +01:00
|
|
|
message RenameMachineRequest {
|
|
|
|
uint64 machine_id = 1;
|
2022-05-16 21:41:46 +02:00
|
|
|
string new_name = 2;
|
2022-03-13 22:03:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
message RenameMachineResponse {
|
|
|
|
Machine machine = 1;
|
|
|
|
}
|
|
|
|
|
2021-11-04 23:02:10 +01:00
|
|
|
message ListMachinesRequest {
|
|
|
|
string namespace = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message ListMachinesResponse {
|
|
|
|
repeated Machine machines = 1;
|
|
|
|
}
|
|
|
|
|
2022-05-01 15:34:40 +02:00
|
|
|
message MoveMachineRequest {
|
|
|
|
uint64 machine_id = 1;
|
|
|
|
string namespace = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message MoveMachineResponse {
|
|
|
|
Machine machine = 1;
|
|
|
|
}
|
|
|
|
|
2021-11-04 23:02:10 +01:00
|
|
|
message DebugCreateMachineRequest {
|
|
|
|
string namespace = 1;
|
|
|
|
string key = 2;
|
|
|
|
string name = 3;
|
|
|
|
repeated string routes = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DebugCreateMachineResponse {
|
|
|
|
Machine machine = 1;
|
|
|
|
}
|