mirror of
https://github.com/juanfont/headscale.git
synced 2025-12-04 06:35:43 -05:00
feat: implements apis for managing headscale policy (#1792)
This commit is contained in:
@@ -9,6 +9,7 @@ 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 {
|
||||
@@ -193,6 +194,22 @@ service HeadscaleService {
|
||||
}
|
||||
// --- ApiKeys end ---
|
||||
|
||||
// --- Policy start ---
|
||||
rpc GetPolicy(GetPolicyRequest) returns (GetPolicyResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/api/v1/policy"
|
||||
};
|
||||
}
|
||||
|
||||
rpc SetPolicy(SetPolicyRequest) returns (SetPolicyResponse) {
|
||||
option (google.api.http) = {
|
||||
put: "/api/v1/policy"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
// --- Policy end ---
|
||||
|
||||
|
||||
// Implement Tailscale API
|
||||
// rpc GetDevice(GetDeviceRequest) returns(GetDeviceResponse) {
|
||||
// option(google.api.http) = {
|
||||
|
||||
Reference in New Issue
Block a user