Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var AllFormats = FormatsList{
"application/vnd.cyclonedx",
"text/spdx",
"application/vnd.slsa",
"application/vnd.openvex",
}
Functions ¶
This section is empty.
Types ¶
type Document ¶
type Document struct { Format Format // contains filtered or unexported fields }
Document is an object that abstracts a security document handled by deployer.
func NewDocument ¶
func NewDocument() *Document
func NewDocumentFromBytes ¶
NewDocumentFromBytes creates a document from an already read byte array
func NewDocumentFromFile ¶
func (*Document) Cleanup ¶
func (d *Document) Cleanup()
Cleanup is a function intended to be run just before a document is discarded. It takes care of closing its file and
func (*Document) Read ¶
Read implements the reader interface to be able to use the document wherever io.Reader fits
func (*Document) ReadData ¶
ReadData takes an io.Reader r and ingests the data of the document from it using Read(). Data will be kept in memory until maxInMemSize bytes are read, after which data will be dumped to a temporary file.
type Format ¶
type Format string
Format captures a format string that indicates the types of documents handled by deployer.
func NewFormatFromIntotoPredicate ¶
NewFormatFromIntotoPredicate takes one of the registered in-toto predicate types (or an equivalent IRI of another recognized one) and returns a Format.
type FormatsList ¶
type FormatsList []Format
func (*FormatsList) Has ¶
func (fl *FormatsList) Has(f Format) bool
Has returns a bool flagging if the FormatsList includes format q