img

package
v0.2.134 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2019 License: BSD-2-Clause Imports: 10 Imported by: 0

README

QEMU

Dependency packages

  • qemu-utils
apt install -y \
    qemu-utils

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImgInfo

type ImgInfo struct {
	VirtualSize     uint64                 `json:"virtual-size"`
	Filename        string                 `json:"filename"`
	ClusterSize     uint64                 `json:"cluster-size"`
	Format          string                 `json:"format"`
	ActuralSize     uint64                 `json:"actual-size"`
	FormatSpecific  map[string]interface{} `json:"format-specific"`
	BackingFilename string                 `json:"backing-filename"`
	DirtyFlag       bool                   `json:"dirty-flag"`
}

ImgInfo is response of `qemu-img info`.

type QemuImg

type QemuImg struct {
	Info *ImgInfo
	// contains filtered or unexported fields
}

func OpenQemuImg

func OpenQemuImg(path string) (*QemuImg, error)

func (*QemuImg) Copy

func (q *QemuImg) Copy(source *QemuImg) error

func (*QemuImg) Create

func (q *QemuImg) Create(bytes uint64) error

func (QemuImg) CreateBackingFile

func (q QemuImg) CreateBackingFile(path string) (*QemuImg, error)

func (*QemuImg) Delete

func (q *QemuImg) Delete() error

func (*QemuImg) Download

func (q *QemuImg) Download(src *url.URL) error

func (QemuImg) IsExists

func (q QemuImg) IsExists() bool

func (*QemuImg) Resize

func (q *QemuImg) Resize(bytes uint64) error

Jump to

Keyboard shortcuts

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