Documentation
¶
Index ¶
- Constants
- func HTTPTransport() http.RoundTripper
- 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(image v1.Image, imageName string) error
- func PushIndexToRegistry(index v1.ImageIndex, imageName string) error
- func RefToPURL(ref string, platform *v1.Platform) (string, bool, error)
- func ReplaceTag(image string, digest v1.Hash) (string, error)
- func SaveImage(output *ImageSpec, image v1.Image, imageName string) error
- func SaveImageAsOCILayout(image v1.Image, path string) error
- func SaveImagesNoTag(images []v1.Image, outputs []*ImageSpec) error
- func SaveIndex(outputs []*ImageSpec, index v1.ImageIndex, indexName string) 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 Option
- 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 HTTPTransport ¶ added in v0.2.0
func HTTPTransport() http.RoundTripper
func ImageDescriptor ¶ added in v0.3.1
func ImageDescriptor(ix *v1.IndexManifest, platform *v1.Platform) (*v1.Descriptor, error)
func MultiKeychainAll ¶ added in v0.1.6
func MultiKeychainOption ¶ added in v0.1.6
func ParsePlatform ¶ added in v0.1.5
ParsePlatform parses the provided platform string or attempts to obtain the platform of the current host system.
func PushImageToRegistry ¶ added in v0.3.0
PushImageToRegistry pushes an image to the registry with the specified name.
func PushIndexToRegistry ¶ added in v0.3.0
func PushIndexToRegistry(index v1.ImageIndex, imageName string) error
PushIndexToRegistry pushes an index to the registry with the specified name.
func ReplaceTag ¶ added in v0.3.1
so that the index tag is replaced with a tag unique to the image digest and doesn't overwrite it.
func SaveImageAsOCILayout ¶ added in v0.3.0
SaveIndexAsOCILayout saves an image as an OCI layout to the specified path.
func SaveImagesNoTag ¶ added in v0.3.1
SaveImagesNoTag saves a list of images by digest to the specified outputs.
func SaveIndex ¶ added in v0.3.0
func SaveIndex(outputs []*ImageSpec, index v1.ImageIndex, indexName string) error
SaveIndex saves an index to the specified outputs.
func SaveIndexAsOCILayout ¶ added in v0.3.0
func SaveIndexAsOCILayout(image v1.ImageIndex, path string) error
SaveIndexAsOCILayout saves an index as an OCI layout to the specified path.
func WithOptions ¶ added in v0.1.5
func WithoutTag ¶ added in v0.1.5
Types ¶
type EmptyConfigImage ¶ added in v0.3.1
func (*EmptyConfigImage) Digest ¶ added in v0.3.1
func (i *EmptyConfigImage) Digest() (v1.Hash, error)
func (*EmptyConfigImage) Manifest ¶ added in v0.3.1
func (i *EmptyConfigImage) Manifest() (*v1.Manifest, error)
func (*EmptyConfigImage) RawConfigFile ¶ added in v0.3.1
func (i *EmptyConfigImage) RawConfigFile() ([]byte, error)
func (*EmptyConfigImage) RawManifest ¶ added in v0.3.1
func (i *EmptyConfigImage) RawManifest() ([]byte, error)
type ImageDetailsResolver ¶ added in v0.1.5
type ImageSpec ¶ added in v0.1.5
type ImageSpec struct {
// OCI or Docker
Type SourceType
// without oci:// or docker:// (name or path)
Identifier string
Platform *v1.Platform
}
func ParseImageSpec ¶ added in v0.1.5
func ParseImageSpec(img string, options ...ImageSpecOption) (*ImageSpec, error)
func ParseImageSpecs ¶ added in v0.1.5
func ReplaceDigestInSpec ¶ added in v0.3.0
func ReplaceTagInSpec ¶ added in v0.1.8
type ImageSpecOption ¶ added in v0.1.5
func WithPlatform ¶ added in v0.1.5
func WithPlatform(platform string) ImageSpecOption
type NamedIndex ¶ added in v0.1.7
type NamedIndex struct {
Index v1.ImageIndex
Name string
}
func IndexFromPath ¶ added in v0.1.7
func IndexFromPath(path string) (*NamedIndex, error)
func IndexFromRemote ¶ added in v0.1.7
func IndexFromRemote(image string) (*NamedIndex, error)
func LoadIndex ¶ added in v0.1.7
func LoadIndex(input *ImageSpec) (*NamedIndex, error)
type RegistryImageDetailsResolver ¶ added in v0.1.5
type RegistryImageDetailsResolver struct {
*ImageSpec
// contains filtered or unexported fields
}
func NewRegistryImageDetailsResolver ¶ added in v0.1.5
func NewRegistryImageDetailsResolver(src *ImageSpec) (*RegistryImageDetailsResolver, error)
func (*RegistryImageDetailsResolver) ImageDescriptor ¶ added in v0.1.8
func (r *RegistryImageDetailsResolver) ImageDescriptor(ctx context.Context) (*v1.Descriptor, error)
func (*RegistryImageDetailsResolver) ImageName ¶ added in v0.1.5
func (r *RegistryImageDetailsResolver) ImageName(_ context.Context) (string, error)
func (*RegistryImageDetailsResolver) ImagePlatform ¶ added in v0.1.5
type SourceType ¶ added in v0.1.5
type SourceType string
Click to show internal directories.
Click to hide internal directories.