Auth Manager
Authentication and session management.
Signature
func (m *AuthManager) Login(username, password string) (token string, expiresAt int64, err error)
Parameters
| Name | Type | Notes |
| username | string | |
| password | string | |
Returns
| Name | Type | Notes |
| token | string | |
| expiresAt | int64 | Unix timestamp |
| error | error | |
Example
token, expiresAt, err := client.AuthManager.Login(username, password)
Signature
func (m *AuthManager) Logout(token string) error
Parameters
| Name | Type | Notes |
| token | string | |
Returns
Example
err := client.AuthManager.Logout(token)
System Manager
Device identity, hardware info, OS metadata and live metrics.
PermissionSystemService/*
Signature
func (s *SystemManager) GetApiVersion() (version int64, revision int64, err error)
Returns
| Name | Type | Notes |
| version | int64 | |
| revision | int64 | |
| error | error | |
Example
version, revision, err := client.SystemManager.GetApiVersion()
Signature
func (s *SystemManager) GetApiVersionInfo() (string, error)
Returns
| Name | Type | Notes |
| version | string | |
| error | error | |
Example
ver, err := client.SystemManager.GetApiVersionInfo()
Signature
func (s *SystemManager) GetDeviceName() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
name, err := client.SystemManager.GetDeviceName()
Signature
func (s *SystemManager) GetSocModel() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
model, err := client.SystemManager.GetSocModel()
Signature
func (s *SystemManager) GetSocVendor() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
vendor, err := client.SystemManager.GetSocVendor()
Signature
func (s *SystemManager) GetBoardModel() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
model, err := client.SystemManager.GetBoardModel()
Signature
func (s *SystemManager) GetBoardVendor() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
vendor, err := client.SystemManager.GetBoardVendor()
Signature
func (s *SystemManager) GetHardwareVersion() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
ver, err := client.SystemManager.GetHardwareVersion()
Signature
func (s *SystemManager) GetHardwareModel() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
model, err := client.SystemManager.GetHardwareModel()
Signature
func (s *SystemManager) GetSystemUuid() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
uuid, err := client.SystemManager.GetSystemUuid()
Signature
func (s *SystemManager) GetBoardSerial() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
serial, err := client.SystemManager.GetBoardSerial()
Signature
func (s *SystemManager) GetCpuSerial() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
serial, err := client.SystemManager.GetCpuSerial()
Signature
func (s *SystemManager) GetMachineId() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
id, err := client.SystemManager.GetMachineId()
Signature
func (s *SystemManager) GetArchitecture() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
arch, err := client.SystemManager.GetArchitecture()
Signature
func (s *SystemManager) GetTotalRAM() (uint64, error)
Returns
| Name | Type | Notes |
| value | uint64 | |
| error | error | |
Example
ram, err := client.SystemManager.GetTotalRAM()
Signature
func (s *SystemManager) GetCpuModel() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
model, err := client.SystemManager.GetCpuModel()
Signature
func (s *SystemManager) GetCpuCores() (int64, error)
Returns
| Name | Type | Notes |
| value | int64 | |
| error | error | |
Example
cores, err := client.SystemManager.GetCpuCores()
Signature
func (s *SystemManager) GetCpuThreads() (int64, error)
Returns
| Name | Type | Notes |
| value | int64 | |
| error | error | |
Example
threads, err := client.SystemManager.GetCpuThreads()
Signature
func (s *SystemManager) GetCpuMinMhz() (float64, error)
Returns
| Name | Type | Notes |
| value | float64 | |
| error | error | |
Example
minMhz, err := client.SystemManager.GetCpuMinMhz()
Signature
func (s *SystemManager) GetCpuMaxMhz() (float64, error)
Returns
| Name | Type | Notes |
| value | float64 | |
| error | error | |
Example
maxMhz, err := client.SystemManager.GetCpuMaxMhz()
Signature
func (s *SystemManager) GetOsName() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
name, err := client.SystemManager.GetOsName()
Signature
func (s *SystemManager) GetOsVersion() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
ver, err := client.SystemManager.GetOsVersion()
Signature
func (s *SystemManager) GetKernelVersion() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
ver, err := client.SystemManager.GetKernelVersion()
Signature
func (s *SystemManager) GetDistro() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
distro, err := client.SystemManager.GetDistro()
Signature
func (s *SystemManager) GetDistroVersion() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
ver, err := client.SystemManager.GetDistroVersion()
Signature
func (s *SystemManager) GetRuntimeVersion() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
ver, err := client.SystemManager.GetRuntimeVersion()
Signature
func (s *SystemManager) GetOsRevision() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
rev, err := client.SystemManager.GetOsRevision()
Signature
func (s *SystemManager) GetBuildVersion() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
ver, err := client.SystemManager.GetBuildVersion()
Signature
func (s *SystemManager) GetRuntimeBuildDate() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
date, err := client.SystemManager.GetRuntimeBuildDate()
Signature
func (s *SystemManager) GetBuildDate() (string, error)
Returns
| Name | Type | Notes |
| value | string | |
| error | error | |
Example
date, err := client.SystemManager.GetBuildDate()
Signature
func (s *SystemManager) GetMetrics() (*MetricsInfoResponse, error)
Returns
Example
metrics, err := client.SystemManager.GetMetrics()
Signature
func (s *SystemManager) Attach() (bool, error)
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.SystemManager.Attach()
Signature
func (s *SystemManager) EnableDevMode() (bool, error)
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.SystemManager.EnableDevMode()
Signature
func (s *SystemManager) DisableDevMode() (bool, error)
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.SystemManager.DisableDevMode()
Signature
func (s *SystemManager) IsDevModeEnabled() (bool, error)
Returns
| Name | Type | Notes |
| enabled | bool | |
| error | error | |
Example
ok, err := client.SystemManager.IsDevModeEnabled()
Signature
func (s *SystemManager) EnableSSHServer() (bool, error)
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.SystemManager.EnableSSHServer()
Signature
func (s *SystemManager) DisableSSHServer() (bool, error)
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.SystemManager.DisableSSHServer()
Signature
func (s *SystemManager) IsSSHServerEnabled() (bool, error)
Returns
| Name | Type | Notes |
| enabled | bool | |
| error | error | |
Example
ok, err := client.SystemManager.IsSSHServerEnabled()
Signature
func (s *SystemManager) EnableRebootOnFailure() (bool, error)
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.SystemManager.EnableRebootOnFailure()
Signature
func (s *SystemManager) DisableRebootOnFailure() (bool, error)
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.SystemManager.DisableRebootOnFailure()
Signature
func (s *SystemManager) IsRebootOnFailureEnabled() (bool, error)
Returns
| Name | Type | Notes |
| enabled | bool | |
| error | error | |
Example
ok, err := client.SystemManager.IsRebootOnFailureEnabled()
Signature
func (s *SystemManager) AllowUntrustedApps() (bool, error)
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.SystemManager.AllowUntrustedApps()
Signature
func (s *SystemManager) DisallowUntrustedApps() (bool, error)
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.SystemManager.DisallowUntrustedApps()
Signature
func (s *SystemManager) IsUntrustedAppsAllowed() (bool, error)
Returns
| Name | Type | Notes |
| allowed | bool | |
| error | error | |
Example
ok, err := client.SystemManager.IsUntrustedAppsAllowed()
Package Manager
Application package installation and management.
PermissionPackageService/*
Signature
func (p *PackageManager) ListInstalledPackages() ([]*InstalledPackage, error)
Returns
| Name | Type | Notes |
| []InstalledPackage | | |
| error | error | |
Example
pkgs, err := client.PackageManager.ListInstalledPackages()
Signature
func (p *PackageManager) InstallPackage(ctx context.Context, orbPath string) error
Parameters
| Name | Type | Notes |
| ctx | Context | |
| orbPath | string | |
Returns
Example
err := client.PackageManager.InstallPackage(ctx, "/path/to/app.orb")
Signature
func (p *PackageManager) RemovePackage(ctx context.Context, packageID string) error
Parameters
| Name | Type | Notes |
| ctx | Context | |
| packageID | string | |
Returns
Example
err := client.PackageManager.RemovePackage(ctx, packageID)
Ethernet Manager
Ethernet interface configuration and status.
PermissionEthernetService/*
Signature
func (e *EthernetManager) ListEthernetInterfaces() ([]*EthernetLinkProperties, error)
Returns
Example
ifaces, err := client.EthernetManager.ListEthernetInterfaces()
Signature
func (e *EthernetManager) IsEthernetConnected(interfaceName string) (bool, error)
Parameters
| Name | Type | Notes |
| interfaceName | string | |
Returns
| Name | Type | Notes |
| connected | bool | |
| error | error | |
Example
ok, err := client.EthernetManager.IsEthernetConnected("eth0")
Signature
func (e *EthernetManager) GetEthernetLinkProperties(interfaceName string) (*EthernetLinkProperties, error)
Parameters
| Name | Type | Notes |
| interfaceName | string | |
Returns
Example
props, err := client.EthernetManager.GetEthernetLinkProperties("eth0")
Signature
func (e *EthernetManager) SetEthernetConfig(
interfaceName string, enable, dhcpEnable bool,
ipv4Address, ipv4Gateway string, ipv4Dns []string,
) (bool, error)
Parameters
| Name | Type | Notes |
| interfaceName | string | |
| enable | bool | |
| dhcpEnable | bool | |
| ipv4Address | string | CIDR notation — ignored when dhcpEnable is true |
| ipv4Gateway | string | |
| ipv4Dns | []string | |
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.EthernetManager.SetEthernetConfig(
"eth0", true, false,
"192.168.1.10/24", "192.168.1.1", []string{"8.8.8.8"},
)
Signature
func (e *EthernetManager) EnableEthernet(interfaceName string) (bool, error)
Parameters
| Name | Type | Notes |
| interfaceName | string | |
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.EthernetManager.EnableEthernet("eth0")
Signature
func (e *EthernetManager) DisableEthernet(interfaceName string) (bool, error)
Parameters
| Name | Type | Notes |
| interfaceName | string | |
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.EthernetManager.DisableEthernet("eth0")
WiFi Manager
Wi-Fi interface management — client mode and access point.
PermissionWiFiService/*
Signature
func (w *WiFiManager) ListInterfaces() ([]*WiFiLinkProperties, error)
Returns
| Name | Type | Notes |
| []WiFiLinkProperties | | |
| error | error | |
Example
ifaces, err := client.WiFiManager.ListInterfaces()
Signature
func (w *WiFiManager) IsConnected(ifname string) (bool, error)
Parameters
| Name | Type | Notes |
| ifname | string | |
Returns
| Name | Type | Notes |
| connected | bool | |
| error | error | |
Example
ok, err := client.WiFiManager.IsConnected(ifname)
Signature
func (w *WiFiManager) SetClientConfig(
ifname, ssid, password, security string,
dhcpEnable bool,
ipv4Address, ipv4Gateway string,
ipv4Dns []string,
) (bool, error)
Parameters
| Name | Type | Notes |
| ifname | string | |
| ssid | string | |
| password | string | |
| security | string | "none" | "wpa2" | "wpa3" | "wpa2-wpa3" |
| dhcpEnable | bool | |
| ipv4Address | string | CIDR — ignored when dhcpEnable is true |
| ipv4Gateway | string | |
| ipv4Dns | []string | |
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.WiFiManager.SetClientConfig(
ifname, ssid, password, "wpa2",
true, "", "", nil,
)
Signature
func (w *WiFiManager) Connect(ifname string) (bool, error)
Parameters
| Name | Type | Notes |
| ifname | string | |
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.WiFiManager.Connect(ifname)
Signature
func (w *WiFiManager) Scan(ifname string, forceRescan bool) ([]*ScannedNetwork, error)
Parameters
| Name | Type | Notes |
| ifname | string | |
| forceRescan | bool | |
Returns
| Name | Type | Notes |
| []ScannedNetwork | | |
| error | error | |
Example
nets, err := client.WiFiManager.Scan(ifname, true)
Signature
func (w *WiFiManager) StartHotspot(ifname, ssid, password, band string, channel int32) (bool, error)
Parameters
| Name | Type | Notes |
| ifname | string | |
| ssid | string | |
| password | string | |
| band | string | "2.4GHz" or "5GHz" |
| channel | int32 | |
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.WiFiManager.StartHotspot(ifname, ssid, password, "5GHz", 6)
Bluetooth Manager
Bluetooth Classic and BLE device management.
PermissionBluetoothService/*
Signature
func (m *BluetoothManager) GetAdapterInfo(ctx context.Context) (*AdapterInfo, error)
Parameters
Returns
| Name | Type | Notes |
| *AdapterInfo | | { Address, Name, Powered, Discoverable, Discovering } |
| error | error | |
Example
info, err := client.BluetoothManager.GetAdapterInfo(ctx)
Signature
func (m *BluetoothManager) ScanClassic(ctx context.Context, onResult func(BtDevice)) error
Parameters
| Name | Type | Notes |
| ctx | Context | |
| onResult | func(BtDevice) | |
Returns
Example
err := client.BluetoothManager.ScanClassic(ctx, func(d BtDevice) {
fmt.Println(d.Address, d.Name)
})
Signature
func (m *BluetoothManager) ScanBLE(ctx context.Context, filters []BLEScanFilter, onResult func(BLEScanResult)) error
Parameters
| Name | Type | Notes |
| ctx | Context | |
| filters | []BLEScanFilter | { NamePrefix, Address, ServiceUUID } |
| onResult | func(BLEScanResult) | |
Returns
Example
err := client.BluetoothManager.ScanBLE(ctx, nil, func(r BLEScanResult) {
fmt.Println(r.Address, r.RSSI)
})
GPIO Manager
General-purpose I/O pin control.
PermissionGpioService/*
Signature
func (m *GpioManager) ListPins() ([]*GpioPin, error)
Returns
Example
pins, err := client.GpioManager.ListPins()
Signature
func (m *GpioManager) GetDirection(pin *GpioPin) (GpioDirection, error)
Parameters
Returns
| Name | Type | Notes |
| dir | GpioDirection | |
| error | error | |
Example
dir, err := client.GpioManager.GetDirection(pin)
Signature
func (m *GpioManager) SetDirection(pin *GpioPin, dir GpioDirection) error
Parameters
| Name | Type | Notes |
| pin | *GpioPin | |
| dir | GpioDirection | GPIO_DIR_IN | GPIO_DIR_OUT |
Returns
Example
err := client.GpioManager.SetDirection(pin, GPIO_DIR_OUT)
Signature
func (m *GpioManager) GetLevel(pin *GpioPin) (GpioLevel, error)
Parameters
Returns
| Name | Type | Notes |
| level | GpioLevel | |
| error | error | |
Example
level, err := client.GpioManager.GetLevel(pin)
Signature
func (m *GpioManager) SetLevel(pin *GpioPin, level GpioLevel) error
Parameters
| Name | Type | Notes |
| pin | *GpioPin | |
| level | GpioLevel | GPIO_LEVEL_LOW | GPIO_LEVEL_HIGH |
Returns
Example
err := client.GpioManager.SetLevel(pin, GPIO_LEVEL_HIGH)
PWM Manager
PWM channel configuration and control.
PermissionPwmService/*
Signature
func (m *PwmManager) ListChannels() ([]*PwmChannel, error)
Returns
| Name | Type | Notes |
| []PwmChannel | | { Channel, Name } |
| error | error | |
Example
channels, err := client.PwmManager.ListChannels()
Signature
func (m *PwmManager) GetProperties(ch *PwmChannel) (*PwmProperties, error)
Parameters
| Name | Type | Notes |
| ch | *PwmChannel | |
Returns
| Name | Type | Notes |
| props | *PwmProperties | { Channel, Enabled, DutyCycle, FrequencyHz } |
| error | error | |
Example
props, err := client.PwmManager.GetProperties(ch)
Signature
func (m *PwmManager) SetPwm(ch *PwmChannel, dutyCycle, frequencyHz float64) error
Parameters
| Name | Type | Notes |
| ch | *PwmChannel | |
| dutyCycle | float64 | 0.0–1.0 |
| frequencyHz | float64 | |
Returns
Example
err := client.PwmManager.SetPwm(ch, 0.5, 1000.0)
Signature
func (m *PwmManager) StopPwm(ch *PwmChannel) error
Parameters
| Name | Type | Notes |
| ch | *PwmChannel | |
Returns
Example
err := client.PwmManager.StopPwm(ch)
UART Manager
Serial port (UART) communication.
PermissionUartService/*
Signature
func (m *UartManager) ListPorts() ([]string, error)
Returns
| Name | Type | Notes |
| []string | | |
| error | error | |
Example
ports, err := client.UartManager.ListPorts()
Signature
func (m *UartManager) Open(cfg UartConfig) error
Parameters
| Name | Type | Notes |
| cfg | UartConfig | { Port, Baudrate, DataBits, Parity, StopBits, FlowControl } |
Returns
Example
err := client.UartManager.Open(UartConfig{
Port: "ttyS0",
Baudrate: 115200,
DataBits: 8,
Parity: UartParityNone,
StopBits: UartStopBits1,
})
Signature
func (m *UartManager) Write(port string, data []byte) (int, error)
Parameters
| Name | Type | Notes |
| port | string | |
| data | bytes | |
Returns
| Name | Type | Notes |
| bytesWritten | int | |
| error | error | |
Example
n, err := client.UartManager.Write("ttyS0", data)
Signature
func (m *UartManager) Listen(ctx context.Context, port string, maxChunkSize int, onChunk func([]byte)) error
Parameters
| Name | Type | Notes |
| ctx | Context | |
| port | string | |
| maxChunkSize | int | |
| onChunk | func([]byte) | |
Returns
Example
err := client.UartManager.Listen(ctx, "ttyS0", 256, func(chunk []byte) {
// handle received data
})
I2C Manager
I²C bus discovery and data transfer.
PermissionI2cService/*
Signature
func (m *I2CManager) ListBuses() ([]uint32, error)
Returns
| Name | Type | Notes |
| []uint32 | | |
| error | error | |
Example
buses, err := client.I2CManager.ListBuses()
Signature
func (m *I2CManager) ScanBus(bus uint32) ([]uint32, error)
Parameters
Returns
| Name | Type | Notes |
| []uint32 | | responding addresses |
| error | error | |
Example
addrs, err := client.I2CManager.ScanBus(1)
Signature
func (m *I2CManager) GetConfig(bus uint32) (I2CConfig, error)
Parameters
Returns
| Name | Type | Notes |
| cfg | I2CConfig | { Bus, ClockHz, TenBitAddr, ClockStretching } |
| error | error | |
Example
cfg, err := client.I2CManager.GetConfig(1)
Signature
func (m *I2CManager) SetConfig(cfg I2CConfig) error
Parameters
| Name | Type | Notes |
| cfg | I2CConfig | { Bus, ClockHz, TenBitAddr, ClockStretching } |
Returns
Example
err := client.I2CManager.SetConfig(I2CConfig{Bus: 1, ClockHz: 400000})
Signature
func (m *I2CManager) Transfer(req I2CTransferRequest) ([]byte, error)
Parameters
| Name | Type | Notes |
| req | I2CTransferRequest | { Bus, Address, Data, ReadLength, Flags } |
Returns
| Name | Type | Notes |
| []byte | | |
| error | error | |
Example
data, err := client.I2CManager.Transfer(I2CTransferRequest{
Bus: 1, Address: 0x48,
Data: []byte{0x00}, ReadLength: 2,
})
SPI Manager
SPI bus configuration and full-duplex transfer.
PermissionSpiService/*
Signature
func (m *SpiManager) ListDevices() ([]string, error)
Returns
| Name | Type | Notes |
| []string | | |
| error | error | |
Example
devices, err := client.SpiManager.ListDevices()
Signature
func (m *SpiManager) Transfer(bus, cs uint32, dataOut []byte, readLength uint32) ([]byte, error)
Parameters
| Name | Type | Notes |
| bus | uint32 | |
| cs | uint32 | Chip select index |
| dataOut | bytes | |
| readLength | uint32 | 0 = write-only |
Returns
| Name | Type | Notes |
| []byte | | |
| error | error | |
Example
rx, err := client.SpiManager.Transfer(0, 0, txData, uint32(len(txData)))
Camera Manager
V4L2 camera capture and streaming.
PermissionCameraService/*
Signature
func (m *CameraManager) ListDevices(ctx context.Context) ([]*CameraDeviceInfo, error)
Parameters
Returns
| Name | Type | Notes |
| []CameraDeviceInfo | | |
| error | error | |
Example
devices, err := client.CameraManager.ListDevices(ctx)
Signature
func (m *CameraManager) CaptureImage(ctx context.Context, deviceID string, width, height int32, format string) (*CaptureImageResult, error)
Parameters
| Name | Type | Notes |
| ctx | Context | |
| deviceID | string | |
| width | int32 | |
| height | int32 | |
| format | string | "mjpeg" or "yuyv" |
Returns
| Name | Type | Notes |
| *CaptureImageResult | | { ImageData, Format, Timestamp } |
| error | error | |
Example
img, err := client.CameraManager.CaptureImage(ctx, "/dev/video0", 1280, 720, "mjpeg")
AI Manager
On-device AI model management and inference.
PermissionAiService/*
Signature
func (m *AI Manager) LoadModel(modelID, modelPath string, backend ModelBackend, execution ExecutionMode) (*LoadModelResponse, error)
Parameters
| Name | Type | Notes |
| modelID | string | |
| modelPath | string | |
| backend | ModelBackend | ONNX | TFLITE |
| execution | ExecutionMode | CPU | GPU | NPU |
Returns
| Name | Type | Notes |
| *LoadModelResponse | | |
| error | error | |
Example
resp, err := client.AI Manager.LoadModel(
"detector", "/models/yolo.onnx",
ModelBackend_ONNX, ExecutionMode_NPU,
)
Signature
func (m *AI Manager) Infer(ctx context.Context, modelID string, inputData []byte, inputShape []int32, dtype TensorDataType) (*InferResponse, error)
Parameters
| Name | Type | Notes |
| ctx | Context | |
| modelID | string | |
| inputData | bytes | |
| inputShape | []int32 | |
| dtype | TensorDataType | |
Returns
| Name | Type | Notes |
| *InferResponse | | |
| error | error | |
Example
resp, err := client.AI Manager.Infer(
ctx, "detector", inputData,
[]int32{1, 3, 640, 640}, TensorDataType_FLOAT32,
)
Firewall Manager
Network firewall zone and rule management.
PermissionFirewallService/*
Signature
func (f *FirewallManager) ListZones() ([]*ZoneRequest, error)
Returns
Example
zones, err := client.FirewallManager.ListZones()
Signature
func (f *FirewallManager) AddRule(
srcZone, dstZone string, protocol FirewallProtocol,
srcIP string, destPort int32, action ZonePolicy, comment string,
) (bool, error)
Parameters
| Name | Type | Notes |
| srcZone | string | |
| dstZone | string | |
| protocol | FirewallProtocol | |
| srcIP | string | CIDR or empty for any |
| destPort | int32 | 0 for any |
| action | ZonePolicy | |
| comment | string | |
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.FirewallManager.AddRule(
"lan", "wan", FirewallProtocol_TCP,
"", 443, ZonePolicy_ACCEPT, "allow HTTPS",
)
VPN Manager
VPN profile management and connection control.
PermissionVpnService/*
Signature
func (v *VPNManager) ApplyWireGuard(displayName string, configData []byte, autoConnect bool) (string, error)
Parameters
| Name | Type | Notes |
| displayName | string | |
| configData | bytes | Raw WireGuard .conf content |
| autoConnect | bool | |
Returns
| Name | Type | Notes |
| profileID | string | |
| error | error | |
Example
profileID, err := client.VPNManager.ApplyWireGuard("office", confBytes, true)
Signature
func (v *VPNManager) Connect(profileID string) (string, error)
Parameters
| Name | Type | Notes |
| profileID | string | |
Returns
| Name | Type | Notes |
| sessionID | string | |
| error | error | |
Example
sessionID, err := client.VPNManager.Connect(profileID)
Signature
func (v *VPNManager) Disconnect(profileID string) (bool, error)
Parameters
| Name | Type | Notes |
| profileID | string | |
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.VPNManager.Disconnect(profileID)
App Hub Manager
Service registration and HTTP routing via the Orbit app hub.
PermissionAppHubService/*
Signature
func (m *AppHubManager) RegisterWebUI(addr, route string) error
Parameters
| Name | Type | Notes |
| addr | string | e.g. "localhost:8080" |
| route | string | e.g. "/ui" |
Returns
Example
err := client.AppHubManager.RegisterWebUI("localhost:8080", "/ui")
Signature
func (m *AppHubManager) AddRoute(path string) error
Parameters
Returns
Example
err := client.AppHubManager.AddRoute("/api/v1")
Event Manager
System-wide event bus.
PermissionEventService/*
Signature
func (e *EventManager) Subscribe(ctx context.Context, handler func(*Event), types ...EventType) error
Parameters
| Name | Type | Notes |
| ctx | Context | |
| handler | func(*Event) | |
| types | ...EventType | Omit to receive all events |
Returns
Example
err := client.EventManager.Subscribe(ctx, func(e *Event) {
fmt.Println(e.Type, e.Payload)
}, EventType_WIFI_CONNECTED)
Development Manager
Live log streaming from running applications.
PermissionDevelopmentService/*
Signature
func (d *DevelopmentManager) SubscribeLogs(ctx context.Context, filter LogFilter, onEntry func(LogEntry)) error
Parameters
| Name | Type | Notes |
| ctx | Context | |
| filter | LogFilter | { App, Tag, MinLevel } |
| onEntry | func(LogEntry) | |
Returns
Example
err := client.DevelopmentManager.SubscribeLogs(ctx, LogFilter{App: "myapp"}, func(e LogEntry) {
fmt.Println(e.Timestamp, e.Message)
})
Update Manager
OTA firmware update and factory reset.
PermissionUpdateService/*
Signature
func (u *UpdateManager) Update(ctx context.Context, orbitPath string) error
Parameters
| Name | Type | Notes |
| ctx | Context | |
| orbitPath | string | |
Returns
Example
err := client.UpdateManager.Update(ctx, "/path/to/update.orbit")
Signature
func (u *UpdateManager) FactoryReset() (bool, error)
Returns
| Name | Type | Notes |
| ok | bool | |
| error | error | |
Example
ok, err := client.UpdateManager.FactoryReset()
Power Manager
Device power control.
PermissionPowerService/*
Signature
func (p *PowerManager) Reboot(force bool, reason string) (*PowerResult, error)
Parameters
| Name | Type | Notes |
| force | bool | |
| reason | string | |
Returns
| Name | Type | Notes |
| *PowerResult | | { Success, Message } |
| error | error | |
Example
res, err := client.PowerManager.Reboot(false, "update")
Signature
func (p *PowerManager) Shutdown(force bool, reason string) (*PowerResult, error)
Parameters
| Name | Type | Notes |
| force | bool | |
| reason | string | |
Returns
| Name | Type | Notes |
| *PowerResult | | { Success, Message } |
| error | error | |
Example
res, err := client.PowerManager.Shutdown(false, "maintenance")
Types
Complex objects returned or accepted by the SDK methods.
Fields
| Field | Type | Description |
| Name | string | Human-readable pin name (e.g. "GPIO17", "PWM0_OUT") |
| Number | int32 | Line offset within the chip |
| ChipNumber | int32 | Chip index (0 = /dev/gpiochip0) |
Fields
| Field | Type | Description |
| Metrics | *MetricsInfo | System metrics snapshot |
| Error | *ErrorInfo | Non-nil when the request failed |
Fields
| Field | Type | Description |
| Time | string | Current system time string |
| Uptime | int64 | Uptime in seconds |
| Users | int32 | Number of logged-in users |
| LoadAverage | []float64 | 1-min, 5-min, 15-min load averages |
Fields
| Field | Type | Description |
| CtxSwitches | int64 | Total context switches |
| Interrupts | int64 | Total hardware interrupts |
| SoftInterrupts | int64 | Total software interrupts |
| Syscalls | int64 | Total system calls |
Fields
| Field | Type | Description |
| Current | float64 | Current CPU frequency (MHz) |
| Min | float64 | Minimum CPU frequency (MHz) |
| Max | float64 | Maximum CPU frequency (MHz) |
Fields
| Field | Type | Description |
| Total | int64 | Total installed RAM (bytes) |
| Available | int64 | Available memory (bytes) |
| Percent | float64 | Usage percentage |
| Used | int64 | Used memory (bytes) |
| Free | int64 | Free memory (bytes) |
| Active | int64 | Active memory (bytes) |
| Inactive | int64 | Inactive memory (bytes) |
| Buffers | int64 | Buffer cache (bytes) |
| Cached | int64 | Page cache (bytes) |
| Shared | int64 | Shared memory (bytes) |
| Slab | int64 | Kernel slab cache (bytes) |
Fields
| Field | Type | Description |
| Total | int64 | Total disk size (bytes) |
| Used | int64 | Used space (bytes) |
| Free | int64 | Free space (bytes) |
| Percent | float64 | Usage percentage |
Fields
| Field | Type | Description |
| ReadCount | int64 | Number of reads |
| WriteCount | int64 | Number of writes |
| ReadBytes | int64 | Bytes read |
| WriteBytes | int64 | Bytes written |
| ReadTime | int64 | Time spent reading (ms) |
| WriteTime | int64 | Time spent writing (ms) |
| ReadMergedCount | int64 | Merged read operations |
| WriteMergedCount | int64 | Merged write operations |
| BusyTime | int64 | Time disk was busy (ms) |
Fields
| Field | Type | Description |
| BytesSent | int64 | Total bytes sent |
| BytesRecv | int64 | Total bytes received |
| PacketsSent | int64 | Total packets sent |
| PacketsRecv | int64 | Total packets received |
| Errin | int64 | Total input errors |
| Errout | int64 | Total output errors |
| Dropin | int64 | Total inbound packets dropped |
| Dropout | int64 | Total outbound packets dropped |
Fields
| Field | Type | Description |
| InterfaceName | string | Interface name (e.g. "eth0") |
| MacAddress | string | MAC address |
| State | EthernetState | Current link state |
| Mtu | int32 | Maximum transmission unit |
| DhcpEnable | bool | True when DHCP is active |
Fields
| Field | Type | Description |
| Name | string | Zone name (e.g. "lan", "wan") |
| Interfaces | []string | Network interfaces assigned to this zone |
| InputPolicy | ZonePolicy | POLICY_ACCEPT | POLICY_DROP | POLICY_REJECT |
| OutputPolicy | ZonePolicy | POLICY_ACCEPT | POLICY_DROP | POLICY_REJECT |
| Masquerade | bool | Enable NAT masquerade (typically wan only) |
Fields
| Field | Type | Description |
| Id | string | Server-generated rule ID |
| SrcZone | string | Source zone (empty = any) |
| DstZone | string | Destination zone (empty = any) |
| Protocol | FirewallProtocol | PROTO_ANY | PROTO_TCP | PROTO_UDP | PROTO_ICMP |
| SrcIp | string | Source IP/CIDR (empty = any) |
| DestPort | int32 | Destination port (0 = any) |
| Action | ZonePolicy | POLICY_ACCEPT | POLICY_DROP | POLICY_REJECT |
| Comment | string | Optional description |