Versions in this module Expand all Collapse all v0 v0.6.7 Mar 15, 2024 Changes in this version + type UnixCameraDevice struct + DeviceID string + Name string + Node string + func GetUnixVideos() ([]UnixCameraDevice, error) + type WindowsCameraDevice struct + DeviceID string + Name string + Node string + func GetWindowsVideos() ([]WindowsCameraDevice, error) v0.6.6 Feb 19, 2024 Changes in this version + func WifiAlreadyConfig(wifiSSIDName string) bool + type NetInterfaceInfo struct + Addr string + Mac string + Name string + func GetAvailableInterfaces() ([]NetInterfaceInfo, error) v0.6.5 Dec 30, 2023 Changes in this version + const BackupLockPath + const FirmwarePath + const MainWorkDir + const RecoverLogPath + const RecoveryDbPath + const RunDbPath + const RunningLogPath + const UpgradeLockPath + const UpgradeLogPath + func FileExists(filename string) bool + func GetEarliestProcessPID(processName string) (int, error) + func GetPortsListUnix() ([]string, error) + func GetProcessPID(processName string) (int, error) + func KillProcess(processID int) error + func ReadIfaceMacAddr(ifaceName string) (string, error) + func RestartRulex() error + type Win32OperatingSystem struct — windows/amd64 + LastBootUpTime string v0.6.4 Nov 14, 2023 Changes in this version + func BindMacAndIP() + func ConfigDefaultIpTable(Iface string) error + func ConfigDefaultIscServeDhcp(IpRoute IscServerDHCPConfig) error + func ConfigDefaultIscServer(Iface string) error + func DisableWifi() error + func EnableWifi() error + func GetBSPNetIfaces() ([]string, error) + func GetProcessStatus(pid int) (string, error) + func GetSystemTime() (string, error) + func GetUptime() (string, error) + func GetVolume() (string, error) + func GetWlanList() ([]string, error) + func IsIPRangeValid(startIPStr, endIPStr string) bool + func IsIPv4InDHCPRange(ip, start, end string) bool + func MoveFile(sourcePath, destPath string) error + func NewSysProcAttr() *syscall.SysProcAttr — linux/amd64, windows/amd64 + func ReInitForwardRule(ifaceFrom, ifaceTo string) error + func Reboot() error + func ReloadDNS16() error + func ReloadDNS18xx() error + func Restart() error + func RestoreIpTablesConfig() error + func SaveIpTablesConfig() error + func ScanWIFIWithNmcli() ([]string, error) + func SendKillSignal(pid int) error + func SetSystemTime(newTime string) error + func SetTimeZone(timezone string) error + func SetVolume(v int) (string, error) + func StartRecoverProcess() + func StartSoftRoute() error + func StartUpgradeProcess(path string, args []string) + func StopRulex() error + func StopSoftRoute() error + func UnzipFirmware(zipFile, destDir string) error + func UpdateTimeByNtp() error + type DeviceStatus struct + CONNECTION string + DEVICE string + STATE string + TYPE string + func GetCurrentNetConnection() ([]DeviceStatus, error) + type DhcpLease struct + Hostname string + IpAddress string + MacAddress string + func GetDhcpList() ([]DhcpLease, error) + func (v DhcpLease) JsonString() string + type EtcNetworkConfig struct + Address string + DHCPEnabled bool + DNS []string + Gateway string + Interface string + Netmask string + func (iface *EtcNetworkConfig) GenEtcConfig() string + func (nc *EtcNetworkConfig) JsonString() string + type EthInterface struct + Eth0 HwPort + Eth1 HwPort + type HwPort struct + Addresses []string + Dhcp4 *bool + Gateway4 string + Nameservers []string + type IscServerDHCPConfig struct + Gateway string + Iface string + IfaceFrom string + IfaceTo string + Ip string + IpPoolBegin string + IpPoolEnd string + Netmask string + Network string + type NetplanConfig struct + Network Network + func (nc *NetplanConfig) ApplyEthConfig() error + func (nc *NetplanConfig) FromYaml(jsons string) error + func (nc *NetplanConfig) YAMLString() string + type Network struct + Ethernets EthInterface + Renderer string + Version int + type TimeZoneInfo struct + CurrentTimezone string + NTPSynchronized string + func GetTimeZone() (TimeZoneInfo, error) + type WLANInterface struct + Interface string + Password string + SSID string + Security string + type WlanConfig struct + Wlan0 WLANInterface + func (nc *WlanConfig) ApplyWlan0Config() error + func (nc *WlanConfig) YAMLString() string