Documentation ¶
Index ¶
- Variables
- func AsResolvable(c compute.Computable[Image]) compute.Computable[ResolvableImage]
- func CacheLayer(ctx context.Context, c cache.Cache, layer v1.Layer) (schema.Digest, error)
- func ComputeLayerCacheData(layer v1.Layer) ([]byte, schema.Digest, error)
- func ImageP(ref string, platform *specs.Platform, opts ResolveOpts) 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 ResolveOpts) (name.Reference, []remote.Option, error)
- func ParseTag(tag TargetRepository, digest v1.Hash) (name.Tag, error)
- func Prebuilt(imgid ImageID, opts ResolveOpts) compute.Computable[ResolvableImage]
- func PublishResolvable(tag compute.Computable[AllocatedRepository], ...) compute.Computable[ImageID]
- func ReadFileFromImage(ctx context.Context, img v1.Image, path string) ([]byte, error)
- func ReadFiles(image NamedImage, paths ...string) compute.Computable[fs.FS]
- func ReadFilesFromImage(img v1.Image, paths ...string) (*memfs.FS, error)
- func RegisterDomainKeychain(suffix string, keychain Keychain, purpose KeychainWhen)
- func RegisterImageCacheable()
- func VisitFilesFromImage(img v1.Image, ...) error
- func WriteRemoteOptsWithAuth(ctx context.Context, keychain Keychain) []remote.Option
- type AllocatedRepository
- type HasToLayer
- type Image
- 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 RemoteProgress
- type ResolvableImage
- type ResolveOpts
- type ResourceDescription
- type TargetRepository
- 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 CacheLayer ¶
func ComputeLayerCacheData ¶
func ImageP ¶
func ImageP(ref string, platform *specs.Platform, opts ResolveOpts) 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 ResolveOpts) compute.Computable[ResolvableImage]
func PublishResolvable ¶
func PublishResolvable(tag compute.Computable[AllocatedRepository], image compute.Computable[ResolvableImage], source ImageSource) compute.Computable[ImageID]
func ReadFileFromImage ¶
func ReadFiles ¶
func ReadFiles(image NamedImage, paths ...string) compute.Computable[fs.FS]
func RegisterDomainKeychain ¶
func RegisterDomainKeychain(suffix string, keychain Keychain, purpose KeychainWhen)
func RegisterImageCacheable ¶
func RegisterImageCacheable()
func VisitFilesFromImage ¶
Types ¶
type AllocatedRepository ¶
type AllocatedRepository struct { Parent interface{} TargetRepository }
func (AllocatedRepository) ComputeDigest ¶
type HasToLayer ¶
type Image ¶
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[AllocatedRepository], image NamedImage) NamedImageID
func ResolveDigest ¶
func ResolveDigest(ref string, opts ResolveOpts) 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 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 ResolvableImage ¶
type ResolvableImage interface { Digest() (schema.Digest, error) Image() (Image, error) ImageForPlatform(specs.Platform) (Image, error) ImageIndex() (ImageIndex, error) Push(context.Context, TargetRepository, bool) (v1.Hash, error) // contains filtered or unexported methods }
func RawAsResolvable ¶
func RawAsResolvable(img Image) ResolvableImage
type ResolveOpts ¶
type ResourceDescription ¶
type TargetRepository ¶
type TargetRewritter ¶
type TargetRewritter interface {
CheckRewriteLocalUse(TargetRepository) *TargetRepository
}
Source Files ¶
Click to show internal directories.
Click to hide internal directories.