static

package
v1.13.6 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2024 License: Apache-2.0 Imports: 14 Imported by: 12

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"
)

Variables

This section is empty.

Functions

func Copy added in v1.13.0

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.

Jump to

Keyboard shortcuts

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