devicectl

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: May 13, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package devicectl for Device Control

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ControlDeviceRequest

type ControlDeviceRequest struct {
	DeviceID string          `url:"-" validate:"required" json:"-"`        // device id
	Commands []DeviceCommand `url:"-" validate:"required" json:"commands"` // commands
}

func (*ControlDeviceRequest) Method

func (s *ControlDeviceRequest) Method() string

Method for Request.Method()

func (*ControlDeviceRequest) URL

func (s *ControlDeviceRequest) URL() string

URL for Request.URL()

type ControlDeviceResponse

type ControlDeviceResponse bool

type DeviceCommand

type DeviceCommand struct {
	Code  string      `json:"code"`
	Value interface{} `json:"value"`
}

type DeviceFunction

type DeviceFunction struct {
	Code   string `json:"code"`   // code
	Type   string `json:"type"`   // type
	Values string `json:"values"` // value ranges
	Name   string `json:"name"`   // Instruction name
	Desc   string `json:"desc"`   // description
}

type Function

type Function struct {
	Code   string `json:"code"`   // code
	Type   string `json:"type"`   // type
	Values string `json:"values"` // value range
}

type QueryCategoryFunctionRequest

type QueryCategoryFunctionRequest struct {
	Category string `url:"-" validate:"required" json:"-"` // category name
}

func (*QueryCategoryFunctionRequest) Method

Method for Request.Method()

func (*QueryCategoryFunctionRequest) URL

URL for Request.URL()

type QueryCategoryFunctionResponse

type QueryCategoryFunctionResponse Function

type QueryDeviceFunctionRequest

type QueryDeviceFunctionRequest struct {
	DeviceID string `url:"-" validate:"required" json:"-"` // Device id
}

func (*QueryDeviceFunctionRequest) Method

func (s *QueryDeviceFunctionRequest) Method() string

Method for Request.Method()

func (*QueryDeviceFunctionRequest) URL

URL for Request.URL()

type QueryDeviceFunctionResponse

type QueryDeviceFunctionResponse struct {
	Category  string           `json:"category"`  // Category
	Functions []DeviceFunction `json:"functions"` // Functions
}

type QueryDeviceStatusRequest

type QueryDeviceStatusRequest struct {
	DeviceID string `url:"-" validate:"required" json:"-"` // device id
}

func (*QueryDeviceStatusRequest) Method

func (s *QueryDeviceStatusRequest) Method() string

Method for Request.Method()

func (*QueryDeviceStatusRequest) URL

URL for Request.URL()

type QueryDeviceStatusResponse

type QueryDeviceStatusResponse []DeviceCommand

type QuerySpecificationsRequest

type QuerySpecificationsRequest struct {
	DeviceID string `url:"-" validate:"required" json:"-"` // device id
}

func (*QuerySpecificationsRequest) Method

func (s *QuerySpecificationsRequest) Method() string

Method for Request.Method()

func (*QuerySpecificationsRequest) URL

URL for Request.URL()

type QuerySpecificationsResponse

type QuerySpecificationsResponse struct {
	Category  string   `json:"category"`  // Product category
	Functions Function `json:"functions"` // Instruction set
	Status    Function `json:"status"`    // State set
}

Jump to

Keyboard shortcuts

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