mirror of
				https://github.com/TeaOSLab/EdgeCommon.git
				synced 2025-11-04 05:00:24 +08:00 
			
		
		
		
	增加读取节点数配额接口
This commit is contained in:
		@@ -439,6 +439,100 @@ func (x *CheckAuthorityResponse) GetEdition() string {
 | 
			
		||||
	return ""
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 查询授权容量
 | 
			
		||||
type FindAuthorityQuotaRequest struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindAuthorityQuotaRequest) Reset() {
 | 
			
		||||
	*x = FindAuthorityQuotaRequest{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_authority_key_proto_msgTypes[8]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindAuthorityQuotaRequest) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*FindAuthorityQuotaRequest) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *FindAuthorityQuotaRequest) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_authority_key_proto_msgTypes[8]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use FindAuthorityQuotaRequest.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*FindAuthorityQuotaRequest) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_authority_key_proto_rawDescGZIP(), []int{8}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type FindAuthorityQuotaResponse struct {
 | 
			
		||||
	state         protoimpl.MessageState
 | 
			
		||||
	sizeCache     protoimpl.SizeCache
 | 
			
		||||
	unknownFields protoimpl.UnknownFields
 | 
			
		||||
 | 
			
		||||
	MaxNodes   int32 `protobuf:"varint,1,opt,name=maxNodes,proto3" json:"maxNodes,omitempty"`     // 节点数限制
 | 
			
		||||
	CountNodes int32 `protobuf:"varint,2,opt,name=countNodes,proto3" json:"countNodes,omitempty"` // 已占用节点数
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindAuthorityQuotaResponse) Reset() {
 | 
			
		||||
	*x = FindAuthorityQuotaResponse{}
 | 
			
		||||
	if protoimpl.UnsafeEnabled {
 | 
			
		||||
		mi := &file_service_authority_key_proto_msgTypes[9]
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		ms.StoreMessageInfo(mi)
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindAuthorityQuotaResponse) String() string {
 | 
			
		||||
	return protoimpl.X.MessageStringOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (*FindAuthorityQuotaResponse) ProtoMessage() {}
 | 
			
		||||
 | 
			
		||||
func (x *FindAuthorityQuotaResponse) ProtoReflect() protoreflect.Message {
 | 
			
		||||
	mi := &file_service_authority_key_proto_msgTypes[9]
 | 
			
		||||
	if protoimpl.UnsafeEnabled && x != nil {
 | 
			
		||||
		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 | 
			
		||||
		if ms.LoadMessageInfo() == nil {
 | 
			
		||||
			ms.StoreMessageInfo(mi)
 | 
			
		||||
		}
 | 
			
		||||
		return ms
 | 
			
		||||
	}
 | 
			
		||||
	return mi.MessageOf(x)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Deprecated: Use FindAuthorityQuotaResponse.ProtoReflect.Descriptor instead.
 | 
			
		||||
func (*FindAuthorityQuotaResponse) Descriptor() ([]byte, []int) {
 | 
			
		||||
	return file_service_authority_key_proto_rawDescGZIP(), []int{9}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindAuthorityQuotaResponse) GetMaxNodes() int32 {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.MaxNodes
 | 
			
		||||
	}
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (x *FindAuthorityQuotaResponse) GetCountNodes() int32 {
 | 
			
		||||
	if x != nil {
 | 
			
		||||
		return x.CountNodes
 | 
			
		||||
	}
 | 
			
		||||
	return 0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var File_service_authority_key_proto protoreflect.FileDescriptor
 | 
			
		||||
 | 
			
		||||
var file_service_authority_key_proto_rawDesc = []byte{
 | 
			
		||||
@@ -482,33 +576,46 @@ var file_service_authority_key_proto_rawDesc = []byte{
 | 
			
		||||
	0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x50, 0x6c, 0x75, 0x73, 0x18, 0x01, 0x20,
 | 
			
		||||
	0x01, 0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x50, 0x6c, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x65,
 | 
			
		||||
	0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x64,
 | 
			
		||||
	0x69, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0x90, 0x03, 0x0a, 0x13, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
 | 
			
		||||
	0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a,
 | 
			
		||||
	0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79,
 | 
			
		||||
	0x4b, 0x65, 0x79, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41,
 | 
			
		||||
	0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
 | 
			
		||||
	0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65,
 | 
			
		||||
	0x73, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x72, 0x65, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
 | 
			
		||||
	0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x61, 0x64,
 | 
			
		||||
	0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75,
 | 
			
		||||
	0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x74,
 | 
			
		||||
	0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
 | 
			
		||||
	0x65, 0x12, 0x41, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
 | 
			
		||||
	0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x65,
 | 
			
		||||
	0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71,
 | 
			
		||||
	0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63,
 | 
			
		||||
	0x63, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x14, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65,
 | 
			
		||||
	0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x70,
 | 
			
		||||
	0x62, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
 | 
			
		||||
	0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e,
 | 
			
		||||
	0x70, 0x62, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f,
 | 
			
		||||
	0x72, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
 | 
			
		||||
	0x47, 0x0a, 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
 | 
			
		||||
	0x79, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x75, 0x74, 0x68,
 | 
			
		||||
	0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70,
 | 
			
		||||
	0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79,
 | 
			
		||||
	0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62,
 | 
			
		||||
	0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 | 
			
		||||
	0x69, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x1b, 0x0a, 0x19, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x75, 0x74,
 | 
			
		||||
	0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65,
 | 
			
		||||
	0x73, 0x74, 0x22, 0x58, 0x0a, 0x1a, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72,
 | 
			
		||||
	0x69, 0x74, 0x79, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
 | 
			
		||||
	0x12, 0x1a, 0x0a, 0x08, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x01, 0x20, 0x01,
 | 
			
		||||
	0x28, 0x05, 0x52, 0x08, 0x6d, 0x61, 0x78, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x1e, 0x0a, 0x0a,
 | 
			
		||||
	0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05,
 | 
			
		||||
	0x52, 0x0a, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x6f, 0x64, 0x65, 0x73, 0x32, 0xe5, 0x03, 0x0a,
 | 
			
		||||
	0x13, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x72,
 | 
			
		||||
	0x76, 0x69, 0x63, 0x65, 0x12, 0x43, 0x0a, 0x12, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75,
 | 
			
		||||
	0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e,
 | 
			
		||||
	0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4b,
 | 
			
		||||
	0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62, 0x2e, 0x52,
 | 
			
		||||
	0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x72, 0x65, 0x61,
 | 
			
		||||
	0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x1b, 0x2e,
 | 
			
		||||
	0x70, 0x62, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79,
 | 
			
		||||
	0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e,
 | 
			
		||||
	0x52, 0x65, 0x61, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79,
 | 
			
		||||
	0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x11, 0x72, 0x65, 0x73, 0x65,
 | 
			
		||||
	0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x12, 0x1c, 0x2e,
 | 
			
		||||
	0x70, 0x62, 0x2e, 0x52, 0x65, 0x73, 0x65, 0x74, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74,
 | 
			
		||||
	0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x0e, 0x2e, 0x70, 0x62,
 | 
			
		||||
	0x2e, 0x52, 0x50, 0x43, 0x53, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x14, 0x76,
 | 
			
		||||
	0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79,
 | 
			
		||||
	0x4b, 0x65, 0x79, 0x12, 0x1f, 0x2e, 0x70, 0x62, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74,
 | 
			
		||||
	0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71,
 | 
			
		||||
	0x75, 0x65, 0x73, 0x74, 0x1a, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61,
 | 
			
		||||
	0x74, 0x65, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x4b, 0x65, 0x79, 0x52, 0x65,
 | 
			
		||||
	0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0e, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x41,
 | 
			
		||||
	0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x12, 0x19, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68,
 | 
			
		||||
	0x65, 0x63, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x71, 0x75,
 | 
			
		||||
	0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x75,
 | 
			
		||||
	0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
 | 
			
		||||
	0x53, 0x0a, 0x12, 0x66, 0x69, 0x6e, 0x64, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79,
 | 
			
		||||
	0x51, 0x75, 0x6f, 0x74, 0x61, 0x12, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41,
 | 
			
		||||
	0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x71,
 | 
			
		||||
	0x75, 0x65, 0x73, 0x74, 0x1a, 0x1e, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x41, 0x75,
 | 
			
		||||
	0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x51, 0x75, 0x6f, 0x74, 0x61, 0x52, 0x65, 0x73, 0x70,
 | 
			
		||||
	0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72,
 | 
			
		||||
	0x6f, 0x74, 0x6f, 0x33,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var (
 | 
			
		||||
@@ -523,7 +630,7 @@ func file_service_authority_key_proto_rawDescGZIP() []byte {
 | 
			
		||||
	return file_service_authority_key_proto_rawDescData
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var file_service_authority_key_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
 | 
			
		||||
var file_service_authority_key_proto_msgTypes = make([]protoimpl.MessageInfo, 10)
 | 
			
		||||
var file_service_authority_key_proto_goTypes = []interface{}{
 | 
			
		||||
	(*UpdateAuthorityKeyRequest)(nil),    // 0: pb.UpdateAuthorityKeyRequest
 | 
			
		||||
	(*ReadAuthorityKeyRequest)(nil),      // 1: pb.ReadAuthorityKeyRequest
 | 
			
		||||
@@ -533,26 +640,30 @@ var file_service_authority_key_proto_goTypes = []interface{}{
 | 
			
		||||
	(*ValidateAuthorityKeyResponse)(nil), // 5: pb.ValidateAuthorityKeyResponse
 | 
			
		||||
	(*CheckAuthorityRequest)(nil),        // 6: pb.CheckAuthorityRequest
 | 
			
		||||
	(*CheckAuthorityResponse)(nil),       // 7: pb.CheckAuthorityResponse
 | 
			
		||||
	(*AuthorityKey)(nil),                 // 8: pb.AuthorityKey
 | 
			
		||||
	(*RPCSuccess)(nil),                   // 9: pb.RPCSuccess
 | 
			
		||||
	(*FindAuthorityQuotaRequest)(nil),    // 8: pb.FindAuthorityQuotaRequest
 | 
			
		||||
	(*FindAuthorityQuotaResponse)(nil),   // 9: pb.FindAuthorityQuotaResponse
 | 
			
		||||
	(*AuthorityKey)(nil),                 // 10: pb.AuthorityKey
 | 
			
		||||
	(*RPCSuccess)(nil),                   // 11: pb.RPCSuccess
 | 
			
		||||
}
 | 
			
		||||
var file_service_authority_key_proto_depIdxs = []int32{
 | 
			
		||||
	8, // 0: pb.ReadAuthorityKeyResponse.authorityKey:type_name -> pb.AuthorityKey
 | 
			
		||||
	0, // 1: pb.AuthorityKeyService.updateAuthorityKey:input_type -> pb.UpdateAuthorityKeyRequest
 | 
			
		||||
	1, // 2: pb.AuthorityKeyService.readAuthorityKey:input_type -> pb.ReadAuthorityKeyRequest
 | 
			
		||||
	3, // 3: pb.AuthorityKeyService.resetAuthorityKey:input_type -> pb.ResetAuthorityKeyRequest
 | 
			
		||||
	4, // 4: pb.AuthorityKeyService.validateAuthorityKey:input_type -> pb.ValidateAuthorityKeyRequest
 | 
			
		||||
	6, // 5: pb.AuthorityKeyService.checkAuthority:input_type -> pb.CheckAuthorityRequest
 | 
			
		||||
	9, // 6: pb.AuthorityKeyService.updateAuthorityKey:output_type -> pb.RPCSuccess
 | 
			
		||||
	2, // 7: pb.AuthorityKeyService.readAuthorityKey:output_type -> pb.ReadAuthorityKeyResponse
 | 
			
		||||
	9, // 8: pb.AuthorityKeyService.resetAuthorityKey:output_type -> pb.RPCSuccess
 | 
			
		||||
	5, // 9: pb.AuthorityKeyService.validateAuthorityKey:output_type -> pb.ValidateAuthorityKeyResponse
 | 
			
		||||
	7, // 10: pb.AuthorityKeyService.checkAuthority:output_type -> pb.CheckAuthorityResponse
 | 
			
		||||
	6, // [6:11] is the sub-list for method output_type
 | 
			
		||||
	1, // [1:6] is the sub-list for method input_type
 | 
			
		||||
	1, // [1:1] is the sub-list for extension type_name
 | 
			
		||||
	1, // [1:1] is the sub-list for extension extendee
 | 
			
		||||
	0, // [0:1] is the sub-list for field type_name
 | 
			
		||||
	10, // 0: pb.ReadAuthorityKeyResponse.authorityKey:type_name -> pb.AuthorityKey
 | 
			
		||||
	0,  // 1: pb.AuthorityKeyService.updateAuthorityKey:input_type -> pb.UpdateAuthorityKeyRequest
 | 
			
		||||
	1,  // 2: pb.AuthorityKeyService.readAuthorityKey:input_type -> pb.ReadAuthorityKeyRequest
 | 
			
		||||
	3,  // 3: pb.AuthorityKeyService.resetAuthorityKey:input_type -> pb.ResetAuthorityKeyRequest
 | 
			
		||||
	4,  // 4: pb.AuthorityKeyService.validateAuthorityKey:input_type -> pb.ValidateAuthorityKeyRequest
 | 
			
		||||
	6,  // 5: pb.AuthorityKeyService.checkAuthority:input_type -> pb.CheckAuthorityRequest
 | 
			
		||||
	8,  // 6: pb.AuthorityKeyService.findAuthorityQuota:input_type -> pb.FindAuthorityQuotaRequest
 | 
			
		||||
	11, // 7: pb.AuthorityKeyService.updateAuthorityKey:output_type -> pb.RPCSuccess
 | 
			
		||||
	2,  // 8: pb.AuthorityKeyService.readAuthorityKey:output_type -> pb.ReadAuthorityKeyResponse
 | 
			
		||||
	11, // 9: pb.AuthorityKeyService.resetAuthorityKey:output_type -> pb.RPCSuccess
 | 
			
		||||
	5,  // 10: pb.AuthorityKeyService.validateAuthorityKey:output_type -> pb.ValidateAuthorityKeyResponse
 | 
			
		||||
	7,  // 11: pb.AuthorityKeyService.checkAuthority:output_type -> pb.CheckAuthorityResponse
 | 
			
		||||
	9,  // 12: pb.AuthorityKeyService.findAuthorityQuota:output_type -> pb.FindAuthorityQuotaResponse
 | 
			
		||||
	7,  // [7:13] is the sub-list for method output_type
 | 
			
		||||
	1,  // [1:7] is the sub-list for method input_type
 | 
			
		||||
	1,  // [1:1] is the sub-list for extension type_name
 | 
			
		||||
	1,  // [1:1] is the sub-list for extension extendee
 | 
			
		||||
	0,  // [0:1] is the sub-list for field type_name
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func init() { file_service_authority_key_proto_init() }
 | 
			
		||||
@@ -659,6 +770,30 @@ func file_service_authority_key_proto_init() {
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_authority_key_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*FindAuthorityQuotaRequest); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
		file_service_authority_key_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
 | 
			
		||||
			switch v := v.(*FindAuthorityQuotaResponse); i {
 | 
			
		||||
			case 0:
 | 
			
		||||
				return &v.state
 | 
			
		||||
			case 1:
 | 
			
		||||
				return &v.sizeCache
 | 
			
		||||
			case 2:
 | 
			
		||||
				return &v.unknownFields
 | 
			
		||||
			default:
 | 
			
		||||
				return nil
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	type x struct{}
 | 
			
		||||
	out := protoimpl.TypeBuilder{
 | 
			
		||||
@@ -666,7 +801,7 @@ func file_service_authority_key_proto_init() {
 | 
			
		||||
			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 | 
			
		||||
			RawDescriptor: file_service_authority_key_proto_rawDesc,
 | 
			
		||||
			NumEnums:      0,
 | 
			
		||||
			NumMessages:   8,
 | 
			
		||||
			NumMessages:   10,
 | 
			
		||||
			NumExtensions: 0,
 | 
			
		||||
			NumServices:   1,
 | 
			
		||||
		},
 | 
			
		||||
@@ -702,6 +837,8 @@ type AuthorityKeyServiceClient interface {
 | 
			
		||||
	ValidateAuthorityKey(ctx context.Context, in *ValidateAuthorityKeyRequest, opts ...grpc.CallOption) (*ValidateAuthorityKeyResponse, error)
 | 
			
		||||
	// 检查版本信息
 | 
			
		||||
	CheckAuthority(ctx context.Context, in *CheckAuthorityRequest, opts ...grpc.CallOption) (*CheckAuthorityResponse, error)
 | 
			
		||||
	// 查询授权容量
 | 
			
		||||
	FindAuthorityQuota(ctx context.Context, in *FindAuthorityQuotaRequest, opts ...grpc.CallOption) (*FindAuthorityQuotaResponse, error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
type authorityKeyServiceClient struct {
 | 
			
		||||
@@ -757,6 +894,15 @@ func (c *authorityKeyServiceClient) CheckAuthority(ctx context.Context, in *Chec
 | 
			
		||||
	return out, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (c *authorityKeyServiceClient) FindAuthorityQuota(ctx context.Context, in *FindAuthorityQuotaRequest, opts ...grpc.CallOption) (*FindAuthorityQuotaResponse, error) {
 | 
			
		||||
	out := new(FindAuthorityQuotaResponse)
 | 
			
		||||
	err := c.cc.Invoke(ctx, "/pb.AuthorityKeyService/findAuthorityQuota", in, out, opts...)
 | 
			
		||||
	if err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	return out, nil
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// AuthorityKeyServiceServer is the server API for AuthorityKeyService service.
 | 
			
		||||
type AuthorityKeyServiceServer interface {
 | 
			
		||||
	// 设置Key
 | 
			
		||||
@@ -769,6 +915,8 @@ type AuthorityKeyServiceServer interface {
 | 
			
		||||
	ValidateAuthorityKey(context.Context, *ValidateAuthorityKeyRequest) (*ValidateAuthorityKeyResponse, error)
 | 
			
		||||
	// 检查版本信息
 | 
			
		||||
	CheckAuthority(context.Context, *CheckAuthorityRequest) (*CheckAuthorityResponse, error)
 | 
			
		||||
	// 查询授权容量
 | 
			
		||||
	FindAuthorityQuota(context.Context, *FindAuthorityQuotaRequest) (*FindAuthorityQuotaResponse, error)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UnimplementedAuthorityKeyServiceServer can be embedded to have forward compatible implementations.
 | 
			
		||||
@@ -790,6 +938,9 @@ func (*UnimplementedAuthorityKeyServiceServer) ValidateAuthorityKey(context.Cont
 | 
			
		||||
func (*UnimplementedAuthorityKeyServiceServer) CheckAuthority(context.Context, *CheckAuthorityRequest) (*CheckAuthorityResponse, error) {
 | 
			
		||||
	return nil, status.Errorf(codes.Unimplemented, "method CheckAuthority not implemented")
 | 
			
		||||
}
 | 
			
		||||
func (*UnimplementedAuthorityKeyServiceServer) FindAuthorityQuota(context.Context, *FindAuthorityQuotaRequest) (*FindAuthorityQuotaResponse, error) {
 | 
			
		||||
	return nil, status.Errorf(codes.Unimplemented, "method FindAuthorityQuota not implemented")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func RegisterAuthorityKeyServiceServer(s *grpc.Server, srv AuthorityKeyServiceServer) {
 | 
			
		||||
	s.RegisterService(&_AuthorityKeyService_serviceDesc, srv)
 | 
			
		||||
@@ -885,6 +1036,24 @@ func _AuthorityKeyService_CheckAuthority_Handler(srv interface{}, ctx context.Co
 | 
			
		||||
	return interceptor(ctx, in, info, handler)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func _AuthorityKeyService_FindAuthorityQuota_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 | 
			
		||||
	in := new(FindAuthorityQuotaRequest)
 | 
			
		||||
	if err := dec(in); err != nil {
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
	if interceptor == nil {
 | 
			
		||||
		return srv.(AuthorityKeyServiceServer).FindAuthorityQuota(ctx, in)
 | 
			
		||||
	}
 | 
			
		||||
	info := &grpc.UnaryServerInfo{
 | 
			
		||||
		Server:     srv,
 | 
			
		||||
		FullMethod: "/pb.AuthorityKeyService/FindAuthorityQuota",
 | 
			
		||||
	}
 | 
			
		||||
	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
 | 
			
		||||
		return srv.(AuthorityKeyServiceServer).FindAuthorityQuota(ctx, req.(*FindAuthorityQuotaRequest))
 | 
			
		||||
	}
 | 
			
		||||
	return interceptor(ctx, in, info, handler)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
var _AuthorityKeyService_serviceDesc = grpc.ServiceDesc{
 | 
			
		||||
	ServiceName: "pb.AuthorityKeyService",
 | 
			
		||||
	HandlerType: (*AuthorityKeyServiceServer)(nil),
 | 
			
		||||
@@ -909,6 +1078,10 @@ var _AuthorityKeyService_serviceDesc = grpc.ServiceDesc{
 | 
			
		||||
			MethodName: "checkAuthority",
 | 
			
		||||
			Handler:    _AuthorityKeyService_CheckAuthority_Handler,
 | 
			
		||||
		},
 | 
			
		||||
		{
 | 
			
		||||
			MethodName: "findAuthorityQuota",
 | 
			
		||||
			Handler:    _AuthorityKeyService_FindAuthorityQuota_Handler,
 | 
			
		||||
		},
 | 
			
		||||
	},
 | 
			
		||||
	Streams:  []grpc.StreamDesc{},
 | 
			
		||||
	Metadata: "service_authority_key.proto",
 | 
			
		||||
 
 | 
			
		||||
@@ -22,6 +22,9 @@ service AuthorityKeyService {
 | 
			
		||||
 | 
			
		||||
	// 检查版本信息
 | 
			
		||||
	rpc checkAuthority(CheckAuthorityRequest) returns (CheckAuthorityResponse);
 | 
			
		||||
 | 
			
		||||
	// 查询授权容量
 | 
			
		||||
	rpc findAuthorityQuota(FindAuthorityQuotaRequest) returns (FindAuthorityQuotaResponse);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 设置Key
 | 
			
		||||
@@ -66,4 +69,14 @@ message CheckAuthorityRequest {
 | 
			
		||||
message CheckAuthorityResponse {
 | 
			
		||||
	bool isPlus = 1;
 | 
			
		||||
	string edition = 2;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// 查询授权容量
 | 
			
		||||
message FindAuthorityQuotaRequest {
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
message FindAuthorityQuotaResponse {
 | 
			
		||||
	int32 maxNodes = 1; // 节点数限制
 | 
			
		||||
	int32 countNodes = 2; // 已占用节点数
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user