forked from byuoitav/shipyard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
device.go
34 lines (30 loc) · 1.39 KB
/
device.go
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
package shipyard
// Device represents a physical AV device and its configuration
type Device struct {
ID string `json:"id"`
APIControllable bool `json:"api_controllable"`
PublicDescription string `json:"publicDescription"`
PrivateDescription string `json:"privateDescription"`
Address string `json:"address"`
Commands map[string]GenericControlRequest `json:"commands"`
Presets map[string]string `json:"presets,omitempty"`
Driver string `json:"driver"`
DyanmicPorts bool `json:"dynamicPorts"`
Ports []DevicePort `json:"ports"`
Tags Tags `json:"tags"`
}
// DeviceTemplate represents a template for a device
type DeviceTemplate struct {
ID string `json:"id"`
Template Device `json:"template"`
}
// DevicePort represents a port on a physical device
type DevicePort struct {
ID string `json:"id"`
Name string `json:"name"`
Endpoint []string `json:"endpoint"`
Incoming bool `json:"incoming"`
Type string `json:"type"`
}
// Tags are a set of arbitrary key value pairs used for storing extra information
type Tags map[string]string