Documentation
¶
Index ¶
- func GetRecordCount() (int, error)
- func GetRoomID(building string, room string) (string, error)
- func HTTP(requestType string, url string) ([]byte, error)
- func IsRoomAvailable(symbolID string) (bool, error)
- func TranslateFusionSignalTypes(signalType int) (string, error)
- type AllRooms
- type FusionAllRooms
- type FusionAvailability
- type FusionRecordCount
- type FusionRoom
- type FusionSignal
- type FusionSymbol
- type Health
- type Room
- type Signal
- type SlimRoom
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetRecordCount ¶
GetRecordCount returns an int representing how many records Fusion has (for circumventing pagination)
func HTTP ¶
HTTP is used to quickly make calls to the Crestron Fusion API and request a JSON response
func IsRoomAvailable ¶
IsRoomAvailable returns a bool representing whether or not a room is available according to the Fusion "SYSTEM_POWER" symbol
func TranslateFusionSignalTypes ¶
TranslateFusionSignalTypes takes Fusion-returned integer values and returns a human-readable string describing the signal's type
Types ¶
type AllRooms ¶
type AllRooms struct { Links []hateoas.Link `json:"links,omitempty"` Rooms []SlimRoom `json:"rooms"` }
AllRooms is a clean struct for returning room data
func GetAllRooms ¶
GetAllRooms returns all known rooms from the Crestron Fusion database
type FusionAllRooms ¶
type FusionAllRooms struct {
APIRooms []FusionRoom `json:"API_Rooms"`
}
FusionAllRooms is a struct for receiving responses from Fusion
type FusionAvailability ¶
type FusionAvailability struct {
RawValue bool
}
type FusionRecordCount ¶
type FusionRecordCount struct {
TotalRecords int `json:"TotalRecords"`
}
type FusionRoom ¶
type FusionRoom struct { RoomName string RoomID string Hostname string Address string Building string Room string Available bool Symbols []FusionSymbol }
FusionRoom is a struct representing a room in Fusion's data
type FusionSignal ¶
type FusionSymbol ¶
type FusionSymbol struct { ProcessorName string ConnectInfo string SymbolID string Signals []FusionSignal }
type Room ¶
type Room struct { Links []hateoas.Link `json:"links,omitempty"` Name string `json:"name"` ID string Hostname string `json:"hostname,omitempty"` Address string `json:"address,omitempty"` Building string `json:"building,omitempty"` Room string `json:"room,omitempty"` Symbol string `json:"symbol,omitempty"` Available bool `json:"available"` Health Health `json:"health"` Signals []Signal `json:"signals"` }
Room is a clean struct representing a room
func GetRoomByName ¶
GetRoomByName gets information about a room from only its name (EG: ASB+A203)