Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckDeviceAndOrg ¶
func CheckDeviceAndOrg(c *gin.Context, args *ArgsCheckDeviceAndOrg) (b bool)
CheckDeviceAndOrg 检查设备是否存在且授权
func CheckDeviceAndOrgReturnDevice ¶
func CheckDeviceAndOrgReturnDevice(c *gin.Context, args *ArgsCheckDeviceAndOrg) (deviceID int64, b bool)
Types ¶
type ArgsCheckDeviceAndOrg ¶
type ArgsCheckDeviceAndOrg struct {
//设备分组
GroupMark string `db:"group_mark" json:"groupMark" check:"mark"`
//设备编号
// 同一个分组下,必须唯一
Code string `db:"code" json:"code" check:"mark"`
//时间戳
NowTime int64 `db:"now_time" json:"nowTime"`
//随机码
Rand string `db:"rand" json:"rand"`
//key计算结果
// key+code+时间戳+随机码
Key string `db:"key" json:"key"`
//组织ID
OrgID int64 `db:"org_id" json:"orgID" check:"id"`
}
ArgsCheckDeviceAndOrg 检查设备是否存在且授权参数
Click to show internal directories.
Click to hide internal directories.