Documentation
¶
Index ¶
- Constants
- func ImageDescriptor(ix *v1.IndexManifest, platform *v1.Platform) (*v1.Descriptor, error)
- func MultiKeychainAll() authn.Keychain
- func MultiKeychainOption() remote.Option
- func ParsePlatform(platformStr string) (*v1.Platform, error)
- func PushImageToRegistry(ctx context.Context, image v1.Image, imageName string) error
- func PushIndexToRegistry(ctx context.Context, index v1.ImageIndex, imageName string) error
- func RefToPURL(named reference.Named, platform *v1.Platform) (string, bool, error)
- func ReplaceTag(image string, digest v1.Hash) (string, error)
- func SaveImage(ctx context.Context, output *ImageSpec, image v1.Image, imageName string) error
- func SaveImageAsOCILayout(image v1.Image, path string) error
- func SaveImagesNoTag(ctx context.Context, images []v1.Image, outputs []*ImageSpec) error
- func SaveIndex(ctx context.Context, outputs []*ImageSpec, index v1.ImageIndex, ...) error
- func SaveIndexAsOCILayout(image v1.ImageIndex, path string) error
- func SplitDigest(digest string) (common.DigestSet, error)
- func WithOptions(ctx context.Context, platform *v1.Platform) []remote.Option
- func WithoutTag(image string) (string, error)
- type EmptyConfigImage
- type ImageDetailsResolver
- type ImageSpec
- type ImageSpecOption
- type NamedIndex
- type RegistryImageDetailsResolver
- type SourceType
Constants ¶
View Source
const ( OCIReferenceTarget = "org.opencontainers.image.ref.name" LocalPrefix = "oci://" RegistryPrefix = "docker://" OCI SourceType = "OCI" Docker SourceType = "Docker" )
Variables ¶
This section is empty.
Functions ¶
func ImageDescriptor ¶
func ImageDescriptor(ix *v1.IndexManifest, platform *v1.Platform) (*v1.Descriptor, error)
func MultiKeychainAll ¶
func MultiKeychainOption ¶
func ParsePlatform ¶
ParsePlatform parses the provided platform string or attempts to obtain the platform of the current host system.
func PushImageToRegistry ¶
PushImageToRegistry pushes an image to the registry with the specified name.
func PushIndexToRegistry ¶
PushIndexToRegistry pushes an index to the registry with the specified name.
func ReplaceTag ¶
so that the index tag is replaced with a tag unique to the image digest and doesn't overwrite it.
func SaveImageAsOCILayout ¶
SaveIndexAsOCILayout saves an image as an OCI layout to the specified path.
func SaveImagesNoTag ¶
SaveImagesNoTag saves a list of images by digest to the specified outputs.
func SaveIndex ¶
func SaveIndex(ctx context.Context, outputs []*ImageSpec, index v1.ImageIndex, indexName string) error
SaveIndex saves an index to the specified outputs.
func SaveIndexAsOCILayout ¶
func SaveIndexAsOCILayout(image v1.ImageIndex, path string) error
SaveIndexAsOCILayout saves an index as an OCI layout to the specified path.
func WithoutTag ¶
Types ¶
type EmptyConfigImage ¶
func (*EmptyConfigImage) RawConfigFile ¶
func (i *EmptyConfigImage) RawConfigFile() ([]byte, error)
func (*EmptyConfigImage) RawManifest ¶
func (i *EmptyConfigImage) RawManifest() ([]byte, error)
type ImageDetailsResolver ¶
type ImageSpec ¶
type ImageSpec struct { // OCI or Docker Type SourceType // without oci:// or docker:// (name or path) Identifier string Platform *v1.Platform }
func ParseImageSpec ¶
func ParseImageSpec(img string, options ...ImageSpecOption) (*ImageSpec, error)
func ParseImageSpecs ¶
func ReplaceDigestInSpec ¶
type ImageSpecOption ¶
func WithPlatform ¶
func WithPlatform(platform string) ImageSpecOption
type NamedIndex ¶
type NamedIndex struct { Index v1.ImageIndex Name string }
func IndexFromPath ¶
func IndexFromPath(path string) (*NamedIndex, error)
func IndexFromRemote ¶
func IndexFromRemote(ctx context.Context, image string) (*NamedIndex, error)
type RegistryImageDetailsResolver ¶
type RegistryImageDetailsResolver struct { *ImageSpec // contains filtered or unexported fields }
func NewRegistryImageDetailsResolver ¶
func NewRegistryImageDetailsResolver(src *ImageSpec) (*RegistryImageDetailsResolver, error)
func (*RegistryImageDetailsResolver) ImageDescriptor ¶
func (r *RegistryImageDetailsResolver) ImageDescriptor(ctx context.Context) (*v1.Descriptor, error)
func (*RegistryImageDetailsResolver) ImageName ¶
func (r *RegistryImageDetailsResolver) ImageName(_ context.Context) (string, error)
func (*RegistryImageDetailsResolver) ImagePlatform ¶
type SourceType ¶
type SourceType string
Click to show internal directories.
Click to hide internal directories.