github.com/morlay/goqcloud@v0.0.0-20181123023149-b00e0b0b9afc/clients/iotcloud/describe_device_shadow.go (about) 1 package iotcloud 2 3 import ( 4 github_com_morlay_goqcloud "github.com/morlay/goqcloud" 5 ) 6 7 // 获取设备影子 8 // https://cloud.tencent.com/document/api/634/19489 9 10 type DescribeDeviceShadowRequest struct { 11 // 设备名称。命名规则:[a-zA-Z0-9:_-]{1,48} 12 DeviceName string `name:"DeviceName"` 13 // 产品 ID 14 ProductId string `name:"ProductId"` 15 // 区域 16 Region string `name:"Region"` 17 } 18 19 func (req *DescribeDeviceShadowRequest) Invoke(client github_com_morlay_goqcloud.Client) (*DescribeDeviceShadowResponse, error) { 20 resp := &DescribeDeviceShadowResponse{} 21 err := client.Request("iotcloud", "DescribeDeviceShadow", "2018-06-14").Do(req, resp) 22 return resp, err 23 } 24 25 type DescribeDeviceShadowResponse struct { 26 github_com_morlay_goqcloud.TencentCloudBaseResponse 27 // 设备影子数据 28 Data string `json:"Data"` 29 }