soap

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

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

type Argument struct {
	Name  string
	Value string
}

Argument represents an argument of a SOAP action

func (*Argument) UnmarshalXML

func (me *Argument) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

UnmarshalXML unmarshals an argument of a SOAP action

type Body

type Body struct {
	Content []byte `xml:",innerxml"`
}

Body represents a SOAP body

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

func (Envelope) Marshal

func (me Envelope) Marshal() []byte

Marshal marshals an XML snippet for a SOAP Body

type Error

type Error struct {
	Code UPnPErrorCode
	Desc string
}

Error represents a SOAP error

func (Error) IsNil

func (me Error) IsNil() bool

IsNil returns true is the SOAP error not really an error

func (Error) Marshal

func (me Error) Marshal() []byte

Marshal marshals an XML snippet for a SOAP error

type ResponseArguments

type ResponseArguments map[string]string

ResponseArguments maps argument name to argument value

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
)

Jump to

Keyboard shortcuts

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