scpd

package
v0.0.0-...-0df88b9 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Version = SpecVersion{
	Major: 1,
	Minor: 0,
}

Functions

This section is empty.

Types

type Action

type Action struct {
	Name      string     `xml:"name"`
	Arguments []Argument `xml:"argumentList>argument"`
}

type AllowedValueRange

type AllowedValueRange struct {
	Minimum int `xml:"minimum"`
	Maximum int `xml:"maximum,omitempty"`
	Step    int `xml:"step,omitempty"`
}

type AllowedValues

type AllowedValues struct {
	Values []string `xml:"allowedValues"`
}

type Argument

type Argument struct {
	Name                 string    `xml:"name"`
	Direction            Direction `xml:"direction"`
	RelatedStateVariable string    `xml:"relatedStateVariable"`
}

type Direction

type Direction int
const (
	Unknown Direction = iota
	In
	Out
)

func (Direction) MarshalText

func (d Direction) MarshalText() ([]byte, error)

func (*Direction) UnmarshalText

func (d *Direction) UnmarshalText(raw []byte) error

type Document

type Document struct {
	XMLName        xml.Name        `xml:"urn:schemas-upnp-org:service-1-0 scpd"`
	SpecVersion    SpecVersion     `xml:"specVersion"`
	StateVariables []StateVariable `xml:"serviceStateTable>stateVariable"`
	Actions        []Action        `xml:"actionList>action"`
}

func FromAction

func FromAction(name string, req, rsp interface{}) (Document, error)

func Merge

func Merge(docs ...Document) (Document, error)

func Must

func Must(d Document, err error) Document

type SpecVersion

type SpecVersion struct {
	Major int `xml:"major"`
	Minor int `xml:"minor"`
}

type StateVariable

type StateVariable struct {
	Name                string             `xml:"name"`
	SendEventsAttribute xmltypes.YesNoBool `xml:"sendEventsAttribute"`
	DataType            string             `xml:"dataType"`
	AllowedValues       *AllowedValues     `xml:"allowedValueList,omitempty"`
	AllowedValueRange   *AllowedValueRange `xml:"allowedValueRange,omitempty"`
}

Jump to

Keyboard shortcuts

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