Documentation
¶
Index ¶
- Constants
- func Copy(ctx context.Context, resolver remotes.Resolver, image reference.Named, ...) (spec.Descriptor, error)
- func DescriptorForComposeFile(path string, content []byte) v1.Descriptor
- func DescriptorForEnvFile(path string, content []byte) v1.Descriptor
- func Get(ctx context.Context, resolver remotes.Resolver, ref reference.Named) (spec.Descriptor, []byte, error)
- func NewResolver(config *configfile.ConfigFile) remotes.Resolver
- func Push(ctx context.Context, resolver remotes.Resolver, ref reference.Named, ...) error
- func PushManifest(ctx context.Context, resolver remotes.Resolver, named reference.Named, ...) (v1.Descriptor, error)
Constants ¶
View Source
const ( // ComposeProjectArtifactType is the OCI 1.1-compliant artifact type value // for the generated image manifest. ComposeProjectArtifactType = "application/vnd.docker.compose.project" // ComposeYAMLMediaType is the media type for each layer (Compose file) // in the image manifest. ComposeYAMLMediaType = "application/vnd.docker.compose.file+yaml" // ComposeEmptyConfigMediaType is a media type used for the config descriptor // when doing OCI 1.0-style pushes. // // The content is always `{}`, the same as a normal empty descriptor, but // the specific media type allows clients to fall back to the config media // type to recognize the manifest as a Compose project since the artifact // type field is not available in OCI 1.0. // // This is based on guidance from the OCI 1.1 spec: // > Implementers note: artifacts have historically been created without // > an artifactType field, and tooling to work with artifacts should // > fallback to the config.mediaType value. ComposeEmptyConfigMediaType = "application/vnd.docker.compose.config.empty.v1+json" // ComposeEnvFileMediaType is the media type for each Env File layer in the image manifest. ComposeEnvFileMediaType = "application/vnd.docker.compose.envfile" )
Variables ¶
This section is empty.
Functions ¶
func DescriptorForComposeFile ¶
func DescriptorForComposeFile(path string, content []byte) v1.Descriptor
func DescriptorForEnvFile ¶
func DescriptorForEnvFile(path string, content []byte) v1.Descriptor
func Get ¶
func Get(ctx context.Context, resolver remotes.Resolver, ref reference.Named) (spec.Descriptor, []byte, error)
Get retrieves a Named OCI resource and returns OCI Descriptor and Manifest
func NewResolver ¶
func NewResolver(config *configfile.ConfigFile) remotes.Resolver
NewResolver setup an OCI Resolver based on docker/cli config to provide registry credentials
func PushManifest ¶
func PushManifest(ctx context.Context, resolver remotes.Resolver, named reference.Named, layers []v1.Descriptor, ociVersion api.OCIVersion) (v1.Descriptor, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.