-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontrol.go
More file actions
45 lines (34 loc) · 1.12 KB
/
control.go
File metadata and controls
45 lines (34 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package cameraservices
import "context"
type ControlKeyService interface {
RoomAndControlGroup(ctx context.Context, key string) (string, string, error)
}
type ConfigService interface {
Cameras(context.Context, ControlInfo) ([]CameraConfig, error)
ControlIP(context.Context, string) ([]string, error)
}
type CameraConfig struct {
DisplayName string `json:"displayName"`
TiltUp string `json:"tiltUp"`
TiltDown string `json:"tiltDown"`
PanLeft string `json:"panLeft"`
PanRight string `json:"panRight"`
PanTiltStop string `json:"panTiltStop"`
ZoomIn string `json:"zoomIn"`
ZoomOut string `json:"zoomOut"`
ZoomStop string `json:"zoomStop"`
Stream string `json:"stream"`
Presets []CameraPreset `json:"presets"`
// admin items
Reboot string `json:"reboot"`
}
type CameraPreset struct {
DisplayName string `json:"displayName"`
SavePreset string `json:"savePreset"`
SetPreset string `json:"setPreset"`
}
type ControlInfo struct {
Room string `json:"room" form:"room"`
ControlGroup string `json:"controlGroup" form:"controlGroup"`
ControlKey string `json:"controlKey" form:"controlKey"`
}