From 0511477092dc69c37bcc9e39ab51e2d16b7d6fa1 Mon Sep 17 00:00:00 2001 From: Matthias Meidinger Date: Tue, 4 Oct 2022 13:41:38 +0200 Subject: [PATCH 1/9] Introduce Compliance Full Node Scan message --- .../sensor/compliance_nodescan.pb.go | 783 ++++++++++++++++++ .../sensor/compliance_nodescan_iservice.pb.go | 665 +++++++++++++++ .../sensor/compliance_nodescan.proto | 23 + .../sensor/compliance_nodescan_iservice.proto | 18 + 4 files changed, 1489 insertions(+) create mode 100644 generated/internalapi/sensor/compliance_nodescan.pb.go create mode 100644 generated/internalapi/sensor/compliance_nodescan_iservice.pb.go create mode 100644 proto/internalapi/sensor/compliance_nodescan.proto create mode 100644 proto/internalapi/sensor/compliance_nodescan_iservice.proto diff --git a/generated/internalapi/sensor/compliance_nodescan.pb.go b/generated/internalapi/sensor/compliance_nodescan.pb.go new file mode 100644 index 0000000000000..6b5f79522057c --- /dev/null +++ b/generated/internalapi/sensor/compliance_nodescan.pb.go @@ -0,0 +1,783 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: internalapi/sensor/compliance_nodescan.proto + +package sensor + +import ( + fmt "fmt" + _ "github.com/gogo/protobuf/gogoproto" + types "github.com/gogo/protobuf/types" + proto "github.com/golang/protobuf/proto" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +// Names and data types are designed to follow proto/storage/node.proto as close as possible +// Next tag: 5 +type FullNodeScan struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" search:"Node ID,store" sql:"pk"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" search:"Node,store"` + ScanTime *types.Timestamp `protobuf:"bytes,3,opt,name=scan_time,json=scanTime,proto3" json:"scan_time,omitempty" search:"Node Scan Time,store"` + Components []*FullNodeScanComponent `protobuf:"bytes,4,rep,name=components,proto3" json:"components,omitempty" sql:"-"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FullNodeScan) Reset() { *m = FullNodeScan{} } +func (m *FullNodeScan) String() string { return proto.CompactTextString(m) } +func (*FullNodeScan) ProtoMessage() {} +func (*FullNodeScan) Descriptor() ([]byte, []int) { + return fileDescriptor_6c2ec431e25d2b87, []int{0} +} +func (m *FullNodeScan) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FullNodeScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FullNodeScan.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FullNodeScan) XXX_Merge(src proto.Message) { + xxx_messageInfo_FullNodeScan.Merge(m, src) +} +func (m *FullNodeScan) XXX_Size() int { + return m.Size() +} +func (m *FullNodeScan) XXX_DiscardUnknown() { + xxx_messageInfo_FullNodeScan.DiscardUnknown(m) +} + +var xxx_messageInfo_FullNodeScan proto.InternalMessageInfo + +func (m *FullNodeScan) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *FullNodeScan) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *FullNodeScan) GetScanTime() *types.Timestamp { + if m != nil { + return m.ScanTime + } + return nil +} + +func (m *FullNodeScan) GetComponents() []*FullNodeScanComponent { + if m != nil { + return m.Components + } + return nil +} + +func (m *FullNodeScan) MessageClone() proto.Message { + return m.Clone() +} +func (m *FullNodeScan) Clone() *FullNodeScan { + if m == nil { + return nil + } + cloned := new(FullNodeScan) + *cloned = *m + + cloned.ScanTime = m.ScanTime.Clone() + if m.Components != nil { + cloned.Components = make([]*FullNodeScanComponent, len(m.Components)) + for idx, v := range m.Components { + cloned.Components[idx] = v.Clone() + } + } + return cloned +} + +type FullNodeScanComponent struct { + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" search:"Component,store"` + Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty" search:"Component Version,store"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FullNodeScanComponent) Reset() { *m = FullNodeScanComponent{} } +func (m *FullNodeScanComponent) String() string { return proto.CompactTextString(m) } +func (*FullNodeScanComponent) ProtoMessage() {} +func (*FullNodeScanComponent) Descriptor() ([]byte, []int) { + return fileDescriptor_6c2ec431e25d2b87, []int{1} +} +func (m *FullNodeScanComponent) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FullNodeScanComponent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FullNodeScanComponent.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FullNodeScanComponent) XXX_Merge(src proto.Message) { + xxx_messageInfo_FullNodeScanComponent.Merge(m, src) +} +func (m *FullNodeScanComponent) XXX_Size() int { + return m.Size() +} +func (m *FullNodeScanComponent) XXX_DiscardUnknown() { + xxx_messageInfo_FullNodeScanComponent.DiscardUnknown(m) +} + +var xxx_messageInfo_FullNodeScanComponent proto.InternalMessageInfo + +func (m *FullNodeScanComponent) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *FullNodeScanComponent) GetVersion() string { + if m != nil { + return m.Version + } + return "" +} + +func (m *FullNodeScanComponent) MessageClone() proto.Message { + return m.Clone() +} +func (m *FullNodeScanComponent) Clone() *FullNodeScanComponent { + if m == nil { + return nil + } + cloned := new(FullNodeScanComponent) + *cloned = *m + + return cloned +} + +func init() { + proto.RegisterType((*FullNodeScan)(nil), "sensor.FullNodeScan") + proto.RegisterType((*FullNodeScanComponent)(nil), "sensor.FullNodeScanComponent") +} + +func init() { + proto.RegisterFile("internalapi/sensor/compliance_nodescan.proto", fileDescriptor_6c2ec431e25d2b87) +} + +var fileDescriptor_6c2ec431e25d2b87 = []byte{ + // 369 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xb1, 0x4e, 0xeb, 0x30, + 0x14, 0x86, 0x6f, 0xd2, 0xaa, 0xbd, 0x75, 0xef, 0x94, 0x0b, 0x22, 0xaa, 0x68, 0x6c, 0x02, 0x43, + 0x25, 0x4a, 0x82, 0xda, 0xad, 0x03, 0x43, 0x40, 0x48, 0x30, 0x30, 0x14, 0xc4, 0xd0, 0xa5, 0x72, + 0x13, 0x13, 0x22, 0x12, 0x3b, 0xc4, 0x29, 0xef, 0xc0, 0x1b, 0xf4, 0x91, 0x18, 0x79, 0x82, 0x08, + 0x95, 0x37, 0xc8, 0x13, 0x20, 0xc7, 0x31, 0x6a, 0x05, 0x9b, 0x75, 0xf4, 0x7f, 0x47, 0xdf, 0xf9, + 0x0d, 0x86, 0x11, 0xcd, 0x49, 0x46, 0x71, 0x8c, 0xd3, 0xc8, 0xe5, 0x84, 0x72, 0x96, 0xb9, 0x3e, + 0x4b, 0xd2, 0x38, 0xc2, 0xd4, 0x27, 0x73, 0xca, 0x02, 0xc2, 0x7d, 0x4c, 0x9d, 0x34, 0x63, 0x39, + 0x33, 0x5a, 0x32, 0xd1, 0x83, 0x21, 0x63, 0x61, 0x4c, 0xdc, 0x6a, 0xba, 0x58, 0x3e, 0xb8, 0x79, + 0x94, 0x10, 0x9e, 0xe3, 0x24, 0x95, 0xc1, 0xde, 0x4e, 0xc8, 0x42, 0x56, 0x3d, 0x5d, 0xf1, 0x92, + 0x53, 0x7b, 0xa5, 0x83, 0x7f, 0x97, 0xcb, 0x38, 0xbe, 0x61, 0x01, 0xb9, 0xf5, 0x31, 0x35, 0xc6, + 0x40, 0x8f, 0x02, 0x53, 0x43, 0xda, 0xa0, 0xe3, 0x1d, 0x96, 0x05, 0x84, 0x9c, 0xe0, 0xcc, 0x7f, + 0x9c, 0xd8, 0x22, 0x81, 0xae, 0x2e, 0x86, 0x3c, 0x67, 0x19, 0xb1, 0x11, 0x7f, 0x8e, 0x27, 0x76, + 0xfa, 0x64, 0x4f, 0xf5, 0x28, 0x30, 0x8e, 0x41, 0x93, 0xe2, 0x84, 0x98, 0x7a, 0x85, 0xed, 0x95, + 0x05, 0xfc, 0xbf, 0x89, 0xd5, 0xcc, 0xb4, 0x0a, 0x19, 0x33, 0xd0, 0x11, 0xfe, 0x73, 0x21, 0x68, + 0x36, 0x90, 0x36, 0xe8, 0x8e, 0x7a, 0x8e, 0xb4, 0x77, 0x94, 0xbd, 0x73, 0xa7, 0xec, 0xbd, 0x83, + 0xb2, 0x80, 0xfd, 0x2d, 0x09, 0xe1, 0x89, 0x44, 0x40, 0xed, 0xfd, 0x2b, 0xf6, 0x89, 0x81, 0x71, + 0x0d, 0x80, 0xa8, 0x8a, 0x51, 0x42, 0x73, 0x6e, 0x36, 0x51, 0x63, 0xd0, 0x1d, 0xf5, 0x1d, 0x59, + 0x91, 0xb3, 0x79, 0xe7, 0xb9, 0x4a, 0x79, 0xdd, 0xb2, 0x80, 0xed, 0xea, 0x9a, 0x13, 0x7b, 0xba, + 0x41, 0xdb, 0xaf, 0x1a, 0xd8, 0xfd, 0x15, 0x31, 0x4e, 0xeb, 0x73, 0x65, 0x4b, 0xfb, 0x65, 0x01, + 0x4d, 0x25, 0xf8, 0x1d, 0xda, 0xbe, 0xf9, 0x0c, 0xb4, 0x5f, 0x48, 0xc6, 0x23, 0x46, 0xeb, 0x8e, + 0x8e, 0xca, 0x02, 0xa2, 0x1f, 0x10, 0xba, 0x97, 0x21, 0x05, 0x2b, 0xc8, 0x33, 0xdf, 0xd6, 0x96, + 0xf6, 0xbe, 0xb6, 0xb4, 0x8f, 0xb5, 0xa5, 0xad, 0x3e, 0xad, 0x3f, 0xb3, 0xfa, 0xdf, 0x17, 0xad, + 0xaa, 0xb2, 0xf1, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x87, 0xa9, 0x9b, 0x36, 0x02, 0x00, + 0x00, +} + +func (m *FullNodeScan) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FullNodeScan) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FullNodeScan) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Components) > 0 { + for iNdEx := len(m.Components) - 1; iNdEx >= 0; iNdEx-- { + { + size, err := m.Components[iNdEx].MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComplianceNodescan(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + } + if m.ScanTime != nil { + { + size, err := m.ScanTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComplianceNodescan(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x1a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintComplianceNodescan(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintComplianceNodescan(dAtA, i, uint64(len(m.Id))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FullNodeScanComponent) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FullNodeScanComponent) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FullNodeScanComponent) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Version) > 0 { + i -= len(m.Version) + copy(dAtA[i:], m.Version) + i = encodeVarintComplianceNodescan(dAtA, i, uint64(len(m.Version))) + i-- + dAtA[i] = 0x12 + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintComplianceNodescan(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func encodeVarintComplianceNodescan(dAtA []byte, offset int, v uint64) int { + offset -= sovComplianceNodescan(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *FullNodeScan) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovComplianceNodescan(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovComplianceNodescan(uint64(l)) + } + if m.ScanTime != nil { + l = m.ScanTime.Size() + n += 1 + l + sovComplianceNodescan(uint64(l)) + } + if len(m.Components) > 0 { + for _, e := range m.Components { + l = e.Size() + n += 1 + l + sovComplianceNodescan(uint64(l)) + } + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FullNodeScanComponent) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Name) + if l > 0 { + n += 1 + l + sovComplianceNodescan(uint64(l)) + } + l = len(m.Version) + if l > 0 { + n += 1 + l + sovComplianceNodescan(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovComplianceNodescan(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozComplianceNodescan(x uint64) (n int) { + return sovComplianceNodescan(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *FullNodeScan) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FullNodeScan: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FullNodeScan: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthComplianceNodescan + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthComplianceNodescan + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthComplianceNodescan + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthComplianceNodescan + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScanTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthComplianceNodescan + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComplianceNodescan + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ScanTime == nil { + m.ScanTime = &types.Timestamp{} + } + if err := m.ScanTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Components", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthComplianceNodescan + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComplianceNodescan + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Components = append(m.Components, &FullNodeScanComponent{}) + if err := m.Components[len(m.Components)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipComplianceNodescan(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthComplianceNodescan + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FullNodeScanComponent) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FullNodeScanComponent: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FullNodeScanComponent: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthComplianceNodescan + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthComplianceNodescan + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthComplianceNodescan + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthComplianceNodescan + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Version = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipComplianceNodescan(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthComplianceNodescan + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipComplianceNodescan(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowComplianceNodescan + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowComplianceNodescan + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowComplianceNodescan + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthComplianceNodescan + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupComplianceNodescan + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthComplianceNodescan + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthComplianceNodescan = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowComplianceNodescan = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupComplianceNodescan = fmt.Errorf("proto: unexpected end of group") +) diff --git a/generated/internalapi/sensor/compliance_nodescan_iservice.pb.go b/generated/internalapi/sensor/compliance_nodescan_iservice.pb.go new file mode 100644 index 0000000000000..7f1a9ab606516 --- /dev/null +++ b/generated/internalapi/sensor/compliance_nodescan_iservice.pb.go @@ -0,0 +1,665 @@ +// Code generated by protoc-gen-gogo. DO NOT EDIT. +// source: internalapi/sensor/compliance_nodescan_iservice.proto + +package sensor + +import ( + context "context" + fmt "fmt" + proto "github.com/golang/protobuf/proto" + grpc "google.golang.org/grpc" + codes "google.golang.org/grpc/codes" + status "google.golang.org/grpc/status" + io "io" + math "math" + math_bits "math/bits" +) + +// Reference imports to suppress errors if they are not otherwise used. +var _ = proto.Marshal +var _ = fmt.Errorf +var _ = math.Inf + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the proto package it is being compiled against. +// A compilation error at this line likely means your copy of the +// proto package needs to be updated. +const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package + +type FullNodeScanRequest struct { + Node string `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` + Msg *FullNodeScan `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FullNodeScanRequest) Reset() { *m = FullNodeScanRequest{} } +func (m *FullNodeScanRequest) String() string { return proto.CompactTextString(m) } +func (*FullNodeScanRequest) ProtoMessage() {} +func (*FullNodeScanRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_6b5f6621e041d6f5, []int{0} +} +func (m *FullNodeScanRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FullNodeScanRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FullNodeScanRequest.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FullNodeScanRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_FullNodeScanRequest.Merge(m, src) +} +func (m *FullNodeScanRequest) XXX_Size() int { + return m.Size() +} +func (m *FullNodeScanRequest) XXX_DiscardUnknown() { + xxx_messageInfo_FullNodeScanRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_FullNodeScanRequest proto.InternalMessageInfo + +func (m *FullNodeScanRequest) GetNode() string { + if m != nil { + return m.Node + } + return "" +} + +func (m *FullNodeScanRequest) GetMsg() *FullNodeScan { + if m != nil { + return m.Msg + } + return nil +} + +func (m *FullNodeScanRequest) MessageClone() proto.Message { + return m.Clone() +} +func (m *FullNodeScanRequest) Clone() *FullNodeScanRequest { + if m == nil { + return nil + } + cloned := new(FullNodeScanRequest) + *cloned = *m + + cloned.Msg = m.Msg.Clone() + return cloned +} + +type FullNodeScanResponse struct { + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *FullNodeScanResponse) Reset() { *m = FullNodeScanResponse{} } +func (m *FullNodeScanResponse) String() string { return proto.CompactTextString(m) } +func (*FullNodeScanResponse) ProtoMessage() {} +func (*FullNodeScanResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_6b5f6621e041d6f5, []int{1} +} +func (m *FullNodeScanResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *FullNodeScanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_FullNodeScanResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *FullNodeScanResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_FullNodeScanResponse.Merge(m, src) +} +func (m *FullNodeScanResponse) XXX_Size() int { + return m.Size() +} +func (m *FullNodeScanResponse) XXX_DiscardUnknown() { + xxx_messageInfo_FullNodeScanResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_FullNodeScanResponse proto.InternalMessageInfo + +func (m *FullNodeScanResponse) MessageClone() proto.Message { + return m.Clone() +} +func (m *FullNodeScanResponse) Clone() *FullNodeScanResponse { + if m == nil { + return nil + } + cloned := new(FullNodeScanResponse) + *cloned = *m + + return cloned +} + +func init() { + proto.RegisterType((*FullNodeScanRequest)(nil), "sensor.FullNodeScanRequest") + proto.RegisterType((*FullNodeScanResponse)(nil), "sensor.FullNodeScanResponse") +} + +func init() { + proto.RegisterFile("internalapi/sensor/compliance_nodescan_iservice.proto", fileDescriptor_6b5f6621e041d6f5) +} + +var fileDescriptor_6b5f6621e041d6f5 = []byte{ + // 235 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xcd, 0xcc, 0x2b, 0x49, + 0x2d, 0xca, 0x4b, 0xcc, 0x49, 0x2c, 0xc8, 0xd4, 0x2f, 0x4e, 0xcd, 0x2b, 0xce, 0x2f, 0xd2, 0x4f, + 0xce, 0xcf, 0x2d, 0xc8, 0xc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, 0x63, 0x40, 0x00, 0x00, + 0x00, 0xff, 0xff, 0x45, 0x1d, 0x5c, 0xf4, 0x65, 0x01, 0x00, 0x00, +} + +// Reference imports to suppress errors if they are not otherwise used. +var _ context.Context +var _ grpc.ClientConnInterface + +// This is a compile-time assertion to ensure that this generated file +// is compatible with the grpc package it is being compiled against. +const _ = grpc.SupportPackageIsVersion6 + +// ComplianceNodeScanServiceClient is the client API for ComplianceNodeScanService service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConnInterface.NewStream. +type ComplianceNodeScanServiceClient interface { + Communicate(ctx context.Context, opts ...grpc.CallOption) (ComplianceNodeScanService_CommunicateClient, error) +} + +type complianceNodeScanServiceClient struct { + cc grpc.ClientConnInterface +} + +func NewComplianceNodeScanServiceClient(cc grpc.ClientConnInterface) ComplianceNodeScanServiceClient { + return &complianceNodeScanServiceClient{cc} +} + +func (c *complianceNodeScanServiceClient) Communicate(ctx context.Context, opts ...grpc.CallOption) (ComplianceNodeScanService_CommunicateClient, error) { + stream, err := c.cc.NewStream(ctx, &_ComplianceNodeScanService_serviceDesc.Streams[0], "/sensor.ComplianceNodeScanService/Communicate", opts...) + if err != nil { + return nil, err + } + x := &complianceNodeScanServiceCommunicateClient{stream} + return x, nil +} + +type ComplianceNodeScanService_CommunicateClient interface { + Send(*FullNodeScanRequest) error + Recv() (*FullNodeScanResponse, error) + grpc.ClientStream +} + +type complianceNodeScanServiceCommunicateClient struct { + grpc.ClientStream +} + +func (x *complianceNodeScanServiceCommunicateClient) Send(m *FullNodeScanRequest) error { + return x.ClientStream.SendMsg(m) +} + +func (x *complianceNodeScanServiceCommunicateClient) Recv() (*FullNodeScanResponse, error) { + m := new(FullNodeScanResponse) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +// ComplianceNodeScanServiceServer is the server API for ComplianceNodeScanService service. +type ComplianceNodeScanServiceServer interface { + Communicate(ComplianceNodeScanService_CommunicateServer) error +} + +// UnimplementedComplianceNodeScanServiceServer can be embedded to have forward compatible implementations. +type UnimplementedComplianceNodeScanServiceServer struct { +} + +func (*UnimplementedComplianceNodeScanServiceServer) Communicate(srv ComplianceNodeScanService_CommunicateServer) error { + return status.Errorf(codes.Unimplemented, "method Communicate not implemented") +} + +func RegisterComplianceNodeScanServiceServer(s *grpc.Server, srv ComplianceNodeScanServiceServer) { + s.RegisterService(&_ComplianceNodeScanService_serviceDesc, srv) +} + +func _ComplianceNodeScanService_Communicate_Handler(srv interface{}, stream grpc.ServerStream) error { + return srv.(ComplianceNodeScanServiceServer).Communicate(&complianceNodeScanServiceCommunicateServer{stream}) +} + +type ComplianceNodeScanService_CommunicateServer interface { + Send(*FullNodeScanResponse) error + Recv() (*FullNodeScanRequest, error) + grpc.ServerStream +} + +type complianceNodeScanServiceCommunicateServer struct { + grpc.ServerStream +} + +func (x *complianceNodeScanServiceCommunicateServer) Send(m *FullNodeScanResponse) error { + return x.ServerStream.SendMsg(m) +} + +func (x *complianceNodeScanServiceCommunicateServer) Recv() (*FullNodeScanRequest, error) { + m := new(FullNodeScanRequest) + if err := x.ServerStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +var _ComplianceNodeScanService_serviceDesc = grpc.ServiceDesc{ + ServiceName: "sensor.ComplianceNodeScanService", + HandlerType: (*ComplianceNodeScanServiceServer)(nil), + Methods: []grpc.MethodDesc{}, + Streams: []grpc.StreamDesc{ + { + StreamName: "Communicate", + Handler: _ComplianceNodeScanService_Communicate_Handler, + ServerStreams: true, + ClientStreams: true, + }, + }, + Metadata: "internalapi/sensor/compliance_nodescan_iservice.proto", +} + +func (m *FullNodeScanRequest) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FullNodeScanRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FullNodeScanRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if m.Msg != nil { + { + size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComplianceNodescanIservice(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } + if len(m.Node) > 0 { + i -= len(m.Node) + copy(dAtA[i:], m.Node) + i = encodeVarintComplianceNodescanIservice(dAtA, i, uint64(len(m.Node))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *FullNodeScanResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *FullNodeScanResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *FullNodeScanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + return len(dAtA) - i, nil +} + +func encodeVarintComplianceNodescanIservice(dAtA []byte, offset int, v uint64) int { + offset -= sovComplianceNodescanIservice(v) + base := offset + for v >= 1<<7 { + dAtA[offset] = uint8(v&0x7f | 0x80) + v >>= 7 + offset++ + } + dAtA[offset] = uint8(v) + return base +} +func (m *FullNodeScanRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Node) + if l > 0 { + n += 1 + l + sovComplianceNodescanIservice(uint64(l)) + } + if m.Msg != nil { + l = m.Msg.Size() + n += 1 + l + sovComplianceNodescanIservice(uint64(l)) + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func (m *FullNodeScanResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + +func sovComplianceNodescanIservice(x uint64) (n int) { + return (math_bits.Len64(x|1) + 6) / 7 +} +func sozComplianceNodescanIservice(x uint64) (n int) { + return sovComplianceNodescanIservice(uint64((x << 1) ^ uint64((int64(x) >> 63)))) +} +func (m *FullNodeScanRequest) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescanIservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FullNodeScanRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FullNodeScanRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescanIservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthComplianceNodescanIservice + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthComplianceNodescanIservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Node = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescanIservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthComplianceNodescanIservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComplianceNodescanIservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Msg == nil { + m.Msg = &FullNodeScan{} + } + if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipComplianceNodescanIservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthComplianceNodescanIservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *FullNodeScanResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescanIservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: FullNodeScanResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: FullNodeScanResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipComplianceNodescanIservice(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthComplianceNodescanIservice + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func skipComplianceNodescanIservice(dAtA []byte) (n int, err error) { + l := len(dAtA) + iNdEx := 0 + depth := 0 + for iNdEx < l { + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowComplianceNodescanIservice + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= (uint64(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + wireType := int(wire & 0x7) + switch wireType { + case 0: + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowComplianceNodescanIservice + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + iNdEx++ + if dAtA[iNdEx-1] < 0x80 { + break + } + } + case 1: + iNdEx += 8 + case 2: + var length int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return 0, ErrIntOverflowComplianceNodescanIservice + } + if iNdEx >= l { + return 0, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + length |= (int(b) & 0x7F) << shift + if b < 0x80 { + break + } + } + if length < 0 { + return 0, ErrInvalidLengthComplianceNodescanIservice + } + iNdEx += length + case 3: + depth++ + case 4: + if depth == 0 { + return 0, ErrUnexpectedEndOfGroupComplianceNodescanIservice + } + depth-- + case 5: + iNdEx += 4 + default: + return 0, fmt.Errorf("proto: illegal wireType %d", wireType) + } + if iNdEx < 0 { + return 0, ErrInvalidLengthComplianceNodescanIservice + } + if depth == 0 { + return iNdEx, nil + } + } + return 0, io.ErrUnexpectedEOF +} + +var ( + ErrInvalidLengthComplianceNodescanIservice = fmt.Errorf("proto: negative length found during unmarshaling") + ErrIntOverflowComplianceNodescanIservice = fmt.Errorf("proto: integer overflow") + ErrUnexpectedEndOfGroupComplianceNodescanIservice = fmt.Errorf("proto: unexpected end of group") +) diff --git a/proto/internalapi/sensor/compliance_nodescan.proto b/proto/internalapi/sensor/compliance_nodescan.proto new file mode 100644 index 0000000000000..ac27602fccc92 --- /dev/null +++ b/proto/internalapi/sensor/compliance_nodescan.proto @@ -0,0 +1,23 @@ +syntax = "proto3"; + +option go_package = "sensor"; + +import "google/protobuf/timestamp.proto"; + +import "gogoproto/gogo.proto"; + +package sensor; + +// Names and data types are designed to follow proto/storage/node.proto as close as possible +// Next tag: 5 +message FullNodeScan { + string id = 1 [(gogoproto.moretags) = 'search:"Node ID,store" sql:"pk"']; + string name = 2 [(gogoproto.moretags) = 'search:"Node,store"']; + google.protobuf.Timestamp scan_time = 3 [(gogoproto.moretags) = 'search:"Node Scan Time,store"']; + repeated FullNodeScanComponent components = 4 [(gogoproto.moretags) = 'sql:"-"']; +} + +message FullNodeScanComponent { + string name = 1 [(gogoproto.moretags) = 'search:"Component,store"']; + string version = 2 [(gogoproto.moretags) = 'search:"Component Version,store"']; +} diff --git a/proto/internalapi/sensor/compliance_nodescan_iservice.proto b/proto/internalapi/sensor/compliance_nodescan_iservice.proto new file mode 100644 index 0000000000000..85c8260f8a6a0 --- /dev/null +++ b/proto/internalapi/sensor/compliance_nodescan_iservice.proto @@ -0,0 +1,18 @@ +syntax = "proto3"; + +option go_package = "sensor"; + +import "internalapi/sensor/compliance_nodescan.proto"; + +package sensor; + +message FullNodeScanRequest { + string node = 1; + FullNodeScan msg = 2; +} + +message FullNodeScanResponse {} + +service ComplianceNodeScanService { + rpc Communicate (stream FullNodeScanRequest) returns (stream FullNodeScanResponse); +} \ No newline at end of file From 7c3c944089c4ea5fb93b88785c4687a159bc65b1 Mon Sep 17 00:00:00 2001 From: Matthias Meidinger Date: Tue, 4 Oct 2022 13:51:53 +0200 Subject: [PATCH 2/9] Improve formatting --- proto/internalapi/sensor/compliance_nodescan.proto | 6 +++--- proto/internalapi/sensor/compliance_nodescan_iservice.proto | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/proto/internalapi/sensor/compliance_nodescan.proto b/proto/internalapi/sensor/compliance_nodescan.proto index ac27602fccc92..a017481b9cf60 100644 --- a/proto/internalapi/sensor/compliance_nodescan.proto +++ b/proto/internalapi/sensor/compliance_nodescan.proto @@ -11,9 +11,9 @@ package sensor; // Names and data types are designed to follow proto/storage/node.proto as close as possible // Next tag: 5 message FullNodeScan { - string id = 1 [(gogoproto.moretags) = 'search:"Node ID,store" sql:"pk"']; - string name = 2 [(gogoproto.moretags) = 'search:"Node,store"']; - google.protobuf.Timestamp scan_time = 3 [(gogoproto.moretags) = 'search:"Node Scan Time,store"']; + string id = 1 [(gogoproto.moretags) = 'search:"Node ID,store" sql:"pk"']; + string name = 2 [(gogoproto.moretags) = 'search:"Node,store"']; + google.protobuf.Timestamp scan_time = 3 [(gogoproto.moretags) = 'search:"Node Scan Time,store"']; repeated FullNodeScanComponent components = 4 [(gogoproto.moretags) = 'sql:"-"']; } diff --git a/proto/internalapi/sensor/compliance_nodescan_iservice.proto b/proto/internalapi/sensor/compliance_nodescan_iservice.proto index 85c8260f8a6a0..709d2f0e04e7b 100644 --- a/proto/internalapi/sensor/compliance_nodescan_iservice.proto +++ b/proto/internalapi/sensor/compliance_nodescan_iservice.proto @@ -7,12 +7,12 @@ import "internalapi/sensor/compliance_nodescan.proto"; package sensor; message FullNodeScanRequest { - string node = 1; - FullNodeScan msg = 2; + string node = 1; + FullNodeScan msg = 2; } message FullNodeScanResponse {} service ComplianceNodeScanService { rpc Communicate (stream FullNodeScanRequest) returns (stream FullNodeScanResponse); -} \ No newline at end of file +} From d10eeb92e6f0c2ecc738b360e6f7c5b9cf209365 Mon Sep 17 00:00:00 2001 From: Matthias Meidinger Date: Wed, 5 Oct 2022 11:21:33 +0200 Subject: [PATCH 3/9] Remodel message to contain the correct set of fields --- .../internalapi/sensor/compliance_nodescan.proto | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/proto/internalapi/sensor/compliance_nodescan.proto b/proto/internalapi/sensor/compliance_nodescan.proto index a017481b9cf60..9fade993256a6 100644 --- a/proto/internalapi/sensor/compliance_nodescan.proto +++ b/proto/internalapi/sensor/compliance_nodescan.proto @@ -3,21 +3,20 @@ syntax = "proto3"; option go_package = "sensor"; import "google/protobuf/timestamp.proto"; +import "scanner/api/v1/note.proto"; +import "scanner/api/v1/component.proto"; + import "gogoproto/gogo.proto"; package sensor; // Names and data types are designed to follow proto/storage/node.proto as close as possible -// Next tag: 5 +// Next tag: 7 message FullNodeScan { string id = 1 [(gogoproto.moretags) = 'search:"Node ID,store" sql:"pk"']; string name = 2 [(gogoproto.moretags) = 'search:"Node,store"']; google.protobuf.Timestamp scan_time = 3 [(gogoproto.moretags) = 'search:"Node Scan Time,store"']; - repeated FullNodeScanComponent components = 4 [(gogoproto.moretags) = 'sql:"-"']; -} - -message FullNodeScanComponent { - string name = 1 [(gogoproto.moretags) = 'search:"Component,store"']; - string version = 2 [(gogoproto.moretags) = 'search:"Component Version,store"']; -} + scannerV1.Components components = 4; + repeated scannerV1.Note notes = 5; +} \ No newline at end of file From 3b0d7c7c8a6b69c6d03de87b3bcab45c9462302d Mon Sep 17 00:00:00 2001 From: Matthias Meidinger Date: Wed, 5 Oct 2022 12:02:21 +0200 Subject: [PATCH 4/9] Add missing newline --- proto/internalapi/sensor/compliance_nodescan.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/proto/internalapi/sensor/compliance_nodescan.proto b/proto/internalapi/sensor/compliance_nodescan.proto index 9fade993256a6..64f91929b003a 100644 --- a/proto/internalapi/sensor/compliance_nodescan.proto +++ b/proto/internalapi/sensor/compliance_nodescan.proto @@ -19,4 +19,4 @@ message FullNodeScan { google.protobuf.Timestamp scan_time = 3 [(gogoproto.moretags) = 'search:"Node Scan Time,store"']; scannerV1.Components components = 4; repeated scannerV1.Note notes = 5; -} \ No newline at end of file +} From dbd1f41602d506a2350fabc6d485bb71530b7b57 Mon Sep 17 00:00:00 2001 From: Matthias Meidinger Date: Wed, 5 Oct 2022 12:08:54 +0200 Subject: [PATCH 5/9] Add updated gen proto --- .../sensor/compliance_nodescan.pb.go | 437 ++++++------------ 1 file changed, 145 insertions(+), 292 deletions(-) diff --git a/generated/internalapi/sensor/compliance_nodescan.pb.go b/generated/internalapi/sensor/compliance_nodescan.pb.go index 6b5f79522057c..e66772143a786 100644 --- a/generated/internalapi/sensor/compliance_nodescan.pb.go +++ b/generated/internalapi/sensor/compliance_nodescan.pb.go @@ -8,6 +8,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" types "github.com/gogo/protobuf/types" proto "github.com/golang/protobuf/proto" + v1 "github.com/stackrox/scanner/generated/scanner/api/v1" io "io" math "math" math_bits "math/bits" @@ -25,15 +26,16 @@ var _ = math.Inf const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package // Names and data types are designed to follow proto/storage/node.proto as close as possible -// Next tag: 5 +// Next tag: 7 type FullNodeScan struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" search:"Node ID,store" sql:"pk"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" search:"Node,store"` - ScanTime *types.Timestamp `protobuf:"bytes,3,opt,name=scan_time,json=scanTime,proto3" json:"scan_time,omitempty" search:"Node Scan Time,store"` - Components []*FullNodeScanComponent `protobuf:"bytes,4,rep,name=components,proto3" json:"components,omitempty" sql:"-"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" search:"Node ID,store" sql:"pk"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" search:"Node,store"` + ScanTime *types.Timestamp `protobuf:"bytes,3,opt,name=scan_time,json=scanTime,proto3" json:"scan_time,omitempty" search:"Node Scan Time,store"` + Components *v1.Components `protobuf:"bytes,4,opt,name=components,proto3" json:"components,omitempty"` + Notes []v1.Note `protobuf:"varint,5,rep,packed,name=notes,proto3,enum=scannerV1.Note" json:"notes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` } func (m *FullNodeScan) Reset() { *m = FullNodeScan{} } @@ -90,13 +92,20 @@ func (m *FullNodeScan) GetScanTime() *types.Timestamp { return nil } -func (m *FullNodeScan) GetComponents() []*FullNodeScanComponent { +func (m *FullNodeScan) GetComponents() *v1.Components { if m != nil { return m.Components } return nil } +func (m *FullNodeScan) GetNotes() []v1.Note { + if m != nil { + return m.Notes + } + return nil +} + func (m *FullNodeScan) MessageClone() proto.Message { return m.Clone() } @@ -108,86 +117,16 @@ func (m *FullNodeScan) Clone() *FullNodeScan { *cloned = *m cloned.ScanTime = m.ScanTime.Clone() - if m.Components != nil { - cloned.Components = make([]*FullNodeScanComponent, len(m.Components)) - for idx, v := range m.Components { - cloned.Components[idx] = v.Clone() - } + cloned.Components = m.Components.Clone() + if m.Notes != nil { + cloned.Notes = make([]v1.Note, len(m.Notes)) + copy(cloned.Notes, m.Notes) } return cloned } -type FullNodeScanComponent struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" search:"Component,store"` - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty" search:"Component Version,store"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FullNodeScanComponent) Reset() { *m = FullNodeScanComponent{} } -func (m *FullNodeScanComponent) String() string { return proto.CompactTextString(m) } -func (*FullNodeScanComponent) ProtoMessage() {} -func (*FullNodeScanComponent) Descriptor() ([]byte, []int) { - return fileDescriptor_6c2ec431e25d2b87, []int{1} -} -func (m *FullNodeScanComponent) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FullNodeScanComponent) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FullNodeScanComponent.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FullNodeScanComponent) XXX_Merge(src proto.Message) { - xxx_messageInfo_FullNodeScanComponent.Merge(m, src) -} -func (m *FullNodeScanComponent) XXX_Size() int { - return m.Size() -} -func (m *FullNodeScanComponent) XXX_DiscardUnknown() { - xxx_messageInfo_FullNodeScanComponent.DiscardUnknown(m) -} - -var xxx_messageInfo_FullNodeScanComponent proto.InternalMessageInfo - -func (m *FullNodeScanComponent) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *FullNodeScanComponent) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *FullNodeScanComponent) MessageClone() proto.Message { - return m.Clone() -} -func (m *FullNodeScanComponent) Clone() *FullNodeScanComponent { - if m == nil { - return nil - } - cloned := new(FullNodeScanComponent) - *cloned = *m - - return cloned -} - func init() { proto.RegisterType((*FullNodeScan)(nil), "sensor.FullNodeScan") - proto.RegisterType((*FullNodeScanComponent)(nil), "sensor.FullNodeScanComponent") } func init() { @@ -195,31 +134,29 @@ func init() { } var fileDescriptor_6c2ec431e25d2b87 = []byte{ - // 369 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x6c, 0x91, 0xb1, 0x4e, 0xeb, 0x30, - 0x14, 0x86, 0x6f, 0xd2, 0xaa, 0xbd, 0x75, 0xef, 0x94, 0x0b, 0x22, 0xaa, 0x68, 0x6c, 0x02, 0x43, - 0x25, 0x4a, 0x82, 0xda, 0xad, 0x03, 0x43, 0x40, 0x48, 0x30, 0x30, 0x14, 0xc4, 0xd0, 0xa5, 0x72, - 0x13, 0x13, 0x22, 0x12, 0x3b, 0xc4, 0x29, 0xef, 0xc0, 0x1b, 0xf4, 0x91, 0x18, 0x79, 0x82, 0x08, - 0x95, 0x37, 0xc8, 0x13, 0x20, 0xc7, 0x31, 0x6a, 0x05, 0x9b, 0x75, 0xf4, 0x7f, 0x47, 0xdf, 0xf9, - 0x0d, 0x86, 0x11, 0xcd, 0x49, 0x46, 0x71, 0x8c, 0xd3, 0xc8, 0xe5, 0x84, 0x72, 0x96, 0xb9, 0x3e, - 0x4b, 0xd2, 0x38, 0xc2, 0xd4, 0x27, 0x73, 0xca, 0x02, 0xc2, 0x7d, 0x4c, 0x9d, 0x34, 0x63, 0x39, - 0x33, 0x5a, 0x32, 0xd1, 0x83, 0x21, 0x63, 0x61, 0x4c, 0xdc, 0x6a, 0xba, 0x58, 0x3e, 0xb8, 0x79, - 0x94, 0x10, 0x9e, 0xe3, 0x24, 0x95, 0xc1, 0xde, 0x4e, 0xc8, 0x42, 0x56, 0x3d, 0x5d, 0xf1, 0x92, - 0x53, 0x7b, 0xa5, 0x83, 0x7f, 0x97, 0xcb, 0x38, 0xbe, 0x61, 0x01, 0xb9, 0xf5, 0x31, 0x35, 0xc6, - 0x40, 0x8f, 0x02, 0x53, 0x43, 0xda, 0xa0, 0xe3, 0x1d, 0x96, 0x05, 0x84, 0x9c, 0xe0, 0xcc, 0x7f, - 0x9c, 0xd8, 0x22, 0x81, 0xae, 0x2e, 0x86, 0x3c, 0x67, 0x19, 0xb1, 0x11, 0x7f, 0x8e, 0x27, 0x76, - 0xfa, 0x64, 0x4f, 0xf5, 0x28, 0x30, 0x8e, 0x41, 0x93, 0xe2, 0x84, 0x98, 0x7a, 0x85, 0xed, 0x95, - 0x05, 0xfc, 0xbf, 0x89, 0xd5, 0xcc, 0xb4, 0x0a, 0x19, 0x33, 0xd0, 0x11, 0xfe, 0x73, 0x21, 0x68, - 0x36, 0x90, 0x36, 0xe8, 0x8e, 0x7a, 0x8e, 0xb4, 0x77, 0x94, 0xbd, 0x73, 0xa7, 0xec, 0xbd, 0x83, - 0xb2, 0x80, 0xfd, 0x2d, 0x09, 0xe1, 0x89, 0x44, 0x40, 0xed, 0xfd, 0x2b, 0xf6, 0x89, 0x81, 0x71, - 0x0d, 0x80, 0xa8, 0x8a, 0x51, 0x42, 0x73, 0x6e, 0x36, 0x51, 0x63, 0xd0, 0x1d, 0xf5, 0x1d, 0x59, - 0x91, 0xb3, 0x79, 0xe7, 0xb9, 0x4a, 0x79, 0xdd, 0xb2, 0x80, 0xed, 0xea, 0x9a, 0x13, 0x7b, 0xba, - 0x41, 0xdb, 0xaf, 0x1a, 0xd8, 0xfd, 0x15, 0x31, 0x4e, 0xeb, 0x73, 0x65, 0x4b, 0xfb, 0x65, 0x01, - 0x4d, 0x25, 0xf8, 0x1d, 0xda, 0xbe, 0xf9, 0x0c, 0xb4, 0x5f, 0x48, 0xc6, 0x23, 0x46, 0xeb, 0x8e, - 0x8e, 0xca, 0x02, 0xa2, 0x1f, 0x10, 0xba, 0x97, 0x21, 0x05, 0x2b, 0xc8, 0x33, 0xdf, 0xd6, 0x96, - 0xf6, 0xbe, 0xb6, 0xb4, 0x8f, 0xb5, 0xa5, 0xad, 0x3e, 0xad, 0x3f, 0xb3, 0xfa, 0xdf, 0x17, 0xad, - 0xaa, 0xb2, 0xf1, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x87, 0xa9, 0x9b, 0x36, 0x02, 0x00, - 0x00, + // 352 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x51, 0xcd, 0x4a, 0xeb, 0x40, + 0x14, 0xbe, 0x49, 0x7f, 0xb8, 0x9d, 0x7b, 0x51, 0x88, 0x8a, 0xb1, 0x60, 0x12, 0x23, 0x42, 0xc1, + 0x92, 0xa1, 0x2d, 0x6e, 0xba, 0xac, 0x22, 0xb8, 0xe9, 0x22, 0x8a, 0x8b, 0x6e, 0xca, 0x34, 0x39, + 0xc6, 0x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, 0x92, 0x31, 0x21, 0x2d, 0x15, 0x75, 0xaa, + 0xba, 0x99, 0x35, 0x47, 0xeb, 0xfc, 0xeb, 0xb7, 0xbd, 0xb2, 0xb8, 0xb7, 0x2e, 0xee, 0xdd, 0xad, + 0x8b, 0x8f, 0x4e, 0x56, 0x0b, 0xfb, 0xf8, 0x47, 0x08, 0x95, 0xd3, 0x51, 0x84, 0xb5, 0xef, 0x5f, + 0xe5, 0xa7, 0x16, 0xc6, 0x05, 0x21, 0x9b, 0xde, 0xc2, 0xac, 0x17, 0xe6, 0x07, 0x5e, 0x75, 0x99, + 0xfb, 0x9e, 0x77, 0xb9, 0x01, 0xfd, 0x2d, 0xa2, 0x71, 0x46, 0x1a, 0xea, 0x92, 0xc2, 0x6c, 0x38, + 0xb5, 0xce, 0x4e, 0x7f, 0x77, 0x4b, 0x31, 0x46, 0x09, 0x7e, 0x89, 0x8e, 0xcc, 0xf7, 0xa5, 0xa5, + 0x7d, 0x2c, 0x2d, 0xed, 0x73, 0x69, 0x69, 0xaf, 0x5f, 0xd6, 0x9f, 0x49, 0xf5, 0x71, 0xb3, 0x66, + 0x11, 0x7c, 0xf0, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xab, 0x3b, 0x3f, 0xf7, 0x01, 0x00, 0x00, } func (m *FullNodeScan) Marshal() (dAtA []byte, err error) { @@ -246,19 +183,35 @@ func (m *FullNodeScan) MarshalToSizedBuffer(dAtA []byte) (int, error) { i -= len(m.XXX_unrecognized) copy(dAtA[i:], m.XXX_unrecognized) } - if len(m.Components) > 0 { - for iNdEx := len(m.Components) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Components[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintComplianceNodescan(dAtA, i, uint64(size)) + if len(m.Notes) > 0 { + dAtA2 := make([]byte, len(m.Notes)*10) + var j1 int + for _, num := range m.Notes { + for num >= 1<<7 { + dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j1++ + } + dAtA2[j1] = uint8(num) + j1++ + } + i -= j1 + copy(dAtA[i:], dAtA2[:j1]) + i = encodeVarintComplianceNodescan(dAtA, i, uint64(j1)) + i-- + dAtA[i] = 0x2a + } + if m.Components != nil { + { + size, err := m.Components.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err } - i-- - dAtA[i] = 0x22 + i -= size + i = encodeVarintComplianceNodescan(dAtA, i, uint64(size)) } + i-- + dAtA[i] = 0x22 } if m.ScanTime != nil { { @@ -289,47 +242,6 @@ func (m *FullNodeScan) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *FullNodeScanComponent) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FullNodeScanComponent) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FullNodeScanComponent) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintComplianceNodescan(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintComplianceNodescan(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - func encodeVarintComplianceNodescan(dAtA []byte, offset int, v uint64) int { offset -= sovComplianceNodescan(v) base := offset @@ -359,31 +271,16 @@ func (m *FullNodeScan) Size() (n int) { l = m.ScanTime.Size() n += 1 + l + sovComplianceNodescan(uint64(l)) } - if len(m.Components) > 0 { - for _, e := range m.Components { - l = e.Size() - n += 1 + l + sovComplianceNodescan(uint64(l)) - } - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FullNodeScanComponent) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { + if m.Components != nil { + l = m.Components.Size() n += 1 + l + sovComplianceNodescan(uint64(l)) } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovComplianceNodescan(uint64(l)) + if len(m.Notes) > 0 { + l = 0 + for _, e := range m.Notes { + l += sovComplianceNodescan(uint64(e)) + } + n += 1 + sovComplianceNodescan(uint64(l)) + l } if m.XXX_unrecognized != nil { n += len(m.XXX_unrecognized) @@ -555,126 +452,82 @@ func (m *FullNodeScan) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Components = append(m.Components, &FullNodeScanComponent{}) - if err := m.Components[len(m.Components)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err + if m.Components == nil { + m.Components = &v1.Components{} } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipComplianceNodescan(dAtA[iNdEx:]) - if err != nil { + if err := m.Components.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthComplianceNodescan - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FullNodeScanComponent) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescan - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FullNodeScanComponent: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FullNodeScanComponent: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescan + iNdEx = postIndex + case 5: + if wireType == 0 { + var v v1.Note + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= v1.Note(b&0x7F) << shift + if b < 0x80 { + break + } } - if iNdEx >= l { - return io.ErrUnexpectedEOF + m.Notes = append(m.Notes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break + if packedLen < 0 { + return ErrInvalidLengthComplianceNodescan } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthComplianceNodescan - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthComplianceNodescan - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescan + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthComplianceNodescan } - if iNdEx >= l { + if postIndex > l { return io.ErrUnexpectedEOF } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break + var elementCount int + if elementCount != 0 && len(m.Notes) == 0 { + m.Notes = make([]v1.Note, 0, elementCount) } + for iNdEx < postIndex { + var v v1.Note + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceNodescan + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= v1.Note(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Notes = append(m.Notes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Notes", wireType) } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthComplianceNodescan - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthComplianceNodescan - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipComplianceNodescan(dAtA[iNdEx:]) From 3bf772dfab418a3e888cf454c736d896d6f1f24f Mon Sep 17 00:00:00 2001 From: Matthias Meidinger Date: Mon, 10 Oct 2022 11:05:34 +0200 Subject: [PATCH 6/9] Address review: Reorganize - Remove standalone iservice and use existing bidi stream - Rename message FullNodeScan -> NodeScanV2 for better semantics - Move NodeScanV2 message into storages' Node proto --- .../sensor/compliance_nodescan.pb.go | 636 ----------------- .../sensor/compliance_nodescan_iservice.pb.go | 665 ----------------- generated/storage/node.pb.go | 671 +++++++++++++++--- .../sensor/compliance_iservice.proto | 2 + .../sensor/compliance_nodescan.proto | 22 - .../sensor/compliance_nodescan_iservice.proto | 18 - proto/storage/node.proto | 14 +- 7 files changed, 591 insertions(+), 1437 deletions(-) delete mode 100644 generated/internalapi/sensor/compliance_nodescan.pb.go delete mode 100644 generated/internalapi/sensor/compliance_nodescan_iservice.pb.go delete mode 100644 proto/internalapi/sensor/compliance_nodescan.proto delete mode 100644 proto/internalapi/sensor/compliance_nodescan_iservice.proto diff --git a/generated/internalapi/sensor/compliance_nodescan.pb.go b/generated/internalapi/sensor/compliance_nodescan.pb.go deleted file mode 100644 index e66772143a786..0000000000000 --- a/generated/internalapi/sensor/compliance_nodescan.pb.go +++ /dev/null @@ -1,636 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: internalapi/sensor/compliance_nodescan.proto - -package sensor - -import ( - fmt "fmt" - _ "github.com/gogo/protobuf/gogoproto" - types "github.com/gogo/protobuf/types" - proto "github.com/golang/protobuf/proto" - v1 "github.com/stackrox/scanner/generated/scanner/api/v1" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -// Names and data types are designed to follow proto/storage/node.proto as close as possible -// Next tag: 7 -type FullNodeScan struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" search:"Node ID,store" sql:"pk"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" search:"Node,store"` - ScanTime *types.Timestamp `protobuf:"bytes,3,opt,name=scan_time,json=scanTime,proto3" json:"scan_time,omitempty" search:"Node Scan Time,store"` - Components *v1.Components `protobuf:"bytes,4,opt,name=components,proto3" json:"components,omitempty"` - Notes []v1.Note `protobuf:"varint,5,rep,packed,name=notes,proto3,enum=scannerV1.Note" json:"notes,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FullNodeScan) Reset() { *m = FullNodeScan{} } -func (m *FullNodeScan) String() string { return proto.CompactTextString(m) } -func (*FullNodeScan) ProtoMessage() {} -func (*FullNodeScan) Descriptor() ([]byte, []int) { - return fileDescriptor_6c2ec431e25d2b87, []int{0} -} -func (m *FullNodeScan) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FullNodeScan) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FullNodeScan.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FullNodeScan) XXX_Merge(src proto.Message) { - xxx_messageInfo_FullNodeScan.Merge(m, src) -} -func (m *FullNodeScan) XXX_Size() int { - return m.Size() -} -func (m *FullNodeScan) XXX_DiscardUnknown() { - xxx_messageInfo_FullNodeScan.DiscardUnknown(m) -} - -var xxx_messageInfo_FullNodeScan proto.InternalMessageInfo - -func (m *FullNodeScan) GetId() string { - if m != nil { - return m.Id - } - return "" -} - -func (m *FullNodeScan) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *FullNodeScan) GetScanTime() *types.Timestamp { - if m != nil { - return m.ScanTime - } - return nil -} - -func (m *FullNodeScan) GetComponents() *v1.Components { - if m != nil { - return m.Components - } - return nil -} - -func (m *FullNodeScan) GetNotes() []v1.Note { - if m != nil { - return m.Notes - } - return nil -} - -func (m *FullNodeScan) MessageClone() proto.Message { - return m.Clone() -} -func (m *FullNodeScan) Clone() *FullNodeScan { - if m == nil { - return nil - } - cloned := new(FullNodeScan) - *cloned = *m - - cloned.ScanTime = m.ScanTime.Clone() - cloned.Components = m.Components.Clone() - if m.Notes != nil { - cloned.Notes = make([]v1.Note, len(m.Notes)) - copy(cloned.Notes, m.Notes) - } - return cloned -} - -func init() { - proto.RegisterType((*FullNodeScan)(nil), "sensor.FullNodeScan") -} - -func init() { - proto.RegisterFile("internalapi/sensor/compliance_nodescan.proto", fileDescriptor_6c2ec431e25d2b87) -} - -var fileDescriptor_6c2ec431e25d2b87 = []byte{ - // 352 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x51, 0xcd, 0x4a, 0xeb, 0x40, - 0x14, 0xbe, 0x49, 0x7f, 0xb8, 0x9d, 0x7b, 0x51, 0x88, 0x8a, 0xb1, 0x60, 0x12, 0x23, 0x42, 0xc1, - 0x92, 0xa1, 0x2d, 0x6e, 0xba, 0xac, 0x22, 0xb8, 0xe9, 0x22, 0x8a, 0x8b, 0x6e, 0xca, 0x34, 0x39, - 0xc6, 0x60, 0x32, 0x27, 0x66, 0xa6, 0x3e, 0x8b, 0xcf, 0xe0, 0x93, 0xb8, 0xf4, 0x09, 0x8a, 0xd4, - 0x37, 0xe8, 0x13, 0xc8, 0x24, 0x69, 0xa9, 0xee, 0x0e, 0xe7, 0xfb, 0x99, 0xef, 0x3b, 0x43, 0xba, - 0x31, 0x97, 0x90, 0x73, 0x96, 0xb0, 0x2c, 0xa6, 0x02, 0xb8, 0xc0, 0x9c, 0x06, 0x98, 0x66, 0x49, - 0xcc, 0x78, 0x00, 0x53, 0x8e, 0x21, 0x88, 0x80, 0x71, 0x2f, 0xcb, 0x51, 0xa2, 0xd1, 0x2c, 0x19, - 0x6d, 0x3b, 0x42, 0x8c, 0x12, 0xa0, 0xc5, 0x76, 0x36, 0x7f, 0xa0, 0x32, 0x4e, 0x41, 0x48, 0x96, - 0x66, 0x25, 0xb1, 0x7d, 0xa4, 0x44, 0x1c, 0x72, 0xaa, 0x6c, 0x5f, 0x7a, 0x94, 0xa3, 0x84, 0x0a, - 0xb2, 0x7e, 0x41, 0xea, 0x35, 0xe4, 0xc0, 0x65, 0x85, 0xef, 0x47, 0x18, 0x61, 0x31, 0x52, 0x35, - 0x95, 0x5b, 0xf7, 0x4d, 0x27, 0xff, 0xaf, 0xe7, 0x49, 0x32, 0xc6, 0x10, 0x6e, 0x03, 0xc6, 0x8d, - 0x01, 0xd1, 0xe3, 0xd0, 0xd4, 0x1c, 0xad, 0xd3, 0x1a, 0x9d, 0xae, 0x16, 0xb6, 0x2d, 0x80, 0xe5, - 0xc1, 0xe3, 0xd0, 0x55, 0x0c, 0xe7, 0xe6, 0xaa, 0x2b, 0x24, 0xe6, 0xe0, 0x3a, 0xe2, 0x39, 0x19, - 0xba, 0xd9, 0x93, 0xeb, 0xeb, 0x71, 0x68, 0x9c, 0x93, 0x3a, 0x67, 0x29, 0x98, 0x7a, 0x21, 0x3b, - 0x5c, 0x2d, 0xec, 0xbd, 0x6d, 0x59, 0xa5, 0xf1, 0x0b, 0x92, 0x31, 0x21, 0x2d, 0x15, 0x75, 0xaa, - 0xba, 0x99, 0x35, 0x47, 0xeb, 0xfc, 0xeb, 0xb7, 0xbd, 0xb2, 0xb8, 0xb7, 0x2e, 0xee, 0xdd, 0xad, - 0x8b, 0x8f, 0x4e, 0x56, 0x0b, 0xfb, 0xf8, 0x47, 0x08, 0x95, 0xd3, 0x51, 0x84, 0xb5, 0xef, 0x5f, - 0xe5, 0xa7, 0x16, 0xc6, 0x05, 0x21, 0x9b, 0xde, 0xc2, 0xac, 0x17, 0xe6, 0x07, 0x5e, 0x75, 0x99, - 0xfb, 0x9e, 0x77, 0xb9, 0x01, 0xfd, 0x2d, 0xa2, 0x71, 0x46, 0x1a, 0xea, 0x92, 0xc2, 0x6c, 0x38, - 0xb5, 0xce, 0x4e, 0x7f, 0x77, 0x4b, 0x31, 0x46, 0x09, 0x7e, 0x89, 0x8e, 0xcc, 0xf7, 0xa5, 0xa5, - 0x7d, 0x2c, 0x2d, 0xed, 0x73, 0x69, 0x69, 0xaf, 0x5f, 0xd6, 0x9f, 0x49, 0xf5, 0x71, 0xb3, 0x66, - 0x11, 0x7c, 0xf0, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xab, 0x3b, 0x3f, 0xf7, 0x01, 0x00, 0x00, -} - -func (m *FullNodeScan) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FullNodeScan) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FullNodeScan) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if len(m.Notes) > 0 { - dAtA2 := make([]byte, len(m.Notes)*10) - var j1 int - for _, num := range m.Notes { - for num >= 1<<7 { - dAtA2[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA2[j1] = uint8(num) - j1++ - } - i -= j1 - copy(dAtA[i:], dAtA2[:j1]) - i = encodeVarintComplianceNodescan(dAtA, i, uint64(j1)) - i-- - dAtA[i] = 0x2a - } - if m.Components != nil { - { - size, err := m.Components.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintComplianceNodescan(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.ScanTime != nil { - { - size, err := m.ScanTime.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintComplianceNodescan(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintComplianceNodescan(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0x12 - } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintComplianceNodescan(dAtA, i, uint64(len(m.Id))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintComplianceNodescan(dAtA []byte, offset int, v uint64) int { - offset -= sovComplianceNodescan(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *FullNodeScan) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Id) - if l > 0 { - n += 1 + l + sovComplianceNodescan(uint64(l)) - } - l = len(m.Name) - if l > 0 { - n += 1 + l + sovComplianceNodescan(uint64(l)) - } - if m.ScanTime != nil { - l = m.ScanTime.Size() - n += 1 + l + sovComplianceNodescan(uint64(l)) - } - if m.Components != nil { - l = m.Components.Size() - n += 1 + l + sovComplianceNodescan(uint64(l)) - } - if len(m.Notes) > 0 { - l = 0 - for _, e := range m.Notes { - l += sovComplianceNodescan(uint64(e)) - } - n += 1 + sovComplianceNodescan(uint64(l)) + l - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovComplianceNodescan(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozComplianceNodescan(x uint64) (n int) { - return sovComplianceNodescan(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *FullNodeScan) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescan - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FullNodeScan: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FullNodeScan: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescan - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthComplianceNodescan - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthComplianceNodescan - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Id = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescan - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthComplianceNodescan - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthComplianceNodescan - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScanTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescan - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthComplianceNodescan - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthComplianceNodescan - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ScanTime == nil { - m.ScanTime = &types.Timestamp{} - } - if err := m.ScanTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Components", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescan - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthComplianceNodescan - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthComplianceNodescan - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Components == nil { - m.Components = &v1.Components{} - } - if err := m.Components.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 5: - if wireType == 0 { - var v v1.Note - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescan - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= v1.Note(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Notes = append(m.Notes, v) - } else if wireType == 2 { - var packedLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescan - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return ErrInvalidLengthComplianceNodescan - } - postIndex := iNdEx + packedLen - if postIndex < 0 { - return ErrInvalidLengthComplianceNodescan - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - var elementCount int - if elementCount != 0 && len(m.Notes) == 0 { - m.Notes = make([]v1.Note, 0, elementCount) - } - for iNdEx < postIndex { - var v v1.Note - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescan - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= v1.Note(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Notes = append(m.Notes, v) - } - } else { - return fmt.Errorf("proto: wrong wireType = %d for field Notes", wireType) - } - default: - iNdEx = preIndex - skippy, err := skipComplianceNodescan(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthComplianceNodescan - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipComplianceNodescan(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowComplianceNodescan - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowComplianceNodescan - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowComplianceNodescan - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthComplianceNodescan - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupComplianceNodescan - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthComplianceNodescan - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthComplianceNodescan = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowComplianceNodescan = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupComplianceNodescan = fmt.Errorf("proto: unexpected end of group") -) diff --git a/generated/internalapi/sensor/compliance_nodescan_iservice.pb.go b/generated/internalapi/sensor/compliance_nodescan_iservice.pb.go deleted file mode 100644 index 7f1a9ab606516..0000000000000 --- a/generated/internalapi/sensor/compliance_nodescan_iservice.pb.go +++ /dev/null @@ -1,665 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: internalapi/sensor/compliance_nodescan_iservice.proto - -package sensor - -import ( - context "context" - fmt "fmt" - proto "github.com/golang/protobuf/proto" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package - -type FullNodeScanRequest struct { - Node string `protobuf:"bytes,1,opt,name=node,proto3" json:"node,omitempty"` - Msg *FullNodeScan `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"` - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FullNodeScanRequest) Reset() { *m = FullNodeScanRequest{} } -func (m *FullNodeScanRequest) String() string { return proto.CompactTextString(m) } -func (*FullNodeScanRequest) ProtoMessage() {} -func (*FullNodeScanRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6b5f6621e041d6f5, []int{0} -} -func (m *FullNodeScanRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FullNodeScanRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FullNodeScanRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FullNodeScanRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_FullNodeScanRequest.Merge(m, src) -} -func (m *FullNodeScanRequest) XXX_Size() int { - return m.Size() -} -func (m *FullNodeScanRequest) XXX_DiscardUnknown() { - xxx_messageInfo_FullNodeScanRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_FullNodeScanRequest proto.InternalMessageInfo - -func (m *FullNodeScanRequest) GetNode() string { - if m != nil { - return m.Node - } - return "" -} - -func (m *FullNodeScanRequest) GetMsg() *FullNodeScan { - if m != nil { - return m.Msg - } - return nil -} - -func (m *FullNodeScanRequest) MessageClone() proto.Message { - return m.Clone() -} -func (m *FullNodeScanRequest) Clone() *FullNodeScanRequest { - if m == nil { - return nil - } - cloned := new(FullNodeScanRequest) - *cloned = *m - - cloned.Msg = m.Msg.Clone() - return cloned -} - -type FullNodeScanResponse struct { - XXX_NoUnkeyedLiteral struct{} `json:"-"` - XXX_unrecognized []byte `json:"-"` - XXX_sizecache int32 `json:"-"` -} - -func (m *FullNodeScanResponse) Reset() { *m = FullNodeScanResponse{} } -func (m *FullNodeScanResponse) String() string { return proto.CompactTextString(m) } -func (*FullNodeScanResponse) ProtoMessage() {} -func (*FullNodeScanResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6b5f6621e041d6f5, []int{1} -} -func (m *FullNodeScanResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *FullNodeScanResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_FullNodeScanResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *FullNodeScanResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_FullNodeScanResponse.Merge(m, src) -} -func (m *FullNodeScanResponse) XXX_Size() int { - return m.Size() -} -func (m *FullNodeScanResponse) XXX_DiscardUnknown() { - xxx_messageInfo_FullNodeScanResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_FullNodeScanResponse proto.InternalMessageInfo - -func (m *FullNodeScanResponse) MessageClone() proto.Message { - return m.Clone() -} -func (m *FullNodeScanResponse) Clone() *FullNodeScanResponse { - if m == nil { - return nil - } - cloned := new(FullNodeScanResponse) - *cloned = *m - - return cloned -} - -func init() { - proto.RegisterType((*FullNodeScanRequest)(nil), "sensor.FullNodeScanRequest") - proto.RegisterType((*FullNodeScanResponse)(nil), "sensor.FullNodeScanResponse") -} - -func init() { - proto.RegisterFile("internalapi/sensor/compliance_nodescan_iservice.proto", fileDescriptor_6b5f6621e041d6f5) -} - -var fileDescriptor_6b5f6621e041d6f5 = []byte{ - // 235 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x32, 0xcd, 0xcc, 0x2b, 0x49, - 0x2d, 0xca, 0x4b, 0xcc, 0x49, 0x2c, 0xc8, 0xd4, 0x2f, 0x4e, 0xcd, 0x2b, 0xce, 0x2f, 0xd2, 0x4f, - 0xce, 0xcf, 0x2d, 0xc8, 0xc9, 0x4c, 0xcc, 0x4b, 0x4e, 0x8d, 0xcf, 0xcb, 0x4f, 0x49, 0x2d, 0x4e, - 0x4e, 0xcc, 0x8b, 0xcf, 0x2c, 0x4e, 0x2d, 0x2a, 0xcb, 0x4c, 0x4e, 0xd5, 0x2b, 0x28, 0xca, 0x2f, - 0xc9, 0x17, 0x62, 0x83, 0x28, 0x95, 0xd2, 0x21, 0x4e, 0x3b, 0x44, 0x97, 0x52, 0x20, 0x97, 0xb0, - 0x5b, 0x69, 0x4e, 0x8e, 0x5f, 0x7e, 0x4a, 0x6a, 0x70, 0x72, 0x62, 0x5e, 0x50, 0x6a, 0x61, 0x69, - 0x6a, 0x71, 0x89, 0x90, 0x10, 0x17, 0x0b, 0x48, 0xa1, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x67, 0x10, - 0x98, 0x2d, 0xa4, 0xc6, 0xc5, 0x9c, 0x5b, 0x9c, 0x2e, 0xc1, 0xa4, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, - 0xa2, 0x07, 0x31, 0x5a, 0x0f, 0x45, 0x37, 0x48, 0x81, 0x92, 0x18, 0x97, 0x08, 0xaa, 0x91, 0xc5, - 0x05, 0xf9, 0x79, 0xc5, 0xa9, 0x46, 0x99, 0x5c, 0x92, 0xce, 0x70, 0x77, 0xc0, 0x64, 0x83, 0x21, - 0x7e, 0x10, 0xf2, 0xe1, 0xe2, 0x76, 0xce, 0xcf, 0xcd, 0x2d, 0xcd, 0xcb, 0x4c, 0x4e, 0x2c, 0x49, - 0x15, 0x92, 0xc6, 0x6a, 0x3c, 0xc4, 0x71, 0x52, 0x32, 0xd8, 0x25, 0x21, 0xd6, 0x68, 0x30, 0x1a, - 0x30, 0x3a, 0x49, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, - 0x33, 0x1e, 0xcb, 0x31, 0x44, 0x41, 0x43, 0x27, 0x89, 0x0d, 0xec, 0x6d, 0x63, 0x40, 0x00, 0x00, - 0x00, 0xff, 0xff, 0x45, 0x1d, 0x5c, 0xf4, 0x65, 0x01, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConnInterface - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion6 - -// ComplianceNodeScanServiceClient is the client API for ComplianceNodeScanService service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConnInterface.NewStream. -type ComplianceNodeScanServiceClient interface { - Communicate(ctx context.Context, opts ...grpc.CallOption) (ComplianceNodeScanService_CommunicateClient, error) -} - -type complianceNodeScanServiceClient struct { - cc grpc.ClientConnInterface -} - -func NewComplianceNodeScanServiceClient(cc grpc.ClientConnInterface) ComplianceNodeScanServiceClient { - return &complianceNodeScanServiceClient{cc} -} - -func (c *complianceNodeScanServiceClient) Communicate(ctx context.Context, opts ...grpc.CallOption) (ComplianceNodeScanService_CommunicateClient, error) { - stream, err := c.cc.NewStream(ctx, &_ComplianceNodeScanService_serviceDesc.Streams[0], "/sensor.ComplianceNodeScanService/Communicate", opts...) - if err != nil { - return nil, err - } - x := &complianceNodeScanServiceCommunicateClient{stream} - return x, nil -} - -type ComplianceNodeScanService_CommunicateClient interface { - Send(*FullNodeScanRequest) error - Recv() (*FullNodeScanResponse, error) - grpc.ClientStream -} - -type complianceNodeScanServiceCommunicateClient struct { - grpc.ClientStream -} - -func (x *complianceNodeScanServiceCommunicateClient) Send(m *FullNodeScanRequest) error { - return x.ClientStream.SendMsg(m) -} - -func (x *complianceNodeScanServiceCommunicateClient) Recv() (*FullNodeScanResponse, error) { - m := new(FullNodeScanResponse) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -// ComplianceNodeScanServiceServer is the server API for ComplianceNodeScanService service. -type ComplianceNodeScanServiceServer interface { - Communicate(ComplianceNodeScanService_CommunicateServer) error -} - -// UnimplementedComplianceNodeScanServiceServer can be embedded to have forward compatible implementations. -type UnimplementedComplianceNodeScanServiceServer struct { -} - -func (*UnimplementedComplianceNodeScanServiceServer) Communicate(srv ComplianceNodeScanService_CommunicateServer) error { - return status.Errorf(codes.Unimplemented, "method Communicate not implemented") -} - -func RegisterComplianceNodeScanServiceServer(s *grpc.Server, srv ComplianceNodeScanServiceServer) { - s.RegisterService(&_ComplianceNodeScanService_serviceDesc, srv) -} - -func _ComplianceNodeScanService_Communicate_Handler(srv interface{}, stream grpc.ServerStream) error { - return srv.(ComplianceNodeScanServiceServer).Communicate(&complianceNodeScanServiceCommunicateServer{stream}) -} - -type ComplianceNodeScanService_CommunicateServer interface { - Send(*FullNodeScanResponse) error - Recv() (*FullNodeScanRequest, error) - grpc.ServerStream -} - -type complianceNodeScanServiceCommunicateServer struct { - grpc.ServerStream -} - -func (x *complianceNodeScanServiceCommunicateServer) Send(m *FullNodeScanResponse) error { - return x.ServerStream.SendMsg(m) -} - -func (x *complianceNodeScanServiceCommunicateServer) Recv() (*FullNodeScanRequest, error) { - m := new(FullNodeScanRequest) - if err := x.ServerStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -var _ComplianceNodeScanService_serviceDesc = grpc.ServiceDesc{ - ServiceName: "sensor.ComplianceNodeScanService", - HandlerType: (*ComplianceNodeScanServiceServer)(nil), - Methods: []grpc.MethodDesc{}, - Streams: []grpc.StreamDesc{ - { - StreamName: "Communicate", - Handler: _ComplianceNodeScanService_Communicate_Handler, - ServerStreams: true, - ClientStreams: true, - }, - }, - Metadata: "internalapi/sensor/compliance_nodescan_iservice.proto", -} - -func (m *FullNodeScanRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FullNodeScanRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FullNodeScanRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - if m.Msg != nil { - { - size, err := m.Msg.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintComplianceNodescanIservice(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Node) > 0 { - i -= len(m.Node) - copy(dAtA[i:], m.Node) - i = encodeVarintComplianceNodescanIservice(dAtA, i, uint64(len(m.Node))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *FullNodeScanResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *FullNodeScanResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *FullNodeScanResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.XXX_unrecognized != nil { - i -= len(m.XXX_unrecognized) - copy(dAtA[i:], m.XXX_unrecognized) - } - return len(dAtA) - i, nil -} - -func encodeVarintComplianceNodescanIservice(dAtA []byte, offset int, v uint64) int { - offset -= sovComplianceNodescanIservice(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *FullNodeScanRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Node) - if l > 0 { - n += 1 + l + sovComplianceNodescanIservice(uint64(l)) - } - if m.Msg != nil { - l = m.Msg.Size() - n += 1 + l + sovComplianceNodescanIservice(uint64(l)) - } - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func (m *FullNodeScanResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.XXX_unrecognized != nil { - n += len(m.XXX_unrecognized) - } - return n -} - -func sovComplianceNodescanIservice(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozComplianceNodescanIservice(x uint64) (n int) { - return sovComplianceNodescanIservice(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *FullNodeScanRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescanIservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FullNodeScanRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FullNodeScanRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Node", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescanIservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthComplianceNodescanIservice - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthComplianceNodescanIservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Node = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Msg", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescanIservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthComplianceNodescanIservice - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthComplianceNodescanIservice - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Msg == nil { - m.Msg = &FullNodeScan{} - } - if err := m.Msg.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipComplianceNodescanIservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthComplianceNodescanIservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *FullNodeScanResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowComplianceNodescanIservice - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return fmt.Errorf("proto: FullNodeScanResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: FullNodeScanResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipComplianceNodescanIservice(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthComplianceNodescanIservice - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipComplianceNodescanIservice(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowComplianceNodescanIservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowComplianceNodescanIservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowComplianceNodescanIservice - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthComplianceNodescanIservice - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupComplianceNodescanIservice - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthComplianceNodescanIservice - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthComplianceNodescanIservice = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowComplianceNodescanIservice = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupComplianceNodescanIservice = fmt.Errorf("proto: unexpected end of group") -) diff --git a/generated/storage/node.pb.go b/generated/storage/node.pb.go index 2c9f641789da1..8c1554c157b7e 100644 --- a/generated/storage/node.pb.go +++ b/generated/storage/node.pb.go @@ -9,6 +9,7 @@ import ( _ "github.com/gogo/protobuf/gogoproto" types "github.com/gogo/protobuf/types" proto "github.com/golang/protobuf/proto" + v1 "github.com/stackrox/scanner/generated/scanner/api/v1" io "io" math "math" math_bits "math/bits" @@ -527,7 +528,7 @@ func (m *Node) Clone() *Node { // Next tag: 5 type NodeScan struct { - ScanTime *types.Timestamp `protobuf:"bytes,1,opt,name=scan_time,json=scanTime,proto3" json:"scan_time,omitempty" search:"Node Scan Time,store"` + SanTime *types.Timestamp `protobuf:"bytes,1,opt,name=san_time,json=sanTime,proto3" json:"san_time,omitempty" search:"Node Scan Time,store"` OperatingSystem string `protobuf:"bytes,3,opt,name=operating_system,json=operatingSystem,proto3" json:"operating_system,omitempty"` Components []*EmbeddedNodeScanComponent `protobuf:"bytes,2,rep,name=components,proto3" json:"components,omitempty" sql:"-"` Notes []NodeScan_Note `protobuf:"varint,4,rep,packed,name=notes,proto3,enum=storage.NodeScan_Note" json:"notes,omitempty"` @@ -569,9 +570,9 @@ func (m *NodeScan) XXX_DiscardUnknown() { var xxx_messageInfo_NodeScan proto.InternalMessageInfo -func (m *NodeScan) GetScanTime() *types.Timestamp { +func (m *NodeScan) GetSanTime() *types.Timestamp { if m != nil { - return m.ScanTime + return m.SanTime } return nil } @@ -607,7 +608,7 @@ func (m *NodeScan) Clone() *NodeScan { cloned := new(NodeScan) *cloned = *m - cloned.ScanTime = m.ScanTime.Clone() + cloned.SanTime = m.SanTime.Clone() if m.Components != nil { cloned.Components = make([]*EmbeddedNodeScanComponent, len(m.Components)) for idx, v := range m.Components { @@ -621,6 +622,105 @@ func (m *NodeScan) Clone() *NodeScan { return cloned } +// Names and data types are designed to follow NodeScan as close as possible +type NodeScanV2 struct { + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" search:"Node ID,store" sql:"pk"` + Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" search:"Node,store"` + ScanTime *types.Timestamp `protobuf:"bytes,3,opt,name=scan_time,json=scanTime,proto3" json:"scan_time,omitempty" search:"Node Scan Time,store"` + Components *v1.Components `protobuf:"bytes,4,opt,name=components,proto3" json:"components,omitempty"` + Notes []v1.Note `protobuf:"varint,5,rep,packed,name=notes,proto3,enum=scannerV1.Note" json:"notes,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *NodeScanV2) Reset() { *m = NodeScanV2{} } +func (m *NodeScanV2) String() string { return proto.CompactTextString(m) } +func (*NodeScanV2) ProtoMessage() {} +func (*NodeScanV2) Descriptor() ([]byte, []int) { + return fileDescriptor_107f6eed651900c7, []int{2} +} +func (m *NodeScanV2) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *NodeScanV2) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_NodeScanV2.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *NodeScanV2) XXX_Merge(src proto.Message) { + xxx_messageInfo_NodeScanV2.Merge(m, src) +} +func (m *NodeScanV2) XXX_Size() int { + return m.Size() +} +func (m *NodeScanV2) XXX_DiscardUnknown() { + xxx_messageInfo_NodeScanV2.DiscardUnknown(m) +} + +var xxx_messageInfo_NodeScanV2 proto.InternalMessageInfo + +func (m *NodeScanV2) GetId() string { + if m != nil { + return m.Id + } + return "" +} + +func (m *NodeScanV2) GetName() string { + if m != nil { + return m.Name + } + return "" +} + +func (m *NodeScanV2) GetScanTime() *types.Timestamp { + if m != nil { + return m.ScanTime + } + return nil +} + +func (m *NodeScanV2) GetComponents() *v1.Components { + if m != nil { + return m.Components + } + return nil +} + +func (m *NodeScanV2) GetNotes() []v1.Note { + if m != nil { + return m.Notes + } + return nil +} + +func (m *NodeScanV2) MessageClone() proto.Message { + return m.Clone() +} +func (m *NodeScanV2) Clone() *NodeScanV2 { + if m == nil { + return nil + } + cloned := new(NodeScanV2) + *cloned = *m + + cloned.ScanTime = m.ScanTime.Clone() + cloned.Components = m.Components.Clone() + if m.Notes != nil { + cloned.Notes = make([]v1.Note, len(m.Notes)) + copy(cloned.Notes, m.Notes) + } + return cloned +} + type EmbeddedNodeScanComponent struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty" search:"Component,store"` Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty" search:"Component Version,store"` @@ -640,7 +740,7 @@ func (m *EmbeddedNodeScanComponent) Reset() { *m = EmbeddedNodeScanCompo func (m *EmbeddedNodeScanComponent) String() string { return proto.CompactTextString(m) } func (*EmbeddedNodeScanComponent) ProtoMessage() {} func (*EmbeddedNodeScanComponent) Descriptor() ([]byte, []int) { - return fileDescriptor_107f6eed651900c7, []int{2} + return fileDescriptor_107f6eed651900c7, []int{3} } func (m *EmbeddedNodeScanComponent) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -789,96 +889,103 @@ func init() { proto.RegisterMapType((map[string]string)(nil), "storage.Node.AnnotationsEntry") proto.RegisterMapType((map[string]string)(nil), "storage.Node.LabelsEntry") proto.RegisterType((*NodeScan)(nil), "storage.NodeScan") + proto.RegisterType((*NodeScanV2)(nil), "storage.NodeScanV2") proto.RegisterType((*EmbeddedNodeScanComponent)(nil), "storage.EmbeddedNodeScanComponent") } func init() { proto.RegisterFile("storage/node.proto", fileDescriptor_107f6eed651900c7) } var fileDescriptor_107f6eed651900c7 = []byte{ - // 1322 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x56, 0xdd, 0x72, 0xda, 0x46, - 0x14, 0xb6, 0xc0, 0x3f, 0xb0, 0x38, 0x18, 0x6f, 0x12, 0x47, 0x26, 0xb1, 0xa5, 0xaa, 0x4d, 0x42, - 0x26, 0x0e, 0xee, 0x38, 0xb9, 0x48, 0x3c, 0x13, 0x77, 0x0c, 0xa6, 0x0d, 0x49, 0x4a, 0x3c, 0x02, - 0xfb, 0x22, 0x17, 0xd5, 0x08, 0xb4, 0xc6, 0x2a, 0x62, 0x57, 0xd5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 0xf6, 0x8c, 0xf1, 0x4f, 0x06, 0x6c, 0x7f, 0x36, 0x40, 0xf8, 0x6d, - 0x34, 0xe1, 0x84, 0x83, 0x51, 0xea, 0xd9, 0x8d, 0x41, 0xe9, 0x31, 0xe7, 0x08, 0xac, 0xc9, 0xce, - 0x1a, 0x8e, 0x45, 0xdf, 0xcc, 0xa6, 0x9a, 0xbe, 0xd8, 0x3d, 0xa2, 0x36, 0x1b, 0x77, 0xf3, 0x88, - 0x04, 0x5f, 0x80, 0x15, 0x3e, 0xbe, 0xc9, 0x29, 0x69, 0x77, 0xe1, 0x14, 0xcf, 0x93, 0xc3, 0x9d, - 0x19, 0x82, 0xe1, 0x09, 0xd8, 0x48, 0x0e, 0x7d, 0x2e, 0x92, 0x93, 0x44, 0x39, 0x75, 0x72, 0x69, - 0xee, 0x3c, 0x05, 0x96, 0x13, 0x2d, 0x82, 0x0f, 0x5e, 0xd9, 0x44, 0xe9, 0xdf, 0x4f, 0x94, 0x2d, - 0x1f, 0x97, 0x32, 0x6f, 0x96, 0xae, 0x8b, 0x72, 0x27, 0xd5, 0x17, 0x56, 0xb9, 0x3b, 0x51, 0xf2, - 0xf3, 0x29, 0x5c, 0x7b, 0xf1, 0xfb, 0xa7, 0x5d, 0xe5, 0xcf, 0x4f, 0xbb, 0xca, 0x5f, 0x9f, 0x76, - 0x95, 0x5f, 0xff, 0xde, 0x5d, 0x02, 0xdb, 0x2e, 0xa9, 0x52, 0x66, 0xf7, 0x06, 0x01, 0xb9, 0x0a, - 0x13, 0x57, 0xc6, 0xfd, 0x51, 0x8e, 0xcd, 0xdd, 0x55, 0x61, 0x7f, 0xfe, 0x6f, 0x00, 0x00, 0x00, - 0xff, 0xff, 0x35, 0xdd, 0xe0, 0x5c, 0x5c, 0x0b, 0x00, 0x00, + // 1410 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xdf, 0x4e,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8, 0x19, 0xcc, 0x88, 0x77, 0xae, 0x7a, 0x4e, + 0xae, 0x4f, 0x34, 0xdc, 0x49, 0xf2, 0x15, 0x6c, 0x85, 0x60, 0xb4, 0x07, 0x8b, 0xc9, 0xd7, 0xb1, + 0x87, 0xd5, 0x93, 0xab, 0x9c, 0x6a, 0xb2, 0x34, 0x77, 0x9c, 0x82, 0xca, 0x89, 0x59, 0x2a, 0xf2, + 0x9c, 0x4b, 0xcc, 0xc8, 0x3b, 0x89, 0xf9, 0x26, 0xde, 0x95, 0xd9, 0x57, 0x53, 0x57, 0xd3, 0x6b, + 0x2d, 0x35, 0x40, 0x67, 0x85, 0x3b, 0x31, 0x1b, 0xc7, 0xcf, 0x7a, 0xed, 0xd9, 0x2f, 0x1f, 0xd6, + 0x33, 0xbf, 0x7d, 0x58, 0xcf, 0xfc, 0xfe, 0x61, 0x3d, 0xf3, 0xe3, 0x1f, 0xeb, 0x53, 0xb0, 0xea, + 0xd1, 0x2a, 0xe3, 0x4e, 0xbb, 0x1b, 0xd0, 0x8b, 0xb0, 0x61, 0x54, 0xdc, 0xef, 0xd5, 0x5f, 0x93, + 0xd6, 0xac, 0xb4, 0x3f, 0xfd, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x9e, 0x17, 0x6d, 0xc0, 0x0c, + 0x00, 0x00, } func (m *Node) Marshal() (dAtA []byte, err error) { @@ -1309,6 +1416,75 @@ func (m *NodeScan) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } + if m.SanTime != nil { + { + size, err := m.SanTime.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNode(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *NodeScanV2) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *NodeScanV2) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *NodeScanV2) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.XXX_unrecognized != nil { + i -= len(m.XXX_unrecognized) + copy(dAtA[i:], m.XXX_unrecognized) + } + if len(m.Notes) > 0 { + dAtA12 := make([]byte, len(m.Notes)*10) + var j11 int + for _, num := range m.Notes { + for num >= 1<<7 { + dAtA12[j11] = uint8(uint64(num)&0x7f | 0x80) + num >>= 7 + j11++ + } + dAtA12[j11] = uint8(num) + j11++ + } + i -= j11 + copy(dAtA[i:], dAtA12[:j11]) + i = encodeVarintNode(dAtA, i, uint64(j11)) + i-- + dAtA[i] = 0x2a + } + if m.Components != nil { + { + size, err := m.Components.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintNode(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } if m.ScanTime != nil { { size, err := m.ScanTime.MarshalToSizedBuffer(dAtA[:i]) @@ -1319,6 +1495,20 @@ func (m *NodeScan) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintNode(dAtA, i, uint64(size)) } i-- + dAtA[i] = 0x1a + } + if len(m.Name) > 0 { + i -= len(m.Name) + copy(dAtA[i:], m.Name) + i = encodeVarintNode(dAtA, i, uint64(len(m.Name))) + i-- + dAtA[i] = 0x12 + } + if len(m.Id) > 0 { + i -= len(m.Id) + copy(dAtA[i:], m.Id) + i = encodeVarintNode(dAtA, i, uint64(len(m.Id))) + i-- dAtA[i] = 0xa } return len(dAtA) - i, nil @@ -1610,8 +1800,8 @@ func (m *NodeScan) Size() (n int) { } var l int _ = l - if m.ScanTime != nil { - l = m.ScanTime.Size() + if m.SanTime != nil { + l = m.SanTime.Size() n += 1 + l + sovNode(uint64(l)) } if len(m.Components) > 0 { @@ -1637,6 +1827,41 @@ func (m *NodeScan) Size() (n int) { return n } +func (m *NodeScanV2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Id) + if l > 0 { + n += 1 + l + sovNode(uint64(l)) + } + l = len(m.Name) + if l > 0 { + n += 1 + l + sovNode(uint64(l)) + } + if m.ScanTime != nil { + l = m.ScanTime.Size() + n += 1 + l + sovNode(uint64(l)) + } + if m.Components != nil { + l = m.Components.Size() + n += 1 + l + sovNode(uint64(l)) + } + if len(m.Notes) > 0 { + l = 0 + for _, e := range m.Notes { + l += sovNode(uint64(e)) + } + n += 1 + sovNode(uint64(l)) + l + } + if m.XXX_unrecognized != nil { + n += len(m.XXX_unrecognized) + } + return n +} + func (m *EmbeddedNodeScanComponent) Size() (n int) { if m == nil { return 0 @@ -2798,7 +3023,7 @@ func (m *NodeScan) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ScanTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field SanTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2825,10 +3050,10 @@ func (m *NodeScan) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.ScanTime == nil { - m.ScanTime = &types.Timestamp{} + if m.SanTime == nil { + m.SanTime = &types.Timestamp{} } - if err := m.ScanTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.SanTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -2989,6 +3214,262 @@ func (m *NodeScan) Unmarshal(dAtA []byte) error { } return nil } +func (m *NodeScanV2) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: NodeScanV2: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: NodeScanV2: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthNode + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNode + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Id = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthNode + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthNode + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.Name = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ScanTime", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthNode + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNode + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ScanTime == nil { + m.ScanTime = &types.Timestamp{} + } + if err := m.ScanTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Components", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthNode + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthNode + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Components == nil { + m.Components = &v1.Components{} + } + if err := m.Components.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType == 0 { + var v v1.Note + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= v1.Note(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Notes = append(m.Notes, v) + } else if wireType == 2 { + var packedLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + packedLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if packedLen < 0 { + return ErrInvalidLengthNode + } + postIndex := iNdEx + packedLen + if postIndex < 0 { + return ErrInvalidLengthNode + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + var elementCount int + if elementCount != 0 && len(m.Notes) == 0 { + m.Notes = make([]v1.Note, 0, elementCount) + } + for iNdEx < postIndex { + var v v1.Note + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowNode + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= v1.Note(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Notes = append(m.Notes, v) + } + } else { + return fmt.Errorf("proto: wrong wireType = %d for field Notes", wireType) + } + default: + iNdEx = preIndex + skippy, err := skipNode(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthNode + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...) + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func (m *EmbeddedNodeScanComponent) Unmarshal(dAtA []byte) error { l := len(dAtA) iNdEx := 0 diff --git a/proto/internalapi/sensor/compliance_iservice.proto b/proto/internalapi/sensor/compliance_iservice.proto index def206fa72270..2c1a89451ccc0 100644 --- a/proto/internalapi/sensor/compliance_iservice.proto +++ b/proto/internalapi/sensor/compliance_iservice.proto @@ -6,6 +6,7 @@ import "internalapi/compliance/compliance_data.proto"; import "storage/cluster.proto"; import "storage/container_runtime.proto"; import "storage/kube_event.proto"; +import "storage/node.proto"; package sensor; @@ -25,6 +26,7 @@ message MsgFromCompliance { oneof msg { compliance.ComplianceReturn return = 2; AuditEvents audit_events = 3; + storage.NodeScanV2 node_scan_v2 = 4; } } diff --git a/proto/internalapi/sensor/compliance_nodescan.proto b/proto/internalapi/sensor/compliance_nodescan.proto deleted file mode 100644 index 64f91929b003a..0000000000000 --- a/proto/internalapi/sensor/compliance_nodescan.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; - -option go_package = "sensor"; - -import "google/protobuf/timestamp.proto"; -import "scanner/api/v1/note.proto"; -import "scanner/api/v1/component.proto"; - - -import "gogoproto/gogo.proto"; - -package sensor; - -// Names and data types are designed to follow proto/storage/node.proto as close as possible -// Next tag: 7 -message FullNodeScan { - string id = 1 [(gogoproto.moretags) = 'search:"Node ID,store" sql:"pk"']; - string name = 2 [(gogoproto.moretags) = 'search:"Node,store"']; - google.protobuf.Timestamp scan_time = 3 [(gogoproto.moretags) = 'search:"Node Scan Time,store"']; - scannerV1.Components components = 4; - repeated scannerV1.Note notes = 5; -} diff --git a/proto/internalapi/sensor/compliance_nodescan_iservice.proto b/proto/internalapi/sensor/compliance_nodescan_iservice.proto deleted file mode 100644 index 709d2f0e04e7b..0000000000000 --- a/proto/internalapi/sensor/compliance_nodescan_iservice.proto +++ /dev/null @@ -1,18 +0,0 @@ -syntax = "proto3"; - -option go_package = "sensor"; - -import "internalapi/sensor/compliance_nodescan.proto"; - -package sensor; - -message FullNodeScanRequest { - string node = 1; - FullNodeScan msg = 2; -} - -message FullNodeScanResponse {} - -service ComplianceNodeScanService { - rpc Communicate (stream FullNodeScanRequest) returns (stream FullNodeScanResponse); -} diff --git a/proto/storage/node.proto b/proto/storage/node.proto index de8b3e3cae363..03b01cc01f311 100644 --- a/proto/storage/node.proto +++ b/proto/storage/node.proto @@ -4,10 +4,13 @@ option go_package = "storage"; option java_package = "io.stackrox.proto.storage"; import "google/protobuf/timestamp.proto"; +import "scanner/api/v1/note.proto"; +import "scanner/api/v1/component.proto"; import "storage/container_runtime.proto"; import "storage/taints.proto"; import "storage/vulnerability.proto"; + import "gogoproto/gogo.proto"; package storage; @@ -70,7 +73,7 @@ message Node { // Next tag: 5 message NodeScan { - google.protobuf.Timestamp scan_time = 1 [(gogoproto.moretags) = 'search:"Node Scan Time,store"']; + google.protobuf.Timestamp san_time = 1 [(gogoproto.moretags) = 'search:"Node Scan Time,store"']; string operating_system = 3; repeated EmbeddedNodeScanComponent components = 2 [(gogoproto.moretags) = 'sql:"-"']; @@ -82,6 +85,15 @@ message NodeScan { repeated Note notes = 4; } +// Names and data types are designed to follow NodeScan as close as possible +message NodeScanV2 { + string id = 1 [(gogoproto.moretags) = 'search:"Node ID,store" sql:"pk"']; + string name = 2 [(gogoproto.moretags) = 'search:"Node,store"']; + google.protobuf.Timestamp scan_time = 3 [(gogoproto.moretags) = 'search:"Node Scan Time,store"']; + scannerV1.Components components = 4; + repeated scannerV1.Note notes = 5; +} + message EmbeddedNodeScanComponent { string name = 1 [(gogoproto.moretags) = 'search:"Component,store"']; string version = 2 [(gogoproto.moretags) = 'search:"Component Version,store"']; From 8df479c324848e61f68992fb55345423da4b3f99 Mon Sep 17 00:00:00 2001 From: Matthias Meidinger Date: Mon, 10 Oct 2022 11:56:43 +0200 Subject: [PATCH 7/9] Rename NodeScanV2 fields, fix NodeScan change --- proto/storage/node.proto | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proto/storage/node.proto b/proto/storage/node.proto index 03b01cc01f311..0816e5ea809b0 100644 --- a/proto/storage/node.proto +++ b/proto/storage/node.proto @@ -73,7 +73,7 @@ message Node { // Next tag: 5 message NodeScan { - google.protobuf.Timestamp san_time = 1 [(gogoproto.moretags) = 'search:"Node Scan Time,store"']; + google.protobuf.Timestamp scan_time = 1 [(gogoproto.moretags) = 'search:"Node Scan Time,store"']; string operating_system = 3; repeated EmbeddedNodeScanComponent components = 2 [(gogoproto.moretags) = 'sql:"-"']; @@ -87,8 +87,8 @@ message NodeScan { // Names and data types are designed to follow NodeScan as close as possible message NodeScanV2 { - string id = 1 [(gogoproto.moretags) = 'search:"Node ID,store" sql:"pk"']; - string name = 2 [(gogoproto.moretags) = 'search:"Node,store"']; + string node_id = 1 [(gogoproto.moretags) = 'search:"Node ID,store" sql:"pk"']; + string node_name = 2 [(gogoproto.moretags) = 'search:"Node,store"']; google.protobuf.Timestamp scan_time = 3 [(gogoproto.moretags) = 'search:"Node Scan Time,store"']; scannerV1.Components components = 4; repeated scannerV1.Note notes = 5; From 20ca17d6f24ae7d04a2ea43ed8a07dcb9a02bdcb Mon Sep 17 00:00:00 2001 From: Matthias Meidinger Date: Mon, 10 Oct 2022 11:58:05 +0200 Subject: [PATCH 8/9] Update Generated --- .../sensor/compliance_iservice.pb.go | 183 +++++++++---- generated/storage/node.pb.go | 244 +++++++++--------- 2 files changed, 260 insertions(+), 167 deletions(-) diff --git a/generated/internalapi/sensor/compliance_iservice.pb.go b/generated/internalapi/sensor/compliance_iservice.pb.go index c59fa298a5502..e065b7c231d98 100644 --- a/generated/internalapi/sensor/compliance_iservice.pb.go +++ b/generated/internalapi/sensor/compliance_iservice.pb.go @@ -168,6 +168,7 @@ type MsgFromCompliance struct { // Types that are valid to be assigned to Msg: // *MsgFromCompliance_Return // *MsgFromCompliance_AuditEvents + // *MsgFromCompliance_NodeScanV2 Msg isMsgFromCompliance_Msg `protobuf_oneof:"msg"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` @@ -220,6 +221,9 @@ type MsgFromCompliance_Return struct { type MsgFromCompliance_AuditEvents struct { AuditEvents *AuditEvents `protobuf:"bytes,3,opt,name=audit_events,json=auditEvents,proto3,oneof" json:"audit_events,omitempty"` } +type MsgFromCompliance_NodeScanV2 struct { + NodeScanV2 *storage.NodeScanV2 `protobuf:"bytes,4,opt,name=node_scan_v2,json=nodeScanV2,proto3,oneof" json:"node_scan_v2,omitempty"` +} func (*MsgFromCompliance_Return) isMsgFromCompliance_Msg() {} func (m *MsgFromCompliance_Return) Clone() isMsgFromCompliance_Msg { @@ -243,6 +247,17 @@ func (m *MsgFromCompliance_AuditEvents) Clone() isMsgFromCompliance_Msg { cloned.AuditEvents = m.AuditEvents.Clone() return cloned } +func (*MsgFromCompliance_NodeScanV2) isMsgFromCompliance_Msg() {} +func (m *MsgFromCompliance_NodeScanV2) Clone() isMsgFromCompliance_Msg { + if m == nil { + return nil + } + cloned := new(MsgFromCompliance_NodeScanV2) + *cloned = *m + + cloned.NodeScanV2 = m.NodeScanV2.Clone() + return cloned +} func (m *MsgFromCompliance) GetMsg() isMsgFromCompliance_Msg { if m != nil { @@ -272,11 +287,19 @@ func (m *MsgFromCompliance) GetAuditEvents() *AuditEvents { return nil } +func (m *MsgFromCompliance) GetNodeScanV2() *storage.NodeScanV2 { + if x, ok := m.GetMsg().(*MsgFromCompliance_NodeScanV2); ok { + return x.NodeScanV2 + } + return nil +} + // XXX_OneofWrappers is for the internal use of the proto package. func (*MsgFromCompliance) XXX_OneofWrappers() []interface{} { return []interface{}{ (*MsgFromCompliance_Return)(nil), (*MsgFromCompliance_AuditEvents)(nil), + (*MsgFromCompliance_NodeScanV2)(nil), } } @@ -861,51 +884,53 @@ func init() { } var fileDescriptor_9b20c44efbf676a9 = []byte{ - // 690 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xc1, 0x6e, 0xd3, 0x4a, - 0x14, 0x8d, 0x9b, 0xf7, 0xd2, 0xe4, 0x3a, 0xaf, 0x8f, 0x4c, 0x05, 0x24, 0xa6, 0x84, 0x12, 0x75, - 0x91, 0x05, 0x72, 0x4b, 0x90, 0x10, 0x1b, 0x8a, 0x68, 0xd4, 0xd2, 0x42, 0xdb, 0x85, 0xd3, 0x55, - 0x25, 0x64, 0x4d, 0xed, 0xc1, 0x1a, 0x61, 0xcf, 0xa4, 0x33, 0xe3, 0x4a, 0x48, 0x7c, 0x08, 0x4b, - 0x3e, 0x86, 0x05, 0x4b, 0x3e, 0x01, 0x95, 0x05, 0xbf, 0x81, 0x3c, 0x33, 0x89, 0x9d, 0xa2, 0x2c, - 0x60, 0xe7, 0xb9, 0x73, 0xce, 0xbd, 0xe7, 0x9e, 0x7b, 0x3d, 0xf0, 0x88, 0x32, 0x45, 0x04, 0xc3, - 0x29, 0x9e, 0xd2, 0x6d, 0x49, 0x98, 0xe4, 0x62, 0x3b, 0xe2, 0xd9, 0x34, 0xa5, 0x98, 0x45, 0x24, - 0xa4, 0x92, 0x88, 0x2b, 0x1a, 0x11, 0x7f, 0x2a, 0xb8, 0xe2, 0xa8, 0x61, 0x10, 0xde, 0x02, 0xab, - 0x84, 0x57, 0x99, 0x31, 0x56, 0xd8, 0xb0, 0xbc, 0xdb, 0x52, 0x71, 0x81, 0x13, 0xb2, 0x1d, 0xa5, - 0xb9, 0x54, 0x44, 0xd8, 0xf0, 0x83, 0x79, 0x98, 0x33, 0x85, 0x29, 0x23, 0x22, 0x14, 0x39, 0x53, - 0x34, 0xb3, 0xd5, 0xbc, 0xee, 0x0c, 0xf0, 0x3e, 0xbf, 0x20, 0x21, 0xb9, 0x22, 0x4c, 0x99, 0x9b, - 0x41, 0x00, 0x77, 0x5e, 0x11, 0x35, 0x89, 0x04, 0x9e, 0x92, 0x31, 0x67, 0xef, 0x68, 0x12, 0x90, - 0xcb, 0x9c, 0x48, 0x85, 0xee, 0x41, 0x8b, 0xf1, 0x98, 0x84, 0x0c, 0x67, 0xa4, 0xeb, 0x6c, 0x3a, - 0xc3, 0x56, 0xd0, 0x2c, 0x02, 0xa7, 0x38, 0x23, 0xc5, 0xa5, 0xd4, 0x9c, 0x90, 0xc6, 0xdd, 0x15, - 0x73, 0x69, 0x02, 0x47, 0xf1, 0xe0, 0x05, 0xb8, 0x2f, 0xf3, 0x98, 0xaa, 0xfd, 0xa2, 0x8e, 0x44, - 0x3b, 0xd0, 0xd0, 0x15, 0x65, 0xd7, 0xd9, 0xac, 0x0f, 0xdd, 0x51, 0xd7, 0xb7, 0x6a, 0xfc, 0x37, - 0xf9, 0x05, 0x11, 0x8c, 0x28, 0x22, 0x35, 0x34, 0xb0, 0xb8, 0xc1, 0x67, 0x07, 0x3a, 0x27, 0x32, - 0x39, 0x10, 0x3c, 0x1b, 0xcf, 0x7d, 0x40, 0x08, 0xfe, 0x29, 0xea, 0x5b, 0x2d, 0xfa, 0x1b, 0x3d, - 0x85, 0x86, 0x20, 0x2a, 0x17, 0x4c, 0x8b, 0x70, 0x47, 0x1b, 0x7e, 0x69, 0x9c, 0x5f, 0x72, 0x03, - 0x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0xb7, 0x8f, 0xee, 0x45, - 0x43, 0xbf, 0x7d, 0x4f, 0x7e, 0x05, 0x00, 0x00, 0xff, 0xff, 0x4a, 0xbe, 0xe7, 0x0b, 0xb3, 0x05, - 0x00, 0x00, + // 725 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x41, 0x6f, 0xd3, 0x4a, + 0x10, 0x8e, 0x9b, 0xbe, 0x34, 0x19, 0xe7, 0xf5, 0xbd, 0x6c, 0xf5, 0x1e, 0x8e, 0x29, 0xa1, 0x44, + 0x3d, 0xe4, 0x80, 0xdc, 0x12, 0x24, 0xe0, 0x42, 0x11, 0x8d, 0x5a, 0x52, 0x68, 0x7b, 0x70, 0x2a, + 0x0e, 0x95, 0x90, 0xb5, 0xb5, 0x17, 0x6b, 0x45, 0xbc, 0x9b, 0xee, 0xae, 0x2b, 0x21, 0xf1, 0x43, + 0xf8, 0x41, 0x1c, 0x38, 0x72, 0xe5, 0x86, 0xca, 0x81, 0xbf, 0x81, 0xbc, 0x5e, 0xc7, 0x4e, 0x51, + 0x0e, 0x70, 0xb3, 0x67, 0xbf, 0x6f, 0xf6, 0x9b, 0x6f, 0x66, 0x07, 0xee, 0x53, 0xa6, 0x88, 0x60, + 0x78, 0x8a, 0x67, 0x74, 0x47, 0x12, 0x26, 0xb9, 0xd8, 0x09, 0x79, 0x32, 0x9b, 0x52, 0xcc, 0x42, + 0x12, 0x50, 0x49, 0xc4, 0x15, 0x0d, 0x89, 0x37, 0x13, 0x5c, 0x71, 0xd4, 0xc8, 0x11, 0xee, 0x02, + 0xab, 0x84, 0x57, 0x99, 0x11, 0x56, 0x38, 0x67, 0xb9, 0xff, 0x49, 0xc5, 0x05, 0x8e, 0xc9, 0x4e, + 0x38, 0x4d, 0xa5, 0x22, 0xc2, 0x84, 0xef, 0xce, 0xc3, 0x9c, 0x29, 0x4c, 0x19, 0x11, 0x81, 0x48, + 0x99, 0xa2, 0x89, 0xb9, 0xcd, 0x75, 0x0a, 0xc0, 0xbb, 0xf4, 0x82, 0x04, 0xe4, 0x8a, 0x30, 0x65, + 0x4e, 0x50, 0x71, 0xc2, 0x78, 0x64, 0xd0, 0x7d, 0x1f, 0xfe, 0x7f, 0x41, 0xd4, 0x24, 0x14, 0x78, + 0x46, 0x46, 0x9c, 0xbd, 0xa5, 0xb1, 0x4f, 0x2e, 0x53, 0x22, 0x15, 0xba, 0x0d, 0xad, 0x0c, 0x17, + 0x30, 0x9c, 0x10, 0xc7, 0xda, 0xb2, 0x06, 0x2d, 0xbf, 0x99, 0x05, 0x4e, 0x71, 0x42, 0xb2, 0x43, + 0xa9, 0x39, 0x01, 0x8d, 0x9c, 0x95, 0xfc, 0x30, 0x0f, 0x1c, 0x45, 0xfd, 0x67, 0x60, 0x3f, 0x4f, + 0x23, 0xaa, 0x0e, 0xb2, 0xbb, 0x25, 0xda, 0x85, 0x86, 0x56, 0x21, 0x1d, 0x6b, 0xab, 0x3e, 0xb0, + 0x87, 0x8e, 0x67, 0x74, 0x78, 0xaf, 0xd2, 0x0b, 0x22, 0x18, 0x51, 0x44, 0x6a, 0xa8, 0x6f, 0x70, + 0xfd, 0xaf, 0x16, 0x74, 0x4e, 0x64, 0x7c, 0x28, 0x78, 0x32, 0x9a, 0x7b, 0x83, 0x10, 0xac, 0x66, + 0xf7, 0x1b, 0x2d, 0xfa, 0x1b, 0x3d, 0x82, 0x86, 0x20, 0x2a, 0x15, 0x4c, 0x8b, 0xb0, 0x87, 0x9b, + 0x5e, 0x69, 0xa6, 0x57, 0x72, 0x7d, 0x8d, 0x19, 0xd7, 0x7c, 0x83, 0x46, 0x4f, 0xa0, 0x8d, 0x33, + 0x89, 0x81, 0x51, 0x56, 0xd7, 0xec, 0x0d, 0x2f, 0xef, 0x94, 0x57, 0x91, 0x3f, 0xae, 0xf9, 0x36, + 0xae, 0x54, 0xf3, 0x18, 0xda, 0xda, 0x16, 0x19, 0x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cd, 0x87, 0x3f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x26, 0xe1, 0x7f, + 0x02, 0x00, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -1187,6 +1212,27 @@ func (m *MsgFromCompliance_AuditEvents) MarshalToSizedBuffer(dAtA []byte) (int, } return len(dAtA) - i, nil } +func (m *MsgFromCompliance_NodeScanV2) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgFromCompliance_NodeScanV2) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + if m.NodeScanV2 != nil { + { + size, err := m.NodeScanV2.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintComplianceIservice(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x22 + } + return len(dAtA) - i, nil +} func (m *MsgToCompliance) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -1614,6 +1660,18 @@ func (m *MsgFromCompliance_AuditEvents) Size() (n int) { } return n } +func (m *MsgFromCompliance_NodeScanV2) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.NodeScanV2 != nil { + l = m.NodeScanV2.Size() + n += 1 + l + sovComplianceIservice(uint64(l)) + } + return n +} func (m *MsgToCompliance) Size() (n int) { if m == nil { return 0 @@ -2113,6 +2171,41 @@ func (m *MsgFromCompliance) Unmarshal(dAtA []byte) error { } m.Msg = &MsgFromCompliance_AuditEvents{v} iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field NodeScanV2", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowComplianceIservice + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthComplianceIservice + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthComplianceIservice + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + v := &storage.NodeScanV2{} + if err := v.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + m.Msg = &MsgFromCompliance_NodeScanV2{v} + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipComplianceIservice(dAtA[iNdEx:]) diff --git a/generated/storage/node.pb.go b/generated/storage/node.pb.go index 8c1554c157b7e..4e3664357d5c7 100644 --- a/generated/storage/node.pb.go +++ b/generated/storage/node.pb.go @@ -528,7 +528,7 @@ func (m *Node) Clone() *Node { // Next tag: 5 type NodeScan struct { - SanTime *types.Timestamp `protobuf:"bytes,1,opt,name=san_time,json=sanTime,proto3" json:"san_time,omitempty" search:"Node Scan Time,store"` + ScanTime *types.Timestamp `protobuf:"bytes,1,opt,name=scan_time,json=scanTime,proto3" json:"scan_time,omitempty" search:"Node Scan Time,store"` OperatingSystem string `protobuf:"bytes,3,opt,name=operating_system,json=operatingSystem,proto3" json:"operating_system,omitempty"` Components []*EmbeddedNodeScanComponent `protobuf:"bytes,2,rep,name=components,proto3" json:"components,omitempty" sql:"-"` Notes []NodeScan_Note `protobuf:"varint,4,rep,packed,name=notes,proto3,enum=storage.NodeScan_Note" json:"notes,omitempty"` @@ -570,9 +570,9 @@ func (m *NodeScan) XXX_DiscardUnknown() { var xxx_messageInfo_NodeScan proto.InternalMessageInfo -func (m *NodeScan) GetSanTime() *types.Timestamp { +func (m *NodeScan) GetScanTime() *types.Timestamp { if m != nil { - return m.SanTime + return m.ScanTime } return nil } @@ -608,7 +608,7 @@ func (m *NodeScan) Clone() *NodeScan { cloned := new(NodeScan) *cloned = *m - cloned.SanTime = m.SanTime.Clone() + cloned.ScanTime = m.ScanTime.Clone() if m.Components != nil { cloned.Components = make([]*EmbeddedNodeScanComponent, len(m.Components)) for idx, v := range m.Components { @@ -624,8 +624,8 @@ func (m *NodeScan) Clone() *NodeScan { // Names and data types are designed to follow NodeScan as close as possible type NodeScanV2 struct { - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty" search:"Node ID,store" sql:"pk"` - Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty" search:"Node,store"` + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" search:"Node ID,store" sql:"pk"` + NodeName string `protobuf:"bytes,2,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty" search:"Node,store"` ScanTime *types.Timestamp `protobuf:"bytes,3,opt,name=scan_time,json=scanTime,proto3" json:"scan_time,omitempty" search:"Node Scan Time,store"` Components *v1.Components `protobuf:"bytes,4,opt,name=components,proto3" json:"components,omitempty"` Notes []v1.Note `protobuf:"varint,5,rep,packed,name=notes,proto3,enum=scannerV1.Note" json:"notes,omitempty"` @@ -667,16 +667,16 @@ func (m *NodeScanV2) XXX_DiscardUnknown() { var xxx_messageInfo_NodeScanV2 proto.InternalMessageInfo -func (m *NodeScanV2) GetId() string { +func (m *NodeScanV2) GetNodeId() string { if m != nil { - return m.Id + return m.NodeId } return "" } -func (m *NodeScanV2) GetName() string { +func (m *NodeScanV2) GetNodeName() string { if m != nil { - return m.Name + return m.NodeName } return "" } @@ -896,96 +896,96 @@ func init() { func init() { proto.RegisterFile("storage/node.proto", fileDescriptor_107f6eed651900c7) } var fileDescriptor_107f6eed651900c7 = []byte{ - // 1410 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x57, 0xdf, 0x4e, 0x1b, 0xc7, - 0x17, 0xc6, 0x36, 0x7f, 0xec, 0x63, 0x02, 0x66, 0x12, 0xc8, 0xe2, 0x04, 0x76, 0x7f, 0xfb, 0x6b, - 0x12, 0x47, 0x21, 0xa6, 0x21, 0xa9, 0x94, 0x20, 0x85, 0x0a, 0x1b, 0xda, 0x90, 0xa4, 0x0e, 0x5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0e, 0x21, 0x94, 0x3b, 0xdc, - 0xa3, 0x84, 0x69, 0x73, 0x52, 0x70, 0x3d, 0x2d, 0xb8, 0x7b, 0x05, 0x08, 0x55, 0xef, 0x8e, 0x86, - 0xba, 0x96, 0x52, 0xbd, 0x82, 0x98, 0x56, 0x52, 0x10, 0xbd, 0x87, 0xc2, 0xf7, 0xd4, 0x23, 0xd8, - 0xb5, 0x1d, 0xae, 0xdd, 0x30, 0x32, 0x95, 0xe2, 0x56, 0xb9, 0x1a, 0xf6, 0x6e, 0x55, 0xf5, 0x6e, - 0xf5, 0x48, 0xf5, 0x6e, 0xed, 0x7f, 0xa3, 0xa1, 0xbe, 0x96, 0x52, 0x7e, 0x4d, 0x3d, 0x62, 0x08, - 0x80, 0x4a, 0x45, 0x3e, 0xd4, 0xdb, 0xe5, 0x68, 0x0b, 0x96, 0x3d, 0xc2, 0x71, 0x40, 0x9c, 0x9e, - 0xed, 0xf9, 0xb6, 0xe3, 0xba, 0x01, 0x66, 0x0c, 0x33, 0x2d, 0x6f, 0xe4, 0x2a, 0x05, 0xeb, 0xa6, - 0x72, 0x1e, 0xf8, 0xbb, 0xca, 0x25, 0x38, 0xf8, 0xe2, 0x3a, 0x4e, 0x21, 0xe4, 0x28, 0x67, 0x92, - 0xb3, 0x03, 0xab, 0x13, 0x27, 0xc1, 0x1e, 0xe0, 0x80, 0x79, 0x94, 0x68, 0x20, 0x6b, 0x97, 0xd5, - 0x32, 0xd6, 0xed, 0x18, 0x64, 0x85, 0x98, 0x93, 0x10, 0x82, 0x5e, 0xc3, 0xd2, 0x04, 0x5f, 0x5b, - 0x90, 0xb9, 0x58, 0x8b, 0x33, 0x5d, 0x1f, 0x23, 0x1f, 0x90, 0x53, 0x6a, 0x95, 0xc6, 0x25, 0xd1, - 0x3d, 0x58, 0xe8, 0xe2, 0x80, 0xe0, 0x5e, 0x1c, 0x40, 0x51, 0x04, 0x60, 0xdd, 0x08, 0xad, 0x6a, - 0xc9, 0x87, 0x50, 0x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 0x82, 0xca, 0x89, 0x59, 0x2a, 0xf2, - 0x9c, 0x4b, 0xcc, 0xc8, 0x3b, 0x89, 0xf9, 0x26, 0xde, 0x95, 0xd9, 0x57, 0x53, 0x57, 0xd3, 0x6b, - 0x2d, 0x35, 0x40, 0x67, 0x85, 0x3b, 0x31, 0x1b, 0xc7, 0xcf, 0x7a, 0xed, 0xd9, 0x2f, 0x1f, 0xd6, - 0x33, 0xbf, 0x7d, 0x58, 0xcf, 0xfc, 0xfe, 0x61, 0x3d, 0xf3, 0xe3, 0x1f, 0xeb, 0x53, 0xb0, 0xea, - 0xd1, 0x2a, 0xe3, 0x4e, 0xbb, 0x1b, 0xd0, 0x8b, 0xb0, 0x61, 0x54, 0xdc, 0xef, 0xd5, 0x5f, 0x93, - 0xd6, 0xac, 0xb4, 0x3f, 0xfd, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x1f, 0x9e, 0x17, 0x6d, 0xc0, 0x0c, - 0x00, 0x00, + // 1423 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0xdf, 0x52, 0xdb, 0x46, + 0x17, 0xc7, 0x36, 0x7f, 0xec, 0x63, 0x02, 0x66, 0x13, 0x88, 0x70, 0x02, 0xd2, 0xa7, 0xef, 0x4b, + 0xe2, 0x4c, 0x88, 0xf9, 0x42, 0xd2, 0x99, 0x84, 0x69, 0xe8, 0x60, 0x43, 0x1b, 0x27, 0xa9, 0xc3, + 0xc8, 0xc0, 0x45, 0x2e, 0xaa, 0x91, 0xad, 0xc5, 0xa8, 0x36, 0xbb, 0xaa, 0x76, 0xed, 0x81, 0x37, + 0xe9, 0x63, 0xf4, 0xba, 0x4f, 0xd0, 0x8b, 0x5e, 0xf4, 0x09, 0x3c, 0x9d, 0xf4, 0x09, 0xea, 0x27, + 0xe8, 0xec, 0x4a, 0x2b, 0x24, 0x43, 0x26, 0x4d, 0xa7, 0x77, 0xf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0xa9, 0x14, 0xb7, 0xca, 0xd5, 0xb0, 0x76, 0xab, 0xaa, 0x76, + 0xab, 0x87, 0xaa, 0x76, 0x6b, 0xff, 0x19, 0x8f, 0xf4, 0xb5, 0x94, 0xf2, 0x6b, 0xea, 0x11, 0x43, + 0x00, 0x54, 0x28, 0xf2, 0xa1, 0xde, 0x2e, 0x47, 0x5b, 0xb0, 0xec, 0x11, 0x8e, 0x03, 0xe2, 0xf4, + 0x6d, 0xcf, 0xb7, 0x1d, 0xd7, 0x0d, 0x30, 0x63, 0x98, 0x69, 0x79, 0x23, 0x57, 0x29, 0x58, 0x37, + 0x95, 0xb3, 0xe1, 0xef, 0x2a, 0x97, 0xe0, 0xe0, 0xf3, 0xeb, 0x38, 0x85, 0x90, 0xa3, 0x9c, 0x49, + 0xce, 0x0e, 0xac, 0x5e, 0xb9, 0x09, 0xf6, 0x10, 0x07, 0xcc, 0xa3, 0x44, 0x03, 0x99, 0xbb, 0xac, + 0x96, 0xb1, 0x6e, 0xc7, 0x20, 0x2b, 0xc4, 0x1c, 0x87, 0x10, 0xf4, 0x1a, 0x96, 0xae, 0xf0, 0xb5, + 0x05, 0x19, 0x8b, 0xb5, 0x38, 0xd2, 0xf5, 0x09, 0x72, 0x83, 0x9c, 0x50, 0xab, 0x34, 0x29, 0x89, + 0xee, 0xc1, 0x42, 0x0f, 0x07, 0x04, 0xf7, 0xe3, 0x0d, 0x14, 0xc5, 0x06, 0xac, 0x1b, 0xa1, 0x55, + 0x2d, 0xf9, 0x10, 0x4a, 0xd4, 0xc7, 0x81, 0xc3, 0x3d, 0xd2, 0xb5, 0xd9, 0x05, 0xe3, 0xf8, 0x4c, + 0x5b, 0x92, 0xc0, 0xc5, 0xd8, 0xde, 0x92, 0x66, 0xb4, 0x03, 0x79, 0xca, 0x6c, 0xef, 0xcc, 0xe9, + 0x62, 0x6d, 0xfe, 0xea, 0x05, 0x7c, 0xa7, 0xe0, 0x46, 0x88, 0x57, 0x69, 0x98, 0xa3, 0xac, 0x21, + 0x38, 0xe8, 0x01, 0x2c, 0xf6, 0x06, 0x6d, 0xdc, 0xc7, 0x3c, 0xde, 0xd2, 0xa2, 0x5c, 0x69, 0x21, + 0x32, 0xab, 0x3d, 0x6d, 0x00, 0x12, 0x16, 0xdb, 0x0f, 0xe8, 0xf9, 0x45, 0x8c, 0x2d, 0x49, 0x6c, + 0x49, 0x78, 0x0e, 0x84, 0x43, 0xa1, 0x6d, 0x98, 0xef, 0x3b, 0x8c, 0xdb, 0x03, 0xdf, 0x75, 0x38, + 0x76, 0xb5, 0xd5, 0x4f, 0xd6, 0x8e, 0x31, 0x1e, 0xe9, 0x77, 0xd5, 0xb6, 0xdf, 0x3a, 0x8c, 0x1b, + 0x47, 0x21, 0x77, 0xe3, 0xd4, 0x73, 0x5d, 0x2c, 0x2a, 0x53, 0x28, 0x46, 0x46, 0x74, 0x08, 0xc5, + 0xde, 0x73, 0x16, 0xeb, 0x97, 0x3f, 0xa9, 0x1f, 0xdd, 0x25, 0xc2, 0x68, 0x70, 0xea, 0xb0, 0xd3, + 0x6d, 0xd3, 0xeb, 0x12, 0x19, 0x0a, 0xe8, 0x3d, 0x67, 0x4a, 0xf5, 0x25, 0x4c, 0x8b, 0xee, 0xaa, + 0x21, 0x29, 0xb7, 0x94, 0xba, 0x48, 0xad, 0x8e, 0x43, 0x6a, 0x2b, 0xe3, 0x91, 0x8e, 0x7c, 0xda, + 0xf7, 0x3a, 0x17, 0x51, 0x85, 0x0b, 0xb3, 0x69, 0x49, 0x1a, 0x7a, 0x03, 0x10, 0x77, 0x63, 0xa6, + 0xdd, 0x34, 0x32, 0x95, 0x99, 0xda, 0xc3, 0xf1, 0x48, 0xbf, 0x17, 0xf7, 0x05, 0xe5, 0x35, 0xea, + 0x74, 0x40, 0x78, 0x98, 0x0d, 0x75, 0xc0, 0x57, 0x53, 0x56, 0x82, 0x8e, 0x5e, 0xc0, 0x74, 0x67, + 0x88, 0x99, 0x76, 0x4b, 0xca, 0xa4, 0x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ec, 0x97, 0x0f, 0xeb, 0x99, 0xdf, 0x3e, + 0xac, 0x67, 0x7e, 0xff, 0xb0, 0x9e, 0xf9, 0xf1, 0x8f, 0xf5, 0x29, 0x58, 0xf5, 0x68, 0x95, 0x71, + 0xa7, 0xd3, 0x0b, 0xe8, 0x79, 0x58, 0x30, 0x6a, 0xdf, 0xef, 0xd5, 0xdf, 0x95, 0xf6, 0xac, 0xb4, + 0x3f, 0xfd, 0x2b, 0x00, 0x00, 0xff, 0xff, 0x7b, 0x07, 0x28, 0xc5, 0xd4, 0x0c, 0x00, 0x00, } func (m *Node) Marshal() (dAtA []byte, err error) { @@ -1416,9 +1416,9 @@ func (m *NodeScan) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x12 } } - if m.SanTime != nil { + if m.ScanTime != nil { { - size, err := m.SanTime.MarshalToSizedBuffer(dAtA[:i]) + size, err := m.ScanTime.MarshalToSizedBuffer(dAtA[:i]) if err != nil { return 0, err } @@ -1497,17 +1497,17 @@ func (m *NodeScanV2) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x1a } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintNode(dAtA, i, uint64(len(m.Name))) + if len(m.NodeName) > 0 { + i -= len(m.NodeName) + copy(dAtA[i:], m.NodeName) + i = encodeVarintNode(dAtA, i, uint64(len(m.NodeName))) i-- dAtA[i] = 0x12 } - if len(m.Id) > 0 { - i -= len(m.Id) - copy(dAtA[i:], m.Id) - i = encodeVarintNode(dAtA, i, uint64(len(m.Id))) + if len(m.NodeId) > 0 { + i -= len(m.NodeId) + copy(dAtA[i:], m.NodeId) + i = encodeVarintNode(dAtA, i, uint64(len(m.NodeId))) i-- dAtA[i] = 0xa } @@ -1800,8 +1800,8 @@ func (m *NodeScan) Size() (n int) { } var l int _ = l - if m.SanTime != nil { - l = m.SanTime.Size() + if m.ScanTime != nil { + l = m.ScanTime.Size() n += 1 + l + sovNode(uint64(l)) } if len(m.Components) > 0 { @@ -1833,11 +1833,11 @@ func (m *NodeScanV2) Size() (n int) { } var l int _ = l - l = len(m.Id) + l = len(m.NodeId) if l > 0 { n += 1 + l + sovNode(uint64(l)) } - l = len(m.Name) + l = len(m.NodeName) if l > 0 { n += 1 + l + sovNode(uint64(l)) } @@ -3023,7 +3023,7 @@ func (m *NodeScan) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field SanTime", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ScanTime", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -3050,10 +3050,10 @@ func (m *NodeScan) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - if m.SanTime == nil { - m.SanTime = &types.Timestamp{} + if m.ScanTime == nil { + m.ScanTime = &types.Timestamp{} } - if err := m.SanTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + if err := m.ScanTime.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { return err } iNdEx = postIndex @@ -3245,7 +3245,7 @@ func (m *NodeScanV2) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Id", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeId", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3273,11 +3273,11 @@ func (m *NodeScanV2) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Id = string(dAtA[iNdEx:postIndex]) + m.NodeId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 2: if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field NodeName", wireType) } var stringLen uint64 for shift := uint(0); ; shift += 7 { @@ -3305,7 +3305,7 @@ func (m *NodeScanV2) Unmarshal(dAtA []byte) error { if postIndex > l { return io.ErrUnexpectedEOF } - m.Name = string(dAtA[iNdEx:postIndex]) + m.NodeName = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex case 3: if wireType != 2 { From 9fd6488d70c3cf0c5a212e64f81ce90d5fab3824 Mon Sep 17 00:00:00 2001 From: Matthias Meidinger Date: Tue, 11 Oct 2022 09:53:12 +0200 Subject: [PATCH 9/9] Remove obsolete comment --- generated/storage/node.pb.go | 1 - proto/storage/node.proto | 1 - 2 files changed, 2 deletions(-) diff --git a/generated/storage/node.pb.go b/generated/storage/node.pb.go index 4e3664357d5c7..e0affe5ffad07 100644 --- a/generated/storage/node.pb.go +++ b/generated/storage/node.pb.go @@ -622,7 +622,6 @@ func (m *NodeScan) Clone() *NodeScan { return cloned } -// Names and data types are designed to follow NodeScan as close as possible type NodeScanV2 struct { NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty" search:"Node ID,store" sql:"pk"` NodeName string `protobuf:"bytes,2,opt,name=node_name,json=nodeName,proto3" json:"node_name,omitempty" search:"Node,store"` diff --git a/proto/storage/node.proto b/proto/storage/node.proto index 0816e5ea809b0..d53b918657dd9 100644 --- a/proto/storage/node.proto +++ b/proto/storage/node.proto @@ -85,7 +85,6 @@ message NodeScan { repeated Note notes = 4; } -// Names and data types are designed to follow NodeScan as close as possible message NodeScanV2 { string node_id = 1 [(gogoproto.moretags) = 'search:"Node ID,store" sql:"pk"']; string node_name = 2 [(gogoproto.moretags) = 'search:"Node,store"'];