Documentation ¶
Index ¶
- Variables
- func AsResolvable(c compute.Computable[Image]) compute.Computable[ResolvableImage]
- func AttachDigestToAction(ctx context.Context, img Image)
- func CacheLayer(ctx context.Context, c cache.Cache, layer v1.Layer) (schema.Digest, error)
- func ComputeLayerCacheData(layer v1.Layer) ([]byte, schema.Digest, error)
- func DockerHubMirror() string
- func ImageAsFS(image v1.Image) tarfs.FS
- func ImageP(ref string, platform *specs.Platform, opts RegistryAccess) compute.Computable[Image]
- func LoadCachedLayer(ctx context.Context, c cache.Cache, h schema.Digest) (v1.Layer, schema.Digest, error)
- func MakeImageIndex(images ...ImageWithPlatform) compute.Computable[ResolvableImage]
- func MergeImageLayers(images ...NamedImage) compute.Computable[Image]
- func ParseRef(imageRef string, insecure bool) (name.Reference, error)
- func ParseRefAndKeychain(ctx context.Context, imageRef string, opts RegistryAccess) (name.Reference, []remote.Option, error)
- func ParseTag(tag RepositoryWithAccess, digest v1.Hash) (name.Tag, error)
- func Prebuilt(imgid ImageID, opts RegistryAccess) compute.Computable[ResolvableImage]
- func PublishResolvable(tag compute.Computable[RepositoryWithParent], ...) compute.Computable[ImageID]
- func RefWithRegistryMirror(ctx context.Context, imageRef name.Reference) (name.Reference, error)
- func RegisterDomainKeychain(suffix string, keychain Keychain, purpose KeychainWhen)
- func RegisterImageCacheable()
- func RemoteOptsWithAuth(ctx context.Context, access RegistryAccess, writeAccess bool) ([]remote.Option, error)
- func ResolveImagePlatform(c compute.Computable[ResolvableImage], platform specs.Platform) compute.Computable[Image]
- func VisitFilesFromImage(img v1.Image, ...) error
- type HasToLayer
- type Image
- func Canonical(ctx context.Context, original Image) (Image, error)
- func EnsureCached(ctx context.Context, img Image) (Image, error)
- func FetchRemoteImage(ctx context.Context, imageid ImageID, opts RegistryAccess) (Image, error)
- func IngestFromFS(ctx context.Context, fsys fs.FS, path string, compressed bool) (Image, error)
- func WithCanonicalManifest(ctx context.Context, img Image) (Image, error)
- type ImageID
- type ImageIndex
- type ImageSource
- type ImageWithPlatform
- type Keychain
- type KeychainWhen
- type Layer
- type NamedImage
- func LocalCopy(input NamedImage) NamedImage
- func MakeImage(description string, base NamedImage, layers ...NamedLayer) NamedImage
- func MakeImageFromScratch(description string, layers ...NamedLayer) NamedImage
- func MakeNamedImage(description string, image compute.Computable[Image]) NamedImage
- func ResolveImage(ref string, platform specs.Platform) NamedImage
- func Scratch() NamedImage
- type NamedImageID
- type NamedLayer
- type RawDescriptor
- func (*RawDescriptor) Descriptor() ([]byte, []int)deprecated
- func (x *RawDescriptor) GetMediaType() string
- func (x *RawDescriptor) GetRawConfig() []byte
- func (x *RawDescriptor) GetRawManifest() []byte
- func (x *RawDescriptor) GetRepository() string
- func (*RawDescriptor) ProtoMessage()
- func (x *RawDescriptor) ProtoReflect() protoreflect.Message
- func (x *RawDescriptor) Reset()
- func (x *RawDescriptor) String() string
- type RawImageWithPlatform
- type RegistryAccess
- type RemoteProgress
- type RepositoryWithAccess
- type RepositoryWithParent
- type ResolvableImage
- type ResourceDescription
- type TargetRewritter
Constants ¶
This section is empty.
Variables ¶
View Source
var ConvertImagesToEstargz = false
View Source
var File_internal_artifacts_oci_types_proto protoreflect.FileDescriptor
View Source
var MergeOptimizer func(images []NamedImage) compute.Computable[Image]
View Source
var (
UsePercentageInTracking = false
)
Functions ¶
func AsResolvable ¶
func AsResolvable(c compute.Computable[Image]) compute.Computable[ResolvableImage]
func AttachDigestToAction ¶ added in v0.0.108
func CacheLayer ¶
func ComputeLayerCacheData ¶
func DockerHubMirror ¶ added in v0.0.267
func DockerHubMirror() string
func ImageP ¶
func ImageP(ref string, platform *specs.Platform, opts RegistryAccess) compute.Computable[Image]
Returns a Computable which constraints on platform if one is specified.
func LoadCachedLayer ¶
func MakeImageIndex ¶
func MakeImageIndex(images ...ImageWithPlatform) compute.Computable[ResolvableImage]
func MergeImageLayers ¶
func MergeImageLayers(images ...NamedImage) compute.Computable[Image]
func ParseRefAndKeychain ¶
func Prebuilt ¶ added in v0.0.94
func Prebuilt(imgid ImageID, opts RegistryAccess) compute.Computable[ResolvableImage]
func PublishResolvable ¶
func PublishResolvable(tag compute.Computable[RepositoryWithParent], image compute.Computable[ResolvableImage], source ImageSource) compute.Computable[ImageID]
func RefWithRegistryMirror ¶ added in v0.0.267
func RegisterDomainKeychain ¶
func RegisterDomainKeychain(suffix string, keychain Keychain, purpose KeychainWhen)
func RegisterImageCacheable ¶
func RegisterImageCacheable()
func RemoteOptsWithAuth ¶ added in v0.0.124
func ResolveImagePlatform ¶ added in v0.0.112
func ResolveImagePlatform(c compute.Computable[ResolvableImage], platform specs.Platform) compute.Computable[Image]
Types ¶
type HasToLayer ¶
type Image ¶
func EnsureCached ¶ added in v0.0.108
func FetchRemoteImage ¶ added in v0.0.117
func IngestFromFS ¶
type ImageID ¶
type ImageID struct { Repository string `json:"repository"` Tag string `json:"tag"` Digest string `json:"digest"` }
func ParseImageID ¶
func (ImageID) ComputeDigest ¶
func (ImageID) RepoAndDigest ¶
type ImageIndex ¶
type ImageIndex v1.ImageIndex
type ImageSource ¶ added in v0.0.89
type ImageSource interface { GetSourceLabel() string GetSourcePackageRef() *schema.PackageRef }
type ImageWithPlatform ¶
type ImageWithPlatform struct { Image NamedImage Platform specs.Platform }
type KeychainWhen ¶
type KeychainWhen int
const ( Keychain_UseAlways KeychainWhen = iota Keychain_UseOnWrites )
type NamedImage ¶
type NamedImage interface { ResourceDescription[Image] Image() compute.Computable[Image] }
func LocalCopy ¶
func LocalCopy(input NamedImage) NamedImage
func MakeImage ¶
func MakeImage(description string, base NamedImage, layers ...NamedLayer) NamedImage
func MakeImageFromScratch ¶
func MakeImageFromScratch(description string, layers ...NamedLayer) NamedImage
func MakeNamedImage ¶
func MakeNamedImage(description string, image compute.Computable[Image]) NamedImage
func ResolveImage ¶
func ResolveImage(ref string, platform specs.Platform) NamedImage
func Scratch ¶
func Scratch() NamedImage
type NamedImageID ¶
type NamedImageID interface { ResourceDescription[ImageID] ImageID() compute.Computable[ImageID] }
func MakeNamedImageID ¶
func MakeNamedImageID(description string, imageID compute.Computable[ImageID]) NamedImageID
func PublishImage ¶
func PublishImage(tag compute.Computable[RepositoryWithParent], image NamedImage) NamedImageID
func ResolveDigest ¶
func ResolveDigest(ref string, opts RegistryAccess) NamedImageID
Resolves the image tag into a digest. If one is already specified, this is a no-op.
type NamedLayer ¶
type NamedLayer interface { ResourceDescription[Layer] Layer() compute.Computable[Layer] }
func LayerFromFile ¶
func LayerFromFile(description string, vfs fs.FS, path string) NamedLayer
func MakeLayer ¶
func MakeLayer(name string, vfs compute.Computable[fs.FS]) NamedLayer
func MakeNamedLayer ¶
func MakeNamedLayer(description string, layer compute.Computable[Layer]) NamedLayer
type RawDescriptor ¶
type RawDescriptor struct { Repository string `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"` MediaType string `protobuf:"bytes,2,opt,name=media_type,json=mediaType,proto3" json:"media_type,omitempty"` RawManifest []byte `protobuf:"bytes,3,opt,name=raw_manifest,json=rawManifest,proto3" json:"raw_manifest,omitempty"` RawConfig []byte `protobuf:"bytes,4,opt,name=raw_config,json=rawConfig,proto3" json:"raw_config,omitempty"` // Only available when the descriptor points at an image. // contains filtered or unexported fields }
func (*RawDescriptor) Descriptor
deprecated
func (*RawDescriptor) Descriptor() ([]byte, []int)
Deprecated: Use RawDescriptor.ProtoReflect.Descriptor instead.
func (*RawDescriptor) GetMediaType ¶
func (x *RawDescriptor) GetMediaType() string
func (*RawDescriptor) GetRawConfig ¶
func (x *RawDescriptor) GetRawConfig() []byte
func (*RawDescriptor) GetRawManifest ¶
func (x *RawDescriptor) GetRawManifest() []byte
func (*RawDescriptor) GetRepository ¶
func (x *RawDescriptor) GetRepository() string
func (*RawDescriptor) ProtoMessage ¶
func (*RawDescriptor) ProtoMessage()
func (*RawDescriptor) ProtoReflect ¶
func (x *RawDescriptor) ProtoReflect() protoreflect.Message
func (*RawDescriptor) Reset ¶
func (x *RawDescriptor) Reset()
func (*RawDescriptor) String ¶
func (x *RawDescriptor) String() string
type RawImageWithPlatform ¶ added in v0.0.199
type RegistryAccess ¶ added in v0.0.103
type RegistryAccess struct { InsecureRegistry bool PublicImage bool Keychain Keychain Transport *registry.RegistryTransport }
type RemoteProgress ¶
type RemoteProgress struct {
// contains filtered or unexported fields
}
func (*RemoteProgress) FormatProgress ¶
func (rp *RemoteProgress) FormatProgress() string
func (*RemoteProgress) Track ¶
func (rp *RemoteProgress) Track() remote.Option
type RepositoryWithAccess ¶ added in v0.0.124
type RepositoryWithAccess struct { RegistryAccess Repository string UserTag string }
type RepositoryWithParent ¶ added in v0.0.124
type RepositoryWithParent struct { Parent interface{} RepositoryWithAccess }
func (RepositoryWithParent) ComputeDigest ¶ added in v0.0.124
type ResolvableImage ¶
type ResolvableImage interface { Digest() (schema.Digest, error) Image() (Image, error) ImageForPlatform(specs.Platform) (Image, error) ImageIndex() (ImageIndex, error) Push(context.Context, RepositoryWithAccess, bool) (v1.Hash, error) // contains filtered or unexported methods }
func RawAsResolvable ¶
func RawAsResolvable(img Image) ResolvableImage
func RawMakeIndex ¶ added in v0.0.199
func RawMakeIndex(images ...RawImageWithPlatform) (ResolvableImage, error)
type ResourceDescription ¶
type TargetRewritter ¶
type TargetRewritter interface {
CheckRewriteLocalUse(RepositoryWithAccess) *RepositoryWithAccess
}
Source Files ¶
- canonical.go
- estargz.go
- fetchimage.go
- forcecache.go
- fromfs.go
- imagecache.go
- imageid.go
- ingest.go
- makeimage.go
- makeindex.go
- makelayer.go
- mergeimage.go
- name.go
- partialimage.go
- prebuilt.go
- publishimage.go
- push.go
- readfiles.go
- reference.go
- remote.go
- resolveimage.go
- scratch.go
- transport.go
- types.go
- types.pb.go
Click to show internal directories.
Click to hide internal directories.