thing_model

package
v0.0.0-...-ca5a4cf Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QueryThingModel

func QueryThingModel(productKey string, l *SyncThingModelLogic) error

Types

type Event

type Event struct {
	ProductKey string `json:"productKey"`
	CreateTs   int64  `json:"createTs"`
	Identifier string `json:"identifier"`
	EventName  string `json:"eventName"`
	EventType  string `json:"eventType"`
	Outputdata any    `json:"outputdata"`
	Required   bool   `json:"required"`
	Custom     bool   `json:"custom"`
}

type Property

type Property struct {
	ProductKey    string `json:"productKey"`
	CreateTs      int64  `json:"createTs"`
	Identifier    string `json:"identifier"`
	DataType      string `json:"dataType"`
	Name          string `json:"name"`
	RwFlag        string `json:"rwFlag"`
	DataSpecs     any    `json:"dataSpecs"`
	DataSpecsList any    `json:"dataSpecsList"`
	Required      bool   `json:"required"`
	Custom        bool   `json:"custom"`
}

type Service

type Service struct {
	ProductKey   string `json:"productKey"`
	CreateTs     int64  `json:"createTs"`
	Identifier   string `json:"identifier"`
	ServiceName  string `json:"serviceName"`
	InputParams  any    `json:"inputParams"`
	OutputParams any    `json:"outputParams"`
	Required     bool   `json:"required"`
	CallType     string `json:"callType"`
	Custom       bool   `json:"custom"`
}

type SyncThingModelLogic

type SyncThingModelLogic struct {
	logx.Logger
	// contains filtered or unexported fields
}

func NewSyncThingModelLogic

func NewSyncThingModelLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SyncThingModelLogic

func (*SyncThingModelLogic) SyncThingModel

func (l *SyncThingModelLogic) SyncThingModel(in *basic.Empty) (*basic.BaseResp, error)

type ThingModel

type ThingModel struct {
	Ppk struct {
		Version string `json:"version"`
	} `json:"_ppk"`
	Properties []Property `json:"properties"`
	Events     []Event    `json:"events"`
	Services   []Service  `json:"services"`
}

Jump to

Keyboard shortcuts

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