attestation

package
v1.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 20, 2021 License: Apache-2.0 Imports: 9 Imported by: 7

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 corresponding Predicate (custom|provenance|spdx|link) based on the type you specified.

Types

type CosignPredicate

type CosignPredicate struct {
	Data      string
	Timestamp string
}

CosignPredicate specifies the format of the Custom Predicate.

type GenerateOpts

type GenerateOpts struct {
	// Path is the given path to the predicate file.
	Path string
	// 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL