Documentation ¶
Overview ¶
Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use p file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChildDeviceModel ¶
type ChildDeviceModel struct {
Name string `json:"name" yaml:"name"`
}
type Connector ¶
type Connector struct { Type string `json:"type"` TargetNode NodeSource `json:"targetNode"` SourceNode NodeSource `json:"sourceNode"` IsSelect bool `json:"isSelect"` }
type ModelDefinition ¶
type ModelDefinition struct { Name string `json:"name" yaml:"name"` Kind string `json:"kind" yaml:"kind"` Description string `json:"description" yaml:"description"` Domain string `json:"domain" yaml:"domain"` Version string `json:"version" yaml:"version"` IsLogical bool `json:"logical" yaml:"logical"` IsCompound bool `json:"compound" yaml:"compound"` Icon string `json:"icon" yaml:"icon"` Endpoints []*Endpoint `json:"endpoints" yaml:"endpoints"` DataModels []*DataModel `json:"dataModels" yaml:"dataModels"` ChildDeviceModels []ChildDeviceModel `json:"childDeviceModels" yaml:"childDeviceModels"` }
func ParseModelDefinition ¶
func ParseModelDefinition(data []byte, dataType string) (*ModelDefinition, error)
type ModelPresentation ¶
type ModelPresentation struct { Nodes []*Node `json:"nodes"` Connectors []*Connector `json:"connectors"` }
func ParseModelPresentation ¶
func ParseModelPresentation(data []byte, dataType string) (*ModelPresentation, error)
type Node ¶
type Node struct { Id string `json:"id"` Width int32 `json:"width"` Height int32 `json:"height"` X int32 `json:"x"` Y int32 `json:"y"` IsLeftConnectShow bool `json:"isLeftConnectShow"` IsRightConnectShow bool `json:"isRightConnectShow"` Name string `json:"name"` IsSelect bool `json:"isSelect"` InitW int32 `json:"initW"` InitH int32 `json:"initH"` Type string `json:"type"` ContainNodes []string `json:"containNodes"` ClassType string `json:"classType"` Attrs []*NodeAttr `json:"attrs"` Icon string `json:"icon"` }
type NodeAttr ¶
type NodeAttr struct { Type string `json:"type"` Name string `json:"name"` Value interface{} `json:"value"` Placeholder string `json:"placeholder"` Disabled bool `json:"disabled"` Options []*NodeAttrOption `json:"options"` }