重新整理物联网服务,分离业务逻辑。

This commit is contained in:
BBIT-Kai
2026-01-05 11:54:33 +08:00
parent e2982b141d
commit 892cb2494e
53 changed files with 558 additions and 26 deletions
+22
View File
@@ -0,0 +1,22 @@
package api
import "sentinel/pkg/model"
const (
updateCheckURL = "/iot/common/update/check"
)
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
}