Documentation ¶
Index ¶
- func LookupFile(targetRoot string, path string) (string, error)
- type Manifest
- func (m *Manifest) AddArgument(arg string)
- func (m *Manifest) AddDebugFlag(name string, value rune)
- func (m *Manifest) AddDirectory(dir string, workDir string, opath string, insidepkg bool) error
- func (m *Manifest) AddEnvironmentVariable(name string, value string)
- func (m *Manifest) AddFile(filepath string, hostpath string) error
- func (m *Manifest) AddFileTo(dir map[string]interface{}, filepath string, hostpath string) error
- func (m *Manifest) AddKernel(path string)
- func (m *Manifest) AddKlibs(klibs []string)
- func (m *Manifest) AddLink(filepath string, hostpath string) error
- func (m *Manifest) AddMount(label, path string)
- func (m *Manifest) AddNetworkConfig(networkConfig *ManifestNetworkConfig)
- func (m *Manifest) AddNoTrace(name string)
- func (m *Manifest) AddPassthrough(key string, value interface{})
- func (m *Manifest) AddRelativeDirectory(src string) error
- func (m *Manifest) AddUserProgram(imgpath string) (err error)
- func (m *Manifest) FileExists(filepath string) bool
- func (m *Manifest) MkdirPath(path string)
- func (m *Manifest) SetKlibDir(dir string)
- func (m *Manifest) SetProgram(program string)
- type ManifestNetworkConfig
- type MkfsCommand
- func (m *MkfsCommand) Execute() error
- func (m *MkfsCommand) GetUUID() string
- func (m *MkfsCommand) SetBoot(boot string)
- func (m *MkfsCommand) SetFileSystemPath(fsPath string)
- func (m *MkfsCommand) SetFileSystemSize(size string) error
- func (m *MkfsCommand) SetLabel(label string)
- func (m *MkfsCommand) SetOldEncoding()
- func (m *MkfsCommand) SetUefi(uefi string)
- type Reader
- func (r *Reader) Close() error
- func (r *Reader) CopyFile(src, dest string, dereference bool) error
- func (r *Reader) GetLabel() string
- func (r *Reader) GetUUID() string
- func (r *Reader) ListArgs() []string
- func (r *Reader) ListEnv() map[string]string
- func (r *Reader) ReadDir(path string) ([]os.FileInfo, error)
- func (r *Reader) ReadLink(path string) (string, error)
- func (r *Reader) Stat(path string) (os.FileInfo, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Manifest ¶
type Manifest struct {
// contains filtered or unexported fields
}
Manifest represent the filesystem.
func (*Manifest) AddArgument ¶
AddArgument add commandline arguments to user program
func (*Manifest) AddDebugFlag ¶
AddDebugFlag enables debug flags
func (*Manifest) AddDirectory ¶
AddDirectory adds all files in dir to image
If insidepkg is not set then strip path prefix opath is currently passed in only because of this chdir call which gets cleaned up afterwards; should look at removing that in the future.
func (*Manifest) AddEnvironmentVariable ¶
AddEnvironmentVariable adds environment variables
func (*Manifest) AddNetworkConfig ¶
func (m *Manifest) AddNetworkConfig(networkConfig *ManifestNetworkConfig)
AddNetworkConfig adds network configuration
func (*Manifest) AddNoTrace ¶
AddNoTrace enables debug flags
func (*Manifest) AddPassthrough ¶
AddPassthrough to add key, value directly to manifest
func (*Manifest) AddRelativeDirectory ¶
AddRelativeDirectory adds all files in dir to image
func (*Manifest) AddUserProgram ¶
AddUserProgram adds user program
func (*Manifest) FileExists ¶
FileExists checks if file is present at path in manifest
func (*Manifest) SetKlibDir ¶
SetKlibDir sets the host directory where kernel libs are located
func (*Manifest) SetProgram ¶
SetProgram sets user program
type ManifestNetworkConfig ¶
ManifestNetworkConfig has network configuration to set static IP
type MkfsCommand ¶
type MkfsCommand struct {
// contains filtered or unexported fields
}
MkfsCommand wraps mkfs calls
func NewMkfsCommand ¶
func NewMkfsCommand(m *Manifest, partitions bool) *MkfsCommand
NewMkfsCommand returns an instance of MkfsCommand
func (*MkfsCommand) GetUUID ¶
func (m *MkfsCommand) GetUUID() string
GetUUID returns the uuid of file system built
func (*MkfsCommand) SetBoot ¶
func (m *MkfsCommand) SetBoot(boot string)
SetBoot adds argument that sets file system boot
func (*MkfsCommand) SetFileSystemPath ¶
func (m *MkfsCommand) SetFileSystemPath(fsPath string)
SetFileSystemPath add argument that sets file system path
func (*MkfsCommand) SetFileSystemSize ¶
func (m *MkfsCommand) SetFileSystemSize(size string) error
SetFileSystemSize adds argument that sets file system size
func (*MkfsCommand) SetLabel ¶
func (m *MkfsCommand) SetLabel(label string)
SetLabel add label argument that sets file system label
func (*MkfsCommand) SetOldEncoding ¶
func (m *MkfsCommand) SetOldEncoding()
SetOldEncoding forces use of TFS version 4
func (*MkfsCommand) SetUefi ¶
func (m *MkfsCommand) SetUefi(uefi string)
SetUefi sets path of UEFI bootloader
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
Reader allows reading filesystem contents from an image