skiff

package
v0.0.0-...-5e9ad28 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlobInfoFromImage

func BlobInfoFromImage(ctx context.Context, sysCtx *types.SystemContext, img types.Image) ([]types.BlobInfo, error)

BlobInfoFromImage extracts layer blob information that can be later used with `GetBlob` from a container image, handling different transport types appropriately.

Returns a slice of BlobInfo containing layer information needed for blob retrieval operations.

func FormatDigest

func FormatDigest(digest digest.Digest, fullDigest bool) string

FormatDigest returns either the digest if `fullDigest` is `true` or the first twelve characters of the hash/encoded value if `fullDigest` is `false`.

func HumanReadableSize

func HumanReadableSize(b int64) string

HumanReadableSize converts a byte count to a human readable string From https://yourbasic.org/golang/formatting-byte-size-to-human-readable-format/

func ImageAndLayersFromURI

func ImageAndLayersFromURI(ctx context.Context, sysCtx *types.SystemContext, uri string) (types.Image, []storage.Layer, error)

ImageAndLayersFromURI tries to obtain the image from the "most likely source"

If the uri includes a transport, then the uri is parsed and an Image instance is returned.

If the uri does not contain a transport, then this function first tries to load the image from the (rootless) container storage. If that fails, we try to load it from a registry by prepending the `docker://` transport.

If the image is present in the local container store, then we also return the layers of that image.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL