Documentation
¶
Index ¶
- Variables
- type ImageHandler
- type QemuTools
- func (q *QemuTools) ConvertImage(src, srcFmt, dst, dstFmt string) error
- func (q *QemuTools) CreateChainedCopy(src string, destination string, sizeM int64) error
- func (q *QemuTools) CreateCopy(src, dst string, sizeM int64) error
- func (q *QemuTools) GetImageFormat(path string) (string, error)
- func (q *QemuTools) GetImageSize(path string) (uint64, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoMemory = errors.New("invalid memory assignation")
)
Functions ¶
This section is empty.
Types ¶
type ImageHandler ¶
type ImageHandler interface {
// ConvertImage makes a copy of the image in a new format
ConvertImage(src, srcFmt, dst, dstFmt string) error
// CreateCopy creates a full copy from the src image
CreateCopy(src, dst string, sizeM int64) error
// CreateChainedCopy creates a copy chained copy from src image
CreateChainedCopy(src, dst string, sizeM int64) error
// GetImageFormat returns the format of a given image
GetImageFormat(path string) (string, error)
// GetImageSize returns the real size of the image. For some formats
// the size of the image will be larger than the size of the image
// file itself.
GetImageSize(path string) (uint64, error)
}
ImageHandler is the interface handling image files directly.
type QemuTools ¶
type QemuTools struct {
// contains filtered or unexported fields
}
func NewQemuHandler ¶
func (*QemuTools) ConvertImage ¶
ConvertImage makes a copy of the image in a new format
func (*QemuTools) CreateChainedCopy ¶
CreateChainedCopy creates a copy chained copy from src image
func (*QemuTools) CreateCopy ¶
CreateCopy creates a full copy from the src image
func (*QemuTools) GetImageFormat ¶
GetImageFormat gets the format of a given image
Click to show internal directories.
Click to hide internal directories.