networking

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Xlmns = map[string]string{
	"onvif":   "http://www.onvif.org/ver10/schema",
	"tds":     "http://www.onvif.org/ver10/device/wsdl",
	"trt":     "http://www.onvif.org/ver10/media/wsdl",
	"tev":     "http://www.onvif.org/ver10/events/wsdl",
	"tptz":    "http://www.onvif.org/ver20/ptz/wsdl",
	"timg":    "http://www.onvif.org/ver20/imaging/wsdl",
	"tan":     "http://www.onvif.org/ver20/analytics/wsdl",
	"xmime":   "http://www.w3.org/2005/05/xmlmime",
	"wsnt":    "http://docs.oasis-open.org/wsn/b-2",
	"xop":     "http://www.w3.org/2004/08/xop/include",
	"wsa":     "http://www.w3.org/2005/08/addressing",
	"wstop":   "http://docs.oasis-open.org/wsn/t-1",
	"wsntw":   "http://docs.oasis-open.org/wsn/bw-2",
	"wsrf-rw": "http://docs.oasis-open.org/wsrf/rw-2",
	"wsaw":    "http://www.w3.org/2006/05/addressing/wsdl",
}

Xlmns XML Schema

Functions

func ReadAndParse

func ReadAndParse(ctx context.Context, httpReply *http.Response, reply interface{}, tag string) error

func SendSoap

func SendSoap(ctx context.Context, httpClient *http.Client, endpoint, message string) (*http.Response, error)

SendSoap send soap message

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for a new device of onvif and DeviceInfo struct represents an abstract ONVIF device. It contains methods, which helps to communicate with ONVIF device

func NewClient

func NewClient(ref ClientInfo, httpClient *http.Client) (*Client, error)

NewClient function construct a ONVIF Client entity

func (*Client) AddEndpoint

func (client *Client) AddEndpoint(Key, Value string)

func (*Client) CallMethod

func (client *Client) CallMethod(ctx context.Context, method interface{}) (*http.Response, error)

CallMethod functions call a method, defined <method> struct. You should use Authenticate method to call authorized requests.

func (*Client) GetAuth added in v1.0.0

func (client *Client) GetAuth() ClientAuth

func (*Client) GetEndpoint

func (client *Client) GetEndpoint(name string) string

GetEndpoint returns specific ONVIF service endpoint address

func (*Client) GetServices

func (client *Client) GetServices() map[string]string

GetServices return available endpoints

func (*Client) GetUUID added in v0.0.3

func (client *Client) GetUUID() string

func (*Client) SetAuth added in v0.0.3

func (client *Client) SetAuth(auth ClientAuth)

func (*Client) SetUUID added in v0.0.3

func (client *Client) SetUUID(uuid string)

type ClientAuth added in v1.0.0

type ClientAuth struct {
	Username string
	Password string
}

type ClientInfo added in v1.0.0

type ClientInfo struct {
	Xaddr string
	Uuid  string
}

Jump to

Keyboard shortcuts

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