Documentation
¶
Index ¶
- type AirMediaReceiver
- type ApiVersion
- type App
- type CallEntry
- type Client
- func (c *Client) ApiVersion() *ApiVersion
- func (c *Client) Authorize() error
- func (c *Client) Connect() error
- func (c *Client) DownloadsStats() (*apiResultDownloadsStats, error)
- func (c *Client) GetAirMediaReceivers() ([]AirMediaReceiver, error)
- func (c *Client) GetCallEntrie(id int) (CallEntry, error)
- func (c *Client) GetCallEntries() ([]CallEntry, error)
- func (c *Client) GetContact(id int) (CallEntry, error)
- func (c *Client) GetContacts() ([]ContactEntry, error)
- func (c *Client) GetDhcpConfig() (*DhcpConfig, error)
- func (c *Client) GetDhcpDynamicLease() ([]DhcpDynamicLease, error)
- func (c *Client) GetDhcpStaticLease() ([]DhcpStaticLease, error)
- func (c *Client) GetLanBrowserInterface(nic string) ([]LanBrowserInterface, error)
- func (c *Client) GetLanBrowserInterfaces() ([]LanBrowserInterfaces, error)
- func (c *Client) GetLanConfig() (*LanConfig, error)
- func (c *Client) GetResource(resource string, authenticated bool) ([]byte, error)
- func (c *Client) GetResult(uri string, payload interface{}) error
- func (c *Client) Login() error
- func (c *Client) MarkAllRead() error
- func (c *Client) MarkRead(id int) error
- func (c *Client) PostResource(resource string, data interface{}, authenticated bool) ([]byte, error)
- func (c *Client) PutResource(resource string, data interface{}, authenticated bool) ([]byte, error)
- type ConnectionStatus
- type ConnectionStatusFull
- type ContactEntry
- type DhcpConfig
- type DhcpDynamicLease
- type DhcpHost
- type DhcpStaticLease
- type Epoch
- type LanBrowserInterface
- type LanBrowserInterfaces
- type LanConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AirMediaReceiver ¶
type AirMediaReceiver struct { Capabilities struct { Photo bool `json:"photo"` Screen bool `json:"screen"` Audio bool `json:"audio"` Video bool `json:"video"` } `json:"capabilities"` Name string `json:"name"` PasswordProtected bool `json:"password_protected"` }
Airmedia
type ApiVersion ¶
type ApiVersion struct { FreeboxID string `json:"uid",omitempty` DeviceName string `json:"device_name",omitempty` Version string `json:"api_version",omitempty` BaseURL string `json:"api_base_url",omitempty` DeviceType string `json:"device_type",omitempty` }
ApiVersion is returned by requesting `GET /api_version`
func (*ApiVersion) ApiCode ¶
func (a *ApiVersion) ApiCode() string
type CallEntry ¶
type CallEntry struct { Number string `json:"number"` Type string `json:"type"` ID int `json:"id"` Duration int `json:"duration"` Datetime Epoch `json:"datetime"` ContactID int `json:"contact_id"` LineID int `json:"line_id"` Name string `json:"name"` New bool `json:"new"` }
Airmedia
type Client ¶
Client is the Freebox API client
func (*Client) ApiVersion ¶
func (c *Client) ApiVersion() *ApiVersion
ApiVersion returns an `ApiVersion` structure field with the configuration fetched during `Connect()`
func (*Client) DownloadsStats ¶
func (*Client) GetAirMediaReceivers ¶
func (c *Client) GetAirMediaReceivers() ([]AirMediaReceiver, error)
func (*Client) GetContacts ¶
func (c *Client) GetContacts() ([]ContactEntry, error)
Get all contacts
func (*Client) GetDhcpConfig ¶
func (c *Client) GetDhcpConfig() (*DhcpConfig, error)
Get the current DHCP configuration
func (*Client) GetDhcpDynamicLease ¶
func (c *Client) GetDhcpDynamicLease() ([]DhcpDynamicLease, error)
Get the list of DHCP dynamic leases
func (*Client) GetDhcpStaticLease ¶
func (c *Client) GetDhcpStaticLease() ([]DhcpStaticLease, error)
Get the list of DHCP static leases
func (*Client) GetLanBrowserInterface ¶
func (c *Client) GetLanBrowserInterface(nic string) ([]LanBrowserInterface, error)
func (*Client) GetLanBrowserInterfaces ¶
func (c *Client) GetLanBrowserInterfaces() ([]LanBrowserInterfaces, error)
func (*Client) GetResource ¶
GetApiResource performs low-level GET request on the Freebox API
type ConnectionStatus ¶
type ConnectionStatus struct { Type string `json:"type"` RateDown int `json:"rate_down"` BytesUp int64 `json:"bytes_up"` Ipv4PortRange []int `json:"ipv4_port_range"` RateUp int `json:"rate_up"` BandwidthUp int `json:"bandwidth_up"` Ipv6 string `json:"ipv6"` BandwidthDown int `json:"bandwidth_down"` Media string `json:"media"` State string `json:"state"` BytesDown int64 `json:"bytes_down"` Ipv4 string `json:"ipv4"` }
type ConnectionStatusFull ¶
type ConnectionStatusFull struct { Type string `json:"type"` RateDown int `json:"rate_down"` BytesUp int64 `json:"bytes_up"` Ipv4PortRange []int `json:"ipv4_port_range"` RateUp int `json:"rate_up"` BandwidthUp int `json:"bandwidth_up"` Ipv6 string `json:"ipv6"` BandwidthDown int `json:"bandwidth_down"` Media string `json:"media"` State string `json:"state"` BytesDown int64 `json:"bytes_down"` Ipv4 string `json:"ipv4"` }
type ContactEntry ¶
type ContactEntry struct { LastName string `json:"last_name"` Company string `json:"company"` PhotoURL string `json:"photo_url"` ID int `json:"id"` Birthday string `json:"birthday"` Numbers []struct { Number string `json:"number"` Type string `json:"type"` ID int `json:"id"` ContactID int `json:"contact_id"` IsDefault bool `json:"is_default"` IsOwn bool `json:"is_own"` } `json:"numbers"` LastUpdate Epoch `json:"last_update"` DisplayName string `json:"display_name"` Notes string `json:"notes"` FirstName string `json:"first_name"` }
Airmedia
type DhcpConfig ¶
type DhcpConfig struct { Enabled bool `json:"enabled"` Gateway string `json:"gateway"` StickyAssign bool `json:"sticky_assign"` IPRangeEnd string `json:"ip_range_end"` Netmask string `json:"netmask"` DNS []string `json:"dns"` AlwaysBroadcast bool `json:"always_broadcast"` IPRangeStart string `json:"ip_range_start"` }
DhcpConfig
type DhcpDynamicLease ¶
type DhcpHost ¶
type DhcpHost struct { L2Ident struct { ID string `json:"id"` Type string `json:"type"` } `json:"l2ident"` Active bool `json:"active"` Persistent bool `json:"persistent"` Names []struct { Name string `json:"name"` Source string `json:"source"` } `json:"names"` VendorName string `json:"vendor_name"` HostType string `json:"host_type"` Interface string `json:"interface"` ID string `json:"id"` LastTimeReachable int `json:"last_time_reachable"` PrimaryNameManual bool `json:"primary_name_manual"` DefaultName string `json:"default_name"` L3Connectivities []struct { Addr string `json:"addr"` Active bool `json:"active"` Reachable bool `json:"reachable"` LastActivity int `json:"last_activity"` Af string `json:"af"` LastTimeReachable int `json:"last_time_reachable"` } `json:"l3connectivities"` Reachable bool `json:"reachable"` LastActivity int `json:"last_activity"` AccessPoint struct { Mac string `json:"mac"` Type string `json:"type"` ConnectivityType string `json:"connectivity_type"` UID string `json:"uid"` EthernetInformation struct { Duplex string `json:"duplex"` Speed string `json:"speed"` Link string `json:"link"` } `json:"ethernet_information"` } `json:"access_point"` PrimaryName string `json:"primary_name"` }
type DhcpStaticLease ¶
type LanBrowserInterface ¶
type LanBrowserInterface struct { L2Ident struct { ID string `json:"id"` Type string `json:"type"` } `json:"l2ident"` Active bool `json:"active"` ID string `json:"id"` LastTimeReachable int `json:"last_time_reachable"` Persistent bool `json:"persistent"` Names []struct { Name string `json:"name"` Source string `json:"source"` } `json:"names"` VendorName string `json:"vendor_name"` L3Connectivities []struct { Addr string `json:"addr"` Active bool `json:"active"` Af string `json:"af"` Reachable bool `json:"reachable"` LastActivity int `json:"last_activity"` LastTimeReachable int `json:"last_time_reachable"` } `json:"l3connectivities"` Reachable bool `json:"reachable"` LastActivity int `json:"last_activity"` PrimaryNameManual bool `json:"primary_name_manual"` PrimaryName string `json:"primary_name"` }
list of hosts on a given interface
type LanBrowserInterfaces ¶
browsable LAN interfaces
Source Files
¶
Click to show internal directories.
Click to hide internal directories.