networking

package
v1.0.11 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2024 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 Scheam

Functions

func SendSoap

func SendSoap(httpClient *http.Client, endpoint, message string, headers map[string]string) (*http.Response, error)

SendSoap send soap message

func SendSoapWithCtx

func SendSoapWithCtx(ctx context.Context, httpClient *http.Client, endpoint, message string, headers map[string]string) (*http.Response, error)

SendSoapWithCtx send soap message with context

Types

type Request

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

func NewRequest

func NewRequest(device device, method interface{}) *Request

func (*Request) Do

func (r *Request) Do() *Response

func (*Request) WithContext

func (r *Request) WithContext(ctx context.Context) *Request

func (*Request) WithEndpoint

func (r *Request) WithEndpoint(endpoint string) *Request

func (*Request) WithHeaders added in v1.0.1

func (r *Request) WithHeaders(headers map[string]string) *Request

func (*Request) WithHttpClient

func (r *Request) WithHttpClient(httpClient *http.Client) *Request

func (*Request) WithUsernamePassword

func (r *Request) WithUsernamePassword(username, password string) *Request

type Response

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

func (*Response) Body

func (r *Response) Body() ([]byte, error)

func (*Response) Error

func (r *Response) Error() error

func (*Response) SetResponse

func (r *Response) SetResponse(response *http.Response)

func (*Response) StatusOK

func (r *Response) StatusOK() bool

func (*Response) Unmarshal

func (r *Response) Unmarshal(responses ...interface{}) error

Jump to

Keyboard shortcuts

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