models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	Key    string        `json:"key"`
	Config config.Config `json:"config"`
	Script string        `json:"script"`
}

APIConfig restful API request body

type PointValue

type PointValue struct {
	// PointName 点位名称
	PointName string `json:"pointName"`
	// Type 点位值类型
	Type string `json:"type"`
	// Value 点位值
	Value interface{} `json:"value"`
}

PointValue 点位值模型

type ScriptResult

type ScriptResult struct {
	DeviceName  string       `json:"deviceName"`
	PointValues []PointValue `json:"pointValues"`
}

ScriptResult Lua脚本返回数据格式

type SendPointValues

type SendPointValues struct {
	DeviceName string       `json:"deviceName"`
	Mode       string       `json:"mode"`
	Values     []PointValue `json:"values"`
}

SendPointValues 点位数据

func (SendPointValues) ToJson

func (s SendPointValues) ToJson() string

type SendRequest

type SendRequest struct {
	// Type 请求类型:read、write
	Type string `json:"type"`
	// 设备名称
	DeviceName string `json:"device_name"`
	// 相关点位信息
	PointValues []PointValue `json:"point_values"`
}

SendRequest 发送请求数据

Jump to

Keyboard shortcuts

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