完善牧安云哨-中间件

This commit is contained in:
BBIT-Kai
2025-12-29 16:30:55 +08:00
parent b9b8d30ebf
commit f6f8b59c73
30 changed files with 1090 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
package api
import "sentinel/pkg/model"
const (
updateCheckURL = "/iot/common/update/check"
analyticsURL = "/api/public/sentinel-record-analytics"
)
func CheckUpdate(deviceID string) (*model.UpdateInfo, error) {
var resp model.UpdateInfo
err := Get(
updateCheckURL,
map[string]string{
"deviceID": deviceID,
},
&resp,
)
if err != nil {
return nil, err
}
return &resp, nil
}
func Analytics(req model.Record) error {
return Post(analyticsURL, req, nil)
}