Documentation ¶
Overview ¶
Package fritzboxmetrics provides metrics fro the UPnP and Tr64 interface
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidSOAPResponse = errors.New("invalid SOAP response")
ErrInvalidSOAPResponse will be thrown if we've got an invalid SOAP response
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Name string `xml:"name"` Arguments []*Argument `xml:"argumentList>argument"` ArgumentMap map[string]*Argument // Map of arguments indexed by .Name // contains filtered or unexported fields }
Action represents an UPnP Action on a Service
type Argument ¶
type Argument struct { Name string `xml:"name"` Direction string `xml:"direction"` RelatedStateVariable string `xml:"relatedStateVariable"` StateVariable *StateVariable }
An Argument to an action
type Device ¶
type Device struct { DeviceType string `xml:"deviceType"` FriendlyName string `xml:"friendlyName"` Manufacturer string `xml:"manufacturer"` ManufacturerURL string `xml:"ManufacturerURL"` ModelDescription string `xml:"modelDescription"` ModelName string `xml:"modelName"` ModelNumber string `xml:"modelNumber"` ModelURL string `xml:"ModelURL"` UDN string `xml:"UDN"` Services []*Service `xml:"serviceList>service"` // Service of the device Devices []*Device `xml:"deviceList>device"` // Sub-Devices of the device PresentationURL string `xml:"PresentationURL"` // contains filtered or unexported fields }
Device represents an UPNP device
type ResponseError ¶
ResponseError contains the requested URI and the response status code
func (*ResponseError) Error ¶
func (err *ResponseError) Error() string
Error returns a string representation
type Result ¶
type Result map[string]interface{}
Result are all output argements of the Call(): The map is indexed by the name of the state variable. The type of the value is string, uint64 or bool depending of the DataType of the variable.
type Root ¶
type Root struct { BaseURL string Username string Password string Device Device `xml:"device"` Services map[string]*Service // Map of all services indexed by .ServiceType }
Root of the UPNP tree
type Service ¶
type Service struct { Device *Device ServiceType string `xml:"serviceType"` ServiceID string `xml:"serviceId"` ControlURL string `xml:"controlURL"` EventSubURL string `xml:"eventSubURL"` SCPDURL string `xml:"SCPDURL"` Actions map[string]*Action // All actions available on the service StateVariables []*StateVariable // All state variables available on the service }
Service represents an UPnP Service
type StateVariable ¶
type StateVariable struct { Name string `xml:"name"` DataType string `xml:"dataType"` DefaultValue string `xml:"defaultValue"` }
StateVariable is a variable that can be manipulated through actions