godevman

package module
v0.0.1-devel.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2023 License: Apache-2.0 Imports: 27 Imported by: 1

README

godevman

Unified management library for network devices

Documentation

Overview

Package godevman - common godevman package

Index

Constants

View Source
const Version = "0.0.1-devel.3"

Version of release

Variables

This section is empty.

Functions

func BitMap

func BitMap(bytes []byte) map[int]bool

Returns bitmap of bytes

func IfStatStr

func IfStatStr(n int64) string

Returns human readable interface status string.

func IfTypeStr

func IfTypeStr(n int64) string

Returns human readable interface type string based on RFC 2863 (IANAifType-MIB).

func IntAbs

func IntAbs(val int64) uint64

Returns absolute value of integger

func NewDevice

func NewDevice(p *Dparams) (*device, error)

Initialize new device object func NewDevice(p *Dparams) (*device, error) {

func RandomString

func RandomString(l int) string

Returns a random string of [a-z,A-Z,0-9] chars of submitted lenght

func SplitLineEnd

func SplitLineEnd(s string) []string

Split string on newline Splits on and removes `\s*?\r?\n` from line end

func TcpReq

func TcpReq(req, host, port string) ([]byte, error)

Make TCP request (Timeout 10s)

func UpTimeString

func UpTimeString(ut, lc uint64) string

Returns human readable UpTime string. "ut" - upTime as returned by snmp agent (Time Ticks) "lc" - last change (Time Ticks). Submit 0 to get current upTime string

Types

type Address

type Address struct {
	Cidr    *string     `json:"cidr"`
	Origin  interface{} `json:"origin"`
	Type    *string     `json:"type"`
	Version *string     `json:"version"`
}

Ubiquiti specific OLT interface info type used by device web API

type BackupInfo

type BackupInfo struct {
	TargetIP, TargetFile string
	Timestamp, Progress  int
	Success              bool
}

last backup info

type BackupParams

type BackupParams struct {
	// IP of backup target system
	TargetIp string
	// Device identifier. Default is device ip
	// Will be used as first part of backup file name
	DevIdent string
	// Base path for backups (if device type needs it)
	BasePath string
	// Credentials
	Cred []string
}

Info needed for Device backup

type CliCmdOpts

type CliCmdOpts struct {
	// Parse errors from cli output after submitting commands
	// Default false
	ChkErr bool
	// Run commands in privilrged mode (applicable on some device types)
	// Default false
	Priv bool
}

CLI command exec options

type CliParams

type CliParams struct {
	// Prompt re pattern
	// Default depends on device type
	// Keep it as is if you are not sure
	PromptRe string
	// Cli errors re pattern
	// Default depends on device type
	// Keep it as is if you are not sure
	ErrRe string
	// Default "22" for ssh and "23" for telnet
	Port string
	// Full path to unencrypted PEM-encoded private key file
	// If declared PublicKeys method for remote authentication will be used
	KeyPath string
	// Private key passphrase if any
	KeySecret string
	// Valid values are "\r\n" or "\n"
	// Default depends on device type
	// Keep it as is if you are not sure
	LineEnd string
	// CLI session credentials
	Cred []string
	// Commands which will be executed first on session start
	// Default depends on device type
	// Keep it as is if you are not sure
	PreCmds []string
	// Commands which will be executed to gracefully close session
	// Default depends on device type
	// Keep it as is if you are not sure
	DisconnectCmds []string
	// Use telnet instead of ssh. Default false
	Telnet bool
	// Session timeout (sec)
	// Depends on device type
	// Keep it as is if you are not sure
	Timeout int
}

CLI session parameters

type D1qVlanBrPort

type D1qVlanBrPort struct {
	IfIdx int
	UnTag bool
}

Dot1Q VLAN bridgeport info

type D1qVlanInfo

type D1qVlanInfo struct {
	Ports map[int]*D1qVlanBrPort
	Name  string
}

Dot1Q VLAN info (Boolean in Ports map indicates untagged vlan)

type DevBackupReader

type DevBackupReader interface {
	LastBackup() (*BackupInfo, error)
}

Get backup info

type DevBackupper

type DevBackupper interface {
	// Backup device config
	DoBackup() error
}

Backup initiator

type DevCliWriter

type DevCliWriter interface {
	// Execute cli commands
	RunCmds([]string, *CliCmdOpts) ([]string, error)
}

CLI releated functionality

type DevConfReader

type DevConfReader interface {
	RuningCfg() (string, error)
}

Get running config

type DevEnergyMeterReader

type DevEnergyMeterReader interface {
	Ereadings() (*EReadings, error)
}

Get energy readings

type DevFreqSyncReader

type DevFreqSyncReader interface {
	FreqSyncInfo() (*FreqSyncInfo, error)
}

Get Frequency Sync info

type DevGenReader

type DevGenReader interface {
	GeneratorInfo([]string) (GenInfo, error)
}

Get Power Generator info

type DevHwReader

type DevHwReader interface {
	HwInfo() (map[string]string, error)
}

Get Hardware info

type DevIfReader

type DevIfReader interface {
	IfInfo([]string, ...string) (map[string]*IfInfo, error)
	// Get ifNumber
	IfNumber() (int64, error)
	// Get interfaces stack info
	IfStack() (IfStack, error)
}

Functionality related to interfaces

type DevIfWriter

type DevIfWriter interface {
	// Set interface admin status
	SetIfAdmStat(map[string]string) error
	// Set interface alias
	SetIfAlias(map[string]string) error
}

type DevInvReader

type DevInvReader interface {
	InvInfo([]string, ...string) (map[string]*InvInfo, error)
	// Get interface to inventory relations
	IfInventory() (map[int]int, error)
}

Functionality related to inventory

type DevIp6Reader

type DevIp6Reader interface {
	Ip6IfDescr(...string) (map[string]string, error)
}

Functionality related to Get IPv6 addresses

type DevIpReader

type DevIpReader interface {
	IpInfo(...string) (map[string]*IpInfo, error)
	IpIfInfo(...string) (map[string]*IpIfInfo, error)
}

Functionality related to IP addresses

type DevLicStatusReader

type DevLicStatusReader interface {
	LicStatusInfo() (*LicStatusInfo, error)
}

Get License status info

type DevMobReader

type DevMobReader interface {
	MobSignal() (map[string]MobSignal, error)
}

Mobile signal related functionality

type DevOnusReader

type DevOnusReader interface {
	OnuInfo() (map[string]*OnuInfo, error)
}

Get ONU info

type DevOspfReader

type DevOspfReader interface {
	OspfAreaRouters() (map[string][]string, error)
	OspfAreaStatus() (map[string]string, error)
	OspfNbrStatus() (map[string]string, error)
}

Get OSPF info

type DevPhaseSyncReader

type DevPhaseSyncReader interface {
	PhaseSyncInfo() (*PhaseSyncInfo, error)
}

Get Phase Sync info

type DevRlReader

type DevRlReader interface {
	RlInfo() (map[string]*RlRadioIfInfo, error)
	RlNbrInfo() (map[string]*RlRadioFeIfInfo, error)
}

Get RL neighbour info

type DevSensorsReader

type DevSensorsReader interface {
	Sensors([]string) (map[string]map[string]map[string]SensorVal, error)
}

Get environment sensors info

type DevSwReader

type DevSwReader interface {
	SwVersion() (string, error)
}

Get Software version

type DevSysReader

type DevSysReader interface {
	System([]string) (System, error)
}

Get system info

type DevSysWriter

type DevSysWriter interface {
	SetSysName(string) error
	SetContact(string) error
	SetLocation(string) error
}

Set system info

type DevVlanReader

type DevVlanReader interface {
	D1qVlans() (map[string]string, error)
	// Get dot1q vlans
	BrPort2IfIdx() (map[string]int, error)
	// Get dot1q vlan to port relations
	D1qVlanInfo() (map[string]*D1qVlanInfo, error)
}

Functionality related to dot1q vlans

type DevWebSessManager

type DevWebSessManager interface {
	WebAuth([]string) error
	WebSession() *http.Client
	WebLogout() error
}

Functionality related to web connection authentication

type Dparams

type Dparams struct {
	// ip of device
	Ip string
	// sysObjectId of Device
	// Will be not discovered If present
	SysObjectId string
	// Timezone for time related actions
	// Default is Europe/Tallinn
	TimeZone string
	// Websession credentials
	WebCred      []string
	BackupParams BackupParams
	SnmpCred     SnmpCred
	CliParams    CliParams
}

Parameters for new Device object initialization

type EReadings

type EReadings struct {
	// contains filtered or unexported fields
}

Energy Readings

type EcsReadings1

type EcsReadings1 struct {
	XMLName xml.Name `xml:"root"`
	Text    string   `xml:",chardata"`
	Par     string   `xml:"par"`
	Data    []string `xml:"d"`
}

type EcsStatus1

type EcsStatus1 struct {
	XMLName  xml.Name `xml:"root"`
	Chardata string   `xml:",chardata"`
	Name     string   `xml:"name"`
	Type     string   `xml:"type"`
	Class    string   `xml:"class"`
	Text     string   `xml:"text"`
}

ECS specific system info type used by device web API

type FreqSyncInfo

type FreqSyncInfo struct {
	SrcsQaLevel  map[string]string
	ClockMode    ValString
	ClockQaLevel ValString
}

Frequency Sync info

type GenInfo

type GenInfo struct {
	GenMode      ValString
	BreakerState ValString
	EngineState  ValString
	GenPower     SensorVal
	RunHours     SensorVal
	BatteryVolt  SensorVal
	GenFreq      SensorVal
	GenCurrentL1 SensorVal
	GenCurrentL2 SensorVal
	GenCurrentL3 SensorVal
	CoolantTemp  SensorVal
	MainsVoltL3  SensorVal
	MainsVoltL2  SensorVal
	GenVoltL2    SensorVal
	FuelConsum   SensorVal
	MainsVoltL1  SensorVal
	FuelLevel    SensorVal
	GenVoltL3    SensorVal
	GenVoltL1    SensorVal
	NumStarts    ValU64
}

Power Generator info

type IfInfo

type IfInfo struct {
	Descr, Name, Alias, Mac, LastStr, TypeStr, AdminStr, OperStr ValString
	Type, Mtu, Admin, Oper                                       ValI64
	Speed, Last, InOctets, InPkts, InUcast, InMcast, InBcast, InDiscards,
	InErrors, OutOctets, OutPkts, OutUcast, OutMcast, OutBcast, OutDiscards,
	OutErrors ValU64
}

Interface info

type IfStack

type IfStack struct {
	Up, Down map[int][]int
}

Interface stack info

type InvInfo

type InvInfo struct {
	Descr, Position, HwProduct, HwRev, Serial, Manufacturer, Model, SwProduct,
	SwRev ValString
	Physical bool
	ParentId ValI64
}

Inventory info

type IpIfInfo

type IpIfInfo struct {
	Descr, Alias string
	IpInfo
}

IP Interface info

type IpInfo

type IpInfo struct {
	Mask  string
	IfIdx int64
}

IP info

type LicStatusInfo

type LicStatusInfo struct {
	StatusStr ValString
	Enabled   ValBool
	Expires   ValU64
	RenewLeft ValU64
}

License Status info

type MobSignal

type MobSignal struct {
	Registration, Technology, Band, Operator, Ber, CellId, Signal, SignalBars, Imei, Sinr, Rssi, Rsrp, Rsrq SensorVal
}

Mobile modem signal data

type MyRoundTripper

type MyRoundTripper struct {
	// contains filtered or unexported fields
}

Add additional default headers

func (MyRoundTripper) RoundTrip

func (rt MyRoundTripper) RoundTrip(r *http.Request) (*http.Response, error)

type OnuInfo

type OnuInfo struct {
	Model      ValString
	Mac        ValString
	UpTimeStr  ValString
	ConTimeStr ValString
	Error      ValString
	Version    ValString
	OltPort    ValString
	Name       ValString
	Ports      map[string]OnuPort
	TxBytes    SensorVal
	TxPower    SensorVal
	RxPower    SensorVal
	Ram        SensorVal
	Distance   SensorVal
	CpuTemp    SensorVal
	CpuUsage   SensorVal
	DownLimit  SensorVal
	Uplimit    SensorVal
	RxBytes    SensorVal
	ConTime    ValU64
	UpTime     ValU64
	Online     ValBool
	Enabled    ValBool
}

type OnuPort

type OnuPort struct {
	Id, Speed, Mode ValString
	Vlans           []int
	Plugged         ValBool
	NativeVlan      ValInt
}

Onu info

type PhaseSyncInfo

type PhaseSyncInfo struct {
	SrcsState     map[string]string
	ParentGmIdent ValString
	ParentGmClass ValString
	State         ValString
	HopsToGm      ValU64
}

Phase Sync info

type RauInfo

type RauInfo struct {
	Rf        map[string]*RfInfo
	Name      ValString
	Descr     ValString
	EntityIdx ValInt
	Temp      ValF64
}

type RfInfo

type RfInfo struct {
	Name       ValString
	Descr      ValString
	Status     ValString
	Mute       ValBool
	IfIdx      ValInt
	EntityIdx  ValInt
	TxCapacity ValInt
	PowerIn    ValF64
	PowerOut   ValF64
	Snr        ValF64
}

Radiolink radio interface info

type RlRadioFeIfInfo

type RlRadioFeIfInfo struct {
	SysName    ValString
	Ip         ValString
	FeIfDescr  ValString
	IfIdx      ValInt
	FeIfIdx    ValInt
	EntityIdx  ValInt
	TxCapacity ValInt
	PowerIn    ValF64
	PowerOut   ValF64
}

Radiolink FarEnd radio interface info

type RlRadioIfInfo

type RlRadioIfInfo struct {
	Rau       map[string]*RauInfo
	Name      ValString
	Descr     ValString
	AdmStat   ValString
	OperStat  ValString
	IfIdx     ValInt
	EntityIdx ValInt
	Es        ValInt
	Uas       ValInt
}

type SensorVal

type SensorVal struct {
	Unit, String string
	Value        uint64
	Divisor      int
	Bool         bool
	IsSet        bool
}

Device sensor value

type SnmpCred

type SnmpCred struct {
	// [username|community]
	User string
	// [authentication protocol] (NoAuth|MD5|SHA)
	Prot string
	// [authentication protocol pass phrase]
	Pass string
	// [security level] (noAuthNoPriv|authNoPriv|authPriv)
	Slevel string
	// [privacy protocol] (NoPriv|DES|AES|AES192|AES256|AES192C|AES256C)
	PrivProt string
	// [privacy protocol pass phrase]
	PrivPass string
	// [snmp version] (1|2|3)
	Ver int
}

SNMP credentials for snmp session

type System

type System struct {
	Descr, ObjectID, Contact, Name, Location, UpTimeStr ValString
	UpTime                                              ValU64
}

System data

type UbiOltInterface

type UbiOltInterface struct {
	Addresses      []Address                     `json:"addresses"`
	Identification UbiOltInterfaceIdentification `json:"identification,omitempty"`
	Pon            UbiOltInterfaceSfp            `json:"pon,omitempty"`
	Status         UbiOltInterfaceStatus         `json:"status,omitempty"`
	Port           UbiOltInterfaceSfp            `json:"port,omitempty"`
	Lag            UbiOltInterfaceLag            `json:"lag,omitempty"`
}

type UbiOltInterfaceIdentification

type UbiOltInterfaceIdentification struct {
	ID   *string `json:"id"`
	Mac  *string `json:"mac"`
	Name *string `json:"name"`
	Type *string `json:"type"`
}

type UbiOltInterfaceLag

type UbiOltInterfaceLag struct {
	Static     *bool         `json:"static"`
	Interfaces []interface{} `json:"interfaces"`
}

type UbiOltInterfacePonSet

type UbiOltInterfacePonSet struct {
	Pon            UbiOltInterfaceSfp            `json:"pon,omitempty"`
	Identification UbiOltInterfaceIdentification `json:"identification,omitempty"`
	Status         UbiOltInterfaceStatus         `json:"status,omitempty"`
	Addresses      []Address                     `json:"addresses"`
}

type UbiOltInterfacePortSet

type UbiOltInterfacePortSet struct {
	Port           UbiOltInterfaceSfp            `json:"port,omitempty"`
	Identification UbiOltInterfaceIdentification `json:"identification,omitempty"`
	Status         UbiOltInterfaceStatus         `json:"status,omitempty"`
	Addresses      []Address                     `json:"addresses"`
}

type UbiOltInterfaceSfp

type UbiOltInterfaceSfp struct {
	Sfp struct {
		Los     interface{} `json:"los"`
		Serial  *string     `json:"serial"`
		TxFault interface{} `json:"txFault"`
		Part    *string     `json:"part"`
		Vendor  *string     `json:"vendor"`
		Present *bool       `json:"present"`
	}
}

type UbiOltInterfaceStatus

type UbiOltInterfaceStatus struct {
	CurrentSpeed *string `json:"currentSpeed"`
	Speed        *string `json:"speed,omitempty"`
	Enabled      *bool   `json:"enabled"`
	Plugged      *bool   `json:"plugged"`
}

type UbiOltInterfaces

type UbiOltInterfaces []UbiOltInterface

type UbiOltStatistics

type UbiOltStatistics []struct {
	Interfaces []struct {
		ID         *string `json:"id"`
		Name       *string `json:"name"`
		Statistics struct {
			RxBroadcast *uint64 `json:"rxBroadcast"`
			RxBytes     *uint64 `json:"rxBytes"`
			RxErrors    *uint64 `json:"rxErrors"`
			RxMulticast *uint64 `json:"rxMulticast"`
			RxPackets   *uint64 `json:"rxPackets"`
			RxRate      *uint64 `json:"rxRate"`
			TxBroadcast *uint64 `json:"txBroadcast"`
			TxBytes     *uint64 `json:"txBytes"`
			TxErrors    *uint64 `json:"txErrors"`
			TxMulticast *uint64 `json:"txMulticast"`
			TxPackets   *uint64 `json:"txPackets"`
			TxRate      *uint64 `json:"txRate"`
		} `json:"statistics,omitempty"`
	} `json:"interfaces"`
	Device struct {
		RAM struct {
			Free  *int `json:"free"`
			Total *int `json:"total"`
			Usage *int `json:"usage"`
		} `json:"ram"`
		FanSpeeds []struct {
			Value *float64 `json:"value"`
		} `json:"fanSpeeds"`
		Power []struct {
			PsuType   *string  `json:"psuType"`
			Current   *float64 `json:"current,omitempty"`
			Power     *float64 `json:"power,omitempty"`
			Voltage   *float64 `json:"voltage,omitempty"`
			Connected *bool    `json:"connected"`
		} `json:"power"`
		Signals []interface{} `json:"signals"`
		Storage []struct {
			Name        *string  `json:"name"`
			SysName     *string  `json:"sysName"`
			Type        *string  `json:"type"`
			Size        *int     `json:"size"`
			Temperature *float64 `json:"temperature"`
			Used        *int     `json:"used"`
		} `json:"storage"`
		Temperatures []struct {
			Value *float64 `json:"value"`
		} `json:"temperatures"`
		CPU []struct {
			Identifier  *string  `json:"identifier"`
			Temperature *float64 `json:"temperature"`
			Usage       *int     `json:"usage"`
		} `json:"cpu"`
		Uptime int `json:"uptime"`
	} `json:"device"`
	Timestamp int64 `json:"timestamp"`
}

Ubiquiti specific OLT statistics type used by device web API

type UbiOltVlans

type UbiOltVlans struct {
	Trunks []interface{} `json:"trunks"`
	Vlans  []struct {
		Name          string `json:"name"`
		Type          string `json:"type"`
		Participation []struct {
			Interface struct {
				ID string `json:"id"`
			} `json:"interface"`
			Mode string `json:"mode"`
		} `json:"participation"`
		ID int `json:"id"`
	} `json:"vlans"`
}

Ubiquiti specific VLANs type used by device web API

type UbiOnuInfo

type UbiOnuInfo struct {
	Router struct{} `json:"router"`
	System struct {
		CPU         *float64 `json:"cpu"`
		Mem         *float64 `json:"mem"`
		Temperature struct {
			CPU *float64 `json:"cpu"`
		} `json:"temperature"`
		Uptime  *uint64  `json:"uptime"`
		Voltage *float64 `json:"voltage"`
	} `json:"system"`
	Statistics struct {
		RxBytes *int64 `json:"rxBytes"`
		RxRate  *int   `json:"rxRate"`
		TxBytes *int64 `json:"txBytes"`
		TxRate  *int   `json:"txRate"`
	} `json:"statistics"`
	Mac             *string  `json:"mac"`
	Error           *string  `json:"error"`
	FirmwareHash    *string  `json:"firmwareHash"`
	Serial          *string  `json:"serial"`
	Connected       *bool    `json:"connected"`
	FirmwareVersion *string  `json:"firmwareVersion"`
	TxPower         *float64 `json:"txPower"`
	OltPort         *int     `json:"oltPort"`
	LaserBias       *float64 `json:"laserBias"`
	RxPower         *float64 `json:"rxPower"`
	Distance        *int     `json:"distance"`
	ConnectionTime  *uint64  `json:"connectionTime"`
	Authorized      *bool    `json:"authorized"`
	UpgradeStatus   struct {
		FailureReason string `json:"failureReason"`
		Status        string `json:"status"`
	} `json:"upgradeStatus"`
	Ports []struct {
		ID      *string `json:"id"`
		Speed   *string `json:"speed"`
		Plugged *bool   `json:"plugged"`
	} `json:"ports"`
}

Ubiquiti specific ONU info type used by device web API

type UbiOnuSettings

type UbiOnuSettings struct {
	Services struct {
		HTTPPort             *int  `json:"httpPort"`
		SSHPort              *int  `json:"sshPort"`
		TelnetPort           *int  `json:"telnetPort"`
		SSHEnabled           *bool `json:"sshEnabled"`
		TelnetEnabled        *bool `json:"telnetEnabled"`
		UbntDiscoveryEnabled *bool `json:"ubntDiscoveryEnabled"`
	} `json:"services"`
	BandwidthLimit struct {
		Download struct {
			Enabled *bool `json:"enabled"`
			Limit   *int  `json:"limit"`
		} `json:"download"`
		Upload struct {
			Enabled *bool `json:"enabled"`
			Limit   *int  `json:"limit"`
		} `json:"upload"`
	} `json:"bandwidthLimit"`
	Enabled        *bool   `json:"enabled"`
	Name           *string `json:"name"`
	LanAddress     *string `json:"lanAddress"`
	Model          *string `json:"model"`
	Mode           *string `json:"mode"`
	AdminPassword  *string `json:"adminPassword"`
	LanProvisioned *bool   `json:"lanProvisioned"`
	Notes          *string `json:"notes"`
	Serial         *string `json:"serial"`
	Wifi           struct {
		Channel       *string  `json:"channel"`
		ChannelWidth  *string  `json:"channelWidth"`
		Country       *string  `json:"country"`
		CountryListID *string  `json:"countryListId"`
		TxPower       *float64 `json:"txPower"`
		Enabled       *bool    `json:"enabled"`
		Provisioned   *bool    `json:"provisioned"`
		Networks      []struct {
			AuthMode *string `json:"authMode"`
			Key      *string `json:"key"`
			Ssid     *string `json:"ssid"`
			HideSSID *bool   `json:"hideSSID"`
		} `json:"networks"`
	} `json:"wifi"`
	Ports []struct {
		ID    *string `json:"id"`
		Speed *string `json:"speed"`
	} `json:"ports"`
	BridgeMode struct {
		Ports []struct {
			Port         *string `json:"port"`
			NativeVLAN   *int    `json:"nativeVLAN"`
			IncludeVLANs []int   `json:"includeVLANs"`
		} `json:"ports"`
	} `json:"bridgeMode"`
	RouterMode struct {
		RouterAdvertisement struct {
			Mode   *string `json:"mode"`
			Prefix *string `json:"prefix"`
		} `json:"routerAdvertisement"`
		DhcpPool struct {
			RangeStart *string `json:"rangeStart"`
			RangeStop  *string `json:"rangeStop"`
		} `json:"dhcpPool"`
		PppoePassword    *string       `json:"pppoePassword"`
		DhcpServerMode   *string       `json:"dhcpServerMode"`
		WanMode6         *string       `json:"wanMode6"`
		PppoeUser        *string       `json:"pppoeUser"`
		WanMode          *string       `json:"wanMode"`
		Gateway          *string       `json:"gateway"`
		Gateway6         *string       `json:"gateway6"`
		DhcpRelay        *string       `json:"dhcpRelay"`
		LanAddress6      *string       `json:"lanAddress6"`
		LanMode6         *string       `json:"lanMode6"`
		WanAddress6      *string       `json:"wanAddress6"`
		PppoeMode        *string       `json:"pppoeMode"`
		WanAddress       *string       `json:"wanAddress"`
		FirewallEnabled6 *bool         `json:"firewallEnabled6"`
		Ipv6Enabled      *bool         `json:"ipv6Enabled"`
		DhcpLeaseTime    *int          `json:"dhcpLeaseTime"`
		WanVLAN          *int          `json:"wanVLAN"`
		UpnpEnabled      *bool         `json:"upnpEnabled"`
		WanAccessBlocked *bool         `json:"wanAccessBlocked"`
		DNSProxyEnabled  *bool         `json:"dnsProxyEnabled"`
		DNSResolvers     []interface{} `json:"dnsResolvers"`
		PortForwards     []interface{} `json:"portForwards"`
		Nat              struct {
			Ftp  bool `json:"ftp"`
			Pptp bool `json:"pptp"`
			Rtsp bool `json:"rtsp"`
			Sip  bool `json:"sip"`
		} `json:"nat"`
	} `json:"routerMode"`
}

Ubiquiti specific ONU settings type used by device web API

type UbiOnusInfo

type UbiOnusInfo []UbiOnuInfo

type UbiOnusSettings

type UbiOnusSettings []UbiOnuSettings

type ValBool

type ValBool struct {
	Value bool
	IsSet bool
}

Common types for collected values

type ValF64

type ValF64 struct {
	Value float64
	IsSet bool
}

type ValI64

type ValI64 struct {
	Value int64
	IsSet bool
}

type ValInt

type ValInt struct {
	Value int
	IsSet bool
}

type ValString

type ValString struct {
	Value string
	IsSet bool
}

type ValU64

type ValU64 struct {
	Value uint64
	IsSet bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL