Documentation
¶
Overview ¶
Package types implements data types that are used internally
Index ¶
- func CreateFromDesc(dvcDesc *desc.RootDevice, svcDescs desc.ServiceMap, ...) (*RootDevice, ServiceMap, bool, error)
- type BinBase64
- func (t BinBase64) Get() interface{}
- func (t *BinBase64) IsNumeric() bool
- func (t *BinBase64) IsString() bool
- func (t BinBase64) IsZero() bool
- func (t *BinBase64) Set(v interface{}) (err error)
- func (t *BinBase64) SetFromString(s string) (err error)
- func (t BinBase64) String() string
- func (t BinBase64) Type() string
- type BinHex
- type Boolean
- func (t Boolean) Get() interface{}
- func (t *Boolean) IsNumeric() bool
- func (t *Boolean) IsString() bool
- func (t Boolean) IsZero() bool
- func (t *Boolean) Set(v interface{}) (err error)
- func (t *Boolean) SetFromString(s string) (err error)
- func (t Boolean) String() string
- func (t Boolean) Type() string
- type BootID
- type Char
- type ConfigID
- type Date
- type DateTime
- func (t DateTime) Get() interface{}
- func (t *DateTime) IsNumeric() bool
- func (t *DateTime) IsString() bool
- func (t DateTime) IsZero() bool
- func (t *DateTime) Set(v interface{}) (err error)
- func (t *DateTime) SetFromString(s string) (err error)
- func (t DateTime) String() string
- func (t DateTime) Type() string
- type DateTimeTz
- func (t DateTimeTz) Get() interface{}
- func (t *DateTimeTz) IsNumeric() bool
- func (t *DateTimeTz) IsString() bool
- func (t DateTimeTz) IsZero() bool
- func (t *DateTimeTz) Set(v interface{}) (err error)
- func (t *DateTimeTz) SetFromString(s string) (err error)
- func (t DateTimeTz) String() string
- func (t DateTimeTz) Type() string
- type Device
- type Fixed14_4
- func (t Fixed14_4) Get() interface{}
- func (t *Fixed14_4) IsNumeric() bool
- func (t *Fixed14_4) IsString() bool
- func (t Fixed14_4) IsZero() bool
- func (t *Fixed14_4) Set(v interface{}) (err error)
- func (t *Fixed14_4) SetFromString(s string) (err error)
- func (t Fixed14_4) String() string
- func (t Fixed14_4) Type() string
- type Float
- type I1
- type I2
- type I4
- type Int
- type Number
- type R4
- type R8
- type RootDevice
- type SOAPVar
- type SOAPVars
- type Service
- type ServiceID
- type ServiceMap
- type ServiceType
- type ServiceVersion
- type StatVar
- type String
- type TimeOfDay
- func (t TimeOfDay) Get() interface{}
- func (t *TimeOfDay) IsNumeric() bool
- func (t *TimeOfDay) IsString() bool
- func (t TimeOfDay) IsZero() bool
- func (t *TimeOfDay) Set(v interface{}) (err error)
- func (t *TimeOfDay) SetFromString(s string) (err error)
- func (t TimeOfDay) String() string
- func (t TimeOfDay) Type() string
- type TimeOfDayTz
- func (t TimeOfDayTz) Get() interface{}
- func (t *TimeOfDayTz) IsNumeric() bool
- func (t *TimeOfDayTz) IsString() bool
- func (t TimeOfDayTz) IsZero() bool
- func (t *TimeOfDayTz) Set(v interface{}) (err error)
- func (t *TimeOfDayTz) SetFromString(s string) (err error)
- func (t TimeOfDayTz) String() string
- func (t TimeOfDayTz) Type() string
- type UI1
- type UI2
- type UI4
- type UI8
- type URI
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateFromDesc ¶
func CreateFromDesc(dvcDesc *desc.RootDevice, svcDescs desc.ServiceMap, listener func() chan *StatVar) (*RootDevice, ServiceMap, bool, error)
CreateFromDesc take devices and service descriptions and creates device and service objects from it. listener is a listener for multicast eventing. It returns a reference to the root device, a map of services and whether multicast eventing is required. Note: The key of svcDesc must correspong to the service ids in dvcDesc to allow a proper connection between of services and devides
Types ¶
type BinBase64 ¶
type BinBase64 struct {
// contains filtered or unexported fields
}
BinBase64 is the representation of the SOAP type bin.base64 as golang type
func NewBinBase64 ¶
NewBinBase64 creates a new SOAP variable the represents the SOAP type bin.base64
func (*BinBase64) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*BinBase64) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (BinBase64) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*BinBase64) SetFromString ¶
SetFromString sets the value of t from s
type BinHex ¶
type BinHex struct {
// contains filtered or unexported fields
}
BinHex is the representation of the SOAP type bin.hex as golang type
func (*BinHex) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*BinHex) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (BinHex) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*BinHex) SetFromString ¶
SetFromString sets the value of t from s
type Boolean ¶
type Boolean struct {
// contains filtered or unexported fields
}
Boolean is the representation of the SOAP type boolean as golang type
func NewBoolean ¶
NewBoolean creates a new SOAP variable the represents the SOAP type boolean
func (*Boolean) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*Boolean) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (Boolean) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*Boolean) SetFromString ¶
SetFromString sets the value of t from s
type BootID ¶
type BootID struct {
// contains filtered or unexported fields
}
BootID represents BOOTID.UPNP.ORG asdescribed in the of the UPnP Device Architecture 2.0
func (*BootID) Incr ¶
func (me *BootID) Incr()
Incr increases the current and the next value of boot id
type Char ¶
type Char struct {
// contains filtered or unexported fields
}
Char is the representation of the SOAP type char as golang type
func (*Char) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*Char) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (Char) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*Char) SetFromString ¶
SetFromString sets the value of t from s
type ConfigID ¶
type ConfigID struct {
// contains filtered or unexported fields
}
ConfigID represents CONFIGID.UPNP.ORG asdescribed in the of the UPnP Device Architecture 2.0
type Date ¶
type Date struct {
// contains filtered or unexported fields
}
Date is the representation of the SOAP type date as golang type
func (*Date) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*Date) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (Date) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*Date) SetFromString ¶
SetFromString sets the value of t from s
type DateTime ¶
type DateTime struct {
// contains filtered or unexported fields
}
DateTime is the representation of the SOAP type dateTime as golang type
func NewDateTime ¶
NewDateTime creates a new SOAP variable the represents the SOAP type dateTime
func (*DateTime) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*DateTime) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (DateTime) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*DateTime) SetFromString ¶
SetFromString sets the value of t from s
type DateTimeTz ¶
type DateTimeTz struct {
// contains filtered or unexported fields
}
DateTimeTz is the representation of the SOAP type dateTime.tz as golang type
func NewDateTimeTz ¶
func NewDateTimeTz(s string) (t *DateTimeTz, err error)
NewDateTimeTz creates a new SOAP variable the represents the SOAP type dateTime.tz
func (*DateTimeTz) IsNumeric ¶
func (t *DateTimeTz) IsNumeric() bool
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*DateTimeTz) IsString ¶
func (t *DateTimeTz) IsString() bool
IsString returns true is the value of t is a string, otherwise false is returned
func (DateTimeTz) IsZero ¶
func (t DateTimeTz) IsZero() bool
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*DateTimeTz) Set ¶
func (t *DateTimeTz) Set(v interface{}) (err error)
Set sets t to the new value v
func (*DateTimeTz) SetFromString ¶
func (t *DateTimeTz) SetFromString(s string) (err error)
SetFromString sets the value of t from s
func (DateTimeTz) String ¶
func (t DateTimeTz) String() string
String returns the string representation of the value of t
type Fixed14_4 ¶
type Fixed14_4 struct {
// contains filtered or unexported fields
}
Fixed14_4 is the representation of the SOAP type fixed.14.4 as golang type
func NewFixed14_4 ¶
NewFixed14_4 creates a new SOAP variable the represents the SOAP type fixed.14.4
func (*Fixed14_4) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*Fixed14_4) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (Fixed14_4) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*Fixed14_4) SetFromString ¶
SetFromString sets the value of t from s
type Float ¶
type Float struct {
// contains filtered or unexported fields
}
Float is the representation of the SOAP type float as golang type
func (*Float) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*Float) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (Float) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*Float) SetFromString ¶
SetFromString sets the value of t from s
type I1 ¶
type I1 struct {
// contains filtered or unexported fields
}
I1 is the representation of the SOAP type i1 as golang type
func (*I1) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*I1) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (I1) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*I1) SetFromString ¶
SetFromString sets the value of t from s
type I2 ¶
type I2 struct {
// contains filtered or unexported fields
}
I2 is the representation of the SOAP type i2 as golang type
func (*I2) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*I2) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (I2) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*I2) SetFromString ¶
SetFromString sets the value of t from s
type I4 ¶
type I4 struct {
// contains filtered or unexported fields
}
I4 is the representation of the SOAP type i4 as golang type
func (*I4) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*I4) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (I4) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*I4) SetFromString ¶
SetFromString sets the value of t from s
type Int ¶
type Int struct {
// contains filtered or unexported fields
}
Int is the representation of the SOAP type int as golang type
func (*Int) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*Int) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (Int) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*Int) SetFromString ¶
SetFromString sets the value of t from s
type Number ¶
type Number struct {
// contains filtered or unexported fields
}
Number is the representation of the SOAP type number as golang type
func (*Number) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*Number) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (Number) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*Number) SetFromString ¶
SetFromString sets the value of t from s
type R4 ¶
type R4 struct {
// contains filtered or unexported fields
}
R4 is the representation of the SOAP type r4 as golang type
func (*R4) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*R4) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (R4) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*R4) SetFromString ¶
SetFromString sets the value of t from s
type R8 ¶
type R8 struct {
// contains filtered or unexported fields
}
R8 is the representation of the SOAP type r8 as golang type
func (*R8) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*R8) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (R8) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*R8) SetFromString ¶
SetFromString sets the value of t from s
type RootDevice ¶
type RootDevice struct { Desc *desc.RootDevice *Device }
RootDevice represents an UPnP root device
type SOAPVar ¶
type SOAPVar interface { Type() string Get() interface{} Set(interface{}) error SetFromString(string) error IsNumeric() bool IsString() bool IsZero() bool String() string }
SOAPVar represents a SOAP variable (e.g. a SOAP state variable)
func NewSOAPVar ¶
NewSOAPVar creates a new SOAP variable for the SOAP type typ with the value val
type Service ¶
type Service struct { ID ServiceID Typ ServiceType Ver ServiceVersion Device *Device ActSpecs map[string]map[string](*StatVar) StatVars map[string](*StatVar) Desc *desc.Service }
Service returns a UPnP service
type ServiceID ¶
type ServiceID string
ServiceID represents the id of a service
type ServiceMap ¶
ServiceMap map a service id (only the pure id part) to the corresponding service
type ServiceVersion ¶
type ServiceVersion string
ServiceVersion represents the version of a service type
type StatVar ¶
type StatVar struct { Name string Service *Service Evented bool SOAPVar sync.Mutex // contains filtered or unexported fields }
StatVar represents a state variable
func NewStatVar ¶
func NewStatVar(sv desc.StateVariable, svc *Service, listener func() chan *StatVar) (*StatVar, error)
NewStatVar creates a new state variable based on a description (i.e. the corresponding state variable part of the service description) and for the service svc. A listener for multicast eventing is added.
func (*StatVar) Init ¶
Init initializes the state variable with v. Note: No multicast event is sent.
func (*StatVar) IsValid ¶
func (me *StatVar) IsValid(s string) (bool, soap.UPnPErrorCode)
IsValid checks if the value of the state variable is valid. I.e. for numeric variables it's checked whether their value is in required range (if there is a range for that variable), for string variables it's checked whether the value is allowed (if there is a list of allowed values for that variable)
type String ¶
type String struct {
// contains filtered or unexported fields
}
String is the representation of the SOAP type string as golang type
func (*String) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*String) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (String) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*String) SetFromString ¶
SetFromString sets the value of t from s
type TimeOfDay ¶
type TimeOfDay struct {
// contains filtered or unexported fields
}
TimeOfDay is the representation of the SOAP type time as golang type
func NewTimeOfDay ¶ added in v0.1.1
NewTimeOfDay creates a new SOAP variable the represents the SOAP type time
func (TimeOfDay) Get ¶ added in v0.1.1
func (t TimeOfDay) Get() interface{}
Get returns the value of t
func (*TimeOfDay) IsNumeric ¶ added in v0.1.1
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*TimeOfDay) IsString ¶ added in v0.1.1
IsString returns true is the value of t is a string, otherwise false is returned
func (TimeOfDay) IsZero ¶ added in v0.1.1
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*TimeOfDay) SetFromString ¶ added in v0.1.1
SetFromString sets the value of t from s
type TimeOfDayTz ¶ added in v0.1.1
type TimeOfDayTz struct {
// contains filtered or unexported fields
}
TimeOfDayTz is the representation of the SOAP type time.tz as golang type
func NewTimeOfDayTz ¶ added in v0.1.1
func NewTimeOfDayTz(s string) (t *TimeOfDayTz, err error)
NewTimeOfDayTz creates a new SOAP variable the represents the SOAP type time.tz
func (TimeOfDayTz) Get ¶ added in v0.1.1
func (t TimeOfDayTz) Get() interface{}
Get returns the value of t
func (*TimeOfDayTz) IsNumeric ¶ added in v0.1.1
func (t *TimeOfDayTz) IsNumeric() bool
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*TimeOfDayTz) IsString ¶ added in v0.1.1
func (t *TimeOfDayTz) IsString() bool
IsString returns true is the value of t is a string, otherwise false is returned
func (TimeOfDayTz) IsZero ¶ added in v0.1.1
func (t TimeOfDayTz) IsZero() bool
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*TimeOfDayTz) Set ¶ added in v0.1.1
func (t *TimeOfDayTz) Set(v interface{}) (err error)
Set sets t to the new value v
func (*TimeOfDayTz) SetFromString ¶ added in v0.1.1
func (t *TimeOfDayTz) SetFromString(s string) (err error)
SetFromString sets the value of t from s
func (TimeOfDayTz) String ¶ added in v0.1.1
func (t TimeOfDayTz) String() string
String returns the string representation of the value of t
func (TimeOfDayTz) Type ¶ added in v0.1.1
func (t TimeOfDayTz) Type() string
Type returns the SOAP type of t
type UI1 ¶
type UI1 struct {
// contains filtered or unexported fields
}
UI1 is the representation of the SOAP type ui1 as golang type
func (*UI1) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*UI1) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (UI1) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*UI1) SetFromString ¶
SetFromString sets the value of t from s
type UI2 ¶
type UI2 struct {
// contains filtered or unexported fields
}
UI2 is the representation of the SOAP type ui2 as golang type
func (*UI2) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*UI2) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (UI2) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*UI2) SetFromString ¶
SetFromString sets the value of t from s
type UI4 ¶
type UI4 struct {
// contains filtered or unexported fields
}
UI4 is the representation of the SOAP type ui4 as golang type
func (*UI4) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*UI4) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (UI4) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*UI4) SetFromString ¶
SetFromString sets the value of t from s
type UI8 ¶
type UI8 struct {
// contains filtered or unexported fields
}
UI8 is the representation of the SOAP type ui8 as golang type
func (*UI8) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*UI8) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (UI8) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*UI8) SetFromString ¶
SetFromString sets the value of t from s
type URI ¶
type URI struct {
// contains filtered or unexported fields
}
URI is the representation of the SOAP type uri as golang type
func (*URI) IsNumeric ¶
IsNumeric returns true is the value of t is numeric, otherwise false is returned
func (*URI) IsString ¶
IsString returns true is the value of t is a string, otherwise false is returned
func (URI) IsZero ¶
IsZero returns true is the value of t is the zero value of that type, otherwise false is returned
func (*URI) SetFromString ¶
SetFromString sets the value of t from s