Documentation ¶
Index ¶
Constants ¶
View Source
const (
// CosignCustomProvenanceV01 specifies the type of the Predicate.
CosignCustomProvenanceV01 = "cosign.sigstore.dev/attestation/v1"
)
Variables ¶
This section is empty.
Functions ¶
func GenerateStatement ¶
func GenerateStatement(opts GenerateOpts) (interface{}, error)
GenerateStatement returns an in-toto statement based on the provided predicate type (custom|slsaprovenance|spdx|link).
Types ¶
type CosignPredicate ¶
type CosignPredicate struct { Data interface{} Timestamp string }
CosignPredicate specifies the format of the Custom Predicate.
type GenerateOpts ¶
type GenerateOpts struct { // Predicate is the source of bytes (e.g. a file) to use as the statement's predicate. Predicate io.Reader // Type is the pre-defined enums (provenance|link|spdx). // default: custom Type string // Digest of the Image reference. Digest string // Repo context of the reference. Repo string // Function to return the time to set Time func() time.Time }
GenerateOpts specifies the options of the Statement generator.
Click to show internal directories.
Click to hide internal directories.