Versions in this module Expand all Collapse all v0 v0.2.0 Jul 31, 2024 v0.1.0 Dec 3, 2023 Changes in this version + const DeviceXMLNamespace + var CharsetReaderDefault func(charset string, input io.Reader) (io.Reader, error) + var HTTPClientDefault = http.DefaultClient + type ContextError struct + Context string + Err error + func (err ContextError) Error() string + type Device struct + DeviceType string + Devices []Device + FriendlyName string + Icons []Icon + Manufacturer string + ManufacturerURL URLField + ModelDescription string + ModelName string + ModelNumber string + ModelType string + ModelURL URLField + PresentationURL URLField + SerialNumber string + Services []Service + UDN string + UPC string + func (device *Device) FindService(serviceType string) []*Service + func (device *Device) SetURLBase(urlBase *url.URL) + func (device *Device) String() string + func (device *Device) VisitDevices(visitor func(*Device)) + func (device *Device) VisitServices(visitor func(*Service)) + type Icon struct + Depth int32 + Height int32 + Mimetype string + URL URLField + Width int32 + func (icon *Icon) SetURLBase(url *url.URL) + type MaybeRootDevice struct + Err error + LocalAddr net.IP + Location *url.URL + Root *RootDevice + USN string + func DiscoverDevices(searchTarget string) ([]MaybeRootDevice, error) + func DiscoverDevicesCtx(ctx context.Context, searchTarget string) ([]MaybeRootDevice, error) + type RootDevice struct + Device Device + SpecVersion SpecVersion + URLBase url.URL + URLBaseStr string + XMLName xml.Name + func DeviceByURL(loc *url.URL) (*RootDevice, error) + func DeviceByURLCtx(ctx context.Context, loc *url.URL) (*RootDevice, error) + func (root *RootDevice) SetURLBase(urlBase *url.URL) + type Service struct + ControlURL URLField + EventSubURL URLField + SCPDURL URLField + ServiceId string + ServiceType string + func (srv *Service) NewSOAPClient() *soap.SOAPClient + func (srv *Service) RequestSCDP() (*scpd.SCPD, error) + func (srv *Service) RequestSCPD() (*scpd.SCPD, error) + func (srv *Service) RequestSCPDCtx(ctx context.Context) (*scpd.SCPD, error) + func (srv *Service) SetURLBase(urlBase *url.URL) + func (srv *Service) String() string + type ServiceClient struct + Location *url.URL + RootDevice *RootDevice + SOAPClient *soap.SOAPClient + Service *Service + func NewServiceClients(searchTarget string) (clients []ServiceClient, errors []error, err error) + func NewServiceClientsByURL(loc *url.URL, searchTarget string) ([]ServiceClient, error) + func NewServiceClientsByURLCtx(ctx context.Context, loc *url.URL, searchTarget string) ([]ServiceClient, error) + func NewServiceClientsCtx(ctx context.Context, searchTarget string) (clients []ServiceClient, errors []error, err error) + func NewServiceClientsFromRootDevice(rootDevice *RootDevice, loc *url.URL, searchTarget string) ([]ServiceClient, error) + func (client *ServiceClient) GetServiceClient() *ServiceClient + func (client *ServiceClient) LocalAddr() net.IP + type SpecVersion struct + Major int32 + Minor int32 + type URLField struct + Ok bool + Str string + URL url.URL + func (uf *URLField) SetURLBase(urlBase *url.URL)