grpc/accounting/accounting.proto

57 lines
996 B
Protocol Buffer
Raw Normal View History

2023-07-24 08:18:11 +00:00
syntax = "proto3";
option go_package = "./accounting";
package accounting;
// The greeting service definition.
service Accounting {
// Sends a greeting
rpc Allow (AllowRequest) returns (AllowReply) {}
rpc SetRule (SetRequest) returns (SetReply) {}
rpc AddGroup (AddGroupRequest) returns (AddGroupReply) {}
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;
}