Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct { Blob []byte Type DocumentType Format FormatType SourceInformation SourceInformation }
Document describes the input for a processor to run. This input can come from a collector or from the processor itself (run recursively).
type DocumentNode ¶
type DocumentNode struct { Document *Document Children []*DocumentNode }
DocumentNode describes a node of a DocumentTree
type DocumentProcessor ¶
type DocumentProcessor interface { // ValidateSchema validates the schema of the document ValidateSchema(i *Document) error // Unpack takes in the document and tries to unpack it // if there is a valid decomposition of sub-documents. // // For example, a DSSE envelope or a tarball // Returns list of len=0 and nil error if nothing to unpack // Returns unpacked list and nil error if successfully unpacked Unpack(i *Document) ([]*Document, error) }
type DocumentTree ¶
type DocumentTree *DocumentNode
DocumentTree describes the output of a document tree that resulted from processing a node
type DocumentType ¶
type DocumentType string
DocumentType describes the type of the document contents for schema checks
const ( DocumentITE6SLSA DocumentType = "SLSA" DocumentITE6Generic DocumentType = "ITE6" DocumentITE6Vul DocumentType = "ITE6VUL" DocumentDSSE DocumentType = "DSSE" DocumentSPDX DocumentType = "SPDX" DocumentJsonLines DocumentType = "JSON_LINES" DocumentScorecard DocumentType = "SCORECARD" DocumentCycloneDX DocumentType = "CycloneDX" DocumentDepsDev DocumentType = "DEPS_DEV" DocumentUnknown DocumentType = "UNKNOWN" )
Document* is the enumerables of DocumentType
type FormatType ¶
type FormatType string
FormatType describes the document format for malform checks
const ( FormatJSON FormatType = "JSON" FormatJSONLines FormatType = "JSON_LINES" FormatXML FormatType = "XML" FormatUnknown FormatType = "UNKNOWN" )
Format* is the enumerables of FormatType
type SourceInformation ¶
type SourceInformation struct { // Collector describes the name of the collector providing this information Collector string // Source describes the source which the collector got this information Source string }
SourceInformation provides additional information about where the document comes from
Click to show internal directories.
Click to hide internal directories.