package
0.2.0
Repository: https://github.com/lf-edge/eden.git
Documentation: pkg.go.dev

# Functions

AddTimestamp wraps string with time.
CompareProtoMessages returns true if messages are equal.
ContextInit generates and returns default context.
ContextLoad read file with context data.
CopyFile copy file from src to dst with same permission.
CopyFileNotExists copy file from src to dst with same permission if not exists.
CopyFolder from source to destination.
CreateAndRunContainer run container with defined name from image with port and volume mapping and defined command.
CreateCipherCtx for edge dev config.
CreateDockerNetwork create network for docker`s containers.
CreateImage create new image from directory with tag If Dockerfile is inside the directory will use it otherwise will create image from scratch.
CreateTarGz generates tar.gz file in dstFile by putting files and directories described in paths.
CryptoConfigWrapper create cipherCtx and encrypt secrets for all the objects.
CurrentDirConfigPath returns path to eden-config.yml in current folder.
DefaultConfigPath returns path to default config.
DefaultEdenDir returns path to default directory.
DelEleInSlice delete an element from slice by index - arr: the reference of slice - index: the index of element will be deleted.
DelEleInSliceByFunction delete an element from slice by function - arr: the reference of slice - f: delete if it returns true on element of slice.
DownloadEveInstaller pulls EVE installer image from docker.
DownloadEveLive pulls EVE live image from docker.
DownloadEveNetBoot pulls EVE image from docker and prepares files for net boot.
DownloadEveRootFS pulls EVE rootfs image from docker.
DownloadFile download a url to a local file.
ExtractFilesFromDocker extract all files from docker layer into directoryif prefixDirectory is not empty, remove it from path.
FileNameWithoutExtension trim file extension and path.
FindEleInSlice takes a slice and looks for an element in it.
GenCARoot gen root CA.
GenerateConfigFile is a function to generate default yml.
GenerateConfigFileDiff is a function to generate diff yml for new context.
GenerateConfigFileFromViper is a function to generate yml from viper config.
GeneratePassword returns string with defined length and random characters.
GenerateSSHKeyPair generates keypair for ssh.
GenerateStateFile generates state in file.
GenServerCertElliptic elliptic cert.
GetCommonCryptoConfig calculate common crypto configand keep it in a structure.Common config are:1.
GetConfig return path to config file.
GetDesktopName return DesktopName from VNC server address with password (if not empty).
GetDockerNetworks returns gateways IPs of networks in docker.
GetFileFollowLinks resolve file by walking through symlinks.
GetFileSize returns file size.
GetFileSizeURL returns file size for url.
GetIPForDockerAccess is service function to obtain IP for adam accessThe function is filter out docker bridge.
GetParams parse line with regexp into map.
GetSubnetIPs return all IPs from subnet.
GetSubnetsNotUsed prepare map with subnets and ip not used by any interface of host.
HasImage see if the image is local.
InitQueueWithCapacity initialises queue.
InitVars loads vars from viper.
IsInputFromPipe returns true if the command is running from pipe.
LoadConfigFile load config from file with viper.
LoadConfigFileContext load config from context file with viper.
LoadRegistry push image into registry.
LookUp try to resolve values from interface by path.
LookupWithCallback travels through inpValue by inpPath and apply callback you can pass [] without index for iterate over loops.
NewRegistryHTTP creates new RegistryHTTP with plainHTTP resolver.
ParseCertificate from file.
ParseFirstCertFromBlock process provided certificate date.
ParsePrivateKey from file.
PullImage from docker.
PushImage from docker while optionally changing to a different remote registry.
RemoveGeneratedVolumeOfContainer remove volumes created by eden.
RenderTemplate render Go template with Eden-related fuctions.
RepeatableAttempt do request several times waiting for nil error and expected status code.
RequestHTTPRepeatWithTimeout make series of requests to url with timeoutreturnEmpty control if empty string is normal result.
RequestHTTPWithTimeout make request to url with timeout.
ResolveAbsPath use eden.root parameter to resolve path.
ResolveHomeDir resolve ~ in path.
ResolveURL concatenate parts of url.
RunCommandAndWait run process in foreground.
RunCommandBackground command run in goroutine.
RunCommandForeground command run in foreground.
RunCommandNohup run process in background.
RunCommandWithLogAndWait run process in foreground.
RunCommandWithSTDINAndWait run process in foreground with stdin passed as arg.
RunDockerCommand is run wrapper for docker container.
SaveImage get a reader to save an image.
SaveImageAndExtract from docker to outputDir only for path defaultEvePrefixInTar in docker rootfs.
SaveImageToTar creates tar from image.
SHA256SUM calculates sha256 of file.
SHA256SUMAll calculates sha256 of directory.
StartContainer start container with containerName.
StateContainer return state of container if found or "" state if not found.
StatusCommandWithPid check if process with pid from pidFile running.
StopCommandWithPid sends kill to pid from pidFile.
StopContainer stop container and remove if remove is true.
TagImage set new tag to image.
TouchFile create empty file.
UnpackTarGz observes tar.gz file in srcFile and extracts files and directories described in paths.
Untar extracts files from srcFile tar into destination.
UploadFile send file in form.
WriteToFiles write cert and key.

# Structs

CommonCryptoConfig stores information about certificates.
ConfigVars struct with parameters from config file.
Context for use with multiple config files.
EVEDescription provides information about EVE to download.
FileToSave provides pattern to save or load files based on Location and Destination inside fs and tar.
IFInfo stores information about net address and subnet.
QemuSettings struct for pass into template.
QueueWithCapacity for represent FIFO queue with defined capacity.
RegistryHTTP for http access to local registry.
StateObject is structure to save state in file.
UEFIDescription provides information about UEFI to download.