Documentation
¶
Index ¶
- func AppendFile(path string, contents string) error
- func AppendFileWithPermissions(path string, contents string, perm os.FileMode) error
- func ConfigureFilesystems(ctx context.Context, mountpoint, rootPartition, espPartition string) error
- func CopyFile(src string, dst string) error
- func CopyFileWithPermissions(src string, dst string, perm os.FileMode) error
- func CreateMountpointAt(ctx context.Context, path string) error
- func GetFilesystemUUID(ctx context.Context, devicePath string) (string, error)
- func Mount(ctx context.Context, device, location string) error
- func PartitionDisk(ctx context.Context, name string) error
- func RemoveMountpointAt(p string)
- func TemplateString(tmpl string, data interface{}) (string, error)
- func Unmount(ctx context.Context, p string)
- func UnmountRecursive(p string)
- func UnpackTarball(ctx context.Context, source, target string) error
- func WriteFile(path string, contents string) error
- func WriteFileWithPermissions(path string, contents string, perm os.FileMode) error
- type LoopDevice
- type RawImage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendFile ¶
AppendFile appends the given contents to a file.
func ConfigureFilesystems ¶
func ConfigureFilesystems(ctx context.Context, mountpoint, rootPartition, espPartition string) error
ConfigureFilesystems configures the filesystems on the specified disk
func CopyFileWithPermissions ¶
CopyFileWithPermissions copies a file from src to dst with the given permissions.
func CreateMountpointAt ¶
CreateMountpoint creates the mountpoint for the bootstrap
func GetFilesystemUUID ¶
GetFilesystemUUID returns the UUID of the specified filesystem
func RemoveMountpointAt ¶
func RemoveMountpointAt(p string)
RemoveMountpointAt removes the specified mountpoint
func TemplateString ¶
TemplateString renders a template string
func UnmountRecursive ¶
func UnmountRecursive(p string)
UnmountRecursive recursively unmounts the filesystem(s) as the specified location
func UnpackTarball ¶
UnpackTarball unpacks a tarball to the specified target
Types ¶
type RawImage ¶
type RawImage struct { ImagePath string // contains filtered or unexported fields }
RawImage represents a disk image
func NewRawImage ¶
NewRawImage initializes a new RawImage struct
func (*RawImage) Attach ¶
func (i *RawImage) Attach(ctx context.Context) (*LoopDevice, error)
Attach attaches the image to a loop device