image

package
v1.6.0-rc4 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopiedTag

func CopiedTag(tag, OS, arch, variant string, extra ...string) string

CopiedTag gets the tag of the copied image, the format should be: ${VERSION}-${ARCH}${VARIANT}${EXTRA}

If the OS is not linux, such as windows, darwin, etc the format should be: ${VERSION}-${OS}-${ARCH}${VARIANT}

If the extra is not empty, the tag format should be: ${VERSION}-${OS}-${ARCH}${VARIANT}-${EXTRA}

Types

type Image

type Image struct {
	Source      string
	Destination string
	Tag         string
	Arch        string
	Variant     string
	OS          string
	OsVersion   string

	// Digest is the source image manifest sha256sum
	Digest string

	// Directory is the absolute path to save the image
	Directory string

	// SavedFolder is the folder name of the saved image
	SavedFolder string

	Copied bool
	Saved  bool
	Loaded bool

	SourceMediaType string

	// IID is the ID of the Image
	IID int
	// MID is the ID of the Mirror
	MID int
}

func NewImage

func NewImage(opts *ImageOptions) *Image

func (*Image) Copy

func (img *Image) Copy() error

func (*Image) Load

func (img *Image) Load() error

func (*Image) Save

func (img *Image) Save() error

type ImageOptions

type ImageOptions struct {
	Source      string
	Destination string
	Tag         string
	Arch        string
	Variant     string
	OS          string
	OsVersion   string
	Digest      string
	Directory   string
	SavedFolder string

	SourceMediaType string

	MID int
}

Jump to

Keyboard shortcuts

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