Documentation ¶
Index ¶
- func RequestID(ctx context.Context) string
- func WithRequestID(ctx context.Context, id string) context.Context
- type AVController
- type AudioDeviceConfig
- type AudioGroupConfig
- type CameraConfig
- type CameraPresetConfig
- type Client
- type ClientBuilder
- type Config
- type ControlGroup
- type DataService
- type DisplayConfig
- type Event
- type EventPublisher
- type GenericRequest
- type SourceConfig
- type State
- type StateControlConfig
- type StateTransition
- type StateTransitionAction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AVController ¶
type AVController interface { RoomState(context.Context, string) (avcontrol.StateResponse, error) SetRoomState(context.Context, string, avcontrol.StateRequest) (avcontrol.StateResponse, error) }
type AudioDeviceConfig ¶
type AudioDeviceConfig struct { Name string Volume StateControlConfig `json:"volume"` Mute StateControlConfig `json:"mute"` Unmute StateControlConfig `json:"unmute"` }
type AudioGroupConfig ¶
type AudioGroupConfig struct { Name string AudioDevices []AudioDeviceConfig }
type CameraConfig ¶
type CameraConfig struct { Name string TiltUp StateControlConfig TiltDown StateControlConfig PanLeft StateControlConfig PanRight StateControlConfig PanTiltStop StateControlConfig ZoomIn StateControlConfig ZoomOut StateControlConfig ZoomStop StateControlConfig Presets []CameraPresetConfig }
CameraConfig represents a Camera and its associated control endpoints
type CameraPresetConfig ¶
type CameraPresetConfig struct { Name string SetPreset StateControlConfig }
CameraPresetConfig represents a preset on a camera
type ClientBuilder ¶
type Config ¶
type Config struct { ID string ControlGroups map[string]ControlGroup States map[string]State }
Config represents the program for a room that can be used to control a room
type ControlGroup ¶
type ControlGroup struct { // PowerOff represents the state the room needs to be in to be considered "off" PowerOff StateControlConfig // PowerOn is the state we set to turn on the room PowerOn StateControlConfig Displays []DisplayConfig MediaAudio AudioDeviceConfig AudioGroups []AudioGroupConfig Cameras []CameraConfig }
ControlGroup represents a group of Devices and inputs. These groups are used for logical grouping and displaying on different UIs
type DataService ¶
type DataService interface { // UIForDevice returns the ui that should be used for the given room/id. UIForDevice(ctx context.Context, room, id string) (string, error) // ControlGroup takes the room and id of a device, and returns the control group that that devices should use. // TODO this should also take into account the divider sensors? // or maybe that should be some combo interface that takes this and key service? ControlGroup(ctx context.Context, room, id string) (string, error) // RoomAndControlGroup figures out which room and control group is associated with the given key. // TODO this function will have to get the room, device -> call ControlGroup RoomAndControlGroup(ctx context.Context, key string) (string, string, error) // Config returns the config for the given room. Config(ctx context.Context, room string) (Config, error) }
type DisplayConfig ¶
type DisplayConfig struct { Name string Icon string Blank StateControlConfig Unblank StateControlConfig Sources []SourceConfig }
DisplayConfig represents a Display and its associated controls for a given group
type Event ¶
type Event struct { Key string Value string Data interface{} Tags []string Room string Device string }
Event - i'm holding off on events for a few days
type GenericRequest ¶
GenericRequest contains the information necessary to make a generic HTTP request in association with making state changes in a room
type SourceConfig ¶
type SourceConfig struct { Name string Icon string Visible bool StateControlConfig // Sources represent sub-sources of the parent source Sources []SourceConfig }
SourceConfig represents a source and its associated controls
type StateControlConfig ¶
type StateControlConfig struct { MatchStates []string StateTransitions []StateTransition }
type StateTransition ¶
type StateTransition struct { MatchStates []string Action StateTransitionAction }
type StateTransitionAction ¶
type StateTransitionAction struct { SetStates []string Requests []GenericRequest }