package
0.0.0-20210416212145-5b8b77a4bcd2
Repository: https://github.com/combust-labs/firebuild.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
CheckIfExistsAndIsDirectory checks is a path points at a directory.
CheckIfExistsAndIsRegular checks is a path points at a regular file.
CopyFile copies a file at the source path to the dest path.
CreateRootFSFile uses dd to create a rootfs file of given size at a given path.
EncodePrivateKeyToPEM encodes Private Key from RSA to PEM format.
GenerateRSAPrivateKey generates a new RSA private key.
GetConfiguredOrSuitableInterfaceName returns the configured interface name, if not empty, or tries retrieving first suitable interface name.
GetenvOrDefault calls os>lookup for a key and returns a fallback only if variable wasn't set.
GetFirstUpBroadcastInterface retrieves the first suitable up broadact capable interface.
GetInterfaceV4Addr fetches an IPv4 address of an interface.
GetSSHKey generates an SSH public key for the given private key.
GetUpBroadcastInterfaces retrieves the list of up broadcast interfaces.
IsValidHostname validates if a string is a valid host name.
IsValidTag checks if the given image tag is valid.
MarshalSSHPublicKey marshals SSH public key to the OpenSSH format so it can be used for authorized_keys file.
MkfsExt4 uses mkfs.ext4 to create an EXT4 file system in a given file.
Mount sudo mounts a rootfs file at a location.
MoveFile moves file from source to destination.
NewDefers returns a new instance of Defers.
PathExists returns true if path exists.
RandomHostname returns a new random host name.
RandStringBytes returns a random string of length n.
RandStringWithDigitsBytes returns a random string of length n.
RunShellCommandNoSudo runs a shell command without sudo.
RunShellCommandSudo runs a shell command with sudo.
SSHPublicKeyFromBytes reads an SSH public key from bytes.
SSHPublicKeyFromFile reads an SSH public key from a PEM file.
TagDecompose decomposes the tag into the image components.
Umount sudo umounts a location.
# Constants
RootFSCopyBufferSize is the buffer size for root file system copy operation.
Defaults.
# Interfaces
Defers maintains ordered LIFO list of functions to handle on the defer call.