Documentation ¶
Overview ¶
Package soap implements data types for SOAP messages
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
Arguments []Argument `xml:",any"`
}
Action represents a SOAP action
type ActionResponse ¶
type ActionResponse struct { ServiceType string ServiceVersion string Name string Arguments ResponseArguments }
ActionResponse represents a response to a SOAP action
func (ActionResponse) Marshal ¶
func (me ActionResponse) Marshal() []byte
Marshal marshals an XML snippet for an response to a SOAP action
type Argument ¶
Argument represents an argument of a SOAP action
func (*Argument) UnmarshalXML ¶
UnmarshalXML unmarshals an argument of a SOAP action
type Envelope ¶
type Envelope struct { XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"` EncodingStyle string `xml:"encodingStyle,attr"` Body Body `xml:"Body"` }
Envelope represents a SOAP envelope
type Error ¶
type Error struct { Code UPnPErrorCode Desc string }
Error represents a SOAP error
type ResponseArguments ¶
ResponseArguments maps argument name to argument value
type TimeOfDay ¶ added in v0.1.1
type TimeOfDay struct { // Duration of time since midnight. FromMidnight time.Duration // Set to true if Offset is specified. If false, then the timezone is // unspecified (and by ISO8601 - implies some "local" time). HasOffset bool // Offset is non-zero only if time.tz is used. It is otherwise ignored. If // non-zero, then it is regarded as a UTC offset in seconds. Note that the // sub-minutes is ignored by the marshal function. Offset int }
TimeOfDay is used in cases where SOAP "time" or "time.tz" is used. This type definition is copied from https://github.com/huin/goupnp, copyright 2013 John Beisley <johnbeisleyuk@gmail.com>.
type UPnPErrorCode ¶
type UPnPErrorCode uint
UPnPErrorCode represents an UPnP error code
const ( // UPnPErrorInvalidAction is the code foran invalid action UPnPErrorInvalidAction UPnPErrorCode = 400 // UPnPErrorInvalidArgs is the code for invalid arguments UPnPErrorInvalidArgs UPnPErrorCode = 402 // UPnPErrorActionFailed is the code for a failed action UPnPErrorActionFailed UPnPErrorCode = 501 // UPnPErrorArgValInvalid is the code for an invalid argument value UPnPErrorArgValInvalid UPnPErrorCode = 600 // UPnPErrorArgValOutOfRange is the code for an argument value that is out // of range UPnPErrorArgValOutOfRange UPnPErrorCode = 601 // UPnPErrorOptActionNotImplemented is the code for an action that is // called but not implemented UPnPErrorOptActionNotImplemented UPnPErrorCode = 602 // UPnPErrorHumanRequired indicates that human interaction is required UPnPErrorHumanRequired UPnPErrorCode = 604 // UPnPErrorStrTooLong indicates that a string is too long UPnPErrorStrTooLong UPnPErrorCode = 605 )