Documentation
¶
Index ¶
- func ConvertPlatformV1ToCtrd(v1Platform *v1.Platform) platforms.Platform
- func DescribePlatform(platform platforms.Platform) string
- func DescribePlatforms(plats ...platforms.Platform) string
- func FindManifestForPlatform(findFor platforms.Platform, manifests []v1.Descriptor) *v1.Descriptor
- func FindManifestForPlatforms(findFor []platforms.Platform, manifests []v1.Descriptor, logger *slog.Logger) *v1.Descriptor
- func IsPartialVersion(version string) bool
- func IsSemver(version string) bool
- func ParseNamedReference(registry, repository, tag string) (name.Reference, error)
- func ParsePartialVersion(version string) []string
- func WithLookupEnv(lookupEnv LookupValue) func(*RemoteImageStore)
- func WithPlatforms(v1Platforms ...*v1.Platform) func(*RemoteImageStore)
- func WriteImage(path, refName string, image v1.Image, logger *slog.Logger) (writeErr error)
- type AuthLookupKeychain
- type CachedImageStore
- type Client
- type DiskLayerWriter
- type ImageStore
- type LayerWriter
- type LookupValue
- type OutputValue
- type Outputs
- type RemoteImageStore
- type Version
- type VersionLookup
- type Versions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertPlatformV1ToCtrd ¶
func DescribePlatform ¶
func DescribePlatforms ¶
func FindManifestForPlatform ¶
func FindManifestForPlatform(findFor platforms.Platform, manifests []v1.Descriptor) *v1.Descriptor
func FindManifestForPlatforms ¶
func FindManifestForPlatforms(findFor []platforms.Platform, manifests []v1.Descriptor, logger *slog.Logger) *v1.Descriptor
func IsPartialVersion ¶
func ParseNamedReference ¶
func ParsePartialVersion ¶
Parse a version that is not necessarily a valid semver.
func WithLookupEnv ¶
func WithLookupEnv(lookupEnv LookupValue) func(*RemoteImageStore)
func WithPlatforms ¶
func WithPlatforms(v1Platforms ...*v1.Platform) func(*RemoteImageStore)
Types ¶
type AuthLookupKeychain ¶
type AuthLookupKeychain struct {
// contains filtered or unexported fields
}
func NewAuthLookupKeychain ¶
func NewAuthLookupKeychain(lookup LookupValue, logger *slog.Logger) *AuthLookupKeychain
func (*AuthLookupKeychain) Resolve ¶
func (ak *AuthLookupKeychain) Resolve(target authn.Resource) (authn.Authenticator, error)
type CachedImageStore ¶
type CachedImageStore struct {
// contains filtered or unexported fields
}
CachedImageStore caches complete OCI images (not individual layers), and does so only for fully qualified image references. A fully qualified image reference has either a digest or a tag with major.minor.patch (and optionally release) components. Image refs with only major, major.minor, or `latest` tags are not cached. Note: there is no cache expiration/eviction yet.
func NewCachedImageStore ¶
func NewCachedImageStore(remote ImageStore, storePath string, logger *slog.Logger) *CachedImageStore
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(imageStore ImageStore, versionLookup VersionLookup) *Client
type DiskLayerWriter ¶
type DiskLayerWriter struct {
// contains filtered or unexported fields
}
func NewDiskLayerWriter ¶
func NewDiskLayerWriter(logger *slog.Logger) *DiskLayerWriter
type ImageStore ¶
type LookupValue ¶
type OutputValue ¶
type RemoteImageStore ¶
type RemoteImageStore struct {
// contains filtered or unexported fields
}
RemoteImageStore downloads and extract OCI images. The path is composed from the image reference and is rooted at `storePath`. There's no caching or cleanup.
func NewRemoteImageStore ¶
func NewRemoteImageStore(storePath string, logger *slog.Logger, options ...func(*RemoteImageStore)) *RemoteImageStore
type Version ¶
type Version struct {
// contains filtered or unexported fields
}
func NewVersion ¶
func ParseSemanticVersion ¶
func (*Version) IsReleaseCandidate ¶
func (*Version) Satisfies ¶
Satisfies tests whether the Version satisfies a partial version. The Version satisfies a partial version when every version part in the partial version is equal to the same version part in the Version, including release. This handles the case where a partial image version 1.2.3 is requested, but the annotated Version in the pulled image is e.g 4.5.6. This condition is undefined so we should fail. partialVersion must be a partial version, not e.g. "latest" or a digest.