Add proto model for api key
This commit is contained in:
parent
70d82ea184
commit
b8e9024845
3 changed files with 65 additions and 7 deletions
35
proto/headscale/v1/apikey.proto
Normal file
35
proto/headscale/v1/apikey.proto
Normal file
|
@ -0,0 +1,35 @@
|
|||
syntax = "proto3";
|
||||
package headscale.v1;
|
||||
option go_package = "github.com/juanfont/headscale/gen/go/v1";
|
||||
|
||||
import "google/protobuf/timestamp.proto";
|
||||
|
||||
message ApiKey {
|
||||
uint64 id = 1;
|
||||
string prefix = 2;
|
||||
google.protobuf.Timestamp expiration = 3;
|
||||
google.protobuf.Timestamp created_at = 4;
|
||||
google.protobuf.Timestamp last_seen = 5;
|
||||
}
|
||||
|
||||
message CreateApiKeyRequest {
|
||||
google.protobuf.Timestamp expiration = 1;
|
||||
}
|
||||
|
||||
message CreateApiKeyResponse {
|
||||
string api_key = 1;
|
||||
}
|
||||
|
||||
message ExpireApiKeyRequest {
|
||||
string prefix = 1;
|
||||
}
|
||||
|
||||
message ExpireApiKeyResponse {
|
||||
}
|
||||
|
||||
message ListApiKeysRequest {
|
||||
}
|
||||
|
||||
message ListApiKeysResponse {
|
||||
repeated ApiKey api_keys = 1;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue