Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) GetAppProductKeys(appName string) (*CommonResult[[]string], error)
- func (c *Client) GetDevice(sn string) (*CommonResult[map[string]interface{}], error)
- func (c *Client) GetDeviceLatestProperty(sn string) (*CommonResult[map[string]interface{}], error)
- func (c *Client) GetDeviceState(sn string) (*CommonResult[bool], error)
- func (c *Client) GetFirmwareVersionsByProductKey(productKey string, tags []string) (*CommonResult[[]map[string]interface{}], error)
- func (c *Client) GetOTALatestJob(sn string) (*CommonResult[map[string]interface{}], error)
- func (c *Client) GetProductsOfMe() (*CommonResult[[]map[string]interface{}], error)
- func (c *Client) GetThingModel(productKey, organizationID string) (*CommonResult[any], error)
- func (c *Client) NewFirmware(params *model.NewFirmwareParams) (*CommonResult[any], error)
- type CommonResult
Constants ¶
View Source
const ( Version230503 = "2023-05-03" MethodSha1 = "sha1" APIVersion = "v1" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetAppProductKeys ¶
func (c *Client) GetAppProductKeys(appName string) (*CommonResult[[]string], error)
func (*Client) GetDevice ¶
func (c *Client) GetDevice(sn string) (*CommonResult[map[string]interface{}], error)
func (*Client) GetDeviceLatestProperty ¶
func (c *Client) GetDeviceLatestProperty(sn string) (*CommonResult[map[string]interface{}], error)
func (*Client) GetDeviceState ¶
func (c *Client) GetDeviceState(sn string) (*CommonResult[bool], error)
func (*Client) GetFirmwareVersionsByProductKey ¶
func (*Client) GetOTALatestJob ¶ added in v0.0.9
func (c *Client) GetOTALatestJob(sn string) (*CommonResult[map[string]interface{}], error)
func (*Client) GetProductsOfMe ¶ added in v0.1.2
func (c *Client) GetProductsOfMe() (*CommonResult[[]map[string]interface{}], error)
func (*Client) GetThingModel ¶
func (c *Client) GetThingModel(productKey, organizationID string) (*CommonResult[any], error)
func (*Client) NewFirmware ¶ added in v0.1.1
func (c *Client) NewFirmware(params *model.NewFirmwareParams) (*CommonResult[any], error)
type CommonResult ¶
type CommonResult[T any] struct { /** 错误编码 * 1xx:信息 - 收到请求,继续处理; * 2xx:成功——动作被成功接收、理解和接受; * 3xx:重定向 - 必须采取进一步的行动才能完成请求; * 4xx:客户端错误 - 请求包含错误的语法或无法实现; * 5xx:服务器错误——服务器未能完成明显有效的请求; * */ Code int `json:"code"` Message string `json:"message"` Data T `json:"data"` RequestID uuid.UUID `json:"request_id"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.