Documentation ¶
Index ¶
- Variables
- func SendMarshalRequest(url string, request interface{}) (result map[string]string, err error)
- func SendUnmarshalRequest(url string, request interface{}) (characteristicData interface{}, err error)
- type Configurable
- type ConfigurableCharacteristicValue
- type ConfigurableV2
- type FactoryInterface
- type FindConfigurablesRequest
- type Interface
- type Marshaller
- func (this *Marshaller) Marshal(characteristicId string, serviceId string, characteristicData interface{}, ...) (result map[string]string, err error)
- func (this *Marshaller) MarshalFromService(characteristicId string, service model.Service, characteristicData interface{}, ...) (result map[string]string, err error)
- func (this *Marshaller) MarshalFromServiceAndProtocol(characteristicId string, service model.Service, protocol model.Protocol, ...) (result map[string]string, err error)
- func (this *Marshaller) MarshalV2(service model.Service, protocol model.Protocol, ...) (result map[string]string, err error)
- func (this *Marshaller) Unmarshal(characteristicId string, serviceId string, message map[string]string, ...) (characteristicData interface{}, err error)
- func (this *Marshaller) UnmarshalFromService(characteristicId string, service model.Service, message map[string]string, ...) (characteristicData interface{}, err error)
- func (this *Marshaller) UnmarshalFromServiceAndProtocol(characteristicId string, service model.Service, protocol model.Protocol, ...) (characteristicData interface{}, err error)
- func (this *Marshaller) UnmarshalV2(request UnmarshallingV2Request) (characteristicData interface{}, err error)
- type MarshallerFactory
- type MarshallingRequest
- type MarshallingV2Request
- type MarshallingV2RequestData
- type UnmarshallingRequest
- type UnmarshallingV2Request
Constants ¶
This section is empty.
Variables ¶
View Source
var Factory = MarshallerFactory{}
Functions ¶
func SendMarshalRequest ¶
func SendUnmarshalRequest ¶
Types ¶
type Configurable ¶
type Configurable struct { CharacteristicId string `json:"characteristic_id"` Values []ConfigurableCharacteristicValue `json:"values"` }
type ConfigurableV2 ¶
type FactoryInterface ¶
type Interface ¶
type Interface interface { MarshalV2(service model.Service, protocol model.Protocol, data []MarshallingV2RequestData) (result map[string]string, err error) UnmarshalV2(request UnmarshallingV2Request) (characteristicData interface{}, err error) MarshalFromServiceAndProtocol(characteristicId string, service model.Service, protocol model.Protocol, characteristicData interface{}, configurables []Configurable) (result map[string]string, err error) UnmarshalFromServiceAndProtocol(characteristicId string, service model.Service, protocol model.Protocol, message map[string]string, hints []string) (characteristicData interface{}, err error) }
type Marshaller ¶
type Marshaller struct {
// contains filtered or unexported fields
}
func New ¶
func New(url string) *Marshaller
func (*Marshaller) Marshal ¶
func (this *Marshaller) Marshal(characteristicId string, serviceId string, characteristicData interface{}, configurables []Configurable) (result map[string]string, err error)
func (*Marshaller) MarshalFromService ¶
func (this *Marshaller) MarshalFromService(characteristicId string, service model.Service, characteristicData interface{}, configurables []Configurable) (result map[string]string, err error)
func (*Marshaller) MarshalFromServiceAndProtocol ¶
func (this *Marshaller) MarshalFromServiceAndProtocol(characteristicId string, service model.Service, protocol model.Protocol, characteristicData interface{}, configurables []Configurable) (result map[string]string, err error)
func (*Marshaller) MarshalV2 ¶
func (this *Marshaller) MarshalV2(service model.Service, protocol model.Protocol, data []MarshallingV2RequestData) (result map[string]string, err error)
func (*Marshaller) UnmarshalFromService ¶
func (*Marshaller) UnmarshalFromServiceAndProtocol ¶
func (*Marshaller) UnmarshalV2 ¶
func (this *Marshaller) UnmarshalV2(request UnmarshallingV2Request) (characteristicData interface{}, err error)
type MarshallerFactory ¶
type MarshallerFactory struct{}
type MarshallingRequest ¶
type MarshallingRequest struct { Service model.Service `json:"service,omitempty"` //semi-optional, may be determined by request path Protocol *model.Protocol `json:"protocol,omitempty"` //semi-optional, may be determined by request path CharacteristicId string `json:"characteristic_id,omitempty"` //semi-optional, may be determined by request path Configurables []Configurable `json:"configurables,omitempty"` //optional, may be empty Data interface{} `json:"data"` }
type MarshallingV2Request ¶
type MarshallingV2Request struct { Service model.Service `json:"service"` //semi-optional, may be determined by request path Protocol model.Protocol `json:"protocol"` //semi-optional, may be determined by service Data []MarshallingV2RequestData `json:"data"` }
type MarshallingV2RequestData ¶
type MarshallingV2RequestData struct { Value interface{} `json:"value"` CharacteristicId string `json:"characteristic_id"` Paths []string `json:"paths"` //semi-optional, may be determent by FunctionId FunctionId string `json:"function_id"` //semi-optional, to determine Paths if they are not set AspectNode *model.AspectNode `json:"aspect_node,omitempty"` //optional, to determine Paths if they are not set, may be empty if only FunctionId should be searched }
type UnmarshallingRequest ¶
type UnmarshallingRequest struct { Service model.Service `json:"service,omitempty"` //semi-optional, may be determined by request path Protocol *model.Protocol `json:"protocol,omitempty"` //semi-optional, may be determined by service CharacteristicId string `json:"characteristic_id,omitempty"` //semi-optional, may be determined by request path Message map[string]string `json:"message"` ContentVariableHints []string `json:"content_variable_hints"` //optional }
type UnmarshallingV2Request ¶
type UnmarshallingV2Request struct { Service model.Service `json:"service"` //semi-optional, may be determined by request path Protocol model.Protocol `json:"protocol"` //semi-optional, may be determined by service CharacteristicId string `json:"characteristic_id"` //semi-optional, may be determined by request path Message map[string]string `json:"message"` Path string `json:"path"` //semi-optional, may be determent by FunctionId and AspectNode FunctionId string `json:"function_id"` //semi-optional, to determine Path if not set AspectNode model.AspectNode `json:"aspect_node"` //semi-optional, to determine Path if not set, may itself be determent by AspectNodeId AspectNodeId string `json:"aspect_node_id"` //semi-optional, to determine AspectNode if not set }
Click to show internal directories.
Click to hide internal directories.