Versions in this module Expand all Collapse all v0 v0.2.4 Jan 22, 2023 v0.2.3 Jan 22, 2023 v0.2.2 Jan 22, 2023 v0.2.1 Jan 22, 2023 v0.2.0 Jan 22, 2023 v0.0.5 Oct 17, 2023 v0.0.4 Jul 15, 2023 v0.0.3 Jul 15, 2023 v0.0.2 Jul 14, 2023 Changes in this version + func GetAppToken(client *FreeboxHttpClient, apiVersion *FreeboxAPIVersion) (string, error) + type FreeboxAPIVersion struct + APIBaseURL string + APIDomain string + APIVersion string + DeviceName string + DeviceType string + HTTPSAvailable bool + HTTPSPort uint16 + QueryApiVersion int + UID string + func NewFreeboxAPIVersion(client *FreeboxHttpClient, discovery FreeboxDiscovery, forceApiVersion int) (*FreeboxAPIVersion, error) + func (f *FreeboxAPIVersion) GetURL(path string, miscPath ...interface{}) (string, error) + func (f *FreeboxAPIVersion) IsValid() bool + type FreeboxConnection struct + func NewFreeboxConnectionFromConfig(reader io.Reader, forceApiVersion int) (*FreeboxConnection, error) + func NewFreeboxConnectionFromServiceDiscovery(discovery FreeboxDiscovery, forceApiVersion int) (*FreeboxConnection, error) + func (f *FreeboxConnection) Close() error + func (f *FreeboxConnection) GetAPIVersion() FreeboxAPIVersion + func (f *FreeboxConnection) GetMetricsConnection() (*MetricsFreeboxConnectionAll, error) + func (f *FreeboxConnection) GetMetricsLan() (*MetricsFreeboxLan, error) + func (f *FreeboxConnection) GetMetricsSwitch() (*MetricsFreeboxSwitch, error) + func (f *FreeboxConnection) GetMetricsSystem() (*MetricsFreeboxSystem, error) + func (f *FreeboxConnection) GetMetricsWifi() (*MetricsFreeboxWifi, error) + func (f *FreeboxConnection) WriteConfig(writer io.Writer) error + type FreeboxDiscovery int + const FreeboxDiscoveryHTTP + const FreeboxDiscoveryMDNS + type FreeboxHttpClient struct + func NewFreeboxHttpClient() *FreeboxHttpClient + func (f *FreeboxHttpClient) Get(url string, out interface{}, callbacks ...FreeboxHttpClientCallback) error + func (f *FreeboxHttpClient) Post(url string, in interface{}, out interface{}, ...) error + type FreeboxHttpClientCallback func(*http.Request) + type FreeboxSession struct + func NewFreeboxSession(appToken string, client *FreeboxHttpClient, apiVersion *FreeboxAPIVersion) (*FreeboxSession, error) + func (f *FreeboxSession) AddHeader(req *http.Request) + func (f *FreeboxSession) IsValid() bool + func (f *FreeboxSession) Refresh() error + type MetricsFreeboxConnection struct + BandwidthDown *int64 + BandwidthUp *int64 + BytesDown *int64 + BytesUp *int64 + IPv4 string + IPv6 string + Media string + RateDown *int64 + RateUp *int64 + State string + Type string + type MetricsFreeboxConnectionAll struct + Ftth *MetricsFreeboxConnectionFtth + Xdsl *MetricsFreeboxConnectionXdsl + type MetricsFreeboxConnectionFtth struct + Link *bool + SfpAlimOk *bool + SfpHasPowerReport *bool + SfpHasSignal *bool + SfpModel string + SfpPresent *bool + SfpPwrRx *int64 + SfpPwrTx *int64 + SfpSerial string + SfpVendor string + type MetricsFreeboxConnectionXdsl struct + Down *MetricsFreeboxConnectionXdslStats + Status ... + Up *MetricsFreeboxConnectionXdslStats + type MetricsFreeboxConnectionXdslStats struct + Attn *int64 + Attn10 *int64 + Crc *int64 + Es *int64 + Fec *int64 + Ginp *bool + Hec *int64 + Maxrate *int64 + Nitro *bool + Phyr *bool + Rate *int64 + RtxC *int64 + RtxTx *int64 + RtxUc *int64 + Rxmt *int64 + RxmtCorr *int64 + RxmtUncorr *int64 + Ses *int64 + Snr *int64 + Snr10 *int64 + type MetricsFreeboxLan struct + Hosts map[string][]*MetricsFreeboxLanHost + type MetricsFreeboxLanHost struct + Active *bool + HostType string + ID string + L2Ident ... + L3Connectivities []... + LastActivity *int64 + LastTimeReachable *int64 + Names []... + Persistent *bool + PrimaryName string + PrimaryNameManual *bool + Reachable *bool + VendorName string + type MetricsFreeboxSwitch struct + Ports []*MetricsFreeboxSwitchStatus + type MetricsFreeboxSwitchPortStats struct + RxBadBytes *int64 + RxBroadcastPackets *int64 + RxBytesRate *int64 + RxErrPackets *int64 + RxFcsPackets *int64 + RxFragmentsPackets *int64 + RxGoodBytes *int64 + RxGoodPackets *int64 + RxJabberPackets *int64 + RxMulticastPackets *int64 + RxOversizePackets *int64 + RxPacketsRate *int64 + RxPause *int64 + RxUndersizePackets *int64 + RxUnicastPackets *int64 + TxBroadcastPackets *int64 + TxBytes *int64 + TxBytesRate *int64 + TxCollisions *int64 + TxDeferred *int64 + TxExcessive *int64 + TxFcs *int64 + TxLate *int64 + TxMulticastPackets *int64 + TxMultiple *int64 + TxPackets *int64 + TxPacketsRate *int64 + TxPause *int64 + TxSingle *int64 + TxUnicastPackets *int64 + type MetricsFreeboxSwitchStatus struct + Duplex string + ID int64 + Link string + MacList []... + Mode string + Speed string + Stats *MetricsFreeboxSwitchPortStats + type MetricsFreeboxSystem struct + BoardName string + BoxAuthenticated *bool + BoxFlavor string + DiskStatus string + FanRpm *int64 + Fans []MetricsFreeboxSystemSensor + FirmwareVersion string + Mac string + Sensors []MetricsFreeboxSystemSensor + Serial string + TempCPUB *int64 + TempCPUM *int64 + TempSW *int64 + Uptime string + UptimeValue *int64 + UserMainStorage string + type MetricsFreeboxSystemSensor struct + ID string + Name string + Value *int64 + type MetricsFreeboxWifi struct + Ap []*MetricsFreeboxWifiAp + Bss []*MetricsFreeboxWifiBss + type MetricsFreeboxWifiAp struct + Capabilities map[string]map[string]bool + Config struct{ ... } + ID int64 + Name string + Stations []*MetricsFreeboxWifiStation + Status struct{ ... } + type MetricsFreeboxWifiBss struct + Config struct{ ... } + ID string + PhyID int64 + Status struct{ ... } + type MetricsFreeboxWifiStation struct + Bss *MetricsFreeboxWifiBss + Bssid string + ConnDuration *int64 + Flags struct{ ... } + Host *MetricsFreeboxLanHost + Hostname string + ID string + InactiveDuration *int64 + LastRx *MetricsFreeboxWifiStationStats + LastTx *MetricsFreeboxWifiStationStats + Mac string + RxBytes *int64 + RxRate *int64 + Signal *int64 + State string + TxBytes *int64 + TxRate *int64 + type MetricsFreeboxWifiStationStats struct + BitRate *int64 + Mcs *int64 + Shortgi *bool + VhtMcs *int64 + Width string