structs

package
v0.0.0-...-8472d0d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 17, 2023 License: Apache-2.0 Imports: 10 Imported by: 43

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlertSeverities = []AlertSeverity{
	Critical,
	Warning,
	Low,
}

Functions

func AddToTags

func AddToTags(tagList []string, tags ...string) []string

func ContainsAllTags

func ContainsAllTags(tagList []string, tags ...string) bool

func ContainsAnyTags

func ContainsAnyTags(tagList []string, tags ...string) bool

func GetRoomIDFromDevice

func GetRoomIDFromDevice(d string) string

GetRoomIDFromDevice .

func HasAllPeople

func HasAllPeople(oldPeople []Person, newPeople ...Person) bool

HasAllPeople compares two list of Persons

func HasRole

func HasRole(device Device, role string) bool

HasRole checks to see if the given device has the given role.

func IsDeviceIDValid

func IsDeviceIDValid(id string) bool

IsDeviceIDValid takes a device id and tells you whether or not it is valid.

Types

type ActiveSignal

type ActiveSignal struct {
	// TODO should probably change this to a bool
	Active bool `json:"active"`
}

ActiveSignal is our struct for reporting if a port is active or not

type Alert

type Alert struct {
	events.BasicDeviceInfo

	AlertID string `json:"id,omitempty,omitempty"`

	Type     AlertType     `json:"type,omitempty"`
	Category AlertCategory `json:"category,omitempty"`
	Severity AlertSeverity `json:"severity,omitempty"`

	Message    string      `json:"message,omitempty"`
	MessageLog []string    `json:"message-log,omitempty"`
	Data       interface{} `json:"data,omitempty"`
	SystemType string      `json:"system-type,omitempty"`

	AlertStartTime      time.Time `json:"start-time,omitempty"`
	AlertEndTime        time.Time `json:"end-time,omitempty"`
	AlertLastUpdateTime time.Time `json:"update-time,omitempty"`

	Active bool `json:"active"`

	AlertTags  []string `json:"alert-tags,omitempty"`
	DeviceTags []string `json:"device-tags,omitempty"`
	RoomTags   []string `json:"room-tags,omitempty"`

	Requester string `json:"requester,omitempty"`

	Source string `json:"-"`

	ManualResolve bool `json:"manual-resolve"`
}

Alert is a struct that contains the information regarding an alerting event.

func (Alert) TimeToResolve

func (a Alert) TimeToResolve() string

TimeToResolve .

type AlertCategory

type AlertCategory string

AlertCategory is an enum of the different categories of alerts

const (
	System AlertCategory = "system"
	User   AlertCategory = "user"
)

Here is a list of AlertCategory

func AddToCategory

func AddToCategory(list []AlertCategory, toAdd ...AlertCategory) []AlertCategory

type AlertSeverity

type AlertSeverity string

AlertSeverity is an enum of the different levels of severity for alerts

const (
	Critical AlertSeverity = "Critical"
	Warning  AlertSeverity = "Warning"
	Low      AlertSeverity = "Low"
)

Here is a list of AlertSeverities

func AddToSeverity

func AddToSeverity(list []AlertSeverity, toAdd ...AlertSeverity) []AlertSeverity

type AlertType

type AlertType string

AlertType is an enum of the different types of alerts

const (
	Communication AlertType = "communication"
	Heartbeat     AlertType = "heartbeat"
)

func AddToType

func AddToType(list []AlertType, toAdd ...AlertType) []AlertType

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 AudioDevice

type AudioDevice struct {
	PublicDevice
	Muted  *bool `json:"muted,omitempty"`
	Volume *int  `json:"volume,omitempty"`
}

AudioDevice represents an audio device

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.

func (*Building) Validate

func (b *Building) Validate() error

Validate determines if the current values for the building's attributes are valid or not.

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 CameraPreset

type CameraPreset struct {
	DisplayName string `json:"displayName"`
	SetPreset   string `json:"setPreset"`
}

type Category

type Category struct {
	UAction string `json:"u_action"`
	Hint    string `json:"u_attribute_help_text"`
}

type ClassHalfHourBlock

