Documentation
¶
Overview ¶
Package viamupnp is for discovering and using upnp cameras
Index ¶
Constants ¶
View Source
const FindAllTestKey = FindAllTestKeyStruct("findAllTestKey1231231231231")
FindAllTestKey - for testing.
Variables ¶
This section is empty.
Functions ¶
func FindHost ¶
func FindHost(ctx context.Context, logger logging.Logger, queries []DeviceQuery, rootOnly bool) ([]string, map[string]DeviceQuery, error)
FindHost looks for hosts that match the queries, returns the host/ip (no port) and a map of hosts to queries. All supplied fields of a query must match a discovered device, and the host will map to the first matching query. Using the map allows users to know which devices were found.
Types ¶
type DeviceQuery ¶
type DeviceQuery struct {
ModelName string `json:"model_name"`
Manufacturer string `json:"manufacturer"`
SerialNumber string `json:"serial_number"`
Network string `json:"network"`
}
DeviceQuery specifics a query for a network device.
type UPNPDevice ¶
UPNPDevice is a UPNPDevice device.
func (*UPNPDevice) Matches ¶
func (pc *UPNPDevice) Matches(query DeviceQuery) bool
Matches returns if the UPNPDevice matches the query.
Click to show internal directories.
Click to hide internal directories.