Documentation ¶
Index ¶
- Constants
- func AttestationTag(ref name.Reference, opts ...Option) (name.Tag, error)
- func GetEnvTargetRepository() (name.Repository, error)
- func ResolveDigest(ref name.Reference, opts ...Option) (name.Digest, error)
- func SBOMTag(ref name.Reference, opts ...Option) (name.Tag, error)
- func SignatureTag(ref name.Reference, opts ...Option) (name.Tag, error)
- func Signatures(ref name.Reference, opts ...Option) (oci.Signatures, error)
- func SignedEntity(ref name.Reference, options ...Option) (oci.SignedEntity, error)
- func SignedImage(ref name.Reference, options ...Option) (oci.SignedImage, error)
- func SignedImageIndex(ref name.Reference, options ...Option) (oci.SignedImageIndex, error)
- func WriteAttestations(repo name.Repository, se oci.SignedEntity, opts ...Option) error
- func WriteSignatures(repo name.Repository, se oci.SignedEntity, opts ...Option) error
- func WriteSignedImageIndexImages(ref name.Reference, sii oci.SignedImageIndex, opts ...Option) error
- type Option
Constants ¶
const ( SignatureTagSuffix = "sig" SBOMTagSuffix = "sbom" AttestationTagSuffix = "att" CustomTagPrefix = "" RepoOverrideEnvKey = "COSIGN_REPOSITORY" )
Variables ¶
This section is empty.
Functions ¶
func AttestationTag ¶
AttestationTag returns the name.Tag that associated attestations with a particular digest.
func GetEnvTargetRepository ¶
func GetEnvTargetRepository() (name.Repository, error)
GetEnvTargetRepository returns the Repository specified by `os.Getenv(RepoOverrideEnvKey)`, or the empty value if not set. Returns an error if the value is set but cannot be parsed.
func ResolveDigest ¶
ResolveDigest returns the digest of the image at the reference.
If the reference is by digest already, it simply extracts the digest. Otherwise, it looks up the digest from the registry.
func SignatureTag ¶
SignatureTag returns the name.Tag that associated signatures with a particular digest.
func Signatures ¶
Signatures fetches the signatures image represented by the named reference. If the tag is not found, this returns an empty oci.Signatures.
func SignedEntity ¶
SignedEntity provides access to a remote reference, and its signatures. The SignedEntity will be one of SignedImage or SignedImageIndex.
func SignedImage ¶
SignedImage provides access to a remote image reference, and its signatures.
func SignedImageIndex ¶
SignedImageIndex provides access to a remote index reference, and its signatures.
func WriteAttestations ¶
func WriteAttestations(repo name.Repository, se oci.SignedEntity, opts ...Option) error
WriteAttestations publishes the attestations attached to the given entity into the provided repository.
func WriteSignatures ¶
func WriteSignatures(repo name.Repository, se oci.SignedEntity, opts ...Option) error
WriteSignature publishes the signatures attached to the given entity into the provided repository.
func WriteSignedImageIndexImages ¶ added in v1.4.0
func WriteSignedImageIndexImages(ref name.Reference, sii oci.SignedImageIndex, opts ...Option) error
WriteSignedImageIndexImages writes the images within the image index This includes the signed image and associated signatures in the image index TODO (priyawadhwa@): write the `index.json` itself to the repo as well TODO (priyawadhwa@): write the attestations
Types ¶
type Option ¶
type Option func(*options)
Option is a functional option for remote operations.
func WithAttestationSuffix ¶
WithAttestationSuffix is a functional option for overriding the default attestation tag suffix.
func WithPrefix ¶
WithPrefix is a functional option for overriding the default tag prefix.
func WithRemoteOptions ¶
WithRemoteOptions is a functional option for overriding the default remote options passed to GGCR.
func WithSBOMSuffix ¶
WithSBOMSuffix is a functional option for overriding the default SBOM tag suffix.
func WithSignatureSuffix ¶
WithSignatureSuffix is a functional option for overriding the default signature tag suffix.
func WithTargetRepository ¶
func WithTargetRepository(repo name.Repository) Option
WithTargetRepository is a functional option for overriding the default target repository hosting the signature and attestation tags.