Files
EdgeCommon/pkg/rpc/protos/service_authority_key.proto

84 lines
1.6 KiB
Protocol Buffer
Raw Normal View History

2021-04-13 20:02:05 +08:00
syntax = "proto3";
option go_package = "./pb";
package pb;
import "models/rpc_messages.proto";
import "models/model_authority_key.proto";
// 版本认证
service AuthorityKeyService {
// 设置Key
rpc updateAuthorityKey (UpdateAuthorityKeyRequest) returns (RPCSuccess);
// 读取Key
rpc readAuthorityKey (ReadAuthorityKeyRequest) returns (ReadAuthorityKeyResponse);
// 重置Key
rpc resetAuthorityKey (ResetAuthorityKeyRequest) returns (RPCSuccess);
2021-09-16 10:34:00 +08:00
// 校验Key
rpc validateAuthorityKey(ValidateAuthorityKeyRequest) returns (ValidateAuthorityKeyResponse);
2023-03-31 12:39:48 +08:00
// 检查版本信息
rpc checkAuthority(CheckAuthorityRequest) returns (CheckAuthorityResponse);
2023-05-27 15:30:05 +08:00
// 查询授权容量
rpc findAuthorityQuota(FindAuthorityQuotaRequest) returns (FindAuthorityQuotaResponse);
2021-04-13 20:02:05 +08:00
}
// 设置Key
message UpdateAuthorityKeyRequest {
string value = 1;
string dayFrom = 2;
string dayTo = 3;
string hostname = 4;
repeated string macAddresses = 5;
2021-04-14 20:01:51 +08:00
string company = 6;
2023-11-02 17:20:16 +08:00
string requestCode = 7;
2021-04-13 20:02:05 +08:00
}
// 读取Key
message ReadAuthorityKeyRequest {
}
message ReadAuthorityKeyResponse {
AuthorityKey authorityKey = 1;
}
// 重置Key
message ResetAuthorityKeyRequest {
2021-09-16 10:34:00 +08:00
}
// 校验Key
message ValidateAuthorityKeyRequest {
string key = 1;
2023-11-02 17:20:16 +08:00
string requestCode = 2;
2021-09-16 10:34:00 +08:00
}
message ValidateAuthorityKeyResponse {
bool isOk = 1;
string error = 2;
2023-03-31 12:39:48 +08:00
}
// 检查版本信息
message CheckAuthorityRequest {
}
message CheckAuthorityResponse {
bool isPlus = 1;
string edition = 2;
2023-05-27 15:30:05 +08:00
}
// 查询授权容量
message FindAuthorityQuotaRequest {
}
message FindAuthorityQuotaResponse {
int32 maxNodes = 1; // 节点数限制
int32 countNodes = 2; // 已占用节点数
2021-04-13 20:02:05 +08:00
}