type ClassHalfHourBlock struct {
	BlockStart     string    `json:"block-start"`
	ClassName      string    `json:"class-name"`
	ClassTime      string    `json:"class-time"`
	Teacher        Person    `json:"teacher"`
	Days           string    `json:"days"`
	ClassStartTime time.Time `json:"class-start-time"`
	ClassEndTime   time.Time `json:"class-end-time"`
}

ClassHalfHourBlock defines the information needed for a 30 min block of a class

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

func (c Command) BuildCommandAddress() string

BuildCommandAddress builds the full address for a command based off it's the microservice and endpoint

func (*Command) Validate

func (c *Command) Validate() error

Validate checks to make sure that the Command's values are valid.

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 DMPSList

type DMPSList struct {
	ID   string `json:"_id"`
	List []DMPS `json:"list"`
}

DMPSList - the list of DMPSes 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) BuildCommandURL

func (d *Device) BuildCommandURL(commandID string) (string, *nerr.E)

BuildCommandURL builds the full address for a command based off it's the microservice and endpoint. If the device is proxied, the host of the url will be the proxy's address

func (*Device) GetCommandByID

func (d *Device) GetCommandByID(id string) Command

GetCommandByID searches for a specific command and returns it if found.

func (*Device) GetDeviceRoomID

func (d *Device) GetDeviceRoomID() string

GetDeviceRoomID returns the room ID portion of the device ID.

func (*Device) GetPortFromSrc

func (d *Device) GetPortFromSrc(src string) *Port

GetPortFromSrc returns the port going to me from src, and nil if one doesn't exist

func (*Device) GetPortFromSrcAndDest

func (d *Device) GetPortFromSrcAndDest(src, dest string) *Port

GetPortFromSrcAndDest returns the port with a matching src/dest, and nil if one doesn't exist

func (*Device) HasCommand

func (d *Device) HasCommand(id string) bool

HasCommand .

func (*Device) HasRole

func (d *Device) HasRole(role string) bool

HasRole checks to see if the given device has the given role.

func (*Device) Validate

func (d *Device) Validate() error

Validate checks to see if the device's information is valid or not.

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 Display

type Display struct {
	PublicDevice
	Blanked *bool `json:"blanked,omitempty"`
}

Display represents a display

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.

func (*Endpoint) Validate

func (e *Endpoint) Validate() error

Validate checks to make sure that the Endpoint's values are valid.

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.

func (*Evaluator) Validate

func (e *Evaluator) Validate() error

Validate checks to make sure that the Evaluator's values are valid.

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 HardwareInfo

type HardwareInfo struct {
	Hostname              string           `json:"hostname,omitempty"`
	ModelName             string           `json:"model_name,omitempty"`
	SerialNumber          string           `json:"serial_number,omitempty"`
	BuildDate             string           `json:"build_date,omitempty"`
	FirmwareVersion       string           `json:"firmware_version,omitempty"`
	ProtocolVersion       string           `json:"protocol_version,omitempty"`
	NetworkInfo           NetworkInfo      `json:"network_information,omitempty"`
	FilterStatus          string           `json:"filter_status,omitempty"`
	WarningStatus         []string         `json:"warning_status,omitempty"`
	ErrorStatus           []string         `json:"error_status,omitempty"`
	PowerStatus           string           `json:"power_status,omitempty"`
	PowerSavingModeStatus string           `json:"power_saving_mode_status,omitempty"`
	TimerInfo             []map[string]int `json:"timer_info,omitempty"`
	Temperature           string           `json:"temperature,omitempty"`
}

HardwareInfo contains the common information for device hardware information

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 IncidentRequest

type IncidentRequest struct {
	SysID    string `json:"sys_id,omitempty"`
	Number   string `json:"number,omitempty"`
	Service  string `json:"u_service,omitempty"`
	CallerID string `json:"caller_id,omitempty"`

	AssignmentGroup string `json:"assignment_group,omitempty"`
	State           string `json:"state,omitempty"`

	Room string `json:"u_room,omitempty"`

	ShortDescription string `json:"short_description,omitempty"`

	ContactNumber string `json:"u_work_phone,omitempty"`
	ContactEmail  string `json:"u_email,omitempty"`

	Severity    string `json:"u_severity,omitempty"`
	Reach       string `json:"u_reach,omitempty"`
	WorkStatus  string `json:"u_work_status,omitempty"`
	Sensitivity string `json:"u_sensitivity,omitempty"`

	InternalNotes string `json:"work_notes,omitempty"`
	WorkLog       string `json:"comments,omitempty"`

	//The codes necessary for closing a ticket
	ClosureCode       string `json:"u_closure_code,omitempty"`
	ResolutionService string `json:"u_resolution_service,omitempty"`
	ResolutionAction  string `json:"u_action,omitempty"`
}

