Documentation
¶
Overview ¶
Package image provides underlying data types for Singularity image formats. Additionally, all image types will satisfy the ImageFormat{} interface. This interface will expose all things necessary to use a Singularity image, whether through OCI or directly.
type ImageFormat interface {
Root() *spec.Root - Root() returns the OCI compliant root of the
Image. This function may preform some action,
such as extracting the filesystem to a dir.
}
Index ¶
Constants ¶
const EXT3 = 2
EXT3 defines constant for ext3 format
const SANDBOX = 3
SANDBOX defines constant for directory format
const SIF = 4
SIF defines constant for sif format
const SQUASHFS = 1
SQUASHFS defines constant for squashfs format
Variables ¶
This section is empty.
Functions ¶
func CheckExt3Header ¶
CheckExt3Header checks if byte content contains a valid ext3 header and returns offset where ext3 partition begin
func CheckSquashfsHeader ¶
CheckSquashfsHeader checks if byte content contains a valid squashfs header and returns offset where squashfs partition start
func ResolvePath ¶
ResolvePath returns a resolved absolute path
Types ¶
type Image ¶
type Image struct {
Path string `json:"path"`
Name string `json:"name"`
Type int `json:"type"`
File *os.File `json:"-"`
Fd uintptr `json:"fd"`
Source string `json:"source"`
Offset uint64 `json:"offset"`
Size uint64 `json:"size"`
Writable bool `json:"writable"`
RootFS bool `json:"rootFS"`
}
Image describes an image object
func (*Image) AuthorizedGroup ¶
AuthorizedGroup checks if image is owned by group supplied in groups list
func (*Image) AuthorizedOwner ¶
AuthorizedOwner checks if image is owned by user supplied in users list