Documentation ¶
Index ¶
- func AddFileIntoEServer(server *EServer, filePath, prefix string) (*api.FileInfo, error)
- func CleanContext(eveDist, certsDist, imagesDist, evePID, eveUUID, vmName string, ...) (err error)
- func CleanEden(...) (err error)
- func CloneFromGit(dist string, gitRepo string, tag string) (err error)
- func DeleteEVEParallels(vmName string) (err error)
- func DeleteEVEVBox(vmName string) (err error)
- func GenerateEVEConfig(eveConfig string, domain string, ip string, port int, apiV1 bool, ...) (err error)
- func GenerateEveCerts(certsDir, domain, ip, eveIP, uuid, devModel, ssid, password string, apiV1 bool) (err error)
- func MakeEveInRepo(distEve string, configPath string, arch string, hv string, imageFormat string, ...) (image, additional string, err error)
- func PutEveCerts(certsDir, devModel, ssid, password string) (err error)
- func ReadFileInSquashFS(squashFSPath, filePath string) (content []byte, err error)
- func SetLinkStateQemu(qemuMonitorPort int, ifName string, up bool) error
- func SetLinkStateVbox(vmName, ifName string, up bool) error
- func StartAdam(adamPort int, adamPath string, adamForce bool, adamTag string, ...) (err error)
- func StartEServer(serverPort int, imageDist string, eserverForce bool, eserverTag string) (err error)
- func StartEVEParallels(vmName, eveImageFile string, parallelsCpus int, parallelsMem int, ...) (err error)
- func StartEVEQemu(qemuARCH, qemuOS, eveImageFile, qemuSMBIOSSerial string, ...) (err error)
- func StartEVEVBox(vmName, eveImageFile string, cpus int, mem int, hostFwd map[string]string) (err error)
- func StartRedis(redisPort int, redisPath string, redisForce bool, redisTag string) (err error)
- func StartRegistry(port int, tag, registryPath string, opts ...string) (err error)
- func StatusAdam() (status string, err error)
- func StatusEServer() (status string, err error)
- func StatusEVEParallels(vmName string) (status string, err error)
- func StatusEVEQemu(pidFile string) (status string, err error)
- func StatusEVEVBox(vmName string) (status string, err error)
- func StatusRedis() (status string, err error)
- func StatusRegistry() (status string, err error)
- func StopAdam(adamRm bool) (err error)
- func StopEServer(eserverRm bool) (err error)
- func StopEVEParallels(vmName string) (err error)
- func StopEVEQemu(pidFile string) (err error)
- func StopEVEVBox(vmName string) (err error)
- func StopEden(adamRm, redisRm, registryRm, eserverRm, eveRemote bool, evePidFile string, ...)
- func StopRedis(redisRm bool) (err error)
- func StopRegistry(rm bool) (err error)
- type EServer
- type EVEInfo
- type LinkState
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddFileIntoEServer ¶
AddFileIntoEServer puts file into eserver prefix will be added to the file if defined
func CleanContext ¶
func CleanContext(eveDist, certsDist, imagesDist, evePID, eveUUID, vmName string, configSaved string, remote bool) (err error)
CleanContext cleanup only context data
func CleanEden ¶
func CleanEden(eveDist, adamDist, certsDist, imagesDist, eserverDist, redisDist, registryDist, configDir, evePID string, configSaved string, remote bool, devModel string, vmName string) (err error)
CleanEden teardown Eden and cleanup
func CloneFromGit ¶
CloneFromGit function clone from git into dist
func DeleteEVEParallels ¶
DeleteEVEParallels function removes EVE from parallels
func DeleteEVEVBox ¶
DeleteEVEVBox function removes EVE from VirtualBox
func GenerateEVEConfig ¶
func GenerateEVEConfig(eveConfig string, domain string, ip string, port int, apiV1 bool, softserial string) (err error)
GenerateEVEConfig function copy certs to EVE config folder if ip is empty will not fill hosts file
func GenerateEveCerts ¶
func GenerateEveCerts(certsDir, domain, ip, eveIP, uuid, devModel, ssid, password string, apiV1 bool) (err error)
GenerateEveCerts function generates certs for EVE
func MakeEveInRepo ¶
func MakeEveInRepo(distEve string, configPath string, arch string, hv string, imageFormat string, rootFSOnly bool) (image, additional string, err error)
MakeEveInRepo build live image of EVE
func PutEveCerts ¶
PutEveCerts function put certs for zedcontrol
func ReadFileInSquashFS ¶
ReadFileInSquashFS returns the content of a single file (filePath) inside squashfs (squashFSPath)
func SetLinkStateQemu ¶
SetLinkStateQemu changes the link state of the given interface. If interface name is undefined, the function changes the link state of every uplink interface.
func SetLinkStateVbox ¶
SetLinkStateVbox changes the link state of the given interface. If interface name is undefined, the function changes the link state of every uplink interface.
func StartAdam ¶
func StartAdam(adamPort int, adamPath string, adamForce bool, adamTag string, adamRemoteRedisURL string, apiV1 bool, opts ...string) (err error)
StartAdam function run adam in docker with mounted adamPath/run:/adam/run if adamForce is set, it recreates container
func StartEServer ¶
func StartEServer(serverPort int, imageDist string, eserverForce bool, eserverTag string) (err error)
StartEServer function run eserver in docker if eserverForce is set, it recreates container
func StartEVEParallels ¶
func StartEVEParallels(vmName, eveImageFile string, parallelsCpus int, parallelsMem int, hostFwd map[string]string) (err error)
StartEVEParallels function run EVE in parallels
func StartEVEQemu ¶
func StartEVEQemu(qemuARCH, qemuOS, eveImageFile, qemuSMBIOSSerial string, eveTelnetPort, qemuMonitorPort int, qemuHostFwd map[string]string, qemuAccel bool, qemuConfigFile, logFile, pidFile string, tapInterface string, foregroud bool) (err error)
StartEVEQemu function run EVE in qemu
func StartEVEVBox ¶
func StartEVEVBox(vmName, eveImageFile string, cpus int, mem int, hostFwd map[string]string) (err error)
StartEVEVBox function runs EVE in VirtualBox
func StartRedis ¶
StartRedis function run redis in docker with mounted redisPath:/data if redisForce is set, it recreates container
func StartRegistry ¶
StartRegistry function run registry in docker
func StatusAdam ¶
StatusAdam function return status of adam
func StatusEServer ¶
StatusEServer function return eserver of adam
func StatusEVEParallels ¶
StatusEVEParallels function get status of EVE
func StatusEVEQemu ¶
StatusEVEQemu function get status of EVE
func StatusEVEVBox ¶
StatusEVEVBox function get status of EVE
func StatusRedis ¶
StatusRedis function return status of redis
func StatusRegistry ¶
StatusRegistry function return status of registry
func StopEServer ¶
StopEServer function stop eserver container
func StopEVEParallels ¶
StopEVEParallels function stop EVE and delete parallels VM
func StopEVEVBox ¶
StopEVEVBox function stop EVE in VirtualBox
func StopEden ¶
func StopEden(adamRm, redisRm, registryRm, eserverRm, eveRemote bool, evePidFile string, devModel string, vmName string)
StopEden teardown Eden
func StopRegistry ¶
StopRegistry function stop registry container
Types ¶
type EServer ¶
EServer for connection to eserver
func (*EServer) EServerAddFile ¶
EServerAddFile send file with image into eserver
func (*EServer) EServerAddFileURL ¶
EServerAddFileURL send url to download image into eserver
type EVEInfo ¶
type EVEInfo struct { EVERelease []byte //EVERelease is /etc/eve-release from rootfs Syslog []byte //Syslog is /rsyslog/syslog.txt from persist volume }
EVEInfo contains info from SD card
func GetInfoFromSDCard ¶
GetInfoFromSDCard obtain info from SD card with EVE devicePath is /dev/sdX or /dev/diskX
type LinkState ¶
LinkState of an EVE uplink interface.
func GetLinkStateQemu ¶
GetLinkStateQemu returns the link state of the interface. If interface name is undefined, link state of all interfaces is returned.
func GetLinkStateVbox ¶
GetLinkStateVbox returns the link state of the interface. If interface name is undefined, link state of all interfaces is returned.