handlers

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2016 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllRooms

func GetAllRooms(context echo.Context) error

GetAllRooms returns a list of all rooms Crestron Fusion knows about

func GetAllRoomsByBuilding

func GetAllRoomsByBuilding(context echo.Context) error

GetAllRoomsByBuilding pulls room information from fusion by building designator

func GetBuildingByName

func GetBuildingByName(context echo.Context) error

GetBuildingByName retrieves a specific building by name

func GetRoomByName

func GetRoomByName(context echo.Context) error

GetRoomByName get a room from Fusion using only its name

func GetRoomByNameAndBuildingHandler

func GetRoomByNameAndBuildingHandler(context echo.Context) error

GetRoomByNameAndBuildingHandler is almost identical to GetRoomByName

func PutRoomChanges

func PutRoomChanges(context echo.Context) error

PutRoomChanges is the handler to accept puts to /buildlings/:buildling/rooms/:room with the json payload with one or more of the fields:

	{
    "currentInput": "computer",
    "displays": [{
        "name": "dp1",
        "power": "on",
        "blanked": false
    }],
		"audioDevices": [{
		"muted": false,
		"volume": 50
		}]
	}
	Or the 'PublicRoom' struct defined in this package.
}

func ReplaceIPAddressEndpoint

func ReplaceIPAddressEndpoint(path string, address string) string

ReplaceIPAddressEndpoint is a simple helper

func UnimplementedResponse

func UnimplementedResponse(context echo.Context) error

UnimplementedResponse is a placeholder function that lets the user know that I haven't finished the API yet

Types

type AudioDevice

type AudioDevice struct {
	Name   string `json:"name"`
	Power  string `json:"power"`
	Input  string `json:"input"`
	Muted  *bool  `json:"muted"`
	Volume *int   `json:"volume"`
}

AudioDevice represents an audio device

type Display

type Display struct {
	Name    string `json:"name"`
	Power   string `json:"power"`
	Input   string `json:"input"`
	Blanked *bool  `json:"blanked"`
}

Display represents a display

type PublicRoom

type PublicRoom struct {
	CurrentVideoInput string        `json:"currentVideoInput"`
	CurrentAudioInput string        `json:"currentAudioInput"`
	Power             string        `json:"power"`
	Blanked           *bool         `json:"blanked"`
	Displays          []Display     `json:"displays"`
	AudioDevices      []AudioDevice `json:"audioDevices"`
}

PublicRoom is the struct that is returned (or put) as part of the public API

Jump to

Keyboard shortcuts

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