drop unused last_successful_update field from node table (#1754)
This commit is contained in:
parent
384ca03208
commit
3f162c212c
16 changed files with 387 additions and 403 deletions
|
@ -13,175 +13,175 @@ import "headscale/v1/apikey.proto";
|
|||
|
||||
service HeadscaleService {
|
||||
// --- User start ---
|
||||
rpc GetUser(GetUserRequest) returns(GetUserResponse) {
|
||||
option(google.api.http) = {
|
||||
get : "/api/v1/user/{name}"
|
||||
rpc GetUser(GetUserRequest) returns (GetUserResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/v1/user/{name}"
|
||||
};
|
||||
}
|
||||
|
||||
rpc CreateUser(CreateUserRequest) returns(CreateUserResponse) {
|
||||
option(google.api.http) = {
|
||||
post : "/api/v1/user"
|
||||
body : "*"
|
||||
rpc CreateUser(CreateUserRequest) returns (CreateUserResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/user"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
rpc RenameUser(RenameUserRequest) returns(RenameUserResponse) {
|
||||
option(google.api.http) = {
|
||||
post : "/api/v1/user/{old_name}/rename/{new_name}"
|
||||
rpc RenameUser(RenameUserRequest) returns (RenameUserResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/user/{old_name}/rename/{new_name}"
|
||||
};
|
||||
}
|
||||
|
||||
rpc DeleteUser(DeleteUserRequest) returns(DeleteUserResponse) {
|
||||
option(google.api.http) = {
|
||||
delete : "/api/v1/user/{name}"
|
||||
rpc DeleteUser(DeleteUserRequest) returns (DeleteUserResponse) {
|
||||
option (google.api.http) = {
|
||||
delete: "/api/v1/user/{name}"
|
||||
};
|
||||
}
|
||||
|
||||
rpc ListUsers(ListUsersRequest) returns(ListUsersResponse) {
|
||||
option(google.api.http) = {
|
||||
get : "/api/v1/user"
|
||||
rpc ListUsers(ListUsersRequest) returns (ListUsersResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/v1/user"
|
||||
};
|
||||
}
|
||||
// --- User end ---
|
||||
|
||||
// --- PreAuthKeys start ---
|
||||
rpc CreatePreAuthKey(CreatePreAuthKeyRequest) returns(CreatePreAuthKeyResponse) {
|
||||
option(google.api.http) = {
|
||||
post : "/api/v1/preauthkey"
|
||||
body : "*"
|
||||
rpc CreatePreAuthKey(CreatePreAuthKeyRequest) returns (CreatePreAuthKeyResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/preauthkey"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
rpc ExpirePreAuthKey(ExpirePreAuthKeyRequest) returns(ExpirePreAuthKeyResponse) {
|
||||
option(google.api.http) = {
|
||||
post : "/api/v1/preauthkey/expire"
|
||||
body : "*"
|
||||
rpc ExpirePreAuthKey(ExpirePreAuthKeyRequest) returns (ExpirePreAuthKeyResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/preauthkey/expire"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
rpc ListPreAuthKeys(ListPreAuthKeysRequest) returns(ListPreAuthKeysResponse) {
|
||||
option(google.api.http) = {
|
||||
get : "/api/v1/preauthkey"
|
||||
rpc ListPreAuthKeys(ListPreAuthKeysRequest) returns (ListPreAuthKeysResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/v1/preauthkey"
|
||||
};
|
||||
}
|
||||
// --- PreAuthKeys end ---
|
||||
|
||||
// --- Node start ---
|
||||
rpc DebugCreateNode(DebugCreateNodeRequest) returns(DebugCreateNodeResponse) {
|
||||
option(google.api.http) = {
|
||||
post : "/api/v1/debug/node"
|
||||
body : "*"
|
||||
rpc DebugCreateNode(DebugCreateNodeRequest) returns (DebugCreateNodeResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/debug/node"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
rpc GetNode(GetNodeRequest) returns(GetNodeResponse) {
|
||||
option(google.api.http) = {
|
||||
get : "/api/v1/node/{node_id}"
|
||||
rpc GetNode(GetNodeRequest) returns (GetNodeResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/v1/node/{node_id}"
|
||||
};
|
||||
}
|
||||
|
||||
rpc SetTags(SetTagsRequest) returns(SetTagsResponse) {
|
||||
option(google.api.http) = {
|
||||
post : "/api/v1/node/{node_id}/tags"
|
||||
body : "*"
|
||||
rpc SetTags(SetTagsRequest) returns (SetTagsResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/node/{node_id}/tags"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
rpc RegisterNode(RegisterNodeRequest) returns(RegisterNodeResponse) {
|
||||
option(google.api.http) = {
|
||||
post : "/api/v1/node/register"
|
||||
rpc RegisterNode(RegisterNodeRequest) returns (RegisterNodeResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/node/register"
|
||||
};
|
||||
}
|
||||
|
||||
rpc DeleteNode(DeleteNodeRequest) returns(DeleteNodeResponse) {
|
||||
option(google.api.http) = {
|
||||
delete : "/api/v1/node/{node_id}"
|
||||
rpc DeleteNode(DeleteNodeRequest) returns (DeleteNodeResponse) {
|
||||
option (google.api.http) = {
|
||||
delete: "/api/v1/node/{node_id}"
|
||||
};
|
||||
}
|
||||
|
||||
rpc ExpireNode(ExpireNodeRequest) returns(ExpireNodeResponse) {
|
||||
option(google.api.http) = {
|
||||
post : "/api/v1/node/{node_id}/expire"
|
||||
rpc ExpireNode(ExpireNodeRequest) returns (ExpireNodeResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/node/{node_id}/expire"
|
||||
};
|
||||
}
|
||||
|
||||
rpc RenameNode(RenameNodeRequest) returns(RenameNodeResponse) {
|
||||
option(google.api.http) = {
|
||||
post : "/api/v1/node/{node_id}/rename/{new_name}"
|
||||
rpc RenameNode(RenameNodeRequest) returns (RenameNodeResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/node/{node_id}/rename/{new_name}"
|
||||
};
|
||||
}
|
||||
|
||||
rpc ListNodes(ListNodesRequest) returns(ListNodesResponse) {
|
||||
option(google.api.http) = {
|
||||
get : "/api/v1/node"
|
||||
rpc ListNodes(ListNodesRequest) returns (ListNodesResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/v1/node"
|
||||
};
|
||||
}
|
||||
|
||||
rpc MoveNode(MoveNodeRequest) returns(MoveNodeResponse) {
|
||||
option(google.api.http) = {
|
||||
post : "/api/v1/node/{node_id}/user"
|
||||
rpc MoveNode(MoveNodeRequest) returns (MoveNodeResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/node/{node_id}/user"
|
||||
};
|
||||
}
|
||||
// --- Node end ---
|
||||
|
||||
// --- Route start ---
|
||||
rpc GetRoutes(GetRoutesRequest) returns(GetRoutesResponse) {
|
||||
option(google.api.http) = {
|
||||
get : "/api/v1/routes"
|
||||
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 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 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 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}"
|
||||
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) = {
|
||||
post : "/api/v1/apikey"
|
||||
body : "*"
|
||||
rpc CreateApiKey(CreateApiKeyRequest) returns (CreateApiKeyResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/apikey"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
rpc ExpireApiKey(ExpireApiKeyRequest) returns(ExpireApiKeyResponse) {
|
||||
option(google.api.http) = {
|
||||
post : "/api/v1/apikey/expire"
|
||||
body : "*"
|
||||
rpc ExpireApiKey(ExpireApiKeyRequest) returns (ExpireApiKeyResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/apikey/expire"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
rpc ListApiKeys(ListApiKeysRequest) returns(ListApiKeysResponse) {
|
||||
option(google.api.http) = {
|
||||
get : "/api/v1/apikey"
|
||||
rpc ListApiKeys(ListApiKeysRequest) returns (ListApiKeysResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/v1/apikey"
|
||||
};
|
||||
}
|
||||
|
||||
rpc DeleteApiKey(DeleteApiKeyRequest) returns(DeleteApiKeyResponse) {
|
||||
option(google.api.http) = {
|
||||
delete : "/api/v1/apikey/{prefix}"
|
||||
rpc DeleteApiKey(DeleteApiKeyRequest) returns (DeleteApiKeyResponse) {
|
||||
option (google.api.http) = {
|
||||
delete: "/api/v1/apikey/{prefix}"
|
||||
};
|
||||
}
|
||||
// --- ApiKeys end ---
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
syntax = "proto3";
|
||||
package headscale.v1;
|
||||
option go_package = "github.com/juanfont/headscale/gen/go/v1";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
import "headscale/v1/user.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;
|
||||
|
@ -14,17 +15,19 @@ enum RegisterMethod {
|
|||
}
|
||||
|
||||
message Node {
|
||||
// 9: removal of last_successful_update
|
||||
reserved 9;
|
||||
|
||||
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;
|
||||
User user = 7;
|
||||
|
||||
google.protobuf.Timestamp last_seen = 8;
|
||||
google.protobuf.Timestamp last_successful_update = 9;
|
||||
google.protobuf.Timestamp expiry = 10;
|
||||
google.protobuf.Timestamp last_seen = 8;
|
||||
google.protobuf.Timestamp expiry = 10;
|
||||
|
||||
PreAuthKey pre_auth_key = 11;
|
||||
|
||||
|
@ -49,7 +52,7 @@ message Node {
|
|||
|
||||
message RegisterNodeRequest {
|
||||
string user = 1;
|
||||
string key = 2;
|
||||
string key = 2;
|
||||
}
|
||||
|
||||
message RegisterNodeResponse {
|
||||
|
@ -66,7 +69,7 @@ message GetNodeResponse {
|
|||
|
||||
message SetTagsRequest {
|
||||
uint64 node_id = 1;
|
||||
repeated string tags = 2;
|
||||
repeated string tags = 2;
|
||||
}
|
||||
|
||||
message SetTagsResponse {
|
||||
|
@ -77,8 +80,7 @@ message DeleteNodeRequest {
|
|||
uint64 node_id = 1;
|
||||
}
|
||||
|
||||
message DeleteNodeResponse {
|
||||
}
|
||||
message DeleteNodeResponse {}
|
||||
|
||||
message ExpireNodeRequest {
|
||||
uint64 node_id = 1;
|
||||
|
@ -89,8 +91,8 @@ message ExpireNodeResponse {
|
|||
}
|
||||
|
||||
message RenameNodeRequest {
|
||||
uint64 node_id = 1;
|
||||
string new_name = 2;
|
||||
uint64 node_id = 1;
|
||||
string new_name = 2;
|
||||
}
|
||||
|
||||
message RenameNodeResponse {
|
||||
|
@ -107,7 +109,7 @@ message ListNodesResponse {
|
|||
|
||||
message MoveNodeRequest {
|
||||
uint64 node_id = 1;
|
||||
string user = 2;
|
||||
string user = 2;
|
||||
}
|
||||
|
||||
message MoveNodeResponse {
|
||||
|
@ -115,7 +117,7 @@ message MoveNodeResponse {
|
|||
}
|
||||
|
||||
message DebugCreateNodeRequest {
|
||||
string user = 1;
|
||||
string user = 1;
|
||||
string key = 2;
|
||||
string name = 3;
|
||||
repeated string routes = 4;
|
||||
|
|
|
@ -5,7 +5,7 @@ option go_package = "github.com/juanfont/headscale/gen/go/v1";
|
|||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
message PreAuthKey {
|
||||
string user = 1;
|
||||
string user = 1;
|
||||
string id = 2;
|
||||
string key = 3;
|
||||
bool reusable = 4;
|
||||
|
@ -17,7 +17,7 @@ message PreAuthKey {
|
|||
}
|
||||
|
||||
message CreatePreAuthKeyRequest {
|
||||
string user = 1;
|
||||
string user = 1;
|
||||
bool reusable = 2;
|
||||
bool ephemeral = 3;
|
||||
google.protobuf.Timestamp expiration = 4;
|
||||
|
@ -30,7 +30,7 @@ message CreatePreAuthKeyResponse {
|
|||
|
||||
message ExpirePreAuthKeyRequest {
|
||||
string user = 1;
|
||||
string key = 2;
|
||||
string key = 2;
|
||||
}
|
||||
|
||||
message ExpirePreAuthKeyResponse {
|
||||
|
|
|
@ -6,12 +6,12 @@ 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;
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue