image

package
v0.0.0-...-b40ed23 Latest Latest
Warning

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

Go to latest
Published: May 27, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatSize

func FormatSize(size int64) string

func Images

func Images(stdout io.Writer) error

func MetadataExists

func MetadataExists(ref *Reference) bool

func Prune

func Prune(stdout io.Writer) error

func Pull

func Pull(input string) error

func Remove

func Remove(input string) error

func RemoveRepoTag

func RemoveRepoTag(ref *Reference, manifestDigest string) error

func WriteMetadata

func WriteMetadata(ref *Reference, img *ImageManifest) error

Types

type ImageConfig

type ImageConfig struct {
	Architecture string `json:"architecture"`
	OS           string `json:"os"`
	Config       struct {
		Cmd        []string `json:"Cmd"`
		Env        []string `json:"Env"`
		WorkingDir string   `json:"WorkingDir"`
		User       string   `json:"User"`
		Entrypoint []string `json:"Entrypoint"`
	} `json:"config"`
}

func ReadImageConfig

func ReadImageConfig(digest string) (*ImageConfig, error)

type ImageManifest

type ImageManifest struct {
	ManifestDigest string
	ConfigDigest   string
	Layers         []LayerDescriptor
	OS             string
	Architecture   string
}

type ImageMetadata

type ImageMetadata struct {
	ID             string    `json:"id"`
	Repo           string    `json:"repo"`
	RepoTags       []string  `json:"repoTags"`
	ManifestDigest string    `json:"manifestDigest"`
	ConfigDigest   string    `json:"configDigest"`
	Layers         []string  `json:"layers"`
	OS             string    `json:"os"`
	Architecture   string    `json:"architecture"`
	Size           int64     `json:"size"`
	Created        time.Time `json:"created"`
}

func ReadMetadata

func ReadMetadata(ref *Reference) (*ImageMetadata, error)

type LayerDescriptor

type LayerDescriptor struct {
	Digest string
	Size   int64
}

type PruneResult

type PruneResult struct {
	MetadataRemoved int
	BlobsRemoved    int
	Reclaimed       int64
}

type Reference

type Reference struct {
	Registry string
	Repo     string
	Tag      string
}

func ParseReference

func ParseReference(input string) (*Reference, error)

type SingleManifest

type SingleManifest struct {
	Config struct {
		Digest string `json:"digest"`
	} `json:"config"`

	Layers []struct {
		Digest string `json:"digest"`
		Size   int64  `json:"size"`
	} `json:"layers"`
}

type Summary

type Summary struct {
	Name           string
	ID             string
	ManifestDigest string
	Platform       string
	Layers         int
	Created        time.Time
	Size           int64
}

func ListSummaries

func ListSummaries() ([]Summary, error)

Jump to

Keyboard shortcuts

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