image

package
v0.0.0-...-d534c4c Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Overview

Package image handles image operations, like creating a random image, image signature or attestation images

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddStepsTo

func AddStepsTo(sc *godog.ScenarioContext)

AddStepsTo adds Gherkin steps to the godog ScenarioContext

func AttestationFrom

func AttestationFrom(ctx context.Context, imageName string) ([]byte, error)

AttestationFrom finds the raw attestation created by the createAndPushAttestation

func AttestationSignaturesFrom

func AttestationSignaturesFrom(ctx context.Context, prefix string) (map[string]string, error)

AttestationSignaturesFrom returns the list of attestation signatures found in the context in JSON format. If not found, and empty JSON array is returned.

func CreateAndPushAttestation

func CreateAndPushAttestation(ctx context.Context, imageName, keyName string) (context.Context, error)

CreateAndPushAttestation for a named image in the Context creates an attestation image, same as `cosign attest` or Tekton Chains would, and pushes it to the stub registry as a new tag for that image akin to how cosign and Tekton Chains do it

func CreateAndPushImageSignature

func CreateAndPushImageSignature(ctx context.Context, imageName string, keyName string) (context.Context, error)

CreateAndPushImageSignature for a named image in the Context creates a signature image, same as `cosign sign` or Tekton Chains would, of that named image and pushes it to the stub registry as a new tag for that image akin to how cosign and Tekton Chains do it

func CreateAndPushImageWithParent

func CreateAndPushImageWithParent(ctx context.Context, imageName string) (context.Context, error)

CreateAndPushImageWithParent creates a parent image and a test image for the given imageName.

func ImageSignatureFrom

func ImageSignatureFrom(ctx context.Context, imageName string) ([]byte, error)

ImageSignatureFrom returns the image signature previously created by createAndPushImageSignature

func ImageSignaturesFrom

func ImageSignaturesFrom(ctx context.Context, prefix string) (map[string]string, error)

func RawAttestationSignaturesFrom

func RawAttestationSignaturesFrom(ctx context.Context) map[string]string

func RawImageSignaturesFrom

func RawImageSignaturesFrom(ctx context.Context) map[string]string

Types

type Signature

type Signature struct {
	KeyID       string            `json:"keyid"`
	Signature   string            `json:"sig"`
	Certificate string            `json:"certificate,omitempty"`
	Chain       []string          `json:"chain,omitempty"`
	Metadata    map[string]string `json:"metadata,omitempty"`
}

Signature is the information about the signature of the image

Jump to

Keyboard shortcuts

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