type IncidentResponse

type IncidentResponse struct {
	SysID         string `json:"sys_id,omitempty"`
	Number        string `json:"number,omitempty"`
	InternalNotes string `json:"work_notes,omitempty"`
	WorkLog       string `json:"comments,omitempty"`
}

type IncidentResponseWrapper

type IncidentResponseWrapper struct {
	Result IncidentResponse `json:"result"`
}

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 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 MultiIncidentResponseWrapper

type MultiIncidentResponseWrapper struct {
	Result []IncidentResponse `json:"result"`
}

type MultiRepairResponseWrapper

type MultiRepairResponseWrapper struct {
	Result []RepairResponse `json:"result"`
}

type NetworkInfo

type NetworkInfo struct {
	IPAddress  string   `json:"ip_address,omitempty"`
	MACAddress string   `json:"mac_address,omitempty"`
	Gateway    string   `json:"gateway,omitempty"`
	DNS        []string `json:"dns,omitempty"`
}

NetworkInfo contains the network information for the device

type Panel

type Panel struct {
	Hostname string   `json:"hostname"`
	UIPath   string   `json:"uipath"`
	Preset   string   `json:"preset"`
	Features []string `json:"features"`
}

Panel - a representation of a touchpanel and which preset it has.

type Person

type Person struct {
	ID   string `json:"net-id"`
	Name string `json:"name"`
}

Person - our authentication struct.

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.

func (*Port) Validate

func (p *Port) Validate() error

Validate checks to make sure that the Port's values are valid.

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"`
	ShareablePresets        []string            `json:"shareablePresets"`
	ShareableDisplays       []string            `json:"shareableDisplays"`
	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 PublicDevice

type PublicDevice struct {
	Name  string `json:"name,omitempty"`
	Power string `json:"power,omitempty"`
	Input string `json:"input,omitempty"`
}

PublicDevice is a struct for inheriting

type PublicRoom

type PublicRoom struct {
	Building          string        `json:"-"`
	Room              string        `json:"-"`
	CurrentVideoInput string        `json:"currentVideoInput,omitempty"`
	CurrentAudioInput string        `json:"currentAudioInput,omitempty"`
	Power             string        `json:"power,omitempty"`
	Blanked           *bool         `json:"blanked,omitempty"`
	Muted             *bool         `json:"muted,omitempty"`
	Volume            *int          `json:"volume,omitempty"`
	Displays          []Display     `json:"displays,omitempty"`
	AudioDevices      []AudioDevice `json:"audioDevices,omitempty"`
}

PublicRoom - a representation of the state of a room.

type QueriedIncidents

type QueriedIncidents struct {
	Result []IncidentResponse `json:"result"`
}

type QueriedUsers

type QueriedUsers struct {
	Result []Users `json:"result"`
}

type Recording

type Recording struct {
	Start   string `json:"start"`
	Stop    string `json:"stop"`
	MaxTime int    `json:"maxTime"`
}

type RepairRequest

type RepairRequest struct {
	SysID              string `json:"sys_id,omitempty"`
	Number             string `json:"number,omitempty"`
	Service            string `json:"u_service,omitempty"`
	AssignmentGroup    string `json:"assignment_group,omitempty"`
	RequestOriginator  string `json:"u_requested_by,omitempty"`
	Parent             string `json:"parent,omitempty"`
	RequestOrigination string `json:"u_request_origination,omitempty"`
	RequestDate        string `json:"u_dropped_off_date,omitempty"`
	Building           string `json:"u_building,omitempty"`
	State              string `json:"state,omitempty"`
	Room               string `json:"u_room,omitempty"`
	ShortDescription   string `json:"short_description,omitempty"`
	Description        string `json:"description,omitempty"`

	DateNeeded      string `json:"u_completion_asap_or_date,omitempty"`
	EquipmentReturn string `json:"u_pickup_or_delivery,omitempty"`

	InternalNotes string `json:"work_notes,omitempty"`
	WorkLog       string `json:"comments,omitempty"`
}

