1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-10-17 20:05:55 +02:00
juanfont.headscale/proto/headscale/v1/preauthkey.proto
Kristoffer Dalby a6aa6a4f7b Add proto rpc interface for cli
This commit adds proto rpc definitions for the communication needed for
the CLI interface.
This will allow us to move the rest of the CLI interface over to gRPC
and in the future allow remote access
2021-11-04 22:02:10 +00:00

44 lines
1.1 KiB
Protocol Buffer

syntax = "proto3";
package headscale.v1;
option go_package = "github.com/juanfont/headscale/gen/go/v1";
import "google/protobuf/timestamp.proto";
message PreAuthKey {
string namespace = 1;
string id = 2;
string key = 3;
bool resuable = 4;
bool ephemeral = 5;
bool used = 6;
google.protobuf.Timestamp expiration = 7;
google.protobuf.Timestamp created_at = 8;
}
message CreatePreAuthKeyRequest {
string namespace = 1;
bool resuable = 2;
bool ephemeral = 3;
google.protobuf.Timestamp expiration = 4;
}
message CreatePreAuthKeyResponse {
PreAuthKey pre_auth_key = 1;
}
message ExpirePreAuthKeyRequest {
string namespace = 1;
string key = 2;
}
message ExpirePreAuthKeyResponse {
}
message ListPreAuthKeysRequest {
string namespace = 1;
}
message ListPreAuthKeysResponse {
repeated PreAuthKey pre_auth_keys = 1;
}