Documentation ¶
Index ¶
- Variables
- type APIDevice
- type APIRoom
- type AudioControl
- type ControlAPIRequest
- type ControlGroup
- type ControlSet
- type Datastore
- type Device
- type DeviceControl
- type DevicePort
- type DeviceTemplate
- type DisplayControl
- type DisplayControlSource
- type GenericControlRequest
- type Logger
- type MasterVolume
- type PortEndpoint
- type Room
- type RoomConfig
- type RoomControlCompiler
- type RoomControlDoc
- type Tags
- type Transport
- type UIConfig
- type UIControlGroup
- type UIDisplay
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("The requested item was not found")
ErrNotFound is the error that a Datastore should return if it is unable to find the requested item
Functions ¶
This section is empty.
Types ¶
type APIRoom ¶
APIRoom represents the room doc used by the AV Control API in order to control a given room
type AudioControl ¶
type AudioControl struct {
MasterVolume ControlSet
}
AudioControl contains information about audio controls in the room
type ControlAPIRequest ¶
type ControlAPIRequest interface{}
ControlAPIRequest contains the information necessary for making a request to the AV Control API
type ControlGroup ¶
type ControlGroup struct { Displays []DisplayControl Audio AudioControl PowerOff ControlSet DefaultState ControlSet }
ControlGroup represents a group of Devices and inputs. These groups are used for logical grouping and displaying on different UIs
type ControlSet ¶
type ControlSet struct { APIRequest ControlAPIRequest Requests []GenericControlRequest }
ControlSet represents the request to be made (both to the AV Control API and other arbitrary locations) in order to set the room to a given state
type Datastore ¶
type Datastore interface { GetRoom(roomID string) (Room, error) ListAllRooms() ([]string, error) SaveRoom(room Room) error GetDevice(deviceID string) (Device, error) GetRoomDevices(roomID string) ([]Device, error) ListRoomDevices(roomID string) ([]string, error) SaveDevice(device Device) error GetDeviceTemplate(templateID string) (DeviceTemplate, error) ListDeviceTemplates() ([]string, error) GetUIConfig(roomID string) (UIConfig, error) SaveUIConfig(config UIConfig) error SaveControlDoc(doc RoomControlDoc) error GetConfig(configID string) (interface{}, error) }
Datastore is the interface that a datastore implementation must meet in order to function properly for shipyard
type Device ¶
type Device struct { ID string `json:"id"` Room string `json:"room"` 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"` }
Device represents a physical AV device and its configuration
type DeviceControl ¶
type DeviceControl struct { Driver string `json:"driver"` Address string `json:"address"` Ports []string `json:"ports,omitempty"` }
DeviceControl represents a pared down set of information for a device that is necessary for the AV API to understand how to control the device
type DevicePort ¶
type DevicePort struct { ID string `json:"id"` Name string `json:"name"` Endpoints []PortEndpoint `json:"endpoints"` Incoming bool `json:"incoming"` Type string `json:"type"` }
DevicePort represents a port on a physical device
type DeviceTemplate ¶
DeviceTemplate represents a template for a device
type DisplayControl ¶
type DisplayControl struct { Name string Icon string Sources []DisplayControlSource }
DisplayControl represents a Display and its associated controls for a given group
type DisplayControlSource ¶
type DisplayControlSource struct { Name string Icon string Visible bool ControlSet }
DisplayControlSource represents a source and its associated controls in relation to a specific display
type GenericControlRequest ¶
GenericControlRequest contains the information necessary to make a generic HTTP request in association with making state changes in a room
type Logger ¶
type Logger interface { Debugf(string, ...interface{}) Infof(string, ...interface{}) Warnf(string, ...interface{}) Errorf(string, ...interface{}) }
Logger is the interface that should be met by a logging implementation in order for it to be useful to shipyard
type MasterVolume ¶
type PortEndpoint ¶
type Room ¶
type Room struct { ID string `json:"id"` Designation string `json:"designation"` PublicDescription string `json:"publicDescription"` PrivateDescription string `json:"privateDescription"` ProxyBaseURL string `json:"proxyBaseURL"` Tags Tags `json:"tags"` }
Room represents a physical room containing AV Equipment
type RoomConfig ¶
type RoomConfig struct { ID string ControlPanels map[string]string ControlGroups map[string]ControlGroup }
RoomConfig represents the program for a room that can be used by various UIs to control different states in the room
type RoomControlCompiler ¶
type RoomControlCompiler interface {
CompileRoomControlDoc(Room, []Device) (RoomControlDoc, error)
}
RoomControlCompiler represents the interface that an implementation needs to meet in order to be used as a compiler for a room control doc
type RoomControlDoc ¶
type RoomControlDoc struct { ID string `json:"id"` ProxyBaseURL string `json:"proxyBaseURL"` Devices map[string]DeviceControl `json:"devices"` }
RoomControlDoc represents a pared down view of a room that the AV API needs in order to successfully control a room
type Transport ¶
Transport is the interface that any given transport implementation should meet for shipyard
type UIConfig ¶
type UIConfig struct { ID string `json:"id"` ControlPanels map[string]string `json:"controlPanels"` ControlGroups map[string]ControlGroup `json:"controlGroups"` }
type UIControlGroup ¶
type UIControlGroup struct { PowerOff ControlSet `json:"powerOff"` DefaultState ControlSet `json:"defaultState"` Displays map[string]UIDisplay `json:"displays"` Inputs []string `json:"inputs"` Microphones map[string][]string `json:"microphones"` Cameras []string `json:"cameras"` MasterVolume MasterVolume `json:"masterVolume"` }