mirror of
https://github.com/Alexander-D-Karpov/concord.git
synced 2026-03-16 22:04:15 +03:00
81 lines
1.9 KiB
Protocol Buffer
81 lines
1.9 KiB
Protocol Buffer
syntax = "proto3";
|
|
|
|
package concord.rooms.v1;
|
|
|
|
option go_package = "github.com/Alexander-D-Karpov/concord/api/gen/go/rooms/v1;roomsv1";
|
|
|
|
import "google/api/annotations.proto";
|
|
import "google/protobuf/wrappers.proto";
|
|
import "common/v1/types.proto";
|
|
|
|
message CreateRoomRequest {
|
|
string name = 1;
|
|
string voice_server_id = 2;
|
|
string region = 3;
|
|
string description = 4;
|
|
bool is_private = 5;
|
|
}
|
|
|
|
message GetRoomRequest {
|
|
string room_id = 1;
|
|
}
|
|
|
|
message UpdateRoomRequest {
|
|
string room_id = 1;
|
|
google.protobuf.StringValue name = 2;
|
|
google.protobuf.StringValue description = 3;
|
|
google.protobuf.BoolValue is_private = 4;
|
|
}
|
|
|
|
message ListRoomsForUserRequest {}
|
|
|
|
message ListRoomsForUserResponse {
|
|
repeated concord.common.v1.Room rooms = 1;
|
|
}
|
|
|
|
message AttachVoiceServerRequest {
|
|
string room_id = 1;
|
|
string voice_server_id = 2;
|
|
}
|
|
|
|
message DeleteRoomRequest {
|
|
string room_id = 1;
|
|
}
|
|
|
|
message EmptyResponse {}
|
|
|
|
service RoomsService {
|
|
rpc CreateRoom(CreateRoomRequest) returns (concord.common.v1.Room) {
|
|
option (google.api.http) = {
|
|
post: "/v1/rooms"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc GetRoom(GetRoomRequest) returns (concord.common.v1.Room) {
|
|
option (google.api.http) = {
|
|
get: "/v1/rooms/{room_id}"
|
|
};
|
|
}
|
|
rpc UpdateRoom(UpdateRoomRequest) returns (concord.common.v1.Room) {
|
|
option (google.api.http) = {
|
|
patch: "/v1/rooms/{room_id}"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc ListRoomsForUser(ListRoomsForUserRequest) returns (ListRoomsForUserResponse) {
|
|
option (google.api.http) = {
|
|
get: "/v1/rooms"
|
|
};
|
|
}
|
|
rpc AttachVoiceServer(AttachVoiceServerRequest) returns (concord.common.v1.Room) {
|
|
option (google.api.http) = {
|
|
post: "/v1/rooms/{room_id}/voice-server"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc DeleteRoom(DeleteRoomRequest) returns (EmptyResponse) {
|
|
option (google.api.http) = {
|
|
delete: "/v1/rooms/{room_id}"
|
|
};
|
|
}
|
|
} |