type RepairResponse

type RepairResponse struct {
	SysID         string `json:"sys_id,omitempty"`
	Number        string `json:"number,omitempty"`
	InternalNotes string `json:"work_notes,omitempty"`
}

type RepairResponseWrapper

type RepairResponseWrapper struct {
	Result RepairResponse `json:"result"`
}

type ResolutionCategories

type ResolutionCategories struct {
	Result []Category `json:"result"`
}

type ResolutionInfo

type ResolutionInfo struct {
	Code       string    `json:"resolution-code"`
	Notes      string    `json:"notes"`
	ResolvedAt time.Time `json:"resolved-at"`
}

ResolutionInfo is a struct that contains the information about the resolution of the alert

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.

func (*Role) Validate

func (r *Role) Validate() error

Validate checks to make sure that the Role's values are valid.

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.

func (*Room) Validate

func (r *Room) Validate() error

Validate checks to make sure that the Room's values are valid.

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 RoomIssue

type RoomIssue struct {
	RoomIssueID string `json:"id,omitempty"`

	events.BasicRoomInfo

	RoomTags []string `json:"room-tags,omitempty"`

	AlertTypes      []AlertType     `json:"alert-types,omitempty"`
	AlertDevices    []string        `json:"alert-devices,omitempty"`
	AlertCategories []AlertCategory `json:"alert-categories,omitempty"`
	AlertSeverities []AlertSeverity `json:"alert-severities,omitempty"`
	AlertCount      int             `json:"alert-count"`

	ActiveAlertTypes      []AlertType     `json:"active-alert-types,omitempty"`
	ActiveAlertDevices    []string        `json:"active-alert-devices,omitempty"`
	ActiveAlertCategories []AlertCategory `json:"active-alert-categories,omitempty"`
	ActiveAlertSeverities []AlertSeverity `json:"active-alert-severities,omitempty"`
	AlertActiveCount      int             `json:"active-alert-count"`

	SystemType string `json:"system-type,omitempty"`

	Source string `json:"-"`

	Alerts []Alert `json:"alerts,omitempty"`

	//Editable fields
	IssueTags []string `json:"issue-tags,omitempty"`

	IncidentID []string `json:"incident-id,omitempty"`

	Notes string `json:"notes,omitempty"`

	RoomIssueResponses []RoomIssueResponse `json:"responses,omitempty"`

	//resolution fields
	Resolved       bool           `json:"resolved"`
	ResolutionInfo ResolutionInfo `json:"resolution-info,omitempty"`

	//notes-log isn't editable
	NotesLog []string `json:"notes-log,omitempty"`
}

RoomIssue .

func (*RoomIssue) CalculateAggregateInfo

func (r *RoomIssue) CalculateAggregateInfo()

type RoomIssueResponse

type RoomIssueResponse struct {
	Responders    []Person  `json:"responders,omitempty"`
	HelpSentAt    time.Time `json:"help-sent-at,omitempty"`
	HelpArrivedAt time.Time `json:"help-arrived-at,omitempty"`
}

RoomIssueResponse represents information about a tech being dispatched on a room issue

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

type ServiceConfig struct {
	Data map[string]map[string]string `json:"data"`
}

ServiceConfig .

type ServiceConfigWrapper

type ServiceConfigWrapper struct {
	ID           string                   `json:"_id"`
	Designations map[string]ServiceConfig `json:"designations,omitempty"`
}

ServiceConfigWrapper .

type ServiceNowLinkValue

type ServiceNowLinkValue struct {
	Link  string `json:"link"`
	Value string `json:"value"`
}

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 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.

type Users

type Users struct {
	NetID string `json:"user_name,omitempty"`
	Email string `json:"email,omitempty"`
	Phone string `json:"home_phone,omitempty"`
}

type VIAUsers

type VIAUsers struct {
	InactiveUsers []string `json:"inactive_users"`
	ActiveUsers   []string `json:"active_users"`
	UsersWaiting  []string `json:"users_waiting"`
}

VIAUsers contains the counts of the users logged in to the VIA and their status

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL