Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrFault error = errors.New("xml fault")
ErrFault can be used as a target with errors.Is.
Functions ¶
func DecodeAction ¶
DecodeAction unmarshal a SOAP envelope from the reader. Errors can either be from the reader, XML decoding, or a *Fault.
func EncodeAction ¶
Types ¶
type ActionNameer ¶
type ActionNameer interface {
ActionName() string
}
type Fault ¶
type Fault struct {
Code string `xml:"faultcode"`
String string `xml:"faultstring"`
Actor string `xml:"faultactor"`
Detail FaultDetail `xml:"detail"`
}
Fault implements error, and contains SOAP fault information.
type FaultDetail ¶
type FaultDetail struct {
//Raw []byte `xml:",innerxml"`
UPnPError UPnPError `xml:"UPnPError"`
}
FaultDetail carries XML-encoded application-specific Fault details.
type SOAPClient ¶
type SOAPClient struct {
// contains filtered or unexported fields
}
func NewSOAPClient ¶
func NewSOAPClient(controlURL url.URL) *SOAPClient
func (*SOAPClient) DoCall ¶
func (client *SOAPClient) DoCall(actionNamespace, actionName string, inAction interface{}, outAction interface{}) error
DoCall is the legacy version of DoCallCtx, which uses context.Background.
func (*SOAPClient) DoCallCtx ¶
func (client *SOAPClient) DoCallCtx(ctx context.Context, actionNamespace, actionName string, inAction interface{}, outAction interface{}) error
DoCallCtx makes a SOAP request, with the given action. inAction and outAction must both be pointers to structs with string fields only.
Click to show internal directories.
Click to hide internal directories.