Documentation ¶
Overview ¶
Code generated by goctl. DO NOT EDIT.
Index ¶
- Constants
- type DeviceInfo
- type GetCaptchaReq
- type GetCaptchaResp
- type GetDeviceInfoReq
- type GetDeviceInfoResp
- type GetGroupInfoReq
- type GetGroupInfoResp
- type GetGroupMemberReq
- type GetGroupMemberResp
- type GetProductInfoReq
- type GetProductInfoResp
- type GroupInfo
- type GroupMember
- type JwtToken
- type LoginAuthReq
- type LoginReq
- type LoginResp
- type ManageDeviceReq
- type ManageGroupInfoReq
- type ManageGroupMemberReq
- type ManageProductReq
- type ModifyStu
- type ModifyUserInfoReq
- type PageInfo
- type ProductInfo
- type Register2Req
- type RegisterCoreReq
- type RegisterCoreResp
- type SendActionReq
- type SendActionResp
- type SendPropertyReq
- type SendPropertyResp
- type UserInfo
Constants ¶
View Source
const ( USER_TOKEN string = "yl-token" USER_SET_TOKEN string = "yl-set-token" USER_IP string = "yl-ip" USER_UID string = "yl-uid" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceInfo ¶
type DeviceInfo struct { ProductID string `json:"productID"` //产品id 只读 DeviceName string `json:"deviceName"` //设备名称 读写 CreatedTime int64 `json:"createdTime,optional,string"` //创建时间 只读 Secret string `json:"secret,optional"` //设备秘钥 只读 FirstLogin int64 `json:"firstLogin,optional,string"` //激活时间 只读 LastLogin int64 `json:"lastLogin,optional,string"` //最后上线时间 只读 Version *string `json:"version,optional"` // 固件版本 读写 LogLevel int64 `json:"logLevel,optional"` // 日志级别:1)关闭 2)错误 3)告警 4)信息 5)调试 读写 Cert string `json:"cert,optional,omitempty"` // 设备证书 只读 }
type GetCaptchaReq ¶
type GetCaptchaResp ¶
type GetDeviceInfoReq ¶
type GetDeviceInfoResp ¶
type GetDeviceInfoResp struct { Info []*DeviceInfo `json:"info,omitempty"` //设备信息 Total int64 `json:"total,omitempty"` //总数(只有分页的时候会返回) Num int64 `json:"num,omitempty"` //返回的数量 }
type GetGroupInfoReq ¶
type GetGroupInfoResp ¶
type GetGroupMemberReq ¶
type GetGroupMemberReq struct { Page *PageInfo `json:"page,optional,omitempty"` //分页信息,两个参数都填不用填分页信息,用来确认组内是否有该成员 GroupID int64 `json:"groupID,optional,string,omitempty"` //组id MemberID string `json:"memberID,optional,omitempty"` //成员id MemberType int64 `json:"memberType,optional,omitempty"` //成员类型:1:设备 2:用户 }
type GetGroupMemberResp ¶
type GetGroupMemberResp struct { Info []*GroupMember `json:"info,omitempty"` //产品信息 Num int64 `json:"num,optional,omitempty"` //返回的数量 Total int64 `json:"total,optional,omitempty"` //拥有的总数(只有分页的时候会返回) }
type GetProductInfoReq ¶
type GetProductInfoResp ¶
type GetProductInfoResp struct { Info []*ProductInfo `json:"info,omitempty"` //产品信息 Total int64 `json:"total,optional,omitempty"` //拥有的总数(只有分页的时候会返回) Num int64 `json:"num,optional,omitempty"` //返回的数量 }
type GroupMember ¶
type LoginAuthReq ¶
type LoginReq ¶
type LoginReq struct { UserID string `json:"userID,optional"` //登录账号(支持用户名,手机号登录) 账号密码登录时需要填写 PwdType int32 `json:"pwdtype,optional"` //账号密码登录时需要填写.0,无密码 1,明文 2,md5加密 Password string `json:"password,optional"` //密码,建议md5转换 密码登录时需要填写 LoginType string `json:"loginType,options=sms|img|wxopen|wxin|wxminip"` //验证类型 sms 短信验证码 img 图形验证码加账号密码登录 wxopen 微信开放平台登录 wxin 微信内登录 wxminip 微信小程序 Code string `json:"code,optional"` //验证码 微信登录填code CodeID string `json:"codeID,optional"` //验证码编号 微信登录填state }
type ManageDeviceReq ¶
type ManageDeviceReq struct { Opt int64 `json:"opt,omitempty"` //操作 0:新增 1:修改 2:删除 Info *DeviceInfo `json:"info,omitempty"` //设备信息 }
type ManageGroupInfoReq ¶
type ManageGroupMemberReq ¶
type ManageGroupMemberReq struct { Opt int64 `json:"opt,omitempty"` //操作 0:新增 1:修改 2:删除 Info *GroupMember `json:"info,optional,omitempty"` //组成员 }
type ManageProductReq ¶
type ManageProductReq struct { Opt int64 `json:"opt,omitempty"` //操作 0:新增 1:修改 2:删除 Info *ProductInfo `json:"info,optional,omitempty"` //产品信息 }
type ModifyUserInfoReq ¶
type ProductInfo ¶
type ProductInfo struct { CreatedTime int64 `json:"createdTime,optional,string,omitempty"` //创建时间 只读 ProductID string `json:"productID,optional,omitempty"` //产品id 只读 ProductName string `json:"productName,optional,omitempty"` //产品名称 AuthMode int64 `json:"authMode,optional"` //认证方式:1:账密认证,2:秘钥认证 DeviceType int64 `json:"deviceType,optional"` //设备类型:1:设备,2:网关,3:子设备 CategoryID int64 `json:"categoryID,optional"` //产品品类 NetType int64 `json:"netType,optional"` //通讯方式:1:其他,2:wi-fi,3:2G/3G/4G,4:5G,5:BLE,6:LoRaWAN DataProto int64 `json:"dataProto,optional"` //数据协议:1:自定义,2:数据模板 AutoRegister int64 `json:"autoRegister,optional"` //动态注册:1:关闭,2:打开,3:打开并自动创建设备 Secret string `json:"secret,optional,omitempty"` //动态注册产品秘钥 只读 Template *string `json:"template,optional,omitempty"` //数据模板 Description *string `json:"description,optional,omitempty"` //描述 DevStatus *string `json:"devStatus,optional,omitempty"` // 产品状态 }
type Register2Req ¶
type RegisterCoreReq ¶
type RegisterCoreReq struct { ReqType string `json:"reqType,options=phone|wxopen|wxin|wxminip"` //注册方式: phone手机号注册 wxopen 微信开放平台登录 wxin 微信内登录 wxminip 微信小程序 Note string `json:"note,optional"` //手机号注册时填写手机号 Code string `json:"code"` //验证码 微信登录填code CodeID string `json:"codeID,optional"` //验证码编号 微信登录填state }
type RegisterCoreResp ¶
type SendActionReq ¶
type SendActionReq struct { MemberID string `json:"memberID,omitempty"` //成员id MemberType int64 `json:"memberType,omitempty"` //成员类型:1:设备 2:用户 ProductID string `json:"productID,omitempty"` //产品id 获取产品id下的所有设备信息 DeviceName string `json:"deviceName,omitempty"` //设备名 ActionId string `json:"actionId,omitempty"` //产品数据模板中行为功能的标识符,由开发者自行根据设备的应用场景定义 InputParams string `json:"inputParams,omitempty"` //输入参数 }
type SendActionResp ¶
type SendPropertyReq ¶
type SendPropertyReq struct { MemberID string `json:"memberID,omitempty"` //成员id MemberType int64 `json:"memberType,omitempty"` //成员类型:1:设备 2:用户 ProductID string `json:"productID,omitempty"` //产品id 获取产品id下的所有设备信息 DeviceName string `json:"deviceName,omitempty"` //设备名 Data string `json:"data,omitempty"` //属性数据, JSON格式字符串, 注意字段需要在物模型属性里定义 Method string `json:"method,omitempty"` //请求类型 , 不填该参数或者 desired 表示下发属性给设备, reported 表示模拟设备上报属性 }
type SendPropertyResp ¶
type UserInfo ¶
type UserInfo struct { Uid int64 `json:"uid,string"` // 用户id UserName string `json:"userName,optional,omitempty"` //用户名(唯一) NickName string `json:"nickName,optional,omitempty"` // 用户的昵称 InviterUid int64 `json:"inviterUid,string,optional,omitempty"` // 邀请人用户id InviterId string `json:"inviterId,optional,omitempty"` // 邀请码 Sex int64 `json:"sex,optional,omitempty"` // 用户的性别,值为1时是男性,值为2时是女性,值为0时是未知 City string `json:"city,optional,omitempty"` // 用户所在城市 Country string `json:"country,optional,omitempty"` // 用户所在国家 Province string `json:"province,optional,omitempty"` // 用户所在省份 Language string `json:"language,optional,omitempty"` // 用户的语言,简体中文为zh_CN HeadImgUrl string `json:"headImgUrl,optional,omitempty"` // 用户头像 CreateTime int64 `json:"createTime,string,optional,omitempty"` }
Click to show internal directories.
Click to hide internal directories.