images

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DelImage

func DelImage(k string)

func ListAllImages

func ListAllImages() ([]map[string]string, error)

func LoadRepository

func LoadRepository() error

LoadRepository creates image repository instance from file

func SaveRepository

func SaveRepository() error

SaveRepository writes image repository to file

func SetImage

func SetImage(k string, v Metadata)

Types

type Image

type Image struct {
	Metadata Metadata
	// contains filtered or unexported fields
}

func NewImage

func NewImage(src string) (*Image, error)

NewImage pulls image, constructs and returns a new Image

func (*Image) Download

func (i *Image) Download(tag name.Tag) error

Download downloads and extract image's layers

type Metadata

type Metadata struct {
	ID         string       `json:"id"`
	Digest     string       `json:"digest"`
	Manifest   *v1.Manifest `json:"manifest"`
	Registry   string       `json:"registry"`
	Repository string       `json:"repository"`
	Name       string       `json:"name"`
	Tag        string       `json:"tag"`
}

func GetImage

func GetImage(k string) (Metadata, bool)

Jump to

Keyboard shortcuts

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