// WriteSignedImageIndex writes the image index and all related signatures, attestations and attachments
WriteSignedImageIndex writes the image index and all related signatures, attestations and attachments
// WriteSignedImageIndex writes the image index and all related signatures attestations and attachments
func WriteSignedImageIndex(path string, si oci.SignedImageIndex) error {
	layoutPath, err := layout.Write(path, empty.Index)
	if err != nil {
		return err
	}
	if err := layoutPath.AppendIndex(si, layout.WithAnnotations(
		map[string]string{kindAnnotation: imageIndexAnnotation},
	)); err != nil {
		return errors.Wrap(err, "appending signed image index")
	}
	return writeSignedEntity(layoutPath, si)
}
func WriteSignedImageIndex ( path string , si oci . SignedImageIndex ) error { layoutPath , err := layout . Write ( path , empty . Index ) if err != nil { return err } if err := layoutPath . AppendIndex ( si , layout . WithAnnotations ( map [ string ] string { kindAnnotation : imageIndexAnnotation } , ) ) ; err != nil { return errors . Wrap ( err , " " ) } return writeSignedEntity ( layoutPath , si ) }
WriteSignedImageIndex writes the image index and all related signatures, attestations and attachments
WriteSignedImageIndex writes the image index and all related signatures attestations and attachments
// First, write an empty index // write the image index