From 7df8eae7c06792d107f82cd3d6ea5e529c3da998 Mon Sep 17 00:00:00 2001
From: liuxiaolong <736321739@qq.com>
Date: 星期三, 04 三月 2020 17:20:04 +0800
Subject: [PATCH] add sensor
---
controllers/camera.go | 14 ++++++++++++++
go.sum | 4 ++--
go.mod | 2 +-
3 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/controllers/camera.go b/controllers/camera.go
index 16633b6..bea1cc0 100644
--- a/controllers/camera.go
+++ b/controllers/camera.go
@@ -40,6 +40,20 @@
RunEnable bool `json:"run_enable"` //鎺у埗瀹炴椂澶勭悊鎴栬疆璇㈠鐞嗙殑寮�鍏�
RunType int `json:"run_type"` //澶勭悊绫诲瀷锛�0锛氳疆璇紝1锛氬疄鏃�
RunServerId string `json:"run_server_id"` //褰撳墠姝e湪澶勭悊鐨勫垎鏋愭湇鍔″櫒id
+
+ Sensors []SensorVo `json:"sensors"` //浼犳劅鍣ㄥ垪琛�
+}
+
+type SensorVo struct {
+ Id string `json:"id"`
+ Type int `json:"type"`
+ Ip string `json:"ip"`
+ Port int `json:"port"`
+ Username string `json:"username"`
+ Password string `json:"password"`
+ Threshold int `json:"threshold"`
+ Enable bool `json:"enable"`
+ DevId string `json:"devId"`
}
// @Summary 娣诲姞鎽勫儚鏈�
diff --git a/go.mod b/go.mod
index d84e8c3..1e0c330 100644
--- a/go.mod
+++ b/go.mod
@@ -8,7 +8,7 @@
basic.com/gb28181api.git v0.0.0-20191028082253-472438a8407b
basic.com/pubsub/cache.git v0.0.0-20190718093725-6a413e1d7d48
basic.com/pubsub/esutil.git v0.0.0-20200114073900-ad9de8362777
- basic.com/pubsub/protomsg.git v0.0.0-20200229094046-b917b48b905c // indirect
+ basic.com/pubsub/protomsg.git v0.0.0-20200304080919-8bb136c5b1c6 // indirect
basic.com/valib/capture.git v0.0.0-20191204103802-89c923cf2abe
basic.com/valib/deliver.git v0.0.0-20190531095353-25d8c3b20051
basic.com/valib/godraw.git v0.0.0-20191122082247-26e9987cd183 // indirect
diff --git a/go.sum b/go.sum
index 786c905..432df0e 100644
--- a/go.sum
+++ b/go.sum
@@ -10,8 +10,8 @@
basic.com/pubsub/esutil.git v0.0.0-20191120125514-865efa73a9ae/go.mod h1:yIvppFPFGC61DOdm71ujnsxZBMFUu2yKjr5O43bMWCw=
basic.com/pubsub/esutil.git v0.0.0-20200114073900-ad9de8362777 h1:gTeuhepfLgOchD6bqydsGGV6KCj/UaseQQgo4DFyhGQ=
basic.com/pubsub/esutil.git v0.0.0-20200114073900-ad9de8362777/go.mod h1:yIvppFPFGC61DOdm71ujnsxZBMFUu2yKjr5O43bMWCw=
-basic.com/pubsub/protomsg.git v0.0.0-20200229094046-b917b48b905c h1:82f2LQLEIqgQj33nxMSVbeW1azS215dfRoQ5RPhu3io=
-basic.com/pubsub/protomsg.git v0.0.0-20200229094046-b917b48b905c/go.mod h1:un5NV5VWQoblVLZfx1Rt5vyLgwR0jI92d3VJhfrJhWU=
+basic.com/pubsub/protomsg.git v0.0.0-20200304080919-8bb136c5b1c6 h1:qrxwyJjJCUA3VWD2AvunhgyDFptlWcPNTGj6p6oIVto=
+basic.com/pubsub/protomsg.git v0.0.0-20200304080919-8bb136c5b1c6/go.mod h1:un5NV5VWQoblVLZfx1Rt5vyLgwR0jI92d3VJhfrJhWU=
basic.com/valib/capture.git v0.0.0-20191204103802-89c923cf2abe h1:uh3u7DuSOw6AwzvPC1EM19sw1Skks1EUJddcbHDKI9M=
basic.com/valib/capture.git v0.0.0-20191204103802-89c923cf2abe/go.mod h1:y+h7VUnoSQ3jOtf2K3twXNA8fYDfyUsifSswcyKLgNw=
basic.com/valib/deliver.git v0.0.0-20190531095353-25d8c3b20051/go.mod h1:bkYiTUGzckyNOjAgn9rB/DOjFzwoSHJlruuWQ6hu6IY=
--
Gitblit v1.8.0