Documentation ¶
Index ¶
- type Handlers
- func (h *Handlers) GetRoomConfiguration(c *gin.Context)
- func (h *Handlers) GetRoomHealth(c *gin.Context)
- func (h *Handlers) GetRoomInfo(c *gin.Context)
- func (h *Handlers) GetRoomState(c *gin.Context)
- func (h *Handlers) Info(c *gin.Context)
- func (h *Handlers) Log(c *gin.Context)
- func (h *Handlers) Proxy(c *gin.Context)
- func (h *Handlers) RequestID(c *gin.Context)
- func (h *Handlers) Room(c *gin.Context)
- func (h *Handlers) SetRoomState(c *gin.Context)
- func (h *Handlers) Stats(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handlers ¶
type Handlers struct { Host string DataService avcontrol.DataService Logger *zap.Logger State avcontrol.StateGetSetter DriverRegistry avcontrol.DriverRegistry }
Handlers acts as the http handler interface for the av-control-api.
func (*Handlers) GetRoomConfiguration ¶
GetRoomConfiguration gets the RoomConfig and returns it to the user as a JSON object in the body of an http response.
func (*Handlers) GetRoomHealth ¶
GetRoomHealth gets the health status of all the devices in the room and returns it to the user as a JSON object in the body of an http response.
func (*Handlers) GetRoomInfo ¶
GetRoomInfo gets the device info of all the devices in the room and returns it to the user as a JSON object in the body of an http response.
func (*Handlers) GetRoomState ¶
GetRoomState gets the state of the devices in the room and returns it to the user as a JSON object in the body of an http response.
func (*Handlers) Info ¶
Info returns a list of the registered drivers to the user in the body of an http response.
func (*Handlers) RequestID ¶
RequestID requests that the client provides an id to be used in log statements.
func (*Handlers) Room ¶
Room parses the http parameter "room", gets the appropriate room, and sets the parameter _cRoom.
func (*Handlers) SetRoomState ¶
SetRoomState parses a new room state from the user's http request and sets the room state accordingly. It returns an http response to the user with the status of the action.