Documentation
¶
Index ¶
- func GetRoomIDFromDevice(d string) string
- func HasRole(device Device, role string) bool
- func IsDeviceIDValid(id string) bool
- type AttributeSet
- type AudioConfiguration
- type Auth
- type Building
- type BulkUpdateResponse
- type Camera
- type CameraControlRequest
- type CameraPreset
- type Command
- type Commands
- type ConfigCommand
- type DMPS
- type DMPSList
- type DesignationConfig
- type DesignationDeploymentConfig
- type Device
- func (d *Device) GetCommandByID(id string) Command
- func (d *Device) GetDeviceRoomID() string
- func (d *Device) GetPortFromSrc(src string) *Port
- func (d *Device) GetPortFromSrcAndDest(src, dest string) *Port
- func (d *Device) HasCommand(id string) bool
- func (d *Device) HasRole(role string) bool
- func (d *Device) Validate() error
- type DeviceDeploymentConfig
- type DeviceType
- type Endpoint
- type Evaluator
- type FullConfig
- type Group
- type IOConfiguration
- type LabConfig
- type MenuTree
- type Microservice
- type Panel
- type Port
- type PowerState
- type Preset
- type PseudoInput
- type Recording
- type Role
- type Room
- type RoomConfiguration
- type ScheduleConfig
- type ServiceConfig
- type ServiceConfigWrapper
- type Template
- type ThemeConfig
- type UIConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsDeviceIDValid ¶
IsDeviceIDValid takes a device id and tells you whether or not it is valid.
Types ¶
type AttributeSet ¶
type AttributeSet struct { Name string `json:"name"` DeviceType string `json:"device-type"` DeviceName string `json:"device-name,omitempty"` DeviceIcon string `json:"device-icon,omitempty"` Attributes map[string]interface{} `json:"attributes"` }
AttributeSet is an object that contains a set of attributes and an identifier for this set
type AudioConfiguration ¶
type AudioConfiguration struct { Display string `json:"display"` AudioDevices []string `json:"audioDevices"` RoomWide bool `json:"roomWide"` }
AudioConfiguration - a representation of how the audio is configured when using multiple displays.
type Auth ¶
type Auth struct { ID string `json:"_id"` Roles []string `json:"roles"` Permissions []struct { Group string `json:"group"` Roles []string `json:"roles"` } `json:"permissions"` }
Auth - our authentication struct.
type Building ¶
type Building struct { ID string `json:"_id"` Name string `json:"name"` Description string `json:"description"` Tags []string `json:"tags,omitempty"` }
Building - the representation about a building containing a TEC Pi system.
type BulkUpdateResponse ¶
type BulkUpdateResponse struct { ID string `json:"_id"` Success bool `json:"success"` Message string `json:"message"` }
BulkUpdateResponse - a collection of responses when making bulk changes to the database.
type Camera ¶
type Camera 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"` Presets []CameraPreset `json:"presets"` }
type CameraControlRequest ¶ added in v1.1.0
type CameraPreset ¶
type Command ¶
type Command struct { ID string `json:"_id"` Description string `json:"description"` Microservice Microservice `json:"microservice"` Endpoint Endpoint `json:"endpoint"` Priority int `json:"priority"` Tags []string `json:"tags,omitempty"` }
Command - a representation of an API command to be executed.
func (Command) BuildCommandAddress ¶
BuildCommandAddress builds the full address for a command based off it's the microservice and endpoint
type Commands ¶
type Commands struct { PowerOn []ConfigCommand `json:"powerOn,omitempty"` PowerOff []ConfigCommand `json:"powerOff,omitempty"` InputSame []ConfigCommand `json:"inputSame,omitempty"` InputDifferent []ConfigCommand `json:"inputDifferent,omitempty"` Delay int `json:"json:delay,omitempty"` }
Commands - a representation of commands to be sent through the UI.
type ConfigCommand ¶
type ConfigCommand struct { Method string `json:"method"` Port int `json:"port"` Endpoint string `json:"endpoint"` Body map[string]interface{} `json:"body"` }
ConfigCommand - ...I dunno, ask Danny.
type DMPS ¶
type DMPS struct { Hostname string `json:"hostname"` Address string `json:"address"` CommandToQuery string `json:"commandToQuery,omitempty"` Port string `json:"port,omitempty"` }
DMPS - a single DMPS to connect to and pull events
type DesignationConfig ¶
type DesignationConfig struct { Task string `json:"task,omitempty"` Port string `json:"port"` EnvironmentVariables map[string]string `json:"environment-values,omitempty"` DockerInfo map[string]interface{} `json:"docker-info,omitempty"` }
DesignationConfig .
type DesignationDeploymentConfig ¶
type DesignationDeploymentConfig struct { EnvironmentVariables map[string]string `json:"environment-values,omitempty"` DockerInfo map[string]interface{} `json:"docker-info,omitempty"` DockerServices []string `json:"docker-services,omitempty"` Services []string `json:"services,omitempty"` }
DesignationDeploymentConfig .
type Device ¶
type Device struct { ID string `json:"_id"` Name string `json:"name"` Address string `json:"address"` Description string `json:"description"` DisplayName string `json:"display_name"` Type DeviceType `json:"type,omitempty"` Roles []Role `json:"roles"` Ports []Port `json:"ports"` Tags []string `json:"tags,omitempty"` Attributes map[string]interface{} `json:"attributes,omitempty"` // Proxy is a map of regex (matching command id's) to the host:port of the proxy Proxy map[string]string `json:"proxy,omitempty"` }
Device - a representation of a device involved in a TEC Pi system.
func (*Device) GetCommandByID ¶
GetCommandByID searches for a specific command and returns it if found.
func (*Device) GetDeviceRoomID ¶
GetDeviceRoomID returns the room ID portion of the device ID.
func (*Device) GetPortFromSrc ¶
GetPortFromSrc returns the port going to me from src, and nil if one doesn't exist
func (*Device) GetPortFromSrcAndDest ¶
GetPortFromSrcAndDest returns the port with a matching src/dest, and nil if one doesn't exist
type DeviceDeploymentConfig ¶
type DeviceDeploymentConfig struct { ID string `json:"_id"` Designations map[string]DesignationDeploymentConfig `json:"designations"` }
DeviceDeploymentConfig .
type DeviceType ¶
type DeviceType struct { ID string `json:"_id"` Description string `json:"description,omitempty"` DisplayName string `json:"display_name,omitempty"` Input bool `json:"input,omitempty"` Output bool `json:"output,omitempty"` Source bool `json:"source,omitempty"` Destination bool `json:"destination,omitempty"` Roles []Role `json:"roles,omitempty"` Ports []Port `json:"ports,omitempty"` PowerStates []PowerState `json:"power_states,omitempty"` Commands []Command `json:"commands,omitempty"` DefaultName string `json:"default-name,omitempty"` DefaultIcon string `json:"default-icon,omitempty"` Tags []string `json:"tags,omitempty"` }
DeviceType - a representation of a type (or category) of devices.
func (*DeviceType) Validate ¶
func (dt *DeviceType) Validate(deepCheck bool) error
Validate checks to make sure that the values of the DeviceType are valid.
type Endpoint ¶
type Endpoint struct { ID string `json:"_id"` Description string `json:"description"` Path string `json:"path"` Tags []string `json:"tags,omitempty"` }
Endpoint - a representation of an API endpoint.
type Evaluator ¶
type Evaluator struct { ID string `json:"_id"` CodeKey string `json:"codekey,omitempty"` Description string `json:"description,omitempty"` Priority int `json:"priority,omitempty"` Tags []string `json:"tags,omitempty"` }
Evaluator - a representation of a priority evaluator.
type FullConfig ¶
type FullConfig struct { ID string `json:"_id"` AWSConfig map[string]DesignationConfig `json:"aws-stages,omitempty"` CampusConfig map[string]DesignationConfig `json:"campus-stages,omitempty"` }
FullConfig .
type Group ¶
type Group struct { ID string `json:"_id"` Icon string `json:"icon,omitempty"` Subgroups []Group `json:"sub-groups,omitempty"` Presets []AttributeSet `json:"presets,omitempty"` }
Group is a collection of attribute presets to create devices that fall into this group
type IOConfiguration ¶
type IOConfiguration struct { Name string `json:"name"` Icon string `json:"icon"` Displayname *string `json:"displayname,omitempty"` SubInputs []IOConfiguration `json:"subInputs,omitempty"` }
IOConfiguration - a representation of an input or output device.
type LabConfig ¶
type LabConfig struct { ID string `json:"_id"` LabName string `json:"lab_name"` LabID string `json:"lab_id"` }
LabConfig represents the configuration values neccessary for a Lab Attendance system to function properly
type MenuTree ¶
type MenuTree struct {
Groups []Group `json:"groups"`
}
MenuTree is a wrapper for the list of groups
type Microservice ¶
type Microservice struct { ID string `json:"_id"` Description string `json:"description"` Address string `json:"address"` Tags []string `json:"tags,omitempty"` }
Microservice - a representation of a microservice in our API.
func (*Microservice) Validate ¶
func (m *Microservice) Validate() error
Validate checks to make sure that the Microservice's values are valid.
type Panel ¶
type Panel struct { Hostname string `json:"hostname"` UIPath string `json:"uipath"` Preset string `json:"preset"` Features []string `json:"features"` Theme string `json:"theme"` }
Panel - a representation of a touchpanel and which preset it has.
type Port ¶
type Port struct { ID string `json:"_id"` FriendlyName string `json:"friendly_name,omitempty"` PortType string `json:"port_type,omitempty"` SourceDevice string `json:"source_device,omitempty"` DestinationDevice string `json:"destination_device,omitempty"` Description string `json:"description,omitempty"` Tags []string `json:"tags,omitempty"` }
Port - a representation of an input/output port on a device.
type PowerState ¶
type PowerState struct { ID string `json:"_id"` Description string `json:"description"` Tags []string `json:"tags,omitempty"` }
PowerState - a representation of a device's power state.
func (*PowerState) Validate ¶
func (ps *PowerState) Validate() error
Validate checks to make sure that the PowerState's values are valid.
type Preset ¶
type Preset struct { Name string `json:"name"` Icon string `json:"icon"` Displays []string `json:"displays"` AudioDevices []string `json:"audioDevices"` Inputs []string `json:"inputs"` IndependentAudioDevices []string `json:"independentAudioDevices,omitempty"` AudioGroups map[string][]string `json:"audioGroups,omitempty"` VolumeMatches []string `json:"volumeMatches,omitempty"` Commands Commands `json:"commands,omitempty"` Screens []string `json:"screens"` Cameras []Camera `json:"cameras"` Recording Recording `json:"recording"` }
Preset - a representation of what is controlled by this preset.
type PseudoInput ¶
type PseudoInput struct { Displayname string `json:"displayname"` Config []struct { Input string `json:"input"` Outputs []string `json:"outputs"` } `json:"config"` }
PseudoInput - a fake input I guess
type Role ¶
type Role struct { ID string `json:"_id"` Description string `json:"description,omitempty"` Tags []string `json:"tags,omitempty"` }
Role - a representation of a role that a device plays in the overall system.
type Room ¶
type Room struct { ID string `json:"_id"` Name string `json:"name"` Description string `json:"description"` Configuration RoomConfiguration `json:"configuration"` Designation string `json:"designation"` Devices []Device `json:"devices,omitempty"` Tags []string `json:"tags,omitempty"` Attributes map[string]interface{} `json:"attributes,omitempty"` }
Room - a representation of a room containing a TEC Pi system.
type RoomConfiguration ¶
type RoomConfiguration struct { ID string `json:"_id"` Evaluators []Evaluator `json:"evaluators,omitempty"` Description string `json:"description,omitempty"` Tags []string `json:"tags,omitempty"` }
RoomConfiguration - a representation of the configuration of a room.
func (*RoomConfiguration) Validate ¶
func (rc *RoomConfiguration) Validate(deepCheck bool) error
Validate checks to make sure that the RoomConfiguration's values are valid.
type ScheduleConfig ¶
type ScheduleConfig struct { ID string `json:"_id"` Rev string `json:"_rev"` Resource string `json:"resource"` Name string `json:"displayname"` AutoDiscoverURL string `json:"autodiscover-url"` AccessType string `json:"access-type"` Image string `json:"image-url"` BookNow bool `json:"allowbooknow"` ShowHelp bool `json:"showhelp"` CalendarType string `json:"calendar-type"` CalendarName string `json:"calendar-name"` }
ScheduleConfig represents the configuration values necessary for the Calendar service to function properly
type ServiceConfig ¶
ServiceConfig .
type ServiceConfigWrapper ¶
type ServiceConfigWrapper struct { ID string `json:"_id"` Designations map[string]ServiceConfig `json:"designations,omitempty"` }
ServiceConfigWrapper .
type Template ¶
type Template struct { ID string `json:"_id"` Description string `json:"description"` UIConfig UIConfig `json:"uiconfig"` BaseTypes []string `json:"base_types"` }
Template - the UI config and device list for a room for quick configuration.
type ThemeConfig ¶
type ThemeConfig struct { ID string `json:"_id,omitempty"` BackgroundColor string `json:"background-color"` TopBarColor string `json:"top-bar-color"` BackgroundColorAccent string `json:"background-color-accent"` DPADColor string `json:"dpad-color"` DPADPress string `json:"dpad-press"` CamPresetColor string `json:"cam-preset-color"` CamPressColor string `json:"cam-preset-press"` CamLinkColor string `json:"cam-link"` ShowCamText bool `json:"show-cam-text"` PhoneNumber string `json:"phone-number"` VolumeSliderColor string `json:"volume-slider-color"` HelpButtonColor string `json:"help-button-color"` TextColor string `json:"text-color"` FontLink string `json:"font-link"` FontName string `json:"font-name"` }
ThemeConfig - a representation of the css and other theme information for the UI.
type UIConfig ¶
type UIConfig struct { ID string `json:"_id,omitempty"` Api []string `json:"api"` Panels []Panel `json:"panels"` Presets []Preset `json:"presets"` InputConfiguration []IOConfiguration `json:"inputConfiguration"` OutputConfiguration []IOConfiguration `json:"outputConfiguration"` AudioConfiguration []AudioConfiguration `json:"audioConfiguration"` PseudoInputs []PseudoInput `json:"pseudoInputs,omitempty"` }
UIConfig - a representation of all the information needed to configure the touchpanel UI.