Documentation ¶
Index ¶
Constants ¶
View Source
const ( AuthURL = GateWay + "/auth/token" // 鉴权(auth) /** 体温管理 **/ TSPTemperatureGetUrl = GateWay + "/tsp/temperature" // 获取最新体温数据 TSPTemperaturesGetUrl = GateWay + "/tsp/temperatures" // 获取体温结果列表 TSPTemperatureUploadGetUrl = GateWay + "/tsp/temperature/upload" // 获取体温测量间隔时间 TSPTemperatureUploadPutUrl = GateWay + "/tsp/temperature/upload" // 设置体温测量间隔时间 )
View Source
const (
GateWay = "http://192.168.16.191:18001"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthResult ¶
type AuthResult struct { Result Data struct { Token string `json:"token"` //权限令牌,调用其它接口时需要提供token,有效期为 1 小时,过期后无法使用 } `json:"data,omitempty"` // 返回结果 }
获取token
type Temperature ¶
type Temperature struct {
Cfg *Config
}
func (*Temperature) GetTemperature ¶
func (p *Temperature) GetTemperature(query *TemperatureRecentQuery) (*TemperatureResult, error)
获取最新体温数据
func (*Temperature) GetTemperatureUpload ¶
func (p *Temperature) GetTemperatureUpload(query *TemperatureUploadQuery) (*TemperatureUploadResult, error)
获取体温测量间隔时间
func (*Temperature) GetTemperatures ¶
func (p *Temperature) GetTemperatures(query *TemperaturesQuery) (*TemperaturesResult, error)
获取体温列表
type TemperatureEntity ¶
type TemperatureEntity struct { PrimaryKey string `json:"primary_key"` Id int64 `json:"id"` ImeiSn string `json:"imei_sn"` Uuid string `json:"uuid"` ProductId int64 `json:"product_id"` Temperature string `json:"temperature"` CreateTime string `json:"created"` }
====================== 体温 ==========================
type TemperatureRecentQuery ¶
================== 体温 ====================
type TemperatureResult ¶
type TemperatureResult struct { Result Data TemperatureEntity `json:"data,omitempty"` // 返回结果 }
体温最近测量数据
type TemperatureUploadQuery ¶
type TemperatureUploadQuery struct {
ImeiSn string // 设备号
}
type TemperatureUploadResult ¶
体温测量间隔时间
type TemperaturesQuery ¶
type TemperaturesResult ¶
type TemperaturesResult struct { Result Data struct { Total int `json:"total"` Result []TemperatureEntity `json:"result"` } `json:"data,omitempty"` // 返回结果 }
体温测量数据列表
Click to show internal directories.
Click to hide internal directories.