// Code generated by protoc-gen-go. DO NOT EDIT.
// versions:
// protoc-gen-go v1.36.11
// protoc v3.21.12
// source: insights_models.proto
package models
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
unsafe "unsafe"
)
const (
// Verify that this generated code is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
// Verify that runtime/protoimpl is sufficiently up-to-date.
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
)
type InsightVulnerabilitySeverity_Type int32
const (
InsightVulnerabilitySeverity_UNKNOWN_TYPE InsightVulnerabilitySeverity_Type = 0
InsightVulnerabilitySeverity_CVSSV2 InsightVulnerabilitySeverity_Type = 1
InsightVulnerabilitySeverity_CVSSV3 InsightVulnerabilitySeverity_Type = 2
)
// Enum value maps for InsightVulnerabilitySeverity_Type.
var (
InsightVulnerabilitySeverity_Type_name = map[int32]string{
0: "UNKNOWN_TYPE",
1: "CVSSV2",
2: "CVSSV3",
}
InsightVulnerabilitySeverity_Type_value = map[string]int32{
"UNKNOWN_TYPE": 0,
"CVSSV2": 1,
"CVSSV3": 2,
}
)
func (x InsightVulnerabilitySeverity_Type) Enum() *InsightVulnerabilitySeverity_Type {
p := new(InsightVulnerabilitySeverity_Type)
*p = x
return p
}
func (x InsightVulnerabilitySeverity_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (InsightVulnerabilitySeverity_Type) Descriptor() protoreflect.EnumDescriptor {
return file_insights_models_proto_enumTypes[0].Descriptor()
}
func (InsightVulnerabilitySeverity_Type) Type() protoreflect.EnumType {
return &file_insights_models_proto_enumTypes[0]
}
func (x InsightVulnerabilitySeverity_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use InsightVulnerabilitySeverity_Type.Descriptor instead.
func (InsightVulnerabilitySeverity_Type) EnumDescriptor() ([]byte, []int) {
return file_insights_models_proto_rawDescGZIP(), []int{0, 0}
}
type InsightVulnerabilitySeverity_Risk int32
const (
InsightVulnerabilitySeverity_UNKNOWN_RISK InsightVulnerabilitySeverity_Risk = 0
InsightVulnerabilitySeverity_LOW InsightVulnerabilitySeverity_Risk = 1
InsightVulnerabilitySeverity_MEDIUM InsightVulnerabilitySeverity_Risk = 2
InsightVulnerabilitySeverity_HIGH InsightVulnerabilitySeverity_Risk = 3
InsightVulnerabilitySeverity_CRITICAL InsightVulnerabilitySeverity_Risk = 4
)
// Enum value maps for InsightVulnerabilitySeverity_Risk.
var (
InsightVulnerabilitySeverity_Risk_name = map[int32]string{
0: "UNKNOWN_RISK",
1: "LOW",
2: "MEDIUM",
3: "HIGH",
4: "CRITICAL",
}
InsightVulnerabilitySeverity_Risk_value = map[string]int32{
"UNKNOWN_RISK": 0,
"LOW": 1,
"MEDIUM": 2,
"HIGH": 3,
"CRITICAL": 4,
}
)
func (x InsightVulnerabilitySeverity_Risk) Enum() *InsightVulnerabilitySeverity_Risk {
p := new(InsightVulnerabilitySeverity_Risk)
*p = x
return p
}
func (x InsightVulnerabilitySeverity_Risk) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (InsightVulnerabilitySeverity_Risk) Descriptor() protoreflect.EnumDescriptor {
return file_insights_models_proto_enumTypes[1].Descriptor()
}
func (InsightVulnerabilitySeverity_Risk) Type() protoreflect.EnumType {
return &file_insights_models_proto_enumTypes[1]
}
func (x InsightVulnerabilitySeverity_Risk) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use InsightVulnerabilitySeverity_Risk.Descriptor instead.
func (InsightVulnerabilitySeverity_Risk) EnumDescriptor() ([]byte, []int) {
return file_insights_models_proto_rawDescGZIP(), []int{0, 1}
}
type InsightProjectInfo_Type int32
const (
InsightProjectInfo_UNKNOWN InsightProjectInfo_Type = 0
InsightProjectInfo_GITHUB InsightProjectInfo_Type = 1
)
// Enum value maps for InsightProjectInfo_Type.
var (
InsightProjectInfo_Type_name = map[int32]string{
0: "UNKNOWN",
1: "GITHUB",
}
InsightProjectInfo_Type_value = map[string]int32{
"UNKNOWN": 0,
"GITHUB": 1,
}
)
func (x InsightProjectInfo_Type) Enum() *InsightProjectInfo_Type {
p := new(InsightProjectInfo_Type)
*p = x
return p
}
func (x InsightProjectInfo_Type) String() string {
return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
}
func (InsightProjectInfo_Type) Descriptor() protoreflect.EnumDescriptor {
return file_insights_models_proto_enumTypes[2].Descriptor()
}
func (InsightProjectInfo_Type) Type() protoreflect.EnumType {
return &file_insights_models_proto_enumTypes[2]
}
func (x InsightProjectInfo_Type) Number() protoreflect.EnumNumber {
return protoreflect.EnumNumber(x)
}
// Deprecated: Use InsightProjectInfo_Type.Descriptor instead.
func (InsightProjectInfo_Type) EnumDescriptor() ([]byte, []int) {
return file_insights_models_proto_rawDescGZIP(), []int{4, 0}
}
type InsightVulnerabilitySeverity struct {
state protoimpl.MessageState `protogen:"open.v1"`
Type InsightVulnerabilitySeverity_Type `protobuf:"varint,1,opt,name=type,proto3,enum=InsightVulnerabilitySeverity_Type" json:"type,omitempty"`
Score string `protobuf:"bytes,2,opt,name=score,proto3" json:"score,omitempty"` // Score based on type (usually the CVSS metric)
Risk InsightVulnerabilitySeverity_Risk `protobuf:"varint,3,opt,name=risk,proto3,enum=InsightVulnerabilitySeverity_Risk" json:"risk,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *InsightVulnerabilitySeverity) Reset() {
*x = InsightVulnerabilitySeverity{}
mi := &file_insights_models_proto_msgTypes[0]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *InsightVulnerabilitySeverity) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InsightVulnerabilitySeverity) ProtoMessage() {}
func (x *InsightVulnerabilitySeverity) ProtoReflect() protoreflect.Message {
mi := &file_insights_models_proto_msgTypes[0]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InsightVulnerabilitySeverity.ProtoReflect.Descriptor instead.
func (*InsightVulnerabilitySeverity) Descriptor() ([]byte, []int) {
return file_insights_models_proto_rawDescGZIP(), []int{0}
}
func (x *InsightVulnerabilitySeverity) GetType() InsightVulnerabilitySeverity_Type {
if x != nil {
return x.Type
}
return InsightVulnerabilitySeverity_UNKNOWN_TYPE
}
func (x *InsightVulnerabilitySeverity) GetScore() string {
if x != nil {
return x.Score
}
return ""
}
func (x *InsightVulnerabilitySeverity) GetRisk() InsightVulnerabilitySeverity_Risk {
if x != nil {
return x.Risk
}
return InsightVulnerabilitySeverity_UNKNOWN_RISK
}
type InsightVulnerability struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // OSV ID
Cve string `protobuf:"bytes,2,opt,name=cve,proto3" json:"cve,omitempty"` // CVE ID. DO NOT USE THIS outside vet. Its used for internal legacy reason
Title string `protobuf:"bytes,3,opt,name=title,proto3" json:"title,omitempty"`
Aliases []string `protobuf:"bytes,4,rep,name=aliases,proto3" json:"aliases,omitempty"` // Other IDs for same vuln in different databases
Severities []*InsightVulnerabilitySeverity `protobuf:"bytes,5,rep,name=severities,proto3" json:"severities,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *InsightVulnerability) Reset() {
*x = InsightVulnerability{}
mi := &file_insights_models_proto_msgTypes[1]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *InsightVulnerability) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InsightVulnerability) ProtoMessage() {}
func (x *InsightVulnerability) ProtoReflect() protoreflect.Message {
mi := &file_insights_models_proto_msgTypes[1]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InsightVulnerability.ProtoReflect.Descriptor instead.
func (*InsightVulnerability) Descriptor() ([]byte, []int) {
return file_insights_models_proto_rawDescGZIP(), []int{1}
}
func (x *InsightVulnerability) GetId() string {
if x != nil {
return x.Id
}
return ""
}
func (x *InsightVulnerability) GetCve() string {
if x != nil {
return x.Cve
}
return ""
}
func (x *InsightVulnerability) GetTitle() string {
if x != nil {
return x.Title
}
return ""
}
func (x *InsightVulnerability) GetAliases() []string {
if x != nil {
return x.Aliases
}
return nil
}
func (x *InsightVulnerability) GetSeverities() []*InsightVulnerabilitySeverity {
if x != nil {
return x.Severities
}
return nil
}
type InsightLicenseInfo struct {
state protoimpl.MessageState `protogen:"open.v1"`
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // SPDX license ID
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *InsightLicenseInfo) Reset() {
*x = InsightLicenseInfo{}
mi := &file_insights_models_proto_msgTypes[2]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *InsightLicenseInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InsightLicenseInfo) ProtoMessage() {}
func (x *InsightLicenseInfo) ProtoReflect() protoreflect.Message {
mi := &file_insights_models_proto_msgTypes[2]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InsightLicenseInfo.ProtoReflect.Descriptor instead.
func (*InsightLicenseInfo) Descriptor() ([]byte, []int) {
return file_insights_models_proto_rawDescGZIP(), []int{2}
}
func (x *InsightLicenseInfo) GetId() string {
if x != nil {
return x.Id
}
return ""
}
type InsightScorecard struct {
state protoimpl.MessageState `protogen:"open.v1"`
Scores map[string]float32 `protobuf:"bytes,1,rep,name=scores,proto3" json:"scores,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"fixed32,2,opt,name=value"`
Score float32 `protobuf:"fixed32,2,opt,name=score,proto3" json:"score,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *InsightScorecard) Reset() {
*x = InsightScorecard{}
mi := &file_insights_models_proto_msgTypes[3]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *InsightScorecard) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InsightScorecard) ProtoMessage() {}
func (x *InsightScorecard) ProtoReflect() protoreflect.Message {
mi := &file_insights_models_proto_msgTypes[3]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InsightScorecard.ProtoReflect.Descriptor instead.
func (*InsightScorecard) Descriptor() ([]byte, []int) {
return file_insights_models_proto_rawDescGZIP(), []int{3}
}
func (x *InsightScorecard) GetScores() map[string]float32 {
if x != nil {
return x.Scores
}
return nil
}
func (x *InsightScorecard) GetScore() float32 {
if x != nil {
return x.Score
}
return 0
}
type InsightProjectInfo struct {
state protoimpl.MessageState `protogen:"open.v1"`
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Type InsightProjectInfo_Type `protobuf:"varint,2,opt,name=type,proto3,enum=InsightProjectInfo_Type" json:"type,omitempty"`
Stars int32 `protobuf:"varint,3,opt,name=stars,proto3" json:"stars,omitempty"`
Forks int32 `protobuf:"varint,4,opt,name=forks,proto3" json:"forks,omitempty"`
Issues int32 `protobuf:"varint,5,opt,name=issues,proto3" json:"issues,omitempty"`
Url string `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"`
unknownFields protoimpl.UnknownFields
sizeCache protoimpl.SizeCache
}
func (x *InsightProjectInfo) Reset() {
*x = InsightProjectInfo{}
mi := &file_insights_models_proto_msgTypes[4]
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
ms.StoreMessageInfo(mi)
}
func (x *InsightProjectInfo) String() string {
return protoimpl.X.MessageStringOf(x)
}
func (*InsightProjectInfo) ProtoMessage() {}
func (x *InsightProjectInfo) ProtoReflect() protoreflect.Message {
mi := &file_insights_models_proto_msgTypes[4]
if x != nil {
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
if ms.LoadMessageInfo() == nil {
ms.StoreMessageInfo(mi)
}
return ms
}
return mi.MessageOf(x)
}
// Deprecated: Use InsightProjectInfo.ProtoReflect.Descriptor instead.
func (*InsightProjectInfo) Descriptor() ([]byte, []int) {
return file_insights_models_proto_rawDescGZIP(), []int{4}
}
func (x *InsightProjectInfo) GetName() string {
if x != nil {
return x.Name
}
return ""
}
func (x *InsightProjectInfo) GetType() InsightProjectInfo_Type {
if x != nil {
return x.Type
}
return InsightProjectInfo_UNKNOWN
}
func (x *InsightProjectInfo) GetStars() int32 {
if x != nil {
return x.Stars
}
return 0
}
func (x *InsightProjectInfo) GetForks() int32 {
if x != nil {
return x.Forks
}
return 0
}
func (x *InsightProjectInfo) GetIssues() int32 {
if x != nil {
return x.Issues
}
return 0
}
func (x *InsightProjectInfo) GetUrl() string {
if x != nil {
return x.Url
}
return ""
}
var File_insights_models_proto protoreflect.FileDescriptor
const file_insights_models_proto_rawDesc = "" +
"\n" +
"\x15insights_models.proto\"\x9d\x02\n" +
"\x1cInsightVulnerabilitySeverity\x126\n" +
"\x04type\x18\x01 \x01(\x0e2\".InsightVulnerabilitySeverity.TypeR\x04type\x12\x14\n" +
"\x05score\x18\x02 \x01(\tR\x05score\x126\n" +
"\x04risk\x18\x03 \x01(\x0e2\".InsightVulnerabilitySeverity.RiskR\x04risk\"0\n" +
"\x04Type\x12\x10\n" +
"\fUNKNOWN_TYPE\x10\x00\x12\n" +
"\n" +
"\x06CVSSV2\x10\x01\x12\n" +
"\n" +
"\x06CVSSV3\x10\x02\"E\n" +
"\x04Risk\x12\x10\n" +
"\fUNKNOWN_RISK\x10\x00\x12\a\n" +
"\x03LOW\x10\x01\x12\n" +
"\n" +
"\x06MEDIUM\x10\x02\x12\b\n" +
"\x04HIGH\x10\x03\x12\f\n" +
"\bCRITICAL\x10\x04\"\xa7\x01\n" +
"\x14InsightVulnerability\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\x12\x10\n" +
"\x03cve\x18\x02 \x01(\tR\x03cve\x12\x14\n" +
"\x05title\x18\x03 \x01(\tR\x05title\x12\x18\n" +
"\aaliases\x18\x04 \x03(\tR\aaliases\x12=\n" +
"\n" +
"severities\x18\x05 \x03(\v2\x1d.InsightVulnerabilitySeverityR\n" +
"severities\"$\n" +
"\x12InsightLicenseInfo\x12\x0e\n" +
"\x02id\x18\x01 \x01(\tR\x02id\"\x9a\x01\n" +
"\x10InsightScorecard\x125\n" +
"\x06scores\x18\x01 \x03(\v2\x1d.InsightScorecard.ScoresEntryR\x06scores\x12\x14\n" +
"\x05score\x18\x02 \x01(\x02R\x05score\x1a9\n" +
"\vScoresEntry\x12\x10\n" +
"\x03key\x18\x01 \x01(\tR\x03key\x12\x14\n" +
"\x05value\x18\x02 \x01(\x02R\x05value:\x028\x01\"\xcd\x01\n" +
"\x12InsightProjectInfo\x12\x12\n" +
"\x04name\x18\x01 \x01(\tR\x04name\x12,\n" +
"\x04type\x18\x02 \x01(\x0e2\x18.InsightProjectInfo.TypeR\x04type\x12\x14\n" +
"\x05stars\x18\x03 \x01(\x05R\x05stars\x12\x14\n" +
"\x05forks\x18\x04 \x01(\x05R\x05forks\x12\x16\n" +
"\x06issues\x18\x05 \x01(\x05R\x06issues\x12\x10\n" +
"\x03url\x18\x06 \x01(\tR\x03url\"\x1f\n" +
"\x04Type\x12\v\n" +
"\aUNKNOWN\x10\x00\x12\n" +
"\n" +
"\x06GITHUB\x10\x01B#Z!github.com/safedep/vet/gen/modelsb\x06proto3"
var (
file_insights_models_proto_rawDescOnce sync.Once
file_insights_models_proto_rawDescData []byte
)
func file_insights_models_proto_rawDescGZIP() []byte {
file_insights_models_proto_rawDescOnce.Do(func() {
file_insights_models_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_insights_models_proto_rawDesc), len(file_insights_models_proto_rawDesc)))
})
return file_insights_models_proto_rawDescData
}
var file_insights_models_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
var file_insights_models_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
var file_insights_models_proto_goTypes = []any{
(InsightVulnerabilitySeverity_Type)(0), // 0: InsightVulnerabilitySeverity.Type
(InsightVulnerabilitySeverity_Risk)(0), // 1: InsightVulnerabilitySeverity.Risk
(InsightProjectInfo_Type)(0), // 2: InsightProjectInfo.Type
(*InsightVulnerabilitySeverity)(nil), // 3: InsightVulnerabilitySeverity
(*InsightVulnerability)(nil), // 4: InsightVulnerability
(*InsightLicenseInfo)(nil), // 5: InsightLicenseInfo
(*InsightScorecard)(nil), // 6: InsightScorecard
(*InsightProjectInfo)(nil), // 7: InsightProjectInfo
nil, // 8: InsightScorecard.ScoresEntry
}
var file_insights_models_proto_depIdxs = []int32{
0, // 0: InsightVulnerabilitySeverity.type:type_name -> InsightVulnerabilitySeverity.Type
1, // 1: InsightVulnerabilitySeverity.risk:type_name -> InsightVulnerabilitySeverity.Risk
3, // 2: InsightVulnerability.severities:type_name -> InsightVulnerabilitySeverity
8, // 3: InsightScorecard.scores:type_name -> InsightScorecard.ScoresEntry
2, // 4: InsightProjectInfo.type:type_name -> InsightProjectInfo.Type
5, // [5:5] is the sub-list for method output_type
5, // [5:5] is the sub-list for method input_type
5, // [5:5] is the sub-list for extension type_name
5, // [5:5] is the sub-list for extension extendee
0, // [0:5] is the sub-list for field type_name
}
func init() { file_insights_models_proto_init() }
func file_insights_models_proto_init() {
if File_insights_models_proto != nil {
return
}
type x struct{}
out := protoimpl.TypeBuilder{
File: protoimpl.DescBuilder{
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
RawDescriptor: unsafe.Slice(unsafe.StringData(file_insights_models_proto_rawDesc), len(file_insights_models_proto_rawDesc)),
NumEnums: 3,
NumMessages: 6,
NumExtensions: 0,
NumServices: 0,
},
GoTypes: file_insights_models_proto_goTypes,
DependencyIndexes: file_insights_models_proto_depIdxs,
EnumInfos: file_insights_models_proto_enumTypes,
MessageInfos: file_insights_models_proto_msgTypes,
}.Build()
File_insights_models_proto = out.File
file_insights_models_proto_goTypes = nil
file_insights_models_proto_depIdxs = nil
}