Versions in this module Expand all Collapse all v1 v1.1.1 Oct 24, 2020 v1.1.0 Oct 4, 2020 v1.0.0 Oct 3, 2020 Changes in this version + const CBC + const DataVersion + const EncryptFlag + const GCM + const GcmFlag + const InformVersion + const MagicNumber + const NetworkConfigDhcp + const NetworkConfigDisabled + const NetworkConfigStatic + const SnappyFlag + const ZlibFlag + var DefaultKey = Key([]byte{ ... }) + func CompressSnappy(data []byte) ([]byte, error) + func CompressZLib(data []byte) (result []byte, err error) + func DecompressSnappy(data []byte) ([]byte, error) + func DecompressZLib(data []byte) (result []byte, err error) + func Decrypt(mode int, iv IV, key Key, data []byte, aad []byte) (result []byte, err error) + func Encrypt(mode int, iv IV, key Key, data []byte, aad []byte) ([]byte, error) + func ParseBool(value interface{}) (bool, error) + func ParseFloat(value interface{}) (float64, error) + func ParseInt(value interface{}) (int, error) + func ParseString(value interface{}) (string, error) + type Cmd struct + CmdId string + Command string + DeviceId string + ServerTime int + Time int + UseAlert bool + func (msg *Cmd) Marshal() []byte + func (msg *Cmd) String() string + func (r Cmd) HttpCode() int + func (r Cmd) IsSuccess() bool + type EthernetTableEntry struct + Mac string + Name string + NumPort uint64 + type HardwareAddr []byte + func (m HardwareAddr) HexString() string + func (m HardwareAddr) IsValid() bool + func (m HardwareAddr) MarshalJSON() ([]byte, error) + func (m HardwareAddr) String() string + type IV Key + var NilIv IV = []byte{ ... } + func GenerateIV() (IV, error) + type Inform struct + BoardRevision int + BootRomVersion string + ConfigNetworkWan NetworkConfig + ConfigNetworkWan2 NetworkConfig + ConfigVersion string + Default bool + DiscoveryResponse bool + EthernetTable []EthernetTableEntry + FirmwareCapabilities int32 + GuestToken string + HasDefaultRouteDistance bool + HasDpi bool + HasEth1 bool + HasHostfileUpdate bool + HasPortA bool + HasSshDisable bool + HasVti bool + Hostname string + InformAsNotify bool + InformIp string + InformUrl string + IntfTable []Interface + Ip string + Isolated bool + LastError string + Locating bool + Mac HardwareAddr + Model string + ModelDisplay string + Netmask string + NotifyPayload string + NotifyReason string + PortTable []Port + QrId string + RadiusCapabilities int32 + RequiredVersion string + SelfrunBeacon bool + Serial string + SpectrumScanning bool + SpeedtestStatus *SpeedTestStatus + State int + StreamToken string + SysStats SysStats + Time int64 + Uplink string + Uptime uint64 + Version string + func (r Inform) Marshal() []byte + func (r Inform) String() string + type InformResponse interface + HttpCode func() int + IsSuccess func() bool + func ResponseFromHttpCode(code int) InformResponse + type Interface struct + Drops uint64 + Enabled bool + FullDuplex bool + Gateways []string + Ip string + Latency uint64 + Mac HardwareAddr + Name string + Nameservers []string + Netmask string + NumPort int + RxBytes uint64 + RxDropped uint64 + RxErrors uint64 + RxMulticast int + RxPackets uint64 + Speed uint64 + TxBytes uint64 + TxDropped uint64 + TxErrors uint64 + TxPackets uint64 + Up bool + Uptime uint64 + type Key []byte + func KeyFromString(keyString string) (Key, error) + func (k Key) IsDefault() bool + func (k Key) IsValid() bool + func (k Key) String() string + type ManagementConfig map[string]string + func (m ManagementConfig) MarshalJSON() ([]byte, error) + type Message interface + Marshal func() []byte + String func() string + func Unmarshal(data []byte) (Message, error) + type NetworkConfig struct + Dns1 string + Dns2 string + Gateway string + IfName string + Ip string + Netmask string + Type string + func (n NetworkConfig) MarshalJSON() ([]byte, error) + type Noop struct + Interval int + ServerTime int + func (msg *Noop) Marshal() []byte + func (msg *Noop) String() string + func (r Noop) HttpCode() int + func (r Noop) IsSuccess() bool + type Packet struct + Msg Message + func NewPacket(ap HardwareAddr, msg Message, k Key, mode int) *Packet + func (p *Packet) Unmarshal(data []byte, keyFetcher func(addr HardwareAddr) (Key, error)) (err error) + func (p Packet) IsEncrypted() bool + func (p Packet) IsGcmEncrypted() bool + func (p Packet) IsSnappy() bool + func (p Packet) IsZLib() bool + func (p Packet) Marshal() (result []byte, err error) + type Port struct + IfName string + Name string + type SetParam struct + ServerTime int + func (msg *SetParam) Marshal() []byte + func (msg *SetParam) String() string + func (r SetParam) HttpCode() int + func (r SetParam) IsSuccess() bool + type SpeedTestStatus struct + Latency uint64 + RunDate uint64 + RunTime uint64 + StatusDownload uint64 + StatusPing uint64 + StatusUpload uint64 + XputDownload float64 + XputUpload float64 + type SysStats struct + Cpu uint64 + LoadAvg1 float64 + LoadAvg15 float64 + LoadAvg5 float64 + Mem uint64 + MemBuffer uint64 + MemTotal uint64 + MemUsed uint64