2023-07-24 08:18:11 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
option go_package = "./accounting";
|
|
|
|
package accounting;
|
|
|
|
|
|
|
|
service Accounting {
|
2023-07-24 08:27:44 +00:00
|
|
|
|
|
|
|
// Проверка доступа права
|
2023-07-24 08:18:11 +00:00
|
|
|
rpc Allow (AllowRequest) returns (AllowReply) {}
|
2023-07-24 08:27:44 +00:00
|
|
|
|
|
|
|
// Изменения значения правила для пользователя/группы
|
2023-07-24 08:18:11 +00:00
|
|
|
rpc SetRule (SetRequest) returns (SetReply) {}
|
2023-07-24 08:27:44 +00:00
|
|
|
|
|
|
|
// Присоеденение пользователя к группе
|
2023-07-24 08:18:11 +00:00
|
|
|
rpc AddGroup (AddGroupRequest) returns (AddGroupReply) {}
|
2023-07-24 08:27:44 +00:00
|
|
|
|
|
|
|
// Удаление пользователя из группы
|
2023-07-24 08:18:11 +00:00
|
|
|
rpc DelGroup (DelGroupRequest) returns (DelGroupReply) {}
|
|
|
|
}
|
|
|
|
|
|
|
|
message AllowRequest {
|
|
|
|
uint32 id = 1;
|
|
|
|
bool is_group = 2;
|
|
|
|
string rule = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AllowReply {
|
|
|
|
bool access = 1;
|
|
|
|
string error = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SetRequest {
|
|
|
|
uint32 id = 1;
|
|
|
|
bool is_group = 2;
|
|
|
|
string rule = 3;
|
|
|
|
int32 val = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message SetReply {
|
|
|
|
bool success = 1;
|
|
|
|
string error = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AddGroupRequest {
|
|
|
|
uint32 id = 1;
|
|
|
|
bool is_group = 2;
|
|
|
|
uint32 group_id = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message AddGroupReply {
|
|
|
|
bool success = 1;
|
|
|
|
string error = 2;
|
|
|
|
}
|
|
|
|
message DelGroupRequest {
|
|
|
|
uint32 id = 1;
|
|
|
|
bool is_group = 2;
|
|
|
|
uint32 group_id = 3;
|
|
|
|
}
|
|
|
|
|
|
|
|
message DelGroupReply {
|
|
|
|
bool success = 1;
|
|
|
|
string error = 2;
|
|
|
|
}
|