mirror of
https://github.com/Alexander-D-Karpov/concord.git
synced 2026-03-16 22:04:15 +03:00
47 lines
925 B
Protocol Buffer
47 lines
925 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package concord.admin.v1;
|
|
|
|
option go_package = "github.com/Alexander-D-Karpov/concord/api/gen/go/admin/v1;adminv1";
|
|
|
|
import "google/api/annotations.proto";
|
|
|
|
message KickRequest {
|
|
string room_id = 1;
|
|
string user_id = 2;
|
|
}
|
|
|
|
message BanRequest {
|
|
string room_id = 1;
|
|
string user_id = 2;
|
|
int64 duration_seconds = 3;
|
|
}
|
|
|
|
message MuteRequest {
|
|
string room_id = 1;
|
|
string user_id = 2;
|
|
bool muted = 3;
|
|
}
|
|
|
|
message EmptyResponse {}
|
|
|
|
service AdminService {
|
|
rpc Kick(KickRequest) returns (EmptyResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/rooms/{room_id}/kick"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc Ban(BanRequest) returns (EmptyResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/rooms/{room_id}/ban"
|
|
body: "*"
|
|
};
|
|
}
|
|
rpc Mute(MuteRequest) returns (EmptyResponse) {
|
|
option (google.api.http) = {
|
|
post: "/v1/rooms/{room_id}/mute"
|
|
body: "*"
|
|
};
|
|
}
|
|
} |