Documentation ¶
Index ¶
- Constants
- func ConvertBundleToOCIIndex(b *bundle.Bundle, targetRef reference.Named, ...) (*ocischemav1.Index, error)
- func GenerateRelocationMap(ix *ocischemav1.Index, b *bundle.Bundle, originRepo reference.Named) (relocation.ImageRelocationMap, error)
- func GetBundleConfigManifestDescriptor(ix *ocischemav1.Index) (ocischemav1.Descriptor, error)
- type PreparedBundleConfig
Constants ¶
View Source
const ( // CNABVersion is the currently supported CNAB runtime version CNABVersion = "v1.0.0" // OCIIndexSchemaVersion is the currently supported OCI index schema's version OCIIndexSchemaVersion = 2 )
View Source
const ( // CNABRuntimeVersionAnnotation is the top level annotation specifying the CNAB runtime version CNABRuntimeVersionAnnotation = "io.cnab.runtime_version" // CNABKeywordsAnnotation is the top level annotation specifying a list of keywords CNABKeywordsAnnotation = "io.cnab.keywords" // ArtifactTypeAnnotation is the top level annotation specifying the type of the artifact in the registry ArtifactTypeAnnotation = "org.opencontainers.artifactType" // ArtifactTypeValue is the value of ArtifactTypeAnnotion for CNAB bundles ArtifactTypeValue = "application/vnd.cnab.manifest.v1" )
View Source
const ( // CNABDescriptorTypeAnnotation is a descriptor-level annotation specifying the type of reference image (currently invocation or component) CNABDescriptorTypeAnnotation = "io.cnab.manifest.type" // CNABDescriptorTypeInvocation is the CNABDescriptorTypeAnnotation value for invocation images CNABDescriptorTypeInvocation cnabDescriptorTypeValue = "invocation" // CNABDescriptorTypeComponent is the CNABDescriptorTypeAnnotation value for component images CNABDescriptorTypeComponent cnabDescriptorTypeValue = "component" // CNABDescriptorTypeConfig is the CNABDescriptorTypeAnnotation value for bundle configuration CNABDescriptorTypeConfig cnabDescriptorTypeValue = "config" // CNABDescriptorComponentNameAnnotation is a decriptor-level annotation specifying the component name CNABDescriptorComponentNameAnnotation = "io.cnab.component.name" )
View Source
const (
// CNABConfigMediaType is the config media type of the CNAB config image manifest
CNABConfigMediaType = "application/vnd.cnab.config.v1+json"
)
Variables ¶
This section is empty.
Functions ¶
func ConvertBundleToOCIIndex ¶
func ConvertBundleToOCIIndex(b *bundle.Bundle, targetRef reference.Named, bundleConfigManifestRef ocischemav1.Descriptor, relocationMap relocation.ImageRelocationMap) (*ocischemav1.Index, error)
ConvertBundleToOCIIndex converts a CNAB bundle into an OCI Index representation
func GenerateRelocationMap ¶
func GenerateRelocationMap(ix *ocischemav1.Index, b *bundle.Bundle, originRepo reference.Named) (relocation.ImageRelocationMap, error)
GenerateRelocationMap generates the bundle relocation map
func GetBundleConfigManifestDescriptor ¶
func GetBundleConfigManifestDescriptor(ix *ocischemav1.Index) (ocischemav1.Descriptor, error)
GetBundleConfigManifestDescriptor returns the CNAB runtime config manifest descriptor from a OCI index
Types ¶
type PreparedBundleConfig ¶
type PreparedBundleConfig struct { ConfigBlob []byte ConfigBlobDescriptor ocischemav1.Descriptor Manifest []byte ManifestDescriptor ocischemav1.Descriptor Fallback *PreparedBundleConfig }
PreparedBundleConfig contains the config blob, image manifest (and fallback), and descriptors for a CNAB config
func PrepareForPush ¶
func PrepareForPush(b *bundle.Bundle) (*PreparedBundleConfig, error)
PrepareForPush serializes a bundle config, generates its image manifest, and its manifest descriptor
Click to show internal directories.
Click to hide internal directories.