2023-01-17 17:50:52 +01:00
|
|
|
syntax = "proto3";
|
|
|
|
package headscale.v1;
|
2024-12-10 16:23:55 +01:00
|
|
|
option go_package = "github.com/juanfont/headscale/gen/go/v1";
|
2023-01-17 17:50:52 +01:00
|
|
|
|
|
|
|
import "google/protobuf/timestamp.proto";
|
|
|
|
|
|
|
|
message User {
|
2024-12-10 16:23:55 +01:00
|
|
|
uint64 id = 1;
|
|
|
|
string name = 2;
|
|
|
|
google.protobuf.Timestamp created_at = 3;
|
|
|
|
string display_name = 4;
|
|
|
|
string email = 5;
|
|
|
|
string provider_id = 6;
|
|
|
|
string provider = 7;
|
|
|
|
string profile_pic_url = 8;
|
2023-01-17 17:50:52 +01:00
|
|
|
}
|
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message CreateUserRequest { string name = 1; }
|
2023-01-17 17:50:52 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message CreateUserResponse { User user = 1; }
|
2023-01-17 17:50:52 +01:00
|
|
|
|
|
|
|
message RenameUserRequest {
|
2024-12-10 16:23:55 +01:00
|
|
|
uint64 old_id = 1;
|
|
|
|
string new_name = 2;
|
2023-01-17 17:50:52 +01:00
|
|
|
}
|
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message RenameUserResponse { User user = 1; }
|
2023-01-17 17:50:52 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message DeleteUserRequest { uint64 id = 1; }
|
2023-01-17 17:50:52 +01:00
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message DeleteUserResponse {}
|
2023-01-17 17:50:52 +01:00
|
|
|
|
|
|
|
message ListUsersRequest {
|
2024-12-10 16:23:55 +01:00
|
|
|
uint64 id = 1;
|
|
|
|
string name = 2;
|
|
|
|
string email = 3;
|
2023-01-17 17:50:52 +01:00
|
|
|
}
|
|
|
|
|
2024-12-10 16:23:55 +01:00
|
|
|
message ListUsersResponse { repeated User users = 1; }
|