static

package
v2.2.4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 16 Imported by: 18

Documentation

Index

Constants

View Source
const (
	SignatureAnnotationKey        = "dev.cosignproject.cosign/signature"
	CertificateAnnotationKey      = "dev.sigstore.cosign/certificate"
	ChainAnnotationKey            = "dev.sigstore.cosign/chain"
	BundleAnnotationKey           = "dev.sigstore.cosign/bundle"
	RFC3161TimestampAnnotationKey = "dev.sigstore.cosign/rfc3161timestamp"
)

Variables

This section is empty.

Functions

func Copy

func Copy(sig oci.Signature) (oci.Signature, error)

Copy constructs a new oci.Signature from the provided one.

func NewAttestation

func NewAttestation(payload []byte, opts ...Option) (oci.Signature, error)

NewAttestation constructs a new oci.Signature from the provided options. Since Attestation is treated just like a Signature but the actual signature is baked into the payload, the Signature does not actually have the Base64Signature.

func NewFile

func NewFile(payload []byte, opts ...Option) (oci.File, error)

NewFile constructs a new v1.Image with the provided payload.

func NewSignature

func NewSignature(payload []byte, b64sig string, opts ...Option) (oci.Signature, error)

NewSignature constructs a new oci.Signature from the provided options.

Types

type Option

type Option func(*options)

Option is a functional option for customizing static signatures.

func WithAnnotations

func WithAnnotations(ann map[string]string) Option

WithAnnotations sets the annotations that will be associated.

func WithBundle

func WithBundle(b *bundle.RekorBundle) Option

WithBundle sets the bundle to attach to the signature

func WithCertChain

func WithCertChain(cert, chain []byte) Option

WithCertChain sets the certificate chain for this signature.

func WithConfigMediaType

func WithConfigMediaType(mt types.MediaType) Option

WithConfigMediaType sets the media type of the signature.

func WithLayerMediaType

func WithLayerMediaType(mt types.MediaType) Option

WithLayerMediaType sets the media type of the signature.

func WithRFC3161Timestamp

func WithRFC3161Timestamp(b *bundle.RFC3161Timestamp) Option

WithRFC3161Timestamp sets the time-stamping bundle to attach to the signature

func WithRecordCreationTimestamp added in v2.2.4

func WithRecordCreationTimestamp(rct bool) Option

WithRecordCreationTimestamp sets the feature flag to honor the creation timestamp to time of running

Jump to

Keyboard shortcuts

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