viamupnp

package module
v0.0.0-...-39c68c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 11 Imported by: 1 module, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

viamupnp

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 FindAllTestKeyStruct

type FindAllTestKeyStruct string

FindAllTestKeyStruct - for testing.

type UPNPDevice

type UPNPDevice struct {
	Service ssdp.Service
	Desc    *deviceDesc
}

UPNPDevice is a UPNPDevice device.

func (*UPNPDevice) Matches

func (pc *UPNPDevice) Matches(query DeviceQuery) bool

Matches returns if the UPNPDevice matches the query.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址