mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-10 04:00:24 +08:00
阶段性提交
This commit is contained in:
81
internal/rpc/protos/service_node_grant.proto
Normal file
81
internal/rpc/protos/service_node_grant.proto
Normal file
@@ -0,0 +1,81 @@
|
||||
syntax = "proto3";
|
||||
option go_package = "./pb";
|
||||
|
||||
package pb;
|
||||
import "model_node_grant.proto";
|
||||
|
||||
service NodeGrantService {
|
||||
// 创建认证
|
||||
rpc createNodeGrant (CreateNodeGrantRequest) returns (CreateNodeGrantResponse);
|
||||
|
||||
// 修改认证
|
||||
rpc updateNodeGrant (UpdateNodeGrantRequest) returns (UpdateNodeGrantResponse);
|
||||
|
||||
// 禁用认证
|
||||
rpc disableNodeGrant (DisableNodeGrantRequest) returns (DisableNodeGrantResponse);
|
||||
|
||||
// 计算认证的数量
|
||||
rpc countAllEnabledNodeGrants (CountAllEnabledNodeGrantsRequest) returns (CountAllEnabledNodeGrantsResponse);
|
||||
|
||||
// 列出所有认证
|
||||
rpc ListEnabledNodeGrants (ListEnabledNodeGrantsRequest) returns (ListEnabledNodeGrantsResponse);
|
||||
}
|
||||
|
||||
// 创建节点认证
|
||||
message CreateNodeGrantRequest {
|
||||
string name = 1;
|
||||
string method = 2;
|
||||
string username = 3;
|
||||
string password = 4;
|
||||
string privateKey = 5;
|
||||
string description = 6;
|
||||
int64 nodeId = 7;
|
||||
}
|
||||
|
||||
message CreateNodeGrantResponse {
|
||||
int64 grantId = 1;
|
||||
}
|
||||
|
||||
// 修改节点认证
|
||||
message UpdateNodeGrantRequest {
|
||||
int64 grantId = 8;
|
||||
string name = 1;
|
||||
string method = 2;
|
||||
string username = 3;
|
||||
string password = 4;
|
||||
string privateKey = 5;
|
||||
string description = 6;
|
||||
int64 nodeId = 7;
|
||||
}
|
||||
|
||||
message UpdateNodeGrantResponse {
|
||||
|
||||
}
|
||||
|
||||
// 禁用节点认证
|
||||
message DisableNodeGrantRequest {
|
||||
int64 grantId = 1;
|
||||
}
|
||||
|
||||
message DisableNodeGrantResponse {
|
||||
|
||||
}
|
||||
|
||||
// 计算节点认证数量
|
||||
message CountAllEnabledNodeGrantsRequest {
|
||||
|
||||
}
|
||||
|
||||
message CountAllEnabledNodeGrantsResponse {
|
||||
int64 count = 1;
|
||||
}
|
||||
|
||||
// 列出所有认证
|
||||
message ListEnabledNodeGrantsRequest {
|
||||
int64 offset = 1;
|
||||
int64 size = 2;
|
||||
}
|
||||
|
||||
message ListEnabledNodeGrantsResponse {
|
||||
repeated NodeGrant grants = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user