Documentation
¶
Index ¶
- Constants
- Variables
- func NewNodeIdentifier(prefixes ...string) string
- type Document
- func (*Document) Descriptor() ([]byte, []int)deprecated
- func (x *Document) GetMetadata() *Metadata
- func (x *Document) GetNodeList() *NodeList
- func (d *Document) GetRootNodes() []*Node
- func (*Document) ProtoMessage()
- func (x *Document) ProtoReflect() protoreflect.Message
- func (x *Document) Reset()
- func (x *Document) String() string
- type Edge
- func (e *Edge) Copy() *Edge
- func (*Edge) Descriptor() ([]byte, []int)deprecated
- func (e *Edge) Equal(e2 *Edge) bool
- func (x *Edge) GetFrom() string
- func (x *Edge) GetTo() []string
- func (x *Edge) GetType() Edge_Type
- func (e *Edge) PointsTo(id string) bool
- func (*Edge) ProtoMessage()
- func (x *Edge) ProtoReflect() protoreflect.Message
- func (x *Edge) Reset()
- func (x *Edge) String() string
- type Edge_Type
- func (Edge_Type) Descriptor() protoreflect.EnumDescriptor
- func (x Edge_Type) Enum() *Edge_Type
- func (Edge_Type) EnumDescriptor() ([]byte, []int)deprecated
- func (x Edge_Type) Number() protoreflect.EnumNumber
- func (x Edge_Type) String() string
- func (et Edge_Type) ToSPDX2() string
- func (Edge_Type) Type() protoreflect.EnumType
- type ExternalReference
- func (*ExternalReference) Descriptor() ([]byte, []int)deprecated
- func (x *ExternalReference) GetAuthority() string
- func (x *ExternalReference) GetComment() string
- func (x *ExternalReference) GetHashes() map[string]string
- func (x *ExternalReference) GetType() string
- func (x *ExternalReference) GetUrl() string
- func (*ExternalReference) ProtoMessage()
- func (x *ExternalReference) ProtoReflect() protoreflect.Message
- func (x *ExternalReference) Reset()
- func (x *ExternalReference) String() string
- func (e *ExternalReference) ToSPDX2Category() string
- func (e *ExternalReference) ToSPDX2Type() string
- type HashAlgorithm
- func (HashAlgorithm) Descriptor() protoreflect.EnumDescriptor
- func (x HashAlgorithm) Enum() *HashAlgorithm
- func (HashAlgorithm) EnumDescriptor() ([]byte, []int)deprecated
- func (x HashAlgorithm) Number() protoreflect.EnumNumber
- func (x HashAlgorithm) String() string
- func (ha HashAlgorithm) ToCycloneDX() cyclonedx.HashAlgorithm
- func (ha HashAlgorithm) ToSPDX() common.ChecksumAlgorithm
- func (HashAlgorithm) Type() protoreflect.EnumType
- type Identifier
- type Metadata
- func (*Metadata) Descriptor() ([]byte, []int)deprecated
- func (x *Metadata) GetAuthors() []*Person
- func (x *Metadata) GetComment() string
- func (x *Metadata) GetDate() *timestamppb.Timestamp
- func (x *Metadata) GetId() string
- func (x *Metadata) GetName() string
- func (x *Metadata) GetTools() []*Tool
- func (x *Metadata) GetVersion() string
- func (*Metadata) ProtoMessage()
- func (x *Metadata) ProtoReflect() protoreflect.Message
- func (x *Metadata) Reset()
- func (x *Metadata) String() string
- type Node
- func (n *Node) Augment(n2 *Node)
- func (n *Node) Copy() *Node
- func (*Node) Descriptor() ([]byte, []int)deprecated
- func (n *Node) Equal(n2 *Node) bool
- func (x *Node) GetAttribution() []string
- func (x *Node) GetBuildDate() *timestamppb.Timestamp
- func (x *Node) GetComment() string
- func (x *Node) GetCopyright() string
- func (x *Node) GetDescription() string
- func (x *Node) GetExternalReferences() []*ExternalReference
- func (x *Node) GetFileName() string
- func (x *Node) GetFileTypes() []string
- func (x *Node) GetHashes() map[string]string
- func (x *Node) GetId() string
- func (x *Node) GetIdentifiers() []*Identifier
- func (x *Node) GetLicenseComments() string
- func (x *Node) GetLicenseConcluded() string
- func (x *Node) GetLicenses() []string
- func (x *Node) GetName() string
- func (x *Node) GetOriginators() []*Person
- func (x *Node) GetPrimaryPurpose() string
- func (x *Node) GetReleaseDate() *timestamppb.Timestamp
- func (x *Node) GetSourceInfo() string
- func (x *Node) GetSummary() string
- func (x *Node) GetSuppliers() []*Person
- func (x *Node) GetType() Node_NodeType
- func (x *Node) GetUrlDownload() string
- func (x *Node) GetUrlHome() string
- func (x *Node) GetValidUntilDate() *timestamppb.Timestamp
- func (x *Node) GetVersion() string
- func (*Node) ProtoMessage()
- func (x *Node) ProtoReflect() protoreflect.Message
- func (n *Node) Purl() PackageURL
- func (x *Node) Reset()
- func (x *Node) String() string
- func (n *Node) Update(n2 *Node)
- type NodeList
- func (nl *NodeList) Add(nl2 *NodeList)
- func (nl *NodeList) AddEdge(e *Edge)
- func (nl *NodeList) AddNode(n *Node)
- func (*NodeList) Descriptor() ([]byte, []int)deprecated
- func (nl *NodeList) Equal(nl2 *NodeList) bool
- func (nl *NodeList) GetEdgeByType(fromElement string, t Edge_Type) *Edge
- func (x *NodeList) GetEdges() []*Edge
- func (nl *NodeList) GetNodeByID(id string) *Node
- func (x *NodeList) GetNodes() []*Node
- func (nl *NodeList) GetNodesByIdentifier(t, v string) []*Node
- func (nl *NodeList) GetNodesByName(name string) []*Node
- func (nl *NodeList) GetNodesByPurlType(purlType string) *NodeList
- func (x *NodeList) GetRootElements() []string
- func (nl *NodeList) GetRootNodes() []*Node
- func (nl *NodeList) Intersect(nl2 *NodeList) *NodeList
- func (*NodeList) ProtoMessage()
- func (x *NodeList) ProtoReflect() protoreflect.Message
- func (nl *NodeList) RelateNodeListAtID(nl2 *NodeList, nodeID string, edgeType Edge_Type) error
- func (nl *NodeList) RemoveNodes(ids []string)
- func (x *NodeList) Reset()
- func (x *NodeList) String() string
- func (nl *NodeList) Union(nl2 *NodeList) *NodeList
- type Node_NodeType
- func (Node_NodeType) Descriptor() protoreflect.EnumDescriptor
- func (x Node_NodeType) Enum() *Node_NodeType
- func (Node_NodeType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Node_NodeType) Number() protoreflect.EnumNumber
- func (x Node_NodeType) String() string
- func (Node_NodeType) Type() protoreflect.EnumType
- type PackageURL
- type Person
- func (*Person) Descriptor() ([]byte, []int)deprecated
- func (x *Person) GetContacts() []*Person
- func (x *Person) GetEmail() string
- func (x *Person) GetIsOrg() bool
- func (x *Person) GetName() string
- func (x *Person) GetPhone() string
- func (x *Person) GetUrl() string
- func (*Person) ProtoMessage()
- func (x *Person) ProtoReflect() protoreflect.Message
- func (x *Person) Reset()
- func (x *Person) String() string
- func (p *Person) ToSPDX2ClientOrg() string
- func (p *Person) ToSPDX2ClientString() string
- type Tool
Constants ¶
const NodeIdentifierPrefix = "protobom"
Variables ¶
var ( HashAlgorithm_name = map[int32]string{ 0: "UNKNOWN", 1: "MD5", 2: "SHA1", 3: "SHA256", 4: "SHA384", 5: "SHA512", 6: "SHA3_256", 7: "SHA3_384", 8: "SHA3_512", 9: "BLAKE2B_256", 10: "BLAKE2B_384", 11: "BLAKE2B_512", 12: "BLAKE3", 13: "MD2", 14: "ADLER32", 15: "MD4", 16: "MD6", 17: "SHA224", } HashAlgorithm_value = map[string]int32{ "UNKNOWN": 0, "MD5": 1, "SHA1": 2, "SHA256": 3, "SHA384": 4, "SHA512": 5, "SHA3_256": 6, "SHA3_384": 7, "SHA3_512": 8, "BLAKE2B_256": 9, "BLAKE2B_384": 10, "BLAKE2B_512": 11, "BLAKE3": 12, "MD2": 13, "ADLER32": 14, "MD4": 15, "MD6": 16, "SHA224": 17, } )
Enum value maps for HashAlgorithm.
var ( Node_NodeType_name = map[int32]string{ 0: "PACKAGE", 1: "FILE", } Node_NodeType_value = map[string]int32{ "PACKAGE": 0, "FILE": 1, } )
Enum value maps for Node_NodeType.
var ( Edge_Type_name = map[int32]string{ 0: "UNKNOWN", 1: "amends", 2: "ancestor", 3: "buildDependency", 4: "buildTool", 5: "contains", 6: "contained_by", 7: "copy", 8: "dataFile", 9: "dependencyManifest", 10: "dependsOn", 11: "dependencyOf", 12: "descendant", 13: "describes", 14: "describedBy", 15: "devDependency", 16: "devTool", 17: "distributionArtifact", 18: "documentation", 19: "dynamicLink", 20: "example", 21: "expandedFromArchive", 22: "fileAdded", 23: "fileDeleted", 24: "fileModified", 25: "generates", 26: "generatedFrom", 27: "metafile", 28: "optionalComponent", 29: "optionalDependency", 30: "other", 31: "packages", 32: "patch", 33: "prerequisite", 34: "prerequisiteFor", 35: "providedDependency", 36: "requirementFor", 37: "runtimeDependency", 38: "specificationFor", 39: "staticLink", 40: "test", 41: "testCase", 42: "testDependency", 43: "testTool", 44: "variant", } Edge_Type_value = map[string]int32{ "UNKNOWN": 0, "amends": 1, "ancestor": 2, "buildDependency": 3, "buildTool": 4, "contains": 5, "contained_by": 6, "copy": 7, "dataFile": 8, "dependencyManifest": 9, "dependsOn": 10, "dependencyOf": 11, "descendant": 12, "describes": 13, "describedBy": 14, "devDependency": 15, "devTool": 16, "distributionArtifact": 17, "documentation": 18, "dynamicLink": 19, "example": 20, "expandedFromArchive": 21, "fileAdded": 22, "fileDeleted": 23, "fileModified": 24, "generates": 25, "generatedFrom": 26, "metafile": 27, "optionalComponent": 28, "optionalDependency": 29, "other": 30, "packages": 31, "patch": 32, "prerequisite": 33, "prerequisiteFor": 34, "providedDependency": 35, "requirementFor": 36, "runtimeDependency": 37, "specificationFor": 38, "staticLink": 39, "test": 40, "testCase": 41, "testDependency": 42, "testTool": 43, "variant": 44, } )
Enum value maps for Edge_Type.
var File_api_sbom_proto protoreflect.FileDescriptor
Functions ¶
func NewNodeIdentifier ¶
NewNodeIdentifier returns an identifier string that can be used in a node and that is guaranteed to be compatible with CycloneDX and SPDX.
Without options, identifiers will be created using a new UUID and prefixed with a prefix like "protobom-xx-yy--". This prefix allows serializers to read characteristics of the identifier string, by looking for keywords before the double dash. For example, "auto" means that it was autogenerated and did not come from an ingested SBOM.
Without any strings seeding it, NewNodeIdentifier generates the identifier using an UUID. If a string is provided, any invalid characters will be removed and the new string will be used as the identifier.
Types ¶
type Document ¶
type Document struct {
Metadata *Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
NodeList *NodeList `protobuf:"bytes,2,opt,name=node_list,json=nodeList,proto3" json:"node_list,omitempty"`
// contains filtered or unexported fields
}
func NewDocument ¶
func NewDocument() *Document
func (*Document) Descriptor
deprecated
func (*Document) GetMetadata ¶
func (*Document) GetNodeList ¶
func (*Document) GetRootNodes ¶
GetRootNodes returns the top level nodes of the document. It calls the underlying method in the document's NodeList.
func (*Document) ProtoMessage ¶
func (*Document) ProtoMessage()
func (*Document) ProtoReflect ¶
func (x *Document) ProtoReflect() protoreflect.Message
type Edge ¶
type Edge struct {
Type Edge_Type `protobuf:"varint,1,opt,name=type,proto3,enum=bomsquad.protobom.Edge_Type" json:"type,omitempty"`
From string `protobuf:"bytes,2,opt,name=from,proto3" json:"from,omitempty"`
To []string `protobuf:"bytes,3,rep,name=to,proto3" json:"to,omitempty"`
// contains filtered or unexported fields
}
func (*Edge) Descriptor
deprecated
func (*Edge) PointsTo ¶
PointsTo returns true if an edge points to a node, in other words if it has id in its list of Tos
func (*Edge) ProtoMessage ¶
func (*Edge) ProtoMessage()
func (*Edge) ProtoReflect ¶
func (x *Edge) ProtoReflect() protoreflect.Message
type Edge_Type ¶
type Edge_Type int32
const ( Edge_UNKNOWN Edge_Type = 0 Edge_amends Edge_Type = 1 Edge_ancestor Edge_Type = 2 Edge_buildDependency Edge_Type = 3 Edge_buildTool Edge_Type = 4 Edge_contains Edge_Type = 5 Edge_contained_by Edge_Type = 6 // Not in SPDX3 Edge_copy Edge_Type = 7 Edge_dataFile Edge_Type = 8 Edge_dependencyManifest Edge_Type = 9 Edge_dependsOn Edge_Type = 10 Edge_dependencyOf Edge_Type = 11 // Not in SPDX3 Edge_descendant Edge_Type = 12 Edge_describes Edge_Type = 13 Edge_describedBy Edge_Type = 14 // Not in SPDX3 Edge_devDependency Edge_Type = 15 Edge_devTool Edge_Type = 16 Edge_distributionArtifact Edge_Type = 17 Edge_documentation Edge_Type = 18 Edge_dynamicLink Edge_Type = 19 Edge_example Edge_Type = 20 Edge_expandedFromArchive Edge_Type = 21 Edge_fileAdded Edge_Type = 22 Edge_fileDeleted Edge_Type = 23 Edge_fileModified Edge_Type = 24 Edge_generates Edge_Type = 25 Edge_generatedFrom Edge_Type = 26 // Not in SPDX3 Edge_metafile Edge_Type = 27 Edge_optionalComponent Edge_Type = 28 Edge_optionalDependency Edge_Type = 29 Edge_other Edge_Type = 30 Edge_packages Edge_Type = 31 Edge_patch Edge_Type = 32 Edge_prerequisite Edge_Type = 33 Edge_prerequisiteFor Edge_Type = 34 // Not in SPDX3 Edge_providedDependency Edge_Type = 35 Edge_requirementFor Edge_Type = 36 Edge_runtimeDependency Edge_Type = 37 Edge_specificationFor Edge_Type = 38 Edge_staticLink Edge_Type = 39 Edge_test Edge_Type = 40 Edge_testCase Edge_Type = 41 Edge_testDependency Edge_Type = 42 Edge_testTool Edge_Type = 43 Edge_variant Edge_Type = 44 )
func EdgeTypeFromSPDX ¶
func EdgeTypeFromSPDX2 ¶
func (Edge_Type) Descriptor ¶
func (Edge_Type) Descriptor() protoreflect.EnumDescriptor
func (Edge_Type) EnumDescriptor
deprecated
func (Edge_Type) Number ¶
func (x Edge_Type) Number() protoreflect.EnumNumber
func (Edge_Type) Type ¶
func (Edge_Type) Type() protoreflect.EnumType
type ExternalReference ¶
type ExternalReference struct {
Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"`
Authority string `protobuf:"bytes,4,opt,name=authority,proto3" json:"authority,omitempty"`
Hashes map[string]string `` /* 153-byte string literal not displayed */
// contains filtered or unexported fields
}
ExternalReference is an entry linking an element to a resource defined outside the SBOM standard
func (*ExternalReference) Descriptor
deprecated
func (*ExternalReference) Descriptor() ([]byte, []int)
Deprecated: Use ExternalReference.ProtoReflect.Descriptor instead.
func (*ExternalReference) GetAuthority ¶
func (x *ExternalReference) GetAuthority() string
func (*ExternalReference) GetComment ¶
func (x *ExternalReference) GetComment() string
func (*ExternalReference) GetHashes ¶
func (x *ExternalReference) GetHashes() map[string]string
func (*ExternalReference) GetType ¶
func (x *ExternalReference) GetType() string
func (*ExternalReference) GetUrl ¶
func (x *ExternalReference) GetUrl() string
func (*ExternalReference) ProtoMessage ¶
func (*ExternalReference) ProtoMessage()
func (*ExternalReference) ProtoReflect ¶
func (x *ExternalReference) ProtoReflect() protoreflect.Message
func (*ExternalReference) Reset ¶
func (x *ExternalReference) Reset()
func (*ExternalReference) String ¶
func (x *ExternalReference) String() string
func (*ExternalReference) ToSPDX2Category ¶
func (e *ExternalReference) ToSPDX2Category() string
ToSPDX2Category returns the type of the external reference in the spdx 2.x vocabulary.
func (*ExternalReference) ToSPDX2Type ¶
func (e *ExternalReference) ToSPDX2Type() string
ToSPDX2Type converts the external reference type to the SPDX 2.x equivalent.
type HashAlgorithm ¶
type HashAlgorithm int32
const ( HashAlgorithm_UNKNOWN HashAlgorithm = 0 HashAlgorithm_MD5 HashAlgorithm = 1 HashAlgorithm_SHA1 HashAlgorithm = 2 HashAlgorithm_SHA256 HashAlgorithm = 3 HashAlgorithm_SHA384 HashAlgorithm = 4 HashAlgorithm_SHA512 HashAlgorithm = 5 HashAlgorithm_SHA3_256 HashAlgorithm = 6 HashAlgorithm_SHA3_384 HashAlgorithm = 7 HashAlgorithm_SHA3_512 HashAlgorithm = 8 HashAlgorithm_BLAKE2B_256 HashAlgorithm = 9 HashAlgorithm_BLAKE2B_384 HashAlgorithm = 10 HashAlgorithm_BLAKE2B_512 HashAlgorithm = 11 HashAlgorithm_BLAKE3 HashAlgorithm = 12 // 2DO what should we do HashAlgorithm_MD2 HashAlgorithm = 13 // Only supported by SPDX HashAlgorithm_ADLER32 HashAlgorithm = 14 // Only supported by SPDX HashAlgorithm_MD4 HashAlgorithm = 15 // Only supported by SPDX HashAlgorithm_MD6 HashAlgorithm = 16 // Only supported by SPDX HashAlgorithm_SHA224 HashAlgorithm = 17 // Only supported by SPDX )
func HashAlgorithmFromCDX ¶
func HashAlgorithmFromCDX(cdxAlgorithm cyclonedx.HashAlgorithm) HashAlgorithm
func HashAlgorithmFromCycloneDX ¶
func HashAlgorithmFromCycloneDX(cdxAlgo cdx.HashAlgorithm) HashAlgorithm
func (HashAlgorithm) Descriptor ¶
func (HashAlgorithm) Descriptor() protoreflect.EnumDescriptor
func (HashAlgorithm) Enum ¶
func (x HashAlgorithm) Enum() *HashAlgorithm
func (HashAlgorithm) EnumDescriptor
deprecated
func (HashAlgorithm) EnumDescriptor() ([]byte, []int)
Deprecated: Use HashAlgorithm.Descriptor instead.
func (HashAlgorithm) Number ¶
func (x HashAlgorithm) Number() protoreflect.EnumNumber
func (HashAlgorithm) String ¶
func (x HashAlgorithm) String() string
func (HashAlgorithm) ToCycloneDX ¶
func (ha HashAlgorithm) ToCycloneDX() cyclonedx.HashAlgorithm
func (HashAlgorithm) ToSPDX ¶
func (ha HashAlgorithm) ToSPDX() common.ChecksumAlgorithm
func (HashAlgorithm) Type ¶
func (HashAlgorithm) Type() protoreflect.EnumType
type Identifier ¶
type Identifier struct {
Type string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
// contains filtered or unexported fields
}
func (*Identifier) Descriptor
deprecated
func (*Identifier) Descriptor() ([]byte, []int)
Deprecated: Use Identifier.ProtoReflect.Descriptor instead.
func (*Identifier) GetType ¶
func (x *Identifier) GetType() string
func (*Identifier) GetValue ¶
func (x *Identifier) GetValue() string
func (*Identifier) ProtoMessage ¶
func (*Identifier) ProtoMessage()
func (*Identifier) ProtoReflect ¶
func (x *Identifier) ProtoReflect() protoreflect.Message
func (*Identifier) Reset ¶
func (x *Identifier) Reset()
func (*Identifier) String ¶
func (x *Identifier) String() string
type Metadata ¶
type Metadata struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // Serial number in cyclone, SPDXID in spdx
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` // Int in CDX, but lets string it to capture other possible schemes
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Date *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=date,proto3" json:"date,omitempty"` // created date in spdx
Tools []*Tool `protobuf:"bytes,5,rep,name=tools,proto3" json:"tools,omitempty"`
Authors []*Person `protobuf:"bytes,6,rep,name=authors,proto3" json:"authors,omitempty"`
Comment string `protobuf:"bytes,7,opt,name=comment,proto3" json:"comment,omitempty"`
// contains filtered or unexported fields
}
func (*Metadata) Descriptor
deprecated
func (*Metadata) GetAuthors ¶
func (*Metadata) GetComment ¶
func (*Metadata) GetDate ¶
func (x *Metadata) GetDate() *timestamppb.Timestamp
func (*Metadata) GetVersion ¶
func (*Metadata) ProtoMessage ¶
func (*Metadata) ProtoMessage()
func (*Metadata) ProtoReflect ¶
func (x *Metadata) ProtoReflect() protoreflect.Message
type Node ¶
type Node struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Type Node_NodeType `protobuf:"varint,2,opt,name=type,proto3,enum=bomsquad.protobom.Node_NodeType" json:"type,omitempty"`
Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` // Version string
FileName string `protobuf:"bytes,5,opt,name=file_name,json=fileName,proto3" json:"file_name,omitempty"` // Package filename when there is one
UrlHome string `protobuf:"bytes,6,opt,name=url_home,json=urlHome,proto3" json:"url_home,omitempty"` // Website of the packge
UrlDownload string `protobuf:"bytes,7,opt,name=url_download,json=urlDownload,proto3" json:"url_download,omitempty"` // Location to download the package
Licenses []string `protobuf:"bytes,8,rep,name=licenses,proto3" json:"licenses,omitempty"` // Multiple for CDX 1.4, files in SPDX. Ideally license expressions
LicenseConcluded string `protobuf:"bytes,9,opt,name=license_concluded,json=licenseConcluded,proto3" json:"license_concluded,omitempty"` // This is only in SPDX and it is just one
LicenseComments string `protobuf:"bytes,10,opt,name=license_comments,json=licenseComments,proto3" json:"license_comments,omitempty"`
Copyright string `protobuf:"bytes,11,opt,name=copyright,proto3" json:"copyright,omitempty"`
Hashes map[string]string `` /* 154-byte string literal not displayed */
SourceInfo string `protobuf:"bytes,13,opt,name=source_info,json=sourceInfo,proto3" json:"source_info,omitempty"` // any relevant background information or additional comments about the origin
PrimaryPurpose string `protobuf:"bytes,14,opt,name=primary_purpose,json=primaryPurpose,proto3" json:"primary_purpose,omitempty"` // APPLICATION | FRAMEWORK | LIBRARY | CONTAINER | OPERATING-SYSTEM | DEVICE | FIRMWARE | SOURCE | ARCHIVE | FILE | INSTALL | OTHER |
Comment string `protobuf:"bytes,15,opt,name=comment,proto3" json:"comment,omitempty"`
Summary string `protobuf:"bytes,16,opt,name=summary,proto3" json:"summary,omitempty"` // Short package description
Description string `protobuf:"bytes,17,opt,name=description,proto3" json:"description,omitempty"` // Package description (full)
Attribution []string `protobuf:"bytes,18,rep,name=attribution,proto3" json:"attribution,omitempty"` // One or more attribution texts
Suppliers []*Person `protobuf:"bytes,19,rep,name=suppliers,proto3" json:"suppliers,omitempty"`
Originators []*Person `protobuf:"bytes,20,rep,name=originators,proto3" json:"originators,omitempty"`
ReleaseDate *timestamppb.Timestamp `protobuf:"bytes,21,opt,name=release_date,json=releaseDate,proto3" json:"release_date,omitempty"`
BuildDate *timestamppb.Timestamp `protobuf:"bytes,22,opt,name=build_date,json=buildDate,proto3" json:"build_date,omitempty"`
ValidUntilDate *timestamppb.Timestamp `protobuf:"bytes,23,opt,name=valid_until_date,json=validUntilDate,proto3" json:"valid_until_date,omitempty"`
ExternalReferences []*ExternalReference `protobuf:"bytes,24,rep,name=external_references,json=externalReferences,proto3" json:"external_references,omitempty"`
Identifiers []*Identifier `protobuf:"bytes,25,rep,name=identifiers,proto3" json:"identifiers,omitempty"`
FileTypes []string `protobuf:"bytes,27,rep,name=file_types,json=fileTypes,proto3" json:"file_types,omitempty"` // File types
// contains filtered or unexported fields
}
func (*Node) Augment ¶
Augment takes updates fields in n with data from n2 which is not already defined (not empty string, not 0 length string, not nill pointer).
func (*Node) Descriptor
deprecated
func (*Node) GetAttribution ¶
func (*Node) GetBuildDate ¶
func (x *Node) GetBuildDate() *timestamppb.Timestamp
func (*Node) GetComment ¶
func (*Node) GetCopyright ¶
func (*Node) GetDescription ¶
func (*Node) GetExternalReferences ¶
func (x *Node) GetExternalReferences() []*ExternalReference
func (*Node) GetFileName ¶
func (*Node) GetFileTypes ¶
func (*Node) GetIdentifiers ¶
func (x *Node) GetIdentifiers() []*Identifier
func (*Node) GetLicenseComments ¶
func (*Node) GetLicenseConcluded ¶
func (*Node) GetLicenses ¶
func (*Node) GetOriginators ¶
func (*Node) GetPrimaryPurpose ¶
func (*Node) GetReleaseDate ¶
func (x *Node) GetReleaseDate() *timestamppb.Timestamp
func (*Node) GetSourceInfo ¶
func (*Node) GetSummary ¶
func (*Node) GetSuppliers ¶
func (*Node) GetType ¶
func (x *Node) GetType() Node_NodeType
func (*Node) GetUrlDownload ¶
func (*Node) GetUrlHome ¶
func (*Node) GetValidUntilDate ¶
func (x *Node) GetValidUntilDate() *timestamppb.Timestamp
func (*Node) GetVersion ¶
func (*Node) ProtoMessage ¶
func (*Node) ProtoMessage()
func (*Node) ProtoReflect ¶
func (x *Node) ProtoReflect() protoreflect.Message
type NodeList ¶
type NodeList struct {
Nodes []*Node `protobuf:"bytes,1,rep,name=nodes,proto3" json:"nodes,omitempty"`
Edges []*Edge `protobuf:"bytes,2,rep,name=edges,proto3" json:"edges,omitempty"`
RootElements []string `protobuf:"bytes,3,rep,name=root_elements,json=rootElements,proto3" json:"root_elements,omitempty"`
// contains filtered or unexported fields
}
func (*NodeList) Add ¶
Add combines NodeList nl2 into nl. It is the equivalent to Union but instead of returning a new NodeList it modifies nl.
func (*NodeList) Descriptor
deprecated
func (*NodeList) GetEdgeByType ¶
GetEdgeByType returns a pointer to the first edge found from fromElement of type t.
func (*NodeList) GetNodeByID ¶
GetNodeByID returns a node with the specified ID
func (*NodeList) GetNodesByIdentifier ¶
GetNodesByIdentifier returns nodes that match an identifier of type t and value v, for example t = "purl" v = "pkg:deb/debian/libpam-modules@1.4.0-9+deb11u1?arch=i386" Not that this only does "dumb" string matching no assumptions are made on the identifier type.
func (*NodeList) GetNodesByName ¶
GetNodesByName returns a list of node pointers whose name equals name
func (*NodeList) GetNodesByPurlType ¶
GetNodesByPurlType returns a nodelist containing all nodes that match a purl (package url) type. An empty purlType returns a blank nodelist
func (*NodeList) GetRootElements ¶
func (*NodeList) GetRootNodes ¶
GetRootNodes returns a list of pointers of the root nodes of the document
func (*NodeList) Intersect ¶
Intersect returns a new NodeList with nodes which are common in nl and nl2. All common nodes will be copied from nl and then `Update`d with data from nl2
func (*NodeList) ProtoMessage ¶
func (*NodeList) ProtoMessage()
func (*NodeList) ProtoReflect ¶
func (x *NodeList) ProtoReflect() protoreflect.Message
func (*NodeList) RelateNodeListAtID ¶
RelateNodeListAtID relates the top level nodes in nl2 to the node with ID nodeID using a relationship of type edgeType. Returns an error if nodeID cannot be found in the graph. This function assumes that nodes in nl and nl2 having the same ID are equivalent and will be deduped.
func (*NodeList) RemoveNodes ¶
RemoveNodes removes a list of nodes and its edges from the nodelist
type Node_NodeType ¶
type Node_NodeType int32
const ( Node_PACKAGE Node_NodeType = 0 Node_FILE Node_NodeType = 1 )
func (Node_NodeType) Descriptor ¶
func (Node_NodeType) Descriptor() protoreflect.EnumDescriptor
func (Node_NodeType) Enum ¶
func (x Node_NodeType) Enum() *Node_NodeType
func (Node_NodeType) EnumDescriptor
deprecated
func (Node_NodeType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Node_NodeType.Descriptor instead.
func (Node_NodeType) Number ¶
func (x Node_NodeType) Number() protoreflect.EnumNumber
func (Node_NodeType) String ¶
func (x Node_NodeType) String() string
func (Node_NodeType) Type ¶
func (Node_NodeType) Type() protoreflect.EnumType
type PackageURL ¶
type PackageURL string
type Person ¶
type Person struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
IsOrg bool `protobuf:"varint,2,opt,name=is_org,json=isOrg,proto3" json:"is_org,omitempty"`
Email string `protobuf:"bytes,3,opt,name=email,proto3" json:"email,omitempty"`
Url string `protobuf:"bytes,4,opt,name=url,proto3" json:"url,omitempty"`
Phone string `protobuf:"bytes,5,opt,name=phone,proto3" json:"phone,omitempty"` // CDX
Contacts []*Person `protobuf:"bytes,6,rep,name=contacts,proto3" json:"contacts,omitempty"` // CDX // Support?
// contains filtered or unexported fields
}
func (*Person) Descriptor
deprecated
func (*Person) GetContacts ¶
func (*Person) ProtoMessage ¶
func (*Person) ProtoMessage()
func (*Person) ProtoReflect ¶
func (x *Person) ProtoReflect() protoreflect.Message
func (*Person) ToSPDX2ClientOrg ¶
ToSPDX2ClientOrg returns a string representing the type of actor to use in the SPDX go-tools, basically it will returns "Organization" or "Person"
func (*Person) ToSPDX2ClientString ¶
ToSPDX2ClientString converts the person to an SPDX actor string (not valid for an SBOM but to feed into the SPDX go-tools).
type Tool ¶
type Tool struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
Vendor string `protobuf:"bytes,3,opt,name=vendor,proto3" json:"vendor,omitempty"`
// contains filtered or unexported fields
}
func (*Tool) Descriptor
deprecated
func (*Tool) GetVersion ¶
func (*Tool) ProtoMessage ¶
func (*Tool) ProtoMessage()
func (*Tool) ProtoReflect ¶
func (x *Tool) ProtoReflect() protoreflect.Message