services

package
v0.0.0-...-fd70e87 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServiceCaller

type ServiceCaller struct {
	// contains filtered or unexported fields
}

func NewServiceCaller

func NewServiceCaller(ws *ws.Writer, ctx context.Context) ServiceCaller

func (*ServiceCaller) Call

type ServiceRequest

type ServiceRequest struct {
	Id             int64          `json:"id"`
	RequestType    string         `json:"type"`
	Domain         string         `json:"domain"`
	Service        string         `json:"service"`
	ServiceData    map[string]any `json:"service_data,omitempty"`
	Target         ServiceTarget  `json:"target,omitempty"`
	ReturnResponse bool           `json:"return_response"`
}

func NewServiceRequest

func NewServiceRequest() ServiceRequest

type ServiceResult

type ServiceResult struct {
	Id          int64  `json:"id"`
	RequestType string `json:"type"`
	Success     bool   `json:"success"`
	Result      struct {
		Context  map[string]any `json:"context"`
		Response map[string]any `json:"response"`
	} `json:"result"`
}

type ServiceTarget

type ServiceTarget struct {
	EntityId string `json:"entity_id"`
	DeviceId string `json:"device_id"`
	AreaId   string `json:"area_id"`
	LabelId  string `json:"label_id"`
}

Jump to

Keyboard shortcuts

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