Documentation
¶
Overview ¶
Package image handles image operations, like creating a random image, image signature or attestation images
Index ¶
- func AddStepsTo(sc *godog.ScenarioContext)
- func AttestationFrom(ctx context.Context, imageName string) ([]byte, error)
- func AttestationSignaturesFrom(ctx context.Context, prefix string) (map[string]string, error)
- func CreateAndPushAttestation(ctx context.Context, imageName, keyName string) (context.Context, error)
- func CreateAndPushImageSignature(ctx context.Context, imageName string, keyName string) (context.Context, error)
- func CreateAndPushImageWithParent(ctx context.Context, imageName string) (context.Context, error)
- func CreateAndPushV1Attestation(ctx context.Context, imageName, keyName string) (context.Context, error)
- func ImageSignatureFrom(ctx context.Context, imageName string) ([]byte, error)
- func ImageSignaturesFrom(ctx context.Context, prefix string) (map[string]string, error)
- func RawAttestationSignaturesFrom(ctx context.Context) map[string]string
- func RawImageSignaturesFrom(ctx context.Context) map[string]string
- type Signature
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 ¶
AttestationFrom finds the raw attestation created by the createAndPushAttestation
func AttestationSignaturesFrom ¶
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. This implementation includes transparency log upload to generate bundle information.
func CreateAndPushImageWithParent ¶
CreateAndPushImageWithParent creates a parent image and a test image for the given imageName.
func CreateAndPushV1Attestation ¶
func CreateAndPushV1Attestation(ctx context.Context, imageName, keyName string) (context.Context, error)
CreateAndPushV1Attestation for a named image creates a SLSA v1.0 attestation and pushes it to the stub registry
func ImageSignatureFrom ¶
ImageSignatureFrom returns the image signature previously created by createAndPushImageSignature
func ImageSignaturesFrom ¶
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