DNS支持TSIG

This commit is contained in:
GoEdgeLab
2021-07-25 15:08:38 +08:00
parent 11e6e128b0
commit 2963d5b126
13 changed files with 907 additions and 149 deletions

View File

@@ -570,6 +570,109 @@ func (x *ListEnabledNSKeysResponse) GetNsKeys() []*NSKey {
return nil
}
// 根据版本列出一组密钥
type ListNSKeysAfterVersionRequest struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
Version int64 `protobuf:"varint,1,opt,name=version,proto3" json:"version,omitempty"`
Size int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size,omitempty"`
}
func (x *ListNSKeysAfterVersionRequest) Reset() {
*x = ListNSKeysAfterVersionRequest{}
if protoimpl.UnsafeEnabled {
mi := &file_service_ns_key_proto_msgTypes[9]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListNSKeysAfterVersionRequest) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListNSKeysAfterVersionRequest) ProtoMessage() {}
func (x *ListNSKeysAfterVersionRequest) ProtoReflect() protoreflect.Message {
mi := &file_service_ns_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 ListNSKeysAfterVersionRequest.ProtoReflect.Descriptor instead.
func (*ListNSKeysAfterVersionRequest) Descriptor() ([]byte, []int) {
return file_service_ns_key_proto_rawDescGZIP(), []int{9}
}
func (x *ListNSKeysAfterVersionRequest) GetVersion() int64 {
if x != nil {
return x.Version
}
return 0
}
func (x *ListNSKeysAfterVersionRequest) GetSize() int64 {
if x != nil {
return x.Size
}
return 0
}
type ListNSKeysAfterVersionResponse struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
unknownFields protoimpl.UnknownFields
NsKeys []*NSKey `protobuf:"bytes,1,rep,name=nsKeys,proto3" json:"nsKeys,omitempty"`
}
func (x *ListNSKeysAfterVersionResponse) Reset() {
*x = ListNSKeysAfterVersionResponse{}
if protoimpl.UnsafeEnabled {
mi := &file_service_ns_key_proto_msgTypes[10]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
}
func (x *ListNSKeysAfterVersionResponse) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*ListNSKeysAfterVersionResponse) ProtoMessage() {}
func (x *ListNSKeysAfterVersionResponse) ProtoReflect() protoreflect.Message {
mi := &file_service_ns_key_proto_msgTypes[10]
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 ListNSKeysAfterVersionResponse.ProtoReflect.Descriptor instead.
func (*ListNSKeysAfterVersionResponse) Descriptor() ([]byte, []int) {
return file_service_ns_key_proto_rawDescGZIP(), []int{10}
}
func (x *ListNSKeysAfterVersionResponse) GetNsKeys() []*NSKey {
if x != nil {
return x.NsKeys
}
return nil
}
var File_service_ns_key_proto protoreflect.FileDescriptor
var file_service_ns_key_proto_rawDesc = []byte{
@@ -630,35 +733,51 @@ var file_service_ns_key_proto_rawDesc = []byte{
0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x4b, 0x65, 0x79,
0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a, 0x06, 0x6e, 0x73, 0x4b,
0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e, 0x70, 0x62, 0x2e, 0x4e,
0x53, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x6e, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x32, 0xae, 0x03, 0x0a,
0x0c, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x3e, 0x0a,
0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x2e, 0x70,
0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71,
0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
0x4e, 0x53, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a,
0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x2e, 0x70,
0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 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, 0x35, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e, 0x53,
0x4b, 0x65, 0x79, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4e,
0x53, 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, 0x66,
0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x12,
0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64,
0x4e, 0x53, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x70,
0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x4b,
0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f, 0x0a, 0x15, 0x63, 0x6f,
0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x4b,
0x65, 0x79, 0x73, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c,
0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65,
0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52, 0x50, 0x43, 0x43, 0x6f,
0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x11, 0x6c,
0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x73,
0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1d,
0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e,
0x53, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x06, 0x5a,
0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
0x53, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x6e, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x22, 0x4d, 0x0a, 0x1d,
0x4c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x56,
0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x18, 0x0a,
0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07,
0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x18,
0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x04, 0x73, 0x69, 0x7a, 0x65, 0x22, 0x43, 0x0a, 0x1e, 0x4c,
0x69, 0x73, 0x74, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72, 0x56, 0x65,
0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x21, 0x0a,
0x06, 0x6e, 0x73, 0x4b, 0x65, 0x79, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x09, 0x2e,
0x70, 0x62, 0x2e, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x52, 0x06, 0x6e, 0x73, 0x4b, 0x65, 0x79, 0x73,
0x32, 0x8f, 0x04, 0x0a, 0x0c, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
0x65, 0x12, 0x3e, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x4b, 0x65, 0x79,
0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x4b, 0x65,
0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x72,
0x65, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x35, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 0x4b, 0x65, 0x79,
0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4e, 0x53, 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, 0x35, 0x0a, 0x0b, 0x64, 0x65, 0x6c, 0x65,
0x74, 0x65, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x12, 0x16, 0x2e, 0x70, 0x62, 0x2e, 0x44, 0x65, 0x6c,
0x65, 0x74, 0x65, 0x4e, 0x53, 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, 0x66, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53,
0x4b, 0x65, 0x79, 0x12, 0x1b, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61,
0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
0x1a, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4f,
0x0a, 0x15, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65,
0x64, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x73, 0x12, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x43, 0x6f, 0x75,
0x6e, 0x74, 0x41, 0x6c, 0x6c, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x4b, 0x65,
0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x70, 0x62, 0x2e, 0x52,
0x50, 0x43, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
0x50, 0x0a, 0x11, 0x6c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53,
0x4b, 0x65, 0x79, 0x73, 0x12, 0x1c, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e,
0x61, 0x62, 0x6c, 0x65, 0x64, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
0x73, 0x74, 0x1a, 0x1d, 0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x45, 0x6e, 0x61, 0x62,
0x6c, 0x65, 0x64, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
0x65, 0x12, 0x5f, 0x0a, 0x16, 0x6c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x73, 0x41,
0x66, 0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x70, 0x62,
0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x73, 0x41, 0x66, 0x74, 0x65, 0x72,
0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22,
0x2e, 0x70, 0x62, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4e, 0x53, 0x4b, 0x65, 0x79, 0x73, 0x41, 0x66,
0x74, 0x65, 0x72, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 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 (
@@ -673,41 +792,46 @@ func file_service_ns_key_proto_rawDescGZIP() []byte {
return file_service_ns_key_proto_rawDescData
}
var file_service_ns_key_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
var file_service_ns_key_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
var file_service_ns_key_proto_goTypes = []interface{}{
(*CreateNSKeyRequest)(nil), // 0: pb.CreateNSKeyRequest
(*CreateNSKeyResponse)(nil), // 1: pb.CreateNSKeyResponse
(*UpdateNSKeyRequest)(nil), // 2: pb.UpdateNSKeyRequest
(*DeleteNSKeyRequest)(nil), // 3: pb.DeleteNSKeyRequest
(*FindEnabledNSKeyRequest)(nil), // 4: pb.FindEnabledNSKeyRequest
(*FindEnabledNSKeyResponse)(nil), // 5: pb.FindEnabledNSKeyResponse
(*CountAllEnabledNSKeysRequest)(nil), // 6: pb.CountAllEnabledNSKeysRequest
(*ListEnabledNSKeysRequest)(nil), // 7: pb.ListEnabledNSKeysRequest
(*ListEnabledNSKeysResponse)(nil), // 8: pb.ListEnabledNSKeysResponse
(*NSKey)(nil), // 9: pb.NSKey
(*RPCSuccess)(nil), // 10: pb.RPCSuccess
(*RPCCountResponse)(nil), // 11: pb.RPCCountResponse
(*CreateNSKeyRequest)(nil), // 0: pb.CreateNSKeyRequest
(*CreateNSKeyResponse)(nil), // 1: pb.CreateNSKeyResponse
(*UpdateNSKeyRequest)(nil), // 2: pb.UpdateNSKeyRequest
(*DeleteNSKeyRequest)(nil), // 3: pb.DeleteNSKeyRequest
(*FindEnabledNSKeyRequest)(nil), // 4: pb.FindEnabledNSKeyRequest
(*FindEnabledNSKeyResponse)(nil), // 5: pb.FindEnabledNSKeyResponse
(*CountAllEnabledNSKeysRequest)(nil), // 6: pb.CountAllEnabledNSKeysRequest
(*ListEnabledNSKeysRequest)(nil), // 7: pb.ListEnabledNSKeysRequest
(*ListEnabledNSKeysResponse)(nil), // 8: pb.ListEnabledNSKeysResponse
(*ListNSKeysAfterVersionRequest)(nil), // 9: pb.ListNSKeysAfterVersionRequest
(*ListNSKeysAfterVersionResponse)(nil), // 10: pb.ListNSKeysAfterVersionResponse
(*NSKey)(nil), // 11: pb.NSKey
(*RPCSuccess)(nil), // 12: pb.RPCSuccess
(*RPCCountResponse)(nil), // 13: pb.RPCCountResponse
}
var file_service_ns_key_proto_depIdxs = []int32{
9, // 0: pb.FindEnabledNSKeyResponse.nsKey:type_name -> pb.NSKey
9, // 1: pb.ListEnabledNSKeysResponse.nsKeys:type_name -> pb.NSKey
0, // 2: pb.NSKeyService.createNSKey:input_type -> pb.CreateNSKeyRequest
2, // 3: pb.NSKeyService.updateNSKey:input_type -> pb.UpdateNSKeyRequest
3, // 4: pb.NSKeyService.deleteNSKey:input_type -> pb.DeleteNSKeyRequest
4, // 5: pb.NSKeyService.findEnabledNSKey:input_type -> pb.FindEnabledNSKeyRequest
6, // 6: pb.NSKeyService.countAllEnabledNSKeys:input_type -> pb.CountAllEnabledNSKeysRequest
7, // 7: pb.NSKeyService.listEnabledNSKeys:input_type -> pb.ListEnabledNSKeysRequest
1, // 8: pb.NSKeyService.createNSKey:output_type -> pb.CreateNSKeyResponse
10, // 9: pb.NSKeyService.updateNSKey:output_type -> pb.RPCSuccess
10, // 10: pb.NSKeyService.deleteNSKey:output_type -> pb.RPCSuccess
5, // 11: pb.NSKeyService.findEnabledNSKey:output_type -> pb.FindEnabledNSKeyResponse
11, // 12: pb.NSKeyService.countAllEnabledNSKeys:output_type -> pb.RPCCountResponse
8, // 13: pb.NSKeyService.listEnabledNSKeys:output_type -> pb.ListEnabledNSKeysResponse
8, // [8:14] is the sub-list for method output_type
2, // [2:8] is the sub-list for method input_type
2, // [2:2] is the sub-list for extension type_name
2, // [2:2] is the sub-list for extension extendee
0, // [0:2] is the sub-list for field type_name
11, // 0: pb.FindEnabledNSKeyResponse.nsKey:type_name -> pb.NSKey
11, // 1: pb.ListEnabledNSKeysResponse.nsKeys:type_name -> pb.NSKey
11, // 2: pb.ListNSKeysAfterVersionResponse.nsKeys:type_name -> pb.NSKey
0, // 3: pb.NSKeyService.createNSKey:input_type -> pb.CreateNSKeyRequest
2, // 4: pb.NSKeyService.updateNSKey:input_type -> pb.UpdateNSKeyRequest
3, // 5: pb.NSKeyService.deleteNSKey:input_type -> pb.DeleteNSKeyRequest
4, // 6: pb.NSKeyService.findEnabledNSKey:input_type -> pb.FindEnabledNSKeyRequest
6, // 7: pb.NSKeyService.countAllEnabledNSKeys:input_type -> pb.CountAllEnabledNSKeysRequest
7, // 8: pb.NSKeyService.listEnabledNSKeys:input_type -> pb.ListEnabledNSKeysRequest
9, // 9: pb.NSKeyService.listNSKeysAfterVersion:input_type -> pb.ListNSKeysAfterVersionRequest
1, // 10: pb.NSKeyService.createNSKey:output_type -> pb.CreateNSKeyResponse
12, // 11: pb.NSKeyService.updateNSKey:output_type -> pb.RPCSuccess
12, // 12: pb.NSKeyService.deleteNSKey:output_type -> pb.RPCSuccess
5, // 13: pb.NSKeyService.findEnabledNSKey:output_type -> pb.FindEnabledNSKeyResponse
13, // 14: pb.NSKeyService.countAllEnabledNSKeys:output_type -> pb.RPCCountResponse
8, // 15: pb.NSKeyService.listEnabledNSKeys:output_type -> pb.ListEnabledNSKeysResponse
10, // 16: pb.NSKeyService.listNSKeysAfterVersion:output_type -> pb.ListNSKeysAfterVersionResponse
10, // [10:17] is the sub-list for method output_type
3, // [3:10] is the sub-list for method input_type
3, // [3:3] is the sub-list for extension type_name
3, // [3:3] is the sub-list for extension extendee
0, // [0:3] is the sub-list for field type_name
}
func init() { file_service_ns_key_proto_init() }
@@ -826,6 +950,30 @@ func file_service_ns_key_proto_init() {
return nil
}
}
file_service_ns_key_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListNSKeysAfterVersionRequest); i {
case 0:
return &v.state
case 1:
return &v.sizeCache
case 2:
return &v.unknownFields
default:
return nil
}
}
file_service_ns_key_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
switch v := v.(*ListNSKeysAfterVersionResponse); 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{
@@ -833,7 +981,7 @@ func file_service_ns_key_proto_init() {
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: file_service_ns_key_proto_rawDesc,
NumEnums: 0,
NumMessages: 9,
NumMessages: 11,
NumExtensions: 0,
NumServices: 1,
},
@@ -871,6 +1019,8 @@ type NSKeyServiceClient interface {
CountAllEnabledNSKeys(ctx context.Context, in *CountAllEnabledNSKeysRequest, opts ...grpc.CallOption) (*RPCCountResponse, error)
// 列出单页密钥
ListEnabledNSKeys(ctx context.Context, in *ListEnabledNSKeysRequest, opts ...grpc.CallOption) (*ListEnabledNSKeysResponse, error)
// 根据版本列出一组密钥
ListNSKeysAfterVersion(ctx context.Context, in *ListNSKeysAfterVersionRequest, opts ...grpc.CallOption) (*ListNSKeysAfterVersionResponse, error)
}
type nSKeyServiceClient struct {
@@ -935,6 +1085,15 @@ func (c *nSKeyServiceClient) ListEnabledNSKeys(ctx context.Context, in *ListEnab
return out, nil
}
func (c *nSKeyServiceClient) ListNSKeysAfterVersion(ctx context.Context, in *ListNSKeysAfterVersionRequest, opts ...grpc.CallOption) (*ListNSKeysAfterVersionResponse, error) {
out := new(ListNSKeysAfterVersionResponse)
err := c.cc.Invoke(ctx, "/pb.NSKeyService/listNSKeysAfterVersion", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// NSKeyServiceServer is the server API for NSKeyService service.
type NSKeyServiceServer interface {
// 创建密钥
@@ -949,6 +1108,8 @@ type NSKeyServiceServer interface {
CountAllEnabledNSKeys(context.Context, *CountAllEnabledNSKeysRequest) (*RPCCountResponse, error)
// 列出单页密钥
ListEnabledNSKeys(context.Context, *ListEnabledNSKeysRequest) (*ListEnabledNSKeysResponse, error)
// 根据版本列出一组密钥
ListNSKeysAfterVersion(context.Context, *ListNSKeysAfterVersionRequest) (*ListNSKeysAfterVersionResponse, error)
}
// UnimplementedNSKeyServiceServer can be embedded to have forward compatible implementations.
@@ -973,6 +1134,9 @@ func (*UnimplementedNSKeyServiceServer) CountAllEnabledNSKeys(context.Context, *
func (*UnimplementedNSKeyServiceServer) ListEnabledNSKeys(context.Context, *ListEnabledNSKeysRequest) (*ListEnabledNSKeysResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListEnabledNSKeys not implemented")
}
func (*UnimplementedNSKeyServiceServer) ListNSKeysAfterVersion(context.Context, *ListNSKeysAfterVersionRequest) (*ListNSKeysAfterVersionResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method ListNSKeysAfterVersion not implemented")
}
func RegisterNSKeyServiceServer(s *grpc.Server, srv NSKeyServiceServer) {
s.RegisterService(&_NSKeyService_serviceDesc, srv)
@@ -1086,6 +1250,24 @@ func _NSKeyService_ListEnabledNSKeys_Handler(srv interface{}, ctx context.Contex
return interceptor(ctx, in, info, handler)
}
func _NSKeyService_ListNSKeysAfterVersion_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListNSKeysAfterVersionRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(NSKeyServiceServer).ListNSKeysAfterVersion(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/pb.NSKeyService/ListNSKeysAfterVersion",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(NSKeyServiceServer).ListNSKeysAfterVersion(ctx, req.(*ListNSKeysAfterVersionRequest))
}
return interceptor(ctx, in, info, handler)
}
var _NSKeyService_serviceDesc = grpc.ServiceDesc{
ServiceName: "pb.NSKeyService",
HandlerType: (*NSKeyServiceServer)(nil),
@@ -1114,6 +1296,10 @@ var _NSKeyService_serviceDesc = grpc.ServiceDesc{
MethodName: "listEnabledNSKeys",
Handler: _NSKeyService_ListEnabledNSKeys_Handler,
},
{
MethodName: "listNSKeysAfterVersion",
Handler: _NSKeyService_ListNSKeysAfterVersion_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "service_ns_key.proto",