diff --git a/pkg/nodeconfigs/node_config.go b/pkg/nodeconfigs/node_config.go index 96ccfb5..4b106bf 100644 --- a/pkg/nodeconfigs/node_config.go +++ b/pkg/nodeconfigs/node_config.go @@ -35,6 +35,7 @@ func NewServerError(serverId int64, message string) *ServerError { // NodeConfig 边缘节点配置 type NodeConfig struct { Id int64 `yaml:"id" json:"id"` + Edition string `yaml:"edition" json:"edition"` NodeId string `yaml:"nodeId" json:"nodeId"` Secret string `yaml:"secret" json:"secret"` IsOn bool `yaml:"isOn" json:"isOn"` diff --git a/pkg/rpc/pb/service_authority_key.pb.go b/pkg/rpc/pb/service_authority_key.pb.go index 2a3fbb1..e494067 100644 --- a/pkg/rpc/pb/service_authority_key.pb.go +++ b/pkg/rpc/pb/service_authority_key.pb.go @@ -345,6 +345,100 @@ func (x *ValidateAuthorityKeyResponse) GetError() string { return "" } +// 检查版本信息 +type CheckAuthorityRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *CheckAuthorityRequest) Reset() { + *x = CheckAuthorityRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_service_authority_key_proto_msgTypes[6] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckAuthorityRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckAuthorityRequest) ProtoMessage() {} + +func (x *CheckAuthorityRequest) ProtoReflect() protoreflect.Message { + mi := &file_service_authority_key_proto_msgTypes[6] + 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 CheckAuthorityRequest.ProtoReflect.Descriptor instead. +func (*CheckAuthorityRequest) Descriptor() ([]byte, []int) { + return file_service_authority_key_proto_rawDescGZIP(), []int{6} +} + +type CheckAuthorityResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + IsPlus bool `protobuf:"varint,1,opt,name=isPlus,proto3" json:"isPlus,omitempty"` + Edition string `protobuf:"bytes,2,opt,name=edition,proto3" json:"edition,omitempty"` +} + +func (x *CheckAuthorityResponse) Reset() { + *x = CheckAuthorityResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_service_authority_key_proto_msgTypes[7] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *CheckAuthorityResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*CheckAuthorityResponse) ProtoMessage() {} + +func (x *CheckAuthorityResponse) ProtoReflect() protoreflect.Message { + mi := &file_service_authority_key_proto_msgTypes[7] + 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 CheckAuthorityResponse.ProtoReflect.Descriptor instead. +func (*CheckAuthorityResponse) Descriptor() ([]byte, []int) { + return file_service_authority_key_proto_rawDescGZIP(), []int{7} +} + +func (x *CheckAuthorityResponse) GetIsPlus() bool { + if x != nil { + return x.IsPlus + } + return false +} + +func (x *CheckAuthorityResponse) GetEdition() string { + if x != nil { + return x.Edition + } + return "" +} + var File_service_authority_key_proto protoreflect.FileDescriptor var file_service_authority_key_proto_rawDesc = []byte{ @@ -382,28 +476,39 @@ var file_service_authority_key_proto_rawDesc = []byte{ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x04, 0x69, 0x73, 0x4f, 0x6b, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x32, 0xc7, 0x02, 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, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, - 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x22, 0x17, 0x0a, 0x15, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4a, 0x0a, 0x16, 0x43, 0x68, 0x65, + 0x63, 0x6b, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, + 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, } var ( @@ -418,7 +523,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, 6) +var file_service_authority_key_proto_msgTypes = make([]protoimpl.MessageInfo, 8) var file_service_authority_key_proto_goTypes = []interface{}{ (*UpdateAuthorityKeyRequest)(nil), // 0: pb.UpdateAuthorityKeyRequest (*ReadAuthorityKeyRequest)(nil), // 1: pb.ReadAuthorityKeyRequest @@ -426,21 +531,25 @@ var file_service_authority_key_proto_goTypes = []interface{}{ (*ResetAuthorityKeyRequest)(nil), // 3: pb.ResetAuthorityKeyRequest (*ValidateAuthorityKeyRequest)(nil), // 4: pb.ValidateAuthorityKeyRequest (*ValidateAuthorityKeyResponse)(nil), // 5: pb.ValidateAuthorityKeyResponse - (*AuthorityKey)(nil), // 6: pb.AuthorityKey - (*RPCSuccess)(nil), // 7: pb.RPCSuccess + (*CheckAuthorityRequest)(nil), // 6: pb.CheckAuthorityRequest + (*CheckAuthorityResponse)(nil), // 7: pb.CheckAuthorityResponse + (*AuthorityKey)(nil), // 8: pb.AuthorityKey + (*RPCSuccess)(nil), // 9: pb.RPCSuccess } var file_service_authority_key_proto_depIdxs = []int32{ - 6, // 0: pb.ReadAuthorityKeyResponse.authorityKey:type_name -> pb.AuthorityKey + 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 - 7, // 5: pb.AuthorityKeyService.updateAuthorityKey:output_type -> pb.RPCSuccess - 2, // 6: pb.AuthorityKeyService.readAuthorityKey:output_type -> pb.ReadAuthorityKeyResponse - 7, // 7: pb.AuthorityKeyService.resetAuthorityKey:output_type -> pb.RPCSuccess - 5, // 8: pb.AuthorityKeyService.validateAuthorityKey:output_type -> pb.ValidateAuthorityKeyResponse - 5, // [5:9] is the sub-list for method output_type - 1, // [1:5] is the sub-list for method input_type + 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 @@ -526,6 +635,30 @@ func file_service_authority_key_proto_init() { return nil } } + file_service_authority_key_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckAuthorityRequest); 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[7].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CheckAuthorityResponse); 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{ @@ -533,7 +666,7 @@ func file_service_authority_key_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_service_authority_key_proto_rawDesc, NumEnums: 0, - NumMessages: 6, + NumMessages: 8, NumExtensions: 0, NumServices: 1, }, @@ -567,6 +700,8 @@ type AuthorityKeyServiceClient interface { ResetAuthorityKey(ctx context.Context, in *ResetAuthorityKeyRequest, opts ...grpc.CallOption) (*RPCSuccess, error) // 校验Key ValidateAuthorityKey(ctx context.Context, in *ValidateAuthorityKeyRequest, opts ...grpc.CallOption) (*ValidateAuthorityKeyResponse, error) + // 检查版本信息 + CheckAuthority(ctx context.Context, in *CheckAuthorityRequest, opts ...grpc.CallOption) (*CheckAuthorityResponse, error) } type authorityKeyServiceClient struct { @@ -613,6 +748,15 @@ func (c *authorityKeyServiceClient) ValidateAuthorityKey(ctx context.Context, in return out, nil } +func (c *authorityKeyServiceClient) CheckAuthority(ctx context.Context, in *CheckAuthorityRequest, opts ...grpc.CallOption) (*CheckAuthorityResponse, error) { + out := new(CheckAuthorityResponse) + err := c.cc.Invoke(ctx, "/pb.AuthorityKeyService/checkAuthority", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // AuthorityKeyServiceServer is the server API for AuthorityKeyService service. type AuthorityKeyServiceServer interface { // 设置Key @@ -623,6 +767,8 @@ type AuthorityKeyServiceServer interface { ResetAuthorityKey(context.Context, *ResetAuthorityKeyRequest) (*RPCSuccess, error) // 校验Key ValidateAuthorityKey(context.Context, *ValidateAuthorityKeyRequest) (*ValidateAuthorityKeyResponse, error) + // 检查版本信息 + CheckAuthority(context.Context, *CheckAuthorityRequest) (*CheckAuthorityResponse, error) } // UnimplementedAuthorityKeyServiceServer can be embedded to have forward compatible implementations. @@ -641,6 +787,9 @@ func (*UnimplementedAuthorityKeyServiceServer) ResetAuthorityKey(context.Context func (*UnimplementedAuthorityKeyServiceServer) ValidateAuthorityKey(context.Context, *ValidateAuthorityKeyRequest) (*ValidateAuthorityKeyResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method ValidateAuthorityKey not implemented") } +func (*UnimplementedAuthorityKeyServiceServer) CheckAuthority(context.Context, *CheckAuthorityRequest) (*CheckAuthorityResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CheckAuthority not implemented") +} func RegisterAuthorityKeyServiceServer(s *grpc.Server, srv AuthorityKeyServiceServer) { s.RegisterService(&_AuthorityKeyService_serviceDesc, srv) @@ -718,6 +867,24 @@ func _AuthorityKeyService_ValidateAuthorityKey_Handler(srv interface{}, ctx cont return interceptor(ctx, in, info, handler) } +func _AuthorityKeyService_CheckAuthority_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CheckAuthorityRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(AuthorityKeyServiceServer).CheckAuthority(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/pb.AuthorityKeyService/CheckAuthority", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(AuthorityKeyServiceServer).CheckAuthority(ctx, req.(*CheckAuthorityRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _AuthorityKeyService_serviceDesc = grpc.ServiceDesc{ ServiceName: "pb.AuthorityKeyService", HandlerType: (*AuthorityKeyServiceServer)(nil), @@ -738,6 +905,10 @@ var _AuthorityKeyService_serviceDesc = grpc.ServiceDesc{ MethodName: "validateAuthorityKey", Handler: _AuthorityKeyService_ValidateAuthorityKey_Handler, }, + { + MethodName: "checkAuthority", + Handler: _AuthorityKeyService_CheckAuthority_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "service_authority_key.proto", diff --git a/pkg/rpc/protos/service_authority_key.proto b/pkg/rpc/protos/service_authority_key.proto index 1cc4a6c..4833591 100644 --- a/pkg/rpc/protos/service_authority_key.proto +++ b/pkg/rpc/protos/service_authority_key.proto @@ -19,6 +19,9 @@ service AuthorityKeyService { // 校验Key rpc validateAuthorityKey(ValidateAuthorityKeyRequest) returns (ValidateAuthorityKeyResponse); + + // 检查版本信息 + rpc checkAuthority(CheckAuthorityRequest) returns (CheckAuthorityResponse); } // 设置Key @@ -53,4 +56,14 @@ message ValidateAuthorityKeyRequest { message ValidateAuthorityKeyResponse { bool isOk = 1; string error = 2; +} + +// 检查版本信息 +message CheckAuthorityRequest { + +} + +message CheckAuthorityResponse { + bool isPlus = 1; + string edition = 2; } \ No newline at end of file