1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00
juanfont.headscale/proto/headscale/v1/node.proto

137 lines
2.6 KiB
Protocol Buffer
Raw Normal View History

syntax = "proto3";
package headscale.v1;
import "google/protobuf/timestamp.proto";
import "headscale/v1/preauthkey.proto";
import "headscale/v1/user.proto";
option go_package = "github.com/juanfont/headscale/gen/go/v1";
enum RegisterMethod {
REGISTER_METHOD_UNSPECIFIED = 0;
REGISTER_METHOD_AUTH_KEY = 1;
REGISTER_METHOD_CLI = 2;
REGISTER_METHOD_OIDC = 3;
}
2023-09-24 13:42:05 +02:00
message Node {
// 9: removal of last_successful_update
reserved 9;
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;
User user = 7;
google.protobuf.Timestamp last_seen = 8;
google.protobuf.Timestamp expiry = 10;
2022-02-28 23:21:06 +01:00
PreAuthKey pre_auth_key = 11;
2022-02-28 23:21:06 +01:00
google.protobuf.Timestamp created_at = 12;
RegisterMethod register_method = 13;
reserved 14 to 17;
// 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;
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;
bool online = 22;
}
2023-09-24 13:42:05 +02:00
message RegisterNodeRequest {
string user = 1;
string key = 2;
}
2023-09-24 13:42:05 +02:00
message RegisterNodeResponse {
Node node = 1;
}
2023-09-24 13:42:05 +02:00
message GetNodeRequest {
uint64 node_id = 1;
}
2023-09-24 13:42:05 +02:00
message GetNodeResponse {
Node node = 1;
}
message SetTagsRequest {
2023-09-24 13:42:05 +02:00
uint64 node_id = 1;
repeated string tags = 2;
}
message SetTagsResponse {
2023-09-24 13:42:05 +02:00
Node node = 1;
}
2023-09-24 13:42:05 +02:00
message DeleteNodeRequest {
uint64 node_id = 1;
}
message DeleteNodeResponse {}
2023-09-24 13:42:05 +02:00
message ExpireNodeRequest {
uint64 node_id = 1;
2021-11-21 14:40:04 +01:00
}
2023-09-24 13:42:05 +02:00
message ExpireNodeResponse {
Node node = 1;
2021-11-21 14:40:04 +01:00
}
2023-09-24 13:42:05 +02:00
message RenameNodeRequest {
uint64 node_id = 1;
string new_name = 2;
2022-03-13 22:03:20 +01:00
}
2023-09-24 13:42:05 +02:00
message RenameNodeResponse {
Node node = 1;
2022-03-13 22:03:20 +01:00
}
2023-09-24 13:42:05 +02:00
message ListNodesRequest {
string user = 1;
}
2023-09-24 13:42:05 +02:00
message ListNodesResponse {
repeated Node nodes = 1;
}
2023-09-24 13:42:05 +02:00
message MoveNodeRequest {
uint64 node_id = 1;
string user = 2;
2022-05-01 15:34:40 +02:00
}
2023-09-24 13:42:05 +02:00
message MoveNodeResponse {
Node node = 1;
2022-05-01 15:34:40 +02:00
}
2023-09-24 13:42:05 +02:00
message DebugCreateNodeRequest {
string user = 1;
string key = 2;
string name = 3;
repeated string routes = 4;
}
2023-09-24 13:42:05 +02:00
message DebugCreateNodeResponse {
Node node = 1;
}
message BackfillNodeIPsRequest {
bool confirmed = 1;
}
message BackfillNodeIPsResponse {
repeated string changes = 1;
}